/** * plotly.js v4.3.0 * Copyright 2012-2026, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ ( function(root, factory) { if (typeof module === "object" && module.exports) { module.exports = factory(); } else { root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { "use strict";var Plotly=(()=>{var qgt=Object.create;var O6=Object.defineProperty,Ogt=Object.defineProperties,Ngt=Object.getOwnPropertyDescriptor,Ugt=Object.getOwnPropertyDescriptors,Vgt=Object.getOwnPropertyNames,D8=Object.getOwnPropertySymbols,Ggt=Object.getPrototypeOf,KN=Object.prototype.hasOwnProperty,Xle=Object.prototype.propertyIsEnumerable;var ZN=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Hgt=e=>{throw TypeError(e)};var Yle=(e,t,r)=>t in e?O6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fn=(e,t)=>{for(var r in t||(t={}))KN.call(t,r)&&Yle(e,r,t[r]);if(D8)for(var r of D8(t))Xle.call(t,r)&&Yle(e,r,t[r]);return e},da=(e,t)=>Ogt(e,Ugt(t));var F8=(e,t)=>{var r={};for(var i in e)KN.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&D8)for(var i of D8(e))t.indexOf(i)<0&&Xle.call(e,i)&&(r[i]=e[i]);return r};var Ci=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}};var W=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Jn=(e,t)=>{for(var r in t)O6(e,r,{get:t[r],enumerable:!0})},Zle=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Vgt(t))!KN.call(e,n)&&n!==r&&O6(e,n,{get:()=>t[n],enumerable:!(i=Ngt(t,n))||i.enumerable});return e};var l1=(e,t,r)=>(r=e!=null?qgt(Ggt(e)):{},Zle(t||!e||!e.__esModule?O6(r,"default",{value:e,enumerable:!0}):r,e)),Pt=e=>Zle(O6({},"__esModule",{value:!0}),e);var Zi=(e,t,r)=>new Promise((i,n)=>{var a=l=>{try{s(r.next(l))}catch(u){n(u)}},o=l=>{try{s(r.throw(l))}catch(u){n(u)}},s=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,o);s((r=r.apply(e,t)).next())}),jgt=function(e,t){this[0]=e,this[1]=t};var Kle=e=>{var t=e[ZN("asyncIterator")],r=!1,i,n={};return t==null?(t=e[ZN("iterator")](),i=a=>n[a]=o=>t[a](o)):(t=t.call(e),i=a=>n[a]=o=>{if(r){if(r=!1,a==="throw")throw o;return o}return r=!0,{done:!1,value:new jgt(new Promise(s=>{var l=t[a](o);l instanceof Object||Hgt("Object expected"),s(l)}),1)}}),n[ZN("iterator")]=()=>n,i("next"),"throw"in t?i("throw"):n.throw=a=>{throw a},"return"in t&&i("return"),n};var N6=W(Jle=>{"use strict";Jle.version="4.3.0"});var eue=W((Qle,L8)=>{(function(t,r,i){r[t]=r[t]||i(),typeof L8!="undefined"&&L8.exports&&(L8.exports=r[t])})("Promise",typeof window!="undefined"?window:Qle,function(){"use strict";var t,r,i,n=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(w,_,b,M){return Object.defineProperty(w,_,{value:b,writable:!0,configurable:M!==!1})}}catch(g){t=function(_,b,M){return _[b]=M,_}}i=(function(){var w,_,b;function M(x,A){this.fn=x,this.self=A,this.next=void 0}return{add:function(A,T){b=new M(A,T),_?_.next=b:w=b,_=b,b=void 0},drain:function(){var A=w;for(w=_=r=void 0;A;)A.fn.call(A.self),A=A.next}}})();function o(g,w){i.add(g,w),r||(r=a(i.drain))}function s(g){var w,_=typeof g;return g!=null&&(_=="object"||_=="function")&&(w=g.then),typeof w=="function"?w:!1}function l(){for(var g=0;g0&&o(l,_))}catch(b){f.call(new p(_),b)}}}function f(g){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=g,w.state=2,w.chain.length>0&&o(l,w))}function h(g,w,_,b){for(var M=0;M{(function(){var e={version:"3.8.2"},t=[].slice,r=function(z){return t.call(z)},i=self.document;function n(z){return z&&(z.ownerDocument||z.document||z).documentElement}function a(z){return z&&(z.ownerDocument&&z.ownerDocument.defaultView||z.document&&z||z.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch(z){r=function(U){for(var Z=U.length,ne=new Array(Z);Z--;)ne[Z]=U[Z];return ne}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(z){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(U,Z){s.call(this,U,Z+"")},o.setAttributeNS=function(U,Z,ne){l.call(this,U,Z,ne+"")},u.setProperty=function(U,Z,ne){c.call(this,U,Z+"",ne)}}e.ascending=f;function f(z,U){return zU?1:z>=U?0:NaN}e.descending=function(z,U){return Uz?1:U>=z?0:NaN},e.min=function(z,U){var Z=-1,ne=z.length,le,he;if(arguments.length===1){for(;++Z=he){le=he;break}for(;++Zhe&&(le=he)}else{for(;++Z=he){le=he;break}for(;++Zhe&&(le=he)}return le},e.max=function(z,U){var Z=-1,ne=z.length,le,he;if(arguments.length===1){for(;++Z=he){le=he;break}for(;++Zle&&(le=he)}else{for(;++Z=he){le=he;break}for(;++Zle&&(le=he)}return le},e.extent=function(z,U){var Z=-1,ne=z.length,le,he,De;if(arguments.length===1){for(;++Z=he){le=De=he;break}for(;++Zhe&&(le=he),De=he){le=De=he;break}for(;++Zhe&&(le=he),De1)return De/(Re-1)},e.deviation=function(){var z=e.variance.apply(this,arguments);return z&&Math.sqrt(z)};function d(z){return{left:function(U,Z,ne,le){for(arguments.length<3&&(ne=0),arguments.length<4&&(le=U.length);ne>>1;z(U[he],Z)<0?ne=he+1:le=he}return ne},right:function(U,Z,ne,le){for(arguments.length<3&&(ne=0),arguments.length<4&&(le=U.length);ne>>1;z(U[he],Z)>0?le=he:ne=he+1}return ne}}}var v=d(f);e.bisectLeft=v.left,e.bisect=e.bisectRight=v.right,e.bisector=function(z){return d(z.length===1?function(U,Z){return f(z(U),Z)}:z)},e.shuffle=function(z,U,Z){(ne=arguments.length)<3&&(Z=z.length,ne<2&&(U=0));for(var ne=Z-U,le,he;ne;)he=Math.random()*ne--|0,le=z[ne+U],z[ne+U]=z[he+U],z[he+U]=le;return z},e.permute=function(z,U){for(var Z=U.length,ne=new Array(Z);Z--;)ne[Z]=z[U[Z]];return ne},e.pairs=function(z){for(var U=0,Z=z.length-1,ne,le=z[0],he=new Array(Z<0?0:Z);U=0;)for(De=z[U],Z=De.length;--Z>=0;)he[--le]=De[Z];return he};var g=Math.abs;e.range=function(z,U,Z){if(arguments.length<3&&(Z=1,arguments.length<2&&(U=z,z=0)),(U-z)/Z===1/0)throw new Error("infinite range");var ne=[],le=w(g(Z)),he=-1,De;if(z*=le,U*=le,Z*=le,Z<0)for(;(De=z+Z*++he)>U;)ne.push(De/le);else for(;(De=z+Z*++he)=U.length)return le?le.call(z,Re):ne?Re.sort(ne):Re;for(var We=-1,ut=Re.length,ct=U[He++],Nt,Yt,vt,Ct=new b,Bt;++We=U.length)return ye;var He=[],We=Z[Re++];return ye.forEach(function(ut,ct){He.push({key:ut,values:De(ct,Re)})}),We?He.sort(function(ut,ct){return We(ut.key,ct.key)}):He}return z.map=function(ye,Re){return he(Re,ye,0)},z.entries=function(ye){return De(he(e.map,ye,0),0)},z.key=function(ye){return U.push(ye),z},z.sortKeys=function(ye){return Z[U.length-1]=ye,z},z.sortValues=function(ye){return ne=ye,z},z.rollup=function(ye){return le=ye,z},z},e.set=function(z){var U=new D;if(z)for(var Z=0,ne=z.length;Z=0&&(ne=z.slice(Z+1),z=z.slice(0,Z)),z)return arguments.length<2?this[z].on(ne):this[z].on(ne,U);if(arguments.length===2){if(U==null)for(z in this)this.hasOwnProperty(z)&&this[z].on(ne,null);return this}};function O(z){var U=[],Z=new b;function ne(){for(var le=U,he=-1,De=le.length,ye;++he=0&&(Z=z.slice(0,U))!=="xmlns"&&(z=z.slice(U+1)),ue.hasOwnProperty(Z)?{space:ue[Z],local:z}:z}},H.attr=function(z,U){if(arguments.length<2){if(typeof z=="string"){var Z=this.node();return z=e.ns.qualify(z),z.local?Z.getAttributeNS(z.space,z.local):Z.getAttribute(z)}for(U in z)this.each(ge(U,z[U]));return this}return this.each(ge(z,U))};function ge(z,U){z=e.ns.qualify(z);function Z(){this.removeAttribute(z)}function ne(){this.removeAttributeNS(z.space,z.local)}function le(){this.setAttribute(z,U)}function he(){this.setAttributeNS(z.space,z.local,U)}function De(){var Re=U.apply(this,arguments);Re==null?this.removeAttribute(z):this.setAttribute(z,Re)}function ye(){var Re=U.apply(this,arguments);Re==null?this.removeAttributeNS(z.space,z.local):this.setAttributeNS(z.space,z.local,Re)}return U==null?z.local?ne:Z:typeof U=="function"?z.local?ye:De:z.local?he:le}function Ee(z){return z.trim().replace(/\s+/g," ")}H.classed=function(z,U){if(arguments.length<2){if(typeof z=="string"){var Z=this.node(),ne=(z=ce(z)).length,le=-1;if(U=Z.classList){for(;++le=0;)(he=Z[ne])&&(le&&le!==he.nextSibling&&le.parentNode.insertBefore(he,le),le=he);return this},H.sort=function(z){z=pe.apply(this,arguments);for(var U=-1,Z=this.length;++U=U&&(U=le+1);!(Re=De[U])&&++U0&&(z=z.slice(0,le));var De=Le.get(z);De&&(z=De,he=Je);function ye(){var We=this[ne];We&&(this.removeEventListener(z,We,We.$),delete this[ne])}function Re(){var We=he(U,r(arguments));ye.call(this),this.addEventListener(z,this[ne]=We,We.$=Z),We._=U}function He(){var We=new RegExp("^__on([^.]+)"+e.requote(z)+"$"),ut;for(var ct in this)if(ut=ct.match(We)){var Nt=this[ct];this.removeEventListener(ut[1],Nt,Nt.$),delete this[ct]}}return le?U?Re:ye:U?I:He}var Le=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});i&&Le.forEach(function(z){"on"+z in i&&Le.remove(z)});function Ne(z,U){return function(Z){var ne=e.event;e.event=Z,U[0]=this.__data__;try{z.apply(this,U)}finally{e.event=ne}}}function Je(z,U){var Z=Ne(z,U);return function(ne){var le=this,he=ne.relatedTarget;(!he||he!==le&&!(he.compareDocumentPosition(le)&8))&&Z.call(le,ne)}}var rt,mt=0;function dt(z){var U=".dragsuppress-"+ ++mt,Z="click"+U,ne=e.select(a(z)).on("touchmove"+U,$).on("dragstart"+U,$).on("selectstart"+U,$);if(rt==null&&(rt="onselectstart"in z?!1:R(z.style,"userSelect")),rt){var le=n(z).style,he=le[rt];le[rt]="none"}return function(De){if(ne.on(U,null),rt&&(le[rt]=he),De){var ye=function(){ne.on(Z,null)};ne.on(Z,function(){$(),ye()},!0),setTimeout(ye,0)}}}e.mouse=function(z){return Ke(z,X())};var St=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ke(z,U){U.changedTouches&&(U=U.changedTouches[0]);var Z=z.ownerSVGElement||z;if(Z.createSVGPoint){var ne=Z.createSVGPoint();if(St<0){var le=a(z);if(le.scrollX||le.scrollY){Z=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var he=Z[0][0].getScreenCTM();St=!(he.f||he.e),Z.remove()}}return St?(ne.x=U.pageX,ne.y=U.pageY):(ne.x=U.clientX,ne.y=U.clientY),ne=ne.matrixTransform(z.getScreenCTM().inverse()),[ne.x,ne.y]}var De=z.getBoundingClientRect();return[U.clientX-De.left-z.clientLeft,U.clientY-De.top-z.clientTop]}e.touch=function(z,U,Z){if(arguments.length<3&&(Z=U,U=X().changedTouches),U){for(var ne=0,le=U.length,he;ne0?1:z<0?-1:0}function Wt(z,U,Z){return(U[0]-z[0])*(Z[1]-z[1])-(U[1]-z[1])*(Z[0]-z[0])}function Ht(z){return z>1?0:z<-1?Ue:Math.acos(z)}function fr(z){return z>1?Ie:z<-1?-Ie:Math.asin(z)}function lr(z){return((z=Math.exp(z))-1/z)/2}function Ot(z){return((z=Math.exp(z))+1/z)/2}function Jt(z){return((z=Math.exp(2*z))-1)/(z+1)}function Cr(z){return(z=Math.sin(z/2))*z}var Ge=Math.SQRT2,Qe=2,nt=4;e.interpolateZoom=function(z,U){var Z=z[0],ne=z[1],le=z[2],he=U[0],De=U[1],ye=U[2],Re=he-Z,He=De-ne,We=Re*Re+He*He,ut,ct;if(We0&&(li=li.transition().duration(De)),li.call(Kt.event)}function Ri(){Ct&&Ct.domain(vt.range().map(function(li){return(li-z.x)/z.k}).map(vt.invert)),Xt&&Xt.domain(Bt.range().map(function(li){return(li-z.y)/z.k}).map(Bt.invert))}function zi(li){ye++||li({type:"zoomstart"})}function On(li){Ri(),li({type:"zoom",scale:z.k,translate:[z.x,z.y]})}function $i(li){--ye||(li({type:"zoomend"}),Z=null)}function Fn(){var li=this,Nn=Yt.of(li,arguments),Kn=0,Va=e.select(a(li)).on(He,Fu).on(We,tc),xs=Lt(e.mouse(li)),kl=dt(li);Pn.call(li),zi(Nn);function Fu(){Kn=1,ai(e.mouse(li),xs),On(Nn)}function tc(){Va.on(He,null).on(We,null),kl(Kn),$i(Nn)}}function ja(){var li=this,Nn=Yt.of(li,arguments),Kn={},Va=0,xs,kl=".zoom-"+e.event.changedTouches[0].identifier,Fu="touchmove"+kl,tc="touchend"+kl,Qc=[],Be=e.select(li),yt=dt(li);sr(),zi(Nn),Be.on(Re,null).on(ct,sr);function At(){var pr=e.touches(li);return xs=z.k,pr.forEach(function(Or){Or.identifier in Kn&&(Kn[Or.identifier]=Lt(Or))}),pr}function sr(){var pr=e.event.target;e.select(pr).on(Fu,gr).on(tc,Tr),Qc.push(pr);for(var Or=e.event.changedTouches,Jr=0,Qr=Or.length;Jr1){var Vi=ei[0],yi=ei[1],Ir=Vi[0]-yi[0],tr=Vi[1]-yi[1];Va=Ir*Ir+tr*tr}}function gr(){var pr=e.touches(li),Or,Jr,Qr,ei;Pn.call(li);for(var vn=0,Vi=pr.length;vn1?1:U,Z=Z<0?0:Z>1?1:Z,le=Z<=.5?Z*(1+U):Z+U-Z*U,ne=2*Z-le;function he(ye){return ye>360?ye-=360:ye<0&&(ye+=360),ye<60?ne+(le-ne)*ye/60:ye<180?le:ye<240?ne+(le-ne)*(240-ye)/60:ne}function De(ye){return Math.round(he(ye)*255)}return new ba(De(z+120),De(z),De(z-120))}e.hcl=ii;function ii(z,U,Z){return this instanceof ii?(this.h=+z,this.c=+U,void(this.l=+Z)):arguments.length<2?z instanceof ii?new ii(z.h,z.c,z.l):z instanceof Xi?ns(z.l,z.a,z.b):ns((z=dl((z=e.rgb(z)).r,z.g,z.b)).l,z.a,z.b):new ii(z,U,Z)}var Fr=ii.prototype=new hr;Fr.brighter=function(z){return new ii(this.h,this.c,Math.min(100,this.l+ln*(arguments.length?z:1)))},Fr.darker=function(z){return new ii(this.h,this.c,Math.max(0,this.l-ln*(arguments.length?z:1)))},Fr.rgb=function(){return Ii(this.h,this.c,this.l).rgb()};function Ii(z,U,Z){return isNaN(z)&&(z=0),isNaN(U)&&(U=0),new Xi(Z,Math.cos(z*=Ve)*U,Math.sin(z)*U)}e.lab=Xi;function Xi(z,U,Z){return this instanceof Xi?(this.l=+z,this.a=+U,void(this.b=+Z)):arguments.length<2?z instanceof Xi?new Xi(z.l,z.a,z.b):z instanceof ii?Ii(z.h,z.c,z.l):dl((z=ba(z)).r,z.g,z.b):new Xi(z,U,Z)}var ln=18,la=.95047,mo=1,pn=1.08883,zn=Xi.prototype=new hr;zn.brighter=function(z){return new Xi(Math.min(100,this.l+ln*(arguments.length?z:1)),this.a,this.b)},zn.darker=function(z){return new Xi(Math.max(0,this.l-ln*(arguments.length?z:1)),this.a,this.b)},zn.rgb=function(){return gn(this.l,this.a,this.b)};function gn(z,U,Z){var ne=(z+16)/116,le=ne+U/500,he=ne-Z/200;return le=ua(le)*la,ne=ua(ne)*mo,he=ua(he)*pn,new ba(ro(3.2404542*le-1.5371385*ne-.4985314*he),ro(-.969266*le+1.8760108*ne+.041556*he),ro(.0556434*le-.2040259*ne+1.0572252*he))}function ns(z,U,Z){return z>0?new ii(Math.atan2(Z,U)*st,Math.sqrt(U*U+Z*Z),z):new ii(NaN,NaN,z)}function ua(z){return z>.206893034?z*z*z:(z-4/29)/7.787037}function as(z){return z>.008856?Math.pow(z,1/3):7.787037*z+4/29}function ro(z){return Math.round(255*(z<=.00304?12.92*z:1.055*Math.pow(z,1/2.4)-.055))}e.rgb=ba;function ba(z,U,Z){return this instanceof ba?(this.r=~~z,this.g=~~U,void(this.b=~~Z)):arguments.length<2?z instanceof ba?new ba(z.r,z.g,z.b):Ml(""+z,ba,jr):new ba(z,U,Z)}function co(z){return new ba(z>>16,z>>8&255,z&255)}function Us(z){return co(z)+""}var Ma=ba.prototype=new hr;Ma.brighter=function(z){z=Math.pow(.7,arguments.length?z:1);var U=this.r,Z=this.g,ne=this.b,le=30;return!U&&!Z&&!ne?new ba(le,le,le):(U&&U>4,ne=ne>>4|ne,le=Re&240,le=le>>4|le,he=Re&15,he=he<<4|he):z.length===7&&(ne=(Re&16711680)>>16,le=(Re&65280)>>8,he=Re&255)),U(ne,le,he))}function Au(z,U,Z){var ne=Math.min(z/=255,U/=255,Z/=255),le=Math.max(z,U,Z),he=le-ne,De,ye,Re=(le+ne)/2;return he?(ye=Re<.5?he/(le+ne):he/(2-le-ne),z==le?De=(U-Z)/he+(U0&&Re<1?0:De),new Ut(De,ye,Re)}function dl(z,U,Z){z=Fe(z),U=Fe(U),Z=Fe(Z);var ne=as((.4124564*z+.3575761*U+.1804375*Z)/la),le=as((.2126729*z+.7151522*U+.072175*Z)/mo),he=as((.0193339*z+.119192*U+.9503041*Z)/pn);return Xi(116*le-16,500*(ne-le),200*(le-he))}function Fe(z){return(z/=255)<=.04045?z/12.92:Math.pow((z+.055)/1.055,2.4)}function ot(z){var U=parseFloat(z);return z.charAt(z.length-1)==="%"?Math.round(U*2.55):U}var lt=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});lt.forEach(function(z,U){lt.set(z,co(U))});function kt(z){return typeof z=="function"?z:function(){return z}}e.functor=kt,e.xhr=er(F);function er(z){return function(U,Z,ne){return arguments.length===2&&typeof Z=="function"&&(ne=Z,Z=null),zt(U,Z,z,ne)}}function zt(z,U,Z,ne){var le={},he=e.dispatch("beforesend","progress","load","error"),De={},ye=new XMLHttpRequest,Re=null;self.XDomainRequest&&!("withCredentials"in ye)&&/^(http(s)?:)?\/\//.test(z)&&(ye=new XDomainRequest),"onload"in ye?ye.onload=ye.onerror=He:ye.onreadystatechange=function(){ye.readyState>3&&He()};function He(){var We=ye.status,ut;if(!We&&Zt(ye)||We>=200&&We<300||We===304){try{ut=Z.call(le,ye)}catch(ct){he.error.call(le,ct);return}he.load.call(le,ut)}else he.error.call(le,ye)}return ye.onprogress=function(We){var ut=e.event;e.event=We;try{he.progress.call(le,ye)}finally{e.event=ut}},le.header=function(We,ut){return We=(We+"").toLowerCase(),arguments.length<2?De[We]:(ut==null?delete De[We]:De[We]=ut+"",le)},le.mimeType=function(We){return arguments.length?(U=We==null?null:We+"",le):U},le.responseType=function(We){return arguments.length?(Re=We,le):Re},le.response=function(We){return Z=We,le},["get","post"].forEach(function(We){le[We]=function(){return le.send.apply(le,[We].concat(r(arguments)))}}),le.send=function(We,ut,ct){if(arguments.length===2&&typeof ut=="function"&&(ct=ut,ut=null),ye.open(We,z,!0),U!=null&&!("accept"in De)&&(De.accept=U+",*/*"),ye.setRequestHeader)for(var Nt in De)ye.setRequestHeader(Nt,De[Nt]);return U!=null&&ye.overrideMimeType&&ye.overrideMimeType(U),Re!=null&&(ye.responseType=Re),ct!=null&&le.on("error",ct).on("load",function(Yt){ct(null,Yt)}),he.beforesend.call(le,ye),ye.send(ut==null?null:ut),le},le.abort=function(){return ye.abort(),le},e.rebind(le,he,"on"),ne==null?le:le.get(Ar(ne))}function Ar(z){return z.length===1?function(U,Z){z(U==null?Z:null)}:z}function Zt(z){var U=z.responseType;return U&&U!=="text"?z.response:z.responseText}e.dsv=function(z,U){var Z=new RegExp('["'+z+` ]`),ne=z.charCodeAt(0);function le(He,We,ut){arguments.length<3&&(ut=We,We=null);var ct=zt(He,U,We==null?he:De(We),ut);return ct.row=function(Nt){return arguments.length?ct.response((We=Nt)==null?he:De(Nt)):We},ct}function he(He){return le.parse(He.responseText)}function De(He){return function(We){return le.parse(We.responseText,He)}}le.parse=function(He,We){var ut;return le.parseRows(He,function(ct,Nt){if(ut)return ut(ct,Nt-1);var Yt=function(vt){for(var Ct={},Bt=ct.length,Xt=0;Xt=Yt)return ct;if(Xt)return Xt=!1,ut;var Dr=vt;if(He.charCodeAt(Dr)===34){for(var Hr=Dr;Hr++24?(isFinite(U)&&(clearTimeout(Si),Si=setTimeout(wn,U)),ni=0):(ni=1,un(wn))}e.timer.flush=function(){ma(),Zn()};function ma(){for(var z=Date.now(),U=wr;U;)z>=U.t&&U.c(z-U.t)&&(U.c=null),U=U.n;return z}function Zn(){for(var z,U=wr,Z=1/0;U;)U.c?(U.t=0;--ye)vt.push(le[He[ut[ye]][2]]);for(ye=+Nt;ye1&&Wt(z[Z[ne-2]],z[Z[ne-1]],z[le])<=0;)--ne;Z[ne++]=le}return Z.slice(0,ne)}function Oo(z,U){return z[0]-U[0]||z[1]-U[1]}e.geom.polygon=function(z){return q(z,ms),z};var ms=e.geom.polygon.prototype=[];ms.area=function(){for(var z=-1,U=this.length,Z,ne=this[U-1],le=0;++zpt)ye=ye.L;else if(De=U-yc(ye,Z),De>pt){if(!ye.R){ne=ye;break}ye=ye.R}else{he>-pt?(ne=ye.P,le=ye):De>-pt?(ne=ye,le=ye.N):ne=le=ye;break}var Re=jl(z);if(ho.insert(ne,Re),!(!ne&&!le)){if(ne===le){du(ne),le=jl(ne.site),ho.insert(Re,le),Re.edge=le.edge=vu(ne.site,Re.site),Cs(ne),Cs(le);return}if(!le){Re.edge=vu(ne.site,Re.site);return}du(ne),du(le);var He=ne.site,We=He.x,ut=He.y,ct=z.x-We,Nt=z.y-ut,Yt=le.site,vt=Yt.x-We,Ct=Yt.y-ut,Bt=2*(ct*Ct-Nt*vt),Xt=ct*ct+Nt*Nt,Kt=vt*vt+Ct*Ct,Lt={x:(Ct*Xt-Nt*Kt)/Bt+We,y:(ct*Kt-vt*Xt)/Bt+ut};$c(le.edge,He,Yt,Lt),Re.edge=vu(He,z,null,Lt),le.edge=vu(z,Yt,null,Lt),Cs(ne),Cs(le)}}function Su(z,U){var Z=z.site,ne=Z.x,le=Z.y,he=le-U;if(!he)return ne;var De=z.P;if(!De)return-1/0;Z=De.site;var ye=Z.x,Re=Z.y,He=Re-U;if(!He)return ye;var We=ye-ne,ut=1/he-1/He,ct=We/He;return ut?(-ct+Math.sqrt(ct*ct-2*ut*(We*We/(-2*He)-Re+He/2+le-he/2)))/ut+ne:(ne+ye)/2}function yc(z,U){var Z=z.N;if(Z)return Su(Z,U);var ne=z.site;return ne.y===U?ne.x:1/0}function $l(z){this.site=z,this.edges=[]}$l.prototype.prepare=function(){for(var z=this.edges,U=z.length,Z;U--;)Z=z[U].edge,(!Z.b||!Z.a)&&z.splice(U,1);return z.sort(Eu),z.length};function Za(z){for(var U=z[0][0],Z=z[1][0],ne=z[0][1],le=z[1][1],he,De,ye,Re,He=Go,We=He.length,ut,ct,Nt,Yt,vt,Ct;We--;)if(ut=He[We],!(!ut||!ut.prepare()))for(Nt=ut.edges,Yt=Nt.length,ct=0;ctpt||g(Re-De)>pt)&&(Nt.splice(ct,0,new c0(Uv(ut.site,Ct,g(ye-U)pt?{x:U,y:g(he-U)pt?{x:g(De-le)pt?{x:Z,y:g(he-Z)pt?{x:g(De-ne)=-Oe)){var ct=Re*Re+He*He,Nt=We*We+Ct*Ct,Yt=(Ct*ct-He*Nt)/ut,vt=(Re*Nt-We*ct)/ut,Ct=vt+ye,Bt=tl.pop()||new Xu;Bt.arc=z,Bt.site=le,Bt.x=Yt+De,Bt.y=Ct+Math.sqrt(Yt*Yt+vt*vt),Bt.cy=Ct,z.circle=Bt;for(var Xt=null,Kt=ys._;Kt;)if(Bt.y0)){if(vt/=Nt,Nt<0){if(vt0){if(vt>ct)return;vt>ut&&(ut=vt)}if(vt=Z-ye,!(!Nt&&vt<0)){if(vt/=Nt,Nt<0){if(vt>ct)return;vt>ut&&(ut=vt)}else if(Nt>0){if(vt0)){if(vt/=Yt,Yt<0){if(vt0){if(vt>ct)return;vt>ut&&(ut=vt)}if(vt=ne-Re,!(!Yt&&vt<0)){if(vt/=Yt,Yt<0){if(vt>ct)return;vt>ut&&(ut=vt)}else if(Yt>0){if(vt0&&(le.a={x:ye+ut*Nt,y:Re+ut*Yt}),ct<1&&(le.b={x:ye+ct*Nt,y:Re+ct*Yt}),le}}}}}}function bo(z){for(var U=No,Z=_h(z[0][0],z[0][1],z[1][0],z[1][1]),ne=U.length,le;ne--;)le=U[ne],(!pu(le,z)||!Z(le)||g(le.a.x-le.b.x)=he)return;if(We>ct){if(!ne)ne={x:Yt,y:De};else if(ne.y>=ye)return;Z={x:Yt,y:ye}}else{if(!ne)ne={x:Yt,y:ye};else if(ne.y1)if(We>ct){if(!ne)ne={x:(De-Bt)/Ct,y:De};else if(ne.y>=ye)return;Z={x:(ye-Bt)/Ct,y:ye}}else{if(!ne)ne={x:(ye-Bt)/Ct,y:ye};else if(ne.y=he)return;Z={x:he,y:Ct*he+Bt}}else{if(!ne)ne={x:he,y:Ct*he+Bt};else if(ne.x=We&&Bt.x<=ct&&Bt.y>=ut&&Bt.y<=Nt?[[We,Nt],[ct,Nt],[ct,ut],[We,ut]]:[];Xt.point=Re[vt]}),He}function ye(Re){return Re.map(function(He,We){return{x:Math.round(ne(He,We)/pt)*pt,y:Math.round(le(He,We)/pt)*pt,i:We}})}return De.links=function(Re){return Th(ye(Re)).edges.filter(function(He){return He.l&&He.r}).map(function(He){return{source:Re[He.l.i],target:Re[He.r.i]}})},De.triangles=function(Re){var He=[];return Th(ye(Re)).cells.forEach(function(We,ut){for(var ct=We.site,Nt=We.edges.sort(Eu),Yt=-1,vt=Nt.length,Ct,Bt,Xt=Nt[vt-1].edge,Kt=Xt.l===ct?Xt.r:Xt.l;++YtKt&&(Kt=We.x),We.y>Lt&&(Lt=We.y),Nt.push(We.x),Yt.push(We.y);else for(vt=0;vtKt&&(Kt=Dr),Hr>Lt&&(Lt=Hr),Nt.push(Dr),Yt.push(Hr)}var ai=Kt-Bt,vi=Lt-Xt;ai>vi?Lt=Xt+ai:Kt=Bt+vi;function Ri($i,Fn,ja,nl,po,li,Nn,Kn){if(!(isNaN(ja)||isNaN(nl)))if($i.leaf){var Va=$i.x,xs=$i.y;if(Va!=null)if(g(Va-ja)+g(xs-nl)<.01)zi($i,Fn,ja,nl,po,li,Nn,Kn);else{var kl=$i.point;$i.x=$i.y=$i.point=null,zi($i,kl,Va,xs,po,li,Nn,Kn),zi($i,Fn,ja,nl,po,li,Nn,Kn)}else $i.x=ja,$i.y=nl,$i.point=Fn}else zi($i,Fn,ja,nl,po,li,Nn,Kn)}function zi($i,Fn,ja,nl,po,li,Nn,Kn){var Va=(po+Nn)*.5,xs=(li+Kn)*.5,kl=ja>=Va,Fu=nl>=xs,tc=Fu<<1|kl;$i.leaf=!1,$i=$i.nodes[tc]||($i.nodes[tc]=Hv()),kl?po=Va:Nn=Va,Fu?li=xs:Kn=xs,Ri($i,Fn,ja,nl,po,li,Nn,Kn)}var On=Hv();if(On.add=function($i){Ri(On,$i,+ut($i,++vt),+ct($i,vt),Bt,Xt,Kt,Lt)},On.visit=function($i){Wc($i,On,Bt,Xt,Kt,Lt)},On.find=function($i){return bp(On,$i[0],$i[1],Bt,Xt,Kt,Lt)},vt=-1,U==null){for(;++vthe||ct>De||Nt=Dr,vi=Z>=Hr,Ri=vi<<1|ai,zi=Ri+4;RiZ&&(he=U.slice(Z,he),ye[De]?ye[De]+=he:ye[++De]=he),(ne=ne[0])===(le=le[0])?ye[De]?ye[De]+=le:ye[++De]=le:(ye[++De]=null,Re.push({i:De,x:Ds(ne,le)})),Z=id.lastIndex;return Z=0&&!(ne=e.interpolators[Z](z,U)););return ne}e.interpolators=[function(z,U){var Z=typeof U;return(Z==="string"?lt.has(U.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(U)?Ah:Ho:U instanceof hr?Ah:Array.isArray(U)?d0:Z==="object"&&isNaN(U)?Zu:Ds)(z,U)}],e.interpolateArray=d0;function d0(z,U){var Z=[],ne=[],le=z.length,he=U.length,De=Math.min(z.length,U.length),ye;for(ye=0;ye=0?z.slice(0,U):z,ne=U>=0?z.slice(U+1):"in";return Z=bg.get(Z)||jv,ne=ny.get(ne)||F,Bx(ne(Z.apply(null,t.call(arguments,1))))};function Bx(z){return function(U){return U<=0?0:U>=1?1:z(U)}}function Sh(z){return function(U){return 1-z(1-U)}}function Vs(z){return function(U){return .5*(U<.5?z(2*U):2-z(2-2*U))}}function $v(z){return z*z}function Wv(z){return z*z*z}function Eh(z){if(z<=0)return 0;if(z>=1)return 1;var U=z*z,Z=U*z;return 4*(z<.5?Z:3*(z-U)+Z-.75)}function _g(z){return function(U){return Math.pow(U,z)}}function nd(z){return 1-Math.cos(z*Ie)}function _p(z){return Math.pow(2,10*(z-1))}function mf(z){return 1-Math.sqrt(1-z*z)}function Yv(z,U){var Z;return arguments.length<2&&(U=.45),arguments.length?Z=U/je*Math.asin(1/z):(z=1,Z=U/4),function(ne){return 1+z*Math.pow(2,-10*ne)*Math.sin((ne-Z)*je/U)}}function wp(z){return z||(z=1.70158),function(U){return U*U*((z+1)*U-z)}}function ad(z){return z<1/2.75?7.5625*z*z:z<2/2.75?7.5625*(z-=1.5/2.75)*z+.75:z<2.5/2.75?7.5625*(z-=2.25/2.75)*z+.9375:7.5625*(z-=2.625/2.75)*z+.984375}e.interpolateHcl=wg;function wg(z,U){z=e.hcl(z),U=e.hcl(U);var Z=z.h,ne=z.c,le=z.l,he=U.h-Z,De=U.c-ne,ye=U.l-le;return isNaN(De)&&(De=0,ne=isNaN(ne)?U.c:ne),isNaN(he)?(he=0,Z=isNaN(Z)?U.h:Z):he>180?he-=360:he<-180&&(he+=360),function(Re){return Ii(Z+he*Re,ne+De*Re,le+ye*Re)+""}}e.interpolateHsl=Tg;function Tg(z,U){z=e.hsl(z),U=e.hsl(U);var Z=z.h,ne=z.s,le=z.l,he=U.h-Z,De=U.s-ne,ye=U.l-le;return isNaN(De)&&(De=0,ne=isNaN(ne)?U.s:ne),isNaN(he)?(he=0,Z=isNaN(Z)?U.h:Z):he>180?he-=360:he<-180&&(he+=360),function(Re){return jr(Z+he*Re,ne+De*Re,le+ye*Re)+""}}e.interpolateLab=ay;function ay(z,U){z=e.lab(z),U=e.lab(U);var Z=z.l,ne=z.a,le=z.b,he=U.l-Z,De=U.a-ne,ye=U.b-le;return function(Re){return gn(Z+he*Re,ne+De*Re,le+ye*Re)+""}}e.interpolateRound=Xf;function Xf(z,U){return U-=z,function(Z){return Math.round(z+U*Z)}}e.transform=function(z){var U=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Z){if(Z!=null){U.setAttribute("transform",Z);var ne=U.transform.baseVal.consolidate()}return new Xv(ne?ne.matrix:od)})(z)};function Xv(z){var U=[z.a,z.b],Z=[z.c,z.d],ne=Tp(U),le=Zf(U,Z),he=Tp(xc(Z,U,-le))||0;U[0]*Z[1]180?U+=360:U-z>180&&(z+=360),ne.push({i:Z.push(Kf(Z)+"rotate(",null,")")-2,x:Ds(z,U)})):U&&Z.push(Kf(Z)+"rotate("+U+")")}function Mg(z,U,Z,ne){z!==U?ne.push({i:Z.push(Kf(Z)+"skewX(",null,")")-2,x:Ds(z,U)}):U&&Z.push(Kf(Z)+"skewX("+U+")")}function Kv(z,U,Z,ne){if(z[0]!==U[0]||z[1]!==U[1]){var le=Z.push(Kf(Z)+"scale(",null,",",null,")");ne.push({i:le-4,x:Ds(z[0],U[0])},{i:le-2,x:Ds(z[1],U[1])})}else(U[0]!==1||U[1]!==1)&&Z.push(Kf(Z)+"scale("+U+")")}function Ap(z,U){var Z=[],ne=[];return z=e.transform(z),U=e.transform(U),Ag(z.translate,U.translate,Z,ne),Zv(z.rotate,U.rotate,Z,ne),Mg(z.skew,U.skew,Z,ne),Kv(z.scale,U.scale,Z,ne),z=U=null,function(le){for(var he=-1,De=ne.length,ye;++he0?he=Lt:(Z.c=null,Z.t=NaN,Z=null,U.end({type:"end",alpha:he=0})):Lt>0&&(U.start({type:"start",alpha:he=Lt}),Z=$n(z.tick)),z):he},z.start=function(){var Lt,Dr=Nt.length,Hr=Yt.length,ai=ne[0],vi=ne[1],Ri,zi;for(Lt=0;Lt=0;)he.push(We=He[Re]),We.parent=ye,We.depth=ye.depth+1;Z&&(ye.value=0),ye.children=He}else Z&&(ye.value=+Z.call(ne,ye,ye.depth)||0),delete ye.children;return Ju(le,function(ut){var ct,Nt;z&&(ct=ut.children)&&ct.sort(z),Z&&(Nt=ut.parent)&&(Nt.value+=ut.value)}),De}return ne.sort=function(le){return arguments.length?(z=le,ne):z},ne.children=function(le){return arguments.length?(U=le,ne):U},ne.value=function(le){return arguments.length?(Z=le,ne):Z},ne.revalue=function(le){return Z&&(xf(le,function(he){he.children&&(he.value=0)}),Ju(le,function(he){var De;he.children||(he.value=+Z.call(ne,he,he.depth)||0),(De=he.parent)&&(De.value+=he.value)})),le},ne};function yf(z,U){return e.rebind(z,U,"sort","children","value"),z.nodes=z,z.links=bc,z}function xf(z,U){for(var Z=[z];(z=Z.pop())!=null;)if(U(z),(le=z.children)&&(ne=le.length))for(var ne,le;--ne>=0;)Z.push(le[ne])}function Ju(z,U){for(var Z=[z],ne=[];(z=Z.pop())!=null;)if(ne.push(z),(De=z.children)&&(he=De.length))for(var le=-1,he,De;++lele&&(le=ye),ne.push(ye)}for(De=0;Dene&&(Z=U,ne=le);return Z}function Dp(z){return z.reduce(v0,0)}function v0(z,U){return z+U[1]}e.layout.histogram=function(){var z=!0,U=Number,Z=ud,ne=Fp;function le(he,ct){for(var ye=[],Re=he.map(U,this),He=Z.call(this,Re,ct),We=ne.call(this,He,Re,ct),ut,ct=-1,Nt=Re.length,Yt=We.length-1,vt=z?1:1/Nt,Ct;++ct0)for(ct=-1;++ct=He[0]&&Ct<=He[1]&&(ut=ye[e.bisect(We,Ct,1,Yt)-1],ut.y+=vt,ut.push(he[ct]));return ye}return le.value=function(he){return arguments.length?(U=he,le):U},le.range=function(he){return arguments.length?(Z=kt(he),le):Z},le.bins=function(he){return arguments.length?(ne=typeof he=="number"?function(De){return g0(De,he)}:kt(he),le):ne},le.frequency=function(he){return arguments.length?(z=!!he,le):z},le};function Fp(z,U){return g0(z,Math.ceil(Math.log(U.length)/Math.LN2+1))}function g0(z,U){for(var Z=-1,ne=+z[0],le=(z[1]-ne)/U,he=[];++Z<=U;)he[Z]=le*Z+ne;return he}function ud(z){return[e.min(z),e.max(z)]}e.layout.pack=function(){var z=e.layout.hierarchy().sort(cd),U=0,Z=[1,1],ne;function le(he,De){var ye=z.call(this,he,De),Re=ye[0],He=Z[0],We=Z[1],ut=ne==null?Math.sqrt:typeof ne=="function"?ne:function(){return ne};if(Re.x=Re.y=0,Ju(Re,function(Nt){Nt.r=+ut(Nt.value)}),Ju(Re,hy),U){var ct=U*(ne?1:Math.max(2*Re.r/He,2*Re.r/We))/2;Ju(Re,function(Nt){Nt.r+=ct}),Ju(Re,hy),Ju(Re,function(Nt){Nt.r-=ct})}return r1(Re,He/2,We/2,ne?1:1/Math.max(2*Re.r/He,2*Re.r/We)),ye}return le.size=function(he){return arguments.length?(Z=he,le):Z},le.radius=function(he){return arguments.length?(ne=he==null||typeof he=="function"?he:+he,le):ne},le.padding=function(he){return arguments.length?(U=+he,le):U},yf(le,z)};function cd(z,U){return z.value-U.value}function Lp(z,U){var Z=z._pack_next;z._pack_next=U,U._pack_prev=z,U._pack_next=Z,Z._pack_prev=U}function kg(z,U){z._pack_next=U,U._pack_prev=z}function t1(z,U){var Z=U.x-z.x,ne=U.y-z.y,le=z.r+U.r;return .999*le*le>Z*Z+ne*ne}function hy(z){if(!(U=z.children)||!(ct=U.length))return;var U,Z=1/0,ne=-1/0,le=1/0,he=-1/0,De,ye,Re,He,We,ut,ct;function Nt(Lt){Z=Math.min(Lt.x-Lt.r,Z),ne=Math.max(Lt.x+Lt.r,ne),le=Math.min(Lt.y-Lt.r,le),he=Math.max(Lt.y+Lt.r,he)}if(U.forEach(dy),De=U[0],De.x=-De.r,De.y=0,Nt(De),ct>1&&(ye=U[1],ye.x=ye.r,ye.y=0,Nt(ye),ct>2))for(Re=U[2],pl(De,ye,Re),Nt(Re),Lp(De,Re),De._pack_prev=Re,Lp(Re,ye),ye=De._pack_next,He=3;HeCt.x&&(Ct=Dr),Dr.depth>Bt.depth&&(Bt=Dr)});var Xt=U(vt,Ct)/2-vt.x,Kt=Z[0]/(Ct.x+U(Ct,vt)/2+Xt),Lt=Z[1]/(Bt.depth||1);xf(Nt,function(Dr){Dr.x=(Dr.x+Xt)*Kt,Dr.y=Dr.depth*Lt})}return ct}function he(We){for(var ut={A:null,children:[We]},ct=[ut],Nt;(Nt=ct.pop())!=null;)for(var Yt=Nt.children,vt,Ct=0,Bt=Yt.length;Ct0&&(Ip(Ae(vt,We,ct),We,Dr),Bt+=Dr,Xt+=Dr),Kt+=vt.m,Bt+=Nt.m,Lt+=Ct.m,Xt+=Yt.m;vt&&!Dg(Yt)&&(Yt.t=vt,Yt.m+=Kt-Xt),Nt&&!Pp(Ct)&&(Ct.t=Nt,Ct.m+=Bt-Lt,ct=We)}return ct}function He(We){We.x*=Z[0],We.y=We.depth*Z[1]}return le.separation=function(We){return arguments.length?(U=We,le):U},le.size=function(We){return arguments.length?(ne=(Z=We)==null?He:null,le):ne?null:Z},le.nodeSize=function(We){return arguments.length?(ne=(Z=We)==null?null:He,le):ne?Z:null},yf(le,z)};function Xc(z,U){return z.parent==U.parent?1:2}function Pp(z){var U=z.children;return U.length?U[0]:z.t}function Dg(z){var U=z.children,Z;return(Z=U.length)?U[Z-1]:z.t}function Ip(z,U,Z){var ne=Z/(U.i-z.i);U.c-=ne,U.s+=Z,z.c+=ne,U.z+=Z,U.m+=Z}function Rp(z){for(var U=0,Z=0,ne=z.children,le=ne.length,he;--le>=0;)he=ne[le],he.z+=U,he.m+=U,U+=he.s+(Z+=he.c)}function Ae(z,U,Z){return z.a.parent===U.parent?z.a:Z}e.layout.cluster=function(){var z=e.layout.hierarchy().sort(null).value(null),U=Xc,Z=[1,1],ne=!1;function le(he,De){var ye=z.call(this,he,De),Re=ye[0],He,We=0;Ju(Re,function(vt){var Ct=vt.children;Ct&&Ct.length?(vt.x=et(Ct),vt.y=qe(Ct)):(vt.x=He?We+=U(vt,He):0,vt.y=0,He=vt)});var ut=Ye(Re),ct=Tt(Re),Nt=ut.x-U(ut,ct)/2,Yt=ct.x+U(ct,ut)/2;return Ju(Re,ne?function(vt){vt.x=(vt.x-Re.x)*Z[0],vt.y=(Re.y-vt.y)*Z[1]}:function(vt){vt.x=(vt.x-Nt)/(Yt-Nt)*Z[0],vt.y=(1-(Re.y?vt.y/Re.y:1))*Z[1]}),ye}return le.separation=function(he){return arguments.length?(U=he,le):U},le.size=function(he){return arguments.length?(ne=(Z=he)==null,le):ne?null:Z},le.nodeSize=function(he){return arguments.length?(ne=(Z=he)!=null,le):ne?Z:null},yf(le,z)};function qe(z){return 1+e.max(z,function(U){return U.y})}function et(z){return z.reduce(function(U,Z){return U+Z.x},0)/z.length}function Ye(z){var U=z.children;return U&&U.length?Ye(U[0]):z}function Tt(z){var U=z.children,Z;return U&&(Z=U.length)?Tt(U[Z-1]):z}e.layout.treemap=function(){var z=e.layout.hierarchy(),U=Math.round,Z=[1,1],ne=null,le=jt,he=!1,De,ye="squarify",Re=.5*(1+Math.sqrt(5));function He(vt,Ct){for(var Bt=-1,Xt=vt.length,Kt,Lt;++Bt0;)Xt.push(Lt=Kt[vi-1]),Xt.area+=Lt.area,ye!=="squarify"||(Hr=ct(Xt,ai))<=Dr?(Kt.pop(),Dr=Hr):(Xt.area-=Xt.pop().area,Nt(Xt,ai,Bt,!1),ai=Math.min(Bt.dx,Bt.dy),Xt.length=Xt.area=0,Dr=1/0);Xt.length&&(Nt(Xt,ai,Bt,!0),Xt.length=Xt.area=0),Ct.forEach(We)}}function ut(vt){var Ct=vt.children;if(Ct&&Ct.length){var Bt=le(vt),Xt=Ct.slice(),Kt,Lt=[];for(He(Xt,Bt.dx*Bt.dy/vt.value),Lt.area=0;Kt=Xt.pop();)Lt.push(Kt),Lt.area+=Kt.area,Kt.z!=null&&(Nt(Lt,Kt.z?Bt.dx:Bt.dy,Bt,!Xt.length),Lt.length=Lt.area=0);Ct.forEach(ut)}}function ct(vt,Ct){for(var Bt=vt.area,Xt,Kt=0,Lt=1/0,Dr=-1,Hr=vt.length;++DrKt&&(Kt=Xt));return Bt*=Bt,Ct*=Ct,Bt?Math.max(Ct*Kt*Re/Bt,Bt/(Ct*Lt*Re)):1/0}function Nt(vt,Ct,Bt,Xt){var Kt=-1,Lt=vt.length,Dr=Bt.x,Hr=Bt.y,ai=Ct?U(vt.area/Ct):0,vi;if(Ct==Bt.dx){for((Xt||ai>Bt.dy)&&(ai=Bt.dy);++KtBt.dx)&&(ai=Bt.dx);++Kt1);return z+U*ne*Math.sqrt(-2*Math.log(he)/he)}},logNormal:function(){var z=e.random.normal.apply(e,arguments);return function(){return Math.exp(z())}},bates:function(z){var U=e.random.irwinHall(z);return function(){return U()/z}},irwinHall:function(z){return function(){for(var U=0,Z=0;Z2?Pr:Rr,He=ne?Qv:Jv;return le=Re(z,U,He,Z),he=Re(U,z,He,Mh),ye}function ye(Re){return le(Re)}return ye.invert=function(Re){return he(Re)},ye.domain=function(Re){return arguments.length?(z=Re.map(Number),De()):z},ye.range=function(Re){return arguments.length?(U=Re,De()):U},ye.rangeRound=function(Re){return ye.range(Re).interpolate(Xf)},ye.clamp=function(Re){return arguments.length?(ne=Re,De()):ne},ye.interpolate=function(Re){return arguments.length?(Z=Re,De()):Z},ye.ticks=function(Re){return en(z,Re)},ye.tickFormat=function(Re,He){return d3_scale_linearTickFormat(z,Re,He)},ye.nice=function(Re){return Di(z,Re),De()},ye.copy=function(){return $r(z,U,Z,ne)},De()}function Oi(z,U){return e.rebind(z,U,"range","rangeRound","interpolate","clamp")}function Di(z,U){return nr(z,dr(ji(z,U)[2])),nr(z,dr(ji(z,U)[2])),z}function ji(z,U){U==null&&(U=10);var Z=cr(z),ne=Z[1]-Z[0],le=Math.pow(10,Math.floor(Math.log(ne/U)/Math.LN10)),he=U/ne*le;return he<=.15?le*=10:he<=.35?le*=5:he<=.75&&(le*=2),Z[0]=Math.ceil(Z[0]/le)*le,Z[1]=Math.floor(Z[1]/le)*le+le*.5,Z[2]=le,Z}function en(z,U){return e.range.apply(e,ji(z,U))}var Zr={s:1,g:1,p:1,r:1,e:1};function si(z){return-Math.floor(Math.log(z)/Math.LN10+.01)}function cn(z,U){var Z=si(U[2]);return z in Zr?Math.abs(Z-si(Math.max(g(U[0]),g(U[1]))))+ +(z!=="e"):Z-(z==="%")*2}e.scale.log=function(){return Dn(e.scale.linear().domain([0,1]),10,!0,[1,10])};function Dn(z,U,Z,ne){function le(ye){return(Z?Math.log(ye<0?0:ye):-Math.log(ye>0?0:-ye))/Math.log(U)}function he(ye){return Z?Math.pow(U,ye):-Math.pow(U,-ye)}function De(ye){return z(le(ye))}return De.invert=function(ye){return he(z.invert(ye))},De.domain=function(ye){return arguments.length?(Z=ye[0]>=0,z.domain((ne=ye.map(Number)).map(le)),De):ne},De.base=function(ye){return arguments.length?(U=+ye,z.domain(ne.map(le)),De):U},De.nice=function(){var ye=nr(ne.map(le),Z?Math:wa);return z.domain(ye),ne=ye.map(he),De},De.ticks=function(){var ye=cr(ne),Re=[],He=ye[0],We=ye[1],ut=Math.floor(le(He)),ct=Math.ceil(le(We)),Nt=U%1?2:U;if(isFinite(ct-ut)){if(Z){for(;ut0;Yt--)Re.push(he(ut)*Yt);for(ut=0;Re[ut]We;ct--);Re=Re.slice(ut,ct)}return Re},De.copy=function(){return Dn(z.copy(),U,Z,ne)},Oi(De,z)}var wa={floor:function(z){return-Math.ceil(-z)},ceil:function(z){return-Math.floor(-z)}};e.scale.pow=function(){return Ka(e.scale.linear(),1,[0,1])};function Ka(z,U,Z){var ne=Ia(U),le=Ia(1/U);function he(De){return z(ne(De))}return he.invert=function(De){return le(z.invert(De))},he.domain=function(De){return arguments.length?(z.domain((Z=De.map(Number)).map(ne)),he):Z},he.ticks=function(De){return en(Z,De)},he.tickFormat=function(De,ye){return d3_scale_linearTickFormat(Z,De,ye)},he.nice=function(De){return he.domain(Di(Z,De))},he.exponent=function(De){return arguments.length?(ne=Ia(U=De),le=Ia(1/U),z.domain(Z.map(ne)),he):U},he.copy=function(){return Ka(z.copy(),U,Z)},Oi(he,z)}function Ia(z){return function(U){return U<0?-Math.pow(-U,z):Math.pow(U,z)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return _o([],{t:"range",a:[[]]})};function _o(z,U){var Z,ne,le;function he(ye){return ne[((Z.get(ye)||(U.t==="range"?Z.set(ye,z.push(ye)):NaN))-1)%ne.length]}function De(ye,Re){return e.range(z.length).map(function(He){return ye+Re*He})}return he.domain=function(ye){if(!arguments.length)return z;z=[],Z=new b;for(var Re=-1,He=ye.length,We;++Re0?Z[he-1]:z[0],hect?0:1;if(We=$e)return Re(We,Yt)+(He?Re(He,1-Yt):"")+"Z";var vt,Ct,Bt,Xt,Kt=0,Lt=0,Dr,Hr,ai,vi,Ri,zi,On,$i,Fn=[];if((Xt=(+De.apply(this,arguments)||0)/2)&&(Bt=ne===bf?Math.sqrt(He*He+We*We):+ne.apply(this,arguments),Yt||(Lt*=-1),We&&(Lt=fr(Bt/We*Math.sin(Xt))),He&&(Kt=fr(Bt/He*Math.sin(Xt)))),We){Dr=We*Math.cos(ut+Lt),Hr=We*Math.sin(ut+Lt),ai=We*Math.cos(ct-Lt),vi=We*Math.sin(ct-Lt);var ja=Math.abs(ct-ut-2*Lt)<=Ue?0:1;if(Lt&&zp(Dr,Hr,ai,vi)===Yt^ja){var nl=(ut+ct)/2;Dr=We*Math.cos(nl),Hr=We*Math.sin(nl),ai=vi=null}}else Dr=Hr=0;if(He){Ri=He*Math.cos(ct-Kt),zi=He*Math.sin(ct-Kt),On=He*Math.cos(ut+Kt),$i=He*Math.sin(ut+Kt);var po=Math.abs(ut-ct+2*Kt)<=Ue?0:1;if(Kt&&zp(Ri,zi,On,$i)===1-Yt^po){var li=(ut+ct)/2;Ri=He*Math.cos(li),zi=He*Math.sin(li),On=$i=null}}else Ri=zi=0;if(Nt>pt&&(vt=Math.min(Math.abs(We-He)/2,+Z.apply(this,arguments)))>.001){Ct=He0?0:1}function Fg(z,U,Z,ne,le){var he=z[0]-U[0],De=z[1]-U[1],ye=(le?ne:-ne)/Math.sqrt(he*he+De*De),Re=ye*De,He=-ye*he,We=z[0]+Re,ut=z[1]+He,ct=U[0]+Re,Nt=U[1]+He,Yt=(We+ct)/2,vt=(ut+Nt)/2,Ct=ct-We,Bt=Nt-ut,Xt=Ct*Ct+Bt*Bt,Kt=Z-ne,Lt=We*Nt-ct*ut,Dr=(Bt<0?-1:1)*Math.sqrt(Math.max(0,Kt*Kt*Xt-Lt*Lt)),Hr=(Lt*Bt-Ct*Dr)/Xt,ai=(-Lt*Ct-Bt*Dr)/Xt,vi=(Lt*Bt+Ct*Dr)/Xt,Ri=(-Lt*Ct+Bt*Dr)/Xt,zi=Hr-Yt,On=ai-vt,$i=vi-Yt,Fn=Ri-vt;return zi*zi+On*On>$i*$i+Fn*Fn&&(Hr=vi,ai=Ri),[[Hr-Re,ai-He],[Hr*Z/Kt,ai*Z/Kt]]}function i1(){return!0}function Ox(z){var U=io,Z=fo,ne=i1,le=Kc,he=le.key,De=.7;function ye(Re){var He=[],We=[],ut=-1,ct=Re.length,Nt,Yt=kt(U),vt=kt(Z);function Ct(){He.push("M",le(z(We),De))}for(;++ut1?z.join("L"):z+"Z"}function py(z){return z.join("L")+"Z"}function a1(z){for(var U=0,Z=z.length,ne=z[0],le=[ne[0],",",ne[1]];++U1&&le.push("H",ne[0]),le.join("")}function Lg(z){for(var U=0,Z=z.length,ne=z[0],le=[ne[0],",",ne[1]];++U1){ye=U[1],he=z[Re],Re++,ne+="C"+(le[0]+De[0])+","+(le[1]+De[1])+","+(he[0]-ye[0])+","+(he[1]-ye[1])+","+he[0]+","+he[1];for(var He=2;He9&&(he=Z*3/Math.sqrt(he),De[ye]=he*ne,De[ye+1]=he*le));for(ye=-1;++ye<=Re;)he=(z[Math.min(Re,ye+1)][0]-z[Math.max(0,ye-1)][0])/(6*(1+De[ye]*De[ye])),U.push([he||0,De[ye]*he||0]);return U}function Ze(z){return z.length<3?Kc(z):z[0]+qp(z,Pe(z))}e.svg.line.radial=function(){var z=Ox(it);return z.radius=z.x,delete z.x,z.angle=z.y,delete z.y,z};function it(z){for(var U,Z=-1,ne=z.length,le,he;++ZUe)+",1 "+ut}function He(We,ut,ct,Nt){return"Q 0,0 "+Nt}return he.radius=function(We){return arguments.length?(Z=kt(We),he):Z},he.source=function(We){return arguments.length?(z=kt(We),he):z},he.target=function(We){return arguments.length?(U=kt(We),he):U},he.startAngle=function(We){return arguments.length?(ne=kt(We),he):ne},he.endAngle=function(We){return arguments.length?(le=kt(We),he):le},he};function It(z){return z.radius}e.svg.diagonal=function(){var z=at,U=xt,Z=Gt;function ne(le,he){var De=z.call(this,le,he),ye=U.call(this,le,he),Re=(De.y+ye.y)/2,He=[De,{x:De.x,y:Re},{x:ye.x,y:Re},ye];return He=He.map(Z),"M"+He[0]+"C"+He[1]+" "+He[2]+" "+He[3]}return ne.source=function(le){return arguments.length?(z=kt(le),ne):z},ne.target=function(le){return arguments.length?(U=kt(le),ne):U},ne.projection=function(le){return arguments.length?(Z=le,ne):Z},ne};function Gt(z){return[z.x,z.y]}e.svg.diagonal.radial=function(){var z=e.svg.diagonal(),U=Gt,Z=z.projection;return z.projection=function(ne){return arguments.length?Z(or(U=ne)):U},z};function or(z){return function(){var U=z.apply(this,arguments),Z=U[0],ne=U[1]-Ie;return[Z*Math.cos(ne),Z*Math.sin(ne)]}}e.svg.symbol=function(){var z=Gr,U=Mr;function Z(ne,le){return(on.get(z.call(this,ne,le))||_i)(U.call(this,ne,le))}return Z.type=function(ne){return arguments.length?(z=kt(ne),Z):z},Z.size=function(ne){return arguments.length?(U=kt(ne),Z):U},Z};function Mr(){return 64}function Gr(){return"circle"}function _i(z){var U=Math.sqrt(z/Ue);return"M0,"+U+"A"+U+","+U+" 0 1,1 0,"+-U+"A"+U+","+U+" 0 1,1 0,"+U+"Z"}var on=e.map({circle:_i,cross:function(z){var U=Math.sqrt(z/5)/2;return"M"+-3*U+","+-U+"H"+-U+"V"+-3*U+"H"+U+"V"+-U+"H"+3*U+"V"+U+"H"+U+"V"+3*U+"H"+-U+"V"+U+"H"+-3*U+"Z"},diamond:function(z){var U=Math.sqrt(z/(2*Tn)),Z=U*Tn;return"M0,"+-U+"L"+Z+",0 0,"+U+" "+-Z+",0Z"},square:function(z){var U=Math.sqrt(z)/2;return"M"+-U+","+-U+"L"+U+","+-U+" "+U+","+U+" "+-U+","+U+"Z"},"triangle-down":function(z){var U=Math.sqrt(z/mn),Z=U*mn/2;return"M0,"+Z+"L"+U+","+-Z+" "+-U+","+-Z+"Z"},"triangle-up":function(z){var U=Math.sqrt(z/mn),Z=U*mn/2;return"M0,"+-Z+"L"+U+","+Z+" "+-U+","+Z+"Z"}});e.svg.symbolTypes=on.keys();var mn=Math.sqrt(3),Tn=Math.tan(30*Ve);H.transition=function(z){for(var U=El||++us,Z=gu(z),ne=[],le,he,De=ec||{time:Date.now(),ease:Eh,delay:0,duration:250},ye=-1,Re=this.length;++ye0;)ut[--Xt].call(z,Bt);if(Ct>=1)return De.event&&De.event.end.call(z,z.__data__,U),--he.count?delete he[ne]:delete z[Z],1}De||(ye=le.time,Re=$n(ct,0,ye),De=he[ne]={tween:new b,time:ye,timer:Re,delay:le.delay,duration:le.duration,ease:le.ease,index:U},le=null,++he.count)}e.svg.axis=function(){var z=e.scale.linear(),U=Jc,Z=6,ne=6,le=3,he=[10],De=null,ye;function Re(He){He.each(function(){var We=e.select(this),ut=this.__chart__||z,ct=this.__chart__=z.copy(),Nt=De==null?ct.ticks?ct.ticks.apply(ct,he):ct.domain():De,Yt=ye==null?ct.tickFormat?ct.tickFormat.apply(ct,he):F:ye,vt=We.selectAll(".tick").data(Nt,ct),Ct=vt.enter().insert("g",".domain").attr("class","tick").style("opacity",pt),Bt=e.transition(vt.exit()).style("opacity",pt).remove(),Xt=e.transition(vt.order()).style("opacity",1),Kt=Math.max(Z,0)+le,Lt,Dr=yr(ct),Hr=We.selectAll(".domain").data([0]),ai=(Hr.enter().append("path").attr("class","domain"),e.transition(Hr));Ct.append("line"),Ct.append("text");var vi=Ct.select("line"),Ri=Xt.select("line"),zi=vt.select("text").text(Yt),On=Ct.select("text"),$i=Xt.select("text"),Fn=U==="top"||U==="left"?-1:1,ja,nl,po,li;if(U==="bottom"||U==="top"?(Lt=th,ja="x",po="y",nl="x2",li="y2",zi.attr("dy",Fn<0?"0em":".71em").style("text-anchor","middle"),ai.attr("d","M"+Dr[0]+","+Fn*ne+"V0H"+Dr[1]+"V"+Fn*ne)):(Lt=rh,ja="y",po="x",nl="y2",li="x2",zi.attr("dy",".32em").style("text-anchor",Fn<0?"end":"start"),ai.attr("d","M"+Fn*ne+","+Dr[0]+"H0V"+Dr[1]+"H"+Fn*ne)),vi.attr(li,Fn*Z),On.attr(po,Fn*Kt),Ri.attr(nl,0).attr(li,Fn*Z),$i.attr(ja,0).attr(po,Fn*Kt),ct.rangeBand){var Nn=ct,Kn=Nn.rangeBand()/2;ut=ct=function(Va){return Nn(Va)+Kn}}else ut.rangeBand?ut=ct:Bt.call(Lt,ct,ut);Ct.call(Lt,ut,ct),Xt.call(Lt,ct,ct)})}return Re.scale=function(He){return arguments.length?(z=He,Re):z},Re.orient=function(He){return arguments.length?(U=He in eh?He+"":Jc,Re):U},Re.ticks=function(){return arguments.length?(he=r(arguments),Re):he},Re.tickValues=function(He){return arguments.length?(De=He,Re):De},Re.tickFormat=function(He){return arguments.length?(ye=He,Re):ye},Re.tickSize=function(He){var We=arguments.length;return We?(Z=+He,ne=+arguments[We-1],Re):Z},Re.innerTickSize=function(He){return arguments.length?(Z=+He,Re):Z},Re.outerTickSize=function(He){return arguments.length?(ne=+He,Re):ne},Re.tickPadding=function(He){return arguments.length?(le=+He,Re):le},Re.tickSubdivide=function(){return arguments.length&&Re},Re};var Jc="bottom",eh={top:1,right:1,bottom:1,left:1};function th(z,U,Z){z.attr("transform",function(ne){var le=U(ne);return"translate("+(isFinite(le)?le:Z(ne))+",0)"})}function rh(z,U,Z){z.attr("transform",function(ne){var le=U(ne);return"translate(0,"+(isFinite(le)?le:Z(ne))+")"})}e.svg.brush=function(){var z=K(We,"brushstart","brush","brushend"),U=null,Z=null,ne=[0,0],le=[0,0],he,De,ye=!0,Re=!0,He=_f[0];function We(vt){vt.each(function(){var Ct=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Yt).on("touchstart.brush",Yt),Bt=Ct.selectAll(".background").data([0]);Bt.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ct.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Xt=Ct.selectAll(".resize").data(He,F);Xt.exit().remove(),Xt.enter().append("g").attr("class",function(Hr){return"resize "+Hr}).style("cursor",function(Hr){return Ph[Hr]}).append("rect").attr("x",function(Hr){return/[ew]$/.test(Hr)?-3:null}).attr("y",function(Hr){return/^[ns]/.test(Hr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Xt.style("display",We.empty()?"none":null);var Kt=e.transition(Ct),Lt=e.transition(Bt),Dr;U&&(Dr=yr(U),Lt.attr("x",Dr[0]).attr("width",Dr[1]-Dr[0]),ct(Kt)),Z&&(Dr=yr(Z),Lt.attr("y",Dr[0]).attr("height",Dr[1]-Dr[0]),Nt(Kt)),ut(Kt)})}We.event=function(vt){vt.each(function(){var Ct=z.of(this,arguments),Bt={x:ne,y:le,i:he,j:De},Xt=this.__chart__||Bt;this.__chart__=Bt,El?e.select(this).transition().each("start.brush",function(){he=Xt.i,De=Xt.j,ne=Xt.x,le=Xt.y,Ct({type:"brushstart"})}).tween("brush:brush",function(){var Kt=d0(ne,Bt.x),Lt=d0(le,Bt.y);return he=De=null,function(Dr){ne=Bt.x=Kt(Dr),le=Bt.y=Lt(Dr),Ct({type:"brush",mode:"resize"})}}).each("end.brush",function(){he=Bt.i,De=Bt.j,Ct({type:"brush",mode:"resize"}),Ct({type:"brushend"})}):(Ct({type:"brushstart"}),Ct({type:"brush",mode:"resize"}),Ct({type:"brushend"}))})};function ut(vt){vt.selectAll(".resize").attr("transform",function(Ct){return"translate("+ne[+/e$/.test(Ct)]+","+le[+/^s/.test(Ct)]+")"})}function ct(vt){vt.select(".extent").attr("x",ne[0]),vt.selectAll(".extent,.n>rect,.s>rect").attr("width",ne[1]-ne[0])}function Nt(vt){vt.select(".extent").attr("y",le[0]),vt.selectAll(".extent,.e>rect,.w>rect").attr("height",le[1]-le[0])}function Yt(){var vt=this,Ct=e.select(e.event.target),Bt=z.of(vt,arguments),Xt=e.select(vt),Kt=Ct.datum(),Lt=!/^(n|s)$/.test(Kt)&&U,Dr=!/^(e|w)$/.test(Kt)&&Z,Hr=Ct.classed("extent"),ai=dt(vt),vi,Ri=e.mouse(vt),zi,On=e.select(a(vt)).on("keydown.brush",ja).on("keyup.brush",nl);if(e.event.changedTouches?On.on("touchmove.brush",po).on("touchend.brush",Nn):On.on("mousemove.brush",po).on("mouseup.brush",Nn),Xt.interrupt().selectAll("*").interrupt(),Hr)Ri[0]=ne[0]-Ri[0],Ri[1]=le[0]-Ri[1];else if(Kt){var $i=+/w$/.test(Kt),Fn=+/^n/.test(Kt);zi=[ne[1-$i]-Ri[0],le[1-Fn]-Ri[1]],Ri[0]=ne[$i],Ri[1]=le[Fn]}else e.event.altKey&&(vi=Ri.slice());Xt.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ct.style("cursor")),Bt({type:"brushstart"}),po();function ja(){e.event.keyCode==32&&(Hr||(vi=null,Ri[0]-=ne[1],Ri[1]-=le[1],Hr=2),$())}function nl(){e.event.keyCode==32&&Hr==2&&(Ri[0]+=ne[1],Ri[1]+=le[1],Hr=0,$())}function po(){var Kn=e.mouse(vt),Va=!1;zi&&(Kn[0]+=zi[0],Kn[1]+=zi[1]),Hr||(e.event.altKey?(vi||(vi=[(ne[0]+ne[1])/2,(le[0]+le[1])/2]),Ri[0]=ne[+(Kn[0]{(function(e,t){typeof I8=="object"&&typeof tue!="undefined"?t(I8):(e=e||self,t(e.d3=e.d3||{}))})(I8,function(e){"use strict";var t=new Date,r=new Date;function i(re,pe,Te,Ce){function ze(we){return re(we=arguments.length===0?new Date:new Date(+we)),we}return ze.floor=function(we){return re(we=new Date(+we)),we},ze.ceil=function(we){return re(we=new Date(we-1)),pe(we,1),re(we),we},ze.round=function(we){var me=ze(we),Le=ze.ceil(we);return we-me0))return Ne;do Ne.push(Je=new Date(+we)),pe(we,Le),re(we);while(Je=me)for(;re(me),!we(me);)me.setTime(me-1)},function(me,Le){if(me>=me)if(Le<0)for(;++Le<=0;)for(;pe(me,-1),!we(me););else for(;--Le>=0;)for(;pe(me,1),!we(me););})},Te&&(ze.count=function(we,me){return t.setTime(+we),r.setTime(+me),re(t),re(r),Math.floor(Te(t,r))},ze.every=function(we){return we=Math.floor(we),!isFinite(we)||!(we>0)?null:we>1?ze.filter(Ce?function(me){return Ce(me)%we===0}:function(me){return ze.count(0,me)%we===0}):ze}),ze}var n=i(function(){},function(re,pe){re.setTime(+re+pe)},function(re,pe){return pe-re});n.every=function(re){return re=Math.floor(re),!isFinite(re)||!(re>0)?null:re>1?i(function(pe){pe.setTime(Math.floor(pe/re)*re)},function(pe,Te){pe.setTime(+pe+Te*re)},function(pe,Te){return(Te-pe)/re}):n};var a=n.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=i(function(re){re.setTime(re-re.getMilliseconds())},function(re,pe){re.setTime(+re+pe*o)},function(re,pe){return(pe-re)/o},function(re){return re.getUTCSeconds()}),h=f.range,p=i(function(re){re.setTime(re-re.getMilliseconds()-re.getSeconds()*o)},function(re,pe){re.setTime(+re+pe*s)},function(re,pe){return(pe-re)/s},function(re){return re.getMinutes()}),d=p.range,v=i(function(re){re.setTime(re-re.getMilliseconds()-re.getSeconds()*o-re.getMinutes()*s)},function(re,pe){re.setTime(+re+pe*l)},function(re,pe){return(pe-re)/l},function(re){return re.getHours()}),m=v.range,g=i(function(re){re.setHours(0,0,0,0)},function(re,pe){re.setDate(re.getDate()+pe)},function(re,pe){return(pe-re-(pe.getTimezoneOffset()-re.getTimezoneOffset())*s)/u},function(re){return re.getDate()-1}),w=g.range;function _(re){return i(function(pe){pe.setDate(pe.getDate()-(pe.getDay()+7-re)%7),pe.setHours(0,0,0,0)},function(pe,Te){pe.setDate(pe.getDate()+Te*7)},function(pe,Te){return(Te-pe-(Te.getTimezoneOffset()-pe.getTimezoneOffset())*s)/c})}var b=_(0),M=_(1),x=_(2),A=_(3),T=_(4),y=_(5),E=_(6),S=b.range,C=M.range,k=x.range,D=A.range,F=T.range,P=y.range,R=E.range,L=i(function(re){re.setDate(1),re.setHours(0,0,0,0)},function(re,pe){re.setMonth(re.getMonth()+pe)},function(re,pe){return pe.getMonth()-re.getMonth()+(pe.getFullYear()-re.getFullYear())*12},function(re){return re.getMonth()}),I=L.range,B=i(function(re){re.setMonth(0,1),re.setHours(0,0,0,0)},function(re,pe){re.setFullYear(re.getFullYear()+pe)},function(re,pe){return pe.getFullYear()-re.getFullYear()},function(re){return re.getFullYear()});B.every=function(re){return!isFinite(re=Math.floor(re))||!(re>0)?null:i(function(pe){pe.setFullYear(Math.floor(pe.getFullYear()/re)*re),pe.setMonth(0,1),pe.setHours(0,0,0,0)},function(pe,Te){pe.setFullYear(pe.getFullYear()+Te*re)})};var O=B.range,$=i(function(re){re.setUTCSeconds(0,0)},function(re,pe){re.setTime(+re+pe*s)},function(re,pe){return(pe-re)/s},function(re){return re.getUTCMinutes()}),X=$.range,K=i(function(re){re.setUTCMinutes(0,0,0)},function(re,pe){re.setTime(+re+pe*l)},function(re,pe){return(pe-re)/l},function(re){return re.getUTCHours()}),G=K.range,q=i(function(re){re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCDate(re.getUTCDate()+pe)},function(re,pe){return(pe-re)/u},function(re){return re.getUTCDate()-1}),J=q.range;function N(re){return i(function(pe){pe.setUTCDate(pe.getUTCDate()-(pe.getUTCDay()+7-re)%7),pe.setUTCHours(0,0,0,0)},function(pe,Te){pe.setUTCDate(pe.getUTCDate()+Te*7)},function(pe,Te){return(Te-pe)/c})}var V=N(0),Y=N(1),H=N(2),j=N(3),Q=N(4),te=N(5),ue=N(6),ge=V.range,Ee=Y.range,xe=H.range,ce=j.range,oe=Q.range,Se=te.range,be=ue.range,fe=i(function(re){re.setUTCDate(1),re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCMonth(re.getUTCMonth()+pe)},function(re,pe){return pe.getUTCMonth()-re.getUTCMonth()+(pe.getUTCFullYear()-re.getUTCFullYear())*12},function(re){return re.getUTCMonth()}),ee=fe.range,ae=i(function(re){re.setUTCMonth(0,1),re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCFullYear(re.getUTCFullYear()+pe)},function(re,pe){return pe.getUTCFullYear()-re.getUTCFullYear()},function(re){return re.getUTCFullYear()});ae.every=function(re){return!isFinite(re=Math.floor(re))||!(re>0)?null:i(function(pe){pe.setUTCFullYear(Math.floor(pe.getUTCFullYear()/re)*re),pe.setUTCMonth(0,1),pe.setUTCHours(0,0,0,0)},function(pe,Te){pe.setUTCFullYear(pe.getUTCFullYear()+Te*re)})};var _e=ae.range;e.timeDay=g,e.timeDays=w,e.timeFriday=y,e.timeFridays=P,e.timeHour=v,e.timeHours=m,e.timeInterval=i,e.timeMillisecond=n,e.timeMilliseconds=a,e.timeMinute=p,e.timeMinutes=d,e.timeMonday=M,e.timeMondays=C,e.timeMonth=L,e.timeMonths=I,e.timeSaturday=E,e.timeSaturdays=R,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=b,e.timeSundays=S,e.timeThursday=T,e.timeThursdays=F,e.timeTuesday=x,e.timeTuesdays=k,e.timeWednesday=A,e.timeWednesdays=D,e.timeWeek=b,e.timeWeeks=S,e.timeYear=B,e.timeYears=O,e.utcDay=q,e.utcDays=J,e.utcFriday=te,e.utcFridays=Se,e.utcHour=K,e.utcHours=G,e.utcMillisecond=n,e.utcMilliseconds=a,e.utcMinute=$,e.utcMinutes=X,e.utcMonday=Y,e.utcMondays=Ee,e.utcMonth=fe,e.utcMonths=ee,e.utcSaturday=ue,e.utcSaturdays=be,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=V,e.utcSundays=ge,e.utcThursday=Q,e.utcThursdays=oe,e.utcTuesday=H,e.utcTuesdays=xe,e.utcWednesday=j,e.utcWednesdays=ce,e.utcWeek=V,e.utcWeeks=ge,e.utcYear=ae,e.utcYears=_e,Object.defineProperty(e,"__esModule",{value:!0})})});var K3=W((R8,rue)=>{(function(e,t){typeof R8=="object"&&typeof rue!="undefined"?t(R8,JN()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(R8,function(e,t){"use strict";function r(Ie){if(0<=Ie.y&&Ie.y<100){var Ve=new Date(-1,Ie.m,Ie.d,Ie.H,Ie.M,Ie.S,Ie.L);return Ve.setFullYear(Ie.y),Ve}return new Date(Ie.y,Ie.m,Ie.d,Ie.H,Ie.M,Ie.S,Ie.L)}function i(Ie){if(0<=Ie.y&&Ie.y<100){var Ve=new Date(Date.UTC(-1,Ie.m,Ie.d,Ie.H,Ie.M,Ie.S,Ie.L));return Ve.setUTCFullYear(Ie.y),Ve}return new Date(Date.UTC(Ie.y,Ie.m,Ie.d,Ie.H,Ie.M,Ie.S,Ie.L))}function n(Ie,Ve,st){return{y:Ie,m:Ve,d:st,H:0,M:0,S:0,L:0}}function a(Ie){var Ve=Ie.dateTime,st=Ie.date,_t=Ie.time,Wt=Ie.periods,Ht=Ie.days,fr=Ie.shortDays,lr=Ie.months,Ot=Ie.shortMonths,Jt=h(Wt),Cr=p(Wt),Ge=h(Ht),Qe=p(Ht),nt=h(fr),gt=p(fr),ht=h(lr),Ft=p(lr),hr=h(Ot),Ut=p(Ot),Lr={a:as,A:ro,b:ba,B:co,c:null,d:L,e:L,f:X,g:te,G:ge,H:I,I:B,j:O,L:$,m:K,M:G,p:Us,q:Ma,Q:dt,s:St,S:q,u:J,U:N,V:Y,w:H,W:j,x:null,X:null,y:Q,Y:ue,Z:Ee,"%":mt},jr={a:el,A:Ml,b:Au,B:dl,c:null,d:xe,e:xe,f:fe,g:Le,G:Je,H:ce,I:oe,j:Se,L:be,m:ee,M:ae,p:Fe,q:ot,Q:dt,s:St,S:_e,u:re,U:pe,V:Ce,w:ze,W:we,x:null,X:null,y:me,Y:Ne,Z:rt,"%":mt},ii={a:la,A:mo,b:pn,B:zn,c:gn,d:T,e:T,f:D,g:b,G:_,H:E,I:E,j:y,L:k,m:A,M:S,p:ln,q:x,Q:P,s:R,S:C,u:v,U:m,V:g,w:d,W:w,x:ns,X:ua,y:b,Y:_,Z:M,"%":F};Lr.x=Fr(st,Lr),Lr.X=Fr(_t,Lr),Lr.c=Fr(Ve,Lr),jr.x=Fr(st,jr),jr.X=Fr(_t,jr),jr.c=Fr(Ve,jr);function Fr(lt,kt){return function(er){var zt=[],Ar=-1,Zt=0,wr=lt.length,Kr,ni,Si;for(er instanceof Date||(er=new Date(+er));++Ar53)return null;"w"in zt||(zt.w=1),"Z"in zt?(Zt=i(n(zt.y,0,1)),wr=Zt.getUTCDay(),Zt=wr>4||wr===0?t.utcMonday.ceil(Zt):t.utcMonday(Zt),Zt=t.utcDay.offset(Zt,(zt.V-1)*7),zt.y=Zt.getUTCFullYear(),zt.m=Zt.getUTCMonth(),zt.d=Zt.getUTCDate()+(zt.w+6)%7):(Zt=r(n(zt.y,0,1)),wr=Zt.getDay(),Zt=wr>4||wr===0?t.timeMonday.ceil(Zt):t.timeMonday(Zt),Zt=t.timeDay.offset(Zt,(zt.V-1)*7),zt.y=Zt.getFullYear(),zt.m=Zt.getMonth(),zt.d=Zt.getDate()+(zt.w+6)%7)}else("W"in zt||"U"in zt)&&("w"in zt||(zt.w="u"in zt?zt.u%7:"W"in zt?1:0),wr="Z"in zt?i(n(zt.y,0,1)).getUTCDay():r(n(zt.y,0,1)).getDay(),zt.m=0,zt.d="W"in zt?(zt.w+6)%7+zt.W*7-(wr+5)%7:zt.w+zt.U*7-(wr+6)%7);return"Z"in zt?(zt.H+=zt.Z/100|0,zt.M+=zt.Z%100,i(zt)):r(zt)}}function Xi(lt,kt,er,zt){for(var Ar=0,Zt=kt.length,wr=er.length,Kr,ni;Ar=wr)return-1;if(Kr=kt.charCodeAt(Ar++),Kr===37){if(Kr=kt.charAt(Ar++),ni=ii[Kr in o?kt.charAt(Ar++):Kr],!ni||(zt=ni(lt,er,zt))<0)return-1}else if(Kr!=er.charCodeAt(zt++))return-1}return zt}function ln(lt,kt,er){var zt=Jt.exec(kt.slice(er));return zt?(lt.p=Cr[zt[0].toLowerCase()],er+zt[0].length):-1}function la(lt,kt,er){var zt=nt.exec(kt.slice(er));return zt?(lt.w=gt[zt[0].toLowerCase()],er+zt[0].length):-1}function mo(lt,kt,er){var zt=Ge.exec(kt.slice(er));return zt?(lt.w=Qe[zt[0].toLowerCase()],er+zt[0].length):-1}function pn(lt,kt,er){var zt=hr.exec(kt.slice(er));return zt?(lt.m=Ut[zt[0].toLowerCase()],er+zt[0].length):-1}function zn(lt,kt,er){var zt=ht.exec(kt.slice(er));return zt?(lt.m=Ft[zt[0].toLowerCase()],er+zt[0].length):-1}function gn(lt,kt,er){return Xi(lt,Ve,kt,er)}function ns(lt,kt,er){return Xi(lt,st,kt,er)}function ua(lt,kt,er){return Xi(lt,_t,kt,er)}function as(lt){return fr[lt.getDay()]}function ro(lt){return Ht[lt.getDay()]}function ba(lt){return Ot[lt.getMonth()]}function co(lt){return lr[lt.getMonth()]}function Us(lt){return Wt[+(lt.getHours()>=12)]}function Ma(lt){return 1+~~(lt.getMonth()/3)}function el(lt){return fr[lt.getUTCDay()]}function Ml(lt){return Ht[lt.getUTCDay()]}function Au(lt){return Ot[lt.getUTCMonth()]}function dl(lt){return lr[lt.getUTCMonth()]}function Fe(lt){return Wt[+(lt.getUTCHours()>=12)]}function ot(lt){return 1+~~(lt.getUTCMonth()/3)}return{format:function(lt){var kt=Fr(lt+="",Lr);return kt.toString=function(){return lt},kt},parse:function(lt){var kt=Ii(lt+="",!1);return kt.toString=function(){return lt},kt},utcFormat:function(lt){var kt=Fr(lt+="",jr);return kt.toString=function(){return lt},kt},utcParse:function(lt){var kt=Ii(lt+="",!0);return kt.toString=function(){return lt},kt}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ie,Ve,st){var _t=Ie<0?"-":"",Wt=(_t?-Ie:Ie)+"",Ht=Wt.length;return _t+(Ht68?1900:2e3),st+_t[0].length):-1}function M(Ie,Ve,st){var _t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ve.slice(st,st+6));return _t?(Ie.Z=_t[1]?0:-(_t[2]+(_t[3]||"00")),st+_t[0].length):-1}function x(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+1));return _t?(Ie.q=_t[0]*3-3,st+_t[0].length):-1}function A(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+2));return _t?(Ie.m=_t[0]-1,st+_t[0].length):-1}function T(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+2));return _t?(Ie.d=+_t[0],st+_t[0].length):-1}function y(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+3));return _t?(Ie.m=0,Ie.d=+_t[0],st+_t[0].length):-1}function E(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+2));return _t?(Ie.H=+_t[0],st+_t[0].length):-1}function S(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+2));return _t?(Ie.M=+_t[0],st+_t[0].length):-1}function C(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+2));return _t?(Ie.S=+_t[0],st+_t[0].length):-1}function k(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+3));return _t?(Ie.L=+_t[0],st+_t[0].length):-1}function D(Ie,Ve,st){var _t=s.exec(Ve.slice(st,st+6));return _t?(Ie.L=Math.floor(_t[0]/1e3),st+_t[0].length):-1}function F(Ie,Ve,st){var _t=l.exec(Ve.slice(st,st+1));return _t?st+_t[0].length:-1}function P(Ie,Ve,st){var _t=s.exec(Ve.slice(st));return _t?(Ie.Q=+_t[0],st+_t[0].length):-1}function R(Ie,Ve,st){var _t=s.exec(Ve.slice(st));return _t?(Ie.s=+_t[0],st+_t[0].length):-1}function L(Ie,Ve){return c(Ie.getDate(),Ve,2)}function I(Ie,Ve){return c(Ie.getHours(),Ve,2)}function B(Ie,Ve){return c(Ie.getHours()%12||12,Ve,2)}function O(Ie,Ve){return c(1+t.timeDay.count(t.timeYear(Ie),Ie),Ve,3)}function $(Ie,Ve){return c(Ie.getMilliseconds(),Ve,3)}function X(Ie,Ve){return $(Ie,Ve)+"000"}function K(Ie,Ve){return c(Ie.getMonth()+1,Ve,2)}function G(Ie,Ve){return c(Ie.getMinutes(),Ve,2)}function q(Ie,Ve){return c(Ie.getSeconds(),Ve,2)}function J(Ie){var Ve=Ie.getDay();return Ve===0?7:Ve}function N(Ie,Ve){return c(t.timeSunday.count(t.timeYear(Ie)-1,Ie),Ve,2)}function V(Ie){var Ve=Ie.getDay();return Ve>=4||Ve===0?t.timeThursday(Ie):t.timeThursday.ceil(Ie)}function Y(Ie,Ve){return Ie=V(Ie),c(t.timeThursday.count(t.timeYear(Ie),Ie)+(t.timeYear(Ie).getDay()===4),Ve,2)}function H(Ie){return Ie.getDay()}function j(Ie,Ve){return c(t.timeMonday.count(t.timeYear(Ie)-1,Ie),Ve,2)}function Q(Ie,Ve){return c(Ie.getFullYear()%100,Ve,2)}function te(Ie,Ve){return Ie=V(Ie),c(Ie.getFullYear()%100,Ve,2)}function ue(Ie,Ve){return c(Ie.getFullYear()%1e4,Ve,4)}function ge(Ie,Ve){var st=Ie.getDay();return Ie=st>=4||st===0?t.timeThursday(Ie):t.timeThursday.ceil(Ie),c(Ie.getFullYear()%1e4,Ve,4)}function Ee(Ie){var Ve=Ie.getTimezoneOffset();return(Ve>0?"-":(Ve*=-1,"+"))+c(Ve/60|0,"0",2)+c(Ve%60,"0",2)}function xe(Ie,Ve){return c(Ie.getUTCDate(),Ve,2)}function ce(Ie,Ve){return c(Ie.getUTCHours(),Ve,2)}function oe(Ie,Ve){return c(Ie.getUTCHours()%12||12,Ve,2)}function Se(Ie,Ve){return c(1+t.utcDay.count(t.utcYear(Ie),Ie),Ve,3)}function be(Ie,Ve){return c(Ie.getUTCMilliseconds(),Ve,3)}function fe(Ie,Ve){return be(Ie,Ve)+"000"}function ee(Ie,Ve){return c(Ie.getUTCMonth()+1,Ve,2)}function ae(Ie,Ve){return c(Ie.getUTCMinutes(),Ve,2)}function _e(Ie,Ve){return c(Ie.getUTCSeconds(),Ve,2)}function re(Ie){var Ve=Ie.getUTCDay();return Ve===0?7:Ve}function pe(Ie,Ve){return c(t.utcSunday.count(t.utcYear(Ie)-1,Ie),Ve,2)}function Te(Ie){var Ve=Ie.getUTCDay();return Ve>=4||Ve===0?t.utcThursday(Ie):t.utcThursday.ceil(Ie)}function Ce(Ie,Ve){return Ie=Te(Ie),c(t.utcThursday.count(t.utcYear(Ie),Ie)+(t.utcYear(Ie).getUTCDay()===4),Ve,2)}function ze(Ie){return Ie.getUTCDay()}function we(Ie,Ve){return c(t.utcMonday.count(t.utcYear(Ie)-1,Ie),Ve,2)}function me(Ie,Ve){return c(Ie.getUTCFullYear()%100,Ve,2)}function Le(Ie,Ve){return Ie=Te(Ie),c(Ie.getUTCFullYear()%100,Ve,2)}function Ne(Ie,Ve){return c(Ie.getUTCFullYear()%1e4,Ve,4)}function Je(Ie,Ve){var st=Ie.getUTCDay();return Ie=st>=4||st===0?t.utcThursday(Ie):t.utcThursday.ceil(Ie),c(Ie.getUTCFullYear()%1e4,Ve,4)}function rt(){return"+0000"}function mt(){return"%"}function dt(Ie){return+Ie}function St(Ie){return Math.floor(+Ie/1e3)}var Ke;bt({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 bt(Ie){return Ke=a(Ie),e.timeFormat=Ke.format,e.timeParse=Ke.parse,e.utcFormat=Ke.utcFormat,e.utcParse=Ke.utcParse,Ke}var pt="%Y-%m-%dT%H:%M:%S.%LZ";function Oe(Ie){return Ie.toISOString()}var Ue=Date.prototype.toISOString?Oe:e.utcFormat(pt);function je(Ie){var Ve=new Date(Ie);return isNaN(Ve)?null:Ve}var $e=+new Date("2000-01-01T00:00:00.000Z")?je:e.utcParse(pt);e.isoFormat=Ue,e.isoParse=$e,e.timeFormatDefaultLocale=bt,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var QN=W((z8,iue)=>{(function(e,t){typeof z8=="object"&&typeof iue!="undefined"?t(z8):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(z8,(function(e){"use strict";function t(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function r(A,T){if((y=(A=T?A.toExponential(T-1):A.toExponential()).indexOf("e"))<0)return null;var y,E=A.slice(0,y);return[E.length>1?E[0]+E.slice(2):E,+A.slice(y+1)]}function i(A){return A=r(Math.abs(A)),A?A[1]:NaN}function n(A,T){return function(y,E){for(var S=y.length,C=[],k=0,D=A[0],F=0;S>0&&D>0&&(F+D+1>E&&(D=Math.max(1,E-F)),C.push(y.substring(S-=D,S+D)),!((F+=D+1)>E));)D=A[k=(k+1)%A.length];return C.reverse().join(T)}}function a(A){return function(T){return T.replace(/[0-9]/g,function(y){return A[+y]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(A){if(!(T=o.exec(A)))throw new Error("invalid format: "+A);var T;return new l({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}s.prototype=l.prototype;function l(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(A){e:for(var T=A.length,y=1,E=-1,S;y0&&(E=0);break}return E>0?A.slice(0,E)+A.slice(S+1):A}var c;function f(A,T){var y=r(A,T);if(!y)return A+"";var E=y[0],S=y[1],C=S-(c=Math.max(-8,Math.min(8,Math.floor(S/3)))*3)+1,k=E.length;return C===k?E:C>k?E+new Array(C-k+1).join("0"):C>0?E.slice(0,C)+"."+E.slice(C):"0."+new Array(1-C).join("0")+r(A,Math.max(0,T+C-1))[0]}function h(A,T){var y=r(A,T);if(!y)return A+"";var E=y[0],S=y[1];return S<0?"0."+new Array(-S).join("0")+E:E.length>S+1?E.slice(0,S+1)+"."+E.slice(S+1):E+new Array(S-E.length+2).join("0")}var p={"%":function(A,T){return(A*100).toFixed(T)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:t,e:function(A,T){return A.toExponential(T)},f:function(A,T){return A.toFixed(T)},g:function(A,T){return A.toPrecision(T)},o:function(A){return Math.round(A).toString(8)},p:function(A,T){return h(A*100,T)},r:h,s:f,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function d(A){return A}var v=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function g(A){var T=A.grouping===void 0||A.thousands===void 0?d:n(v.call(A.grouping,Number),A.thousands+""),y=A.currency===void 0?"":A.currency[0]+"",E=A.currency===void 0?"":A.currency[1]+"",S=A.decimal===void 0?".":A.decimal+"",C=A.numerals===void 0?d:a(v.call(A.numerals,String)),k=A.percent===void 0?"%":A.percent+"",D=A.minus===void 0?"-":A.minus+"",F=A.nan===void 0?"NaN":A.nan+"";function P(L){L=s(L);var I=L.fill,B=L.align,O=L.sign,$=L.symbol,X=L.zero,K=L.width,G=L.comma,q=L.precision,J=L.trim,N=L.type;N==="n"?(G=!0,N="g"):p[N]||(q===void 0&&(q=12),J=!0,N="g"),(X||I==="0"&&B==="=")&&(X=!0,I="0",B="=");var V=$==="$"?y:$==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",Y=$==="$"?E:/[%p]/.test(N)?k:"",H=p[N],j=/[defgprs%]/.test(N);q=q===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,q)):Math.max(0,Math.min(20,q));function Q(te){var ue=V,ge=Y,Ee,xe,ce;if(N==="c")ge=H(te)+ge,te="";else{te=+te;var oe=te<0||1/te<0;if(te=isNaN(te)?F:H(Math.abs(te),q),J&&(te=u(te)),oe&&+te==0&&O!=="+"&&(oe=!1),ue=(oe?O==="("?O:D:O==="-"||O==="("?"":O)+ue,ge=(N==="s"?m[8+c/3]:"")+ge+(oe&&O==="("?")":""),j){for(Ee=-1,xe=te.length;++Eece||ce>57){ge=(ce===46?S+te.slice(Ee+1):te.slice(Ee))+ge,te=te.slice(0,Ee);break}}}G&&!X&&(te=T(te,1/0));var Se=ue.length+te.length+ge.length,be=Se>1)+ue+te+ge+be.slice(Se);break;default:te=be+ue+te+ge;break}return C(te)}return Q.toString=function(){return L+""},Q}function R(L,I){var B=P((L=s(L),L.type="f",L)),O=Math.max(-8,Math.min(8,Math.floor(i(I)/3)))*3,$=Math.pow(10,-O),X=m[8+O/3];return function(K){return B($*K)+X}}return{format:P,formatPrefix:R}}var w;_({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function _(A){return w=g(A),e.format=w.format,e.formatPrefix=w.formatPrefix,w}function b(A){return Math.max(0,-i(Math.abs(A)))}function M(A,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(i(T)/3)))*3-i(Math.abs(A)))}function x(A,T){return A=Math.abs(A),T=Math.abs(T)-A,Math.max(0,i(T)-i(A))+1}e.FormatSpecifier=l,e.formatDefaultLocale=_,e.formatLocale=g,e.formatSpecifier=s,e.precisionFixed=b,e.precisionPrefix=M,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})}))});var aue=W((Fzr,nue)=>{"use strict";nue.exports=function(e){for(var t=e.length,r,i=0;i13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var hn=W((Lzr,oue)=>{"use strict";var $gt=aue();oue.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&$gt(r))return!1}else if(t!=="number")return!1;return e-e<1}});var ia={};Jn(ia,{ALMOST_EQUAL:()=>fmt,BADNUM:()=>eU,EPOCHJD:()=>cmt,FP_SAFE:()=>Wgt,LOG_CLIP:()=>hmt,MINUS_SIGN:()=>dmt,ONEAVGMONTH:()=>tmt,ONEAVGQUARTER:()=>Jgt,ONEAVGYEAR:()=>Xgt,ONEDAY:()=>nmt,ONEHOUR:()=>amt,ONEMAXMONTH:()=>emt,ONEMAXQUARTER:()=>Kgt,ONEMAXYEAR:()=>Ygt,ONEMICROSEC:()=>umt,ONEMILLI:()=>lmt,ONEMIN:()=>omt,ONEMINMONTH:()=>rmt,ONEMINQUARTER:()=>Qgt,ONEMINYEAR:()=>Zgt,ONESEC:()=>smt,ONEWEEK:()=>imt});var eU,Wgt,Ygt,Xgt,Zgt,Kgt,Jgt,Qgt,emt,tmt,rmt,imt,nmt,amt,omt,smt,lmt,umt,cmt,fmt,hmt,dmt,ra=Ci(()=>{"use strict";eU=void 0,Wgt=Number.MAX_VALUE*1e-4,Ygt=316224e5,Xgt=315576e5,Zgt=31536e6,Kgt=79488e5,Jgt=78894e5,Qgt=76896e5,emt=26784e5,tmt=26298e5,rmt=24192e5,imt=6048e5,nmt=864e5,amt=36e5,omt=6e4,smt=1e3,lmt=1,umt=.001,cmt=24405875e-1,fmt=1-1e-6,hmt=10,dmt="\u2212"});var tU=W((B8,sue)=>{(function(e,t){typeof B8=="object"&&typeof sue!="undefined"?t(B8):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(B8,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),i=0;i>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,p,d;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var v=new ArrayBuffer(s),m=new Uint8Array(v);for(u=0;u>4,m[c++]=(h&15)<<4|p>>2,m[c++]=(p&3)<<6|d&63;return v};e.decode=a,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var my=W((Pzr,lue)=>{"use strict";lue.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var Tc=W(Up=>{"use strict";var pmt=tU().decode,vmt=my(),rU=Array.isArray,gmt=ArrayBuffer,mmt=DataView;function uue(e){return gmt.isView(e)&&!(e instanceof mmt)}Up.isTypedArray=uue;function q8(e){return rU(e)||uue(e)}Up.isArrayOrTypedArray=q8;function ymt(e){return!q8(e[0])}Up.isArray1D=ymt;Up.ensureArray=function(e,t){return rU(e)||(e=[]),e.length=t,e};var nc={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};nc.uint8c=nc.u1c;nc.uint8=nc.u1;nc.int8=nc.i1;nc.uint16=nc.u2;nc.int16=nc.i2;nc.uint32=nc.u4;nc.int32=nc.i4;nc.float32=nc.f4;nc.float64=nc.f8;function iU(e){return e.constructor===ArrayBuffer}Up.isArrayBuffer=iU;Up.decodeTypedArraySpec=function(e){var t=[],r=xmt(e),i=r.dtype,n=nc[i];if(!n)throw new Error('Error in dtype: "'+i+'"');var a=n.BYTES_PER_ELEMENT,o=r.bdata;iU(o)||(o=pmt(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,p=0;if(l===1)t=new n(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var fue=hn(),aU=Tc().isArrayOrTypedArray;vue.exports=function(t,r){if(fue(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var i=r.split("."),n,a,o,s;for(s=0;s{"use strict";var J3=U6(),Amt=/^\w*$/,Mmt=0,gue=1,O8=2,mue=3,Nx=4;yue.exports=function(t,r,i,n){i=i||"name",n=n||"value";var a,o,s,l={};r&&r.length?(s=J3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[p]=l[p]|O8,f.set(h,null);if(c){for(a=p;a{"use strict";var Smt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Emt=/^[^\.\[\]]+$/;bue.exports=function(e,t){for(;t;){var r=e.match(Smt);if(r)e=r[1];else if(e.match(Emt))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var N8=W((qzr,wue)=>{"use strict";var kmt=hn();wue.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var i=Math.log(Math.min(r[0],r[1]))/Math.LN10;return kmt(i)||(i=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),i}});var Mue=W((Ozr,Aue)=>{"use strict";var Tue=Tc().isArrayOrTypedArray,V6=my();Aue.exports=function e(t,r){for(var i in r){var n=r[i],a=t[i];if(a!==n)if(i.charAt(0)==="_"||typeof n=="function"){if(i in t)continue;t[i]=n}else if(Tue(n)&&Tue(a)&&V6(n[0])){if(i==="customdata"||i==="ids")continue;for(var o=Math.min(n.length,a.length),s=0;sCmt,modHalf:()=>Dmt});function Cmt(e,t){let r=e%t;return r<0?r+t:r}function Dmt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var ew=Ci(()=>{"use strict"});var an=W(j6=>{"use strict";var Sue=my(),G6=Array.isArray;function Fmt(e,t){var r,i;for(r=0;r{"use strict";Eue.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;i===void 0&&(i=r);var n={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:i},weight:n,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var $6={};Jn($6,{HOVERARROWSIZE:()=>Pmt,HOVERFONT:()=>zmt,HOVERFONTSIZE:()=>Rmt,HOVERID:()=>qmt,HOVERMINTIME:()=>Bmt,HOVERTEXTPAD:()=>Imt,YANGLE:()=>Lmt});var Lmt,Pmt,Imt,Rmt,zmt,Bmt,qmt,W6=Ci(()=>{"use strict";Lmt=60,Pmt=6,Imt=3,Rmt=13,zmt="Arial, sans-serif",Bmt=50,qmt="-hover"});var yy=W((Vzr,Due)=>{"use strict";var kue=(W6(),Pt($6)),Cue=jo(),oU=Cue({editType:"none"});oU.family.dflt=kue.HOVERFONT;oU.size.dflt=kue.HOVERFONTSIZE;Due.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:oU,grouptitlefont:Cue({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var tw=W((Gzr,Fue)=>{"use strict";var Omt=jo(),Y6=yy().hoverlabel,X6=an().extendFlat;Fue.exports={hoverlabel:{bgcolor:X6({},Y6.bgcolor,{arrayOk:!0}),bordercolor:X6({},Y6.bordercolor,{arrayOk:!0}),font:Omt({arrayOk:!0,editType:"none"}),align:X6({},Y6.align,{arrayOk:!0}),namelength:X6({},Y6.namelength,{arrayOk:!0}),showarrow:X6({},Y6.showarrow),editType:"none"}}});var Ja=W((Hzr,Lue)=>{"use strict";var Nmt=jo(),Umt=tw();Lue.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:Nmt({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:Umt.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var Afe=W((Kzr,Tfe)=>{var JU=Object.defineProperty,Vmt=Object.getOwnPropertyDescriptor,Gmt=Object.getOwnPropertyNames,Hmt=Object.prototype.hasOwnProperty,jmt=(e,t)=>{for(var r in t)JU(e,r,{get:t[r],enumerable:!0})},$mt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Gmt(t))!Hmt.call(e,n)&&n!==r&&JU(e,n,{get:()=>t[n],enumerable:!(i=Vmt(t,n))||i.enumerable});return e},Wmt=e=>$mt(JU({},"__esModule",{value:!0}),e),Vue={};jmt(Vue,{a98:()=>qbt,average:()=>Gyt,averageAngle:()=>f1,averageNumber:()=>ace,blend:()=>Vxt,blerp:()=>LU,clampChroma:()=>lbt,clampGamut:()=>MV,clampRgb:()=>sbt,colorsNamed:()=>Hue,convertA98ToXyz65:()=>PU,convertCubehelixToRgb:()=>ice,convertDlchToLab65:()=>X8,convertHsiToRgb:()=>dce,convertHslToRgb:()=>gce,convertHsvToRgb:()=>nV,convertHwbToRgb:()=>bce,convertItpToXyz65:()=>RU,convertJabToJch:()=>BU,convertJabToRgb:()=>cV,convertJabToXyz65:()=>lV,convertJchToJab:()=>qU,convertLab65ToDlch:()=>Z8,convertLab65ToRgb:()=>iA,convertLab65ToXyz65:()=>tV,convertLabToLch:()=>zg,convertLabToRgb:()=>hV,convertLabToXyz50:()=>oD,convertLchToLab:()=>Bg,convertLchuvToLuv:()=>vV,convertLrgbToOklab:()=>gV,convertLrgbToRgb:()=>Wx,convertLuvToLchuv:()=>pV,convertLuvToXyz50:()=>J8,convertOkhslToOklab:()=>UU,convertOkhsvToOklab:()=>GU,convertOklabToLrgb:()=>uw,convertOklabToOkhsl:()=>NU,convertOklabToOkhsv:()=>VU,convertOklabToRgb:()=>oA,convertP3ToXyz65:()=>HU,convertProphotoToXyz50:()=>WU,convertRec2020ToXyz65:()=>XU,convertRgbToCubehelix:()=>rce,convertRgbToHsi:()=>pce,convertRgbToHsl:()=>mce,convertRgbToHsv:()=>aV,convertRgbToHwb:()=>_ce,convertRgbToJab:()=>uV,convertRgbToLab:()=>dV,convertRgbToLab65:()=>nA,convertRgbToLrgb:()=>$x,convertRgbToOklab:()=>aA,convertRgbToXyb:()=>Xce,convertRgbToXyz50:()=>lw,convertRgbToXyz65:()=>xy,convertRgbToYiq:()=>rfe,convertXybToRgb:()=>Zce,convertXyz50ToLab:()=>sD,convertXyz50ToLuv:()=>K8,convertXyz50ToProphoto:()=>$U,convertXyz50ToRgb:()=>sw,convertXyz50ToXyz65:()=>efe,convertXyz65ToA98:()=>IU,convertXyz65ToItp:()=>zU,convertXyz65ToJab:()=>sV,convertXyz65ToLab65:()=>rV,convertXyz65ToP3:()=>jU,convertXyz65ToRec2020:()=>YU,convertXyz65ToRgb:()=>by,convertXyz65ToXyz50:()=>Qce,convertYiqToRgb:()=>ife,converter:()=>_s,cubehelix:()=>Obt,differenceCie76:()=>zyt,differenceCie94:()=>Byt,differenceCiede2000:()=>qyt,differenceCmc:()=>Oyt,differenceEuclidean:()=>ow,differenceHueChroma:()=>rA,differenceHueNaive:()=>nce,differenceHueSaturation:()=>tA,differenceHyab:()=>Nyt,differenceItp:()=>Vyt,differenceKotsarenkoRamos:()=>Uyt,displayable:()=>AV,dlab:()=>Nbt,dlch:()=>Ubt,easingGamma:()=>yfe,easingInOutSine:()=>zbt,easingMidpoint:()=>ffe,easingSmootherstep:()=>Ibt,easingSmoothstep:()=>Fbt,easingSmoothstepInverse:()=>Lbt,filterBrightness:()=>mbt,filterContrast:()=>ybt,filterDeficiencyDeuter:()=>Cbt,filterDeficiencyProt:()=>kbt,filterDeficiencyTrit:()=>Dbt,filterGrayscale:()=>_bt,filterHueRotate:()=>Tbt,filterInvert:()=>wbt,filterSaturate:()=>bbt,filterSepia:()=>xbt,fixupAlpha:()=>Ru,fixupHueDecreasing:()=>Fyt,fixupHueIncreasing:()=>Dyt,fixupHueLonger:()=>Cyt,fixupHueShorter:()=>c1,formatCss:()=>Rxt,formatHex:()=>zxt,formatHex8:()=>Bxt,formatHsl:()=>Oxt,formatRgb:()=>qxt,getMode:()=>Tf,hsi:()=>Vbt,hsl:()=>Gbt,hsv:()=>Hbt,hwb:()=>jbt,inGamut:()=>cD,interpolate:()=>Kxt,interpolateWith:()=>dfe,interpolateWithPremultipliedAlpha:()=>Jxt,interpolatorLinear:()=>Gi,interpolatorPiecewise:()=>ece,interpolatorSplineBasis:()=>vfe,interpolatorSplineBasisClosed:()=>gfe,interpolatorSplineMonotone:()=>tbt,interpolatorSplineMonotone2:()=>rbt,interpolatorSplineMonotoneClosed:()=>ibt,interpolatorSplineNatural:()=>Qxt,interpolatorSplineNaturalClosed:()=>ebt,itp:()=>$bt,jab:()=>Wbt,jch:()=>Ybt,lab:()=>Xbt,lab65:()=>Zbt,lch:()=>Kbt,lch65:()=>Jbt,lchuv:()=>Qbt,lerp:()=>Vx,lrgb:()=>e_t,luv:()=>t_t,mapAlphaDivide:()=>cfe,mapAlphaMultiply:()=>ufe,mapTransferGamma:()=>Wxt,mapTransferLinear:()=>_V,mapper:()=>sA,modeA98:()=>tce,modeCubehelix:()=>oce,modeDlab:()=>fce,modeDlch:()=>hce,modeHsi:()=>vce,modeHsl:()=>iV,modeHsv:()=>oV,modeHwb:()=>Tce,modeItp:()=>Sce,modeJab:()=>Ece,modeJch:()=>kce,modeLab:()=>lD,modeLab65:()=>Dce,modeLch:()=>uD,modeLch65:()=>Lce,modeLchuv:()=>Rce,modeLrgb:()=>zce,modeLuv:()=>Bce,modeOkhsl:()=>Oce,modeOkhsv:()=>Nce,modeOklab:()=>Vce,modeOklch:()=>Hce,modeP3:()=>jce,modeProphoto:()=>$ce,modeRec2020:()=>Wce,modeRgb:()=>jx,modeXyb:()=>Kce,modeXyz50:()=>Jce,modeXyz65:()=>tfe,modeYiq:()=>nfe,nearest:()=>fbt,okhsl:()=>r_t,okhsv:()=>i_t,oklab:()=>n_t,oklch:()=>a_t,p3:()=>o_t,parse:()=>Kue,parseHex:()=>$ue,parseHsl:()=>xce,parseHslLegacy:()=>yce,parseHwb:()=>wce,parseLab:()=>Cce,parseLch:()=>Fce,parseNamed:()=>jue,parseOklab:()=>Uce,parseOklch:()=>Gce,parseRgb:()=>Jue,parseRgbLegacy:()=>Wue,parseTransparent:()=>Que,prophoto:()=>s_t,random:()=>$xt,rec2020:()=>l_t,removeParser:()=>syt,rgb:()=>u_t,round:()=>afe,samples:()=>obt,serializeHex:()=>bV,serializeHex8:()=>ofe,serializeHsl:()=>lfe,serializeRgb:()=>sfe,toGamut:()=>ubt,trilerp:()=>yyt,unlerp:()=>myt,useMode:()=>$o,useParser:()=>Xue,wcagContrast:()=>Bbt,wcagLuminance:()=>KU,xyb:()=>c_t,xyz50:()=>f_t,xyz65:()=>h_t,yiq:()=>d_t});Tfe.exports=Wmt(Vue);var Ymt=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Gue=Ymt,Xmt={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},Hue=Xmt,Zmt=e=>Gue(Hue[e.toLowerCase()],6),jue=Zmt,Kmt=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Jmt=e=>{let t;return(t=e.match(Kmt))?Gue(parseInt(t[1],16),t[1].length):void 0},$ue=Jmt,Oh="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",jzr=`(?:${Oh}|none)`,J6=`${Oh}%`,$zr=`(?:${Oh}%|none)`,QU=`(?:${Oh}%|${Oh})`,Qmt=`(?:${Oh}%|${Oh}|none)`,eyt=`(?:${Oh}(deg|grad|rad|turn)|${Oh})`,Wzr=`(?:${Oh}(deg|grad|rad|turn)|${Oh}|none)`,nw="\\s*,\\s*",Yzr=new RegExp("^"+Qmt+"$"),tyt=new RegExp(`^rgba?\\(\\s*${Oh}${nw}${Oh}${nw}${Oh}\\s*(?:,\\s*${QU}\\s*)?\\)$`),ryt=new RegExp(`^rgba?\\(\\s*${J6}${nw}${J6}${nw}${J6}\\s*(?:,\\s*${QU}\\s*)?\\)$`),iyt=e=>{let t={mode:"rgb"},r;if(r=e.match(tyt))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(ryt))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Wue=iyt,nyt=(e,t)=>e===void 0?void 0:typeof e!="object"?Kue(e):e.mode!==void 0?e:t?da(fn({},e),{mode:t}):void 0,Vp=nyt,ayt=(e="rgb")=>t=>(t=Vp(t,e))!==void 0?t.mode===e?t:u1[t.mode][e]?u1[t.mode][e](t):e==="rgb"?u1[t.mode].rgb(t):u1.rgb[e](u1[t.mode].rgb(t)):void 0,_s=ayt,u1={},Yue={},aw=[],eV={},oyt=e=>e,$o=e=>(u1[e.mode]=fn(fn({},u1[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{u1[t]||(u1[t]={}),u1[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=oyt)}),Yue[e.mode]=e,(e.parse||[]).forEach(t=>{Xue(t,e.mode)}),_s(e.mode)),Tf=e=>Yue[e],Xue=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");eV[e]=t}else typeof e=="function"&&aw.indexOf(e)<0&&aw.push(e)},syt=e=>{if(typeof e=="string")delete eV[e];else if(typeof e=="function"){let t=aw.indexOf(e);t>0&&aw.splice(t,1)}},DU=/[^\x00-\x7F]|[a-zA-Z_]/,lyt=/[^\x00-\x7F]|[-\w]/,wi={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},oa=0;function U8(e){let t=e[oa],r=e[oa+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[oa+2]):t==="."?/\d/.test(r):/\d/.test(t)}function FU(e){if(oa>=e.length)return!1;let t=e[oa];if(DU.test(t))return!0;if(t==="-"){if(e.length-oa<2)return!1;let r=e[oa+1];return!!(r==="-"||DU.test(r))}return!1}var uyt={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Z6(e){let t="";if((e[oa]==="-"||e[oa]==="+")&&(t+=e[oa++]),t+=V8(e),e[oa]==="."&&/\d/.test(e[oa+1])&&(t+=e[oa++]+V8(e)),(e[oa]==="e"||e[oa]==="E")&&((e[oa+1]==="-"||e[oa+1]==="+")&&/\d/.test(e[oa+2])?t+=e[oa++]+e[oa++]+V8(e):/\d/.test(e[oa+1])&&(t+=e[oa++]+V8(e))),FU(e)){let r=j8(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:wi.Hue,value:t*uyt[r]}:void 0}return e[oa]==="%"?(oa++,{type:wi.Percentage,value:+t}):{type:wi.Number,value:+t}}function V8(e){let t="";for(;/\d/.test(e[oa]);)t+=e[oa++];return t}function j8(e){let t="";for(;oa4)){if(r.length===4){if(r[3].type!==wi.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:wi.None,value:void 0}),r.every(n=>n.type!==wi.Alpha)?r:void 0}}function dyt(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==wi.Function)return;let i=Zue(e,t);if(i)return i.unshift(r.value),i}var pyt=e=>{if(typeof e!="string")return;let t=fyt(e),r=t?dyt(t,!0):void 0,i,n=0,a=aw.length;for(;ne==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Que=gyt,Vx=(e,t,r)=>e+r*(t-e),myt=(e,t,r)=>(r-e)/(t-e),LU=(e,t,r,i,n,a)=>Vx(Vx(e,t,n),Vx(r,i,n),a),yyt=(e,t,r,i,n,a,o,s,l,u,c)=>Vx(LU(e,t,r,i,l,u),LU(n,a,o,s,l,u),c),xyt=e=>{let t=[];for(let r=0;rt=>{let r=xyt(t);return i=>{let n=i*r.length,a=i>=1?r.length-1:Math.max(Math.floor(n),0),o=r[a];return o===void 0?void 0:e(o[0],o[1],n-a)}},Gi=ece(Vx),Ru=e=>{let t=!1,r=e.map(i=>i!==void 0?(t=!0,i):1);return t?r:e},byt={mode:"rgb",channels:["r","g","b","alpha"],parse:[Jue,$ue,Wue,jue,Que,"srgb"],serialize:"srgb",interpolate:{r:Gi,g:Gi,b:Gi,alpha:{use:Gi,fixup:Ru}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},jx=byt,sU=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),_yt=e=>{let t=sU(e.r),r=sU(e.g),i=sU(e.b),n={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*i,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*i,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*i};return e.alpha!==void 0&&(n.alpha=e.alpha),n},PU=_yt,lU=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),wyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"a98",r:lU(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:lU(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:lU(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return i!==void 0&&(n.alpha=i),n},IU=wyt,uU=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Tyt=({r:e,g:t,b:r,alpha:i})=>{let n={mode:"lrgb",r:uU(e),g:uU(t),b:uU(r)};return i!==void 0&&(n.alpha=i),n},$x=Tyt,Ayt=e=>{let{r:t,g:r,b:i,alpha:n}=$x(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*i,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*i,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*i};return n!==void 0&&(a.alpha=n),a},xy=Ayt,cU=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Myt=({r:e,g:t,b:r,alpha:i},n="rgb")=>{let a={mode:n,r:cU(e),g:cU(t),b:cU(r)};return i!==void 0&&(a.alpha=i),a},Wx=Myt,Syt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Wx({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return i!==void 0&&(n.alpha=i),n},by=Syt,Eyt=da(fn({},jx),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>IU(xy(e)),xyz65:IU},toMode:{rgb:e=>by(PU(e)),xyz65:PU}}),tce=Eyt,kyt=e=>(e=e%360)<0?e+360:e,ef=kyt,eD=(e,t)=>e.map((r,i,n)=>{if(r===void 0)return r;let a=ef(r);return i===0||e[i-1]===void 0?a:t(a-ef(n[i-1]))}).reduce((r,i)=>!r.length||i===void 0||r[r.length-1]===void 0?(r.push(i),r):(r.push(i+r[r.length-1]),r),[]),c1=e=>eD(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Cyt=e=>eD(e,t=>Math.abs(t)>=180||t===0?t:t-360*Math.sign(t)),Dyt=e=>eD(e,t=>t>=0?t:t+360),Fyt=e=>eD(e,t=>t<=0?t:t-360),Ac=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Lyt=Math.PI/180,Pyt=180/Math.PI,Pue=Ac[3]*Ac[4],Iue=Ac[1]*Ac[4],Rue=Ac[1]*Ac[2]-Ac[0]*Ac[3],Iyt=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(Rue*r+e*Pue-t*Iue)/(Rue+Pue-Iue),a=r-n,o=(Ac[4]*(t-n)-Ac[2]*a)/Ac[3],s={mode:"cubehelix",l:n,s:n===0||n===1?void 0:Math.sqrt(a*a+o*o)/(Ac[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(o,a)*Pyt-120),i!==void 0&&(s.alpha=i),s},rce=Iyt,Ryt=({h:e,s:t,l:r,alpha:i})=>{let n={mode:"rgb"};e=(e===void 0?0:e+120)*Lyt,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return n.r=r+a*(Ac[0]*o+Ac[1]*s),n.g=r+a*(Ac[2]*o+Ac[3]*s),n.b=r+a*(Ac[4]*o+Ac[5]*s),i!==void 0&&(n.alpha=i),n},ice=Ryt,tA=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=ef(e.h),i=ef(t.h),n=Math.sin((i-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*n},nce=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=ef(e.h),i=ef(t.h);return Math.abs(i-r)>180?r-(i-360*Math.sign(i-r)):i-r},rA=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=ef(e.h),i=ef(t.h),n=Math.sin((i-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*n},ow=(e="rgb",t=[1,1,1,0])=>{let r=Tf(e),i=r.channels,n=r.difference,a=_s(e);return(o,s)=>{let l=a(o),u=a(s);return Math.sqrt(i.reduce((c,f,h)=>{let p=n[f]?n[f](l,u):l[f]-u[f];return c+(t[h]||0)*Math.pow(isNaN(p)?0:p,2)},0))}},zyt=()=>ow("lab65"),Byt=(e=1,t=.045,r=.015)=>{let i=_s("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),h=s.l,p=s.a,d=s.b,v=Math.sqrt(p*p+d*d),m=Math.pow(l-h,2),g=Math.pow(f-v,2),w=Math.pow(u-p,2)+Math.pow(c-d,2)-g;return Math.sqrt(m/Math.pow(e,2)+g/Math.pow(1+t*f,2)+w/Math.pow(1+r*f,2))}},qyt=(e=1,t=1,r=1)=>{let i=_s("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),h=s.l,p=s.a,d=s.b,v=Math.sqrt(p*p+d*d),m=(f+v)/2,g=.5*(1-Math.sqrt(Math.pow(m,7)/(Math.pow(m,7)+Math.pow(25,7)))),w=u*(1+g),_=p*(1+g),b=Math.sqrt(w*w+c*c),M=Math.sqrt(_*_+d*d),x=Math.abs(w)+Math.abs(c)===0?0:Math.atan2(c,w);x+=(x<0)*2*Math.PI;let A=Math.abs(_)+Math.abs(d)===0?0:Math.atan2(d,_);A+=(A<0)*2*Math.PI;let T=h-l,y=M-b,E=b*M===0?0:A-x;E-=(E>Math.PI)*2*Math.PI,E+=(E<-Math.PI)*2*Math.PI;let S=2*Math.sqrt(b*M)*Math.sin(E/2),C=(l+h)/2,k=(b+M)/2,D;b*M===0?D=x+A:(D=(x+A)/2,D-=(Math.abs(x-A)>Math.PI)*Math.PI,D+=(D<0)*2*Math.PI);let F=Math.pow(C-50,2),P=1-.17*Math.cos(D-Math.PI/6)+.24*Math.cos(2*D)+.32*Math.cos(3*D+Math.PI/30)-.2*Math.cos(4*D-63*Math.PI/180),R=1+.015*F/Math.sqrt(20+F),L=1+.045*k,I=1+.015*k*P,B=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*D-275)/25,2)),O=2*Math.sqrt(Math.pow(k,7)/(Math.pow(k,7)+Math.pow(25,7))),$=-1*Math.sin(2*B)*O;return Math.sqrt(Math.pow(T/(e*R),2)+Math.pow(y/(t*L),2)+Math.pow(S/(r*I),2)+$*y/(t*L)*S/(r*I))}},Oyt=(e=1,t=1)=>{let r=_s("lab65");return(i,n)=>{let a=r(i),o=a.l,s=a.a,l=a.b,u=Math.sqrt(s*s+l*l),c=Math.atan2(l,s);c=c+2*Math.PI*(c<0);let f=r(n),h=f.l,p=f.a,d=f.b,v=Math.sqrt(p*p+d*d),m=Math.pow(o-h,2),g=Math.pow(u-v,2),w=Math.pow(s-p,2)+Math.pow(l-d,2)-g,_=Math.sqrt(Math.pow(u,4)/(Math.pow(u,4)+1900)),b=c>=164/180*Math.PI&&c<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(c+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(c+35/180*Math.PI)),M=o<16?.511:.040975*o/(1+.01765*o),x=.0638*u/(1+.0131*u)+.638,A=x*(_*b+1-_);return Math.sqrt(m/Math.pow(e*M,2)+g/Math.pow(t*x,2)+w/Math.pow(A,2))}},Nyt=()=>{let e=_s("lab65");return(t,r)=>{let i=e(t),n=e(r),a=i.l-n.l,o=i.a-n.a,s=i.b-n.b;return Math.abs(a)+Math.sqrt(o*o+s*s)}},Uyt=()=>ow("yiq",[.5053,.299,.1957]),Vyt=()=>ow("itp",[518400,129600,518400]),f1=e=>{let t=e.reduce((i,n)=>{if(n!==void 0){let a=n*Math.PI/180;i.sin+=Math.sin(a),i.cos+=Math.cos(a)}return i},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},ace=e=>{let t=e.filter(r=>r!==void 0);return t.length?t.reduce((r,i)=>r+i,0)/t.length:void 0},fU=e=>typeof e=="function";function Gyt(e,t="rgb",r){let i=Tf(t),n=e.map(_s(t));return i.channels.reduce((a,o)=>{let s=n.map(l=>l[o]).filter(l=>l!==void 0);if(s.length){let l;fU(r)?l=r:r&&fU(r[o])?l=r[o]:i.average&&fU(i.average[o])?l=i.average[o]:l=ace,a[o]=l(s,o)}return a},{mode:t})}var Hyt={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:rce},toMode:{rgb:ice},interpolate:{h:{use:Gi,fixup:c1},s:Gi,l:Gi,alpha:{use:Gi,fixup:Ru}},difference:{h:tA},average:{h:f1}},oce=Hyt,jyt=({l:e,a:t,b:r,alpha:i},n="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),o={mode:n,l:e,c:a};return a&&(o.h=ef(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},zg=jyt,$yt=({l:e,c:t,h:r,alpha:i},n="lab")=>{r===void 0&&(r=0);let a={mode:n,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return i!==void 0&&(a.alpha=i),a},Bg=$yt,sce=Math.pow(29,3)/Math.pow(3,3),lce=Math.pow(6,3)/Math.pow(29,3),Iu={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},iw={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Xzr=Math.pow(29,3)/Math.pow(3,3),Zzr=Math.pow(6,3)/Math.pow(29,3),hU=e=>Math.pow(e,3)>lce?Math.pow(e,3):(116*e-16)/sce,Wyt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz65",x:hU(a)*iw.X,y:hU(n)*iw.Y,z:hU(o)*iw.Z};return i!==void 0&&(s.alpha=i),s},tV=Wyt,Yyt=e=>by(tV(e)),iA=Yyt,dU=e=>e>lce?Math.cbrt(e):(sce*e+16)/116,Xyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=dU(e/iw.X),a=dU(t/iw.Y),o=dU(r/iw.Z),s={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-o)};return i!==void 0&&(s.alpha=i),s},rV=Xyt,Zyt=e=>{let t=rV(xy(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},nA=Zyt,$8=1,uce=1,eA=26/180*Math.PI,W8=Math.cos(eA),Y8=Math.sin(eA),cce=100/Math.log(139/100),Kyt=({l:e,c:t,h:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"lab65",l:(Math.exp(e*$8/cce)-1)/.0039},a=(Math.exp(.0435*t*uce*$8)-1)/.075,o=a*Math.cos(r/180*Math.PI-eA),s=a*Math.sin(r/180*Math.PI-eA);return n.a=o*W8-s/.83*Y8,n.b=o*Y8+s/.83*W8,i!==void 0&&(n.alpha=i),n},X8=Kyt,Jyt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=t*W8+r*Y8,a=.83*(r*W8-t*Y8),o=Math.sqrt(n*n+a*a),s={mode:"dlch",l:cce/$8*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*uce*$8)};return s.c&&(s.h=ef((Math.atan2(a,n)+eA)/Math.PI*180)),i!==void 0&&(s.alpha=i),s},Z8=Jyt,zue=e=>X8(zg(e,"dlch")),Bue=e=>Bg(Z8(e),"dlab"),Qyt={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:zue,rgb:e=>iA(zue(e))},fromMode:{lab65:Bue,rgb:e=>Bue(nA(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Gi,a:Gi,b:Gi,alpha:{use:Gi,fixup:Ru}}},fce=Qyt,e2t={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:X8,dlab:e=>Bg(e,"dlab"),rgb:e=>iA(X8(e))},fromMode:{lab65:Z8,dlab:e=>zg(e,"dlch"),rgb:e=>Z8(nA(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Gi,c:Gi,h:{use:Gi,fixup:c1},alpha:{use:Gi,fixup:Ru}},difference:{h:rA},average:{h:f1}},hce=e2t;function dce({h:e,s:t,i:r,alpha:i}){e=ef(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1+t*(3/(2-n)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-n)-1)),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1+t*(3/(2-n)-1))};break;case 4:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3/(2-n)-1))};break;case 5:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",i!==void 0&&(a.alpha=i),a}function pce({r:e,g:t,b:r,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return n-a!==0&&(o.h=(n===e?(t-r)/(n-a)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},i2t=r2t,n2t=new RegExp(`^hsla?\\(\\s*${eyt}${nw}${J6}${nw}${J6}\\s*(?:,\\s*${QU}\\s*)?\\)$`),a2t=e=>{let t=e.match(n2t);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=i2t(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},yce=a2t;function o2t(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,i,n,a,o]=t;if(i.type!==wi.None){if(i.type===wi.Percentage)return;r.h=i.value}if(n.type!==wi.None){if(n.type===wi.Hue)return;r.s=n.value/100}if(a.type!==wi.None){if(a.type===wi.Hue)return;r.l=a.value/100}return o.type!==wi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===wi.Number?o.value:o.value/100))),r}var xce=o2t,s2t={mode:"hsl",toMode:{rgb:gce},fromMode:{rgb:mce},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[xce,yce],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Gi,fixup:c1},s:Gi,l:Gi,alpha:{use:Gi,fixup:Ru}},difference:{h:tA},average:{h:f1}},iV=s2t;function nV({h:e,s:t,v:r,alpha:i}){e=ef(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*n),b:r*(1-t)};break;case 1:a={r:r*(1-t*n),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*n)};break;case 3:a={r:r*(1-t),g:r*(1-t*n),b:r};break;case 4:a={r:r*(1-t*n),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*n)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",i!==void 0&&(a.alpha=i),a}function aV({r:e,g:t,b:r,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsv",s:n===0?0:1-a/n,v:n};return n-a!==0&&(o.h=(n===e?(t-r)/(n-a)+(t1){let n=t+r;t/=n,r/=n}return nV({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:i})}function _ce(e){let t=aV(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,n={mode:"hwb",w:(1-r)*i,b:1-i};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function u2t(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,i,n,a,o]=t;if(i.type!==wi.None){if(i.type===wi.Percentage)return;r.h=i.value}if(n.type!==wi.None){if(n.type===wi.Hue)return;r.w=n.value/100}if(a.type!==wi.None){if(a.type===wi.Hue)return;r.b=a.value/100}return o.type!==wi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===wi.Number?o.value:o.value/100))),r}var wce=u2t,c2t={mode:"hwb",toMode:{rgb:bce},fromMode:{rgb:_ce},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[wce],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Gi,fixup:c1},w:Gi,b:Gi,alpha:{use:Gi,fixup:Ru}},difference:{h:nce},average:{h:f1}},Tce=c2t,Ace=203,tD=.1593017578125,Mce=78.84375,rD=.8359375,iD=18.8515625,nD=18.6875;function pU(e){if(e<0)return 0;let t=Math.pow(e,1/Mce);return 1e4*Math.pow(Math.max(0,t-rD)/(iD-nD*t),1/tD)}function vU(e){if(e<0)return 0;let t=Math.pow(e/1e4,tD);return Math.pow((rD+iD*t)/(1+nD*t),Mce)}var gU=e=>Math.max(e/Ace,0),f2t=({i:e,t,p:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=pU(e+.008609037037932761*t+.11102962500302593*r),a=pU(e-.00860903703793275*t-.11102962500302599*r),o=pU(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:gU(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*o),y:gU(.3647385209748074*n+.680566024947227*a-.0453045459220346*o),z:gU(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*o)};return i!==void 0&&(s.alpha=i),s},RU=f2t,mU=(e=0)=>Math.max(e*Ace,0),h2t=({x:e,y:t,z:r,alpha:i})=>{let n=mU(e),a=mU(t),o=mU(r),s=vU(.3592832590121217*n+.6976051147779502*a-.0358915932320289*o),l=vU(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*o),u=vU(.0070797844607477*n+.0748396662186366*a+.8433265453898765*o),c=.5*s+.5*l,f=1.61376953125*s-3.323486328125*l+1.709716796875*u,h=4.378173828125*s-4.24560546875*l-.132568359375*u,p={mode:"itp",i:c,t:f,p:h};return i!==void 0&&(p.alpha=i),p},zU=h2t,d2t={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:RU,rgb:e=>by(RU(e))},fromMode:{xyz65:zU,rgb:e=>zU(xy(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Gi,t:Gi,p:Gi,alpha:{use:Gi,fixup:Ru}}},Sce=d2t,p2t=134.03437499999998,v2t=16295499532821565e-27,yU=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,tD);return Math.pow((rD+iD*t)/(1+nD*t),p2t)},xU=(e=0)=>Math.max(e*203,0),g2t=({x:e,y:t,z:r,alpha:i})=>{e=xU(e),t=xU(t),r=xU(r);let n=1.15*e-.15*r,a=.66*t+.34*e,o=yU(.41478972*n+.579999*a+.014648*r),s=yU(-.20151*n+1.120649*a+.0531008*r),l=yU(-.0166008*n+.2648*a+.6684799*r),u=(o+s)/2,c={mode:"jab",j:.44*u/(1-.56*u)-v2t,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return i!==void 0&&(c.alpha=i),c},sV=g2t,m2t=134.03437499999998,que=16295499532821565e-27,bU=e=>{if(e<0)return 0;let t=Math.pow(e,1/m2t);return 1e4*Math.pow((rD-t)/(nD*t-iD),1/tD)},_U=e=>e/203,y2t=({j:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+que)/(.44+.56*(e+que)),a=bU(n+.13860504*t+.058047316*r),o=bU(n-.13860504*t-.058047316*r),s=bU(n-.096019242*t-.8118919*r),l={mode:"xyz65",x:_U(1.661373024652174*a-.914523081304348*o+.23136208173913045*s),y:_U(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s),z:_U(-.090982811*a-.31272829*o+1.5227666*s)};return i!==void 0&&(l.alpha=i),l},lV=y2t,x2t=e=>{let t=sV(xy(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},uV=x2t,b2t=e=>by(lV(e)),cV=b2t,_2t={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:uV,xyz65:sV},toMode:{rgb:cV,xyz65:lV},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Gi,a:Gi,b:Gi,alpha:{use:Gi,fixup:Ru}}},Ece=_2t,w2t=({j:e,a:t,b:r,alpha:i})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=ef(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(a.alpha=i),a},BU=w2t,T2t=({j:e,c:t,h:r,alpha:i})=>{r===void 0&&(r=0);let n={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return i!==void 0&&(n.alpha=i),n},qU=T2t,A2t={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:qU,rgb:e=>cV(qU(e))},fromMode:{rgb:e=>BU(uV(e)),jab:BU},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Gi,fixup:c1},c:Gi,j:Gi,alpha:{use:Gi,fixup:Ru}},difference:{h:rA},average:{h:f1}},kce=A2t,aD=Math.pow(29,3)/Math.pow(3,3),fV=Math.pow(6,3)/Math.pow(29,3),wU=e=>Math.pow(e,3)>fV?Math.pow(e,3):(116*e-16)/aD,M2t=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz50",x:wU(a)*Iu.X,y:wU(n)*Iu.Y,z:wU(o)*Iu.Z};return i!==void 0&&(s.alpha=i),s},oD=M2t,S2t=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Wx({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return i!==void 0&&(n.alpha=i),n},sw=S2t,E2t=e=>sw(oD(e)),hV=E2t,k2t=e=>{let{r:t,g:r,b:i,alpha:n}=$x(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*i,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*i,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*i};return n!==void 0&&(a.alpha=n),a},lw=k2t,TU=e=>e>fV?Math.cbrt(e):(aD*e+16)/116,C2t=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=TU(e/Iu.X),a=TU(t/Iu.Y),o=TU(r/Iu.Z),s={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-o)};return i!==void 0&&(s.alpha=i),s},sD=C2t,D2t=e=>{let t=sD(lw(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},dV=D2t;function F2t(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,i,n,a,o]=t;if(!(i.type===wi.Hue||n.type===wi.Hue||a.type===wi.Hue))return i.type!==wi.None&&(r.l=Math.min(Math.max(0,i.value),100)),n.type!==wi.None&&(r.a=n.type===wi.Number?n.value:n.value*125/100),a.type!==wi.None&&(r.b=a.type===wi.Number?a.value:a.value*125/100),o.type!==wi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===wi.Number?o.value:o.value/100))),r}var Cce=F2t,L2t={mode:"lab",toMode:{xyz50:oD,rgb:hV},fromMode:{xyz50:sD,rgb:dV},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Cce],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:Gi,a:Gi,b:Gi,alpha:{use:Gi,fixup:Ru}}},lD=L2t,P2t=da(fn({},lD),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tV,rgb:iA},fromMode:{xyz65:rV,rgb:nA},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),Dce=P2t;function I2t(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,i,n,a,o]=t;if(i.type!==wi.None){if(i.type===wi.Hue)return;r.l=Math.min(Math.max(0,i.value),100)}if(n.type!==wi.None&&(r.c=Math.max(0,n.type===wi.Number?n.value:n.value*150/100)),a.type!==wi.None){if(a.type===wi.Percentage)return;r.h=a.value}return o.type!==wi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===wi.Number?o.value:o.value/100))),r}var Fce=I2t,R2t={mode:"lch",toMode:{lab:Bg,rgb:e=>hV(Bg(e))},fromMode:{rgb:e=>zg(dV(e)),lab:zg},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Fce],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Gi,fixup:c1},c:Gi,l:Gi,alpha:{use:Gi,fixup:Ru}},difference:{h:rA},average:{h:f1}},uD=R2t,z2t=da(fn({},uD),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Bg(e,"lab65"),rgb:e=>iA(Bg(e,"lab65"))},fromMode:{rgb:e=>zg(nA(e),"lch65"),lab65:e=>zg(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Lce=z2t,B2t=({l:e,u:t,v:r,alpha:i})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=ef(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(a.alpha=i),a},pV=B2t,q2t=({l:e,c:t,h:r,alpha:i})=>{r===void 0&&(r=0);let n={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return i!==void 0&&(n.alpha=i),n},vV=q2t,Pce=(e,t,r)=>4*e/(e+15*t+3*r),Ice=(e,t,r)=>9*t/(e+15*t+3*r),O2t=Pce(Iu.X,Iu.Y,Iu.Z),N2t=Ice(Iu.X,Iu.Y,Iu.Z),U2t=e=>e<=fV?aD*e:116*Math.cbrt(e)-16,V2t=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=U2t(t/Iu.Y),a=Pce(e,t,r),o=Ice(e,t,r);!isFinite(a)||!isFinite(o)?n=a=o=0:(a=13*n*(a-O2t),o=13*n*(o-N2t));let s={mode:"luv",l:n,u:a,v:o};return i!==void 0&&(s.alpha=i),s},K8=V2t,G2t=(e,t,r)=>4*e/(e+15*t+3*r),H2t=(e,t,r)=>9*t/(e+15*t+3*r),j2t=G2t(Iu.X,Iu.Y,Iu.Z),$2t=H2t(Iu.X,Iu.Y,Iu.Z),W2t=({l:e,u:t,v:r,alpha:i})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let n=t/(13*e)+j2t,a=r/(13*e)+$2t,o=Iu.Y*(e<=8?e/aD:Math.pow((e+16)/116,3)),s=o*(9*n)/(4*a),l=o*(12-3*n-20*a)/(4*a),u={mode:"xyz50",x:s,y:o,z:l};return i!==void 0&&(u.alpha=i),u},J8=W2t,Y2t=e=>pV(K8(lw(e))),X2t=e=>sw(J8(vV(e))),Z2t={mode:"lchuv",toMode:{luv:vV,rgb:X2t},fromMode:{rgb:Y2t,luv:pV},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Gi,fixup:c1},c:Gi,l:Gi,alpha:{use:Gi,fixup:Ru}},difference:{h:rA},average:{h:f1}},Rce=Z2t,K2t=da(fn({},jx),{mode:"lrgb",toMode:{rgb:Wx},fromMode:{rgb:$x},parse:["srgb-linear"],serialize:"srgb-linear"}),zce=K2t,J2t={mode:"luv",toMode:{xyz50:J8,rgb:e=>sw(J8(e))},fromMode:{xyz50:K8,rgb:e=>K8(lw(e))},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:Gi,u:Gi,v:Gi,alpha:{use:Gi,fixup:Ru}}},Bce=J2t,Q2t=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*n-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*n+.7827717124575296*a-.8086757549230774*o};return i!==void 0&&(s.alpha=i),s},gV=Q2t,ext=e=>{let t=gV($x(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},aA=ext,txt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*n+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*n-.7034186179359362*a+1.7076146940746117*o};return i!==void 0&&(s.alpha=i),s},uw=txt,rxt=e=>Wx(uw(e)),oA=rxt;function OU(e){let i=1.170873786407767;return .5*(i*e-.206+Math.sqrt((i*e-.206)*(i*e-.206)+4*.03*i*e))}function Q8(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function ixt(e,t){let r,i,n,a,o,s,l,u;-1.88170328*e-.80936493*t>1?(r=1.19086277,i=1.76576728,n=.59662641,a=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,i=-.45954404,n=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,i=-.00915799,n=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,u=1.707614701);let c=r+i*e+n*t+a*e*e+o*e*t,f=.3963377774*e+.2158037573*t,h=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t;{let d=1+c*f,v=1+c*h,m=1+c*p,g=d*d*d,w=v*v*v,_=m*m*m,b=3*f*d*d,M=3*h*v*v,x=3*p*m*m,A=6*f*f*d,T=6*h*h*v,y=6*p*p*m,E=s*g+l*w+u*_,S=s*b+l*M+u*x,C=s*A+l*T+u*y;c=c-E*S/(S*S-.5*E*C)}return c}function mV(e,t){let r=ixt(e,t),i=uw({l:1,a:r*e,b:r*t}),n=Math.cbrt(1/Math.max(i.r,i.g,i.b)),a=n*r;return[n,a]}function nxt(e,t,r,i,n,a=null){a||(a=mV(e,t));let o;if((r-n)*a[1]-(a[0]-n)*i<=0)o=a[1]*n/(i*a[0]+a[1]*(n-r));else{o=a[1]*(n-1)/(i*(a[0]-1)+a[1]*(n-r));{let s=r-n,l=i,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,h=s+l*u,p=s+l*c,d=s+l*f;{let v=n*(1-o)+o*r,m=o*i,g=v+m*u,w=v+m*c,_=v+m*f,b=g*g*g,M=w*w*w,x=_*_*_,A=3*h*g*g,T=3*p*w*w,y=3*d*_*_,E=6*h*h*g,S=6*p*p*w,C=6*d*d*_,k=4.0767416621*b-3.3077115913*M+.2309699292*x-1,D=4.0767416621*A-3.3077115913*T+.2309699292*y,F=4.0767416621*E-3.3077115913*S+.2309699292*C,P=D/(D*D-.5*k*F),R=-k*P,L=-1.2684380046*b+2.6097574011*M-.3413193965*x-1,I=-1.2684380046*A+2.6097574011*T-.3413193965*y,B=-1.2684380046*E+2.6097574011*S-.3413193965*C,O=I/(I*I-.5*L*B),$=-L*O,X=-.0041960863*b-.7034186147*M+1.707614701*x-1,K=-.0041960863*A-.7034186147*T+1.707614701*y,G=-.0041960863*E-.7034186147*S+1.707614701*C,q=K/(K*K-.5*X*G),J=-X*q;R=P>=0?R:1e6,$=O>=0?$:1e6,J=q>=0?J:1e6,o+=Math.min(R,Math.min($,J))}}}return o}function yV(e,t,r=null){r||(r=mV(e,t));let i=r[0],n=r[1];return[n/i,n/(1-i)]}function qce(e,t,r){let i=mV(t,r),n=nxt(t,r,e,1,e,i),a=yV(t,r,i),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=n/Math.min(e*a[0],(1-e)*a[1]),u=e*o,c=(1-e)*s,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),f,n]}function NU(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,n={mode:"okhsl",l:OU(t)};e.alpha!==void 0&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+i*i);if(!a)return n.s=0,n;let[o,s,l]=qce(t,r/a,i/a),u;if(aNU(aA(e))},toMode:{oklab:UU,rgb:e=>oA(UU(e))}}),Oce=axt;function VU(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,n=Math.sqrt(r*r+i*i),a=n?r/n:1,o=n?i/n:1,[s,l]=yV(a,o),u=.5,c=1-u/s,f=l/(n+t*l),h=f*t,p=f*n,d=Q8(h),v=p*d/h,m=uw({l:d,a:a*v,b:o*v}),g=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));t=t/g,n=n/g*OU(t)/t,t=OU(t);let w={mode:"okhsv",s:n?(u+l)*p/(l*u+l*c*p):0,v:t?t/h:0};return w.s&&(w.h=ef(Math.atan2(i,r)*180/Math.PI)),e.alpha!==void 0&&(w.alpha=e.alpha),w}function GU(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,i=e.s!==void 0?e.s:0,n=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=yV(a,o),u=.5,c=1-u/s,f=1-i*u/(u+l-l*c*i),h=i*l*u/(u+l-l*c*i),p=Q8(f),d=h*p/f,v=uw({l:p,a:a*d,b:o*d}),m=Math.cbrt(1/Math.max(v.r,v.g,v.b,0)),g=Q8(n*f),w=h*g/f;return t.l=g*m,t.a=w*a*m,t.b=w*o*m,t}var oxt=da(fn({},oV),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:VU,rgb:e=>VU(aA(e))},toMode:{oklab:GU,rgb:e=>oA(GU(e))}}),Nce=oxt;function sxt(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,i,n,a,o]=t;if(!(i.type===wi.Hue||n.type===wi.Hue||a.type===wi.Hue))return i.type!==wi.None&&(r.l=Math.min(Math.max(0,i.type===wi.Number?i.value:i.value/100),1)),n.type!==wi.None&&(r.a=n.type===wi.Number?n.value:n.value*.4/100),a.type!==wi.None&&(r.b=a.type===wi.Number?a.value:a.value*.4/100),o.type!==wi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===wi.Number?o.value:o.value/100))),r}var Uce=sxt,lxt=da(fn({},lD),{mode:"oklab",toMode:{lrgb:uw,rgb:oA},fromMode:{lrgb:gV,rgb:aA},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Uce],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),Vce=lxt;function uxt(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,i,n,a,o]=t;if(i.type!==wi.None){if(i.type===wi.Hue)return;r.l=Math.min(Math.max(0,i.type===wi.Number?i.value:i.value/100),1)}if(n.type!==wi.None&&(r.c=Math.max(0,n.type===wi.Number?n.value:n.value*.4/100)),a.type!==wi.None){if(a.type===wi.Percentage)return;r.h=a.value}return o.type!==wi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===wi.Number?o.value:o.value/100))),r}var Gce=uxt,cxt=da(fn({},uD),{mode:"oklch",toMode:{oklab:e=>Bg(e,"oklab"),rgb:e=>oA(Bg(e,"oklab"))},fromMode:{rgb:e=>zg(aA(e),"oklch"),oklab:e=>zg(e,"oklch")},parse:[Gce],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Hce=cxt,fxt=e=>{let{r:t,g:r,b:i,alpha:n}=$x(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*i,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*i,z:0*t+.0451133818589026*r+1.043944368900976*i};return n!==void 0&&(a.alpha=n),a},HU=fxt,hxt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Wx({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return i!==void 0&&(n.alpha=i),n},jU=hxt,dxt=da(fn({},jx),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>jU(xy(e)),xyz65:jU},toMode:{rgb:e=>by(HU(e)),xyz65:HU}}),jce=dxt,AU=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},pxt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"prophoto",r:AU(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:AU(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:AU(e*0+t*0+1.2119675456389452*r)};return i!==void 0&&(n.alpha=i),n},$U=pxt,MU=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},vxt=e=>{let t=MU(e.r),r=MU(e.g),i=MU(e.b),n={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*i,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*i,z:0*t+0*r+.8251046025104602*i};return e.alpha!==void 0&&(n.alpha=e.alpha),n},WU=vxt,gxt=da(fn({},jx),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:$U,rgb:e=>$U(lw(e))},toMode:{xyz50:WU,rgb:e=>sw(WU(e))}}),$ce=gxt,Oue=1.09929682680944,mxt=.018053968510807,SU=e=>{let t=Math.abs(e);return t>mxt?(Math.sign(e)||1)*(Oue*Math.pow(t,.45)-(Oue-1)):4.5*e},yxt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rec2020",r:SU(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:SU(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:SU(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return i!==void 0&&(n.alpha=i),n},YU=yxt,Nue=1.09929682680944,xxt=.018053968510807,EU=(e=0)=>{let t=Math.abs(e);return t{let t=EU(e.r),r=EU(e.g),i=EU(e.b),n={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*i,y:.262700212011267*t+.6779980715188708*r+.059301716469862*i,z:0*t+.0280726930490874*r+1.0609850577107909*i};return e.alpha!==void 0&&(n.alpha=e.alpha),n},XU=bxt,_xt=da(fn({},jx),{mode:"rec2020",fromMode:{xyz65:YU,rgb:e=>YU(xy(e))},toMode:{xyz65:XU,rgb:e=>by(XU(e))},parse:["rec2020"],serialize:"rec2020"}),Wce=_xt,Gx=.0037930732552754493,Yce=Math.cbrt(Gx),kU=e=>Math.cbrt(e)-Yce,wxt=e=>{let{r:t,g:r,b:i,alpha:n}=$x(e),a=kU(.3*t+.622*r+.078*i+Gx),o=kU(.23*t+.692*r+.078*i+Gx),s=kU(.2434226892454782*t+.2047674442449682*r+.5518098665095535*i+Gx),l={mode:"xyb",x:(a-o)/2,y:(a+o)/2,b:s-(a+o)/2};return n!==void 0&&(l.alpha=n),l},Xce=wxt,CU=e=>Math.pow(e+Yce,3),Txt=({x:e,y:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=CU(e+t)-Gx,a=CU(t-e)-Gx,o=CU(r+t)-Gx,s=Wx({r:11.031566904639861*n-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*n+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*n+2.7129230459360922*a+1.9459282407775895*o});return i!==void 0&&(s.alpha=i),s},Zce=Txt,Axt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Zce},fromMode:{rgb:Xce},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Gi,y:Gi,b:Gi,alpha:{use:Gi,fixup:Ru}}},Kce=Axt,Mxt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:sw,lab:sD},fromMode:{rgb:lw,lab:oD},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Gi,y:Gi,z:Gi,alpha:{use:Gi,fixup:Ru}}},Jce=Mxt,Sxt=e=>{let{x:t,y:r,z:i,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),i===void 0&&(i=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*i,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*i,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*i};return n!==void 0&&(a.alpha=n),a},Qce=Sxt,Ext=e=>{let{x:t,y:r,z:i,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),i===void 0&&(i=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*i,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*i,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*i};return n!==void 0&&(a.alpha=n),a},efe=Ext,kxt={mode:"xyz65",toMode:{rgb:by,xyz50:Qce},fromMode:{rgb:xy,xyz50:efe},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:Gi,y:Gi,z:Gi,alpha:{use:Gi,fixup:Ru}}},tfe=kxt,Cxt=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return i!==void 0&&(n.alpha=i),n},rfe=Cxt,Dxt=({y:e,i:t,q:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return i!==void 0&&(n.alpha=i),n},ife=Dxt,Fxt={mode:"yiq",toMode:{rgb:ife},fromMode:{rgb:rfe},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Gi,i:Gi,q:Gi,alpha:{use:Gi,fixup:Ru}}},nfe=Fxt,Lxt=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Pxt=(e=4)=>t=>typeof t=="number"?Lxt(t,e):t,afe=Pxt,K6=afe(2),Q6=e=>Math.max(0,Math.min(1,e||0)),Hx=e=>Math.round(Q6(e)*255),xV=_s("rgb"),Ixt=_s("hsl"),bV=e=>{if(e===void 0)return;let t=Hx(e.r),r=Hx(e.g),i=Hx(e.b);return"#"+(1<<24|t<<16|r<<8|i).toString(16).slice(1)},ofe=e=>{if(e===void 0)return;let t=Hx(e.alpha!==void 0?e.alpha:1);return bV(e)+(256|t).toString(16).slice(1)},sfe=e=>{if(e===void 0)return;let t=Hx(e.r),r=Hx(e.g),i=Hx(e.b);return e.alpha===void 0||e.alpha===1?`rgb(${t}, ${r}, ${i})`:`rgba(${t}, ${r}, ${i}, ${K6(Q6(e.alpha))})`},lfe=e=>{if(e===void 0)return;let t=K6(e.h||0),r=K6(Q6(e.s)*100)+"%",i=K6(Q6(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${r}, ${i})`:`hsla(${t}, ${r}, ${i}, ${K6(Q6(e.alpha))})`},Rxt=e=>{let t=Vp(e);if(!t)return;let r=Tf(t.mode);if(!r.serialize||typeof r.serialize=="string"){let i=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((n,a)=>{n!=="alpha"&&(i+=(a?" ":"")+(t[n]!==void 0?t[n]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(i+=` / ${t.alpha}`),i+")"}if(typeof r.serialize=="function")return r.serialize(t)},zxt=e=>bV(xV(e)),Bxt=e=>ofe(xV(e)),qxt=e=>sfe(xV(e)),Oxt=e=>lfe(Ixt(e)),Nxt={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?e*2*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?t*2*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>e===0?0:t===1?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>e===1?1:t===0?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},Uxt=(e,t="normal",r="rgb")=>{let i=typeof t=="function"?t:Nxt[t],n=_s(r),a=Tf(r).channels;return e.map(s=>{let l=n(s);return l.alpha===void 0&&(l.alpha=1),l}).reduce((s,l)=>{if(s===void 0)return l;let u=l.alpha+s.alpha*(1-l.alpha);return a.reduce((c,f)=>(f!=="alpha"&&(u===0?c[f]=0:(c[f]=l.alpha*(1-s.alpha)*l[f]+l.alpha*s.alpha*i(s[f],l[f])+(1-l.alpha)*s.alpha*s[f],c[f]=Math.max(0,Math.min(1,c[f]/u)))),c),{mode:r,alpha:u})})},Vxt=Uxt,Gxt=([e,t])=>e+Math.random()*(t-e),Hxt=e=>Object.keys(e).reduce((t,r)=>{let i=e[r];return t[r]=Array.isArray(i)?i:[i,i],t},{}),jxt=(e="rgb",t={})=>{let r=Tf(e),i=Hxt(t);return r.channels.reduce((n,a)=>((i.alpha||a!=="alpha")&&(n[a]=Gxt(i[a]||r.ranges[a])),n),{mode:e})},$xt=jxt,sA=(e,t="rgb",r=!1)=>{let i=t?Tf(t).channels:null,n=t?_s(t):Vp;return a=>{let o=n(a);if(!o)return;let s=(i||Tf(o.mode).channels).reduce((u,c)=>{let f=e(o[c],c,o,t);return f!==void 0&&!isNaN(f)&&(u[c]=f),u},{mode:o.mode});if(!r)return s;let l=Vp(a);return l&&l.mode!==s.mode?_s(l.mode)(s):s}},ufe=(e,t,r)=>t!=="alpha"?(e||0)*(r.alpha!==void 0?r.alpha:1):e,cfe=(e,t,r)=>t!=="alpha"&&r.alpha!==0?(e||0)/(r.alpha!==void 0?r.alpha:1):e,_V=(e=1,t=0)=>(r,i)=>i!=="alpha"?r*e+t:r,Wxt=(e=1,t=1,r=0)=>(i,n)=>n!=="alpha"?e*Math.pow(i,t)+r:i,Yxt=e=>{e[0]===void 0&&(e[0]=0),e[e.length-1]===void 0&&(e[e.length-1]=1);let t=1,r,i,n,a;for(;tt=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),ffe=Zxt,G8=e=>typeof e=="function",Ux=e=>e&&typeof e=="object",Uue=e=>typeof e=="number",hfe=(e,t="rgb",r,i)=>{let n=Tf(t),a=_s(t),o=[],s=[],l={};e.forEach(h=>{Array.isArray(h)?(o.push(a(h[0])),s.push(h[1])):Uue(h)||G8(h)?l[s.length]=h:(o.push(a(h)),s.push(void 0))}),Xxt(s);let u=n.channels.reduce((h,p)=>{let d;return Ux(r)&&Ux(r[p])&&r[p].fixup?d=r[p].fixup:Ux(n.interpolate[p])&&n.interpolate[p].fixup?d=n.interpolate[p].fixup:d=v=>v,h[p]=d(o.map(v=>v[p])),h},{});if(i){let h=o.map((p,d)=>n.channels.reduce((v,m)=>(v[m]=u[m][d],v),{mode:t}));u=n.channels.reduce((p,d)=>(p[d]=h.map(v=>{let m=i(v[d],d,v,t);return isNaN(m)?void 0:m}),p),{})}let c=n.channels.reduce((h,p)=>{let d;return G8(r)?d=r:Ux(r)&&G8(r[p])?d=r[p]:Ux(r)&&Ux(r[p])&&r[p].use?d=r[p].use:G8(n.interpolate[p])?d=n.interpolate[p]:Ux(n.interpolate[p])&&(d=n.interpolate[p].use),h[p]=d(u[p]),h},{}),f=o.length-1;return h=>{if(h=Math.min(Math.max(0,h),1),h<=s[0])return o[0];if(h>s[f])return o[f];let p=0;for(;s[p]{let M=c[b](w);return M!==void 0&&(_[b]=M),_},{mode:t})}},Kxt=(e,t="rgb",r)=>hfe(e,t,r),dfe=(e,t)=>(r,i="rgb",n)=>{let a=t?sA(t,i):void 0,o=hfe(r,i,n,e);return a?s=>a(o(s)):o},Jxt=dfe(ufe,cfe),H8=(e,t)=>(e+t)%t,pfe=(e,t,r,i,n)=>{let a=n*n,o=a*n;return((1-3*n+3*a-o)*e+(4-6*a+3*o)*t+(1+3*n+3*a-3*o)*r+o*i)/6},vfe=e=>t=>{let r=e.length-1,i=t>=1?r-1:Math.max(0,Math.floor(t*r));return pfe(i>0?e[i-1]:2*e[i]-e[i+1],e[i],e[i+1],it=>{let r=e.length-1,i=Math.floor(t*r);return pfe(e[H8(i-1,e.length)],e[H8(i,e.length)],e[H8(i+1,e.length)],e[H8(i+2,e.length)],(t-i/r)*r)},mfe=e=>{let t,r=e.length-1,i=new Array(r),n=new Array(r),a=new Array(r);for(i[1]=1/4,n[1]=(6*e[1]-e[0])/4,t=2;t0&&(a[r-1]=n[r-1]),t=r-2;t>0;--t)a[t]=n[t]-i[t]*a[t+1];return a},Qxt=e=>vfe(mfe(e)),ebt=e=>gfe(mfe(e)),rw=Math.sign,ZU=Math.min,x0=Math.abs,wV=e=>{let t=e.length-1,r=[],i=[],n=[];for(let a=0;a0?.5*(e[a+1]-e[a-1])*t:void 0),n.push(a>0?(rw(r[a-1])+rw(r[a]))*ZU(x0(r[a-1]),x0(r[a]),.5*x0(i[a])):void 0);return[r,i,n]},TV=(e,t,r)=>{let i=e.length-1,n=i*i;return a=>{let o;a>=1?o=i-1:o=Math.max(0,Math.floor(a*i));let s=a-o/i,l=s*s,u=l*s;return(t[o]+t[o+1]-2*r[o])*n*u+(3*r[o]-2*t[o]-t[o+1])*i*l+t[o]*s+e[o]}},tbt=e=>{if(e.length<3)return Gi(e);let t=e.length-1,[r,,i]=wV(e);return i[0]=r[0],i[t]=r[t-1],TV(e,i,r)},rbt=e=>{if(e.length<3)return Gi(e);let t=e.length-1,[r,i,n]=wV(e);return i[0]=(e[1]*2-e[0]*1.5-e[2]*.5)*t,i[t]=(e[t]*1.5-e[t-1]*2+e[t-2]*.5)*t,n[0]=i[0]*r[0]<=0?0:x0(i[0])>2*x0(r[0])?2*r[0]:i[0],n[t]=i[t]*r[t-1]<=0?0:x0(i[t])>2*x0(r[t-1])?2*r[t-1]:i[t],TV(e,n,r)},ibt=e=>{let t=e.length-1,[r,i,n]=wV(e);i[0]=.5*(e[1]-e[t])*t,i[t]=.5*(e[0]-e[t-1])*t;let a=(e[0]-e[t])*t,o=a;return n[0]=(rw(a)+rw(r[0]))*ZU(x0(a),x0(r[0]),.5*x0(i[0])),n[t]=(rw(r[t-1])+rw(o))*ZU(x0(r[t-1]),x0(o),.5*x0(i[t])),TV(e,n,r)},nbt=(e=1)=>e===1?t=>t:t=>Math.pow(t,e),yfe=nbt,abt=(e=2,t=1)=>{let r=yfe(t);if(e<2)return e<1?[]:[r(.5)];let i=[];for(let n=0;n{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},_fe=e=>bfe(xfe(e)),wfe=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function AV(e){return wfe(xfe(e))}function cD(e="rgb"){let{gamut:t}=Tf(e);if(!t)return i=>!0;let r=_s(typeof t=="string"?t:e);return i=>wfe(r(i))}function sbt(e){return e=Vp(e),e===void 0||AV(e)?e:_s(e.mode)(_fe(e))}function MV(e="rgb"){let{gamut:t}=Tf(e);if(!t)return a=>Vp(a);let r=typeof t=="string"?t:e,i=_s(r),n=cD(r);return a=>{let o=Vp(a);if(!o)return;let s=i(o);if(n(s))return o;let l=bfe(s);return o.mode===l.mode?l:_s(o.mode)(l)}}function lbt(e,t="lch",r="rgb"){e=Vp(e);let i=r==="rgb"?AV:cD(r),n=r==="rgb"?_fe:MV(r);if(e===void 0||i(e))return e;let a=_s(e.mode);e=_s(t)(e);let o=da(fn({},e),{c:0});if(!i(o))return a(n(o));let s=0,l=e.c!==void 0?e.c:0,u=Tf(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=o.c;for(;l-s>c;)o.c=s+(l-s)*.5,i(o)?(f=o.c,s=o.c):l=o.c;return a(i(o)?o:da(fn({},o),{c:f}))}function ubt(e="rgb",t="oklch",r=ow("oklch"),i=.02){let n=_s(e),a=Tf(e);if(!a.gamut)return c=>n(c);let o=cD(e),s=MV(e),l=_s(t),{ranges:u}=Tf(t);if(!u.l||!u.c)throw new Error("LCH-like space expected");return c=>{if(c=Vp(c),c===void 0)return;let f=fn({},l(c));if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=u.l[1]){let m=da(fn({},a.white),{mode:e});return c.alpha!==void 0&&(m.alpha=c.alpha),m}if(f.l<=u.l[0]){let m=da(fn({},a.black),{mode:e});return c.alpha!==void 0&&(m.alpha=c.alpha),m}if(o(f))return n(f);let h=0,p=f.c,d=(u.c[1]-u.c[0])/4e3,v=s(f);for(;p-h>d;)f.c=(h+p)*.5,v=s(f),o(f)||r&&i>0&&r(f,v)<=i?h=f.c:p=f.c;return n(o(f)?f:v)}}var cbt=(e,t=ow(),r=i=>i)=>{let i=e.map((n,a)=>({color:r(n),i:a}));return(n,a=1,o=1/0)=>(isFinite(a)&&(a=Math.max(1,Math.min(a,i.length-1))),i.forEach(s=>{s.d=t(n,s.color)}),i.sort((s,l)=>s.d-l.d).slice(0,a).filter(s=>s.de[s.i]))},fbt=cbt,SV=e=>Math.max(e,0),EV=e=>Math.max(Math.min(e,1),0),hbt=(e,t,r)=>e===void 0||t===void 0?void 0:e+r*(t-e),dbt=e=>{let t=1-EV(e);return[.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1]},pbt=e=>{let t=SV(e);return[.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1]},vbt=e=>{let t=1-EV(e);return[.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1]},gbt=e=>{let t=Math.PI*e/180,r=Math.cos(t),i=Math.sin(t);return[.213+r*.787-i*.213,.715-r*.715-i*.715,.072-r*.072+i*.928,0,.213-r*.213+i*.143,.715+r*.285+i*.14,.072-r*.072-i*.283,0,.213-r*.213-i*.787,.715-r*.715+i*.715,.072+r*.928+i*.072,0,0,0,0,1]},fD=(e,t,r=!1)=>{let i=_s(t),n=Tf(t).channels;return a=>{let o=i(a);if(!o)return;let s={mode:t},l,u=n.length;for(let f=0;f{let r=SV(e);return sA(_V(r),t,!0)},ybt=(e=1,t="rgb")=>{let r=SV(e);return sA(_V(r,(1-r)/2),t,!0)},xbt=(e=1,t="rgb")=>fD(dbt(e),t,!0),bbt=(e=1,t="rgb")=>fD(pbt(e),t,!0),_bt=(e=1,t="rgb")=>fD(vbt(e),t,!0),wbt=(e=1,t="rgb")=>{let r=EV(e);return sA((i,n)=>n==="alpha"?i:hbt(r,1-r,i),t,!0)},Tbt=(e=0,t="rgb")=>fD(gbt(e),t,!0),Abt=_s("rgb"),Mbt=[[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]],Sbt=[[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]],Ebt=[[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]],kV=(e,t)=>{let r=Math.max(0,Math.min(1,t)),i=Math.round(r/.1),n=Math.round(r%.1),a=e[i];if(n>0&&iVx(a[l],o[l],n))}return o=>{let s=Vp(o);if(s===void 0)return;let{r:l,g:u,b:c}=Abt(s),f={mode:"rgb",r:a[0]*l+a[1]*u+a[2]*c,g:a[3]*l+a[4]*u+a[5]*c,b:a[6]*l+a[7]*u+a[8]*c};return s.alpha!==void 0&&(f.alpha=s.alpha),_s(s.mode)(f)}},kbt=(e=1)=>kV(Mbt,e),Cbt=(e=1)=>kV(Sbt,e),Dbt=(e=1)=>kV(Ebt,e),Fbt=e=>e*e*(3-2*e),Lbt=e=>.5-Math.sin(Math.asin(1-2*e)/3),Pbt=e=>e*e*e*(e*(e*6-15)+10),Ibt=Pbt,Rbt=e=>(1-Math.cos(e*Math.PI))/2,zbt=Rbt;function KU(e){let t=_s("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Bbt(e,t){let r=KU(e),i=KU(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}var qbt=$o(tce),Obt=$o(oce),Nbt=$o(fce),Ubt=$o(hce),Vbt=$o(vce),Gbt=$o(iV),Hbt=$o(oV),jbt=$o(Tce),$bt=$o(Sce),Wbt=$o(Ece),Ybt=$o(kce),Xbt=$o(lD),Zbt=$o(Dce),Kbt=$o(uD),Jbt=$o(Lce),Qbt=$o(Rce),e_t=$o(zce),t_t=$o(Bce),r_t=$o(Oce),i_t=$o(Nce),n_t=$o(Vce),a_t=$o(Hce),o_t=$o(jce),s_t=$o($ce),l_t=$o(Wce),u_t=$o(jx),c_t=$o(Kce),f_t=$o(Jce),h_t=$o(tfe),d_t=$o(nfe)});var CV={};Jn(CV,{default:()=>v_t});var p_t,v_t,DV=Ci(()=>{"use strict";p_t={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}},v_t=p_t});var _y=W((eBr,Cfe)=>{"use strict";var{format:g_t,width:m_t,height:y_t,scale:x_t}=(DV(),Pt(CV)).default,Mfe=x_t,{dflt:Qzr}=Mfe,b_t=F8(Mfe,["dflt"]),Sfe={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:500,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:{format:g_t,filename:{valType:"string"},width:m_t,height:y_t,scale:b_t},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:{}}},Efe={};function kfe(e,t){for(let r in e){let i=e[r];typeof i!="object"||i===null||(i.valType?"dflt"in i&&(t[r]=i.dflt):(t[r]||(t[r]={}),kfe(i,t[r])))}}kfe(Sfe,Efe);Cfe.exports={configAttributes:Sfe,dfltConfig:Efe}});var LV=W((rBr,Dfe)=>{"use strict";var FV=gi(),__t=hn(),lA=[];Dfe.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||lA.indexOf(e)!==-1)return;lA.push(e);var i=1e3;__t(t)?i=t:t==="long"&&(i=3e3);var n=FV.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var a=n.selectAll(".notifier-note").data(lA);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=lA.indexOf(u);c!==-1&&lA.splice(c,1),FV.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=FV.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),h=0;h{"use strict";var cw=_y().dfltConfig,PV=LV(),IV=Ffe.exports={};IV.log=function(){var e;if(cw.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};IV.warn=function(){var e;if(cw.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};IV.error=function(){var e;if(cw.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var Yl=W(Yx=>{"use strict";Yx.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Yx.defaultLine="#444";Yx.lightLine="#eee";Yx.background="#fff";Yx.borderLine="#BEC8D9";Yx.lightFraction=1e3/11});var ti=W((aBr,Nfe)=>{"use strict";var{converter:Lfe,formatHex:w_t,formatRgb:T_t,wcagContrast:A_t,wcagLuminance:M_t}=Afe(),{isArrayOrTypedArray:Pfe}=Tc(),{warn:S_t}=qg(),{background:cA,defaultLine:BV,defaults:E_t,lightLine:k_t}=Yl(),Ife=Lfe("rgb"),C_t=Lfe("hsl"),Rfe=e=>{if(typeof e!="string")return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return Ife(t)}catch(r){return}},Af=e=>e>0?e>1?1:e:0,D_t={mode:"rgb",r:0,g:0,b:0,alpha:1},RV=e=>Math.round(e*255e6)/255e6,zfe=e=>da(fn({},e),{r:RV(e.r),g:RV(e.g),b:RV(e.b)}),b0=e=>T_t(zfe(e)),F_t=e=>w_t(zfe(e)),L_t=e=>{var t,r,i,n;return typeof e=="string"?`"${e}"`:Pfe(e)?`${(r=(t=e.constructor)==null?void 0:t.name)!=null?r:"Array"}(${e.length})`:typeof e=="object"?(n=(i=e.constructor)==null?void 0:i.name)!=null?n:"Object":`${typeof e} ${e}`},al=(e,t)=>{var i;let r=Rfe(e);return r?((i=r.alpha)!=null||(r.alpha=1),r):(!t&&e!=null&&S_t(`Invalid color specifier: ${L_t(e)}. Defaulting to "#000"`),D_t)},uA=e=>b0(da(fn({},al(e)),{alpha:1})),P_t=e=>e?al(e).alpha:0,Bfe=e=>Pfe(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),I_t=e=>{let[t,r,i,n]=e,a=Math.max(t,r,i)>1?1/255:1,o=n!=null?n:1;return{mode:"rgb",r:t*a,g:r*a,b:i*a,alpha:o>1?o/255:o}},R_t=(e,t)=>{let r=Bfe(e)?I_t(e):al(e,!0),i=[Af(r.r),Af(r.g),Af(r.b),Af(r.alpha)];return t==="uint8"||t==="uint8_clamped"?Uint8Array.from(i,n=>Math.round(n*255)):t==="float32"?Float32Array.from(i):t==="float64"?Float64Array.from(i):i},z_t=(e,t)=>b0(da(fn({},al(e)),{alpha:Af(t)})),qfe=(e,t)=>{let r=al(e),i=r.alpha;if(i===1)return b0(r);let n=al(t||cA),a=n.alpha,o=(s,l)=>(a===1?l:1-a+l*a)*(1-i)+s*i;return b0({mode:"rgb",r:o(r.r,n.r),g:o(r.g,n.g),b:o(r.b,n.b)})},B_t=(e,t,r)=>{let i=al(e),n=al(t),a=(o,s)=>r*o+(1-r)*s;return b0({mode:"rgb",r:a(i.r,n.r),g:a(i.g,n.g),b:a(i.b,n.b)})},zV=(e,t)=>{let r=al(e),i=C_t(r)||{mode:"hsl",h:0,s:0,l:0};return b0(Ife(da(fn({},i),{l:Af((i.l*100+t)/100),alpha:r.alpha})))},hD=(e,t)=>A_t(al(e),al(t)),Ofe=e=>hD(e,cA)>hD(e,BV),q_t=b0(al(cA)),O_t=b0(al(BV)),N_t=(e,t,r)=>(al(e).alpha!==1&&(e=qfe(e,cA)),Ofe(e)?t?zV(e,t):q_t:r?zV(e,-r):O_t),U_t=(e,t)=>{e.style({stroke:uA(t),"stroke-opacity":al(t).alpha})},V_t=(e,t)=>{e.style({fill:uA(t),"fill-opacity":al(t).alpha})},G_t=(e,t)=>!!(e&&t&&uA(e)===uA(t)),H_t=e=>Rfe(e)!==void 0,j_t=(e,t)=>{t=t===0?0:t||10;let r=al(e),i=t/100;return b0(da(fn({},r),{r:Af(r.r+i),g:Af(r.g+i),b:Af(r.b+i)}))},$_t=(e,t,r)=>{let i=al(e),n=al(t),a=r/100,o=n.alpha-i.alpha,s=2*a-1,l=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-l,c=(f,h)=>u*f+l*h;return b0({mode:"rgb",r:c(i.r,n.r),g:c(i.g,n.g),b:c(i.b,n.b),alpha:i.alpha*(1-a)+n.alpha*a})},W_t=(e,t=["#000","#fff"])=>{let r,i=-1/0;for(let n of t){let a=hD(e,n);a>i&&(i=a,r=b0(al(n)))}return r},Y_t=e=>b0(al(e)),X_t=e=>F_t(al(e)).toUpperCase(),Z_t=e=>{let t=al(e);return[Af(t.r)*255,Af(t.g)*255,Af(t.b)*255,Af(t.alpha)]},K_t=([e,t,r,i])=>b0({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:i}),J_t=e=>{let t=al(e);return M_t({mode:"rgb",r:Af(t.r),g:Af(t.g),b:Af(t.b)})};Nfe.exports={addOpacity:z_t,adjustLightness:zV,background:cA,brighten:j_t,combine:qfe,contrast:N_t,defaultLine:BV,defaults:E_t,equals:G_t,fill:V_t,hexString:X_t,interpolate:B_t,isChannelArray:Bfe,isDark:Ofe,isValid:H_t,lightLine:k_t,luminosity:J_t,mix:$_t,mostReadable:W_t,normalize:R_t,opacity:P_t,parse:al,rgb:uA,rgbaArray:Z_t,rgbaArrayToString:K_t,rgbaString:Y_t,stroke:U_t,wcagContrast:hD}});var Xx=W((sBr,Gfe)=>{"use strict";var Q_t=ti(),dD={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)"]]},Ufe=dD.RdBu;function e3t(e,t){if(t||(t=Ufe),!e)return t;function r(){try{e=dD[e]||JSON.parse(e)}catch(i){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Vfe(e)?e:t}function Vfe(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;rn3t,HIDE_PLACEHOLDER:()=>i3t,SHOW_PLACEHOLDER:()=>r3t});var r3t,i3t,n3t,Ng=Ci(()=>{"use strict";r3t=100,i3t=1e3,n3t=.2});var fA={};Jn(fA,{counter:()=>Zx});function Zx(e,t="",r,i){let n=t+(r?"":"$"),a=i===!1?"":"^";return e==="xy"?new RegExp(a+"x"+qV+"y"+qV+n):new RegExp(a+e+qV+n)}var qV,fw=Ci(()=>{"use strict";qV="([2-9]|[1-9][0-9]+)?"});var $fe=W(Nh=>{"use strict";var OV=hn(),Hfe=an().extendFlat,a3t=Ja(),o3t=Xx(),NV=ti(),s3t=(Ng(),Pt(Og)).DESELECTDIM,hw=U6(),jfe=(fw(),Pt(fA)).counter,l3t=(ew(),Pt(Q3)).modHalf,Gp=Tc().isArrayOrTypedArray,wy=Tc().isTypedArraySpec,Ty=Tc().decodeTypedArraySpec;Nh.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Gp(e)?e:wy(e)?Ty(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e=+e),i.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,i=0;ia===!0||a===!1;n(e)||i.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(n)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,i){wy(e)&&(e=Ty(e)),!OV(e)||i.min!==void 0&&ei.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}wy(e)&&(e=Ty(e)),e%1||!OV(e)||i.min!==void 0&&ei.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,i){if(typeof e!="string"){var n=typeof e=="number";i.strict===!0||!n?t.set(r):t.set(String(e))}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){wy(e)&&(e=Ty(e)),NV.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(i=>NV.isValid(i))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(o3t.get(e,r))}},angle:{coerceFunction:function(e,t,r){wy(e)&&(e=Ty(e)),e==="auto"?t.set("auto"):OV(e)?t.set(l3t(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,i){var n=i.regex||jfe(r);let a=o=>typeof o=="string"&&n.test(o);a(e)||i.arrayOk&&Gp(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!jfe(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var n=e.split("+"),a=0;a{"use strict";Wfe.exports=function(){}});var UV=W((cBr,Yfe)=>{"use strict";Yfe.exports=function(t,r){if(r instanceof RegExp){for(var i=r.toString(),n=0;n{Xfe.exports=u3t;function u3t(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Jfe=W((hBr,Kfe)=>{Kfe.exports=c3t;function c3t(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var ehe=W((dBr,Qfe)=>{Qfe.exports=f3t;function f3t(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var VV=W((pBr,the)=>{the.exports=h3t;function h3t(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ihe=W((vBr,rhe)=>{rhe.exports=d3t;function d3t(e,t){if(e===t){var r=t[1],i=t[2],n=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[11]=t[14],e[12]=n,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var ahe=W((gBr,nhe)=>{nhe.exports=p3t;function p3t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],p=t[11],d=t[12],v=t[13],m=t[14],g=t[15],w=r*s-i*o,_=r*l-n*o,b=r*u-a*o,M=i*l-n*s,x=i*u-a*s,A=n*u-a*l,T=c*v-f*d,y=c*m-h*d,E=c*g-p*d,S=f*m-h*v,C=f*g-p*v,k=h*g-p*m,D=w*k-_*C+b*S+M*E-x*y+A*T;return D?(D=1/D,e[0]=(s*k-l*C+u*S)*D,e[1]=(n*C-i*k-a*S)*D,e[2]=(v*A-m*x+g*M)*D,e[3]=(h*x-f*A-p*M)*D,e[4]=(l*E-o*k-u*y)*D,e[5]=(r*k-n*E+a*y)*D,e[6]=(m*b-d*A-g*_)*D,e[7]=(c*A-h*b+p*_)*D,e[8]=(o*C-s*E+u*T)*D,e[9]=(i*E-r*C-a*T)*D,e[10]=(d*x-v*b+g*w)*D,e[11]=(f*b-c*x-p*w)*D,e[12]=(s*y-o*S-l*T)*D,e[13]=(r*S-i*y+n*T)*D,e[14]=(v*_-d*M-m*w)*D,e[15]=(c*M-f*_+h*w)*D,e):null}});var she=W((mBr,ohe)=>{ohe.exports=v3t;function v3t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],p=t[11],d=t[12],v=t[13],m=t[14],g=t[15];return e[0]=s*(h*g-p*m)-f*(l*g-u*m)+v*(l*p-u*h),e[1]=-(i*(h*g-p*m)-f*(n*g-a*m)+v*(n*p-a*h)),e[2]=i*(l*g-u*m)-s*(n*g-a*m)+v*(n*u-a*l),e[3]=-(i*(l*p-u*h)-s*(n*p-a*h)+f*(n*u-a*l)),e[4]=-(o*(h*g-p*m)-c*(l*g-u*m)+d*(l*p-u*h)),e[5]=r*(h*g-p*m)-c*(n*g-a*m)+d*(n*p-a*h),e[6]=-(r*(l*g-u*m)-o*(n*g-a*m)+d*(n*u-a*l)),e[7]=r*(l*p-u*h)-o*(n*p-a*h)+c*(n*u-a*l),e[8]=o*(f*g-p*v)-c*(s*g-u*v)+d*(s*p-u*f),e[9]=-(r*(f*g-p*v)-c*(i*g-a*v)+d*(i*p-a*f)),e[10]=r*(s*g-u*v)-o*(i*g-a*v)+d*(i*u-a*s),e[11]=-(r*(s*p-u*f)-o*(i*p-a*f)+c*(i*u-a*s)),e[12]=-(o*(f*m-h*v)-c*(s*m-l*v)+d*(s*h-l*f)),e[13]=r*(f*m-h*v)-c*(i*m-n*v)+d*(i*h-n*f),e[14]=-(r*(s*m-l*v)-o*(i*m-n*v)+d*(i*l-n*s)),e[15]=r*(s*h-l*f)-o*(i*h-n*f)+c*(i*l-n*s),e}});var uhe=W((yBr,lhe)=>{lhe.exports=g3t;function g3t(e){var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],p=e[12],d=e[13],v=e[14],m=e[15],g=t*o-r*a,w=t*s-i*a,_=t*l-n*a,b=r*s-i*o,M=r*l-n*o,x=i*l-n*s,A=u*d-c*p,T=u*v-f*p,y=u*m-h*p,E=c*v-f*d,S=c*m-h*d,C=f*m-h*v;return g*C-w*S+_*E+b*y-M*T+x*A}});var fhe=W((xBr,che)=>{che.exports=m3t;function m3t(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],p=t[10],d=t[11],v=t[12],m=t[13],g=t[14],w=t[15],_=r[0],b=r[1],M=r[2],x=r[3];return e[0]=_*i+b*s+M*f+x*v,e[1]=_*n+b*l+M*h+x*m,e[2]=_*a+b*u+M*p+x*g,e[3]=_*o+b*c+M*d+x*w,_=r[4],b=r[5],M=r[6],x=r[7],e[4]=_*i+b*s+M*f+x*v,e[5]=_*n+b*l+M*h+x*m,e[6]=_*a+b*u+M*p+x*g,e[7]=_*o+b*c+M*d+x*w,_=r[8],b=r[9],M=r[10],x=r[11],e[8]=_*i+b*s+M*f+x*v,e[9]=_*n+b*l+M*h+x*m,e[10]=_*a+b*u+M*p+x*g,e[11]=_*o+b*c+M*d+x*w,_=r[12],b=r[13],M=r[14],x=r[15],e[12]=_*i+b*s+M*f+x*v,e[13]=_*n+b*l+M*h+x*m,e[14]=_*a+b*u+M*p+x*g,e[15]=_*o+b*c+M*d+x*w,e}});var dhe=W((bBr,hhe)=>{hhe.exports=y3t;function y3t(e,t,r){var i=r[0],n=r[1],a=r[2],o,s,l,u,c,f,h,p,d,v,m,g;return t===e?(e[12]=t[0]*i+t[4]*n+t[8]*a+t[12],e[13]=t[1]*i+t[5]*n+t[9]*a+t[13],e[14]=t[2]*i+t[6]*n+t[10]*a+t[14],e[15]=t[3]*i+t[7]*n+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],p=t[7],d=t[8],v=t[9],m=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=p,e[8]=d,e[9]=v,e[10]=m,e[11]=g,e[12]=o*i+c*n+d*a+t[12],e[13]=s*i+f*n+v*a+t[13],e[14]=l*i+h*n+m*a+t[14],e[15]=u*i+p*n+g*a+t[15]),e}});var vhe=W((_Br,phe)=>{phe.exports=x3t;function x3t(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var mhe=W((wBr,ghe)=>{ghe.exports=b3t;function b3t(e,t,r,i){var n=i[0],a=i[1],o=i[2],s=Math.sqrt(n*n+a*a+o*o),l,u,c,f,h,p,d,v,m,g,w,_,b,M,x,A,T,y,E,S,C,k,D,F;return Math.abs(s)<1e-6?null:(s=1/s,n*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],p=t[2],d=t[3],v=t[4],m=t[5],g=t[6],w=t[7],_=t[8],b=t[9],M=t[10],x=t[11],A=n*n*c+u,T=a*n*c+o*l,y=o*n*c-a*l,E=n*a*c-o*l,S=a*a*c+u,C=o*a*c+n*l,k=n*o*c+a*l,D=a*o*c-n*l,F=o*o*c+u,e[0]=f*A+v*T+_*y,e[1]=h*A+m*T+b*y,e[2]=p*A+g*T+M*y,e[3]=d*A+w*T+x*y,e[4]=f*E+v*S+_*C,e[5]=h*E+m*S+b*C,e[6]=p*E+g*S+M*C,e[7]=d*E+w*S+x*C,e[8]=f*k+v*D+_*F,e[9]=h*k+m*D+b*F,e[10]=p*k+g*D+M*F,e[11]=d*k+w*D+x*F,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var xhe=W((TBr,yhe)=>{yhe.exports=_3t;function _3t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+u*i,e[5]=o*n+c*i,e[6]=s*n+f*i,e[7]=l*n+h*i,e[8]=u*n-a*i,e[9]=c*n-o*i,e[10]=f*n-s*i,e[11]=h*n-l*i,e}});var _he=W((ABr,bhe)=>{bhe.exports=w3t;function w3t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-u*i,e[1]=o*n-c*i,e[2]=s*n-f*i,e[3]=l*n-h*i,e[8]=a*i+u*n,e[9]=o*i+c*n,e[10]=s*i+f*n,e[11]=l*i+h*n,e}});var The=W((MBr,whe)=>{whe.exports=T3t;function T3t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+u*i,e[1]=o*n+c*i,e[2]=s*n+f*i,e[3]=l*n+h*i,e[4]=u*n-a*i,e[5]=c*n-o*i,e[6]=f*n-s*i,e[7]=h*n-l*i,e}});var Mhe=W((SBr,Ahe)=>{Ahe.exports=A3t;function A3t(e,t,r){var i,n,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,i=Math.sin(t),n=Math.cos(t),a=1-n,e[0]=o*o*a+n,e[1]=s*o*a+l*i,e[2]=l*o*a-s*i,e[3]=0,e[4]=o*s*a-l*i,e[5]=s*s*a+n,e[6]=l*s*a+o*i,e[7]=0,e[8]=o*l*a+s*i,e[9]=s*l*a-o*i,e[10]=l*l*a+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Ehe=W((EBr,She)=>{She.exports=M3t;function M3t(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=i+i,l=n+n,u=a+a,c=i*s,f=i*l,h=i*u,p=n*l,d=n*u,v=a*u,m=o*s,g=o*l,w=o*u;return e[0]=1-(p+v),e[1]=f+w,e[2]=h-g,e[3]=0,e[4]=f-w,e[5]=1-(c+v),e[6]=d+m,e[7]=0,e[8]=h+g,e[9]=d-m,e[10]=1-(c+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Che=W((kBr,khe)=>{khe.exports=S3t;function S3t(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Fhe=W((CBr,Dhe)=>{Dhe.exports=E3t;function E3t(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Phe=W((DBr,Lhe)=>{Lhe.exports=k3t;function k3t(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Rhe=W((FBr,Ihe)=>{Ihe.exports=C3t;function C3t(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Bhe=W((LBr,zhe)=>{zhe.exports=D3t;function D3t(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Ohe=W((PBr,qhe)=>{qhe.exports=F3t;function F3t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,u=r*o,c=i*o,f=i*s,h=n*o,p=n*s,d=n*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-d,e[1]=c+g,e[2]=h-m,e[3]=0,e[4]=c-g,e[5]=1-u-d,e[6]=p+v,e[7]=0,e[8]=h+m,e[9]=p-v,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Uhe=W((IBr,Nhe)=>{Nhe.exports=L3t;function L3t(e,t,r,i,n,a,o){var s=1/(r-t),l=1/(n-i),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(n+i)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var Ghe=W((RBr,Vhe)=>{Vhe.exports=P3t;function P3t(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}});var jhe=W((zBr,Hhe)=>{Hhe.exports=I3t;function I3t(e,t,r,i){var n=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(n+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(n-a)*u*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}});var Whe=W((BBr,$he)=>{$he.exports=R3t;function R3t(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*u,e[15]=1,e}});var Xhe=W((qBr,Yhe)=>{var z3t=VV();Yhe.exports=B3t;function B3t(e,t,r,i){var n,a,o,s,l,u,c,f,h,p,d=t[0],v=t[1],m=t[2],g=i[0],w=i[1],_=i[2],b=r[0],M=r[1],x=r[2];return Math.abs(d-b)<1e-6&&Math.abs(v-M)<1e-6&&Math.abs(m-x)<1e-6?z3t(e):(c=d-b,f=v-M,h=m-x,p=1/Math.sqrt(c*c+f*f+h*h),c*=p,f*=p,h*=p,n=w*h-_*f,a=_*c-g*h,o=g*f-w*c,p=Math.sqrt(n*n+a*a+o*o),p?(p=1/p,n*=p,a*=p,o*=p):(n=0,a=0,o=0),s=f*o-h*a,l=h*n-c*o,u=c*a-f*n,p=Math.sqrt(s*s+l*l+u*u),p?(p=1/p,s*=p,l*=p,u*=p):(s=0,l=0,u=0),e[0]=n,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*d+a*v+o*m),e[13]=-(s*d+l*v+u*m),e[14]=-(c*d+f*v+h*m),e[15]=1,e)}});var Khe=W((OBr,Zhe)=>{Zhe.exports=q3t;function q3t(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var GV=W((NBr,Jhe)=>{Jhe.exports={create:Zfe(),clone:Jfe(),copy:ehe(),identity:VV(),transpose:ihe(),invert:ahe(),adjoint:she(),determinant:uhe(),multiply:fhe(),translate:dhe(),scale:vhe(),rotate:mhe(),rotateX:xhe(),rotateY:_he(),rotateZ:The(),fromRotation:Mhe(),fromRotationTranslation:Ehe(),fromScaling:Che(),fromTranslation:Fhe(),fromXRotation:Phe(),fromYRotation:Rhe(),fromZRotation:Bhe(),fromQuat:Ohe(),frustum:Uhe(),perspective:Ghe(),perspectiveFromFieldOfView:jhe(),ortho:Whe(),lookAt:Xhe(),str:Khe()}});var gD=W(Dl=>{"use strict";var O3t=GV();Dl.init2dArray=function(e,t){for(var r=new Array(e),i=0;i{"use strict";var N3t=gi(),Qhe=qg(),U3t=gD(),V3t=GV();function G3t(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function H3t(e){var t=N3t.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function e0e(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function j3t(e,t){t0e("global",e,t)}function t0e(e,t,r){var i="plotly.js-style-"+e,n=document.getElementById(i);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",i),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var a=n.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):Qhe.warn("addStyleRule failed"):Qhe.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function $3t(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&e0e(r)}function W3t(e,t,r,i,n,a){var o=i.split(":"),s=n.split(":"),l="data-btn-style-event-added";a||(a=document),a.querySelectorAll(e).forEach(function(u){u._hoverStyle={activeStyleParts:o,inactiveStyleParts:s},u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this._hoverStyle,f=this.querySelector(r);f&&(f.style[c.activeStyleParts[0]]=c.activeStyleParts[1])}),u.addEventListener("mouseleave",function(){var c=this._hoverStyle,f=this.querySelector(r);f&&(t&&this.matches(t)?f.style[c.activeStyleParts[0]]=c.activeStyleParts[1]:f.style[c.inactiveStyleParts[0]]=c.inactiveStyleParts[1])}),u.setAttribute(l,!0))})}function Y3t(e){var t=i0e(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(i){var n=r0e(i);if(n){var a=U3t.convertCssMatrix(n);r=V3t.multiply(r,r,a)}}),r}function r0e(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(i){return+i})}function i0e(e){for(var t=[];X3t(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function X3t(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Z3t(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}n0e.exports={getGraphDiv:G3t,isPlotDiv:H3t,removeElement:e0e,addStyleRule:j3t,addRelatedStyleRule:t0e,deleteRelatedStyleRule:$3t,setStyleOnHover:W3t,getFullTransformMatrix:Y3t,getElementTransformMatrix:r0e,getElementAndAncestors:i0e,equalDomRects:Z3t}});var dA=W((GBr,a0e)=>{"use strict";a0e.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var hs=W((HBr,h0e)=>{"use strict";var s0e=an().extendFlat,K3t=my(),l0e={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},u0e={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},J3t=l0e.flags.slice().concat(["fullReplot"]),Q3t=u0e.flags.slice().concat("layoutReplot");h0e.exports={traces:l0e,layout:u0e,traceFlags:function(){return o0e(J3t)},layoutFlags:function(){return o0e(Q3t)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var i=r.split("+"),n=0;n{"use strict";HV.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};HV.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var jV={};Jn(jV,{DATE_FORMAT_LINK:()=>twt,FORMAT_LINK:()=>ewt});var ewt,twt,$V=Ci(()=>{"use strict";ewt="https://github.com/d3/d3-format/tree/v1.4.5#d3-format",twt="https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"});var Wa=W(dw=>{"use strict";var{DATE_FORMAT_LINK:rwt,FORMAT_LINK:iwt}=($V(),Pt(jV)),nwt=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function awt({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,iwt,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,rwt,"for details on the date formatting syntax.",nwt].join(" ")}dw.templateFormatStringDescription=awt;dw.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>fn({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});dw.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>fn({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});dw.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});dw.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var xD=W((YBr,y0e)=>{"use strict";function Ay(e,t){return t?t.d2l(e):e}function d0e(e,t){return t?t.l2d(e):e}function owt(e){return e.x0}function swt(e){return e.x1}function lwt(e){return e.y0}function uwt(e){return e.y1}function p0e(e){return e.x0shift||0}function v0e(e){return e.x1shift||0}function g0e(e){return e.y0shift||0}function m0e(e){return e.y1shift||0}function mD(e,t){return Ay(e.x1,t)+v0e(e)-Ay(e.x0,t)-p0e(e)}function yD(e,t,r){return Ay(e.y1,r)+m0e(e)-Ay(e.y0,r)-g0e(e)}function cwt(e,t){return Math.abs(mD(e,t))}function fwt(e,t,r){return Math.abs(yD(e,t,r))}function hwt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(mD(e,t),2)+Math.pow(yD(e,t,r),2))}function dwt(e,t){return d0e((Ay(e.x1,t)+v0e(e)+Ay(e.x0,t)+p0e(e))/2,t)}function pwt(e,t,r){return d0e((Ay(e.y1,r)+m0e(e)+Ay(e.y0,r)+g0e(e))/2,r)}function vwt(e,t,r){return e.type!=="line"?void 0:yD(e,t,r)/mD(e,t)}var gwt=["x0","x1","y0","y1","dy","height","ycenter"],mwt=["x0","x1","y0","y1","dx","width","xcenter"];y0e.exports={x0:owt,x1:swt,y0:lwt,y1:uwt,slope:vwt,dx:mD,dy:yD,width:cwt,height:fwt,length:hwt,xcenter:dwt,ycenter:pwt,simpleXVariables:gwt,simpleYVariables:mwt}});var _0e=W((XBr,b0e)=>{"use strict";var ywt=hs().overrideAll,Kx=Ja(),x0e=jo(),xwt=zu().dash,My=an().extendFlat,{shapeTexttemplateAttrs:bwt,templatefallbackAttrs:_wt}=Wa(),wwt=xD();b0e.exports=ywt({newshape:{visible:My({},Kx.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:My({},Kx.legend,{}),legendgroup:My({},Kx.legendgroup,{}),legendgrouptitle:{text:My({},Kx.legendgrouptitle.text,{}),font:x0e({})},legendrank:My({},Kx.legendrank,{}),legendwidth:My({},Kx.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:My({},xwt,{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:My({},Kx.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:bwt({newshape:!0},{keys:Object.keys(wwt)}),texttemplatefallback:_wt({editType:"arraydraw"}),font:x0e({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var T0e=W((ZBr,w0e)=>{"use strict";var Twt=zu().dash,Awt=an().extendFlat;w0e.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:Awt({},Twt,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}});var bD=W((KBr,A0e)=>{"use strict";A0e.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var pw=W((JBr,k0e)=>{"use strict";var WV=jo(),Mwt=dA(),_D=Yl(),M0e=_0e(),S0e=T0e(),Swt=bD(),E0e=an().extendFlat,wD=WV({editType:"calc"});wD.family.dflt='"Open Sans", verdana, arial, sans-serif';wD.size.dflt=12;wD.color.dflt=_D.defaultLine;k0e.exports={font:wD,title:{text:{valType:"string",editType:"layoutstyle"},font:WV({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:WV({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:E0e(Swt({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:_D.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:_D.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:_D.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:M0e.newshape,activeshape:M0e.activeshape,newselection:S0e.newselection,activeselection:S0e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:E0e({},Mwt.transition,{editType:"none"})}});var C0e=W(()=>{(function(){if(!document.getElementById("9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53")){var e=document.createElement("style");e.id="9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53",e.textContent='.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0);-webkit-touch-callout:none}.maplibregl-canvas{position:absolute;left:0;top:0}.maplibregl-map:fullscreen{width:100%;height: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{position:absolute;pointer-events:none;z-index:2}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{right:0;bottom:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{margin:10px 0 0 10px;float:left}.maplibregl-ctrl-top-right .maplibregl-ctrl{margin:10px 10px 0 0;float:right}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin:0 0 10px 10px;float:left}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:0 10px 10px 0;float:right}.maplibregl-ctrl-group{border-radius:4px;background:#fff}.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{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.maplibregl-ctrl button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.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%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.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.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.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%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.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.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23aaa%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23999%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23666%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;color:#000;border-radius:12px;box-sizing:content-box}.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{padding:2px 8px 2px 28px;border-radius:12px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.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{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left: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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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);font-size:10px;white-space:nowrap;border-color:#333;border-style:none solid solid;border-width:medium 2px 2px;padding:0 5px;color:#333;box-sizing:border-box}.maplibregl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.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{width:0;height:0;border:10px solid transparent;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.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-right:none;border-left-color:#fff}[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{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto}.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{position:absolute;top:0;left:0;will-change:transform;transition:opacity .2s}.maplibregl-marker-draggable{cursor:grab}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.maplibregl-user-location-dot:before{content:"";position:absolute;animation:maplibregl-user-location-dot-pulse 2s infinite}.maplibregl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;width:1px;height:1px;border-radius:100%}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.maplibregl-cooperative-gesture-screen{background:rgba(0,0,0,.4);position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:#fff;padding:1rem;font-size:1.4em;line-height:1.2;opacity:0;pointer-events:none;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{position:fixed!important;width:100%!important;height:100%!important;top:0!important;left:0!important;z-index:99999}',document.head.appendChild(e)}})()});var xi=W(Ta=>{"use strict";var YV=qg(),D0e=vD(),F0e=UV(),tqr=hA().addStyleRule,L0e=an(),Ewt=Ja(),kwt=pw(),Cwt=L0e.extendFlat,XV=L0e.extendDeepAll;Ta.modules={};Ta.allCategories={};Ta.allTypes=[];Ta.subplotsRegistry={};Ta.componentsRegistry={};Ta.layoutArrayContainers=[];Ta.layoutArrayRegexes=[];Ta.traceLayoutAttributes={};Ta.localeRegistry={};Ta.apiMethodRegistry={};Ta.collectableSubplotTypes=null;Ta.register=function(t){if(Ta.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Iwt=K3().timeFormat,G0e=hn(),ZV=qg(),Ey=(ew(),Pt(Q3)).mod,mw=(ra(),Pt(ia)),pd=mw.BADNUM,Uh=mw.ONEDAY,pA=mw.ONEHOUR,Sy=mw.ONEMIN,gw=mw.ONESEC,vA=mw.EPOCHJD,Ug=xi(),B0e=K3().utcFormat,Rwt=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,zwt=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,q0e=new Date().getFullYear()-70;function Vg(e){return e&&Ug.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Fl.dateTick0=function(e,t){var r=Bwt(e,!!t);if(t<2)return r;var i=Fl.dateTime2ms(r,e);return i+=Uh*(t-1),Fl.ms2DateTime(i,0,e)};function Bwt(e,t){return Vg(e)?t?Ug.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Ug.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Fl.dfltRange=function(e){return Vg(e)?Ug.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Fl.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var AD,MD;Fl.dateTime2ms=function(e,t){if(Fl.isJSDate(e)){var r=e.getTimezoneOffset()*Sy,i=(e.getUTCMinutes()-e.getMinutes())*Sy+(e.getUTCSeconds()-e.getSeconds())*gw+(e.getUTCMilliseconds()-e.getMilliseconds());if(i){var n=3*Sy;r=r-n/2+Ey(i-r+n/2,n)}return e=Number(e)-r,e>=AD&&e<=MD?e:pd}if(typeof e!="string"&&typeof e!="number")return pd;e=String(e);var a=Vg(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=a&&t.slice(0,7)==="chinese",l=e.match(s?zwt:Rwt);if(!l)return pd;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),p=Number(l[9]||0),d=Number(l[11]||0);if(a){if(u.length===2)return pd;u=Number(u);var v;try{var m=Ug.getComponentMethod("calendars","getCal")(t);if(s){var g=c.charAt(c.length-1)==="i";c=parseInt(c,10),v=m.newDate(u,m.toMonthIndex(u,c,g),f)}else v=m.newDate(u,Number(c),f)}catch(_){return pd}return v?(v.toJD()-vA)*Uh+h*pA+p*Sy+d*gw:pd}u.length===2?u=(Number(u)+2e3-q0e)%100+q0e:u=Number(u),c-=1;var w=new Date(Date.UTC(2e3,c,f,h,p));return w.setUTCFullYear(u),w.getUTCMonth()!==c||w.getUTCDate()!==f?pd:w.getTime()+d*gw};AD=Fl.MIN_MS=Fl.dateTime2ms("-9999");MD=Fl.MAX_MS=Fl.dateTime2ms("9999-12-31 23:59:59.9999");Fl.isDateTime=function(e,t){return Fl.dateTime2ms(e,t)!==pd};function vw(e,t){return String(e+Math.pow(10,t)).slice(1)}var TD=90*Uh,O0e=3*pA,N0e=5*Sy;Fl.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=AD&&e<=MD))return pd;t||(t=0);var i=Math.floor(Ey(e+.05,1)*10),n=Math.round(e-i/10),a,o,s,l,u,c;if(Vg(r)){var f=Math.floor(n/Uh)+vA,h=Math.floor(Ey(e,Uh));try{a=Ug.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(p){a=B0e("G%Y-%m-%d")(new Date(n))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t=AD+Uh&&e<=MD-Uh))return pd;var t=Math.floor(Ey(e+.05,1)*10),r=new Date(Math.round(e-t/10)),i=Iwt("%Y-%m-%d")(r),n=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return H0e(i,n,a,o,s)};function H0e(e,t,r,i,n){if((t||r||i||n)&&(e+=" "+vw(t,2)+":"+vw(r,2),(i||n)&&(e+=":"+vw(i,2),n))){for(var a=4;n%10===0;)a-=1,n/=10;e+="."+vw(n,a)}return e}Fl.cleanDate=function(e,t,r){if(e===pd)return t;if(Fl.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Vg(r))return ZV.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Fl.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Fl.isDateTime(e,r))return ZV.error("unrecognized date",e),t;return e};var qwt=/%\d?f/g,Owt=/%h/g,Nwt={1:"1",2:"1",3:"2",4:"2"};function U0e(e,t,r,i){e=e.replace(qwt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var n=new Date(Math.floor(t+.05));if(e=e.replace(Owt,function(){return Nwt[r("%q")(n)]}),Vg(i))try{e=Ug.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch(a){return"Invalid"}return r(e)(n)}var Uwt=[59,59.9,59.99,59.999,59.9999];function Vwt(e,t){var r=Ey(e+.05,Uh),i=vw(Math.floor(r/pA),2)+":"+vw(Ey(Math.floor(r/Sy),60),2);if(t!=="M"){G0e(t)||(t=0);var n=Math.min(Ey(e/gw,60),Uwt[t]),a=(100+n).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+a}return i}Fl.formatDate=function(e,t,r,i,n,a){if(n=Vg(n)&&n,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` `+a.year;else return Vwt(e,r)+` `+U0e(a.dayMonthYear,e,i,n);return U0e(t,e,i,n)};var V0e=3*Uh;Fl.incrementMonth=function(e,t,r){r=Vg(r)&&r;var i=Ey(e,Uh);if(e=Math.round(e-i),r)try{var n=Math.round(e/Uh)+vA,a=Ug.getComponentMethod("calendars","getCal")(r),o=a.fromJD(n);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-vA)*Uh+i}catch(l){ZV.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+V0e);return s.setUTCMonth(s.getUTCMonth()+t)+i-V0e};Fl.findExactDates=function(e,t){for(var r=0,i=0,n=0,a=0,o,s,l=Vg(t)&&Ug.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";$0e.exports=function(t){return t}});var SD=W(Gg=>{"use strict";var Gwt=hn(),Hwt=qg(),jwt=gA(),$wt=(ra(),Pt(ia)).BADNUM,KV=1e-9;Gg.findBin=function(e,t,r){if(Gwt(t.start))return r?Math.ceil((e-t.start)/t.size-KV)-1:Math.floor((e-t.start)/t.size+KV);var i=0,n=t.length,a=0,o=n>1?(t[n-1]-t[0])/(n-1):1,s,l;for(o>=0?l=r?Wwt:Ywt:l=r?Zwt:Xwt,e+=o*KV*(r?-1:1)*(o>=0?1:-1);i90&&Hwt.log("Long binary search..."),i-1};function Wwt(e,t){return et}function Zwt(e,t){return e>=t}Gg.sorterAsc=function(e,t){return e-t};Gg.sorterDes=function(e,t){return t-e};Gg.distinctVals=function(e){var t=e.slice();t.sort(Gg.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===$wt;r--);for(var i=t[r]-t[0]||1,n=i/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>n&&(i=Math.min(i,u),a.push(l),o=l)}return{vals:a,minDiff:i}};Gg.roundUp=function(e,t,r){for(var i=0,n=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()};Gg.findIndexOfMin=function(e,t){t=t||jwt;for(var r=1/0,i,n=0;nJwt});function Kwt(e){return Object.keys(e).sort()}var Jwt,Qx=Ci(()=>{"use strict";Jwt=Kwt});var W0e=W(Ll=>{"use strict";var mA=hn(),Qwt=Tc().isArrayOrTypedArray;Ll.aggNums=function(e,t,r,i){var n,a;if((!i||i>r.length)&&(i=r.length),mA(t)||(t=!1),Qwt(r[0])){for(a=new Array(i),n=0;ne.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var J0e=W((sqr,K0e)=>{"use strict";var Y0e=(ew(),Pt(Q3)),JV=Y0e.mod,e5t=Y0e.modHalf,yA=Math.PI,ky=2*yA;function t5t(e){return e/180*yA}function r5t(e){return e/yA*180}function QV(e){return Math.abs(e[1]-e[0])>ky-1e-14}function X0e(e,t){return e5t(t-e,ky)}function i5t(e,t){return Math.abs(X0e(e,t))}function Z0e(e,t){if(QV(t))return!0;var r,i;t[0]i&&(i+=ky);var n=JV(e,ky),a=n+ky;return n>=r&&n<=i||a>=r&&a<=i}function n5t(e,t,r,i){if(!Z0e(t,i))return!1;var n,a;return r[0]=n&&e<=a}function eG(e,t,r,i,n,a,o){n=n||0,a=a||0;var s=QV([r,i]),l,u,c,f,h;s?(l=0,u=yA,c=ky):r{"use strict";eb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};eb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};eb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};eb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};eb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};eb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var rde=W(tb=>{"use strict";var tG=(ew(),Pt(Q3)).mod;tb.segmentsIntersect=tde;function tde(e,t,r,i,n,a,o,s){var l=r-e,u=n-e,c=o-n,f=i-t,h=a-t,p=s-a,d=l*p-c*f;if(d===0)return null;var v=(u*p-c*h)/d,m=(u*f-l*h)/d;return m<0||m>1||v<0||v>1?null:{x:e+l*v,y:t+f*v}}tb.segmentDistance=function(t,r,i,n,a,o,s,l){if(tde(t,r,i,n,a,o,s,l))return 0;var u=i-t,c=n-r,f=s-a,h=l-o,p=u*u+c*c,d=f*f+h*h,v=Math.min(ED(u,c,p,a-t,o-r),ED(u,c,p,s-t,l-r),ED(f,h,d,t-a,r-o),ED(f,h,d,i-a,n-o));return Math.sqrt(v)};function ED(e,t,r,i,n){var a=i*e+n*t;if(a<0)return i*i+n*n;if(a>r){var o=i-e,s=n-t;return o*o+s*s}else{var l=i*t-n*e;return l*l/r}}var kD,rG,ede;tb.getTextLocation=function(t,r,i,n){if((t!==rG||n!==ede)&&(kD={},rG=t,ede=n),kD[i])return kD[i];var a=t.getPointAtLength(tG(i-n/2,r)),o=t.getPointAtLength(tG(i+n/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(tG(i,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return kD[i]=f,f};tb.clearLocationCache=function(){rG=null};tb.getVisibleSegment=function(t,r,i){var n=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function p(v){var m=t.getPointAtLength(v);v===0?f=m:v===u&&(h=m);var g=m.xa?m.x-a:0,w=m.ys?m.y-s:0;return Math.sqrt(g*g+w*w)}for(var d=p(l);d;){if(l+=d+i,l>c)return;d=p(l)}for(d=p(c);d;){if(c-=d+i,l>c)return;d=p(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};tb.findPointOnPath=function(t,r,i,n){n=n||{};for(var a=n.pathLength||t.getTotalLength(),o=n.tolerance||.001,s=n.iterationLimit||30,l=t.getPointAtLength(0)[i]>t.getPointAtLength(a)[i]?-1:1,u=0,c=0,f=a,h,p,d;u0?f=h:c=h,u++}return p}});var CD=W(xA=>{"use strict";var Hg={};xA.throttle=function(t,r,i){var n=Hg[t],a=Date.now();if(!n){for(var o in Hg)Hg[o].tsn.ts+r){s();return}n.timer=setTimeout(function(){s(),n.timer=null},r)};xA.done=function(e){var t=Hg[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var i=t.onDone;t.onDone=function(){i&&i(),r(),t.onDone=null}})};xA.clear=function(e){if(e)ide(Hg[e]),delete Hg[e];else for(var t in Hg)xA.clear(t)};function ide(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var ade=W((fqr,nde)=>{"use strict";nde.exports=function(t){t._clearResponsive&&(t._clearResponsive(),delete t._clearResponsive)}});var ode=W((hqr,DD)=>{"use strict";DD.exports=iG;DD.exports.isMobile=iG;DD.exports.default=iG;var l5t=/(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,u5t=/CrOS/,c5t=/android|ipad|playbook|silk/i;function iG(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=l5t.test(t)&&!u5t.test(t)||!!e.tablet&&c5t.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var lde=W((dqr,sde)=>{"use strict";var f5t=hn(),h5t=ode();sde.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=d5t(),typeof r!="string")return!0;var i=h5t({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!i)for(var n=r.split(" "),a=1;a-1;s--){var l=n[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(f5t(u)&&(u=+u),u>=13)return!0}}}return i};function d5t(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var cde=W((pqr,ude)=>{"use strict";var p5t=gi();ude.exports=function(t,r,i){var n=t.selectAll("g."+i.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",i),n.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(o){o[0][a]=p5t.select(this)}),n}});var hde=W((vqr,fde)=>{"use strict";var v5t=xi();fde.exports=function(t,r){for(var i=t._context.locale,n=0;n<2;n++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[i]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=v5t.localeRegistry}var u=i.split("-")[0];if(u===i)break;i=u}return r}});var nG=W((gqr,dde)=>{"use strict";dde.exports=function(t){for(var r={},i=[],n=0,a=0;a{"use strict";pde.exports=function(t){for(var r=y5t(t)?m5t:g5t,i=[],n=0;n{"use strict";gde.exports=function(t,r){if(!r)return t;var i=1/Math.abs(r),n=i>1?(i*t+i*r)/i:t+r,a=String(n).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(n).toPrecision(12);l.indexOf("e+")===-1&&(n=+l)}}return n}});var xde={};Jn(xde,{default:()=>_5t});function b5t(e){return typeof e=="string"&&(e=e.replace(x5t,"")),(0,yde.default)(e)?Number(e):void 0}var yde,x5t,_5t,bde=Ci(()=>{"use strict";yde=l1(hn());ra();x5t=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;_5t=b5t});var Tde=W((bqr,wde)=>{"use strict";var w5t=/<[^>]*>/g,T5t=/[\p{S}\p{P}]/gu,A5t=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,M5t=/�/g,S5t=/\s+/g,FD="-",_de=FD.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),E5t=new RegExp(_de+"{3,}","g"),k5t=new RegExp(_de+"$","g"),C5t=60;function D5t(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}wde.exports=function(t,r=C5t){var i=D5t(t!=null?t:"").replace(M5t,"").replace(w5t," ").replace(T5t,n=>n===FD?n:"").toLowerCase().trim().replace(S5t,FD).replace(A5t,"").replace(E5t,FD);return i.length<=r?i:Array.from(i).slice(0,r).join("").replace(k5t,"")}});var tt=W((_qr,Rde)=>{"use strict";var bA=gi(),F5t=K3().utcFormat,L5t=QN().format,Cde=hn(),Dde=(ra(),Pt(ia)),Fde=Dde.FP_SAFE,P5t=-Fde,Ade=Dde.BADNUM,qt={};Rde.exports=qt;qt.adjustFormat=function(t){if(!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t))return t;if(t==="0.f")return"~f";if(/^\d%/.test(t))return"~%";if(/^\ds/.test(t))return"~s";var r=(t.match(/^[+\-( ]?/)||[""])[0],i=t.slice(r.length);return!/^[~,.0$#]/.test(i)&&/[&fps]/.test(i)?r+"~"+i:t};var Mde={};qt.warnBadFormat=function(e){var t=String(e);Mde[t]||(Mde[t]=1,qt.warn('encountered bad format: "'+t+'"'))};qt.noFormat=function(e){return String(e)};qt.numberFormat=function(e){var t;try{t=L5t(qt.adjustFormat(e))}catch(r){return qt.warnBadFormat(e),qt.noFormat}return t};qt.nestedProperty=U6();qt.keyedContainer=xue();qt.relativeAttr=_ue();qt.isPlainObject=my();qt.toLogRange=N8();qt.relinkPrivateKeys=Mue();var Cy=Tc();qt.isArrayBuffer=Cy.isArrayBuffer;qt.isTypedArray=Cy.isTypedArray;qt.isArrayOrTypedArray=Cy.isArrayOrTypedArray;qt.isArray1D=Cy.isArray1D;qt.ensureArray=Cy.ensureArray;qt.concat=Cy.concat;qt.maxRowLength=Cy.maxRowLength;qt.minRowLength=Cy.minRowLength;var Lde=(ew(),Pt(Q3));qt.mod=Lde.mod;qt.modHalf=Lde.modHalf;var Dy=$fe();qt.valObjectMeta=Dy.valObjectMeta;qt.coerce=Dy.coerce;qt.coerce2=Dy.coerce2;qt.coerceFont=Dy.coerceFont;qt.coercePattern=Dy.coercePattern;qt.coerceHoverinfo=Dy.coerceHoverinfo;qt.coerceSelectionMarkerOpacity=Dy.coerceSelectionMarkerOpacity;qt.validate=Dy.validate;var _0=j0e();qt.dateTime2ms=_0.dateTime2ms;qt.isDateTime=_0.isDateTime;qt.ms2DateTime=_0.ms2DateTime;qt.ms2DateTimeLocal=_0.ms2DateTimeLocal;qt.cleanDate=_0.cleanDate;qt.isJSDate=_0.isJSDate;qt.formatDate=_0.formatDate;qt.incrementMonth=_0.incrementMonth;qt.dateTick0=_0.dateTick0;qt.dfltRange=_0.dfltRange;qt.findExactDates=_0.findExactDates;qt.MIN_MS=_0.MIN_MS;qt.MAX_MS=_0.MAX_MS;var rb=SD();qt.findBin=rb.findBin;qt.sorterAsc=rb.sorterAsc;qt.sorterDes=rb.sorterDes;qt.distinctVals=rb.distinctVals;qt.roundUp=rb.roundUp;qt.sort=rb.sort;qt.findIndexOfMin=rb.findIndexOfMin;qt.sortObjectKeys=(Qx(),Pt(Jx)).default;var jg=W0e();qt.aggNums=jg.aggNums;qt.len=jg.len;qt.mean=jg.mean;qt.geometricMean=jg.geometricMean;qt.median=jg.median;qt.midRange=jg.midRange;qt.variance=jg.variance;qt.stdev=jg.stdev;qt.interp=jg.interp;var Hp=gD();qt.init2dArray=Hp.init2dArray;qt.transposeRagged=Hp.transposeRagged;qt.dot=Hp.dot;qt.translationMatrix=Hp.translationMatrix;qt.rotationMatrix=Hp.rotationMatrix;qt.rotationXYMatrix=Hp.rotationXYMatrix;qt.apply3DTransform=Hp.apply3DTransform;qt.apply2DTransform=Hp.apply2DTransform;qt.apply2DTransform2=Hp.apply2DTransform2;qt.convertCssMatrix=Hp.convertCssMatrix;qt.inverseTransformMatrix=Hp.inverseTransformMatrix;var h1=J0e();qt.deg2rad=h1.deg2rad;qt.rad2deg=h1.rad2deg;qt.angleDelta=h1.angleDelta;qt.angleDist=h1.angleDist;qt.isFullCircle=h1.isFullCircle;qt.isAngleInsideSector=h1.isAngleInsideSector;qt.isPtInsideSector=h1.isPtInsideSector;qt.pathArc=h1.pathArc;qt.pathSector=h1.pathSector;qt.pathAnnulus=h1.pathAnnulus;var xw=Q0e();qt.isLeftAnchor=xw.isLeftAnchor;qt.isCenterAnchor=xw.isCenterAnchor;qt.isRightAnchor=xw.isRightAnchor;qt.isTopAnchor=xw.isTopAnchor;qt.isMiddleAnchor=xw.isMiddleAnchor;qt.isBottomAnchor=xw.isBottomAnchor;var bw=rde();qt.segmentsIntersect=bw.segmentsIntersect;qt.segmentDistance=bw.segmentDistance;qt.getTextLocation=bw.getTextLocation;qt.clearLocationCache=bw.clearLocationCache;qt.getVisibleSegment=bw.getVisibleSegment;qt.findPointOnPath=bw.findPointOnPath;var ID=an();qt.extendFlat=ID.extendFlat;qt.extendDeep=ID.extendDeep;qt.extendDeepAll=ID.extendDeepAll;qt.extendDeepNoArrays=ID.extendDeepNoArrays;var aG=qg();qt.log=aG.log;qt.warn=aG.warn;qt.error=aG.error;var I5t=(fw(),Pt(fA));qt.counterRegex=I5t.counter;var oG=CD();qt.throttle=oG.throttle;qt.throttleDone=oG.done;qt.clearThrottle=oG.clear;var jp=hA();qt.getGraphDiv=jp.getGraphDiv;qt.isPlotDiv=jp.isPlotDiv;qt.removeElement=jp.removeElement;qt.addStyleRule=jp.addStyleRule;qt.addRelatedStyleRule=jp.addRelatedStyleRule;qt.deleteRelatedStyleRule=jp.deleteRelatedStyleRule;qt.setStyleOnHover=jp.setStyleOnHover;qt.getFullTransformMatrix=jp.getFullTransformMatrix;qt.getElementTransformMatrix=jp.getElementTransformMatrix;qt.getElementAndAncestors=jp.getElementAndAncestors;qt.equalDomRects=jp.equalDomRects;qt.clearResponsive=ade();qt.preserveDrawingBuffer=lde();qt.makeTraceGroups=cde();qt._=hde();qt.notifier=LV();qt.filterUnique=nG();qt.filterVisible=vde();qt.pushUnique=UV();qt.increment=mde();qt.cleanNumber=(bde(),Pt(xde)).default;qt.slugify=Tde();qt.ensureNumber=function(t){return Cde(t)?(t=Number(t),t>Fde||t=t?!1:Cde(e)&&e>=0&&e%1===0};qt.noop=vD();qt.identity=gA();qt.repeat=function(e,t){for(var r=new Array(t),i=0;ir?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};qt.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};qt.simpleMap=function(e,t,r,i,n){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?n>10?(qt.warn("randstr failed uniqueness"),o):e(t,r,i,(n||0)+1):o};qt.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(i){i[t]=e,r[i.name]=i,r.optionList.push(i)},r["_"+t]=e,r};qt.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,i=2*r,n=2*t-1,a=new Array(n),o=new Array(r),s,l,u,c;for(s=0;s=i&&(u-=i*Math.floor(u/i)),u<0?u=-1-u:u>=r&&(u=i-1-u),c+=e[u]*a[l];o[s]=c}return o};qt.syncOrAsync=function(e,t,r){var i,n;function a(){return qt.syncOrAsync(e,t,r)}for(;e.length;)if(n=e.splice(0,1)[0],i=n(t),i&&i.then)return i.then(a);return r&&r(t)};qt.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};qt.noneOrAll=function(e,t,r){if(e){var i=!1,n=!0,a,o;for(a=0;a0?n:0})};qt.fillArray=function(e,t,r,i){if(i=i||qt.identity,qt.isArrayOrTypedArray(e))for(var n=0;nB5t.test(window.navigator.userAgent);var q5t=/Firefox\/(\d+)\.\d+/;qt.getFirefoxVersion=function(){var e=q5t.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};qt.isD3Selection=function(e){return e instanceof bA.selection};qt.ensureSingle=function(e,t,r,i){var n=e.select(t+(r?"."+r:""));if(n.size())return n;var a=e.append(t);return r&&a.classed(r,!0),i&&a.call(i),a};qt.ensureSingleById=function(e,t,r,i){var n=e.select(t+"#"+r);if(n.size())return n;var a=e.append(t).attr("id",r);return i&&a.call(i),a};qt.objectFromPath=function(e,t){for(var r=e.split("."),i,n=i={},a=0;a1?n+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;i.test(s);)s=s.replace(i,"$1"+a+"$2");return s+l};qt.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Ide=/^\w*$/;qt.templateString=function(e,t){var r={};return e.replace(qt.TEMPLATE_STRING_REGEX,function(i,n){var a;return Ide.test(n)?a=t[n]:(r[n]=r[n]||qt.nestedProperty(t,n).get,a=r[n](!0)),a!==void 0?a:""})};var U5t={max:10,count:0,name:"hovertemplate"};qt.hovertemplateString=e=>sG(da(fn({},e),{opts:U5t}));var V5t={max:10,count:0,name:"texttemplate"};qt.texttemplateString=e=>sG(da(fn({},e),{opts:V5t}));var G5t=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function H5t(e){var t=e.match(G5t);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var j5t={max:10,count:0,name:"texttemplate",parseMultDiv:!0};qt.texttemplateStringForShapes=e=>sG(da(fn({},e),{opts:j5t}));var Sde=/^[:|\|]/;function sG({data:e=[],locale:t,fallback:r,labels:i={},opts:n,template:a}){return a.replace(qt.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),p=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let d=null,v=null;if(n.parseMultDiv){var m=H5t(s);s=m.key,d=m.op,v=m.number}let g;if(p){if(i[s]===void 0)return"";g=i[s]}else for(let M of e)if(M){if(M.hasOwnProperty(s)){g=M[s];break}if(Ide.test(s)||(g=qt.nestedProperty(M,s).get(!0)),g!==void 0)break}if(g===void 0){let{count:M,max:x,name:A}=n,T=r===!1?o:r;return M=PD&&o<=Ede,u=s>=PD&&s<=Ede;if(l&&(i=10*i+o-PD),u&&(n=10*n+s-PD),!l||!u){if(i!==n)return i-n;if(o!==s)return o-s}}return n-i};var yw=2e9;qt.seedPseudoRandom=function(){yw=2e9};qt.pseudoRandom=function(){var e=yw;return yw=(69069*yw+1)%4294967296,Math.abs(yw-e)<429496729?qt.pseudoRandom():yw/4294967296};qt.fillText=function(e,t,r){var i=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},n=qt.extractOption(e,t,"htx","hovertext");if(qt.isValidTextValue(n))return i(n);var a=qt.extractOption(e,t,"tx","text");if(qt.isValidTextValue(a))return i(a)};qt.isValidTextValue=function(e){return e||e===0};qt.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",i=0;i1&&(u=1):u=0,qt.strTranslate(n-u*(r+o),a-u*(i+s))+qt.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+i)+")":"")};qt.setTransormAndDisplay=function(e,t){e.attr("transform",qt.getTextTransform(t)),e.style("display",t.scale?null:"none")};qt.ensureUniformFontSize=function(e,t){var r=qt.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};qt.join2=function(e,t,r){var i=e.length;return i>1?e.slice(0,-1).join(t)+r+e[i-1]:e.join(t)};qt.bigFont=function(e){return Math.round(1.2*e)};var kde=qt.getFirefoxVersion(),$5t=kde!==null&&kde<86;qt.getPositionFromD3Event=function(){return $5t?[bA.event.layerX,bA.event.layerY]:[bA.event.offsetX,bA.event.offsetY]}});var qde=W(()=>{"use strict";var W5t=tt(),zde={"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(lG in zde)Bde=lG.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),W5t.addStyleRule(Bde,zde[lG]);var Bde,lG});var uG=W((Mqr,Ode)=>{Ode.exports=!0});var fG=W((Sqr,Nde)=>{"use strict";var Y5t=uG(),cG;typeof window.matchMedia=="function"?cG=!window.matchMedia("(hover: none)").matches:cG=Y5t;Nde.exports=cG});var ib=W((Eqr,hG)=>{"use strict";var _w=typeof Reflect=="object"?Reflect:null,Ude=_w&&typeof _w.apply=="function"?_w.apply:function(t,r,i){return Function.prototype.apply.call(t,r,i)},RD;_w&&typeof _w.ownKeys=="function"?RD=_w.ownKeys:Object.getOwnPropertySymbols?RD=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:RD=function(t){return Object.getOwnPropertyNames(t)};function X5t(e){console&&console.warn&&console.warn(e)}var Gde=Number.isNaN||function(t){return t!==t};function ws(){ws.init.call(this)}hG.exports=ws;hG.exports.once=Q5t;ws.EventEmitter=ws;ws.prototype._events=void 0;ws.prototype._eventsCount=0;ws.prototype._maxListeners=void 0;var Vde=10;function zD(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(ws,"defaultMaxListeners",{enumerable:!0,get:function(){return Vde},set:function(e){if(typeof e!="number"||e<0||Gde(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Vde=e}});ws.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};ws.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Gde(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Hde(e){return e._maxListeners===void 0?ws.defaultMaxListeners:e._maxListeners}ws.prototype.getMaxListeners=function(){return Hde(this)};ws.prototype.emit=function(t){for(var r=[],i=1;i0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l=="function")Ude(l,this,r);else for(var u=l.length,c=Xde(l,u),i=0;i0&&o.length>n&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,X5t(s)}return e}ws.prototype.addListener=function(t,r){return jde(this,t,r,!1)};ws.prototype.on=ws.prototype.addListener;ws.prototype.prependListener=function(t,r){return jde(this,t,r,!0)};function Z5t(){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 $de(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=Z5t.bind(i);return n.listener=r,i.wrapFn=n,n}ws.prototype.once=function(t,r){return zD(r),this.on(t,$de(this,t,r)),this};ws.prototype.prependOnceListener=function(t,r){return zD(r),this.prependListener(t,$de(this,t,r)),this};ws.prototype.removeListener=function(t,r){var i,n,a,o,s;if(zD(r),n=this._events,n===void 0)return this;if(i=n[t],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||r));else if(typeof i!="function"){for(a=-1,o=i.length-1;o>=0;o--)if(i[o]===r||i[o].listener===r){s=i[o].listener,a=o;break}if(a<0)return this;a===0?i.shift():K5t(i,a),i.length===1&&(n[t]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};ws.prototype.off=ws.prototype.removeListener;ws.prototype.removeAllListeners=function(t){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var a=Object.keys(i),o;for(n=0;n=0;n--)this.removeListener(t,r[n]);return this};function Wde(e,t,r){var i=e._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?J5t(n):Xde(n,n.length)}ws.prototype.listeners=function(t){return Wde(this,t,!0)};ws.prototype.rawListeners=function(t){return Wde(this,t,!1)};ws.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Yde.call(e,t)};ws.prototype.listenerCount=Yde;function Yde(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}ws.prototype.eventNames=function(){return this._eventsCount>0?RD(this._events):[]};function Xde(e,t){for(var r=new Array(t),i=0;i{"use strict";var dG=ib().EventEmitter,t4t={init:function(e){if(e._ev instanceof dG)return e;var t=new dG,r=new dG;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(i,n){t.emit(i,n),r.emit(i,n)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var i,n=e._ev;if(!n)return;var a=n._events[t];if(!a)return;function o(l){if(l.listener){if(n.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(n,[r])}else return l.apply(n,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var Jde=tt(),r4t=_y().dfltConfig;function i4t(e,t){for(var r=[],i,n=0;nr4t.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};$g.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};$g.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};$g.undo=function(t){var r,i;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,i=0;i=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,i=0;i{"use strict";tpe.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var Mw=W(mu=>{"use strict";var vd=xi(),_A=tt(),qD=Ja(),vG=pw(),n4t=pG(),a4t=dA(),o4t=_y().configAttributes,rpe=hs(),$p=_A.extendDeepAll,Tw=_A.isPlainObject,s4t=_A.isArrayOrTypedArray,OD=_A.nestedProperty,l4t=_A.valObjectMeta,gG="_isSubplotObj",ND="_isLinkedToArray",u4t="_arrayAttrRegexps",npe="_deprecated",mG=[gG,ND,u4t,npe];mu.IS_SUBPLOT_OBJ=gG;mu.IS_LINKED_TO_ARRAY=ND;mu.DEPRECATED=npe;mu.UNDERSCORE_ATTRS=mG;mu.get=function(){var e={};return vd.allTypes.forEach(function(t){e[t]=f4t(t)}),{defs:{valObjects:l4t,metaKeys:mG.concat(["description","role","editType","impliedEdits"]),editType:{traces:rpe.traces,layout:rpe.layout},impliedEdits:{}},traces:e,layout:h4t(),frames:d4t(),animation:Aw(a4t),config:Aw(o4t)}};mu.crawl=function(e,t,r,i){var n=r||0;i=i||"",Object.keys(e).forEach(function(a){var o=e[a];if(mG.indexOf(a)===-1){var s=(i?i+".":"")+a;t(o,a,e,n,s),!mu.isValObject(o)&&Tw(o)&&a!=="impliedEdits"&&mu.crawl(o,t,n+1,s)}})};mu.isValObject=function(e){return e&&e.valType!==void 0};mu.findArrayAttributes=function(e){var t=[],r=[],i=[],n,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),i=i.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(n,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)s4t(f)&&t.push(a+h);else if(i[u]){if(Array.isArray(f))for(var p=0;p=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!BD(o))return!1;e=a[n][o]}else e=a[n]}else e=a}}return e}function BD(e){return e===Math.round(e)&&e>=0}function f4t(e){var t,r;t=vd.modules[e]._module,r=t.basePlotModule;var i={};i.type=null;var n=$p({},qD),a=$p({},t.attributes);mu.crawl(a,function(l,u,c,f,h){OD(n,h).set(void 0),l===void 0&&OD(a,h).set(void 0)}),$p(i,n),vd.traceIs(e,"noOpacity")&&delete i.opacity,vd.traceIs(e,"showLegend")||(delete i.showlegend,delete i.legendgroup),vd.traceIs(e,"noHover")&&(delete i.hoverinfo,delete i.hoverlabel),t.selectPoints||delete i.selectedpoints,$p(i,a),r.attributes&&$p(i,r.attributes),i.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:Aw(i)};if(t.layoutAttributes){var s={};$p(s,t.layoutAttributes),o.layoutAttributes=Aw(s)}return t.animatable||mu.crawl(o,function(l){mu.isValObject(l)&&"anim"in l&&delete l.anim}),o}function h4t(){var e={},t,r;$p(e,vG);for(t in vd.subplotsRegistry)if(r=vd.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var i=0;i{"use strict";var Sw=tt(),y4t=Ja(),Fy="templateitemname",yG={name:{valType:"string",editType:"none"}};yG[Fy]={valType:"string",editType:"calc"};nb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=yG.name,t[Fy]=yG[Fy],t};nb.traceTemplater=function(e){var t={},r,i;for(r in e)i=e[r],Array.isArray(i)&&i.length&&(t[r]=0);function n(a){r=Sw.coerce(a,{},y4t,"type");var o={type:r,_template:null};if(r in t){i=e[r];var s=t[r]%i.length;t[r]++,o._template=i[s]}return o}return{newTrace:n}};nb.newContainer=function(e,t,r){var i=e._template,n=i&&(i[t]||r&&i[r]);Sw.isPlainObject(n)||(n=null);var a=e[t]={_template:n};return a};nb.arrayTemplater=function(e,t,r){var i=e._template,n=i&&i[spe(t)],a=i&&i[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[Fy]=u[Fy];if(!ope(f))return c._template=n,c;for(var h=0;h=i&&(r._input||{})._templateitemname;a&&(n=i);var o=t+"["+n+"]",s;function l(){s={},a&&(s[o]={},s[o][Fy]=a)}l();function u(p,d){s[p]=d}function c(p,d){a?Sw.nestedProperty(s[o],p).set(d):s[o+"."+p]=d}function f(){var p=s;return l(),p}function h(p,d){p&&c(p,d);var v=f();for(var m in v)Sw.nestedProperty(e,m).set(v[m])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Xl={};Jn(Xl,{AX_ID_PATTERN:()=>T4t,AX_NAME_PATTERN:()=>A4t,DFLTRANGEX:()=>L4t,DFLTRANGEY:()=>P4t,DRAGGERSIZE:()=>D4t,HOUR_PATTERN:()=>S4t,MINDRAG:()=>k4t,MINZOOM:()=>C4t,REDRAWDELAY:()=>F4t,SUBPLOT_PATTERN:()=>M4t,WEEKDAY_PATTERN:()=>E4t,attrRegex:()=>b4t,clipOnAxisFalseQuery:()=>R4t,idRegex:()=>x4t,layerValue2layerClass:()=>z4t,traceLayerClasses:()=>I4t,xAxisMatch:()=>_4t,yAxisMatch:()=>w4t,zindexSeparator:()=>B4t});var x4t,b4t,_4t,w4t,T4t,A4t,M4t,S4t,E4t,k4t,C4t,D4t,F4t,L4t,P4t,I4t,R4t,z4t,B4t,Zl=Ci(()=>{"use strict";fw();x4t={x:Zx("x","( domain)?"),y:Zx("y","( domain)?")},b4t=Zx("[xy]axis"),_4t=Zx("xaxis"),w4t=Zx("yaxis"),T4t=/^[xyz][0-9]*( domain)?$/,A4t=/^[xyz]axis[0-9]*$/,M4t=/^x([0-9]*)y([0-9]*)$/,S4t="hour",E4t="day of week",k4t=8,C4t=20,D4t=20,F4t=50,L4t=[-1,6],P4t=[-1,4],I4t=["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],R4t=[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],z4t={"above traces":"above","below traces":"below"},B4t="z"});var Ls=W(Vh=>{"use strict";var q4t=xi(),xG=(Zl(),Pt(Xl));Vh.id2name=function(t){if(!(typeof t!="string"||!t.match(xG.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Vh.name2id=function(t){if(t.match(xG.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Vh.cleanId=function(t,r,i){var n=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(xG.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(n&&!i)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(n&&i?" domain":"")}};Vh.list=function(e,t,r){var i=e._fullLayout;if(!i)return[];var n=Vh.listIds(e,t),a=new Array(n.length),o;for(o=0;oi?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Vh.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function lpe(e,t){if(t&&t.length){for(var r=0;r{"use strict";function O4t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function N4t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}upe.exports={clearOutlineControllers:O4t,clearOutline:N4t}});var UD=W((zqr,cpe)=>{"use strict";cpe.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Mc=W(GD=>{"use strict";var VD=xi(),Bqr=(Zl(),Pt(Xl)).SUBPLOT_PATTERN;GD.getSubplotCalcData=function(e,t,r){var i=VD.subplotsRegistry[t];if(!i)return[];for(var n=i.attr,a=[],o=0;o{"use strict";var U4t=xi(),Ew=tt();ab.manageCommandObserver=function(e,t,r,i){var n={},a=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var o=ab.hasSimpleAPICommandBindings(e,r,n.lookupTable);if(t&&t._commandObserver){if(o)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(o){fpe(e,o,n.cache),n.check=function(){if(a){var c=fpe(e,o,n.cache);return c.changed&&i&&n.lookupTable[c.value]!==void 0&&(n.disable(),Promise.resolve(i({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:n.lookupTable[c.value]})).then(n.enable,n.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+n;Ew.isPlainObject(a)?bG(a,t,o,i+1):t(o,n,a)}})}});var Qo=W((Uqr,Ape)=>{"use strict";var Nqr=gi(),G4t=K3().timeFormatLocale,H4t=QN().formatLocale,wA=hn(),j4t=tU(),$4t=N6().version,Ya=xi(),W4t=Mw(),Y4t=Ra(),Ei=tt(),X4t=ti(),vpe=(ra(),Pt(ia)).BADNUM,Gh=Ls(),Z4t=Ly().clearOutline,K4t=UD(),_G=dA(),J4t=pG(),Q4t=Mc().getModuleCalcData,gpe=Ei.relinkPrivateKeys,ob=Ei._,fi=Ape.exports={};Ei.extendFlat(fi,Ya);fi.attributes=Ja();fi.attributes.type.values=fi.allTypes;fi.fontAttrs=jo();fi.layoutAttributes=pw();var jD=ppe();fi.executeAPICommand=jD.executeAPICommand;fi.computeAPICommandBindings=jD.computeAPICommandBindings;fi.manageCommandObserver=jD.manageCommandObserver;fi.hasSimpleAPICommandBindings=jD.hasSimpleAPICommandBindings;fi.redrawText=function(e){return e=Ei.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Ya.getComponentMethod("annotations","draw")(e),Ya.getComponentMethod("legend","draw")(e),Ya.getComponentMethod("colorbar","draw")(e),t(fi.previousPromises(e)))},300)})};fi.resize=function(e){e=Ei.getGraphDiv(e);var t,r=new Promise(function(i,n){(!e||Ei.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=i,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ei.isHidden(e)){i(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Ya.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===i&&(delete e._resolveResize,i(e))})},100)});return t&&t(r),r};fi.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};fi.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var i=fi.graphJson(e,!1,"object");i.version=$4t;var n=new URL(t);n.searchParams.set("origin",window.location.origin);var a=window.open(n.href,"_blank");if(!a){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),e.emit("plotly_exportfail");return}var o=function(s){s.origin===r&&s.data&&s.data.type==="CHART_AUTH_SUCCESS"&&(a.postMessage({type:"chart",chart:i},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var eTt=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],tTt=["year","month","dayMonth","dayMonthYear"];fi.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,i=e._fullLayout||{};if(i._skipDefaults){delete i._skipDefaults;return}var n=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||fi.createTransitionData(e),n._dfltTitle={plot:ob(e,"Click to enter Plot title"),subtitle:ob(e,"Click to enter Plot subtitle"),x:ob(e,"Click to enter X axis title"),y:ob(e,"Click to enter Y axis title"),colorbar:ob(e,"Click to enter Colorscale title"),annotation:ob(e,"new text")},n._traceWord=ob(e,"trace");var h=mpe(e,eTt);if(i._initialAutoSizeIsDone){var p=i.width,d=i.height;fi.supplyLayoutGlobalDefaults(a,n,h),a.width||(n.width=p),a.height||(n.height=d),fi.sanitizeMargins(n)}else{fi.supplyLayoutGlobalDefaults(a,n,h);var v=!a.width||!a.height,m=n.autosize,g=c.autosizable,w=v&&(m||g);w?fi.plotAutoSize(e,a,n):v&&fi.sanitizeMargins(n),!m&&v&&(a.width=n.width,a.height=n.height)}n._d3locale=nTt(h,n.separators),n._extraFormat=mpe(e,tTt),n._initialAutoSizeIsDone=!0,n._dataLength=l.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var _=n._subplots=iTt(),b=n._splomAxes={x:{},y:{}},M=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=rTt(o,l),fi.supplyDataDefaults(l,s,a,n);var x=Object.keys(b.x),A=Object.keys(b.y);if(x.length>1&&A.length>1){for(Ya.getComponentMethod("grid","sizeDefaults")(a,n),f=0;f15&&A.length>15&&n.shapes.length===0&&n.images.length===0,fi.linkSubplots(s,n,o,i),fi.cleanPlot(s,n,o,i);var C=!!(i._has&&i._has("cartesian")),k=!!(n._has&&n._has("cartesian")),D=C,F=k;D&&!F?i._bgLayer.remove():F&&!D&&(n._shouldCreateBgLayer=!0),i._zoomlayer&&!e._dragging&&Z4t({_fullLayout:i}),aTt(s,n),gpe(n,i),Ya.getComponentMethod("colorscale","crossTraceDefaults")(s,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var P=n._tracePreGUI,R={},L;for(L in P)R[L]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=fi.layoutAttributes.width.min,h=fi.layoutAttributes.height.min;o1,d=!r.height&&Math.abs(i.height-s)>1;(d||p)&&(p&&(i.width=o),d&&(i.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),fi.sanitizeMargins(i)};fi.supplyLayoutModuleDefaults=function(e,t,r,i){var n=Ya.componentsRegistry,a=t._basePlotModules,o,s,l,u=Ya.subplotsRegistry.cartesian;for(o in n)l=n[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Ya.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ei.subplotSort);for(s=0;s1&&(r.l/=m,r.r/=m)}if(h){var g=(r.t+r.b)/h;g>1&&(r.t/=g,r.b/=g)}var w=r.xl!==void 0?r.xl:r.x,_=r.xr!==void 0?r.xr:r.x,b=r.yt!==void 0?r.yt:r.y,M=r.yb!==void 0?r.yb:r.y;p[t]={l:{val:w,size:r.l+v},r:{val:_,size:r.r+v},b:{val:M,size:r.b+v},t:{val:b,size:r.t+v}},d[t]=1}if(!i._replotting)return fi.doAutoMargin(e)}};function sTt(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Gh.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}fi.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,i=t.height;t._size||(t._size={}),bpe(t);var n=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ei.extendFlat({},n),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,p=t._pushmarginIds,d=t.minreducedwidth,v=t.minreducedheight;if(a.autoexpand!==!1){for(var m in h)p[m]||delete h[m];var g=e._fullLayout._reservedMargin;for(var w in g)for(var _ in g[w]){var b=g[w][_];o[_]=Math.max(o[_],b)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var M in o){var x=0;for(var A in h)A!=="base"&&wA(h[A][M].size)&&(x=h[A][M].size>x?h[A][M].size:x);var T=Math.max(0,a[M]-x);o[M]=Math.max(0,o[M]-T)}for(var y in h){var E=h[y].l||{},S=h[y].b||{},C=E.val,k=E.size,D=S.val,F=S.size,P=r-o.r-o.l,R=i-o.t-o.b;for(var L in h){if(wA(k)&&h[L].r){var I=h[L].r.val,B=h[L].r.size;if(I>C){var O=(k*I+(B-P)*C)/(I-C),$=(B*(1-C)+(k-P)*(1-I))/(I-C);O+$>l+u&&(l=O,u=$)}}if(wA(F)&&h[L].t){var X=h[L].t.val,K=h[L].t.size;if(X>D){var G=(F*X+(K-R)*D)/(X-D),q=(K*(1-D)+(F-R)*(1-X))/(X-D);G+q>f+c&&(f=G,c=q)}}}}}var J=Ei.constrain(r-a.l-a.r,_pe,d),N=Ei.constrain(i-a.t-a.b,wpe,v),V=Math.max(0,r-J),Y=Math.max(0,i-N);if(V){var H=(l+u)/V;H>1&&(l/=H,u/=H)}if(Y){var j=(f+c)/Y;j>1&&(f/=j,c/=j)}if(n.l=Math.round(l)+o.l,n.r=Math.round(u)+o.r,n.t=Math.round(c)+o.t,n.b=Math.round(f)+o.b,n.p=Math.round(a.pad),n.w=Math.round(r)-n.l-n.r,n.h=Math.round(i)-n.t-n.b,!t._replotting&&(fi.didMarginChange(s,n)||sTt(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Q=3*(1+Object.keys(p).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};fi.graphJson=function(e,t=!1,r="json",i=!1,n=!1){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&fi.supplyDefaults(e);var a=i?e._fullData:e.data,o=i?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,h){if(typeof f=="function")return h?"_function_":null;if(Ei.isPlainObject(f)){var p={};return Object.keys(f).sort().forEach(function(g){if(["_","["].indexOf(g.charAt(0))===-1){if(typeof f[g]=="function"){h&&(p[g]="_function");return}p[g]=l(f[g],h)}}),p}var d=Array.isArray(f),v=Ei.isTypedArray(f);if((d||v)&&f.dtype&&f.shape){var m=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Ei.isArrayBuffer(m)?j4t.encode(m):m},h)}return d?f.map(function(g){return l(g,h)}):v?Ei.simpleMap(f,Ei.identity):Ei.isJSDate(f)?Ei.ms2DateTimeLocal(+f):f}var u={data:(a||[]).map(function(f){var h=l(f);return t&&delete h.fit,h})};if(!t&&(u.layout=l(o),i)){var c=o._size;u.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(u.frames=l(s)),n&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};fi.modifyFrames=function(e,t){var r,i,n,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Ya.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,p=0;function d(){return h++,function(){p++,!i&&p===h&&s(f)}}r.runFn(d),setTimeout(d())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Ya.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[fi.previousPromises,l,r.prepareFn,fi.rehover,fi.reselect,o],c=Ei.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}fi.doCalcdata=function(e,t){var r=Gh.list(e),i=e._fullData,n=e._fullLayout,a,o,s,l=new Array(i.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},s=0;sMpe,svgAttrs:()=>dTt,xlink:()=>Spe,xmlns:()=>hTt});var hTt,Mpe,Spe,dTt,md=Ci(()=>{"use strict";hTt="http://www.w3.org/2000/xmlns/",Mpe="http://www.w3.org/2000/svg",Spe="http://www.w3.org/1999/xlink",dTt={xmlns:Mpe,"xmlns:xlink":Spe}});var Kl={};Jn(Kl,{CAP_SHIFT:()=>yTt,FROM_BL:()=>pTt,FROM_BR:()=>gTt,FROM_TL:()=>vTt,LINE_SPACING:()=>mTt,MID_SHIFT:()=>xTt,OPPOSITE_SIDE:()=>bTt});var pTt,vTt,gTt,mTt,yTt,xTt,bTt,Jl=Ci(()=>{"use strict";pTt={left:0,center:.5,right:1,bottom:0,middle:.5,top:1},vTt={left:0,center:.5,right:1,bottom:1,middle:.5,top:0},gTt={left:1,center:.5,right:0,bottom:0,middle:.5,top:1},mTt=1.3,yTt=.7,xTt=.35,bTt={left:"right",right:"left",top:"bottom",bottom:"top"}});var ao=W(Mf=>{"use strict";var ml=gi(),yd=tt(),_Tt=yd.strTranslate,wG=(md(),Pt(gd)),wTt=(Jl(),Pt(Kl)).LINE_SPACING,TTt=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,MG=e=>e?e.match(TTt):null;Mf.matchTex=MG;var ATt=e=>{var t=MG(e);return!!t&&!t[1]&&!t[3]};Mf.isPureTex=ATt;function Lpe(e,t,r,i,n,a,o,s){var l=i.select("g"),u=l.node().getBoundingClientRect(),c=u.width,f=u.height,h=o===void 0?c:o,p=s===void 0?f:s;(c>h||f>p)&&(i.style("overflow","hidden"),u=i.node().getBoundingClientRect(),c=u.width,f=u.height);var d=+e.attr("x"),v=+e.attr("y"),m=a||e.node().getBoundingClientRect().height,g=-m/4;t[0]==="y"?r.attr({transform:"rotate("+[-90,d,v]+")"+_Tt(-c/2,g-f/2)}):t[0]==="l"?v=g-f/2:t[0]==="a"&&t.indexOf("atitle")!==0?(d=0,v=g):(d=d-c*(n==="middle"?.5:n==="end"?1:0),v=v+g-f/2),i.attr({x:d,y:v})}function MTt(e){e.selectAll("a").each(function(){var t=ml.select(this);["href","xlink:href"].forEach(function(r){var i=t.attr(r);i&&t.attr(r,kG(i)||null)})})}Mf.convertToTspans=function(e,t,r){var i=e.text(),n=!e.attr("data-notex")&&t&&t._context.typesetMath&&MG(i);n&&!CTt()&&(n=null);var a=ml.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":i,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=OTt(e.node(),i);l&&e.style("pointer-events","all"),Mf.positionText(e),r&&r.call(e)}return n?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u},f=e.attr("text-anchor");DTt(n[2],c,function(h,p,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=h&&h.select("svg");if(!v||!v.node()){s(),l();return}e.style("display","none");var m=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":i,"data-math":"Y"});m.node().appendChild(v.node()),MTt(v),p&&p.node()&&v.node().insertBefore(p.node().cloneNode(!0),v.node().firstChild);var g=d.width,w=d.height;v.attr({class:o,height:w,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var _=e.node().style.fill||"black",b=v.select("g");b.attr({fill:_,stroke:_}),Lpe(e,o,m,v,f,u,g,w),r&&r.call(e,m),l(m)})})):s(),e};Mf.repositionMathGroup=function(e){if(!e.empty()){var t=(e.attr("class")?e.attr("class").split(" ")[0]:"text")+"-math",r=ml.select(e.node().parentNode),i=r.select("g."+t+"-group"),n=i.select("svg."+t);if(!(i.empty()||n.empty())){var a=e.attr("text-anchor"),o=parseInt(e.node().style.fontSize,10);Lpe(e,t,i,n,a,o)}}};Mf.getMathOrTextNode=function(e){var t=e.node();if(!t)return null;var r=(e.attr("class")?e.attr("class").split(" ")[0]:"text")+"-math",i=ml.select(t.parentNode).select("g."+r+"-group");return i.empty()?t:i.node()};var STt=/(<|<|<)/g,ETt=/(>|>|>)/g;function kTt(e){return e.replace(STt,"\\lt ").replace(ETt,"\\gt ")}var TG=null,Ppe=()=>typeof MathJax!="undefined"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,Epe=!1,kpe=!1;function CTt(){let e=Ppe();return e===3||e===4?!0:(e===null?Epe||(Epe=!0,yd.warn("MathJax is not loaded. Math equations will not be rendered.")):kpe||(kpe=!0,yd.warn("Unsupported MathJax version:",MathJax.version)),!1)}function DTt(e,t,r){let i=Ppe();var n;let a=function(){if(!TG){let u=MathJax._.output.svg_ts.SVG,c=yd.extendFlat({},MathJax.config.svg,{fontCache:"local"});i===4&&(c.linebreaks=yd.extendFlat({},c.linebreaks,{inline:!1})),TG=MathJax._.mathjax.mathjax.document(document,yd.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+yd.randstr({},64);n=ml.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=kTt(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return TG.convert(l,{display:!1})}).then(function(u){n.node().appendChild(u)})},o=function(){let s=n.select(".MathJax"),l=!s.empty()&&n.select("svg").node();if(!l)yd.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}n.remove()};Promise.resolve().then(a).then(o).catch(s=>{yd.log("MathJax typesetting failed.",e,s),n&&n.remove(),r()})}var Ipe={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"},FTt={sub:"0.3em",sup:"-0.6em"},LTt={sub:"-0.21em",sup:"0.42em"},Cpe="\u200B",Dpe=["http:","https:","mailto:","",void 0,":"],Rpe=Mf.NEWLINES=/(\r\n?|\n)/g,SG=/(<[^<>]*>)/,EG=/<(\/?)([^ >]*)(\s+(.*))?>/i,PTt=//i;Mf.BR_TAG_ALL=//gi;var zpe=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,Bpe=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,qpe=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,ITt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function sb(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&$D(i)}var RTt=/(^|;)\s*color:/;Mf.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,i=t.allowedTags!==void 0?t.allowedTags:["br"],n="...",a=n.length,o=e.split(SG),s=[],l="",u=0,c=0;ca?s.push(f.slice(0,Math.max(0,v-a))+n):s.push(f.slice(0,v));break}l=""}}return s.join("")};var zTt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},BTt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function $D(e){return e.replace(BTt,function(t,r){var i;return r.charAt(0)==="#"?i=qTt(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):i=zTt[r],i||t})}Mf.convertEntities=$D;function qTt(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function OTt(e,t){t=t.replace(Rpe," ");var r=!1,i=[],n,a=-1;function o(){a++;var x=document.createElementNS(wG.svg,"tspan");ml.select(x).attr({class:"line",dy:a*wTt+"em"}),e.appendChild(x),n=x;var A=i;if(i=[{node:x}],A.length>1)for(var T=1;T.",t);return}var A=i.pop();x!==A.type&&yd.log("Start tag <"+A.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),n=i[i.length-1].node}var c=PTt.test(t);c?o():(n=e,i=[{node:e}]);for(var f=t.split(SG),h=0;h{"use strict";var NTt=gi(),AA=hn(),WD=tt(),lb=ti(),UTt=Xx().isValid;function VTt(e,t,r){var i=t?WD.nestedProperty(e,t).get()||{}:e,n=i[r||"color"];n&&n._inputArray&&(n=n._inputArray);var a=!1;if(WD.isArrayOrTypedArray(n)){for(var o=0;o=0;i--,n++){var a=e[i];r[n]=[1-a[0],a[1]]}return r}function Gpe(e,t){t=t||{};for(var r=e.domain,i=e.range,n=i.length,a=new Array(n),o=0;o{"use strict";var jpe=($V(),Pt(jV)),HTt=jpe.FORMAT_LINK,jTt=jpe.DATE_FORMAT_LINK;function $Tt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?CG:$pe)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function CG(e,t){return["Sets the "+e+" formatting rule"+(t?" for `"+t+"`":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+HTt+"."].join(" ")}function $pe(e,t){return CG(e,t)+[" And for dates see: "+jTt+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}Wpe.exports={axisHoverFormat:$Tt,descriptionOnlyNumbers:CG,descriptionWithDates:$pe}});var ac=W(($qr,cve)=>{"use strict";var Ype=jo(),kw=Yl(),uve=zu().dash,FG=an().extendFlat,Xpe=Ra().templatedArray,jqr=Wa().templateFormatStringDescription,Zpe=Ts().descriptionWithDates,WTt=(ra(),Pt(ia)).ONEDAY,d1=(Zl(),Pt(Xl)),YTt=d1.HOUR_PATTERN,XTt=d1.WEEKDAY_PATTERN,DG={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},ZTt=FG({},DG,{values:DG.values.slice().concat(["sync"])});function Kpe(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Jpe={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Qpe={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},eve={valType:"data_array",editType:"ticks"},tve={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function rve(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function ive(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var nve={valType:"color",dflt:kw.defaultLine,editType:"ticks"},ave={valType:"color",dflt:kw.lightLine,editType:"ticks"};function ove(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var sve=FG({},uve,{editType:"ticks"}),lve={valType:"boolean",editType:"ticks"};cve.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:kw.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Ype({editType:"ticks",description:"Sets this axis' title font."}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[d1.idRegex.x.toString(),d1.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[d1.idRegex.x.toString(),d1.idRegex.y.toString()],editType:"calc"},rangebreaks:Xpe("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[XTt,YTt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:WTt},editType:"calc"}),tickmode:ZTt,nticks:Kpe(),tick0:Jpe,dtick:Qpe,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:eve,ticktext:{valType:"data_array",editType:"ticks"},ticks:tve,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:rve(),tickwidth:ive(),tickcolor:nve,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:FG({},uve,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Ype({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Zpe("tick label")},tickformatstops:Xpe("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Zpe("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:kw.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:lve,gridcolor:ave,gridwidth:ove(),griddash:sve,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:kw.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:kw.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",d1.idRegex.x.toString(),d1.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",d1.idRegex.x.toString(),d1.idRegex.y.toString()],editType:"plot"},minor:{tickmode:DG,nticks:Kpe("minor"),tick0:Jpe,dtick:Qpe,tickvals:eve,ticks:tve,ticklen:rve("minor"),tickwidth:ive("minor"),tickcolor:nve,gridcolor:ave,gridwidth:ove("minor"),griddash:sve,showgrid:lve,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},domainpad:{left:{valType:"number",min:0,dflt:0,editType:"plot"},right:{valType:"number",min:0,dflt:0,editType:"plot"},top:{valType:"number",min:0,dflt:0,editType:"plot"},bottom:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var YD=W((Wqr,hve)=>{"use strict";var As=ac(),fve=jo(),LG=an().extendFlat,KTt=hs().overrideAll;hve.exports=KTt({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:As.linecolor,outlinewidth:As.linewidth,bordercolor:As.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:As.minor.tickmode,nticks:As.nticks,tick0:As.tick0,dtick:LG({},As.dtick,{}),tickvals:As.tickvals,ticktext:As.ticktext,ticks:LG({},As.ticks,{dflt:""}),ticklabeloverflow:LG({},As.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:As.ticklen,tickwidth:As.tickwidth,tickcolor:As.tickcolor,ticklabelstep:As.ticklabelstep,showticklabels:As.showticklabels,labelalias:As.labelalias,tickfont:fve({description:"Sets the color bar's tick label font"}),tickangle:As.tickangle,tickformat:As.tickformat,tickformatstops:As.tickformatstops,tickprefix:As.tickprefix,showtickprefix:As.showtickprefix,ticksuffix:As.ticksuffix,showticksuffix:As.showticksuffix,separatethousands:As.separatethousands,exponentformat:As.exponentformat,minexponent:As.minexponent,showexponent:As.showexponent,title:{text:{valType:"string"},font:fve({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Fo=W((Xqr,pve)=>{"use strict";var JTt=YD(),QTt=(fw(),Pt(fA)).counter,e6t=(Qx(),Pt(Jx)).default,dve=Xx().scales,Yqr=e6t(dve);function XD(e){return"`"+e+"`"}pve.exports=function(t,r){t=t||"",r=r||{};var i=r.cLetter||"c",n="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:i==="z",s=typeof r.colorscaleDflt=="string"?dve[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[i],f="in "+XD(u+c));var h=n?" Has an effect only if "+f+" is set to a numerical array.":"",p=i+"auto",d=i+"min",v=i+"max",m=i+"mid",g=XD(u+p),w=XD(u+d),_=XD(u+v),b=w+" and "+_,M={};M[d]=M[v]=void 0;var x={};x[p]=!1;var A={};return c==="color"&&(A.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(A.color.anim=!0)),A[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M},A[d]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},A[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},A[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:M},A.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},A.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},A.reversescale={valType:"boolean",dflt:!1,editType:"plot"},a||(A.showscale={valType:"boolean",dflt:o,editType:"calc"},A.colorbar=JTt),r.noColorAxis||(A.coloraxis={valType:"subplotid",regex:QTt("coloraxis"),dflt:null,editType:"calc"}),A}});var IG=W((Zqr,vve)=>{"use strict";var t6t=an().extendFlat,r6t=Fo(),PG=Xx().scales;vve.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:PG.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:PG.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:PG.RdBu,editType:"calc"}},coloraxis:t6t({_isSubplotObj:!0,editType:"calc"},r6t("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var RG=W((Kqr,gve)=>{"use strict";var i6t=tt();gve.exports=function(t){return i6t.isPlainObject(t.colorbar)}});var qG=W(BG=>{"use strict";var zG=hn(),mve=tt(),yve=(ra(),Pt(ia)),n6t=yve.ONEDAY,a6t=yve.ONEWEEK;BG.dtick=function(e,t){var r=t==="log",i=t==="date",n=t==="category",a=i?n6t:1;if(!e)return a;if(zG(e))return e=Number(e),e<=0?a:n?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if(typeof e!="string"||!(i||r))return a;var o=e.charAt(0),s=e.slice(1);return s=zG(s)?Number(s):0,s<=0||!(i&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?a:e};BG.tick0=function(e,t,r,i){if(t==="date")return mve.cleanDate(e,mve.dateTick0(r,i%a6t===0?1:0));if(!(i==="D1"||i==="D2"))return zG(e)?Number(e):0}});var ub=W((Qqr,bve)=>{"use strict";var xve=qG(),o6t=tt().isArrayOrTypedArray,s6t=Tc().isTypedArraySpec,l6t=Tc().decodeTypedArraySpec;bve.exports=function(t,r,i,n,a={}){var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(b){var M=s[b];return s6t(M)&&(M=l6t(M)),M!==void 0?M:(l._template||{})[b]}var f=c("tick0"),h=c("dtick"),p=c("tickvals"),d=c("overlaying"),v=n==="category"||n==="multicategory",m;o6t(p)?m="array":h?m="linear":d&&!v?m="sync":m="auto";var g=i(u+"tickmode",m);if(g==="auto"||g==="sync")i(u+"nticks");else if(g==="linear"){var w=l.dtick=xve.dtick(h,n);l.tick0=xve.tick0(f,n,r.calendar,w)}else if(n!=="multicategory"){var _=i(u+"tickvals");_===void 0?l.tickmode="auto":o||i("ticktext")}}});var Cw=W((eOr,wve)=>{"use strict";var OG=tt(),_ve=ac();wve.exports=function(t,r,i,n){var a=n.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?_ve.minor:_ve,u=a?"minor.":"",c=OG.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=OG.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=OG.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),p=i(u+"ticks",!a&&n.outerTicks||c||f||h?"outside":"");p||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var NG=W((tOr,Tve)=>{"use strict";Tve.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],i=r.filter(function(a){return t[a]!==void 0}),n=function(a){return t[a]===t[i[0]]};if(i.every(n)||i.length===1)return t[i[0]]}});var tf=W((rOr,Ave)=>{"use strict";var ZD=tt(),u6t=Ra();Ave.exports=function(t,r,i){var n=i.name,a=i.inclusionAttr||"visible",o=r[n],s=ZD.isArrayOrTypedArray(t[n])?t[n]:[],l=r[n]=[],u=u6t.arrayTemplater(r,n,a),c,f;for(c=0;c{"use strict";var UG=tt(),c6t=ti().contrast,Mve=ac(),f6t=NG(),h6t=tf();Sve.exports=function(t,r,i,n,a){a||(a={});var o=i("labelalias");UG.isPlainObject(o)||delete r.labelalias;var s=f6t(t),l=i("showticklabels");if(l){a.noTicklabelshift||i("ticklabelshift"),a.noTicklabelstandoff||i("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?c6t(a.bgColor):c&&c!==Mve.color.dflt?c:u.color;if(UG.coerceFont(i,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&i("ticklabelstep"),!a.noAng){var p=i("tickangle");!a.noAutotickangles&&p==="auto"&&i("autotickangles")}if(n!=="category"){var d=i("tickformat");h6t(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:d6t}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!d&&n!=="date"&&(i("showexponent",s),i("exponentformat"),i("minexponent"),i("separatethousands"))}!a.noMinorloglabels&&n==="log"&&i("minorloglabels")}};function d6t(e,t){function r(n,a){return UG.coerce(e,t,Mve.tickformatstops,n,a)}var i=r("enabled");i&&(r("dtickrange"),r("value"))}});var Iy=W((nOr,Eve)=>{"use strict";var p6t=NG();Eve.exports=function(t,r,i,n,a){a||(a={});var o=a.tickSuffixDflt,s=p6t(t),l=i("tickprefix");l&&i("showtickprefix",s);var u=i("ticksuffix",o);u&&i("showticksuffix",s)}});var VG=W((aOr,kve)=>{"use strict";var Ry=tt(),v6t=Ra(),g6t=ub(),m6t=Cw(),y6t=Py(),x6t=Iy(),b6t=YD();kve.exports=function(t,r,i){var n=v6t.newContainer(r,"colorbar"),a=t.colorbar||{};function o(S,C){return Ry.coerce(a,n,b6t,S,C)}var s=i.margin||{t:0,b:0,l:0,r:0},l=i.width-s.l-s.r,u=i.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var p=o("lenmode");o("len",p==="fraction"?1:f?u:l);var d=o("yref"),v=o("xref"),m=d==="paper",g=v==="paper",w,_,b,M="left";f?(b="middle",M=g?"left":"right",w=g?1.02:1,_=.5):(b=m?"bottom":"top",M="center",w=.5,_=m?1.02:1),Ry.coerce(a,n,{x:{valType:"number",min:g?-2:0,max:g?3:1,dflt:w}},"x"),Ry.coerce(a,n,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:_}},"y"),o("xanchor",M),o("xpad"),o("yanchor",b),o("ypad"),Ry.noneOrAll(a,n,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=Ry.coerce(a,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),g6t(a,n,o,"linear");var A=i.font,T={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:A};x.indexOf("inside")!==-1&&(T.bgColor="black"),x6t(a,n,o,"linear",T),y6t(a,n,o,"linear",T),m6t(a,n,o,"linear",T),o("title.text",i._dfltTitle.colorbar);var y=n.showticklabels?n.tickfont:A,E=Ry.extendFlat({},A,{family:y.family,size:Ry.bigFont(y.size)});Ry.coerceFont(o,"title.font",E),o("title.side",f?"top":"right")}});var Bu=W((oOr,Fve)=>{"use strict";var Cve=hn(),HG=tt(),_6t=RG(),w6t=VG(),Dve=Xx().isValid,T6t=xi().traceIs;function GG(e,t){var r=t.slice(0,t.length-1);return t?HG.nestedProperty(e,r).get()||{}:e}Fve.exports=function e(t,r,i,n,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=GG(t,o),c=GG(r,o),f=GG(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,i,n,a)};if(l){var p=i._colorAxes||{},d=n(o+"coloraxis");if(d){var v=T6t(r,"contour")&&HG.nestedProperty(r,"contours.coloring").get()||"heatmap",m=p[d];m?(m[2].push(h),m[0]!==v&&(m[0]=!1,HG.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):p[d]=[v,r,[h]];return}}var g=u[s+"min"],w=u[s+"max"],_=Cve(g)&&Cve(w)&&g{"use strict";var Lve=tt(),A6t=Ra(),Pve=IG(),M6t=Bu();Ive.exports=function(t,r){function i(f,h){return Lve.coerce(t,r,Pve,f,h)}i("colorscale.sequential"),i("colorscale.sequentialminus"),i("colorscale.diverging");var n=r._colorAxes,a,o;function s(f,h){return Lve.coerce(a,o,Pve.coloraxis,f,h)}for(var l in n){var u=n[l];if(u[0])a=t[l]||{},o=A6t.newContainer(r,l,"coloraxis"),o._name=l,M6t(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var S6t=tt(),E6t=Sc().hasColorscale,k6t=Sc().extractOpts;zve.exports=function(t,r){function i(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function n(c,f){var h=f.container?S6t.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var p=k6t(h),d=p.auto;(d||p.min===void 0)&&i(h,f.min),(d||p.max===void 0)&&i(h,f.max),p.autocolorscale&&i(h,"colorscale")}}for(var a=0;a{"use strict";var qve=hn(),jG=tt(),C6t=Sc().extractOpts;Ove.exports=function(t,r,i){var n=t._fullLayout,a=i.vals,o=i.containerStr,s=o?jG.nestedProperty(r,o).get():r,l=C6t(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,p=function(){return jG.aggNums(Math.min,null,a)},d=function(){return jG.aggNums(Math.max,null,a)};if(c===void 0?c=p():u&&(s._colorAx&&qve(c)?c=Math.min(c,p()):c=p()),f===void 0?f=d():u&&(s._colorAx&&qve(f)?f=Math.max(f,d()):f=d()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?v=n.colorscale.sequential:v=n.colorscale.sequentialminus,l._sync("colorscale",v)}}});var es=W((cOr,Nve)=>{"use strict";var KD=Xx(),Dw=Sc();Nve.exports={moduleType:"component",name:"colorscale",attributes:Fo(),layoutAttributes:IG(),supplyLayoutDefaults:Rve(),handleDefaults:Bu(),crossTraceDefaults:Bve(),calc:rf(),scales:KD.scales,defaultScale:KD.defaultScale,getScale:KD.get,isValidScale:KD.isValid,hasColorscale:Dw.hasColorscale,extractOpts:Dw.extractOpts,extractScale:Dw.extractScale,flipScale:Dw.flipScale,makeColorScaleFunc:Dw.makeColorScaleFunc,makeColorScaleFuncFromTrace:Dw.makeColorScaleFuncFromTrace}});var Wo=W((fOr,Vve)=>{"use strict";var Uve=tt(),D6t=Tc().isTypedArraySpec;Vve.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return Uve.isPlainObject(t)&&(Uve.isArrayOrTypedArray(t.size)||D6t(t.size))}}});var MA=W((hOr,Gve)=>{"use strict";var F6t=hn();Gve.exports=function(t,r){r||(r=2);var i=t.marker,n=i.sizeref||1,a=i.sizemin||0,o=i.sizemode==="area"?function(s){return Math.sqrt(s/n)}:function(s){return s/n};return function(s){var l=o(s/r);return F6t(l)&&l>0?Math.max(l,a):0}}});var ah=W(Ec=>{"use strict";var SA=tt();Ec.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Ec.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],i=e.yaxes||[],n=0;n=0&&r.index{var $G={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},R6t=/([astvzqmhlc])([^astvzqmhlc]*)/gi,z6t=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function B6t(e){let t=[];return e.replace(R6t,(r,i,n)=>{let a=i.toLowerCase(),o=i,s=q6t(n);for(a==="m"&&s.length>2&&(t.push([o,...s.splice(0,2)]),a="l",o=o==="m"?"l":"L");;){if(s.length===$G[a])return t.push([o,...s]),"";if(s.length<$G[a])throw new Error("malformed path data");t.push([o,...s.splice(0,$G[a])])}}),t}function q6t(e){let t=e.match(z6t);return t?t.map(Number):[]}$ve.exports=B6t});var Qve=W((vOr,Jve)=>{"use strict";var O6t=WG(),Yr=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},Gn="M0,0Z",Wve=Math.sqrt(2),zy=Math.sqrt(3),YG=Math.PI,XG=Math.cos,ZG=Math.sin;Jve.exports={circle:{n:0,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n="M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z";return r?jn(t,r,n):n}},square:{n:1,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")}},diamond:{n:2,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.3,2);return jn(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"Z")}},cross:{n:3,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.4,2),n=Yr(e*1.2,2);return jn(t,r,"M"+n+","+i+"H"+i+"V"+n+"H-"+i+"V"+i+"H-"+n+"V-"+i+"H-"+i+"V-"+n+"H"+i+"V-"+i+"H"+n+"Z")}},x:{n:4,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.8/Wve,2),n="l"+i+","+i,a="l"+i+",-"+i,o="l-"+i+",-"+i,s="l-"+i+","+i;return jn(t,r,"M0,"+i+n+a+o+a+o+s+o+s+n+s+n+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2/zy,2),n=Yr(e/2,2),a=Yr(e,2);return jn(t,r,"M-"+i+","+n+"H"+i+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2/zy,2),n=Yr(e/2,2),a=Yr(e,2);return jn(t,r,"M-"+i+",-"+n+"H"+i+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2/zy,2),n=Yr(e/2,2),a=Yr(e,2);return jn(t,r,"M"+n+",-"+i+"V"+i+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2/zy,2),n=Yr(e/2,2),a=Yr(e,2);return jn(t,r,"M-"+n+",-"+i+"V"+i+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.6,2),n=Yr(e*1.2,2);return jn(t,r,"M-"+n+",-"+i+"H"+i+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.6,2),n=Yr(e*1.2,2);return jn(t,r,"M"+i+",-"+n+"V"+i+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.6,2),n=Yr(e*1.2,2);return jn(t,r,"M"+n+","+i+"H-"+i+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.6,2),n=Yr(e*1.2,2);return jn(t,r,"M-"+i+","+n+"V-"+i+"H"+n+"Z")}},pentagon:{n:13,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.951,2),n=Yr(e*.588,2),a=Yr(-e,2),o=Yr(e*-.309,2),s=Yr(e*.809,2);return jn(t,r,"M"+i+","+o+"L"+n+","+s+"H-"+n+"L-"+i+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n=Yr(e/2,2),a=Yr(e*zy/2,2);return jn(t,r,"M"+a+",-"+n+"V"+n+"L0,"+i+"L-"+a+","+n+"V-"+n+"L0,-"+i+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n=Yr(e/2,2),a=Yr(e*zy/2,2);return jn(t,r,"M-"+n+","+a+"H"+n+"L"+i+",0L"+n+",-"+a+"H-"+n+"L-"+i+",0Z")}},octagon:{n:16,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.924,2),n=Yr(e*.383,2);return jn(t,r,"M-"+n+",-"+i+"H"+n+"L"+i+",-"+n+"V"+n+"L"+n+","+i+"H-"+n+"L-"+i+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,t,r){if(Hn(t))return Gn;var i=e*1.4,n=Yr(i*.225,2),a=Yr(i*.951,2),o=Yr(i*.363,2),s=Yr(i*.588,2),l=Yr(-i,2),u=Yr(i*-.309,2),c=Yr(i*.118,2),f=Yr(i*.809,2),h=Yr(i*.382,2);return jn(t,r,"M"+n+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+n+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.66,2),n=Yr(e*.38,2),a=Yr(e*.76,2);return jn(t,r,"M-"+a+",0l-"+n+",-"+i+"h"+a+"l"+n+",-"+i+"l"+n+","+i+"h"+a+"l-"+n+","+i+"l"+n+","+i+"h-"+a+"l-"+n+","+i+"l-"+n+",-"+i+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*zy*.8,2),n=Yr(e*.8,2),a=Yr(e*1.6,2),o=Yr(e*4,2),s="A "+o+","+o+" 0 0 1 ";return jn(t,r,"M-"+i+","+n+s+i+","+n+s+"0,-"+a+s+"-"+i+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*zy*.8,2),n=Yr(e*.8,2),a=Yr(e*1.6,2),o=Yr(e*4,2),s="A "+o+","+o+" 0 0 1 ";return jn(t,r,"M"+i+",-"+n+s+"-"+i+",-"+n+s+"0,"+a+s+i+",-"+n+"Z")}},"star-square":{n:21,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.1,2),n=Yr(e*2,2),a="A "+n+","+n+" 0 0 1 ";return jn(t,r,"M-"+i+",-"+i+a+"-"+i+","+i+a+i+","+i+a+i+",-"+i+a+"-"+i+",-"+i+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.4,2),n=Yr(e*1.9,2),a="A "+n+","+n+" 0 0 1 ";return jn(t,r,"M-"+i+",0"+a+"0,"+i+a+i+",0"+a+"0,-"+i+a+"-"+i+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*.7,2),n=Yr(e*1.4,2);return jn(t,r,"M0,"+n+"L"+i+",0L0,-"+n+"L-"+i+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.4,2),n=Yr(e*.7,2);return jn(t,r,"M0,"+n+"L"+i+",0L0,-"+n+"L-"+i+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M"+i+","+i+"H-"+i+"L"+i+",-"+i+"H-"+i+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M"+i+","+i+"V-"+i+"L-"+i+","+i+"V-"+i+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n=Yr(e/Wve,2);return jn(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.3,2);return jn(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM0,-"+i+"V"+i+"M-"+i+",0H"+i)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.3,2),n=Yr(e*.65,2);return jn(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.4,2);return jn(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.2,2),n=Yr(e*.85,2);return jn(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e/2,2),n=Yr(e,2);return jn(t,r,"M"+i+","+n+"V-"+n+"M"+(i-n)+",-"+n+"V"+n+"M"+n+","+i+"H-"+n+"M-"+n+","+(i-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.2,2),n=Yr(e*1.6,2),a=Yr(e*.8,2);return jn(t,r,"M-"+i+","+a+"L0,0M"+i+","+a+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.2,2),n=Yr(e*1.6,2),a=Yr(e*.8,2);return jn(t,r,"M-"+i+",-"+a+"L0,0M"+i+",-"+a+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.2,2),n=Yr(e*1.6,2),a=Yr(e*.8,2);return jn(t,r,"M"+a+","+i+"L0,0M"+a+",-"+i+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.2,2),n=Yr(e*1.6,2),a=Yr(e*.8,2);return jn(t,r,"M-"+a+","+i+"L0,0M-"+a+",-"+i+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.4,2);return jn(t,r,"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*1.4,2);return jn(t,r,"M0,"+i+"V-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2);return jn(t,r,"M"+i+","+i+"L-"+i+",-"+i)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n=Yr(e*2,2);return jn(t,r,"M0,0L-"+i+","+n+"H"+i+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n=Yr(e*2,2);return jn(t,r,"M0,0L-"+i+",-"+n+"H"+i+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2,2),n=Yr(e,2);return jn(t,r,"M0,0L"+i+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2,2),n=Yr(e,2);return jn(t,r,"M0,0L-"+i+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n=Yr(e*2,2);return jn(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+","+n+"H"+i+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e,2),n=Yr(e*2,2);return jn(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+",-"+n+"H"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2,2),n=Yr(e,2);return jn(t,r,"M0,-"+n+"V"+n+"M0,0L"+i+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(Hn(t))return Gn;var i=Yr(e*2,2),n=Yr(e,2);return jn(t,r,"M0,-"+n+"V"+n+"M0,0L-"+i+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(Hn(t))return Gn;var i=YG/2.5,n=2*e*XG(i),a=2*e*ZG(i);return jn(t,r,"M0,0L"+-n+","+a+"L"+n+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(Hn(t))return Gn;var i=YG/4,n=2*e*XG(i),a=2*e*ZG(i);return jn(t,r,"M0,0L"+-n+","+a+"A "+2*e+","+2*e+" 0 0 1 "+n+","+a+"Z")},backoff:.4,noDot:!0}};function Hn(e){return e===null}var Yve,Xve,Zve,Kve;function jn(e,t,r){if((!e||e%360===0)&&!t)return r;if(Zve===e&&Kve===t&&Yve===r)return Xve;Zve=e,Kve=t,Yve=r;function i(m,g){var w=XG(m),_=ZG(m),b=g[0],M=g[1]+(t||0);return[b*w-M*_,b*_+M*w]}for(var n=e/180*YG,a=0,o=0,s=O6t(r),l="",u=0;u{"use strict";var qu=gi(),wo=tt(),N6t=wo.numberFormat,By=hn(),QD=xi(),yu=ti(),U6t=es(),kA=wo.strTranslate,e7=ao(),V6t=(md(),Pt(gd)),G6t=(Jl(),Pt(Kl)),H6t=G6t.LINE_SPACING,u1e=(Ng(),Pt(Og)).DESELECTDIM,j6t=Wo(),$6t=MA(),W6t=ah().appendArrayPointValue,ui={};x1e.exports=ui;ui.font=function(e,t){var r=t.variant,i=t.style,n=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(yu.fill,a),n&&e.style("font-weight",n),i&&e.style("font-style",i),r&&e.style("font-variant",r),c&&e.style("text-transform",KG(X6t(c))),l&&e.style("text-shadow",l==="auto"?e7.makeTextShadow(yu.contrast(a)):KG(l)),u&&e.style("text-decoration-line",KG(Z6t(u)))};function KG(e){return e==="none"?void 0:e}var Y6t={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function X6t(e){return Y6t[e]}function Z6t(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ui.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};ui.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};ui.setRect=function(e,t,r,i,n){e.call(ui.setPosition,t,r).call(ui.setSize,i,n)};ui.translatePoint=function(e,t,r,i){var n=r.c2p(e.x),a=i.c2p(e.y);if(By(n)&&By(a)&&t.node())t.node().nodeName==="text"?t.attr("x",n).attr("y",a):t.attr("transform",kA(n,a));else return!1;return!0};ui.translatePoints=function(e,t,r){e.each(function(i){var n=qu.select(this);ui.translatePoint(i,n,t,r)})};ui.hideOutsideRangePoint=function(e,t,r,i,n,a){t.attr("display",r.isPtWithinRange(e,n)&&i.isPtWithinRange(e,a)?null:"none")};ui.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each(function(n){var a=n[0].trace,o=a.xcalendar,s=a.ycalendar,l=QD.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){ui.hideOutsideRangePoint(u,qu.select(this),r,i,o,s)})})}};ui.crispRound=function(e,t,r){return!t||!By(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};ui.singleLineStyle=function(e,t,r,i,n){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=n||a.dash||"";yu.stroke(t,i||a.color),ui.dashLine(t,s,o)};ui.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each(function(n){var a=(((n||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=i||a.dash||"";qu.select(this).call(yu.stroke,r||a.color).call(ui.dashLine,s,o)})};ui.dashLine=function(e,t,r){r=+r||0,t=ui.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};ui.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function c1e(e,t,r,i){var n=t.fillpattern,a=t.fillgradient,o=ui.getPatternAttr,s=n&&(o(n.shape,0,"")||o(n.path,0,""));if(s){var l=o(n.bgcolor,0,null),u=o(n.fgcolor,0,null),c=n.fgopacity,f=o(n.size,0,8),h=o(n.solidity,0,.3),p=t.uid;ui.pattern(e,"point",r,p,s,f,h,void 0,n.fillmode,l,u,c)}else if(a&&a.type!=="none"){var d=a.type,v="scatterfill-"+t.uid;if(i&&(v="legendfill-"+t.uid),!i&&(a.start!==void 0||a.stop!==void 0)){var m,g;d==="horizontal"?(m={x:a.start,y:0},g={x:a.stop,y:0}):d==="vertical"&&(m={x:0,y:a.start},g={x:0,y:a.stop}),m.x=t._xA.c2p(m.x===void 0?t._extremes.x.min[0].val:m.x,!0),m.y=t._yA.c2p(m.y===void 0?t._extremes.y.min[0].val:m.y,!0),g.x=t._xA.c2p(g.x===void 0?t._extremes.x.max[0].val:g.x,!0),g.y=t._yA.c2p(g.y===void 0?t._extremes.y.max[0].val:g.y,!0),e.call(d1e,r,v,"linear",a.colorscale,"fill",m,g,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(ui.gradient,r,v,d,a.colorscale,"fill")}else t.fillcolor&&e.call(yu.fill,t.fillcolor)}ui.singleFillStyle=function(e,t){var r=qu.select(e.node()),i=r.data(),n=((i[0]||[])[0]||{}).trace||{};c1e(e,n,t,!1)};ui.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(i){var n=qu.select(this);i[0].trace&&c1e(n,i[0].trace,t,r)})};var e1e=Qve();ui.symbolNames=[];ui.symbolFuncs=[];ui.symbolBackOffs=[];ui.symbolNeedLines={};ui.symbolNoDot={};ui.symbolNoFill={};ui.symbolList=[];Object.keys(e1e).forEach(function(e){var t=e1e[e],r=t.n;ui.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),ui.symbolNames[r]=e,ui.symbolFuncs[r]=t.f,ui.symbolBackOffs[r]=t.backoff||0,t.needLine&&(ui.symbolNeedLines[r]=!0),t.noDot?ui.symbolNoDot[r]=!0:ui.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(ui.symbolNoFill[r]=!0)});var K6t=ui.symbolNames.length,J6t="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ui.symbolNumber=function(e){if(By(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=ui.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=K6t||e>=400?0:Math.floor(Math.max(e,0))};function f1e(e,t,r,i){var n=e%100;return ui.symbolFuncs[n](t,r,i)+(e>=200?J6t:"")}var t1e=N6t("~f"),h1e={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}};ui.gradient=function(e,t,r,i,n,a){var o=h1e[i];return d1e(e,t,r,o.type,n,a,o.start,o.stop,!1,o.reversed)};function d1e(e,t,r,i,n,a,o,s,l,u){var c=n.length,f;i==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:i==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),p=0;p=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),i.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=i.ms2mrc(e.ms),e.mrc=l,i.selectedSizeFn&&(l=e.mrc=i.selectedSizeFn(e));var u=ui.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=nH(e,r),f=iH(e,r);t.attr("d",f1e(u,l,c,f))}var h=!1,p,d,v;if(e.so)v=s.outlierwidth,d=s.outliercolor,p=o.outliercolor;else{var m=(s||{}).width;v=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?d=e.mlcc=i.lineScale(e.mlc):wo.isArrayOrTypedArray(s.color)?d=yu.defaultLine:d=s.color,wo.isArrayOrTypedArray(o.color)&&(p=yu.defaultLine,h=!0),"mc"in e?p=e.mcc=i.markerScale(e.mc):p=o.color||o.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(p=i.selectedColorFn(e))}let g=e.mld||(s||{}).dash;if(g&&ui.dashLine(t,g,v),e.om)t.call(yu.stroke,p).style({"stroke-width":(v||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:v)+"px");var w=o.gradient,_=e.mgt;_?h=!0:_=w&&w.type,wo.isArrayOrTypedArray(_)&&(_=_[0],h1e[_]||(_=0));var b=o.pattern,M=ui.getPatternAttr,x=b&&(M(b.shape,e.i,"")||M(b.path,e.i,""));if(_&&_!=="none"){var A=e.mgc;A?h=!0:A=w.color;var T=r.uid;h&&(T+="-"+e.i),ui.gradient(t,n,T,_,[[0,A],[1,p]],"fill")}else if(x){var y=!1,E=b.fgcolor;!E&&a&&a.color&&(E=a.color,y=!0);var S=M(E,e.i,a&&a.color||null),C=M(b.bgcolor,e.i,null),k=b.fgopacity,D=M(b.size,e.i,8),F=M(b.solidity,e.i,.3);y=y||e.mcc||wo.isArrayOrTypedArray(b.shape)||wo.isArrayOrTypedArray(b.path)||wo.isArrayOrTypedArray(b.bgcolor)||wo.isArrayOrTypedArray(b.fgcolor)||wo.isArrayOrTypedArray(b.size)||wo.isArrayOrTypedArray(b.solidity);var P=r.uid;y&&(P+="-"+e.i),ui.pattern(t,"point",n,P,x,D,F,e.mcc,b.fillmode,C,S,k)}else wo.isArrayOrTypedArray(p)?yu.fill(t,p[e.i]):yu.fill(t,p);v&&yu.stroke(t,d)}};ui.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=ui.tryColorscale(r,""),t.lineScale=ui.tryColorscale(r,"line"),QD.traceIs(e,"symbols")&&(t.ms2mrc=j6t.isBubble(e)?$6t(e):function(){return(r.size||6)/2}),e.selectedpoints&&wo.extendFlat(t,ui.makeSelectedPointStyleFns(e)),t};ui.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.marker||{},a=r.marker||{},o=i.marker||{},s=n.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(wo.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(b){var M=b.mo===void 0?n.opacity:b.mo;return b.selected?c?l:M:f?u:u1e*M});var h=n.color,p=a.color,d=o.color;(p||d)&&(t.selectedColorFn=function(b){var M=b.mcc||h;return b.selected?p||M:d||M});var v=n.size,m=a.size,g=o.size,w=m!==void 0,_=g!==void 0;return QD.traceIs(e,"symbols")&&(w||_)&&(t.selectedSizeFn=function(b){var M=b.mrc||v/2;return b.selected?w?m/2:M:_?g/2:M}),t};ui.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.textfont||{},a=r.textfont||{},o=i.textfont||{},s=n.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:yu.addOpacity(f,u1e))},t};ui.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ui.makeSelectedPointStyleFns(t),i=t.marker||{},n=[];r.selectedOpacityFn&&n.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&n.push(function(a,o){yu.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&n.push(function(a,o){var s=o.mx||i.symbol||0,l=r.selectedSizeFn(o);a.attr("d",f1e(ui.symbolNumber(s),l,nH(o,t),iH(o,t))),o.mrc2=l}),n.length&&e.each(function(a){for(var o=qu.select(this),s=0;s0?r:0}ui.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var n=ui.makeSelectedTextStyleFns(t);i=n.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=qu.select(this),u=a?wo.extractOption(s,t,"txt","texttemplate"):wo.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};W6t(h,t,s.i),u=wo.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var p=s.tp||t.textposition,d=v1e(s,t),v=i?i(s):s.tc||t.textfont.color;l.call(ui.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:d,color:v}).text(u).call(e7.convertToTspans,r).call(p1e,p,d,s.mrc)})}};ui.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ui.makeSelectedTextStyleFns(t);e.each(function(i){var n=qu.select(this),a=r.selectedTextColorFn(i),o=i.tp||t.textposition,s=v1e(i,t);yu.fill(n,a);var l=QD.traceIs(t,"bar-like");p1e(n,o,s,i.mrc2||i.mrc,l)})}};var r1e=.5;ui.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],i=[],n;for(n=1;n=l||b>=c&&b<=l)&&(M<=f&&M>=u||M>=f&&M<=u)&&(e=[b,M])}return e}ui.applyBackoff=y1e;ui.makeTester=function(){var e=wo.ensureSingleById(qu.select("body"),"svg","js-plotly-tester",function(r){r.attr(V6t.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=wo.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ui.tester=e,ui.testref=t};ui.savedBBoxes={};var QG=0,tAt=1e4;ui.bBox=function(e,t,r){r||(r=i1e(e));var i;if(r){if(i=ui.savedBBoxes[r],i)return wo.extendFlat({},i)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(r=i1e(n),r){var a=+n.getAttribute("x")||0,o=+n.getAttribute("y")||0,s=n.getAttribute("transform");if(!s){var l=ui.bBox(n,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,i=ui.savedBBoxes[r],i)return wo.extendFlat({},i)}}var u,c;t?u=e:(c=ui.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),qu.select(u).attr("transform",null).call(e7.positionText,0,0);var f=u.getBoundingClientRect(),h=ui.testref.node().getBoundingClientRect();t||c.removeChild(u);var p={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return QG>=tAt&&(ui.savedBBoxes={},QG=0),r&&(ui.savedBBoxes[r]=p),QG++,wo.extendFlat({},p)};function i1e(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ui.setClipUrl=function(e,t,r){e.attr("clip-path",rH(t,r))};function rH(e,t){if(!e)return null;var r=t._context,i=r._exportedPlot?"":r._baseUrl||"";return i?"url('"+i+"#"+e+"')":"url(#"+e+")"}ui.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",n=i.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};ui.setTranslate=function(e,t,r){var i=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||0,r=r||0,o=o.replace(i,"").trim(),o+=kA(t,r),o=o.trim(),e[a]("transform",o),o};ui.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",n=i.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};ui.setScale=function(e,t,r){var i=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||1,r=r||1,o=o.replace(i,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var rAt=/\s*sc.*/;ui.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var i=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(rAt,"");n+=i,n=n.trim(),this.setAttribute("transform",n)})}};var iAt=/translate\([^)]*\)\s*$/;ui.setTextPointsScale=function(e,t,r){e&&e.each(function(){var i,n=qu.select(this),a=n.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(n.attr("transform")||"").match(iAt);t===1&&r===1?i=[]:i=[kA(o,s),"scale("+t+","+r+")",kA(-o,-s)],l&&i.push(l),n.attr("transform",i.join(""))}})};function iH(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}ui.getMarkerStandoff=iH;var EA=Math.atan2,cb=Math.cos,Lw=Math.sin;function n1e(e,t){var r=t[0],i=t[1];return[r*cb(e)-i*Lw(e),r*Lw(e)+i*cb(e)]}var a1e,o1e,s1e,l1e,eH,tH;function nH(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!By(r)||wo.isArrayOrTypedArray(r))&&(r=0));var i,n,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);i=o[0],n=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)i=s.c2p(e.x),n=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),p=EA(h[1]-n,h[0]-i),d=EA(f[1]-n,f[0]-i),v;if(a==="north")v=r/180*Math.PI;else if(a==="previous"){var m=u/180*Math.PI,g=c/180*Math.PI,w=a1e/180*Math.PI,_=o1e/180*Math.PI,b=w-m,M=cb(_)*Lw(b),x=Lw(_)*cb(g)-cb(_)*Lw(g)*cb(b);v=-EA(M,x)-Math.PI,a1e=u,o1e=c}var A=n1e(p,[cb(v),0]),T=n1e(d,[Lw(v),0]);r=EA(A[1]+T[1],A[0]+T[0])/Math.PI*180,a==="previous"&&!(tH===t.uid&&e.i===eH+1)&&(r=null)}if(a==="previous"&&!t._geo)if(tH===t.uid&&e.i===eH+1&&By(i)&&By(n)){var y=i-s1e,E=n-l1e,S=t.line&&t.line.shape||"",C=S.slice(S.length-1);C==="h"&&(E=0),C==="v"&&(y=0),r+=EA(E,y)/Math.PI*180+90}else r=null}return s1e=i,l1e=n,eH=e.i,tH=t.uid,r}ui.getMarkerAngle=nH});var pb=W((mOr,T1e)=>{"use strict";var Pw=gi(),nAt=hn(),aAt=Qo(),aH=xi(),db=tt(),b1e=db.strTranslate,t7=Qi(),r7=ti(),Iw=ao(),_1e=(Ng(),Pt(Og)),oAt=(Jl(),Pt(Kl)).OPPOSITE_SIDE,w1e=/ [XY][0-9]* /,oH=1.6,sH=1.6;function sAt(e,t,r){var i=e._fullLayout,n=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,p=n.title,d=(p&&p.text?p.text:"").trim(),v=!1,m=p&&p.font?p.font:{},g=m.family,w=m.size,_=m.color,b=m.weight,M=m.style,x=m.variant,A=m.textcase,T=m.lineposition,y=m.shadow,E=r.subtitlePropName,S=!!E,C=r.subtitlePlaceholder,k=(n.title||{}).subtitle||{text:"",font:{}},D=(k.text||"").trim(),F=!1,P=1,R=k.font,L=R.family,I=R.size,B=R.color,O=R.weight,$=R.style,X=R.variant,K=R.textcase,G=R.lineposition,q=R.shadow,J;a==="title.text"?J="titleText":a.indexOf("axis")!==-1?J="axisTitleText":a.indexOf("colorbar")!==-1&&(J="colorbarTitleText");var N=e._context.edits[J];function V(be,fe){return be===void 0||fe===void 0?!1:be.replace(w1e," % ")===fe.replace(w1e," % ")}d===""?h=0:V(d,o)&&(N||(d=""),h=.2,v=!0),S&&(D===""?P=0:V(D,C)&&(N||(D=""),P=.2,F=!0)),r._meta?d=db.templateString(d,r._meta):i._meta&&(d=db.templateString(d,i._meta));var Y=d||D||N,H;f||(f=db.ensureSingle(i._infolayer,"g","g-"+t),H=i._hColorbarMoveTitle);var j=f.selectAll("text."+t).data(Y?[0]:[]);j.enter().append("text"),j.text(d).attr("class",t),j.exit().remove();var Q=null,te=t+"-subtitle",ue=D||N;if(S&&(Q=f.selectAll("text."+te).data(ue?[0]:[]),Q.enter().append("text"),Q.text(D).attr("class",te),Q.exit().remove()),!Y)return f;function ge(be,fe){db.syncOrAsync([Ee,xe],{title:be,subtitle:fe})}function Ee(be){var fe=be.title,ee=be.subtitle,ae;!c&&H&&(c={}),c?(ae="",c.rotate&&(ae+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||H)&&(ae+=b1e(0,(c.offset||0)-(H||0)))):ae=null,fe.attr("transform",ae);function _e(we){if(we){var me=Pw.select(we.node().parentNode).select("."+te);if(!me.empty()){var Le=we.node().getBBox();if(Le.height){var Ne=Le.y+Le.height+oH*I;me.attr("y",Ne)}}}}if(fe.style("opacity",h*r7.opacity(_)).call(t7.font,{color:r7.rgb(_),size:Pw.round(w,2),family:g,weight:b,style:M,variant:x,textcase:A,shadow:y,lineposition:T}).attr(u).call(Iw.convertToTspans,e,_e),ee&&!ee.empty()){var re=f.select("."+t+"-math-group"),pe=fe.node().getBBox(),Te=re.node()?re.node().getBBox():void 0,Ce=Te?Te.y+Te.height+oH*I:pe.y+pe.height+sH*I,ze=db.extendFlat({},u,{y:Ce});ee.attr("transform",ae),ee.style("opacity",P*r7.opacity(B)).call(t7.font,{color:r7.rgb(B),size:Pw.round(I,2),family:L,weight:O,style:$,variant:X,textcase:K,shadow:q,lineposition:G}).attr(ze).call(Iw.convertToTspans,e)}return aAt.previousPromises(e)}function xe(be){var fe=be.title,ee=Pw.select(fe.node().parentNode);if(l&&l.selection&&l.side&&d){ee.attr("transform",null);var ae=oAt[l.side],_e=l.side==="left"||l.side==="top"?-1:1,re=nAt(l.pad)?l.pad:2,pe=t7.bBox(ee.node()),Te={t:0,b:0,l:0,r:0},Ce=e._fullLayout._reservedMargin;for(var ze in Ce)for(var we in Ce[ze]){var me=Ce[ze][we];Te[we]=Math.max(Te[we],me)}var Le={left:Te.l,top:Te.t,right:i.width-Te.r,bottom:i.height-Te.b},Ne=l.maxShift||_e*(Le[l.side]-pe[l.side]),Je=0;if(Ne<0)Je=Ne;else{var rt=l.offsetLeft||0,mt=l.offsetTop||0;pe.left-=rt,pe.right-=rt,pe.top-=mt,pe.bottom-=mt,l.selection.each(function(){var St=t7.bBox(this);db.bBoxIntersect(pe,St,re)&&(Je=Math.max(Je,_e*(St[l.side]-pe[ae])+re))}),Je=Math.min(Ne,Je),n._titleScoot=Math.abs(Je)}if(Je>0||Ne<0){var dt={left:[-Je,0],right:[Je,0],top:[0,-Je],bottom:[0,Je]}[l.side];ee.attr("transform",b1e(dt[0],dt[1]))}}}j.call(ge,Q);function ce(be,fe){be.text(fe).on("mouseover.opacity",function(){Pw.select(this).transition().duration(_1e.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Pw.select(this).transition().duration(_1e.HIDE_PLACEHOLDER).style("opacity",0)})}if(N&&(d?j.on(".opacity",null):(ce(j,o),v=!0),j.call(Iw.makeEditable,{gd:e}).on("edit",function(be){s!==void 0?aH.call("_guiRestyle",e,a,be,s):aH.call("_guiRelayout",e,a,be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ge)}).on("input",function(be){this.text(be||" ").call(Iw.positionText,u.x,u.y)}),S)){if(S&&!d){var oe=j.node().getBBox(),Se=oe.y+oe.height+sH*I;Q.attr("y",Se)}D?Q.on(".opacity",null):(ce(Q,C),F=!0),Q.call(Iw.makeEditable,{gd:e}).on("edit",function(be){aH.call("_guiRelayout",e,"title.subtitle.text",be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ge)}).on("input",function(be){this.text(be||" ").call(Iw.positionText,Q.attr("x"),Q.attr("y"))})}return j.classed("js-placeholder",v),Q&&!Q.empty()&&Q.classed("js-placeholder",F),f}T1e.exports={draw:sAt,SUBTITLE_PADDING_EM:sH,SUBTITLE_PADDING_MATHJAX_EM:oH}});var g1=W((yOr,k1e)=>{"use strict";var lAt=gi(),uAt=K3().utcFormat,Yo=tt(),cAt=Yo.numberFormat,p1=hn(),qy=Yo.cleanNumber,fAt=Yo.ms2DateTime,A1e=Yo.dateTime2ms,v1=Yo.ensureNumber,M1e=Yo.isArrayOrTypedArray,Oy=(ra(),Pt(ia)),i7=Oy.FP_SAFE,Wp=Oy.BADNUM,hAt=Oy.LOG_CLIP,dAt=Oy.ONEWEEK,n7=Oy.ONEDAY,a7=Oy.ONEHOUR,S1e=Oy.ONEMIN,E1e=Oy.ONESEC,o7=Ls(),u7=(Zl(),Pt(Xl)),s7=u7.HOUR_PATTERN,l7=u7.WEEKDAY_PATTERN;function CA(e){return Math.pow(10,e)}function lH(e){return e!=null}var pAt=2;function vAt(e,t){if(e<=0)return 0;let r=Math.max(0,t-pAt);return e>r?r/e:1}k1e.exports=function(t,r){r=r||{};var i=t._id||"x",n=i.charAt(0);function a(b,M){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&M&&t.range&&t.range.length===2){var x=t.range[0],A=t.range[1];return .5*(x+A-2*hAt*Math.abs(x-A))}else return Wp}function o(b,M,x,A){if((A||{}).msUTC&&p1(b))return+b;var T=A1e(b,x||t.calendar);if(T===Wp)if(p1(b)){b=+b;var y=Math.floor(Yo.mod(b+.05,1)*10),E=Math.round(b-y/10);T=A1e(new Date(E))+y/10}else return Wp;return T}function s(b,M,x){return fAt(b,M,x||t.calendar)}function l(b){return t._categories[Math.round(b)]}function u(b){if(lH(b)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[b]!==void 0)return t._categoriesMap[b];t._categories.push(typeof b=="number"?String(b):b);var M=t._categories.length-1;return t._categoriesMap[b]=M,M}return Wp}function c(b,M){for(var x=new Array(M),A=0;At.range[1]&&(x=!x);for(var A=x?-1:1,T=A*b,y=0,E=0;EC)y=E+1;else{y=T<(S+C)/2?E:E+1;break}}var k=t._B[y]||0;return isFinite(k)?d(b,t._m2,k):0},g=function(b){var M=t._rangebreaks.length;if(!M)return v(b,t._m,t._b);for(var x=0,A=0;At._rangebreaks[A].pmax&&(x=A+1);return v(b,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:v1,t.l2c=t.type==="log"?CA:v1,t.l2p=m,t.p2l=g,t.c2p=t.type==="log"?function(b,M){return m(a(b,M))}:m,t.p2c=t.type==="log"?function(b){return CA(g(b))}:g,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=qy,t.c2d=t.c2r=t.l2d=t.l2r=v1,t.d2p=t.r2p=function(b){return t.l2p(qy(b))},t.p2d=t.p2r=g,t.cleanPos=v1):t.type==="log"?(t.d2r=t.d2l=function(b,M){return a(qy(b),M)},t.r2d=t.r2c=function(b){return CA(qy(b))},t.d2c=t.r2l=qy,t.c2d=t.l2r=v1,t.c2r=a,t.l2d=CA,t.d2p=function(b,M){return t.l2p(t.d2r(b,M))},t.p2d=function(b){return CA(g(b))},t.r2p=function(b){return t.l2p(qy(b))},t.p2r=g,t.cleanPos=v1):t.type==="date"?(t.d2r=t.r2d=Yo.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(b,M,x){return t.l2p(o(b,0,x))},t.p2d=t.p2r=function(b,M,x){return s(g(b),M,x)},t.cleanPos=function(b){return Yo.cleanDate(b,Wp,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(b){var M=p(b);return M!==void 0?M:t.fraction2r(.5)},t.l2r=t.c2r=v1,t.r2l=p,t.d2p=function(b){return t.l2p(t.r2c(b))},t.p2d=function(b){return l(g(b))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(b){return typeof b=="string"&&b!==""?b:v1(b)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(b){var M=h(b);return M!==void 0?M:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=v1,t.r2l=h,t.d2p=function(b){return t.l2p(t.r2c(b))},t.p2d=function(b){return l(g(b))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:v1(b)},t.setupMultiCategory=function(b){var M=t._traceIndices,x,A,T=t._matchGroup;if(T&&t._categories.length===0){for(var y in T)if(y!==i){var E=r[o7.id2name(y)];M=M.concat(E._traceIndices)}}var S=[[0,{}],[0,{}]],C=[];for(x=0;xE[1]&&(A[y?0:1]=x,T[1]=E[1]),T[0]>=T[1])if(M!==void 0){var S=E[0]+1;x!==void 0&&(S=Math.min(S,E[1])),A[y?0:1]=t.l2r(S)}else x!==void 0&&(A[y?1:0]=t.l2r(E[1]-1))}},t.cleanRange=function(b,M){t._cleanRange(b,M),t.limitRange(b)},t._cleanRange=function(b,M){M||(M={}),b||(b="range");var x=Yo.nestedProperty(t,b).get(),A,T;if(t.type==="date"?T=Yo.dfltRange(t.calendar):n==="y"?T=u7.DFLTRANGEY:t._name==="realaxis"?T=[0,1]:T=M.dfltRange||u7.DFLTRANGEX,T=T.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(T[0]=0),!x||x.length!==2){Yo.nestedProperty(t,b).set(T);return}var y=x[0]===null,E=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=Yo.cleanDate(x[0],Wp,t.calendar),x[1]=Yo.cleanDate(x[1],Wp,t.calendar)),A=0;A<2;A++)if(t.type==="date"){if(!Yo.isDateTime(x[A],t.calendar)){t[b]=T;break}if(t.r2l(x[0])===t.r2l(x[1])){var S=Yo.constrain(t.r2l(x[0]),Yo.MIN_MS+1e3,Yo.MAX_MS-1e3);x[0]=t.l2r(S-1e3),x[1]=t.l2r(S+1e3);break}}else{if(!p1(x[A]))if(!(y||E)&&p1(x[1-A]))x[A]=x[1-A]*(A?10:.1);else{t[b]=T;break}if(x[A]<-i7?x[A]=-i7:x[A]>i7&&(x[A]=i7),x[0]===x[1]){var C=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=C,x[1]+=C}}},t.setScale=function(b){var M=r._size;if(t.overlaying){var x=o7.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain,t.domainpad=x.domainpad}var A=b&&t._r?"_r":"range",T=t.calendar;t.cleanRange(A);var y=t.r2l(t[A][0],T),E=t.r2l(t[A][1],T),S=n==="y";let C=(S?M.h:M.w)*(t.domain[1]-t.domain[0]),k=t.domainpad,D=0,F=0;if(k){D=(S?k.top:k.left)||0,F=(S?k.bottom:k.right)||0;let B=vAt(D+F,C);D*=B,F*=B}if(t._length=C-D-F,t._padStart=D,t._padEnd=F,S?(t._offset=M.t+(1-t.domain[1])*M.h+D,t._m=t._length/(y-E),t._b=-t._m*E):(t._offset=M.l+t.domain[0]*M.w+D,t._m=t._length/(E-y),t._b=-t._m*y),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var P,R;if(t._rangebreaks=t.locateBreaks(Math.min(y,E),Math.max(y,E)),t._rangebreaks.length){for(P=0;PE&&(L=!L),L&&t._rangebreaks.reverse();var I=L?-1:1;for(t._m2=I*t._length/(Math.abs(E-y)-t._lBreaks),t._B.push(-t._m2*(S?E:y)),P=0;PT&&(T+=7,yT&&(T+=24,y=A&&y=A&&b=q.min&&($q.max&&(q.max=X),K=!1)}K&&E.push({min:$,max:X})}};for(x=0;x{"use strict";var C1e=hn(),uH=tt(),gAt=(ra(),Pt(ia)).BADNUM,c7=uH.isArrayOrTypedArray,mAt=uH.isDateTime,yAt=uH.cleanNumber,D1e=Math.round;L1e.exports=function(t,r,i){var n=t,a=i.noMultiCategory;if(c7(n)&&!n.length)return"-";if(!a&&TAt(n))return"multicategory";if(a&&Array.isArray(n[0])){for(var o=[],s=0;sa*2}function F1e(e){return Math.max(1,(e-1)/1e3)}function wAt(e,t){for(var r=e.length,i=F1e(r),n=0,a=0,o={},s=0;sn*2}function TAt(e){return c7(e[0])&&c7(e[1])}});var Yp=W((bOr,N1e)=>{"use strict";var AAt=gi(),z1e=hn(),Ny=tt(),f7=(ra(),Pt(ia)).FP_SAFE,MAt=xi(),SAt=Qi(),B1e=Ls(),EAt=B1e.getFromId,kAt=B1e.isLinked;N1e.exports={applyAutorangeOptions:O1e,getAutoRange:cH,makePadFn:fH,doAutoRange:DAt,findExtremes:FAt,concatExtremes:pH};function cH(e,t){var r,i,n=[],a=e._fullLayout,o=fH(a,t,0),s=fH(a,t,1),l=pH(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Ny.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r0&&(E=_-o(x)-s(A),E>b?S/E>M&&(T=x,y=A,M=S/E):S/_>M&&(T={val:x.val,nopad:1},y={val:A.val,nopad:1},M=S/_));function C(R,L){return Math.max(R,s(L))}if(f===h){var k=f-1,D=f+1;if(g)if(f===0)n=[0,1];else{var F=(f>0?c:u).reduce(C,0),P=f/(1-Math.min(.5,F/_));n=f>0?[0,P]:[P,0]}else w?n=[Math.max(0,k),Math.max(1,D)]:n=[k,D]}else g?(T.val>=0&&(T={val:0,nopad:1}),y.val<=0&&(y={val:0,nopad:1})):w&&(T.val-M*o(T)<0&&(T={val:0,nopad:1}),y.val<=0&&(y={val:1,nopad:1})),M=(y.val-T.val-P1e(t,x.val,A.val))/(_-o(T)-s(y)),n=[T.val-M*o(T),y.val+M*s(y)];return n=O1e(n,t),t.limitRange&&t.limitRange(),d&&n.reverse(),Ny.simpleMap(n,t.l2r||Number)}function P1e(e,t,r){var i=0;if(e.rangebreaks)for(var n=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),x=b((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),A=b(r.vpadplus||r.vpad),T=b(r.vpadminus||r.vpad);if(!u){if(w=1/0,_=-1/0,l)for(f=0;f0&&(w=h),h>_&&h-f7&&(w=h),h>_&&h=S;f--)E(f);return{min:i,max:n,opts:r}}function hH(e,t,r,i){q1e(e,t,r,i,LAt)}function dH(e,t,r,i){q1e(e,t,r,i,PAt)}function q1e(e,t,r,i,n){for(var a=i.tozero,o=i.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else n(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function R1e(e){return z1e(e)&&Math.abs(e)=t}function IAt(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&h7(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&h7(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function RAt(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&h7(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&h7(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function h7(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(a=l,r=l),o<=l&&(o=l,i=l)}}return r=IAt(r,t),i=RAt(i,t),[r,i]}});var Yi=W((wOr,lge)=>{"use strict";var xd=gi(),Pl=hn(),zw=Qo(),FA=xi(),En=tt(),Bw=En.strTranslate,vb=ao(),zAt=pb(),LA=ti(),w0=Qi(),BAt=ac(),U1e=qG(),_Or=(Zl(),Pt(Xl)),kc=(ra(),Pt(ia)),qAt=kc.ONEMAXYEAR,v7=kc.ONEAVGYEAR,g7=kc.ONEMINYEAR,OAt=kc.ONEMAXQUARTER,yH=kc.ONEAVGQUARTER,m7=kc.ONEMINQUARTER,NAt=kc.ONEMAXMONTH,qw=kc.ONEAVGMONTH,y7=kc.ONEMINMONTH,T0=kc.ONEWEEK,Sf=kc.ONEDAY,Uy=Sf/2,y1=kc.ONEHOUR,PA=kc.ONEMIN,x7=kc.ONESEC,UAt=kc.ONEMILLI,VAt=kc.ONEMICROSEC,gb=kc.MINUS_SIGN,_7=kc.BADNUM,xH={K:"zeroline"},bH={K:"gridline",L:"path"},_H={K:"minor-gridline",L:"path"},J1e={K:"tick",L:"path"},V1e={K:"tick",L:"text"},G1e={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},w7=(Jl(),Pt(Kl)),DA=w7.MID_SHIFT,mb=w7.CAP_SHIFT,IA=w7.LINE_SPACING,GAt=w7.OPPOSITE_SIDE,b7=3,Br=lge.exports={};Br.setConvert=g1();var HAt=Rw(),x1=Ls(),jAt=x1.idSort,$At=x1.isLinked;Br.id2name=x1.id2name;Br.name2id=x1.name2id;Br.cleanId=x1.cleanId;Br.list=x1.list;Br.listIds=x1.listIds;Br.getFromId=x1.getFromId;Br.getFromTrace=x1.getFromTrace;var Q1e=Yp();Br.getAutoRange=Q1e.getAutoRange;Br.findExtremes=Q1e.findExtremes;var WAt=1e-4;function MH(e){var t=(e[1]-e[0])*WAt;return[e[0]-t,e[1]+t]}function YAt(e,t,r){if(![r,e,t].every(Pl)||r===0)return e;let i=Math.round((e-t)/r),n=t+i*r;return e!==n&&Math.abs(e-n)h+" domain")),l=l.concat(a||[]),c.length>o?(En.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Br.saveRangeInitial=function(e,t){for(var r=Br.list(e,"",!0),i=!1,n=0;nf*.3||u(i)||u(n))){var h=r.dtick/2;e+=e+ho){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=Br.tickIncrement(e,"M6","reverse")+Sf*1.5:a.exactMonths>o?e=Br.tickIncrement(e,"M1","reverse")+Sf*15.5:e-=Uy;var l=Br.tickIncrement(e,r);if(l<=i)return l}return e}Br.prepMinorTicks=function(e,t,r){var f,h;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var i=t.dtick&&Pl(t._tmin),n;if(i){var a=Br.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,a*.99+t._tmin*.01]}else{var o=En.simpleMap(t.range,t.r2l);n=[o[0],.8*o[0]+.2*o[1]]}if(e.range=En.simpleMap(n,t.l2r),e._isMinor=!0,Br.prepTicks(e,r),i){var s=Pl(t.dtick),l=Pl(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?vH(u,c)?u===2*T0&&c===2*Sf&&(e.dtick=T0):u===2*T0&&c===3*Sf?e.dtick=T0:u===T0&&!(t._input.minor||{}).nticks?e.dtick=Sf:$1e(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":vH(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?vH(u,c)||(e.dtick=$1e(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((h=t.minor)==null?void 0:h._tick0Init)===void 0&&(e.tick0=t.tick0),t._useTicklabelIndex&&(SH(e),t.minor._tickround=e._tickround)};function vH(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function $1e(e,t){return Math.abs(e/t-1)<.001}Br.prepTicks=function(e,t){var r=En.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var i=e.nticks,n;i||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?En.bigFont(e.tickfont.size||12):15,i=e._length/n):(n=e._id.charAt(0)==="y"?40:80,i=En.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(i*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,Br.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(s=i-1,l=i):(s=i,l=i),a=e[s].value,o=e[l].value}var u=Math.abs(o-a),c=r||u,f=0;e[i].periodEndTick!=null?f=u:c>=g7?u>=g7&&u<=qAt?f=u:f=v7:r===yH&&c>=m7?u>=m7&&u<=OAt?f=u:f=yH:c>=y7?u>=y7&&u<=NAt?f=u:f=qw:r===T0&&c>=T0?f=T0:c>=Sf?f=Sf:r===Uy&&c>=Uy?f=Uy:r===y1&&c>=y1&&(f=y1);var h;f>=u&&(f=u,h=!0);var p=n+f;if(t.rangebreaks&&f>0){for(var d=84,v=0,m=0;mT0&&(f=u)}(f>0||i===0)&&(e[i].periodX=n+f/2)}}Br.calcTicks=function(t,r){var i=t.type,n=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||En.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex];t._useTicklabelIndex=l!=null&&l!==0;for(var u=En.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(b?0:1);M--){var x=!M;M?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):b&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var A=M?t:En.extendFlat({},t,b?t.minor:{minor:{}});if(x?Br.prepMinorTicks(A,t,r):Br.prepTicks(A,r),A.tickmode==="array"){M?(m=[],d=W1e(t,!x)):(g=[],v=W1e(t,!x));continue}if(A.tickmode==="sync"){m=[],d=eMt(t);continue}var T=MH(u),y=T[0],E=T[1],S=Pl(A.dtick),C=i==="log"&&!(S||A.dtick.charAt(0)==="L"),k=Br.tickFirst(A,r);if(M){if(t._tmin=k,k=E:F<=E;F=Br.tickIncrement(F,L,c,n)){if(M&&P++,A.rangebreaks&&!c){if(F=h)break}if(m.length>p||F===D)break;D=F;var B={value:YAt(F,I,L)};M?(F===k&&(B.first=!0),C&&F!==(F|0)&&(B.simpleLabel=!0),a>1&&P%a&&(B.skipLabel=!0),m.push(B)):(B.minor=!0,g.push(B))}}function O(ge,Ee){let xe=Ee.find(oe=>oe.value===ge.value);if(xe!=null)return xe;let ce=1e7;for(let oe=0;oeO(xe,m)==null),Ee=m.concat(ge).sort((xe,ce)=>xe.value-ce.value);o&&m.length&&(m[0].skipLabel=!0),m.forEach(function(xe){xe.skipLabel||(l.forEach(ce=>{if(ce<0){let oe=Ee.filter(fe=>fe.value<=xe.value),Se=Math.abs(ce),be=oe.length-Se-1;if(SeSe.value>=xe.value);if(cexe.skipLabel=!1)}if(_){var $=t.minor.ticks==="inside"&&t.ticks==="outside"||t.minor.ticks==="outside"&&t.ticks==="inside";if(!$){for(var X=[],K=0;K-1;G--){if(m[G].drop){m.splice(G,1);continue}m[G].value=mH(m[G].value,t);var V=t.c2p(m[G].value);(q?N>V-J:Nh||ceh&&(xe.periodX=h),cen&&dn&&mv7)t/=v7,i=n(10),e.dtick="M"+12*m1(t,i,d7);else if(a>qw)t/=qw,e.dtick="M"+m1(t,1,Y1e);else if(a>Sf){if(e.dtick=m1(t,Sf,e._hasDayOfWeekBreaks?[1,2,7,14]:tMt),!r){var o=Br.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=En.dateTick0(e.calendar,2):e.tick0=En.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>y1?e.dtick=m1(t,y1,Y1e):a>PA?e.dtick=m1(t,PA,X1e):a>x7?e.dtick=m1(t,x7,X1e):(i=n(10),e.dtick=m1(t,i,d7))}else if(e.type==="log"){e.tick0=0;var l=En.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,i=n(10),e.dtick="L"+m1(t,i,d7)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):DH(e)?(e.tick0=0,i=1,e.dtick=m1(t,i,rMt)):(e.tick0=0,i=n(10),e.dtick=m1(t,i,d7));if(e.dtick===0&&(e.dtick=1),!Pl(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function SH(e){var t=e.dtick;if(e._tickexponent=0,!Pl(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),i=e.l2r(r).replace(/(^-|i)/g,""),n=i.length;if(String(t).charAt(0)==="M")n>10||i.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=Sf&&n<=10||t>=Sf*15)e._tickround="d";else if(t>=PA&&n<=16||t>=y1)e._tickround="M";else if(t>=x7&&n<=19||t>=PA)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(n,a)-20,e._tickround<0&&(e._tickround=4)}}else if(Pl(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Pl(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(Ow(e.exponentformat)&&e.exponentformat!=="SI extended"&&!EH(l)||Ow(e.exponentformat)&&e.exponentformat==="SI extended"&&!kH(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Br.tickIncrement=function(e,t,r,i){var n=r?-1:1;if(Pl(t))return En.increment(e,n*t);var a=t.charAt(0),o=n*Number(t.slice(1));if(a==="M")return En.incrementMonth(e,o,i);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?rge:tge,l=e+n*.01,u=En.roundUp(En.mod(l,1),s,r);return Math.floor(l)+Math.log(xd.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Br.tickFirst=function(e,t){var r=e.r2l||Number,i=En.simpleMap(e.range,r,void 0,void 0,t),n=i[1]=0&&b<=e._length?_:null};if(l&&En.isArrayOrTypedArray(e.ticktext)){var d=En.simpleMap(e.range,e.r2l),v=(Math.abs(d[1]-d[0])-(e._lBreaks||0))/1e4;for(h=0;h"+s;else{var u=zA(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function nMt(e,t,r,i,n){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(n==="never"&&(n=""),i&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=RA(Math.pow(10,o),e,n,i);else if(Pl(a)||l==="D"&&(e.minorloglabels==="complete"||En.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(En.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],p=Math.abs(h),d=e.exponentformat;d==="power"||Ow(d)&&d!=="SI extended"&&EH(h)||Ow(d)&&d==="SI extended"&&kH(h)?(t.text=f[0],p>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+=""+(h>0?"":gb)+p+""),t.fontSize*=1.25):(d==="e"||d==="E")&&p>2?t.text=f[0]+d+(h>0?"+":gb)+p:(t.text=RA(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,En.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var v=String(t.text).charAt(0);(v==="0"||v==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function aMt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function oMt(e,t,r){var i=Math.round(t.x),n=e._categories[i]||[],a=n[1]===void 0?"":String(n[1]),o=n[0]===void 0?"":String(n[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}function sMt(e,t,r,i,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(n="hide"),t.text=RA(t.x,e,n,i)}function lMt(e,t,r,i,n){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=uMt(a);if(o[1]>=100)t.text=RA(En.deg2rad(t.x),e,n,i);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=gb+t.text)}}}else t.text=RA(t.x,e,n,i)}function uMt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function i(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var n=i(e),a=e*n,o=Math.abs(r(a,n));return[Math.round(a/o),Math.round(n/o)]}var nge=["f","p","n","\u03BC","m","","k","M","G","T"],cMt=["q","r","y","z","a",...nge,"P","E","Z","Y","R","Q"],Ow=e=>["SI","SI extended","B"].includes(e);function EH(e){return e>14||e<-15}function kH(e){return e>32||e<-30}function fMt(e,t){return Ow(t)?!!(t==="SI extended"&&kH(e)||t!=="SI extended"&&EH(e)):!1}function RA(e,t,r,i){var n=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Br.getTickFormat(t),u=t.separatethousands;if(i){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Pl(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};SH(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,gb);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-a)/2;if(e"+h+"":o==="B"&&s===9?e+="B":Ow(o)&&(e+=o==="SI extended"?cMt[s/3+10]:nge[s/3+5])}return n?gb+e:e}Br.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*qw}function i(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function n(l,u,c){var f=c||function(d){return d},h=u[0],p=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!p&&typeof p!="number"||f(p)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=i(l,u[0])>=0,p=i(l,u[1])<=0;return(c||h)&&(f||p)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&n.unshift(n.splice(c,1).shift())}});var s={false:{left:0,right:0}};return En.syncOrAsync(n.map(function(l){return function(){if(l){var u=Br.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Br.drawOne(e,u,r);return u._shiftPusher&&AH(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=En.simpleMap(u._r,u.r2l),c}}}))};Br.drawOne=function(e,t,r){r=r||{};var i=r.axShifts||{},n=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Br.counterLetter(u),h=l._plots[t._mainSubplot],p=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||n.indexOf(t._id)!==-1||n.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var d=t.linewidth/2||0;t.ticks==="inside"&&(d+=t.ticklen),AH(t,d,i,!0),AH(t,t.shift||0,i,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=AMt(t,i));var v=h[c+"axislayer"],m=t._mainLinePosition,g=m+=t._shift,w=t._mainMirrorPosition,_=t._vals=Br.calcTicks(t),b=[t.mirror,g,w].join("_");for(a=0;a<_.length;a++)_[a].axInfo=b;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var M={};function x(oe){var Se=u+(oe||"tick");return M[Se]||(M[Se]=vMt(t,Se,g)),M[Se]}if(t.visible){var A=Br.makeTransTickFn(t),T=Br.makeTransTickLabelFn(t),y,E,S=t.ticks==="inside",C=t.ticks==="outside";if(t.tickson==="boundaries"){var k=hMt(t,_);E=Br.clipEnds(t,k),y=S?E:k}else E=Br.clipEnds(t,_),y=S&&t.ticklabelmode!=="period"?E:_;var D=t._gridVals=E,F=pMt(t,_);if(!l._hasOnlyLargeSploms){var P=t._subplotsWith,R={};for(a=0;a0?ee.bottom-be:0,fe))));var pe=0,Te=0;if(t._shiftPusher&&(pe=Math.max(fe,ee.height>0?oe==="l"?be-ee.left:ee.right-be:0),t.title.text!==l._dfltTitle[c]&&(Te=(t._titleStandoff||0)+(t._titleScoot||0),oe==="l"&&(Te+=K1e(t))),t._fullDepth=Math.max(pe,Te)),t.automargin){ae={x:0,y:0,r:0,l:0,t:0,b:0};var Ce=[0,1],ze=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(oe==="b"?ae[oe]=t._depth:(ae[oe]=t._depth=Math.max(ee.width>0?be-ee.top:0,fe),Ce.reverse()),ee.width>0){var we=ee.right-(t._offset+t._length);we>0&&(ae.xr=1,ae.r=we);var me=t._offset-ee.left;me>0&&(ae.xl=0,ae.l=me)}}else if(oe==="l"?(t._depth=Math.max(ee.height>0?be-ee.left:0,fe),ae[oe]=t._depth-ze):(t._depth=Math.max(ee.height>0?ee.right-be:0,fe),ae[oe]=t._depth+ze,Ce.reverse()),ee.height>0){var Le=ee.bottom-(t._offset+t._length);Le>0&&(ae.yb=0,ae.b=Le);var Ne=t._offset-ee.top;Ne>0&&(ae.yt=1,ae.t=Ne)}ae[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Ce[0]],t.title.text!==l._dfltTitle[c]&&(ae[oe]+=K1e(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(_e={x:0,y:0,r:0,l:0,t:0,b:0},_e[Se]=t.linewidth,t.mirror&&t.mirror!==!0&&(_e[Se]+=fe),t.mirror===!0||t.mirror==="ticks"?_e[f]=t._anchorAxis.domain[Ce[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(_e[f]=[t._counterDomainMin,t._counterDomainMax][Ce[1]]))}ce&&(re=FA.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Z1e(ae,t.automargin),Z1e(_e,t.automargin)),zw.autoMargin(e,CH(t),ae),zw.autoMargin(e,oge(t),_e),zw.autoMargin(e,sge(t),re)}),En.syncOrAsync(Ee)}};function Z1e(e,t){if(e){var r=Object.keys(G1e).reduce(function(i,n){return t.indexOf(n)!==-1&&G1e[n].forEach(function(a){i[a]=1}),i},{});Object.keys(e).forEach(function(i){r[i]||(i.length===1?e[i]=0:delete e[i])})}}function hMt(e,t){var r=[],i,n=function(a,o){var s=a.xbnd[o];s!==null&&r.push(En.extendFlat({},a,{x:s}))};if(t.length){for(i=0;ie.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(i){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;i=i*f}return e._id.charAt(0)==="x"?function(h){return Bw(n+e._offset+e.l2p(wH(h))+r,a+i)}:function(h){return Bw(a+i,n+e._offset+e.l2p(wH(h))+r)}};function wH(e){return e.periodX!==void 0?e.periodX:e.x}function gMt(e){var t=e.ticklabelposition||"",r=e.tickson||"",i=function(d){return t.indexOf(d)!==-1},n=i("top"),a=i("left"),o=i("right"),s=i("bottom"),l=i("inside"),u=r!=="boundaries"&&(s||a||n||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=b7,p=e.tickfont?e.tickfont.size:12;return(s||n)&&(f+=p*mb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=b7),l&&c==="top"&&(h-=p*(1-mb)),(a||n)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}Br.makeTickPath=function(e,t,r,i){i||(i={});var n=i.minor;if(n&&!e.minor)return"";var a=i.len!==void 0?i.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r};Br.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",n=e.tickson||"",a=function(k){return i.indexOf(k)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=n!=="boundaries"&&(u||s||o||l),f=a("inside"),h=i==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&n!=="boundaries",p=0,d=0,v=h?e.ticklen:0;if(f?v*=-1:c&&(v=0),h&&(p+=v,r)){var m=En.deg2rad(r);p=v*Math.cos(m)+1,d=v*Math.sin(m)}e.showticklabels&&(h||e.showline)&&(p+=.2*e.tickfont.size),p+=(e.linewidth||1)/2*(f?-1:1);var g={labelStandoff:p,labelShift:d},w,_,b,M,x=0,A=e.side,T=e._id.charAt(0),y=e.tickangle,E;if(T==="x")E=!f&&A==="bottom"||f&&A==="top",M=E?1:-1,f&&(M*=-1),w=d*M,_=t+p*M,b=E?1:-.2,Math.abs(y)===90&&(f?b+=DA:y===-90&&A==="bottom"?b=mb:y===90&&A==="top"?b=DA:b=.5,x=DA/2*(y/90)),g.xFn=function(k){return k.dx+w+x*k.fontSize},g.yFn=function(k){return k.dy+_+k.fontSize*b},g.anchorFn=function(k,D){if(c){if(s)return"end";if(l)return"start"}return!Pl(D)||D===0||D===180?"middle":D*M<0!==f?"end":"start"},g.heightFn=function(k,D,F){return D<-60||D>60?-.5*F:e.side==="top"!==f?-F:0};else if(T==="y"){if(E=!f&&A==="left"||f&&A==="right",M=E?1:-1,f&&(M*=-1),w=p,_=d*M,b=0,!f&&Math.abs(y)===90&&(y===-90&&A==="left"||y===90&&A==="right"?b=mb:b=.5),f){var S=Pl(y)?+y:0;if(S!==0){var C=En.deg2rad(S);x=Math.abs(Math.sin(C))*mb*M,b=0}}g.xFn=function(k){return k.dx+t-(w+k.fontSize*b)*M+x*k.fontSize},g.yFn=function(k){return k.dy+_+k.fontSize*DA},g.anchorFn=function(k,D){return Pl(D)&&Math.abs(D)===90?"middle":E?"end":"start"},g.heightFn=function(k,D,F){return e.side==="right"&&(D*=-1),D<-30?-F:D<30?-.5*F:0}}return g};function T7(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Br.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",n=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll("path."+i).data(n,T7);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return LA.stroke(xd.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return w0.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),A7(t,[J1e]),a.attr("transform",r.transFn)};Br.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var i=t._id+"grid",n=t.minor&&t.minor.showgrid,a=n?r.vals.filter(function(g){return g.minor}):[],o=t.showgrid?r.vals.filter(function(g){return!g.minor}):[],s=r.counterAxis;if(s&&Br.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;d--){var v=d?h:p;if(v){var m=v.selectAll("path."+i).data(d?o:a,T7);m.exit().remove(),m.enter().append("path").classed(i,1).classed("crisp",r.crisp!==!1),m.attr("transform",r.transFn).attr("d",r.path).each(function(g){return LA.stroke(xd.select(this),g.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(g){return w0.dashStyle(g.minor?t.minor.griddash:t.griddash,g.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(g){return(g.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&m.attr("d",r.path)}}A7(t,[bH,_H])}};Br.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",n=Br.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+i).data(n?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return jAt(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(LA.stroke,t.zerolinecolor||LA.defaultLine).style("stroke-width",w0.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),A7(t,[xH])};Br.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,n=t._id,a=t.zerolinelayer==="above traces",o=r.cls||n+"tick",s=r.vals.filter(function(I){return I.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],T7),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(I){var B=xd.select(this),O=e._promises.length;B.call(vb.positionText,l.xFn(I),l.yFn(I)).call(w0.font,{family:I.font,size:I.fontSize,color:I.fontColor,weight:I.fontWeight,style:I.fontStyle,variant:I.fontVariant,textcase:I.fontTextcase,lineposition:I.fontLineposition,shadow:I.fontShadow}).text(I.text).call(vb.convertToTspans,e),e._promises[O]?h.push(e._promises.pop().then(function(){p(B,u)})):p(B,u)}),A7(t,[V1e]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(I){xd.select(this).select("text").call(vb.positionText,l.xFn(I),l.yFn(I))});function p(I,B){I.each(function(O){var $=xd.select(this),X=$.select(".text-math-group"),K=l.anchorFn(O,B),G=r.transFn.call($.node(),O)+(Pl(B)&&+B!=0?" rotate("+B+","+l.xFn(O)+","+(l.yFn(O)-O.fontSize/2)+")":""),q=vb.lineCount($),J=IA*O.fontSize,N=l.heightFn(O,Pl(B)?+B:0,(q-1)*J);if(N&&(G+=Bw(0,N)),X.empty()){var V=$.select("text");V.attr({transform:G,"text-anchor":K}),V.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Y=w0.bBox(X.node()).width,H=Y*{end:-.5,start:.5}[K];X.attr("transform",G+Bw(H,0))}})}t._adjustTickLabelsOverflow=function(){var I=t.ticklabeloverflow;if(!(!I||I==="allow")){var B=I.indexOf("hide")!==-1,O=t._id.charAt(0)==="x",$=0,X=O?e._fullLayout.width:e._fullLayout.height;if(I.indexOf("domain")!==-1){var K=En.simpleMap(t.range,t.r2l);$=t.l2p(K[0])+t._offset,X=t.l2p(K[1])+t._offset}var G=Math.min($,X),q=Math.max($,X),J=t.side,N=1/0,V=-1/0;f.each(function(Q){var te=xd.select(this),ue=te.select(".text-math-group");if(ue.empty()){var ge=w0.bBox(te.node()),Ee=0;O?(ge.right>q||ge.leftq||ge.top+(t.tickangle?0:Q.fontSize/4)t["_visibleLabelMin_"+K._id]?te.style("display","none"):q.K==="tick"&&!G&&te.node().style.display!=="none"&&te.style("display",null)})})})})},p(f,c+1?c:u);function d(){return h.length&&Promise.all(h)}var v=null;function m(){if(p(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){v=t.autotickangles[0];var I=0,B=[],O,$=1;f.each(function(ae){I=Math.max(I,ae.fontSize);var _e=t.l2p(ae.x),re=TH(this),pe=w0.bBox(re.node());$=Math.max($,vb.lineCount(re)),B.push({top:0,bottom:10,height:10,left:_e-pe.width/2,right:_e+pe.width/2+2,width:pe.width+2})});var X=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,K=s.length,G=Math.abs((s[K-1].x-s[0].x)*t._m)/(K-1),q=X?G/2:G,J=X?t.ticklen:I*1.25*$,N=Math.sqrt(Math.pow(q,2)+Math.pow(J,2)),V=q/N,Y=t.autotickangles.map(function(ae){return ae*Math.PI/180}),H=Y.find(function(ae){return Math.abs(Math.cos(ae))<=V});H===void 0&&(H=Y.reduce(function(ae,_e){return Math.abs(Math.cos(ae))P*F&&(C=F,y[T]=E[T]=k[T])}var R=Math.abs(C-S);R-M>0?(R-=M,M*=1+M/R):M=0,t._id.charAt(0)!=="y"&&(M=-M),y[A]=_.p2r(_.r2p(E[A])+x*M),_.autorange==="min"||_.autorange==="max reversed"?(y[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):(_.autorange==="max"||_.autorange==="min reversed")&&(y[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[_._name+".range"]=y}var L=En.syncOrAsync(g);return L&&L.then&&e._promises.push(L),L};function mMt(e,t,r){var i=t._id+"divider",n=r.vals,a=r.layer.selectAll("path."+i).data(n,T7);a.exit().remove(),a.enter().insert("path",":first-child").classed(i,1).classed("crisp",1).call(LA.stroke,t.dividercolor).style("stroke-width",w0.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Br.getPxPosition=function(e,t){var r=e._fullLayout._size,i=t._id.charAt(0),n=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:i==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:i==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),n==="top"||n==="left")return a._offset;if(n==="bottom"||n==="right")return a._offset+a._length};function K1e(e){var t=e.title.font.size,r=(e.title.text.match(vb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(mb+r*IA):r?t*(r+1)*IA:t}function yMt(e,t){var r=e._fullLayout,i=t._id,n=i.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(vb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*mb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(DA+s*IA));else{var l=zA(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(n==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=Br.getPxPosition(e,t),f,h,p;n==="x"?(h=t._offset+t._length/2,p=t.side==="top"?c-o:c+o):(p=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var d;if(t.type!=="multicategory"){var v=t._selections[t._id+"tick"];if(d={selection:v,side:t.side},v&&v.node()&&v.node().parentNode){var m=w0.getTranslate(v.node().parentNode);d.offsetLeft=m.x,d.offsetTop=m.y}t.title.hasOwnProperty("standoff")&&(d.pad=0)}return t._titleStandoff=o,zAt.draw(e,i+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[n],avoid:d,transform:f,attributes:{x:h,y:p,"text-anchor":"middle"}})}Br.shouldShowZeroLine=function(e,t,r){var i=En.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===_7)&&(age(t,0)||!xMt(e,t,r,i)||bMt(e,t))};Br.clipEnds=function(e,t){return t.filter(function(r){return age(e,r.x)})};function age(e,t){var r=e.l2p(t);return r>1&&r1)for(n=1;n=n.min&&e=VAt:/%L/.test(t)?e>=UAt:/%[SX]/.test(t)?e>=x7:/%M/.test(t)?e>=PA:/%[HI]/.test(t)?e>=y1:/%p/.test(t)?e>=Uy:/%[Aadejuwx]/.test(t)?e>=Sf:/%[UVW]/.test(t)?e>=T0:/%[Bbm]/.test(t)?e>=y7:/%[q]/.test(t)?e>=m7:/%[Yy]/.test(t)?e>=g7:!0}});var FH=W((TOr,uge)=>{"use strict";uge.exports=function(t,r,i){var n,a;if(i){var o=r==="reversed"||r==="min reversed"||r==="max reversed";n=i[o?1:0],a=i[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?n:void 0),l=t("autorangeoptions.maxallowed",n===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var LH=W((AOr,cge)=>{"use strict";var SMt=FH();cge.exports=function(t,r,i,n){var a=r._template||{},o=r.type||a.type||"-";i("minallowed"),i("maxallowed");var s=i("range");if(!s){var l;!n.noInsiderange&&o!=="log"&&(l=i("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=i("range",l)))}var u=r.getAutorangeDflt(s,n),c=i("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,n),c=i("autorange",u)),c&&(SMt(i,c,s),(o==="linear"||o==="-")&&i("rangemode")),r.cleanRange()}});var hge=W((MOr,fge)=>{var EMt={left:0,top:0};fge.exports=kMt;function kMt(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var i=e.clientX||0,n=e.clientY||0,a=CMt(t);return r[0]=i-a.left,r[1]=n-a.top,r}function CMt(e){return e===window||e===document||e===document.body?EMt:e.getBoundingClientRect()}});var M7=W((SOr,dge)=>{"use strict";var DMt=uG();function FMt(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}dge.exports=DMt&&FMt()});var vge=W((EOr,pge)=>{"use strict";pge.exports=function(t,r,i,n,a){var o=(t-i)/(n-i),s=o+r/(n-i),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var yge=W((kOr,mge)=>{"use strict";var gge=tt(),LMt=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];mge.exports=function(t,r,i,n){return i==="left"?t=0:i==="center"?t=1:i==="right"?t=2:t=gge.constrain(Math.floor(t*3),0,2),n==="bottom"?r=0:n==="middle"?r=1:n==="top"?r=2:r=gge.constrain(Math.floor(r*3),0,2),LMt[r][t]}});var bge=W((COr,xge)=>{"use strict";var PMt=ww(),IMt=CD(),RMt=hA().getGraphDiv,zMt=(W6(),Pt($6)),PH=xge.exports={};PH.wrapped=function(e,t,r){var a;e=RMt(e),e._fullLayout&&IMt.clear(e._fullLayout._uid+zMt.HOVERID);let i=e._hoverdata;PH.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(a=e._fullLayout)!=null&&a.hoveranywhere&&(t!=null&&t.target)&&!i&&e.emit("plotly_unhover",{event:t,points:[]}))};PH.raw=function(t,r){var i=t._fullLayout,n=t._hoverdata;return r||(r={}),r.target&&!t._dragged&&PMt.triggerHandler(t,"plotly_beforehover",r)===!1?!1:(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&n&&t.emit("plotly_unhover",{event:r,points:n}),!0)}});var Ef=W((DOr,Age)=>{"use strict";var BMt=hge(),IH=fG(),qMt=M7(),OMt=tt().removeElement,NMt=(Zl(),Pt(Xl)),yb=Age.exports={};yb.align=vge();yb.getCursor=yge();var wge=bge();yb.unhover=wge.wrapped;yb.unhoverRaw=wge.raw;yb.init=function(t){var r=t.gd,i=1,n=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,p;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=m,qMt?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=m,a.addEventListener("touchstart",m,{passive:!1})):a.ontouchstart=m;function d(_,b,M){return Math.abs(_)n&&(i=Math.max(i-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var b;f.target===h?b=f:(b={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(M=>{var x=f[M];!b[M]&&typeof x!="function"&&(b[M]=x)})),t.clickFn&&t.clickFn(i,b),p||h.dispatchEvent(new MouseEvent("click",_))}r._dragging=!1,r._dragged=!1}};function Tge(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}yb.coverSlip=Tge;function _ge(e){return BMt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Xp=W((FOr,Mge)=>{"use strict";Mge.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(i){i.indexOf("cursor-")===0&&t.classed(i,!1)}),r&&t.classed("cursor-"+r,!0)}});var kge=W((LOr,Ege)=>{"use strict";var RH=Xp(),BA="data-savedcursor",Sge="!!";Ege.exports=function(t,r){var i=t.attr(BA);if(r){if(!i){for(var n=(t.attr("class")||"").split(" "),a=0;aYMt,itemGap:()=>WMt,itemHeightPad:()=>ZMt,itemMinHeight:()=>XMt,scrollBarColor:()=>GMt,scrollBarEnterAttrs:()=>jMt,scrollBarMargin:()=>HMt,scrollBarMinHeight:()=>VMt,scrollBarWidth:()=>UMt,titlePad:()=>$Mt});var UMt,VMt,GMt,HMt,jMt,$Mt,WMt,YMt,XMt,ZMt,E7=Ci(()=>{"use strict";UMt=6,VMt=20,GMt="#808BA4",HMt=4,jMt={rx:20,ry:3,width:0,height:0},$Mt=2,WMt=5,YMt=6,XMt=16,ZMt=3});var BH=W((POr,Dge)=>{"use strict";var zH=jo(),KMt=Yl(),{dfltFillHeight:Cge}=(E7(),Pt(S7));Dge.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:KMt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:zH({editType:"legend"}),grouptitlefont:zH({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemheight:{valType:"number",min:Cge,dflt:Cge,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},groupdoubleclick:{valType:"enumerated",values:["toggleitem","togglegroup"],editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:zH({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var OA=W(qA=>{"use strict";qA.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};qA.isVertical=function(t){return t.orientation!=="h"};qA.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};qA.getId=function(t){return t._id||"legend"}});var OH=W((ROr,Fge)=>{"use strict";var k7=xi(),A0=tt(),JMt=Ra(),QMt=Ja(),eSt=BH(),tSt=pw(),qH=OA();function rSt(e,t,r,i,n){var a=t[e]||{},o=JMt.newContainer(r,e);function s(B,O){return A0.coerce(a,o,eSt,B,O)}var l=A0.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(B,O){var $=c._input,X=c;return A0.coerce($,X,QMt,B,O)},h=r.font||{},p=A0.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),d=0,v=!1,m="normal",g=(r.shapes||[]).filter(function(B){return B.showlegend});function w(B){return k7.traceIs(B,"pie-like")&&B._length!=null&&(Array.isArray(B.legend)||Array.isArray(B.showlegend))}i.filter(w).forEach(function(B){B.visible&&d++;for(var O=0;OB.legend.length)for(var X=B.legend.length;X(e==="legend"?1:0));if(x===!1&&(r[e]=void 0),x===!1&&!a.uirevision||(s("uirevision",r.uirevision),x===!1))return;s("borderwidth");var A=s("orientation"),T=s("yref"),y=s("xref"),E=A==="h",S=T==="paper",C=y==="paper",k,D,F,P="left";E?(k=0,k7.getComponentMethod("rangeslider","isVisible")(t.xaxis)?S?(D=1.1,F="bottom"):(D=1,F="top"):S?(D=-.1,F="top"):(D=0,F="bottom")):(D=1,F="auto",C?k=1.02:(k=1,P="right")),A0.coerce(a,o,{x:{valType:"number",editType:"legend",min:C?-2:0,max:C?3:1,dflt:k}},"x"),A0.coerce(a,o,{y:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:D}},"y"),s("traceorder",m),qH.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemheight"),s("itemclick"),s("itemdoubleclick");let R=s("groupclick");s("groupdoubleclick",R),s("xanchor",P),s("yanchor",F),s("maxheight"),s("valign"),A0.noneOrAll(a,o,["x","y"]);var L=s("title.text");if(L){s("title.side",E?"left":"top");var I=A0.extendFlat({},l,{size:A0.bigFont(l.size)});A0.coerceFont(s,"title.font",I);let B=n>1;s("titleclick",B?"toggle":!1),s("titledoubleclick",B?"toggleothers":!1)}}Fge.exports=function(t,r,i){var n,a=i.slice(),o=r.shapes;if(o)for(n=0;n{"use strict";var Vy=xi(),NH=tt(),iSt=NH.pushUnique,nSt=OA(),Lge=!0;UH.handleItemClick=function(t,r,i,n,a){var o=r._fullLayout;if(r._dragged||r._editing)return;var s=t.data()[0][0];if(s.groupTitle&&s.noClick)return;let l=a===2?i.groupdoubleclick:i.groupclick;n==="toggle"&&i.itemdoubleclick==="toggleothers"&&Lge&&r.data&&r._context.showTips&&(NH.notifier(NH._(r,"Double-click on legend to isolate one trace"),"long",r),Lge=!1);var u=l==="togglegroup",c=o.hiddenlabels?o.hiddenlabels.slice():[],f=r._fullData;let h=(o.shapes||[]).filter(xe=>xe.showlegend||xe.legendgroup);var p=f.concat(h),d=s.trace;d._isShape&&(d=o.shapes[d.index]);var v=d.legendgroup,m,g,w,_,b,M,x={},A=[],T=[],y=[];function E(xe,ce){var oe=A.indexOf(xe),Se=x.visible;return Se||(Se=x.visible=[]),A.indexOf(xe)===-1&&(A.push(xe),oe=A.length-1),Se[oe]=ce,oe}var S=(o.shapes||[]).map(function(xe){return xe._input}),C=!1;function k(xe,ce){S[xe].visible=ce,C=!0}function D(xe,ce){if(!(s.groupTitle&&!u)){var oe=xe._isShape,Se=xe.index;Se===void 0&&(Se=xe._index);var be=xe.visible===!1?!1:ce;oe?k(Se,be):E(Se,be)}}var F=d.legend;if(!d._isShape&&Vy.traceIs(d,"pie-like")){var P=s.label,R=c.indexOf(P);if(n==="toggle")R===-1?c.push(P):c.splice(R,1);else if(n==="toggleothers"){var L=R!==-1,I=[];for(m=0;mg.showlegend||g.legendgroup),l=a.concat(s);function u(g){return(g.legend||"legend")===o}var c,f;if(i==="toggle")c=!l.some(function(w){return u(w)&&w.visible===!0}),f=!1;else{let g=l.some(function(w){return!u(w)&&w.visible===!0&&w.showlegend!==!1});c=!0,f=!g}let h={visible:[]},p=[],d=(n.shapes||[]).map(function(g){return g._input});for(var v=!1,m=0;m{"use strict";var{isArrayOrTypedArray:GH}=Tc(),Pge=xi(),HH=OA();Ige.exports=function(t,r,i){var n=r._inHover,a=HH.isGrouped(r),o=HH.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,p,d;function v(B,O,$){if(r.visible!==!1&&!(i&&B!==r._id))if(O===""||!HH.isGrouped(r)){var X="~~i"+f;l.push(X),s[X]=[$],f++}else l.indexOf(O)===-1?(l.push(O),u=!0,s[O]=[$]):s[O].push($)}for(p=0;pk&&(S=k)}y[p][0]._groupMinRank=S,y[p][0]._preGroupSort=p}var D=function(B,O){return B[0]._groupMinRank-O[0]._groupMinRank||B[0]._preGroupSort-O[0]._preGroupSort},F=function(B,O){var $=GH(B.trace.legendrank)?B.trace.legendrank[B.i]:B.trace.legendrank,X=GH(O.trace.legendrank)?O.trace.legendrank[O.i]:O.trace.legendrank;return $-X||B._preSort-O._preSort};for(y.forEach(function(B,O){B[0]._preGroupSort=O}),y.sort(D),p=0;p{"use strict";var C7=tt();function zge(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}xb.formatPiePercent=function(t,r){var i=zge((t*100).toPrecision(3));return C7.numSeparate(i,r)+"%"};xb.formatPieValue=function(t,r){var i=zge(t.toPrecision(10));return C7.numSeparate(i,r)};xb.getFirstFilled=function(t,r){if(C7.isArrayOrTypedArray(t))for(var i=0;i{"use strict";var aSt=Qi(),oSt=ti();Bge.exports=function(t,r,i,n){var a=i.marker.pattern;a&&a.shape?aSt.pointStyle(t,i,n,r):oSt.fill(t,r.color)}});var Nw=W((NOr,Uge)=>{"use strict";var Oge=ti(),Nge=Gy().castOption,sSt=qge();Uge.exports=function(t,r,i,n){var a=i.marker.line,o=Nge(a.color,r.pts)||Oge.defaultLine,s=Nge(a.width,r.pts)||0;t.call(sSt,r,i,n).style("stroke-width",s).call(Oge.stroke,o)}});var XH=W((UOr,$ge)=>{"use strict";var kf=gi(),jH=xi(),nf=tt(),$H=nf.strTranslate,M0=Qi(),bd=ti(),WH=Sc().extractOpts,F7=Wo(),lSt=Nw(),uSt=Gy().castOption,Vge=(E7(),Pt(S7)),Gge=12,Hge=5,bb=2,cSt=10,Uw=5;$ge.exports=function(t,r,i){var n=r._fullLayout;i||(i=n.legend);var a=i.itemsizing==="constant",o=i.itemwidth,s=i.itemheight,l=(o+Vge.itemGap*2)/2,u=$H(l,0),c=function(T,y,E,S){var C;if(T+1)C=T;else if(y&&y.width>0)C=y.width;else return 0;return a?S:Math.min(C,E)};t.each(function(T){var y=kf.select(this),E=nf.ensureSingle(y,"g","layers");E.style("opacity",T[0].trace.opacity);var S=i.indentation,C=i.valign,k=T[0].lineHeight,D=T[0].height;if(C==="middle"&&S===0||!k||!D)E.attr("transform",null);else{var F={top:1,bottom:-1}[C],P=F*(.5*(k-D+3))||0,R=i.indentation;E.attr("transform",$H(R,P))}var L=E.selectAll("g.legendfill").data([T]);L.enter().append("g").classed("legendfill",!0);var I=E.selectAll("g.legendlines").data([T]);I.enter().append("g").classed("legendlines",!0);var B=E.selectAll("g.legendsymbols").data([T]);B.enter().append("g").classed("legendsymbols",!0),B.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(A).each(p).each(v).each(d).each(g).each(M).each(b).each(f).each(h).each(w).each(_);function f(T){var y=jge(T),E=y.showFill,S=y.showLine,C=y.showGradientLine,k=y.showGradientFill,D=y.anyFill,F=y.anyLine,P=T[0],R=P.trace,L,I,B=WH(R),O=B.colorscale,$=B.reversescale,X=function(H){if(H.size())if(E)M0.fillGroupStyle(H,r,!0);else{var j="legendfill-"+R.uid;M0.gradient(H,r,j,YH($),O,"fill")}},K=function(H){if(H.size()){var j="legendline-"+R.uid;M0.lineGroupStyle(H),M0.gradient(H,r,j,YH($),O,"stroke")}},G=F7.hasMarkers(R)||!D?"M5,0":F?"M5,-2":"M5,-3",q=kf.select(this),J=q.select(".legendfill").selectAll("path").data(E||k?[T]:[]);J.enter().append("path").classed("js-fill",!0),J.exit().remove(),J.attr("d",G+"h"+o+"v"+s+"h-"+o+"z").call(X);let N=E||k?(Vge.dfltFillHeight-s)/2:0;if(q.selectAll("g.legendfill, g.legendlines, g.legendsymbols").attr("transform",N?$H(0,N):null),S||C){var V=c(void 0,R.line,cSt,Hge);I=nf.minExtend(R,{line:{width:V}}),L=[nf.minExtend(P,{trace:I})]}var Y=q.select(".legendlines").selectAll("path").data(S||C?[L]:[]);Y.enter().append("path").classed("js-line",!0),Y.exit().remove(),Y.attr("d",G+(C?"l"+o+",0.0001":"h"+o)).call(S?M0.lineGroupStyle:K)}function h(T){var y=jge(T),E=y.anyFill,S=y.anyLine,C=y.showLine,k=y.showMarker,D=T[0],F=D.trace,P=!k&&!S&&!E&&F7.hasText(F),R,L;function I(N,V,Y,H){var j=nf.nestedProperty(F,N).get(),Q=nf.isArrayOrTypedArray(j)&&V?V(j):j;if(a&&Q&&H!==void 0&&(Q=H),Y){if(QY[1])return Y[1]}return Q}function B(N){return D._distinct&&D.index&&N[D.index]?N[D.index]:N[0]}if(k||P||C){var O={},$={};if(k){O.mc=I("marker.color",B);var X=F.type==="scattermap";O.mx=X?"circle":I("marker.symbol",B),O.mo=I("marker.opacity",nf.mean,[.2,1]),O.mlc=I("marker.line.color",B),O.mlw=I("marker.line.width",nf.mean,[0,5],bb),O.mld=I("marker.line.dash",B),$.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var K=I("marker.size",nf.mean,[2,16],Gge);O.ms=K,$.marker.size=K}C&&($.line={width:I("line.width",B,[0,10],Hge)}),P&&(O.tx="Aa",O.tp=I("textposition",B),O.ts=10,O.tc=I("textfont.color",B),O.tf=I("textfont.family",B),O.tw=I("textfont.weight",B),O.ty=I("textfont.style",B),O.tv=I("textfont.variant",B),O.tC=I("textfont.textcase",B),O.tE=I("textfont.lineposition",B),O.tS=I("textfont.shadow",B)),R=[nf.minExtend(D,O)],L=nf.minExtend(F,$),L.selectedpoints=null,L.texttemplate=null}var G=kf.select(this).select("g.legendpoints"),q=G.selectAll("path.scatterpts").data(k?R:[]);q.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",u),q.exit().remove(),q.call(M0.pointStyle,L,r),k&&(R[0].mrc=3);var J=G.selectAll("g.pointtext").data(P?R:[]);J.enter().append("g").classed("pointtext",!0).append("text").attr("transform",u),J.exit().remove(),J.selectAll("text").call(M0.textPointStyle,L,r)}function p(T){var y=T[0].trace,E=y.type==="waterfall";if(T[0]._distinct&&E){var S=T[0].trace[T[0].dir].marker;return T[0].mc=S.color,T[0].mlw=S.line.width,T[0].mlc=S.line.color,m(T,this,"waterfall")}var C=[];y.visible&&E&&(C=T[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 k=kf.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(C);k.enter().append("path").classed("legendwaterfall",!0).attr("transform",u).style("stroke-miterlimit",1),k.exit().remove(),k.each(function(D){var F=kf.select(this),P=y[D[0]].marker,R=c(void 0,P.line,Uw,bb);F.attr("d",D[1]).style("stroke-width",R+"px").call(bd.fill,P.color),R&&F.call(bd.stroke,P.line.color)})}function d(T){m(T,this)}function v(T){m(T,this,"funnel")}function m(T,y,E){var S=T[0].trace,C=S.marker||{},k=C.line||{},D=C.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",F=E?S.visible&&S.type===E:jH.traceIs(S,"bar"),P=kf.select(y).select("g.legendpoints").selectAll("path.legend"+E).data(F?[T]:[]);P.enter().append("path").classed("legend"+E,!0).attr("d",D).attr("transform",u),P.exit().remove(),P.each(function(R){var L=kf.select(this),I=R[0],B=c(I.mlw,C.line,Uw,bb);L.style("stroke-width",B+"px");var O=I.mcc;if(!i._inHover&&"mc"in I){var $=WH(C),X=$.mid;X===void 0&&(X=($.max+$.min)/2),O=M0.tryColorscale(C,"")(X)}var K=O||I.mc||C.color,G=C.pattern,q=M0.getPatternAttr;let J=0;i._inHover&&I._distinct&&I.index!=null&&(J=I.index);let N=G&&(q(G.shape,J,"")||q(G.path,J,""));if(N){let Y=q(G.bgcolor,J,null),H=q(G.fgcolor,J,null);var V=G.fgopacity;let j=i._inHover?D7(q(G.size,J,8),8,10):D7(G.size,8,10),Q=i._inHover?D7(q(G.solidity,J,.5),.5,1):D7(G.solidity,.5,1),te=i._inHover?`hover-${S.uid}-${J}`:`legend-${S.uid}`;L.call(M0.pattern,"legend",r,te,N,j,Q,O,G.fillmode,Y,H,V)}else L.call(bd.fill,K);B&&bd.stroke(L,I.mlc||k.color)})}function g(T){var y=T[0].trace,E=kf.select(this).select("g.legendpoints").selectAll("path.legendbox").data(y.visible&&jH.traceIs(y,"box-violin")?[T]:[]);E.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),E.exit().remove(),E.each(function(){var S=kf.select(this);if((y.boxpoints==="all"||y.points==="all")&&bd.opacity(y.fillcolor)===0&&bd.opacity((y.line||{}).color)===0){var C=nf.minExtend(y,{marker:{size:a?Gge:nf.constrain(y.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});E.call(M0.pointStyle,C,r)}else{var k=c(void 0,y.line,Uw,bb);S.style("stroke-width",k+"px").call(bd.fill,y.fillcolor),k&&bd.stroke(S,y.line.color)}})}function w(T){var y=T[0].trace,E=kf.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(y.visible&&y.type==="candlestick"?[T,T]:[]);E.enter().append("path").classed("legendcandle",!0).attr("d",function(S,C){return C?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",u).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(S,C){var k=kf.select(this),D=y[C?"increasing":"decreasing"],F=c(void 0,D.line,Uw,bb);k.style("stroke-width",F+"px").call(bd.fill,D.fillcolor),F&&bd.stroke(k,D.line.color)})}function _(T){var y=T[0].trace,E=kf.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(y.visible&&y.type==="ohlc"?[T,T]:[]);E.enter().append("path").classed("legendohlc",!0).attr("d",function(S,C){return C?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",u).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(S,C){var k=kf.select(this),D=y[C?"increasing":"decreasing"],F=c(void 0,D.line,Uw,bb);k.style("fill","none").call(M0.dashLine,D.line.dash,F),F&&bd.stroke(k,D.line.color)})}function b(T){x(T,this,"pie")}function M(T){x(T,this,"funnelarea")}function x(T,y,E){var S=T[0],C=S.trace,k=E?C.visible&&C.type===E:jH.traceIs(C,E),D=kf.select(y).select("g.legendpoints").selectAll("path.legend"+E).data(k?[T]:[]);if(D.enter().append("path").classed("legend"+E,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),D.exit().remove(),D.size()){var F=C.marker||{},P=c(uSt(F.line.width,S.pts),F.line,Uw,bb),R="pieLike",L=nf.minExtend(C,{marker:{line:{width:P}}},R),I=nf.minExtend(S,{trace:L},R);lSt(D,I,L,r)}}function A(T){var y=T[0].trace,E,S=[];if(y.visible)switch(y.type){case"histogram2d":case"heatmap":S=[["M-15,-2V4H15V-2Z"]],E=!0;break;case"choropleth":case"choroplethmap":S=[["M-6,-6V6H6V-6Z"]],E=!0;break;case"densitymap":S=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],E="radial";break;case"cone":S=[["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"]],E=!1;break;case"streamtube":S=[["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"]],E=!1;break;case"surface":S=[["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"]],E=!0;break;case"mesh3d":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!1;break;case"volume":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!0;break;case"isosurface":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],E=!1;break}var C=kf.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(S);C.enter().append("path").classed("legend3dandfriends",!0).attr("transform",u).style("stroke-miterlimit",1),C.exit().remove(),C.each(function(k,D){var F=kf.select(this),P=WH(y),R=P.colorscale,L=P.reversescale,I=function(X){if(X.size()){var K="legendfill-"+y.uid;M0.gradient(X,r,K,YH(L,E==="radial"),R,"fill")}},B;if(R){if(!E){var $=R.length;B=D===0?R[L?$-1:0][1]:D===1?R[L?0:$-1][1]:R[Math.floor(($-1)/2)][1]}}else{var O=y.vertexcolor||y.facecolor||y.color;B=nf.isArrayOrTypedArray(O)?O[D]||O[0]:O}F.attr("d",k[0]),B?F.call(bd.fill,B):F.call(I)})}};function YH(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function jge(e){var t=e[0].trace,r=t.contours,i=F7.hasLines(t)||t.visible&&t.type==="quiver",n=F7.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:i=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:n,showLine:i,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:i||o,anyFill:a||s}}function D7(e,t,r){return e&&nf.isArrayOrTypedArray(e)?t:e>r?r:e}});var QH=W((VOr,tme)=>{"use strict";var Cf=gi(),Il=tt(),KH=Qo(),_b=xi(),I7=ww(),ZH=Ef(),Rl=Qi(),NA=ti(),Wg=ao(),Wge=VH().handleItemClick,Yge=VH().handleTitleClick,js=(E7(),Pt(S7)),JH=(Jl(),Pt(Kl)),Qge=JH.LINE_SPACING,Gw=JH.FROM_TL,Xge=JH.FROM_BR,Zge=Rge(),fSt=XH(),Hw=OA(),Vw=1,hSt=/^legend[0-9]*$/;tme.exports=function(t,r){if(r)Kge(t,r);else{var i=t._fullLayout,n=i._legends,a=i._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=Cf.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(hSt)&&n.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var d=i.hiddenlabels||[];if(!s&&(!i.showlegend||!l.length))return o.selectAll("."+n).remove(),i._topdefs.select("#"+a).remove(),KH.autoMargin(e,n);var v=Il.ensureSingle(o,"g",n,function(T){s||T.attr("pointer-events","all")}),m=Il.ensureSingleById(i._topdefs,"clipPath",a,function(T){T.append("rect")}),g=Il.ensureSingle(v,"rect","bg",function(T){T.attr("shape-rendering","crispEdges")});g.call(NA.stroke,r.bordercolor).call(NA.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var w=Il.ensureSingle(v,"g","scrollbox"),_=r.title;r._titleWidth=0,r._titleHeight=0;var b;_.text?(b=Il.ensureSingle(w,"text",n+"titletext"),b.attr("text-anchor","start").call(Rl.font,_.font).text(_.text),P7(b,w,e,r,Vw),!s&&(r.titleclick||r.titledoubleclick)&&gSt(w,e,r,n)):(w.selectAll("."+n+"titletext").remove(),w.selectAll("."+n+"titletoggle").remove());var M=Il.ensureSingle(v,"rect","scrollbar",function(T){T.attr(js.scrollBarEnterAttrs).call(NA.fill,js.scrollBarColor)}),x=w.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var A=x.selectAll("g.traces").data(Il.identity);A.enter().append("g").attr("class","traces"),A.exit().remove(),A.style("opacity",function(T){let y=T[0],E=y.trace;if(y.groupTitle){let S=E.legendgroup,C=(i.shapes||[]).filter(function(D){return D.showlegend});return e._fullData.concat(C).some(function(D){return D.legendgroup===S&&(D.legend||"legend")===n&&D.visible===!0})?1:.5}return _b.traceIs(E,"pie-like")?d.indexOf(T[0].label)!==-1?.5:1:E.visible==="legendonly"?.5:1}).each(function(){Cf.select(this).call(pSt,e,r)}).call(fSt,e,r).each(function(T){s||T[0].groupTitle&&r.groupclick==="toggleitem"||Cf.select(this).call(vSt,e,n)}),Il.syncOrAsync([KH.previousPromises,function(){return xSt(e,x,A,r,w)},function(){var T=i._size,y=r.borderwidth,E=r.xref==="paper",S=r.yref==="paper";if(_.text){let ue=(i.shapes||[]).filter(function(Ee){return Ee.showlegend}),ge=e._fullData.concat(ue).some(function(Ee){let xe=Ee.legend||"legend";var ce=Array.isArray(xe)?xe.includes(n):xe===n;return ce&&Ee.visible===!0});b.style("opacity",ge?1:.5)}if(!s){var C,k;E?C=T.l+T.w*r.x-Gw[R7(r)]*r._width:C=i.width*r.x-Gw[R7(r)]*r._width,S?k=T.t+T.h*(1-r.y)-Gw[z7(r)]*r._effHeight:k=i.height*(1-r.y)-Gw[z7(r)]*r._effHeight;var D=bSt(e,n,C,k);if(D)return;if(i.margin.autoexpand){var F=C,P=k;C=E?Il.constrain(C,0,i.width-r._width):F,k=S?Il.constrain(k,0,i.height-r._effHeight):P,C!==F&&Il.log("Constrain "+n+".x to make legend fit inside graph"),k!==P&&Il.log("Constrain "+n+".y to make legend fit inside graph")}Rl.setTranslate(v,C,k)}if(M.on(".drag",null),v.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var R=r._effHeight;s&&(R=r._height),g.attr({width:r._width-y,height:R-y,x:y/2,y:y/2}),Rl.setTranslate(w,0,0),m.select("rect").attr({width:r._width-2*y,height:R-2*y,x:y,y}),Rl.setClipUrl(w,a,e),Rl.setRect(M,0,0,0,0),delete r._scrollY}else{var L=Math.max(js.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),I=r._effHeight-L-2*js.scrollBarMargin,B=r._height-r._effHeight,O=I/B,$=Math.min(r._scrollY||0,B);g.attr({width:r._width-2*y+js.scrollBarWidth+js.scrollBarMargin,height:r._effHeight-y,x:y/2,y:y/2}),m.select("rect").attr({width:r._width-2*y+js.scrollBarWidth+js.scrollBarMargin,height:r._effHeight-2*y,x:y,y:y+$}),Rl.setClipUrl(w,a,e),Y($,L,O),v.on("wheel",function(){$=Il.constrain(r._scrollY+Cf.event.deltaY/B*I,0,B),Y($,L,O),$!==0&&$!==B&&Cf.event.preventDefault()});var X,K,G,q=function(ue,ge,Ee){var xe=(Ee-ge)/O+ue;return Il.constrain(xe,0,B)},J=function(ue,ge,Ee){var xe=(ge-Ee)/O+ue;return Il.constrain(xe,0,B)},N=Cf.behavior.drag().on("dragstart",function(){var ue=Cf.event.sourceEvent;ue.type==="touchstart"?X=ue.changedTouches[0].clientY:X=ue.clientY,G=$}).on("drag",function(){var ue=Cf.event.sourceEvent;ue.buttons===2||ue.ctrlKey||(ue.type==="touchmove"?K=ue.changedTouches[0].clientY:K=ue.clientY,$=q(G,X,K),Y($,L,O))});M.call(N);var V=Cf.behavior.drag().on("dragstart",function(){var ue=Cf.event.sourceEvent;ue.type==="touchstart"&&(X=ue.changedTouches[0].clientY,G=$)}).on("drag",function(){var ue=Cf.event.sourceEvent;ue.type==="touchmove"&&(K=ue.changedTouches[0].clientY,$=J(G,X,K),Y($,L,O))});w.call(V)}function Y(ue,ge,Ee){r._scrollY=e._fullLayout[n]._scrollY=ue,Rl.setTranslate(w,0,-ue),Rl.setRect(M,r._width,js.scrollBarMargin+ue*Ee,js.scrollBarWidth,ge),m.select("rect").attr("y",y+ue)}if(e._context.edits.legendPosition){var H,j,Q,te;v.classed("cursor-move",!0),ZH.init({element:v.node(),gd:e,prepFn:function(ue){if(ue.target!==M.node()){var ge=Rl.getTranslate(v);Q=ge.x,te=ge.y}},moveFn:function(ue,ge){if(Q!==void 0&&te!==void 0){var Ee=Q+ue,xe=te+ge;Rl.setTranslate(v,Ee,xe),H=ZH.align(Ee,r._width,T.l,T.l+T.w,r.xanchor),j=ZH.align(xe+r._height,-r._height,T.t+T.h,T.t,r.yanchor)}},doneFn:function(){if(H!==void 0&&j!==void 0){var ue={};ue[n+".x"]=H,ue[n+".y"]=j,_b.call("_guiRelayout",e,ue)}},clickFn:function(ue,ge){var Ee=o.selectAll("g.traces").filter(function(){var xe=this.getBoundingClientRect();return ge.clientX>=xe.left&&ge.clientX<=xe.right&&ge.clientY>=xe.top&&ge.clientY<=xe.bottom});Ee.size()>0&&eme(e,r,Ee,ue,ge)}})}}],e)}}function L7(e,t,r){var i=e[0],n=i.width,a=t.entrywidthmode,o=i.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||n)}function eme(e,t,r,i,n){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:n,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:a};o._group&&(u.group=o._group),_b.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=I7.triggerHandler(e,"plotly_legendclick",u);if(i===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Wge(r,e,t,s,i)},e._context.doubleClickDelay)}else if(i===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=I7.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Wge(r,e,t,l,i)}}function pSt(e,t,r){var i=Hw.getId(r),n=e.data()[0][0],a=n.trace,o=_b.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;n.groupTitle?(u=n.groupTitle.text,c=n.groupTitle.font):(c=r.font,r.entries?u=n.text:(u=o?n.label:a.name,a._meta&&(u=Il.templateString(u,a._meta))));var f=Il.ensureSingle(e,"text",i+"text");f.attr("text-anchor","start").call(Rl.font,c).text(s?Jge(u,l):u);var h=r.indentation+r.itemwidth+js.itemGap*2;Wg.positionText(f,h,0),s?f.call(Wg.makeEditable,{gd:t,text:u}).call(P7,e,t,r).on("edit",function(p){this.text(Jge(p,l)).call(P7,e,t,r);var d={};return d.name=p,n.trace._isShape?_b.call("_guiRelayout",t,"shapes["+a.index+"].name",d.name):_b.call("_guiRestyle",t,d,a.index)}):P7(f,e,t,r)}function Jge(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var i=r-e.length;i>0;i--)e+=" ";return e}function vSt(e,t,r){var i=t._context.doubleClickDelay,n,a=1,o=Il.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(NA.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){n=new Date().getTime(),n-t._legendMouseDownTimei&&(a=Math.max(a-1,1)),eme(t,s,e,a,Cf.event)}}))}function gSt(e,t,r,i){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(i):c===i)&&_b.traceIs(u,"pie-like")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=Il.ensureSingle(e,"rect",i+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(NA.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimea&&(s=Math.max(s-1,1));let u={event:Cf.event,legendId:i,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(I7.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Yge(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,I7.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Yge(t,r,r.titledoubleclick))}))}function P7(e,t,r,i,n){i._inHover&&e.attr("data-notex",Wg.isPureTex(e.text())?null:!0),Wg.convertToTspans(e,r,function(){mSt(t,r,i,n)})}function mSt(e,t,r,i){var n=e.data()[0][0],a=n&&n.trace.showlegend;if(Array.isArray(a)&&(a=a[n.i]!==!1),!r._inHover&&n&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=Hw.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;i===Vw?c=r.title.font:n.groupTitle?c=n.groupTitle.font:c=r.font;var f=c.size*Qge,h,p;if(s){var d=Rl.bBox(s);h=d.height,p=d.width,i===Vw?Rl.setTranslate(o,u,u+h*.75):Rl.setTranslate(o,0,h*.25)}else{var v="."+l+(i===Vw?"title":"")+"text",m=e.select(v),g=Wg.lineCount(m),w=m.node();if(h=f*g,p=w?Rl.bBox(w).width:0,i===Vw)r.title.side==="left"&&(p+=js.itemGap*2),Wg.positionText(m,u+js.titlePad,u+f);else{var _=js.itemGap*2+r.indentation+r.itemwidth;n.groupTitle&&(_=js.itemGap,p-=r.indentation+r.itemwidth),Wg.positionText(m,_,-f*((g-1)/2-.3))}}if(i===Vw)r._titleWidth=p,r._titleHeight=h;else{n.lineHeight=f;let b=js.itemMinHeight+r.itemheight-js.dfltFillHeight;n.height=Math.max(h,js.itemMinHeight,b)+js.itemHeightPad,n.width=p}}function ySt(e){var t=0,r=0,i=e.title.side;return i&&(i.indexOf("left")!==-1&&(t=e._titleWidth),i.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function xSt(e,t,r,i,n){var a=e._fullLayout,o=Hw.getId(i);i||(i=a[o]);var s=a._size,l=Hw.isVertical(i),u=Hw.isGrouped(i),c=i.entrywidthmode==="fraction",f=i.borderwidth,h=2*f,p=js.itemGap,d=i.indentation+i.itemwidth+p*2,v=2*(f+p),m=z7(i),g=i.y<0||i.y===0&&m==="top",w=i.y>1||i.y===1&&m==="bottom",_=i.tracegroupgap,b={};let{orientation:M,yref:x}=i,{maxheight:A}=i,T=g||w||M!=="v"||x!=="paper";A||(A=T?.5:1);let y=T?a.height:s.h;i._maxHeight=Math.max(A>1?A:A*y,30);var E=0;i._width=0,i._height=0;var S=ySt(i);if(l)r.each(function(ue){var ge=ue[0].height;Rl.setTranslate(this,f+S[0],f+S[1]+i._height+ge/2+p),i._height+=ge,i._width=Math.max(i._width,ue[0].width)}),E=d+i._width,i._width+=p+d+h,i._height+=v,u&&(t.each(function(ue,ge){Rl.setTranslate(this,0,ge*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var C=R7(i),k=i.x<0||i.x===0&&C==="right",D=i.x>1||i.x===1&&C==="left",F=w||g,P=a.width/2;i._maxWidth=Math.max(k?F&&C==="left"?s.l+s.w:P:D?F&&C==="right"?s.r+s.w:P:s.w,2*d);var R=0,L=0;r.each(function(ue){var ge=L7(ue,i,d);R=Math.max(R,ge),L+=ge}),E=null;var I=0;if(u){var B=0,O=0,$=0;t.each(function(){var ue=0,ge=0;Cf.select(this).selectAll("g.traces").each(function(xe){var ce=L7(xe,i,d),oe=xe[0].height;Rl.setTranslate(this,S[0],S[1]+f+p+oe/2+ge),ge+=oe,ue=Math.max(ue,ce),b[xe[0].trace.legendgroup]=ue});var Ee=ue+p;O>0&&Ee+f+O>i._maxWidth?(I=Math.max(I,O),O=0,$+=B+_,B=ge):B=Math.max(B,ge),Rl.setTranslate(this,O,$),O+=Ee}),i._width=Math.max(I,O)+f,i._height=$+B+v}else{var X=r.size(),K=L+h+(X-1)*p=i._maxWidth&&(I=Math.max(I,N),q=0,J+=G,i._height+=G,G=0),Rl.setTranslate(this,S[0]+f+q,S[1]+f+J+ge/2+p),N=q+Ee+p,q+=xe,G=Math.max(G,ge)}),K?(i._width=q+h,i._height=G+v):(i._width=Math.max(I,N)+h,i._height+=G+v)}}i._width=Math.ceil(Math.max(i._width+S[0],i._titleWidth+2*(f+js.titlePad))),i._height=Math.ceil(Math.max(i._height+S[1],i._titleHeight+2*(f+js.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=e._context.edits,Y=V.legendText||V.legendPosition;if(r.each(function(ue){var ge=Cf.select(this).select("."+o+"toggle"),Ee=ue[0].height,xe=ue[0].trace.legendgroup,ce=L7(ue,i,d);u&&xe!==""&&(ce=b[xe]);var oe=Y?d:E||ce;!l&&!c&&(oe+=p/2),Rl.setRect(ge,0,-Ee/2,oe,Ee)}),i._inHover){let ue=i._width-h-p-S[0];r.each(function(ge){ge[0].textAlign==="right"&&Cf.select(this).select("."+o+"text").attr("text-anchor","end").call(Wg.positionText,ue)})}var H=n.select("."+o+"titletext");H.node()&&dSt(H,i,f);var j=n.select("."+o+"titletoggle");if(j.size()&&H.node()){var Q=H.attr("x")||0,te=js.titlePad;Rl.setRect(j,Q-te,f,i._titleWidth+2*te,i._titleHeight+2*te)}}function bSt(e,t,r,i){var n=e._fullLayout,a=n[t],o=R7(a),s=z7(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:n.width-r,l:r+a._width,b:n.height-i,t:i+a._effHeight};if(l&&u)return KH.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*Gw[o],r:a._width*Xge[o],b:a._effHeight*Xge[s],t:a._effHeight*Gw[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function R7(e){return Il.isRightAnchor(e)?"right":Il.isCenterAnchor(e)?"center":"left"}function z7(e){return Il.isBottomAnchor(e)?"bottom":Il.isMiddleAnchor(e)?"middle":"top"}});var nj=W(ij=>{"use strict";var Xg=gi(),Yg=hn(),$s=tt(),_St=$s.pushUnique,ej=$s.strTranslate,wSt=$s.strRotate,TSt=ww(),Ps=ao(),ASt=kge(),b1=Qi(),Ql=ti(),B7=Ef(),Zp=Yi(),MSt=(Zl(),Pt(Xl)).zindexSeparator,wb=xi(),S0=ah(),Tb=(W6(),Pt($6)),SSt=OH(),ESt=QH(),fme=Tb.YANGLE,rj=Math.PI*fme/180,kSt=1/Math.sin(rj),CSt=Math.cos(rj),DSt=Math.sin(rj),Ms=Tb.HOVERARROWSIZE,Ea=Tb.HOVERTEXTPAD,rme={box:!0,ohlc:!0,violin:!0,candlestick:!0},FSt={scatter:!0,scattergl:!0,splom:!0};function ime(e,t){return e.distance-t.distance}ij.hover=function(t,r,i,n){t=$s.getGraphDiv(t);var a=r.target;$s.throttle(t._fullLayout._uid+Tb.HOVERID,Tb.HOVERMINTIME,function(){PSt(t,r,i,n,a)})};ij.loneHover=function(t,r){var i=!0;Array.isArray(t)||(i=!1,t=[t]);var n=r.gd,a=vme(n),o=gme(n),s=t.map(function(d){var v=d._x0||d.x0||d.x||0,m=d._x1||d.x1||d.x||0,g=d._y0||d.y0||d.y||0,w=d._y1||d.y1||d.y||0,_=d.eventData;if(_){var b=Math.min(v,m),M=Math.max(v,m),x=Math.min(g,w),A=Math.max(g,w),T=d.trace;if(wb.traceIs(T,"gl3d")){var y=n._fullLayout[T.scene]._scene.container,E=y.offsetLeft,S=y.offsetTop;b+=E,M+=E,x+=S,A+=S}_.bbox={x0:b+o,x1:M+o,y0:x+a,y1:A+a},_.xPixel=(v+m)/2,_.yPixel=(g+w)/2,r.inOut_bbox&&r.inOut_bbox.push(_.bbox)}else _=!1;return{color:d.color||Ql.defaultLine,x0:d.x0||d.x||0,x1:d.x1||d.x||0,y0:d.y0||d.y||0,y1:d.y1||d.y||0,xLabel:d.xLabel,yLabel:d.yLabel,zLabel:d.zLabel,text:d.text,name:d.name,idealAlign:d.idealAlign,borderColor:d.borderColor,fontFamily:d.fontFamily,fontSize:d.fontSize,fontColor:d.fontColor,fontWeight:d.fontWeight,fontStyle:d.fontStyle,fontVariant:d.fontVariant,nameLength:d.nameLength,textAlign:d.textAlign,trace:d.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:d.hovertemplate||!1,hovertemplateLabels:d.hovertemplateLabels||!1,eventData:_}}),l=!1,u=dme(s,{gd:n,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||Ql.background,container:Xg.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels;function f(){var d=5,v=0,m=0;c.sort(function(g,w){return g.y0-w.y0}).each(function(g,w){var _=g.y0-g.by/2;_-dT[0]._length||ge<0||ge>y[0]._length)return B7.unhoverRaw(e,t)}if(t.pointerX=ue+T[0]._offset,t.pointerY=ge+y[0]._offset,"xval"in t?R=S0.flat(a,t.xval):R=S0.p2c(T,ue),"yval"in t?L=S0.flat(a,t.yval):L=S0.p2c(y,ge),e._hoverPointerX=t.pointerX,e._hoverPointerY=t.pointerY,!Yg(R[0])||!Yg(L[0]))return $s.warn("Fx.hover failed",t,e),B7.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=R,e._hoverYVals=L,e._hoverXAxes=T,e._hoverYAxes=y);var ce=1/0;function oe(Ut,Lr){for(B=0;BV&&(F.splice(0,V),ce=F[0].distance),wb.traceIs($,"ternary")&&D!==0){let gn=N.subplot;if(["aaxis","baxis","caxis"].some(ua=>gn[ua].showspikes&&gn[ua].spikesnap!=="hovered data")){let ua=ii==null?void 0:ii[0];if(!Number.isFinite(ua==null?void 0:ua.spikeDistance)){let ro=$s.extendFlat({},N,{distance:D,index:!1}),ba=$._module.hoverPoints(ro,q,J,"closest");ua=ba&&ba[0]}let as=H[X];ua&&ua.index!==void 0&&ua.index!==!1&&ua.spikeDistance<=D&&(!as||ua.spikeDistanceln.spikeDistance)&&(Y.vLinePoint=ln))}var pn=Xi.filter(function(gn){return gn.ya.showspikes&&gn.ya.spikesnap!=="hovered data"});if(pn.length){var zn=pn[0];Yg(zn.x0)&&Yg(zn.y0)&&(ln=fe(zn),(!Y.hLinePoint||Y.hLinePoint.spikeDistance>ln.spikeDistance)&&(Y.hLinePoint=ln))}}}}}oe();function Se(){if(s._hoverlayer.selectAll(".ternary-spikes").remove(),D!==0)for(let Ut=0;UtFr.trace.subplot===Lr&&Fr.index!==void 0&&Fr.index!==!1&&Fr.spikeDistance<=D);jr.drawSpikelines(ii,H[Lr],R&&R[Ut],L&&L[Ut])}}}function be(Ut,Lr,jr){for(var ii=null,Fr=1/0,Ii,Xi=0;XiUt.trace.index===Je.trace.index):F=[Je];var rt=F.length,mt=cme("x",Je,s),dt=cme("y",Je,s);oe(mt,dt);var St=[],Ke={},bt=0,pt=function(Ut){var Lr=rme[Ut.trace.type]?hme(Ut):Ut.trace.index;if(!Ke[Lr])bt++,Ke[Lr]=bt,St.push(Ut);else{var jr=Ke[Lr]-1,ii=St[jr];jr>0&&Math.abs(Ut.distance)rt-1;Oe--)pt(F[Oe]);F=St,re()}var Ue=e._hoverdata,je=[],$e=vme(e),Ie=gme(e);for(let Ut of F){var Ve=S0.makeEventData(Ut,Ut.trace,Ut.cd);if(Ut.hovertemplate!==!1){var st=!1;Ut.cd[Ut.index]&&Ut.cd[Ut.index].ht&&(st=Ut.cd[Ut.index].ht),Ut.hovertemplate=st||Ut.trace.hovertemplate||!1}if(Ut.xa&&Ut.ya){var _t=Ut.x0+Ut.xa._offset,Wt=Ut.x1+Ut.xa._offset,Ht=Ut.y0+Ut.ya._offset,fr=Ut.y1+Ut.ya._offset,lr=Math.min(_t,Wt),Ot=Math.max(_t,Wt),Jt=Math.min(Ht,fr),Cr=Math.max(Ht,fr);Ve.bbox={x0:lr+Ie,x1:Ot+Ie,y0:Jt+$e,y1:Cr+$e},Ve.xPixel=(_t+Wt)/2,Ve.yPixel=(Ht+fr)/2}Ut.eventData=[Ve],je.push(Ve)}e._hoverdata=je;var Ge=p==="y"&&(P.length>1||F.length>1)||p==="closest"&&j&&F.length>1,Qe=Ql.combine(s.plot_bgcolor||Ql.background,s.paper_bgcolor),nt=dme(F,{gd:e,hovermode:p,rotateLabels:Ge,bgColor:Qe,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),gt=nt.hoverLabels;if(S0.isUnifiedHover(p)||(ame(gt,Ge,s,nt.commonLabelBoundingBox),O7(gt,Ge,s._invScaleX,s._invScaleY),nt.mathjaxPromise&&nt.mathjaxPromise.then(function(){e._hoverdata===je&&(ame(gt,Ge,s,nt.commonLabelBoundingBox),O7(gt,Ge,s._invScaleX,s._invScaleY),gt.each(function(){var Ut=Xg.select(this);Ps.repositionMathGroup(Ut.select("text.nums")),Ps.repositionMathGroup(Ut.select("text.name"))}))})),n&&n.tagName){var ht=wb.getComponentMethod("annotations","hasClickToShow")(e,je);ASt(Xg.select(n),ht?"pointer":"")}var Ft=BSt(e,t,Ue);if(!n||i||!Ft&&!s.hoveranywhere)return;Ue&&Ft&&e.emit("plotly_unhover",{event:t,points:Ue}),hr(e._hoverdata);function hr(Ut){e.emit("plotly_hover",{event:t,points:Ut,xaxes:T,yaxes:y,xvals:S0.c2dApply(T,R),yvals:S0.c2dApply(y,L),xPixel:t.pointerX,yPixel:t.pointerY})}}function hme(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var ISt=/([\s\S]*)<\/extra>/;function tj(e,t){return q7(e,Ps.getMathOrTextNode(t))}function dme(e,t){var r=t.gd,i=r._fullLayout,n=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=[],f=t.fontFamily||Tb.HOVERFONT,h=t.fontSize||Tb.HOVERFONTSIZE,p=t.fontWeight||i.font.weight,d=t.fontStyle||i.font.style,v=t.fontVariant||i.font.variant,m=t.fontTextcase||i.font.textcase,g=t.fontLineposition||i.font.lineposition,w=t.fontShadow||i.font.shadow,_=e[0],b=_.xa,M=_.ya,x=n.charAt(0),A=x+"Label",T=_[A];if(T===void 0&&b.type==="multicategory")for(var y=0;yi.width-$e&&(Ie=i.width-$e),me.attr("d","M"+(Oe-Ie)+",0L"+(Oe-Ie+Ms)+","+je+Ms+"H"+$e+"v"+je+(Ea*2+pt.height)+"H"+-$e+"V"+je+Ms+"H"+(Oe-Ie-Ms)+"Z"),Oe=Ie,B.minX=Oe-$e,B.maxX=Oe+$e,b.side==="top"?(B.minY=Ue-(Ea*2+pt.height),B.maxY=Ue-Ea):(B.minY=Ue+Ea,B.maxY=Ue+(Ea*2+pt.height))}else{var Ve,st,_t;M.side==="right"?(Ve="start",st=1,_t="",Oe=b._offset+b._length):(Ve="end",st=-1,_t="-",Oe=b._offset),Ue=M._offset+(_.y0+_.y1)/2,Le.attr("text-anchor",Ve),me.attr("d","M0,0L"+_t+Ms+","+Ms+"V"+(Ea+pt.height/2)+"h"+_t+(Ea*2+pt.width)+"V-"+(Ea+pt.height/2)+"H"+_t+Ms+"V-"+Ms+"Z"),B.minY=Ue-(Ea+pt.height/2),B.maxY=Ue+(Ea+pt.height/2),M.side==="right"?(B.minX=Oe+Ms,B.maxX=Oe+Ms+(Ea*2+pt.width)):(B.minX=Oe-Ms-(Ea*2+pt.width),B.maxX=Oe-Ms);var Wt=pt.height/2,Ht=S-pt.top-Wt,fr="clip"+i._uid+"commonlabel"+M._id,lr;if(Oeme.hoverinfo!=="none");if(we.length===0)return[];var O=i.hoverlabel,$=O.font,X=we[0],K=((n==="x unified"?X.xa:X.ya).unifiedhovertitle||{}).text,G=K?$s.hovertemplateString({data:n==="x unified"?[{xa:X.xa,x:X.xVal}]:[{ya:X.ya,y:X.yVal}],fallback:X.trace.hovertemplatefallback,locale:i._d3locale,template:K}):T,q={showlegend:!0,legend:{title:{text:G,font:$},font:$,bgcolor:O.bgcolor,bordercolor:O.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},J={font:$};SSt(q,J,r._fullData);var N=J.legend;N.entries=[];for(var V=0;V=0?Te=ae:_e+Ee=0?Te=_e:re+Ee=0?Ce=fe:ee+xe=0?Ce=ee:pe+xe=0,(we.idealAlign==="top"||!nt)&>?(_t-=Ht/2,we.anchor="end"):nt?(_t+=Ht/2,we.anchor="start"):we.anchor="middle",we.crossPos=_t;else{if(we.pos=_t,nt=st+Wt/2+Qe<=C,gt=st-Wt/2-Qe>=0,(we.idealAlign==="left"||!nt)&>)st-=Wt/2,we.anchor="end";else if(nt)st+=Wt/2,we.anchor="start";else{we.anchor="middle";var ht=Qe/2,Ft=st+ht-C,hr=st-ht;Ft>0&&(st-=Ft),hr<0&&(st+=-hr)}we.crossPos=st}$e.attr("text-anchor",we.anchor),fr&&Ie.attr("text-anchor",we.anchor),me.attr("transform",ej(st,_t)+(a?wSt(fme):""))}}),{hoverLabels:ze,commonLabelBoundingBox:B,mathjaxPromise:c.length?Promise.all(c):null}}function nme(e,t,r,i,n,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=$s.templateString(e.name,e.trace._meta)),o=ume(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===n?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),a&&s===""&&!e.hovertemplate&&(o===""&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let p=e.hovertemplateLabels||e;e[l+"Label"]!==n&&(p[l+"other"]=p[l+"Val"],p[l+"otherLabel"]=p[l+"Label"]),s=$s.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:p,locale:i._d3locale,template:c}),s=s.replace(ISt,(d,v)=>(o=ume(v,e.nameLength),""))}return[s,o]}function ame(e,t,r,i){var n=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=i.minX,h=i.maxX,p=i.minY,d=i.maxY,v=function(P){return P*r._invScaleX},m=function(P){return P*r._invScaleY};e.each(function(P){var R=P[n],L=P[a],I=R._id.charAt(0)==="x",B=R.range;c===0&&B&&B[0]>B[1]!==I&&(s=-1);var O=0,$=I?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var X=pme(P,t),K=P.anchor,G=K==="end"?-1:1,q,J;if(K==="middle")q=P.crossPos+(I?m(X.y-P.by/2):v(P.bx/2+P.tx2width/2)),J=q+(I?m(P.by):v(P.bx));else if(I)q=P.crossPos+m(Ms+X.y)-m(P.by/2-Ms),J=q+m(P.by);else{var N=v(G*Ms+X.x),V=N+v(G*P.bx);q=P.crossPos+Math.min(N,V),J=P.crossPos+Math.max(N,V)}I?p!==void 0&&d!==void 0&&Math.min(J,d)-Math.max(q,p)>1&&(L.side==="left"?(O=L._mainLinePosition,$=r.width):$=L._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(J,h)-Math.max(q,f)>1&&(L.side==="top"?(O=L._mainLinePosition,$=r.height):$=L._mainLinePosition)}u[c++]=[{datum:P,traceIndex:P.trace.index,dp:0,pos:P.pos,posref:P.posref,size:P.by*(I?kSt:1)/2,pmin:O,pmax:$}]}),u.sort(function(P,R){return P[0].posref-R[0].posref||s*(R[0].traceIndex-P[0].traceIndex)});var g,w,_,b,M,x,A;function T(P){var R=P[0],L=P[P.length-1];if(w=R.pmin-R.pos-R.dp+R.size,_=L.pos+L.dp+L.size-R.pmax,w>.01){for(M=P.length-1;M>=0;M--)P[M].dp+=w;g=!1}if(!(_<.01)){if(w<-.01){for(M=P.length-1;M>=0;M--)P[M].dp-=_;g=!1}if(g){var I=0;for(b=0;bR.pmax&&I++;for(b=P.length-1;b>=0&&!(I<=0);b--)x=P[b],x.pos>R.pmax-1&&(x.del=!0,I--);for(b=0;b=0;M--)P[M].dp-=_;for(b=P.length-1;b>=0&&!(I<=0);b--)x=P[b],x.pos+x.dp+x.size>R.pmax&&(x.del=!0,I--)}}}for(;!g&&o<=l;){for(o++,g=!0,b=0;b.01){for(M=E.length-1;M>=0;M--)E[M].dp+=w;for(y.push.apply(y,E),u.splice(b+1,1),A=0,M=y.length-1;M>=0;M--)A+=y[M].dp;for(_=A/y.length,M=y.length-1;M>=0;M--)y[M].dp-=_;g=!1}else b++}u.forEach(T)}for(b=u.length-1;b>=0;b--){var k=u[b];for(M=k.length-1;M>=0;M--){var D=k[M],F=D.datum;F.offset=D.dp,F.del=D.del}}}function pme(e,t){var r=0,i=e.offset;return t&&(i*=-DSt,r=e.offset*CSt),{x:r,y:i}}function RSt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Ms+Ea),i=r+t*(e.txwidth+Ea),n=e.anchor==="middle";return n&&(r-=e.tx2width/2,i+=e.txwidth/2+Ea),{alignShift:t,textShiftX:r,text2ShiftX:i}}function O7(e,t,r,i){var n=function(o){return o*r},a=function(o){return o*i};e.each(function(o){var s=Xg.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=RSt(o),h=pme(o,t),p=h.x,d=h.y,v=u==="middle",m="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,g;v?g="M-"+n(o.bx/2+o.tx2width/2)+","+a(d-o.by/2)+"h"+n(o.bx)+"v"+a(o.by)+"h-"+n(o.bx)+"Z":m?g="M0,0L"+n(c*Ms+p)+","+a(Ms+d)+"v"+a(o.by/2-Ms)+"h"+n(c*o.bx)+"v-"+a(o.by)+"H"+n(c*Ms+p)+"V"+a(d-Ms)+"Z":g="M"+n(c*Ms+p)+","+a(d-o.by/2)+"h"+n(c*o.bx)+"v"+a(o.by)+"h"+n(-c*o.bx)+"Z",s.select("path").attr("d",g);var w=p+f.textShiftX,_=d+o.ty0-o.by/2+Ea,b=o.textAlign||"auto";b!=="auto"&&(b==="left"&&u!=="start"?(l.attr("text-anchor","start"),w=v?-o.bx/2-o.tx2width/2+Ea:-o.bx-Ea):b==="right"&&u!=="end"&&(l.attr("text-anchor","end"),w=v?o.bx/2-o.tx2width/2-Ea:o.bx+Ea)),l.call(Ps.positionText,n(w),a(_)),o.tx2width&&(s.select("text.name").call(Ps.positionText,n(f.text2ShiftX+f.alignShift*Ea+p),a(d+o.ty0-o.by/2+Ea)),s.select("rect").call(b1.setRect,n(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+p),a(d-o.by/2-1),n(o.tx2width),a(o.by+2)))})}function zSt(e,t){var r=e.index,i=e.trace||{},n=e.cd[0],a=e.cd[r]||{};function o(h){return h||Yg(h)&&h===0}var s=Array.isArray(r)?function(h,p){var d=$s.castOption(n,r,h);return o(d)?d:$s.extractOption({},i,"",p)}:function(h,p){return $s.extractOption(a,i,h,p)};function l(h,p,d){var v=s(p,d);o(v)&&(e[h]=v)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&i.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=$s.constrain(e.x0,0,e.xa._length),e.x1=$s.constrain(e.x1,0,e.xa._length),e.y0=$s.constrain(e.y0,0,e.ya._length),e.y1=$s.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Zp.hoverLabelText(e.xa,e.xLabelVal,i.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Zp.hoverLabelText(e.ya,e.yLabelVal,i.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Zp.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Zp.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Zp.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Zp.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function ome(e,t,r){let i=t._id.charAt(0)==="y",n=1/0,a=-1/0;for(let o of t._counterAxes||[]){let s=Zp.getFromId(e,o);if(!s)continue;let l=s._padStart||0,u=s._padEnd||0;i?(n=Math.min(n,r.l+s.domain[0]*r.w+l),a=Math.max(a,r.l+s.domain[1]*r.w-u)):(n=Math.min(n,r.t+(1-s.domain[1])*r.h+l),a=Math.max(a,r.t+(1-s.domain[0])*r.h-u))}if(t.anchor==="free"){let o=i?r.l+t.position*r.w:r.t+(1-t.position)*r.h;n=Math.min(n,o),a=Math.max(a,o)}return[n,a]}function sme(e,t,r){var i=r.container,n=r.fullLayout,a=n._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(i.selectAll(".spikeline").remove(),!!(l||s)){var f=Ql.combine(n.plot_bgcolor,n.paper_bgcolor);if(s){var h=t.hLinePoint,p,d;u=h&&h.xa,c=h&&h.ya;var v=c.spikesnap;v==="cursor"?(p=o.pointerX,d=o.pointerY):(p=u._offset+h.x,d=c._offset+h.y);var m=Ql.wcagContrast(h.color,f)<1.5?Ql.contrast(f):h.color,g=c.spikemode,w=c.spikethickness,_=c.spikecolor||m,b=Zp.getPxPosition(e,c),M,x;if(g.indexOf("toaxis")!==-1||g.indexOf("across")!==-1){if(g.indexOf("toaxis")!==-1&&(M=b,x=p),g.indexOf("across")!==-1){let L=ome(e,c,a);M=L[0],x=L[1]}i.insert("line",":first-child").attr({x1:M,x2:x,y1:d,y2:d,"stroke-width":w,stroke:_,"stroke-dasharray":b1.dashStyle(c.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:M,x2:x,y1:d,y2:d,"stroke-width":w+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}g.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:b+(c.side!=="right"?w:-w),cy:d,r:w,fill:_}).classed("spikeline",!0)}if(l){var A=t.vLinePoint,T,y;u=A&&A.xa,c=A&&A.ya;var E=u.spikesnap;E==="cursor"?(T=o.pointerX,y=o.pointerY):(T=u._offset+A.x,y=c._offset+A.y);var S=Ql.wcagContrast(A.color,f)<1.5?Ql.contrast(f):A.color,C=u.spikemode,k=u.spikethickness,D=u.spikecolor||S,F=Zp.getPxPosition(e,u),P,R;if(C.indexOf("toaxis")!==-1||C.indexOf("across")!==-1){if(C.indexOf("toaxis")!==-1&&(P=F,R=y),C.indexOf("across")!==-1){let L=ome(e,u,a);P=L[0],R=L[1]}i.insert("line",":first-child").attr({x1:T,x2:T,y1:P,y2:R,"stroke-width":k,stroke:D,"stroke-dasharray":b1.dashStyle(u.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:T,x2:T,y1:P,y2:R,"stroke-width":k+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}C.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:T,cy:F-(u.side!=="top"?k:-k),r:k,fill:D}).classed("spikeline",!0)}}}function BSt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var i=r.length-1;i>=0;i--){var n=r[i],a=e._hoverdata[i];if(n.curveNumber!==a.curveNumber||String(n.pointNumber)!==String(a.pointNumber)||String(n.pointNumbers)!==String(a.pointNumbers)||n.binNumber!==a.binNumber)return!0}return!1}function lme(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function ume(e,t){return Ps.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function qSt(e,t){for(var r=t.charAt(0),i=[],n=[],a=[],o=0;oe.offsetTop+e.clientTop,gme=e=>e.offsetLeft+e.clientLeft;function q7(e,t){var r=e._fullLayout,i=t.getBoundingClientRect(),n=i.left,a=i.top,o=n+i.width,s=a+i.height,l=$s.apply3DTransform(r._invTransform)(n,a),u=$s.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],p=u[1];return{x:c,y:f,width:h-c,height:p-f,top:Math.min(f,p),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,p)}}});var UA=W((HOr,mme)=>{"use strict";var OSt=tt(),NSt=ti(),USt=ah().isUnifiedHover;mme.exports=function(t,r,i,n){n=n||{};var a=r.legend;function o(s){n.font[s]||(n.font[s]=a?r.legend.font[s]:r.font[s])}r&&USt(r.hovermode)&&(n.font||(n.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(n.bgcolor||(n.bgcolor=NSt.combine(r.legend.bgcolor,r.paper_bgcolor)),n.bordercolor||(n.bordercolor=r.legend.bordercolor)):n.bgcolor||(n.bgcolor=r.paper_bgcolor)),i("hoverlabel.bgcolor",n.bgcolor),i("hoverlabel.bordercolor",n.bordercolor),i("hoverlabel.namelength",n.namelength),i("hoverlabel.showarrow",n.showarrow),OSt.coerceFont(i,"hoverlabel.font",n.font),i("hoverlabel.align",n.align)}});var xme=W((jOr,yme)=>{"use strict";var VSt=tt(),GSt=UA(),HSt=yy();yme.exports=function(t,r){function i(n,a){return VSt.coerce(t,r,HSt,n,a)}GSt(t,r,i)}});var wme=W(($Or,_me)=>{"use strict";var bme=tt(),jSt=tw(),$St=UA();_me.exports=function(t,r,i,n){function a(s,l){return bme.coerce(t,r,jSt,s,l)}var o=bme.extendFlat({},n.hoverlabel);r.hovertemplate&&(o.namelength=-1),$St(t,r,a,o)}});var aj=W((WOr,Tme)=>{"use strict";var WSt=tt(),YSt=yy();Tme.exports=function(t,r){function i(n,a){return r[n]!==void 0?r[n]:WSt.coerce(t,r,YSt,n,a)}return i("clickmode"),i("hoversubplots"),i("hoveranywhere"),i("clickanywhere"),i("hovermode")}});var Sme=W((YOr,Mme)=>{"use strict";var Ame=tt(),XSt=yy(),ZSt=aj(),KSt=UA();Mme.exports=function(t,r){function i(u,c){return Ame.coerce(t,r,XSt,u,c)}var n=ZSt(t,r);n&&(i("hoverdistance"),i("spikedistance"),n.indexOf("unified")!==-1&&i("hoversort"));var a=i("dragmode");a==="select"&&i("selectdirection");var o=r._has("map"),s=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s)&&l===1||o&&s&&l===2)&&(r.dragmode="pan"),KSt(t,r,i),Ame.coerceFont(i,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Cme=W((XOr,kme)=>{"use strict";var oj=tt(),Eme=xi();kme.exports=function(t){var r=t.calcdata,i=t._fullLayout;function n(u){return function(c){return oj.coerceHoverinfo({hoverinfo:c},{_module:u._module},i)}}for(var a=0;a{"use strict";var QSt=xi(),Dme=ah(),eEt=nj().hover;Fme.exports=function(t,r,i){var n=QSt.getComponentMethod("annotations","onClick")(t,t._hoverdata),a=t._fullLayout;i!==void 0&&eEt(t,r,i,!0);function o(){var l,u,c,f,h,p;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals&&Dme.c2dApply(t._hoverXAxes,t._hoverXVals)),(f=s.yvals)!=null||(s.yvals=t._hoverYVals&&Dme.c2dApply(t._hoverYAxes,t._hoverYVals)),(h=s.xPixel)!=null||(s.xPixel=t._hoverPointerX),(p=s.yPixel)!=null||(s.yPixel=t._hoverPointerY),t.emit("plotly_click",s)}(t._hoverdata||a.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),n&&n.then?n.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var Is=W((KOr,Rme)=>{"use strict";var tEt=gi(),N7=tt(),rEt=Ef(),VA=ah(),Pme=yy(),Ime=nj();Rme.exports={moduleType:"component",name:"fx",constants:(W6(),Pt($6)),schema:{layout:Pme},attributes:tw(),layoutAttributes:Pme,supplyLayoutGlobalDefaults:xme(),supplyDefaults:wme(),supplyLayoutDefaults:Sme(),calc:Cme(),getDistanceFunction:VA.getDistanceFunction,getClosest:VA.getClosest,inbox:VA.inbox,quadrature:VA.quadrature,appendArrayPointValue:VA.appendArrayPointValue,castHoverOption:nEt,castHoverinfo:aEt,hover:Ime.hover,unhover:rEt.unhover,loneHover:Ime.loneHover,loneUnhover:iEt,click:Lme()};function iEt(e){var t=N7.isD3Selection(e)?e:tEt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function nEt(e,t,r){return N7.castOption(e,t,"hoverlabel."+r)}function aEt(e,t,r){function i(n){return N7.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)}return N7.castOption(e,r,"hoverinfo",i)}});var _1=W(Zg=>{"use strict";Zg.selectMode=function(e){return e==="lasso"||e==="select"};Zg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Zg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Zg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Zg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Zg.selectingOrDrawing=function(e){return Zg.freeMode(e)||Zg.rectMode(e)}});var GA=W((QOr,zme)=>{"use strict";zme.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(i){i.regl&&i.regl.clear({color:!0,depth:!0})})}});var U7=W((eNr,Bme)=>{"use strict";Bme.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},curlybraces:{width:18,height:16,path:"M 9,4 C 7.354992,4 6,5.354992 6,7 V 9 C 6,9.2999997 5.8778068,9.8883542 5.5878906,10.291016 5.2979744,10.693677 4.9222213,11 4,11 a 1.0001,1.0001 0 0 0 0,2 c 0.2999997,0 0.8883542,0.122193 1.2910156,0.412109 C 5.693677,13.702026 6,14.077779 6,15 v 2 c 0,1.645008 1.354992,3 3,3 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 H 9 C 8.4358712,18 8,17.564129 8,17 V 15 C 8,13.625876 7.3766799,12.602305 6.6113281,11.96875 6.8086352,11.794047 7.0679793,11.657537 7.2109375,11.458984 7.8210204,10.611647 8,9.6999993 8,9 V 7 C 8,6.4358712 8.4358712,6 9,6 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m 5.5,0 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 0.564129,0 1,0.4358712 1,1 v 2 c 0,0.6999993 0.17898,1.611647 0.789062,2.458984 0.142959,0.198553 0.402303,0.335063 0.59961,0.509766 C 16.62332,12.602305 16,13.625876 16,15 v 2 c 0,0.564129 -0.435871,1 -1,1 h -0.5 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 1.645008,0 3,-1.354992 3,-3 v -2 c 0,-0.922221 0.306323,-1.297974 0.708984,-1.587891 C 19.111646,13.122193 19.7,13 20,13 a 1.0001,1.0001 0 0 0 0,-2 C 19.077779,11 18.702026,10.693677 18.412109,10.291016 18.122193,9.8883542 18,9.2999997 18,9 V 7 C 18,5.354992 16.645008,4 15,4 Z",transform:"translate(-3 -4)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},cloudupload:{width:640,height:640,path:"M451.5 160C434.9 160 418.8 164.5 404.7 172.7C388.9 156.7 370.5 143.3 350.2 133.2C378.4 109.2 414.3 96 451.5 96C537.9 96 608 166 608 252.5C608 294 591.5 333.8 562.2 363.1L491.1 434.2C461.8 463.5 422 480 380.5 480C294.1 480 224 410 224 323.5C224 322 224 320.5 224.1 319C224.6 301.3 239.3 287.4 257 287.9C274.7 288.4 288.6 303.1 288.1 320.8C288.1 321.7 288.1 322.6 288.1 323.4C288.1 374.5 329.5 415.9 380.6 415.9C405.1 415.9 428.6 406.2 446 388.8L517.1 317.7C534.4 300.4 544.2 276.8 544.2 252.3C544.2 201.2 502.8 159.8 451.7 159.8zM307.2 237.3C305.3 236.5 303.4 235.4 301.7 234.2C289.1 227.7 274.7 224 259.6 224C235.1 224 211.6 233.7 194.2 251.1L123.1 322.2C105.8 339.5 96 363.1 96 387.6C96 438.7 137.4 480.1 188.5 480.1C205 480.1 221.1 475.7 235.2 467.5C251 483.5 269.4 496.9 289.8 507C261.6 530.9 225.8 544.2 188.5 544.2C102.1 544.2 32 474.2 32 387.7C32 346.2 48.5 306.4 77.8 277.1L148.9 206C178.2 176.7 218 160.2 259.5 160.2C346.1 160.2 416 230.8 416 317.1C416 318.4 416 319.7 416 321C415.6 338.7 400.9 352.6 383.2 352.2C365.5 351.8 351.6 337.1 352 319.4C352 318.6 352 317.9 352 317.1C352 283.4 334 253.8 307.2 237.5z",transform:"matrix(1 0 0 1 -15 -15)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var V7={};Jn(V7,{CIRCLE_SIDES:()=>oEt,SQRT2:()=>dEt,cos45:()=>fEt,i000:()=>sEt,i090:()=>lEt,i180:()=>uEt,i270:()=>cEt,sin45:()=>hEt});var oEt,sEt,lEt,uEt,cEt,fEt,hEt,dEt,G7=Ci(()=>{"use strict";oEt=32,sEt=0,lEt=8,uEt=16,cEt=24,fEt=Math.cos(Math.PI/4),hEt=Math.sin(Math.PI/4),dEt=Math.sqrt(2)});var H7=W((tNr,Ome)=>{"use strict";var pEt=tt().strTranslate;function qme(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 vEt(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 gEt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return qme(e,r[t])}}function mEt(e){return pEt(e.xaxis._offset,e.yaxis._offset)}Ome.exports={p2r:qme,r2p:vEt,axValue:gEt,getTransform:mEt}});var Hy=W(Kg=>{"use strict";var yEt=WG(),Vme=(G7(),Pt(V7)),jw=Vme.CIRCLE_SIDES,sj=Vme.SQRT2,Gme=H7(),Nme=Gme.p2r,Ume=Gme.r2p,xEt=[0,3,4,5,6,1,2],bEt=[0,3,4,1,2];Kg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i0&&l{"use strict";var Hme=Ls(),Xme=_1(),_Et=Xme.drawMode,wEt=Xme.openMode,$w=(G7(),Pt(V7)),jme=$w.i000,$me=$w.i090,Wme=$w.i180,Yme=$w.i270,TEt=$w.cos45,AEt=$w.sin45,Zme=H7(),$7=Zme.p2r,jy=Zme.r2p,MEt=Ly(),SEt=MEt.clearOutline,W7=Hy(),EEt=W7.readPaths,kEt=W7.writePaths,CEt=W7.ellipseOver,DEt=W7.fixDatesForPaths;function FEt(e,t){if(e.length){var r=e[0][0];if(r){var i=t.gd,n=t.isActiveShape,a=t.dragmode,o=(i.layout||{}).shapes||[];if(!_Et(a)&&n!==void 0){var s=i._fullLayout._activeShapeIndex;if(s{"use strict";var LEt=_1(),PEt=LEt.selectMode,IEt=Ly(),REt=IEt.clearOutline,lj=Hy(),zEt=lj.readPaths,BEt=lj.writePaths,qEt=lj.fixDatesForPaths;Qme.exports=function(t,r){if(t.length){var i=t[0][0];if(i){var n=i.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!PEt(f)&&c!==void 0){var p=a._fullLayout._activeSelectionIndex;if(pGEt,paramIsX:()=>UEt,paramIsY:()=>VEt,paramRE:()=>NEt,segmentRE:()=>OEt});var OEt,NEt,UEt,VEt,GEt,$A=Ci(()=>{"use strict";OEt=/[MLHVQCTSZ][^MLHVQCTSZ]*/g,NEt=/[^\s,]+/g,UEt={M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},VEt={M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},GEt={M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}});var Wy=W(oc=>{"use strict";var T1=($A(),Pt(jA)),eye=tt(),$y=Yi();oc.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};oc.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};oc.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};oc.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};oc.extractPathCoords=function(e,t,r){var i=[],n=e.match(T1.segmentRE);return n.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(T1.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=n[s].drawn!==void 0;return a+(l?1:0)},0)};oc.getDataToPixel=function(e,t,r,i,n){var a=e._fullLayout._size,o;if(t)if(n==="domain")o=function(l){return t._length*(i?1-l:l)+t._offset};else{var s=oc.shapePositionToRange(t);o=function(l){var u=w1(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=oc.decodeDate(o))}else i?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};oc.getPixelToData=function(e,t,r,i){var n=e._fullLayout._size,a;if(t)if(i==="domain")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=oc.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-n.t)/n.h}:a=function(s){return(s-n.l)/n.w};return a};oc.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,i=Math.round(e);return r?i+.5:i};oc.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},i=e._fullLayout._plots[r.xref+r.yref],n=!!i;return n?i._hadPlotinfo=!0:(i={},r.xref&&r.xref!=="paper"&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(i.yaxis=e._fullLayout[r.yref+"axis"])),i.xsizemode=r.xsizemode,i.ysizemode=r.ysizemode,i.xanchor=r.xanchor,i.yanchor=r.yanchor,{options:r,plotinfo:i}};oc.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},i=e._fullLayout._plots[r.xref+r.yref],n=!!i;return n?i._hadPlotinfo=!0:(i={},r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:i}};oc.getPathString=function(e,t){let r=t.type,i=$y.getRefType(t.xref),n=$y.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,p,d,v,m,g;function w(E,S,C,k){var D;if(E)if(S==="domain")k?D=function(F){return E._offset+E._length*(1-F)}:D=function(F){return E._offset+E._length*F};else{let F=oc.shapePositionToRange(E);D=function(P){return E._offset+E.r2p(F(P,!0))},C==="path"&&E.type==="date"&&(D=oc.decodeDate(D))}else k?D=function(F){return a.t+a.h*(1-F)}:D=function(F){return a.l+a.w*F};return D}if(i==="array"?(h=[],o=t.xref.map(function(E){return $y.getFromId(e,E)}),h=t.xref.map(function(E,S){return w(o[S],$y.getRefType(E),r,!1)})):(o=$y.getFromId(e,t.xref),h=w(o,i,r,!1)),n==="array"?(p=[],s=t.yref.map(function(E){return $y.getFromId(e,E)}),p=t.yref.map(function(E,S){return w(s[S],$y.getRefType(E),r,!0)})):(s=$y.getFromId(e,t.yref),p=w(s,n,r,!0)),r==="path")return HEt(t,h,p);if(i==="array")l=w1(o[0],t.x0shift),u=w1(o[1],t.x1shift),d=h[0](t.x0)+l,v=h[1](t.x1)+u;else if(l=w1(o,t.x0shift),u=w1(o,t.x1shift),t.xsizemode==="pixel"){let E=h(t.xanchor);d=E+t.x0+l,v=E+t.x1+u}else d=h(t.x0)+l,v=h(t.x1)+u;if(n==="array")c=w1(s[0],t.y0shift),f=w1(s[1],t.y1shift),m=p[0](t.y0)+c,g=p[1](t.y1)+f;else if(c=w1(s,t.y0shift),f=w1(s,t.y1shift),t.ysizemode==="pixel"){let E=p(t.yanchor);m=E-t.y0+c,g=E-t.y1+f}else m=p(t.y0)+c,g=p(t.y1)+f;if(r==="line")return"M"+d+","+m+"L"+v+","+g;if(r==="rect")return"M"+d+","+m+"H"+v+"V"+g+"H"+d+"Z";var _=(d+v)/2,b=(m+g)/2,M=Math.abs(_-d),x=Math.abs(b-m),A="A"+M+","+x,T=_+M+","+b,y=_+","+(b-x);return"M"+T+A+" 0 1,1 "+y+A+" 0 0,1 "+T+"Z"};function HEt(e,t,r){let i=e.path,n=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return i.replace(T1.segmentRE,function(h){var p=0,d=h.charAt(0),v=T1.paramIsX[d],m=T1.paramIsY[d],g=T1.numParams[d];let w=v.drawn!==void 0,_=m.drawn!==void 0,b=l?t[c]:t,M=u?r[f]:r;var x=h.slice(1).replace(T1.paramRE,function(A){return v[p]?n==="pixel"?A=b(o)+Number(A):A=b(A):m[p]&&(a==="pixel"?A=M(s)-Number(A):A=M(A)),p++,p>g&&(A="X"),A});return p>g&&(x=x.replace(/[\s,]*X.*/,""),eye.log("Ignoring extra params in segment "+h)),w&&c++,_&&f++,d+x})}oc.getPixelShift=w1;function w1(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var cj=W((oNr,iye)=>{"use strict";var jEt=tt(),A1=Yi(),tye=ao(),rye=Qi(),$Et=Hy().readPaths,Ab=Wy(),WEt=Ab.getPathString,WA=xD(),YEt=(Jl(),Pt(Kl)).FROM_TL;iye.exports=function(t,r,i,n){if(n.selectAll(".shape-label").remove(),!!(i.label.text||i.label.texttemplate)){var a;if(i.label.texttemplate){var o={};if(i.type!=="path"){var s=A1.getFromId(t,i.xref),l=A1.getFromId(t,i.yref);let O=Array.isArray(i.xref),$=Array.isArray(i.yref);for(var u in WA){var c=typeof WA[u]=="function",f=!O||WA.simpleXVariables.includes(u),h=!$||WA.simpleYVariables.includes(u);if(c&&f&&h){var p=WA[u](i,s,l);p!==void 0&&(o[u]=p)}}}a=jEt.texttemplateStringForShapes({data:[o],fallback:i.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:i.label.texttemplate})}else a=i.label.text;var d={"data-index":r},v=i.label.font,m={"data-notex":1},g=n.append("g").attr(d).classed("shape-label",!0),w=g.append("text").attr(m).classed("shape-label-text",!0).text(a),_,b,M,x;if(i.path){var A=WEt(t,i),T=$Et(A,t);_=1/0,M=1/0,b=-1/0,x=-1/0;for(var y=0;yAb.getDataToPixel(t,ue,te,!1,ge)(Q),j=(Q,te,ue,ge)=>Ab.getDataToPixel(t,ue,te,!0,ge)(Q);if(i.xsizemode==="pixel"){let Q=H(i.xanchor,void 0,X,J),te=Ab.getPixelShift(X,i.x0shift),ue=Ab.getPixelShift(X,i.x1shift);_=Q+i.x0+te,b=Q+i.x1+ue}else _=H(i.x0,i.x0shift,X,J),b=H(i.x1,i.x1shift,K,N);if(i.ysizemode==="pixel"){let Q=j(i.yanchor,void 0,G,V),te=Ab.getPixelShift(G,i.y0shift),ue=Ab.getPixelShift(G,i.y1shift);M=Q-i.y0+te,x=Q-i.y1+ue}else M=j(i.y0,i.y0shift,G,V),x=j(i.y1,i.y1shift,q,Y)}var F=i.label.textangle;F==="auto"&&(i.type==="line"?F=XEt(_,M,b,x):F=0),w.call(function(O){return O.call(rye.font,v).attr({}),tye.convertToTspans(O,t),O});var P=rye.bBox(w.node()),R=ZEt(_,M,b,x,i,F,P),L=R.textx,I=R.texty,B=R.xanchor;w.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[B],y:I,x:L,transform:"rotate("+F+","+L+","+I+")"}).call(tye.positionText,L,I)}};function XEt(e,t,r,i){var n,a;return a=Math.abs(r-e),r>=e?n=t-i:n=i-t,-180/Math.PI*Math.atan2(n,a)}function ZEt(e,t,r,i,n,a,o){var s=n.label.textposition,l=n.label.textangle,u=n.label.padding,c=n.type,f=Math.PI/180*a,h=Math.sin(f),p=Math.cos(f),d=n.label.xanchor,v=n.label.yanchor,m,g,w,_;if(c==="line"){s==="start"?(m=e,g=t):s==="end"?(m=r,g=i):(m=(e+r)/2,g=(t+i)/2),d==="auto"&&(s==="start"?l==="auto"?r>e?d="left":re?d="right":re?d="right":re?d="left":r{"use strict";var KEt=tt(),JEt=KEt.strTranslate,nye=Ef(),sye=_1(),QEt=sye.drawMode,lye=sye.selectMode,uye=xi(),aye=ti(),Z7=(G7(),Pt(V7)),ekt=Z7.i000,tkt=Z7.i090,rkt=Z7.i180,ikt=Z7.i270,nkt=Ly(),cye=nkt.clearOutlineControllers,hj=Hy(),X7=hj.pointsOnRectangle,fj=hj.pointsOnEllipse,akt=hj.writePaths,okt=Y7().newShapes,skt=Y7().createShapeObj,lkt=uj(),ukt=cj();fye.exports=function e(t,r,i,n){n||(n=0);var a=i.gd;function o(){e(t,r,i,n++),(fj(t[0])||i.hasText)&&s({redrawing:!0})}function s(R){var L={};i.isActiveShape!==void 0&&(i.isActiveShape=!1,L=okt(r,i)),i.isActiveSelection!==void 0&&(i.isActiveSelection=!1,L=lkt(r,i),a._fullLayout._reselect=!0),Object.keys(L).length&&uye.call((R||{}).redrawing?"relayout":"_guiRelayout",a,L)}var l=a._fullLayout,u=l._zoomlayer,c=i.dragmode,f=QEt(c),h=lye(c);(f||h)&&(a._fullLayout._outlining=!0),cye(a),r.attr("d",akt(t));var p,d,v,m,g;if(!n&&(i.isActiveShape||i.isActiveSelection)){g=ckt([],t);var w=u.append("g").attr("class","outline-controllers");E(w),P()}if(f&&i.hasText){var _=u.select(".label-temp"),b=skt(r,i,i.dragmode);ukt(a,"label-temp",b,_)}function M(R){v=+R.srcElement.getAttribute("data-i"),m=+R.srcElement.getAttribute("data-j"),p[v][m].moveFn=x}function x(R,L){if(t.length){var I=g[v][m][1],B=g[v][m][2],O=t[v],$=O.length;if(X7(O)){var X=R,K=L;if(i.isActiveSelection){var G=oye(O,m);G[1]===O[m][1]?K=0:X=0}for(var q=0;q<$;q++)if(q!==m){var J=O[q];J[1]===O[m][1]&&(J[1]=I+X),J[2]===O[m][2]&&(J[2]=B+K)}if(O[m][1]=I+X,O[m][2]=B+K,!X7(O))for(var N=0;N<$;N++)for(var V=0;V1&&!(R.length===2&&R[1][0]==="Z")&&(m===0&&(R[0][0]="M"),t[v]=R,o(),s())}}function y(R,L){if(R===2){v=+L.srcElement.getAttribute("data-i"),m=+L.srcElement.getAttribute("data-j");var I=t[v];!X7(I)&&!fj(I)&&T()}}function E(R){p=[];for(var L=0;L{"use strict";var hkt=gi(),mye=xi(),pj=tt(),Mb=Yi(),dkt=Hy().readPaths,pkt=K7(),Q7=cj(),yye=Ly().clearOutlineControllers,dj=ti(),eF=Qi(),vkt=Ra().arrayEditor,hye=Ef(),dye=Is(),pye=Xp(),Sb=($A(),Pt(jA)),Hh=Wy(),vj=Hh.getPathString;_ye.exports={draw:gj,drawOne:xye,eraseActiveShape:bkt,drawLabel:Q7};function gj(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var i=t._plots[r].shapelayer;i&&(i.selectAll("path").remove(),i.selectAll("text").remove())}for(var n=0;n{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=n(a);o&&dye.hover(e,o,r.id)}}),i.addEventListener("click",a=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=n(a);o&&dye.click(e,o,r.id)}})}function bye(e,t,r){let i=r.xref,n=r.yref;if(Array.isArray(i)||Array.isArray(n)){let a="clip"+t._fullLayout._uid+"shape"+r._index,o=mkt(t,i,n);pj.ensureSingleById(t._fullLayout._clips,"clipPath",a,function(s){s.append("rect")}).select("rect").attr(o),eF.setClipUrl(e,a,t)}else{let a=(i+n).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");eF.setClipUrl(e,a?"clip"+t._fullLayout._uid+a:null,t)}}function mkt(e,t,r){let i=e._fullLayout._size;function n(s,l){let u=(Array.isArray(s)?s:[s]).map(h=>Mb.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[i.t,i.t+i.h]:[i.l,i.l+i.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=n(t,!1),o=n(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function ykt(e,t,r,i,n,a){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=a.modifyItem,p,d,v,m,g,w,_,b,M,x,A,T,y,E,S,C=hkt.select(t.node().parentNode),k=Mb.getFromId(e,r.xref),D=Mb.getRefType(r.xref),F=Mb.getFromId(e,r.yref),P=Mb.getRefType(r.yref),R=r.x0shift,L=r.x1shift,I=r.y0shift,B=r.y1shift,O=function(ce,oe){var Se=Hh.getDataToPixel(e,k,oe,!1,D);return Se(ce)},$=function(ce,oe){var Se=Hh.getDataToPixel(e,F,oe,!0,P);return Se(ce)},X=Hh.getPixelToData(e,k,!1,D),K=Hh.getPixelToData(e,F,!0,P),G=N(),q={element:G.node(),gd:e,prepFn:H,doneFn:j,clickFn:Q},J;hye.init(q),G.node().onmousemove=Y;function N(){return c?V():t}function V(){var ce=10,oe=Math.max(r.line.width,ce),Se=n.append("g").attr("data-index",i).attr("drag-helper",!0);Se.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":oe,"stroke-opacity":"0"});var be={"fill-opacity":"0"},fe=Math.max(oe/2,ce);return Se.append("circle").attr({"data-line-point":"start-point",cx:l?O(r.xanchor)+r.x0:O(r.x0,R),cy:u?$(r.yanchor)-r.y0:$(r.y0,I),r:fe}).style(be).classed("cursor-grab",!0),Se.append("circle").attr({"data-line-point":"end-point",cx:l?O(r.xanchor)+r.x1:O(r.x1,L),cy:u?$(r.yanchor)-r.y1:$(r.y1,B),r:fe}).style(be).classed("cursor-grab",!0),Se}function Y(ce){if(J7(e)){J=null;return}if(c)ce.target.tagName==="path"?J="move":J=ce.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var oe=q.element.getBoundingClientRect(),Se=oe.right-oe.left,be=oe.bottom-oe.top,fe=ce.clientX-oe.left,ee=ce.clientY-oe.top,ae=!f&&Se>o&&be>s&&!ce.shiftKey?hye.getCursor(fe/Se,1-ee/be):"move";pye(t,ae),J=ae.split("-")[0]}}function H(ce){J7(e)||(l&&(g=O(r.xanchor)),u&&(w=$(r.yanchor)),r.type==="path"?S=r.path:(p=l?r.x0:O(r.x0),d=u?r.y0:$(r.y0),v=l?r.x1:O(r.x1),m=u?r.y1:$(r.y1)),pm?(_=d,A="y0",b=m,T="y1"):(_=m,A="y1",b=d,T="y0"),Y(ce),ge(n,r),xe(t,r,e),q.moveFn=J==="move"?te:ue,q.altKey=ce.altKey)}function j(){J7(e)||(pye(t),Ee(n),bye(t,e,r),mye.call("_guiRelayout",e,a.getUpdateObj()))}function Q(){J7(e)||Ee(n)}function te(ce,oe){if(r.type==="path"){var Se=function(ee){return ee},be=Se,fe=Se;l?h("xanchor",r.xanchor=X(g+ce)):(be=function(ae){return X(O(ae)+ce)},k&&k.type==="date"&&(be=Hh.encodeDate(be))),u?h("yanchor",r.yanchor=K(w+oe)):(fe=function(ae){return K($(ae)+oe)},F&&F.type==="date"&&(fe=Hh.encodeDate(fe))),h("path",r.path=vye(S,be,fe))}else l?h("xanchor",r.xanchor=X(g+ce)):(h("x0",r.x0=X(p+ce)),h("x1",r.x1=X(v+ce))),u?h("yanchor",r.yanchor=K(w+oe)):(h("y0",r.y0=K(d+oe)),h("y1",r.y1=K(m+oe)));t.attr("d",vj(e,r)),ge(n,r),Q7(e,i,r,C)}function ue(ce,oe){if(f){var Se=function(rt){return rt},be=Se,fe=Se;l?h("xanchor",r.xanchor=X(g+ce)):(be=function(mt){return X(O(mt)+ce)},k&&k.type==="date"&&(be=Hh.encodeDate(be))),u?h("yanchor",r.yanchor=K(w+oe)):(fe=function(mt){return K($(mt)+oe)},F&&F.type==="date"&&(fe=Hh.encodeDate(fe))),h("path",r.path=vye(S,be,fe))}else if(c){if(J==="resize-over-start-point"){var ee=p+ce,ae=u?d-oe:d+oe;h("x0",r.x0=l?ee:X(ee)),h("y0",r.y0=u?ae:K(ae))}else if(J==="resize-over-end-point"){var _e=v+ce,re=u?m-oe:m+oe;h("x1",r.x1=l?_e:X(_e)),h("y1",r.y1=u?re:K(re))}}else{var pe=function(rt){return J.indexOf(rt)!==-1},Te=pe("n"),Ce=pe("s"),ze=pe("w"),we=pe("e"),me=Te?_+oe:_,Le=Ce?b+oe:b,Ne=ze?M+ce:M,Je=we?x+ce:x;u&&(Te&&(me=_-oe),Ce&&(Le=b-oe)),(!u&&Le-me>s||u&&me-Le>s)&&(h(A,r[A]=u?me:K(me)),h(T,r[T]=u?Le:K(Le))),Je-Ne>o&&(h(y,r[y]=l?Ne:X(Ne)),h(E,r[E]=l?Je:X(Je)))}t.attr("d",vj(e,r)),ge(n,r),Q7(e,i,r,C)}function ge(ce,oe){(l||u)&&Se();function Se(){var be=oe.type!=="path",fe=ce.selectAll(".visual-cue").data([0]),ee=1;fe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ee}).classed("visual-cue",!0);var ae=O(l?oe.xanchor:pj.midRange(be?[oe.x0,oe.x1]:Hh.extractPathCoords(oe.path,Sb.paramIsX))),_e=$(u?oe.yanchor:pj.midRange(be?[oe.y0,oe.y1]:Hh.extractPathCoords(oe.path,Sb.paramIsY)));if(ae=Hh.roundPositionForSharpStrokeRendering(ae,ee),_e=Hh.roundPositionForSharpStrokeRendering(_e,ee),l&&u){var re="M"+(ae-1-ee)+","+(_e-1-ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";fe.attr("d",re)}else if(l){var pe="M"+(ae-1-ee)+","+(_e-9-ee)+"v18 h2 v-18 Z";fe.attr("d",pe)}else{var Te="M"+(ae-9-ee)+","+(_e-1-ee)+"h18 v2 h-18 Z";fe.attr("d",Te)}}}function Ee(ce){ce.selectAll(".visual-cue").remove()}function xe(ce,oe,Se){var be=oe.xref,fe=oe.yref,ee=Mb.getFromId(Se,be),ae=Mb.getFromId(Se,fe),_e="";be!=="paper"&&!ee.autorange&&(_e+=be),fe!=="paper"&&!ae.autorange&&(_e+=fe),eF.setClipUrl(ce,_e?"clip"+Se._fullLayout._uid+_e:null,Se)}}function vye(e,t,r){return e.replace(Sb.segmentRE,function(i){var n=0,a=i.charAt(0),o=Sb.paramIsX[a],s=Sb.paramIsY[a],l=Sb.numParams[a],u=i.slice(1).replace(Sb.paramRE,function(c){return n>=l||(o[n]?c=t(c):s[n]&&(c=r(c)),n++),c});return a+u})}function xkt(e,t){if(tF(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeShapeIndex){gye(e);return}e._fullLayout._activeShapeIndex=i,e._fullLayout._deactivateShape=gye,gj(e)}}}function gye(e){if(tF(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(yye(e),delete e._fullLayout._activeShapeIndex,gj(e))}}function bkt(e){if(tF(e)){yye(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var Ww=tt()._,_kt=function(e){return{DIALOG_TITLE:Ww(e,"Share chart"),DIALOG_MESSAGE_CLOUD:Ww(e,"This chart will be uploaded to {Plotly Cloud} to create a sharing link. Only you can see it until you change its visibility."),DIALOG_MESSAGE_CLOUD_ACCOUNT:Ww(e,"If you don't have a Plotly Cloud account yet, you'll have a chance to create one."),DIALOG_MESSAGE_OTHER:Ww(e,"This chart will be sent to {serverUrl}."),DIALOG_CANCEL:Ww(e,"Cancel"),DIALOG_CONFIRM:Ww(e,"Share")}};wye.exports=_kt});var Sye=W((cNr,Mye)=>{"use strict";var Aye=gi(),{dfltConfig:wkt}=_y(),Tkt=Tye(),Akt=(e,t,r,i,n)=>{let a=Tkt(e),o=t.append("div").classed("plotly-cloud-dialog-box",!0);if(o.append("div").classed("plotly-cloud-dialog-title",!0).text(a.DIALOG_TITLE),r===wkt.plotlyServerURL){let l=o.append("div").classed("plotly-cloud-dialog-message",!0),u=new URL(r).origin,c=a.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),f=c[0],h=c[2],p=c[4];l.append("span").text(f),l.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",u).attr("target","_blank").text(h),l.append("span").text(p),l.append("div").classed("plotly-cloud-dialog-message--account",!0).text(a.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let l=new URL(r),u=l.hostname,c=l.origin,f=a.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),h=f[0],p=f[4],d=o.append("div").classed("plotly-cloud-dialog-message",!0);d.append("span").text(h),d.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",c).attr("target","_blank").text(u),d.append("span").text(p)}let s=o.append("div").classed("plotly-cloud-dialog-buttons",!0);s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(a.DIALOG_CANCEL).on("click",n),s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(a.DIALOG_CONFIRM).on("click",i)},Mkt=(e,t,r)=>{let i=Aye.select(e._fullLayout._paperdiv.node());i.selectAll(".plotly-cloud-dialog").remove();let n=i.append("div").classed("plotly-cloud-dialog",!0),a=()=>{n.remove(),document.removeEventListener("keydown",o)},o=s=>{(s.key==="Escape"||s.keyCode===27)&&a()};document.addEventListener("keydown",o),n.on("click",()=>{Aye.event.target===n.node()&&a()}),Akt(e,n,t,()=>{a(),r()},a)};Mye.exports=Mkt});var xj=W((fNr,Pye)=>{"use strict";var E0=xi(),Skt=Qo(),kye=Ls(),Qa=U7(),Ekt=rF().eraseActiveShape,kkt=Sye(),Yw=tt(),ka=Yw._,Xa={};Pye.exports=Xa;Xa.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?ka(e,"Download plot as a PNG"):ka(e,"Download plot")},icon:Qa.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};Yw.notifier(ka(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(i){i in t&&(r[i]=t[i])}),E0.call("downloadImage",e,r).then(function(i){Yw.notifier(ka(e,"Image download succeeded")+" - "+i,"long",e)}).catch(function(){Yw.notifier(ka(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};Xa.downloadJson={name:"downloadJson",title:function(e){return ka(e,"Download plot as JSON")},icon:Qa.curlybraces,click:function(e){E0.call("downloadImage",e,{format:"full-json"}).then(function(t){Yw.notifier(ka(e,"JSON download succeeded")+" - "+t,"long",e)}).catch(function(){Yw.notifier(ka(e,"Sorry, there was a problem downloading your JSON file!"),"long",e)})}};Xa.sendChartToCloud={name:"sendChartToCloud",title:function(e){return ka(e,"Share chart...")},icon:Qa.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error("No destination URL provided (plotlyServerURL is empty)");return}var r;try{r=new URL(t)}catch(n){console.error("Invalid plotlyServerURL: "+t);return}let i=["http:","https:"];if(!i.includes(r.protocol)){console.error(`Invalid protocol '${r.protocol}' in plotlyServerURL '${t}'. Must be one of: ${i.join(", ")}`);return}kkt(e,t,function(){Skt.sendDataToCloud(e,t)})}};Xa.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return ka(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Qa.zoombox,click:Df};Xa.pan2d={name:"pan2d",_cat:"pan",title:function(e){return ka(e,"Pan")},attr:"dragmode",val:"pan",icon:Qa.pan,click:Df};Xa.select2d={name:"select2d",_cat:"select",title:function(e){return ka(e,"Box Select")},attr:"dragmode",val:"select",icon:Qa.selectbox,click:Df};Xa.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return ka(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Qa.lasso,click:Df};Xa.drawclosedpath={name:"drawclosedpath",title:function(e){return ka(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Qa.drawclosedpath,click:Df};Xa.drawopenpath={name:"drawopenpath",title:function(e){return ka(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Qa.drawopenpath,click:Df};Xa.drawline={name:"drawline",title:function(e){return ka(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Qa.drawline,click:Df};Xa.drawrect={name:"drawrect",title:function(e){return ka(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Qa.drawrect,click:Df};Xa.drawcircle={name:"drawcircle",title:function(e){return ka(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Qa.drawcircle,click:Df};Xa.eraseshape={name:"eraseshape",title:function(e){return ka(e,"Erase active shape")},icon:Qa.eraseshape,click:Ekt};Xa.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return ka(e,"Zoom in")},attr:"zoom",val:"in",icon:Qa.zoom_plus,click:Df};Xa.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return ka(e,"Zoom out")},attr:"zoom",val:"out",icon:Qa.zoom_minus,click:Df};Xa.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return ka(e,"Autoscale")},attr:"zoom",val:"auto",icon:Qa.autoscale,click:Df};Xa.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return ka(e,"Reset axes")},attr:"zoom",val:"reset",icon:Qa.home,click:Df};Xa.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return ka(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Qa.tooltip_basic,gravity:"ne",click:Df};Xa.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return ka(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Qa.tooltip_compare,gravity:"ne",click:Df};function Df(e,t){var r=t.currentTarget,i=r.getAttribute("data-attr"),n=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=kye.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(i==="zoom"){var f=n==="in"?.5:2,h=(1+f)/2,p=(1-f)/2,d,v;for(c=0;c-x),[v,m]=f.invert(c.midPt),{minscale:g}=u.projection,w=(s=u.projection.maxscale)!=null?s:1/0,_=Math.min(g,w),b=Math.max(g,w),M=n==="in"?Eye*h:1/Eye*h;M>b?M=b:M<_&&(M=_),M!==h&&E0.call("_guiRelayout",e,{[l+".projection.scale"]:M,[l+".projection.rotation.lon"]:p,[l+".projection.rotation.lat"]:d,[l+".center.lon"]:v,[l+".center.lat"]:m,[l+".fitbounds"]:!1})}}i==="reset"&&iF(e,"geo")}Xa.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(e){return ka(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:Qa.tooltip_basic,gravity:"ne",click:Fye};function Dye(e){var t=e._fullLayout;return t.hovermode?!1:t._has("cartesian")?t._isHoriz?"y":"x":"closest"}function Fye(e){var t=Dye(e);E0.call("_guiRelayout",e,"hovermode",t)}Xa.resetViewSankey={name:"resetSankeyGroup",title:function(e){return ka(e,"Reset view")},icon:Qa.home,click:function(e){for(var t={"node.groups":[],"node.x":[],"node.y":[]},r=0;r{"use strict";var Iye=xj(),Lkt=Object.keys(Iye),Rye=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],zye=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Rye,["downloadJson"]),Xw=[],Pkt=function(e){if(zye.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Xw.indexOf(t)===-1&&Xw.push(t),Xw.indexOf(r)===-1&&Xw.push(r)}};Lkt.forEach(function(e){Pkt(Iye[e])});Xw.sort();Bye.exports={DRAW_MODES:Rye,backButtons:zye,foreButtons:Xw}});var wj={};Jn(wj,{default:()=>Rkt});var _j,Ikt,Rkt,Tj=Ci(()=>{"use strict";_j=l1(bj()),Ikt={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 *${_j.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 *${_j.default.foreButtons.join("*, *")}*.`].join(" ")}},Rkt=Ikt});var Oye=W((dNr,qye)=>{"use strict";var zkt=tt(),YA=ti(),Bkt=Ra(),qkt=(Tj(),Pt(wj)).default;qye.exports=function(t,r){var i=t.modebar||{},n=Bkt.newContainer(r,"modebar");function a(s,l){return zkt.coerce(i,n,qkt,s,l)}a("orientation"),a("bgcolor",YA.addOpacity(r.paper_bgcolor,.5));var o=YA.contrast(YA.rgb(r.modebar.bgcolor));a("color",YA.addOpacity(o,.3)),a("activecolor",YA.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var Gye=W((pNr,Vye)=>{"use strict";var Aj=gi(),Okt=hn(),aF=tt(),Nye=U7(),Nkt=N6().version,Ukt=new DOMParser;function Uye(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var M1=Uye.prototype;M1.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,n="modebar-"+i._uid;this.element.setAttribute("id",n),this.element.setAttribute("role","toolbar"),this._uid=n,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),i.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=i.modebar,o="#"+n+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),i.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),aF.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};M1.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var i=t.createGroup();r.forEach(function(n){var a=n.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(n);t.buttonElements.push(o),i.appendChild(o)}),t.element.appendChild(i)})};M1.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};M1.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;i===void 0?i=e.name:typeof i=="function"&&(i=i(this.graphInfo)),(i||i===0)&&(r.setAttribute("data-title",i),r.setAttribute("aria-label",i)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),r.setAttribute("data-val",n));var a=e.click;if(typeof a!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&Aj.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Nye.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};M1.createIcon=function(e){var t=Okt(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",i;if(e.path){i=document.createElementNS(r,"svg"),i.setAttribute("viewBox",[0,0,e.width,t].join(" ")),i.setAttribute("class","icon");var n=document.createElementNS(r,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),i.appendChild(n)}if(e.svg){var a=Ukt.parseFromString(e.svg,"application/xml");i=a.childNodes[0]}return i.setAttribute("height","1em"),i.setAttribute("width","1em"),i};M1.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(i){var n=i.getAttribute("data-val")||!0,a=i.getAttribute("data-attr"),o=i.getAttribute("data-toggle")==="true",s=Aj.select(i),l=function(f,h){var p=t.modebar,d=f.querySelector(".icon path");d&&(h||f.matches(":hover")?d.style.fill=p.activecolor:d.style.fill=p.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(i,u)}}else{var c=a===null?a:aF.nestedProperty(t,a).get();s.classed("active",c===n),l(i,c===n)}})};M1.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var Hkt=Ls(),Hye=Wo(),Mj=xi(),jkt=ah().isUnifiedHover,$kt=Gye(),oF=xj(),Wkt=bj().DRAW_MODES,Ykt=tt().extendDeep;jye.exports=function(t){var r=t._fullLayout,i=t._context,n=r._modeBar;if(!i.displayModeBar&&!i.watermark){n&&(n.destroy(),delete r._modeBar);return}if(!Array.isArray(i.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(i.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=i.modeBarButtons,o;Array.isArray(a)&&a.length?o=eCt(a):!i.displayModeBar&&i.watermark?o=[]:o=Xkt(t),n?n.update(t,o):r._modeBar=$kt(t,o)};function Xkt(e){var t=e._fullLayout,r=e._fullData,i=e._context;function n(L,I){if(typeof I=="string"){if(I.toLowerCase()===L.toLowerCase())return!0}else{var B=I.name,O=I._cat||I.name;if(B===L||O===L.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=i.modeBarButtonsToAdd.concat(a.filter(function(L){for(var I=0;I1?(y=["toggleHover"],E=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],y=["hoverClosestGeo"],E=["resetGeo"]):c?(y=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):v?(T=["zoomInMap","zoomOutMap"],y=["toggleHover"],E=["resetViewMap"]):h?y=["hoverClosestPie"]:w?(y=["hoverClosestCartesian","hoverCompareCartesian"],E=["resetViewSankey"]):y=["toggleHover"],u&&y.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Jkt(r)||b)&&(y=[]),u&&!_&&(T=["zoomIn2d","zoomOut2d","autoScale2d"],E[0]!=="resetViews"&&(E=["resetScale2d"])),c?S=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!_||d?S=["zoom2d","pan2d"]:v||f?S=["pan2d"]:m&&(S=["zoom2d"]),Kkt(r)&&S.push("select2d","lasso2d");var C=[],k=function(L){C.indexOf(L)===-1&&y.indexOf(L)!==-1&&C.push(L)};if(Array.isArray(s)){for(var D=[],F=0;F{"use strict";Wye.exports={moduleType:"component",name:"modebar",layoutAttributes:(Tj(),Pt(wj)).default,supplyLayoutDefaults:Oye(),manage:$ye()}});var Ej=W((mNr,Yye)=>{"use strict";var tCt=(Jl(),Pt(Kl)).FROM_BL;Yye.exports=function(t,r,i){i===void 0&&(i=tCt[t.constraintoward||"center"]);var n=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=n[0]+(n[1]-n[0])*i;t.range=t._input.range=[t.l2r(a+(n[0]-a)*r),t.l2r(a+(n[1]-a)*r)],t.setScale()}});var kb=W(XA=>{"use strict";var Eb=tt(),kj=Yp(),Kp=Ls().id2name,rCt=ac(),Xye=Ej(),iCt=g1(),nCt=(ra(),Pt(ia)).ALMOST_EQUAL,aCt=(Jl(),Pt(Kl)).FROM_BL;XA.handleDefaults=function(e,t,r){var i=r.axIds,n=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,p,d;for(s=0;sa?r.slice(a):i.slice(n))+o}function sCt(e,t){for(var r=t._size,i=r.h/r.w,n={},a=Object.keys(e),o=0;onCt*d&&!w)){for(a=0;aC&&BE&&(E=B);var $=(E-y)/(2*S);f/=$,y=l.l2r(y),E=l.l2r(E),l.range=l._input.range=x0){let l=i[1]-i[0],u=l-s;u>0&&(o=l/(u/t+s))}e.domain=e._input.domain=[a+(i[0]-a)/o,a+(i[1]-a)/o],e.setScale()}});var JA=W(Ou=>{"use strict";var lF=gi(),Ff=xi(),k0=Qo(),_d=tt(),Fj=ao(),Lj=GA(),ZA=ti(),Zw=Qi(),Qye=pb(),n2e=Sj(),KA=Yi(),Jg=(Jl(),Pt(Kl)),a2e=kb(),uCt=a2e.enforce,cCt=a2e.clean,e2e=Yp().doAutoRange,o2e="start",fCt="middle",s2e="end",hCt=(Zl(),Pt(Xl)).zindexSeparator;Ou.layoutStyles=function(e){return _d.syncOrAsync([k0.doAutoMargin,pCt],e)};function dCt(e,t,r){for(var i=0;i=e[1]||n[1]<=e[0])&&a[0]t[0])return!0}return!1}function pCt(e){var t=e._fullLayout,r=t._size,i=r.p,n=KA.list(e,"",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(Zw.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),Ou.drawMainTitle(e),n2e.manage(e),!t._has("cartesian"))return k0.previousPromises(e);function f(H,j,Q){var te=H._lw/2;if(H._id.charAt(0)==="x"){if(j){if(Q==="top")return j._offset-i-te}else return r.t+r.h*(1-(H.position||0))+te%1;return j._offset+j._length+i+te}if(j){if(Q==="right")return j._offset+j._length+i+te}else return r.l+r.w*(H.position||0)+te%1;return j._offset-i-te}for(a=0;a0){yCt(e,a,u,l),s.attr({x:o,y:a,"text-anchor":i,dy:i2e(t.yanchor)}).call(Fj.positionText,o,a);var c=(t.text.match(Fj.BR_TAG_ALL)||[]).length;if(c){var f=Jg.LINE_SPACING*c+Jg.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var m=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",m)})}var h=lF.select(e).selectAll(".gtitle-subtitle");if(h.node()){var p=s.node().getBBox(),d=p.y+p.height,v=d+Qye.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:v,"text-anchor":i,dy:i2e(t.yanchor)}).call(Fj.positionText,o,v)}}}};function vCt(e,t,r,i,n){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=_d.isTopAnchor(t)?i:i-n,s=r==="b"?a-o:o;return _d.isTopAnchor(t)&&r==="t"||_d.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[a],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=gCt(a,i,n,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function yCt(e,t,r,i){var n="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&vCt(e,a,o,t,i)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[n]=l),k0.allowAutoMargin(e,n),k0.autoMargin(e,n,s)}function xCt(e,t){var r=e.title,i=e._size,n=0;return t===o2e?n=r.pad.l:t===s2e&&(n=-r.pad.r),r.xref==="paper"?i.l+i.w*r.x+n:e.width*r.x+n}function bCt(e,t){var r=e.title,i=e._size,n=0;return t==="0em"||!t?n=-r.pad.b:t===Jg.CAP_SHIFT+"em"&&(n=r.pad.t),r.y==="auto"?i.t/2:r.yref==="paper"?i.t+i.h-i.h*r.y+n:e.height-e.height*r.y+n}function i2e(e){return e==="top"?Jg.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Jg.MID_SHIFT+"em"}function _Ct(e){var t=e.title,r=fCt;return _d.isRightAnchor(t)?r=s2e:_d.isLeftAnchor(t)&&(r=o2e),r}function wCt(e){var t=e.title,r="0em";return _d.isTopAnchor(t)?r=Jg.CAP_SHIFT+"em":_d.isMiddleAnchor(t)&&(r=Jg.MID_SHIFT+"em"),r}Ou.doTraceStyle=function(e){var t=e.calcdata,r=[],i;for(i=0;i{"use strict";var TCt=Hy().readPaths,ACt=K7(),l2e=Ly().clearOutlineControllers,Pj=ti(),u2e=Qi(),MCt=Ra().arrayEditor,c2e=Wy(),SCt=c2e.getPathString;h2e.exports={draw:uF,drawOne:f2e,activateLastSelection:CCt};function uF(e){var t=e._fullLayout;l2e(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var i=t._plots[r].selectionLayer;i&&i.selectAll("path").remove()}for(var n=0;n=0;m--){var g=o.append("path").attr(l).style("opacity",m?.1:u).call(Pj.stroke,f).call(Pj.fill,c).call(u2e.dashLine,m?"solid":p,m?4+h:h);if(ECt(g,e,i),d){var w=MCt(e.layout,"selections",i);g.style({cursor:"move"});var _={element:g.node(),plotinfo:n,gd:e,editHelpers:w,isActiveSelection:!0},b=TCt(s,e);ACt(b,g,_)}else g.style("pointer-events",m?"all":"none");v[m]=g}var M=v[0],x=v[1];x.node().addEventListener("click",function(){return kCt(e,M)})}}function ECt(e,t,r){var i=r.xref+r.yref;u2e.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}function kCt(e,t){if(cF(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeSelectionIndex){Ij(e);return}e._fullLayout._activeSelectionIndex=i,e._fullLayout._deactivateSelection=Ij,uF(e)}}}function CCt(e){if(cF(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=Ij,uF(e)}}function Ij(e){if(cF(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(l2e(e),delete e._fullLayout._activeSelectionIndex,uF(e))}}});var p2e=W((_Nr,d2e)=>{function DCt(){var e,t=0,r=!1;function i(n,a){return e.list.push({type:n,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(n,a){return i("check",{seg1:n,seg2:a})},segmentChop:function(n,a){return i("div_seg",{seg:n,pt:a}),i("chop",{seg:n,pt:a})},statusRemove:function(n){return i("pop_seg",{seg:n})},segmentUpdate:function(n){return i("seg_update",{seg:n})},segmentNew:function(n,a){return i("new_seg",{seg:n,primary:a})},segmentRemove:function(n){return i("rem_seg",{seg:n})},tempStatus:function(n,a,o){return i("temp_status",{seg:n,above:a,below:o})},rewind:function(n){return i("rewind",{seg:n})},status:function(n,a,o){return i("status",{seg:n,above:a,below:o})},vert:function(n){return n===r?e:(r=n,i("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),i("log",{txt:n})},reset:function(){return i("reset")},selected:function(n){return i("selected",{segs:n})},chainStart:function(n){return i("chain_start",{seg:n})},chainRemoveHead:function(n,a){return i("chain_rem_head",{index:n,pt:a})},chainRemoveTail:function(n,a){return i("chain_rem_tail",{index:n,pt:a})},chainNew:function(n,a){return i("chain_new",{pt1:n,pt2:a})},chainMatch:function(n){return i("chain_match",{index:n})},chainClose:function(n){return i("chain_close",{index:n})},chainAddHead:function(n,a){return i("chain_add_head",{index:n,pt:a})},chainAddTail:function(n,a){return i("chain_add_tail",{index:n,pt:a})},chainConnect:function(n,a){return i("chain_con",{index1:n,index2:a})},chainReverse:function(n){return i("chain_rev",{index:n})},chainJoin:function(n,a){return i("chain_join",{index1:n,index2:a})},done:function(){return i("done")}},e}d2e.exports=DCt});var g2e=W((wNr,v2e)=>{function FCt(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,i,n){var a=i[0],o=i[1],s=n[0],l=n[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,i,n){var a=r[1]-i[1],o=n[0]-i[0],s=r[0]-i[0],l=n[1]-i[1],u=s*o+a*l;if(u-e)},pointsSameX:function(r,i){return Math.abs(r[0]-i[0])e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-n>e&&(l=!l),o=c,s=f}return l}};return t}v2e.exports=FCt});var y2e=W((TNr,m2e)=>{var LCt={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var i=e.root,n=e.root.next;n!==null;){if(r(n)){t.prev=n.prev,t.next=n,n.prev.next=t,n.prev=t;return}i=n,n=n.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var r=e.root,i=e.root.next;i!==null&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(n){return n.prev=r,n.next=i,r.next=n,i!==null&&(i.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};m2e.exports=LCt});var b2e=W((ANr,x2e)=>{var QA=y2e();function PCt(e,t,r){function i(d,v){return{id:r?r.segmentId():-1,start:d,end:v,myFill:{above:null,below:null},otherFill:null}}function n(d,v,m){return{id:r?r.segmentId():-1,start:d,end:v,myFill:{above:m.myFill.above,below:m.myFill.below},otherFill:null}}var a=QA.create();function o(d,v,m,g,w,_){var b=t.pointsCompare(v,w);return b!==0?b:t.pointsSame(m,_)?0:d!==g?d?1:-1:t.pointAboveOrOnLine(m,g?w:_,g?_:w)?1:-1}function s(d,v){a.insertBefore(d,function(m){var g=o(d.isStart,d.pt,v,m.isStart,m.pt,m.other.pt);return g<0})}function l(d,v){var m=QA.node({isStart:!0,pt:d.start,seg:d,primary:v,other:null,status:null});return s(m,d.end),m}function u(d,v,m){var g=QA.node({isStart:!1,pt:v.end,seg:v,primary:m,other:d,status:null});d.other=g,s(g,d.pt)}function c(d,v){var m=l(d,v);return u(m,d,v),m}function f(d,v){r&&r.segmentChop(d.seg,v),d.other.remove(),d.seg.end=v,d.other.pt=v,s(d.other,d.pt)}function h(d,v){var m=n(v,d.seg.end,d.seg);return f(d,v),c(m,d.primary)}function p(d,v){var m=QA.create();function g(F,P){var R=F.seg.start,L=F.seg.end,I=P.seg.start,B=P.seg.end;return t.pointsCollinear(R,I,B)?t.pointsCollinear(L,I,B)||t.pointAboveOrOnLine(L,I,B)?1:-1:t.pointAboveOrOnLine(R,I,B)?1:-1}function w(F){return m.findTransition(function(P){var R=g(F,P.ev);return R>0})}function _(F,P){var R=F.seg,L=P.seg,I=R.start,B=R.end,O=L.start,$=L.end;r&&r.checkIntersection(R,L);var X=t.linesIntersect(I,B,O,$);if(X===!1){if(!t.pointsCollinear(I,B,O)||t.pointsSame(I,$)||t.pointsSame(B,O))return!1;var K=t.pointsSame(I,O),G=t.pointsSame(B,$);if(K&&G)return P;var q=!K&&t.pointBetween(I,O,$),J=!G&&t.pointBetween(B,O,$);if(K)return J?h(P,B):h(F,$),P;q&&(G||(J?h(P,B):h(F,$)),h(P,I))}else X.alongA===0&&(X.alongB===-1?h(F,O):X.alongB===0?h(F,X.pt):X.alongB===1&&h(F,$)),X.alongB===0&&(X.alongA===-1?h(P,I):X.alongA===0?h(P,X.pt):X.alongA===1&&h(P,B));return!1}for(var b=[];!a.isEmpty();){var M=a.getHead();if(r&&r.vert(M.pt[0]),M.isStart){let F=function(){if(A){var P=_(M,A);if(P)return P}return T?_(M,T):!1};var D=F;r&&r.segmentNew(M.seg,M.primary);var x=w(M),A=x.before?x.before.ev:null,T=x.after?x.after.ev:null;r&&r.tempStatus(M.seg,A?A.seg:!1,T?T.seg:!1);var y=F();if(y){if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,E&&(y.seg.myFill.above=!y.seg.myFill.above)}else y.seg.otherFill=M.seg.myFill;r&&r.segmentUpdate(y.seg),M.other.remove(),M.remove()}if(a.getHead()!==M){r&&r.rewind(M.seg);continue}if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,T?M.seg.myFill.below=T.seg.myFill.above:M.seg.myFill.below=d,E?M.seg.myFill.above=!M.seg.myFill.below:M.seg.myFill.above=M.seg.myFill.below}else if(M.seg.otherFill===null){var S;T?M.primary===T.primary?S=T.seg.otherFill.above:S=T.seg.myFill.above:S=M.primary?v:d,M.seg.otherFill={above:S,below:S}}r&&r.status(M.seg,A?A.seg:!1,T?T.seg:!1),M.other.status=x.insert(QA.node({ev:M}))}else{var C=M.status;if(C===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(m.exists(C.prev)&&m.exists(C.next)&&_(C.prev.ev,C.next.ev),r&&r.statusRemove(C.ev.seg),C.remove(),!M.primary){var k=M.seg.myFill;M.seg.myFill=M.seg.otherFill,M.seg.otherFill=k}b.push(M.seg)}a.getHead().remove()}return r&&r.done(),b}return e?{addRegion:function(d){for(var v,m=d[d.length-1],g=0;g{function ICt(e,t,r){var i=[],n=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(D,F,P){return c.index=D,c.matches_head=F,c.matches_pt1=P,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function eM(e,t,r){var i=[];return e.forEach(function(n){var a=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);t[a]!==0&&i.push({id:r?r.segmentId():-1,start:n.start,end:n.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(i),i}var RCt={union:function(e,t){return eM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return eM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return eM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return eM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return eM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};T2e.exports=RCt});var S2e=W((ENr,M2e)=>{var zCt={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l{var BCt=p2e(),qCt=g2e(),E2e=b2e(),OCt=w2e(),tM=A2e(),k2e=S2e(),wd=!1,rM=qCt(),jh;jh={buildLog:function(e){return e===!0?wd=BCt():e===!1&&(wd=!1),wd===!1?!1:wd.list},epsilon:function(e){return rM.epsilon(e)},segments:function(e){var t=E2e(!0,rM,wd);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=E2e(!1,rM,wd);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:tM.union(e.combined,wd),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:tM.intersect(e.combined,wd),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:tM.difference(e.combined,wd),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:tM.differenceRev(e.combined,wd),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:tM.xor(e.combined,wd),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:OCt(e.segments,rM,wd),inverted:e.inverted}},polygonFromGeoJSON:function(e){return k2e.toPolygon(jh,e)},polygonToGeoJSON:function(e){return k2e.fromPolygon(jh,rM,e)},union:function(e,t){return iM(e,t,jh.selectUnion)},intersect:function(e,t){return iM(e,t,jh.selectIntersect)},difference:function(e,t){return iM(e,t,jh.selectDifference)},differenceRev:function(e,t){return iM(e,t,jh.selectDifferenceRev)},xor:function(e,t){return iM(e,t,jh.selectXor)}};function iM(e,t,r){var i=jh.segments(e),n=jh.segments(t),a=jh.combine(i,n),o=r(a);return jh.polygon(o)}typeof window=="object"&&(window.PolyBool=jh);C2e.exports=jh});var L2e=W((CNr,F2e)=>{F2e.exports=function(t,r,i,n){var a=t[0],o=t[1],s=!1;i===void 0&&(i=0),n===void 0&&(n=r.length);for(var l=n-i,u=0,c=l-1;uo!=d>o&&a<(p-f)*(o-h)/(d-h)+f;v&&(s=!s)}return s}});var nM=W((DNr,P2e)=>{"use strict";var zj=gD().dot,fF=(ra(),Pt(ia)).BADNUM,hF=P2e.exports={};hF.tester=function(t){var r=t.slice(),i=r[0][0],n=i,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;sn||g===fF||go||v&&u(d))}function f(d,v){var m=d[0],g=d[1];if(m===fF||mn||g===fF||go)return!1;var w=r.length,_=r[0][0],b=r[0][1],M=0,x,A,T,y,E;for(x=1;xMath.max(A,_)||g>Math.max(T,b)))if(gs||Math.abs(zj(f,u))>n)return!0;return!1};hF.filter=function(t,r){var i=[t[0]],n=0,a=0;function o(l){t.push(l);var u=i.length,c=n;i.splice(a+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:i}}});var I2e={};Jn(I2e,{BENDPX:()=>NCt,MINSELECT:()=>UCt,SELECTDELAY:()=>VCt,SELECTID:()=>GCt});var NCt,UCt,VCt,GCt,R2e=Ci(()=>{"use strict";NCt=1.5,UCt=12,VCt=100,GCt="-select"});var ixe=W((FNr,rxe)=>{"use strict";var z2e=D2e(),HCt=L2e(),sM=xi(),jCt=Qi().dashStyle,aM=ti(),$Ct=Is(),WCt=ah().makeEventData,hM=_1(),YCt=hM.freeMode,XCt=hM.rectMode,lM=hM.drawMode,Nj=hM.openMode,Uj=hM.selectMode,B2e=Wy(),q2e=($A(),Pt(jA)),G2e=K7(),H2e=Ly().clearOutline,j2e=Hy(),Bj=j2e.handleEllipse,ZCt=j2e.readPaths,KCt=Y7().newShapes,JCt=uj(),QCt=Rj().activateLastSelection,pF=tt(),e8t=pF.sorterAsc,$2e=nM(),oM=CD(),Td=Ls().getFromId,t8t=GA(),r8t=JA().redrawReglTraces,vF=(R2e(),Pt(I2e)),S1=vF.MINSELECT,i8t=$2e.filter,Vj=$2e.tester,Gj=H7(),O2e=Gj.p2r,n8t=Gj.axValue,a8t=Gj.getTransform;function Hj(e){return e.subplot!==void 0}function o8t(e,t,r,i,n){var a=!Hj(i),o=YCt(n),s=XCt(n),l=Nj(n),u=lM(n),c=Uj(n),f=n==="drawline",h=n==="drawcircle",p=f||h,d=i.gd,v=d._fullLayout,m=c&&v.newselection.mode==="immediate"&&a,g=v._zoomlayer,w=i.element.getBoundingClientRect(),_=i.plotinfo,b=a8t(_),M=t-w.left,x=r-w.top;v._calcInverseTransform(d);var A=pF.apply3DTransform(v._invTransform)(M,x);M=A[0],x=A[1];var T=v._invScaleX,y=v._invScaleY,E=M,S=x,C="M"+M+","+x,k=i.xaxes[0],D=i.yaxes[0],F=k._length,P=D._length,R=e.altKey&&!(lM(n)&&l),L,I,B,O,$,X,K;Y2e(e,d,i),o&&(L=i8t([[M,x]],vF.BENDPX));var G=g.selectAll("path.select-outline-"+_.id).data([1]),q=u?v.newshape:v.newselection;u&&(i.hasText=q.label.text||q.label.texttemplate);var J=u&&!l?q.fillcolor:"rgba(0,0,0,0)",N=q.line.color||(a?aM.contrast(d._fullLayout.plot_bgcolor):"#7f7f7f");G.enter().append("path").attr("class","select-outline select-outline-"+_.id).style({opacity:u?q.opacity/2:1,"stroke-dasharray":jCt(q.line.dash,q.line.width),"stroke-width":q.line.width+"px","shape-rendering":"crispEdges"}).call(aM.stroke,N).call(aM.fill,J).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",b).attr("d",C+"Z");var V=g.append("path").attr("class","zoombox-corners").style({fill:aM.background,stroke:aM.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z");if(u&&i.hasText){var Y=g.select(".label-temp");Y.empty()&&(Y=g.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var H=v._uid+vF.SELECTID,j=[],Q=gF(d,i.xaxes,i.yaxes,i.subplot);m&&!e.shiftKey&&(i._clearSubplotSelections=function(){if(a){var ue=k._id,ge=D._id;Q2e(d,ue,ge,Q);for(var Ee=(d.layout||{}).selections||[],xe=[],ce=!1,oe=0;oe=0){d._fullLayout._deactivateShape(d);return}if(!u){var Ee=v.clickmode;oM.done(H).then(function(){if(oM.clear(H),ue===2){for(G.remove(),$=0;$-1&&W2e(ge,d,i.xaxes,i.yaxes,i.subplot,i,G),Ee==="event"&&fM(d,void 0);$Ct.click(d,ge,_.id)}).catch(pF.error)}},i.doneFn=function(){V.remove(),oM.done(H).then(function(){oM.clear(H),!m&&O&&i.selectionDefs&&(O.subtract=R,i.selectionDefs.push(O),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,B)),(m||u)&&uM(i,m),i.doneFnCompleted&&i.doneFnCompleted(j),c&&fM(d,K)}).catch(pF.error)}}function W2e(e,t,r,i,n,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,p,d,v,m,g,w,_,b,M;if(f8t(s)){Y2e(e,t,a),h=gF(t,r,i,n);var x=h8t(s,h),A=x.pointNumbers.length>0;if(A?d8t(h,x):p8t(h)&&(w=U2e(x))){for(o&&o.remove(),M=0;M=0}function c8t(e){return e._fullLayout._activeSelectionIndex>=0}function uM(e,t){var r=e.dragmode,i=e.plotinfo,n=e.gd;u8t(n)&&n._fullLayout._deactivateShape(n),c8t(n)&&n._fullLayout._deactivateSelection(n);var a=n._fullLayout,o=a._zoomlayer,s=lM(r),l=Uj(r);if(s||l){var u=o.selectAll(".select-outline-"+i.id);if(u&&n._fullLayout._outlining){var c;s&&(c=KCt(u,e)),c&&sM.call("_guiRelayout",n,{shapes:c});var f;l&&!Hj(e)&&(f=JCt(u,e)),f&&(n._fullLayout._noEmitSelectedAtStart=!0,sM.call("_guiRelayout",n,{selections:f}).then(function(){t&&QCt(n)})),n._fullLayout._outlining=!1}}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function N2e(e){return e._id}function gF(e,t,r,i){if(!e.calcdata)return[];var n=[],a=t.map(N2e),o=r.map(N2e),s,l,u;for(u=0;u0,a=n?i[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function d8t(e,t){var r=[],i,n,a,o;for(o=0;o0&&r.push(i);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(n=t.searchInfo.cd[0].trace,n.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=i.selectedpoints.length,t>1)))return!1;return t===1}function cM(e,t,r){var i,n;for(i=0;i-1&&t;if(!o&&t){var ue=V2e(e,!0);if(ue.length){var ge=ue[0].xref,Ee=ue[0].yref;if(ge&&Ee){var xe=exe(ue),ce=txe([Td(e,ge,"x"),Td(e,Ee,"y")]);ce(j,xe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:te&&fM(e,j),h._reselect=!1}if(!o&&h._deselect){var oe=h._deselect;s=oe.xref,l=oe.yref,m8t(s,l,c)||Q2e(e,s,l,i),te&&(j.points.length?fM(e,j):Wj(e)),h._deselect=!1}return{eventData:j,selectionTesters:r}}function g8t(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";nxe.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]});var dM={};Jn(dM,{axisRefDescription:()=>w8t});function w8t(e,t,r){return[`If set to a ${e} axis id (e.g. *${e}* or *${e}2*),`,`the \`${e}\` position refers to a ${e} coordinate.`,`If set to *paper*, the \`${e}\` position refers to the distance from the`,`${t} of the plotting area in normalized coordinates where *0* (*1*) corresponds`,`to the ${t} (${r}). If set to a ${e} axis ID followed by *domain*`,"(separated by a space), the position behaves like for *paper*, but refers to the",`distance in fractions of the domain length from the ${t} of the domain of that`,`axis: e.g., *${e}2 domain* refers to the domain of the second ${e}`,`axis and a ${e} position of 0.5 refers to the point between the ${t}`,`and the ${r} of the domain of the second ${e} axis.`].join(" ")}var pM=Ci(()=>{"use strict"});var Xy=W((INr,sxe)=>{"use strict";var axe=Yj(),oxe=jo(),mF=(Zl(),Pt(Xl)),T8t=Ra().templatedArray,PNr=(pM(),Pt(dM));sxe.exports=T8t("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:oxe({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:axe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:axe.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",mF.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",mF.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",mF.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",mF.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:oxe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var E1={};Jn(E1,{PTS_LINESONLY:()=>A8t,eventDataKeys:()=>k8t,maxScreensAway:()=>E8t,minTolerance:()=>M8t,toleranceGrowth:()=>S8t});var A8t,M8t,S8t,E8t,k8t,k1=Ci(()=>{"use strict";A8t=20,M8t=.2,S8t=10,E8t=20,k8t=[]});var C1=W((RNr,lxe)=>{"use strict";lxe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Ws=W((zNr,gxe)=>{"use strict";var uxe=Ts().axisHoverFormat,{hovertemplateAttrs:C8t,texttemplateAttrs:D8t,templatefallbackAttrs:cxe}=Wa(),fxe=Fo(),F8t=jo(),hxe=zu().dash,L8t=zu().pattern,P8t=Qi(),I8t=(k1(),Pt(E1)),vM=an().extendFlat,R8t=C1();function dxe(e){return{valType:"any",dflt:0,editType:"calc"}}function pxe(e){return{valType:"any",editType:"calc"}}function vxe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}gxe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:dxe("x"),yperiod:dxe("y"),xperiod0:pxe("x0"),yperiod0:pxe("y0"),xperiodalignment:vxe("x"),yperiodalignment:vxe("y"),xhoverformat:uxe("x"),yhoverformat:uxe("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:D8t(),texttemplatefallback:cxe({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:C8t({},{keys:I8t.eventDataKeys}),hovertemplatefallback:cxe(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:vM({},hxe,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:R8t(!0),fillgradient:vM({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:L8t,marker:vM({symbol:{valType:"enumerated",values:P8t.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:vM({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:vM({},hxe,{arrayOk:!0}),editType:"calc"},fxe("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},fxe("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:F8t({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var Xj=W((qNr,xxe)=>{"use strict";var mxe=Xy(),yxe=Ws().line,z8t=zu().dash,yF=an().extendFlat,B8t=hs().overrideAll,q8t=Ra().templatedArray,BNr=(pM(),Pt(dM));xxe.exports=B8t(q8t("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:yF({},mxe.xref,{}),yref:yF({},mxe.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:yxe.color,width:yF({},yxe.width,{min:1,dflt:1}),dash:yF({},z8t,{dflt:"dot"})}}),"arraydraw","from-root")});var Txe=W((ONr,wxe)=>{"use strict";var bxe=tt(),xF=Yi(),O8t=tf(),N8t=Xj(),_xe=Wy();wxe.exports=function(t,r){O8t(t,r,{name:"selections",handleItemDefaults:U8t});for(var i=r.selections,n=0;n{"use strict";Axe.exports=function(t,r,i){i("newselection.mode");var n=i("newselection.line.width");n&&(i("newselection.line.color"),i("newselection.line.dash")),i("activeselection.fillcolor"),i("activeselection.opacity")}});var gM=W((UNr,kxe)=>{"use strict";var V8t=xi(),Sxe=tt(),Exe=Ls();kxe.exports=function(t){return function(i,n){var a=i[t];if(Array.isArray(a))for(var o=V8t.subplotsRegistry.cartesian,s=o.idRegex,l=n._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=n._has("cartesian"),p=0;p{"use strict";var Cxe=Rj(),mM=ixe();Dxe.exports={moduleType:"component",name:"selections",layoutAttributes:Xj(),supplyLayoutDefaults:Txe(),supplyDrawNewSelectionDefaults:Mxe(),includeBasePlot:gM()("selections"),draw:Cxe.draw,drawOne:Cxe.drawOne,reselect:mM.reselect,prepSelect:mM.prepSelect,clearOutline:mM.clearOutline,clearSelectionsCache:mM.clearSelectionsCache,selectOnClick:mM.selectOnClick}});var i$=W((GNr,Xxe)=>{"use strict";var t$=gi(),Ad=tt(),Fxe=Ad.numberFormat,G8t=M7(),bF=xi(),Oxe=Ad.strTranslate,H8t=ao(),Kj=ti(),Zy=Qi(),j8t=Is(),Lxe=Yi(),$8t=Xp(),W8t=Ef(),Nxe=_1(),_F=Nxe.selectingOrDrawing,Y8t=Nxe.freeMode,X8t=(Jl(),Pt(Kl)).FROM_TL,Z8t=GA(),K8t=JA().redrawReglTraces,J8t=Qo(),Jj=Ls().getFromId,Q8t=xu().prepSelect,eDt=xu().clearOutline,tDt=xu().selectOnClick,Zj=Ej(),r$=(Zl(),Pt(Xl)),Pxe=r$.MINDRAG,oh=r$.MINZOOM,Ixe=!0;function rDt(e,t,r,i,n,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,p,d,v,m,g,w,_,b,M,x,A,T,y,E,S,C,k,D,F,P,R;r+=t.yaxis._shift;function L(){if(f=t.xaxis,h=t.yaxis,_=f._length,b=h._length,g=f._offset,w=h._offset,p={},p[f._id]=f,d={},d[h._id]=h,o&&s)for(var we=t.overlays,me=0;me=0){Le._fullLayout._deactivateShape(Le);return}var Ne=Le._fullLayout.clickmode;if(e$(Le),we===2&&!c&&_e(),u)Ne.indexOf("select")>-1&&tDt(me,Le,v,m,t.id,O),Ne.indexOf("event")>-1&&j8t.click(Le,me,t.id);else if(we===1&&c){var Je=o?h:f,rt=o==="s"||s==="w"?0:1,mt=Je._name+".range["+rt+"]",dt=iDt(Je,rt),St="left",Ke="middle";if(Je.fixedrange)return;o?(Ke=o==="n"?"top":"bottom",Je.side==="right"&&(St="right")):s==="e"&&(St="right"),Le._context.showAxisRangeEntryBoxes&&t$.select(B).call(H8t.makeEditable,{gd:Le,immediate:!0,background:Le._fullLayout.paper_bgcolor,text:String(dt),fill:Je.tickfont?Je.tickfont.color:"#444",horizontalAlign:St,verticalAlign:Ke}).on("edit",function(bt){var pt=Je.d2r(bt);pt!==void 0&&bF.call("_guiRelayout",Le,mt,pt)})}}W8t.init(O);var K,G,q,J,N,V,Y,H,j,Q;function te(we,me,Le){var Ne=B.getBoundingClientRect();K=me-Ne.left,G=Le-Ne.top,e._fullLayout._calcInverseTransform(e);var Je=Ad.apply3DTransform(e._fullLayout._invTransform)(K,G);K=Je[0],G=Je[1],q={l:K,r:K,w:0,t:G,b:G,h:0},J=e._hmpixcount?e._hmlumcount/e._hmpixcount:Kj.luminosity(e._fullLayout.plot_bgcolor),N="M0,0H"+_+"V"+b+"H0V0",V=!1,Y="xy",Q=!1,H=Gxe(l,J,g,w,N),j=Hxe(l,g,w)}function ue(we,me){if(e._transitioningWithDuration)return!1;var Le=Math.max(0,Math.min(_,P*we+K)),Ne=Math.max(0,Math.min(b,R*me+G)),Je=Math.abs(Le-K),rt=Math.abs(Ne-G);q.l=Math.min(K,Le),q.r=Math.max(K,Le),q.t=Math.min(G,Ne),q.b=Math.max(G,Ne);function mt(){Y="",q.r=q.l,q.t=q.b,j.attr("d","M0,0Z")}if(M.isSubplotConstrained)Je>oh||rt>oh?(Y="xy",Je/_>rt/b?(rt=Je*b/_,G>Ne?q.t=G-rt:q.b=G+rt):(Je=rt*_/b,K>Le?q.l=K-Je:q.r=K+Je),j.attr("d",wF(q))):mt();else if(x.isSubplotConstrained)if(Je>oh||rt>oh){Y="xy";var dt=Math.min(q.l/_,(b-q.b)/b),St=Math.max(q.r/_,(b-q.t)/b);q.l=dt*_,q.r=St*_,q.b=(1-dt)*b,q.t=(1-St)*b,j.attr("d",wF(q))}else mt();else!T||rt0){var bt;if(x.isSubplotConstrained||!A&&T.length===1){for(bt=0;bt1&&(mt.maxallowed!==void 0&&E===(mt.range[0]1&&(dt.maxallowed!==void 0&&S===(dt.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function aDt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Gxe(e,t,r,i,n){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",Oxe(r,i)).attr("d",n+"Z")}function Hxe(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:Kj.background,stroke:Kj.defaultLine,"stroke-width":1,opacity:0}).attr("transform",Oxe(t,r)).attr("d","M0,0Z")}function jxe(e,t,r,i,n,a){e.attr("d",i+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),$xe(e,t,n,a)}function $xe(e,t,r,i){r||(e.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function e$(e){t$.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Wxe(e){Ixe&&e.data&&e._context.showTips&&(Ad.notifier(Ad._(e,"Double-click to zoom back out"),"long",e),Ixe=!1)}function oDt(e,t){return"M"+(e.l-.5)+","+(t-oh-.5)+"h-3v"+(2*oh+1)+"h3ZM"+(e.r+.5)+","+(t-oh-.5)+"h3v"+(2*oh+1)+"h-3Z"}function sDt(e,t){return"M"+(t-oh-.5)+","+(e.t-.5)+"v-3h"+(2*oh+1)+"v3ZM"+(t-oh-.5)+","+(e.b+.5)+"v3h"+(2*oh+1)+"v-3Z"}function wF(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,oh)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Bxe(e,t,r,i,n){for(var a=!1,o={},s={},l,u,c,f,h=(n||{}).xaHash,p=(n||{}).yaHash,d=0;d{"use strict";var lDt=gi(),TF=Is(),uDt=Ef(),cDt=Xp(),Jp=i$().makeDragBox,Nu=(Zl(),Pt(Xl)).DRAGGERSIZE;AF.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){lDt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var i=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});i.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Jp(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&TF.hover(t,h,a)},TF.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,uDt.unhover(t,h))},t._context.showAxisDragHandles&&(Jp(t,o,s._offset-Nu,l._offset-Nu,Nu,Nu,"n","w"),Jp(t,o,s._offset+s._length,l._offset-Nu,Nu,Nu,"n","e"),Jp(t,o,s._offset-Nu,l._offset+l._length,Nu,Nu,"s","w"),Jp(t,o,s._offset+s._length,l._offset+l._length,Nu,Nu,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=Nu),Jp(t,o,s._offset+s._length*.1,c,s._length*.8,Nu,"","ew"),Jp(t,o,s._offset,c,s._length*.1,Nu,"","w"),Jp(t,o,s._offset+s._length*.9,c,s._length*.1,Nu,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=Nu),Jp(t,o,f,l._offset+l._length*.1,Nu,l._length*.8,"ns",""),Jp(t,o,f,l._offset+l._length*.9,Nu,l._length*.1,"s",""),Jp(t,o,f,l._offset,Nu,l._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(a){a.target=t._fullLayout._lasthover,TF.hover(t,a,r._hoversubplot)},n.onclick=function(a){a.target=t._fullLayout._lasthover,TF.click(t,a)},n.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},AF.updateFx(t)}};AF.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";cDt(t._draggers,r)}});var Jxe=W((jNr,Kxe)=>{"use strict";var Zxe=xi();Kxe.exports=function(t){for(var r=Zxe.layoutArrayContainers,i=Zxe.layoutArrayRegexes,n=t.split("[")[0],a,o,s=0;s{"use strict";var fDt=my(),a$=vD(),yM=qg(),hDt=SD().sorterAsc,o$=xi();xM.containerArrayMatch=Jxe();var dDt=xM.isAddVal=function(t){return t==="add"||fDt(t)},Qxe=xM.isRemoveVal=function(t){return t===null||t==="remove"};xM.applyContainerArrayChanges=function(t,r,i,n,a){var o=r.astr,s=o$.getComponentMethod(o,"supplyLayoutDefaults"),l=o$.getComponentMethod(o,"draw"),u=o$.getComponentMethod(o,"drawOne"),c=n.replot||n.recalc||s===a$||l===a$,f=t.layout,h=t._fullLayout;if(i[""]){Object.keys(i).length>1&&yM.warn("Full array edits are incompatible with other edits",o);var p=i[""][""];if(Qxe(p))r.set(null);else if(Array.isArray(p))r.set(p);else return yM.warn("Unrecognized full array edit value",o,p),!0;return c?!1:(s(f,h),l(t),!0)}var d=Object.keys(i).map(Number).sort(hDt),v=r.get(),m=v||[],g=a(h,o).get(),w=[],_=-1,b=m.length,M,x,A,T,y,E,S,C;for(M=0;Mm.length-(S?0:1)){yM.warn("index out of range",o,A);continue}if(E!==void 0)y.length>1&&yM.warn("Insertion & removal are incompatible with edits to the same index.",o,A),Qxe(E)?w.push(A):S?(E==="add"&&(E={}),m.splice(A,0,E),g&&g.splice(A,0,{})):yM.warn("Unrecognized full object edit value",o,A,E),_===-1&&(_=A);else for(x=0;x=0;M--)m.splice(w[M],1),g&&g.splice(w[M],1);if(m.length?v||r.set(m):r.set(null),c)return!1;if(s(f,h),u!==a$){var k;if(_===-1)k=d;else{for(b=Math.max(m.length,b),k=[],M=0;M=_));M++)k.push(A);for(M=_;M{"use strict";var nbe=hn(),abe=xi(),Lf=tt(),bM=Qo(),obe=Ls(),_M=obe.cleanId,pDt=obe.getFromTrace,s$=abe.traceIs,vDt=["x","y","z"];Md.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Lf.log("Clearing previous rejected promises from queue."),e._promises=[]};Md.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(bM.subplotsRegistry.cartesian||{}).attrRegex,n=(bM.subplotsRegistry.polar||{}).attrRegex,a=(bM.subplotsRegistry.ternary||{}).attrRegex,o=(bM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&Md.cleanLayout(e.template.layout),e};function Kw(e,t,r=!1){var i=e[t],n=t.charAt(0);r&&Array.isArray(i)||i&&i!=="paper"&&(e[t]=_M(i,n,!0))}Md.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}Md.hasParent=function(e,t){for(var r=ibe(t);r;){if(r in e)return!0;r=ibe(r)}return!1};Md.clearAxisTypes=function(e,t,r){for(var i=0;i{let r=(...i)=>i.every(n=>Lf.isPlainObject(n))||i.every(n=>Array.isArray(n));if([e,t].every(i=>Array.isArray(i))){if(e.length!==t.length)return!1;for(let i=0;iLf.isPlainObject(i))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e){if(i.startsWith("_"))continue;let n=e[i],a=t[i];if(n!==a&&!(r(n,a)?l$(n,a):!1))return!1}return!0}return!1};Md.collectionsAreEqual=l$});var qF=W(Fa=>{"use strict";var CF=gi(),yDt=hn(),xDt=fG(),di=tt(),ts=di.nestedProperty,c$=ww(),sh=epe(),Sd=xi(),zF=Mw(),In=Qo(),Pf=Yi(),bDt=LH(),_Dt=ac(),EF=Qi(),wDt=ti(),TDt=n$().initInteractions,ADt=(md(),Pt(gd)),MDt=xu().clearOutline,hbe=_y().dfltConfig,SF=ebe(),zl=sbe(),To=JA(),Ky=hs(),SDt=(Zl(),Pt(Xl)).AX_NAME_PATTERN,u$=0,lbe=5;function EDt(e,t,r,i){var n;if(e=di.getGraphDiv(e),c$.init(e),di.isPlainObject(t)){var a=t;t=a.data,r=a.layout,i=a.config,n=a.frames}var o=c$.triggerHandler(e,"plotly_beforeplot",[t,r,i]);if(o===!1)return Promise.reject();!t&&!r&&!di.isPlotDiv(e)&&di.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(n)return Fa.addFrames(e,n)}pbe(e,i),r||(r={}),CF.select(e).classed("js-plotly-plot",!0),EF.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(zl.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=zl.cleanLayout(r)),In.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(KDt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),EF.initGradients(e),EF.initPatterns(e),l&&Pf.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&In.doCalcdata(e);for(var h=0;h{di.isHidden(e)||In.resize(e)};if(e._context.fillFrame||typeof ResizeObserver=="undefined")window.addEventListener("resize",T),e._clearResponsive=()=>window.removeEventListener("resize",T);else{let y=e.offsetWidth,E=e.offsetHeight,S=new ResizeObserver(()=>{let C=e.offsetWidth,k=e.offsetHeight,D=Math.abs(C-y)>1||Math.abs(k-E)>1;y=C,E=k,D&&C&&k&&T()});S.observe(e),e._clearResponsive=()=>S.disconnect()}}}else di.clearResponsive(e);let p=document.fonts?[...document.fonts].filter(T=>T.status!=="loaded"):[];var d=di.extendFlat({},u._size),v=0;function m(){for(var T=u._basePlotModules,y=0;y["loaded","loading"].includes(n.status));if(!r.length)return;let i={};e._fontLoadToken=i,yield Promise.all(r.map(n=>n.loaded.catch(()=>{}))),e._fontLoadToken===i&&(delete e._fontLoadToken,EF.savedBBoxes={},Fa._doPlot(e))})}function TM(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function CDt(e){return di.extendFlat(hbe,e)}function dbe(e,t){try{e._fullLayout._paper.style("background",t)}catch(r){di.error(r)}}function DDt(e,t){var r=wDt.combine(t,"white");dbe(e,r)}function pbe(e,t){if(!e._context){e._context=di.extendDeep({},hbe);var r=CF.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i=e._context,n,a,o;if(t){for(a=Object.keys(t),n=0;n=e.data.length||n<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(n,i+1)>-1||n>=0&&t.indexOf(-e.data.length+n)>-1||n<0&&t.indexOf(e.data.length+n)>-1)throw new Error("each index in "+r+" must be unique.")}}function vbe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),FF(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&FF(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function PDt(e,t,r){var i,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),i=0;i=0&&c=0&&c0&&typeof T.parts[S]!="string";)S--;var C=T.parts[S],k=T.parts[S-1]+"."+C,D=T.parts.slice(0,S).join("."),F=ts(e.layout,D).get(),P=ts(i,D).get(),R=T.get();if(y!==void 0){g[A]=y,w[A]=C==="reverse"?y:Qg(R);var L=zF.getLayoutValObject(i,T.parts);if(L&&L.impliedEdits&&y!==null)for(var I in L.impliedEdits)_(di.relativeAttr(A,I),L.impliedEdits[I]);if(["width","height"].indexOf(A)!==-1)if(y){_("autosize",null);var B=A==="height"?"width":"height";_(B,i[B])}else i[A]=e._initialAutoSize[A];else if(A==="autosize")_("width",y?null:i.width),_("height",y?null:i.height);else if(k.match(Abe))x(k),ts(i,D+"._inputRange").set(null);else if(k.match(Mbe)){x(k),ts(i,D+"._inputRange").set(null);var O=ts(i,D).get();O._inputDomain&&(O._input.domain=O._inputDomain.slice())}else k.match(BDt)&&ts(i,D+"._inputDomain").set(null);if(C==="type"){M=F;var $=P.type==="linear"&&y==="log",X=P.type==="log"&&y==="linear";if($||X){if(!M||!M.range)_(D+".autorange",!0);else if(P.autorange)$&&(M.range=M.range[1]>M.range[0]?[1,2]:[2,1]);else{var K=M.range[0],G=M.range[1];$?(K<=0&&G<=0&&_(D+".autorange",!0),K<=0?K=G/1e6:G<=0&&(G=K/1e6),_(D+".range[0]",Math.log(K)/Math.LN10),_(D+".range[1]",Math.log(G)/Math.LN10)):(_(D+".range[0]",Math.pow(10,K)),_(D+".range[1]",Math.pow(10,G)))}Array.isArray(i._subplots.polar)&&i._subplots.polar.length&&i[T.parts[0]]&&T.parts[1]==="radialaxis"&&delete i[T.parts[0]]._subplot.viewInitial["radialaxis.range"],Sd.getComponentMethod("annotations","convertCoords")(e,P,y,_),Sd.getComponentMethod("images","convertCoords")(e,P,y,_)}else _(D+".autorange",!0),_(D+".range",null);ts(i,D+"._inputRange").set(null)}else if(C.match(SDt)){var q=ts(i,A).get(),J=(y||{}).type;(!J||J==="-")&&(J="linear"),Sd.getComponentMethod("annotations","convertCoords")(e,q,J,_),Sd.getComponentMethod("images","convertCoords")(e,q,J,_),!D&&q&&y&&(y.range!==void 0||y.autorange!==void 0)&&(x(`${C}.range`),q._inputRange=null)}var N=SF.containerArrayMatch(A);if(N){c=N.array,f=N.index;var V=N.property,Y=L||{editType:"calc"};f!==""&&V===""&&(SF.isAddVal(y)?w[A]=null:SF.isRemoveVal(y)?w[A]=(ts(r,c).get()||[])[f]:di.warn("unrecognized full object value",t)),Ky.update(m,Y),u[c]||(u[c]={});var H=u[c][f];H||(H=u[c][f]={}),H[V]=y,delete t[A]}else C==="reverse"?(F.range?F.range.reverse():(_(D+".autorange",!0),F.range=[1,0]),P.autorange?m.calc=!0:m.plot=!0):(A==="dragmode"&&(y===!1&&R!==!1||y!==!1&&R===!1)||i._has("scatter-like")&&i._has("regl")&&A==="dragmode"&&(y==="lasso"||y==="select")&&!(R==="lasso"||R==="select")?m.plot=!0:L?Ky.update(m,L):m.calc=!0,T.set(y))}}for(c in u){var j=SF.applyContainerArrayChanges(e,a(r,c),u[c],m,a);j||(m.plot=!0)}for(var Q in b){M=Pf.getFromId(e,Q);var te=M&&M._constraintGroup;if(te){m.calc=!0;for(var ue in te)b[ue]||(Pf.getFromId(e,ue)._constraintShrinkable=!0)}}(Ebe(e)||t.height||t.width)&&(m.plot=!0);var ge=i.shapes;for(f=0;f1;)if(i.pop(),r=ts(t,i.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function NDt(e,t){for(var r=0;r[D,e._ev.listeners(D)]);a=Fa.newPlot(e,t,r,i).then(()=>{for(let[D,F]of k)F.forEach(P=>e.on(D,P));return Fa.react(e,t,r,i)})}else{e.data=t||[],zl.cleanData(e.data),e.layout=r||{},zl.cleanLayout(e.layout),VDt(e.data,e.layout,s,l),In.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,p=h.datarevision===void 0,d=h.transition,v=jDt(e,l,h,p,d),m=v.newDataRevision,g=HDt(e,s,f,p,d,m);if(Ebe(e)&&(v.layoutReplot=!0),g.calc||v.calc){e.calcdata=void 0;for(var w=Object.getOwnPropertyNames(h),_=0;_(c||e.emit("plotly_react",{config:i,data:t,layout:r}),e))}function HDt(e,t,r,i,n,a){var o=t.length===r.length;if(!n&&!o)return{fullReplot:!0,calc:!0};var s=Ky.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(p){var d=zF.getTraceValObject(u,p);return!u._module.animatable&&d.anim&&(d.anim=!1),d}var f={getValObject:c,flags:s,immutable:i,transition:n,newDataRevision:a,gd:e},h={};for(l=0;l=n.length?n[0]:n[u]:n}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(i._frameQueue.length!==0){for(;i._frameQueue.length;){var C=i._frameQueue.pop();C.onInterrupt&&C.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(C){if(C.length!==0){for(var k=0;ki._timeToNext&&d()};C()}var m=0;function g(C){return Array.isArray(n)?m>=n.length?C.transitionOpts=n[m]:C.transitionOpts=n[0]:C.transitionOpts=n,m++,C}var w,_,b=[],M=t==null,x=Array.isArray(t),A=!M&&!x&&di.isPlainObject(t);if(A)b.push({type:"object",data:g(di.extendFlat({},t))});else if(M||["string","number"].indexOf(typeof t)!==-1)for(w=0;w0&&EE)&&S.push(_);b=S}}b.length>0?h(b):(e.emit("plotly_animated"),u())})}function WDt(e,t,r){if(e=di.getGraphDiv(e),t==null)return Promise.resolve();if(!di.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var i,n,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(i=t.length-1;i>=0;i--)if(di.isPlainObject(t[i])){var h=t[i].name,p=(l[h]||f[h]||{}).name,d=t[i].name,v=l[p]||f[p];p&&d&&typeof d=="number"&&v&&u$T.index?-1:A.index=0;i--){if(n=c[i].frame,typeof n.name=="number"&&di.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;l[n.name="frame "+e._transitionData._counter++];);if(l[n.name]){for(a=0;a=0;r--)i=t[r],a.push({type:"delete",index:i}),o.unshift({type:"insert",index:i,value:n[i]});var s=In.modifyFrames,l=In.modifyFrames,u=[e,o],c=[e,a];return sh&&sh.add(e,s,u,l,c),In.modifyFrames(e,a)}function XDt(e){e=di.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return In.cleanPlot([],{},r,t),In.purge(e),c$.purge(e),t._container&&t._container.remove(),delete e._context,e}function ZDt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!di.equalDomRects(r,t._lastBBox)){var i=t._invTransform=di.inverseTransformMatrix(di.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(i[0][0]*i[0][0]+i[0][1]*i[0][1]+i[0][2]*i[0][2]),t._invScaleY=Math.sqrt(i[1][0]*i[1][0]+i[1][1]*i[1][1]+i[1][2]*i[1][2]),t._lastBBox=r}}function KDt(e){var t=CF.select(e),r=e._fullLayout;if(r._calcInverseTransform=ZDt,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};CF.selectAll("defs").each(function(){this.id&&(i[this.id.split("-")[1]]=1)}),r._uid=di.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(ADt.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var n=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=n.append("g").classed("imagelayer",!0),r._shapeLowerLayer=n.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Fa.animate=$Dt;Fa.addFrames=WDt;Fa.deleteFrames=YDt;Fa.addTraces=bbe;Fa.deleteTraces=_be;Fa.extendTraces=ybe;Fa.moveTraces=f$;Fa.prependTraces=xbe;Fa.newPlot=LDt;Fa._doPlot=EDt;Fa.purge=XDt;Fa.react=GDt;Fa.redraw=FDt;Fa.relayout=wM;Fa.restyle=LF;Fa.setPlotConfig=CDt;Fa.update=IF;Fa._guiRelayout=h$(wM);Fa._guiRestyle=h$(LF);Fa._guiUpdate=h$(IF);Fa._storeDirectGUIEdit=zDt});var em=W(Ed=>{"use strict";var JDt=xi();Ed.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};Ed.getRedrawFunc=function(e){return function(){JDt.getComponentMethod("colorbar","draw")(e)}};Ed.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Ed.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var kbe=window.URL||window.webkitURL;Ed.createObjectURL=function(e){return kbe.createObjectURL(e)};Ed.revokeObjectURL=function(e){return kbe.revokeObjectURL(e)};Ed.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=QDt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Ed.octetStream=function(e){document.location.href="data:application/octet-stream"+e};Ed.getPlotTitle=function(e){var i,n,a,o;var t=e._fullLayout;if(t){var r=(i=t.title)==null?void 0:i.text;return r===((n=t._dfltTitle)==null?void 0:n.plot)?void 0:r}return(o=(a=e.layout)==null?void 0:a.title)==null?void 0:o.text};Ed.getPlotSubtitle=function(e){var i,n,a,o,s,l;var t=e._fullLayout;if(t){var r=(n=(i=t.title)==null?void 0:i.subtitle)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.subtitle)?void 0:r}return(l=(s=(o=e.layout)==null?void 0:o.title)==null?void 0:s.subtitle)==null?void 0:l.text};function QDt(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n{"use strict";var p$=gi(),KNr=tt(),e7t=Qi(),t7t=ti(),JNr=(md(),Pt(gd)),d$=/"/g,Cb="TOBESTRIPPED",r7t=new RegExp(`("${Cb})|(${Cb}")|("${Cb})|(${Cb}")`,"g"),i7t=["&","&","&",""",""",""","'","'","'"],n7t=["<","<","<"],a7t=[">",">",">"];function o7t(e){let t=p$.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,i=>{let n=i.toLowerCase();return i7t.includes(n)?i:n7t.includes(n)?"<":a7t.includes(n)?">":i.includes("<")||i.includes(">")?"":t.html(i).text()});return t.remove(),r}function s7t(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Cbe.exports=function(t,r,i){var n=t._fullLayout,a=n._paper,o=n._toppaper,s=n.width,l=n.height,u;a.insert("rect",":first-child").call(e7t.setRect,0,0,s,l).call(t7t.fill,n.paper_bgcolor);var c=n._basePlotModules||[];for(u=0;u{"use strict";var l7t=tt(),u7t=ib().EventEmitter,AM=em();function c7t(e){var t=e.emitter||new u7t,r=new Promise(function(i,n){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,p=u*f,d=l.getContext("2d",{willReadFrequently:!0}),v=new a,m,g;s==="svg"||l7t.isSafari()?g=AM.encodeSVG(o):(m=AM.createBlob(o,"svg"),g=AM.createObjectURL(m)),l.width=h,l.height=p,v.onload=function(){var w;switch(m=null,AM.revokeObjectURL(g),s!=="svg"&&d.drawImage(v,0,0,h,p),s){case"jpeg":w=l.toDataURL("image/jpeg");break;case"png":w=l.toDataURL("image/png");break;case"webp":w=l.toDataURL("image/webp");break;case"svg":w=g;break;default:var _="Image format is not jpeg, png, svg or webp.";if(n(new Error(_)),!e.promise)return t.emit("error",_)}i(w),e.promise||t.emit("success",w)},v.onerror=function(w){if(m=null,AM.revokeObjectURL(g),n(w),!e.promise)return t.emit("error",w)},v.src=g});return e.promise?r:t}Dbe.exports=c7t});var g$=W((tUr,Pbe)=>{"use strict";var Fbe=hn(),Lbe=qF(),f7t=Qo(),D1=tt(),MM=em(),h7t=OF(),d7t=NF(),p7t=N6().version,v$=(DV(),Pt(CV)).default;function v7t(e,t){t=t||{};var r,i,n,a;D1.isPlainObject(e)?(r=e.data||[],i=e.layout||{},n=e.config||{},a={}):(e=D1.getGraphDiv(e),r=D1.extendDeep([],e.data),i=D1.extendDeep({},e.layout),n=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||D1.validate(t[x],v$[x])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+D1.join2(v$.format.values,", "," or ")+".");var s={};function l(x,A){return D1.coerce(t,s,v$,x,A)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),p=l("setBackground"),d=l("imageDataOnly"),v=document.createElement("div");v.style.position="absolute",v.style.left="-5000px",document.body.appendChild(v);var m=D1.extendFlat({},i);c?m.width=c:t.width===null&&Fbe(a.width)&&(m.width=a.width),f?m.height=f:t.height===null&&Fbe(a.height)&&(m.height=a.height);var g=D1.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:p}),w=MM.getRedrawFunc(v);function _(){return new Promise(function(x){setTimeout(x,MM.getDelay(v._fullLayout))})}function b(){return new Promise(function(x,A){var T=h7t(v,u,h),y=v._fullLayout.width,E=v._fullLayout.height;function S(){Lbe.purge(v),document.body.removeChild(v)}if(u==="full-json"){var C=f7t.graphJson(v,!1,"object",!0,!0);return C.version=p7t,C=JSON.stringify(C),S(),x(d?C:MM.encodeJSON(C))}if(S(),u==="svg")return x(d?T:MM.encodeSVG(T));var k=document.createElement("canvas");k.id=D1.randstr(),d7t({format:u,width:y,height:E,scale:h,canvas:k,svg:T,promise:!0}).then(x).catch(A)})}function M(x){return d?x.replace(MM.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,A){Lbe.newPlot(v,r,m,g).then(w).then(_).then(b).then(function(T){x(M(T))}).catch(function(T){A(T)})})}Pbe.exports=v7t});var zbe=W((rUr,Rbe)=>{"use strict";var kd=tt(),g7t=Qo(),m7t=Mw(),y7t=_y().dfltConfig,Qp=kd.isPlainObject,Fb=Array.isArray,m$=kd.isArrayOrTypedArray;Rbe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var i=m7t.get(),n=[],a={_context:kd.extendFlat({},y7t)},o,s;Fb(t)?(a.data=kd.extendDeep([],t),o=t):(a.data=[],o=[],n.push(Uu("array","data"))),Qp(r)?(a.layout=kd.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&n.push(Uu("object","layout"))),g7t.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&i.push(Uu("unused",n,u.concat(f.length)));var g=f.length,w=Array.isArray(m);w&&(g=Math.min(g,m.length));var _,b,M,x,A;if(h.dimensions===2)for(b=0;bf[b].length&&i.push(Uu("unused",n,u.concat(b,f[b].length)));var T=f[b].length;for(_=0;_<(w?Math.min(T,m[b].length):T);_++)M=w?m[b][_]:m,x=c[b][_],A=f[b][_],kd.validate(x,M)?A!==x&&A!==+x&&i.push(Uu("dynamic",n,u.concat(b,_),x,A)):i.push(Uu("value",n,u.concat(b,_),x))}else i.push(Uu("array",n,u.concat(b),c[b]));else for(b=0;b{"use strict";var M7t=tt(),VF=em();function S7t(e,t,r){var i=document.createElement("a"),n="download"in i,a=new Promise(function(o,s){var l,u;if(n)return l=VF.createBlob(e,r),u=VF.createObjectURL(l),i.href=u,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),VF.revokeObjectURL(u),l=null,o(t);if(M7t.isSafari()){var c=r==="svg"?",":";base64,";return VF.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}Bbe.exports=S7t});var y$=W((nUr,Vbe)=>{"use strict";var GF=tt(),Obe=ao(),E7t=g$(),k7t=qbe(),Nbe=em(),Ube=40;function C7t(e,t){var r;return GF.isPlainObject(e)||(r=GF.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(i,n){r&&r._snapshotInProgress&&n(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var a=E7t(e,t),o=t.filename||e.fn;if(!o){let l=Nbe.getPlotTitle(e);if(l&&!Obe.matchTex(l))o=GF.slugify(l,Ube);else{let u=Nbe.getPlotSubtitle(e);u&&!Obe.matchTex(u)&&(o=GF.slugify(u,Ube))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),a.then(function(l){return r&&(r._snapshotInProgress=!1),k7t(l,s,t.format)}).then(function(l){i(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),n(l)})})}Vbe.exports=C7t});var Wbe=W(x$=>{"use strict";var $h=tt(),Wh=$h.isPlainObject,Gbe=Mw(),Hbe=Qo(),D7t=Ja(),jbe=Ra(),$be=_y().dfltConfig;x$.makeTemplate=function(e){e=$h.isPlainObject(e)?e:$h.getGraphDiv(e),e=$h.extendDeep({_context:$be},{data:e.data,layout:e.layout}),Hbe.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach(function(p){var d={};SM(p,d,L7t.bind(null,p));var v=$h.coerce(p,{},D7t,"type"),m=i.data[v];m||(m=i.data[v]=[]),m.push(d)}),SM(r,i.layout,F7t.bind(null,r)),delete i.layout.template;var n=r.template;if(Wh(n)){var a=n.layout,o,s,l,u,c,f;Wh(a)&&HF(a,i.layout);var h=n.data;if(Wh(h)){for(s in i.data)if(l=h[s],Array.isArray(l)){for(c=i.data[s],f=c.length,u=l.length,o=0;og?o.push({code:"unused",traceType:p,templateCount:m,dataCount:g}):g>m&&o.push({code:"reused",traceType:p,templateCount:m,dataCount:g})}}function w(_,b){for(var M in _)if(M.charAt(0)!=="_"){var x=_[M],A=Cd(_,M,b);Wh(x)?(Array.isArray(_)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:A,templateitemname:x.templateitemname}),w(x,A)):Array.isArray(x)&&P7t(x)&&w(x,A)}}if(w({data:l,layout:s},""),o.length)return o.map(I7t)};function P7t(e){for(var t=0;t{"use strict";var bu=qF();Ss._doPlot=bu._doPlot;Ss.newPlot=bu.newPlot;Ss.restyle=bu.restyle;Ss.relayout=bu.relayout;Ss.redraw=bu.redraw;Ss.update=bu.update;Ss._guiRestyle=bu._guiRestyle;Ss._guiRelayout=bu._guiRelayout;Ss._guiUpdate=bu._guiUpdate;Ss._storeDirectGUIEdit=bu._storeDirectGUIEdit;Ss.react=bu.react;Ss.extendTraces=bu.extendTraces;Ss.prependTraces=bu.prependTraces;Ss.addTraces=bu.addTraces;Ss.deleteTraces=bu.deleteTraces;Ss.moveTraces=bu.moveTraces;Ss.purge=bu.purge;Ss.addFrames=bu.addFrames;Ss.deleteFrames=bu.deleteFrames;Ss.animate=bu.animate;Ss.setPlotConfig=bu.setPlotConfig;var R7t=hA().getGraphDiv,z7t=rF().eraseActiveShape;Ss.deleteActiveShape=function(e){return z7t(R7t(e))};Ss.toImage=g$();Ss.validate=zbe();Ss.downloadImage=y$();var Ybe=Wbe();Ss.makeTemplate=Ybe.makeTemplate;Ss.validateTemplate=Ybe.validateTemplate});var Lb=W((sUr,Zbe)=>{"use strict";var b$=tt(),B7t=xi();Zbe.exports=function(t,r,i,n){var a=n("x"),o=n("y"),s,l=B7t.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],i),a){var u=b$.minRowLength(a);o?s=Math.min(u,b$.minRowLength(o)):(s=u,n("y0"),n("dy"))}else{if(!o)return 0;s=b$.minRowLength(o),n("x0"),n("dx")}return r._length=s,s}});var ev=W((lUr,Qbe)=>{"use strict";var Kbe=tt().dateTick0,q7t=(ra(),Pt(ia)),O7t=q7t.ONEWEEK;function Jbe(e,t){return e%O7t===0?Kbe(t,1):Kbe(t,0)}Qbe.exports=function(t,r,i,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",Jbe(o,r.xcalendar)),n("xperiodalignment"))}if(a.y){var s=n("yperiod");s&&(n("yperiod0",Jbe(s,r.ycalendar)),n("yperiodalignment"))}}});var r_e=W((uUr,t_e)=>{"use strict";var e_e=["orientation","groupnorm","stackgaps"];t_e.exports=function(t,r,i,n){var a=i._scatterStackOpts,o=n("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var i_e=ti(),n_e=Sc().hasColorscale,a_e=Bu(),N7t=Wo();o_e.exports=function(t,r,i,n,a,o={}){var s=N7t.isBubble(t),l=(t.line||{}).color,u;if(l&&(i=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",i),n_e(t,"marker")&&a_e(t,r,n,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=i_e.background:u=i_e.defaultLine,a("marker.line.color",u),n_e(t,"marker.line")&&a_e(t,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0),o.noLineDash||a("marker.line.dash")),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var tv=W((fUr,s_e)=>{"use strict";var U7t=tt().isArrayOrTypedArray,V7t=Sc().hasColorscale,G7t=Bu();s_e.exports=function(t,r,i,n,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",i),V7t(t,"line"))G7t(t,r,n,a,{prefix:"line.",cLetter:"c"});else{var l=(U7t(s)?!1:s)||i;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var Jw=W((hUr,l_e)=>{"use strict";l_e.exports=function(t,r,i){var n=i("line.shape");n==="spline"&&i("line.smoothing")}});var rv=W((dUr,u_e)=>{"use strict";var H7t=tt();u_e.exports=function(e,t,r,i,n){n=n||{},i("textposition"),H7t.coerceFont(i,"textfont",n.font||r.font,n),n.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}});var F1=W((pUr,f_e)=>{"use strict";var $F=ti(),c_e=tt().isArrayOrTypedArray;function j7t(e){for(var t=$F.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var h_e=tt(),$7t=xi(),W7t=Ws(),Y7t=(k1(),Pt(E1)),Qw=Wo(),X7t=Lb(),Z7t=ev(),K7t=r_e(),J7t=Dd(),Q7t=tv(),d_e=Jw(),eFt=rv(),tFt=F1(),rFt=tt().coercePattern;p_e.exports=function(t,r,i,n){function a(p,d){return h_e.coerce(t,r,W7t,p,d)}var o=X7t(t,r,n,a);if(o||(r.visible=!1),!!r.visible){Z7t(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=K7t(t,r,n,a);n.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var iFt=kb().getAxisGroup;g_e.exports=function(t,r,i,n,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=iFt(i,s)+o,u=i._alignmentOpts||{},c=n("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var p=n("offsetgroup")||"",d=h.offsetGroups,v=d[p];r._offsetIndex=0,(a!=="group"||p)&&(v||(v=d[p]={offsetIndex:Object.keys(d).length}),r._offsetIndex=v.offsetIndex)}});var _$=W((mUr,m_e)=>{"use strict";var nFt=tt(),aFt=Pb(),oFt=Ws();m_e.exports=function(t,r){var i,n,a,o=r.scattermode;function s(h){return nFt.coerce(n._input,n,oFt,h)}if(r.scattermode==="group")for(a=0;a=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var x_e=W((yUr,y_e)=>{"use strict";var sFt=tt(),lFt=UD();y_e.exports=function(e,t){function r(n,a){return sFt.coerce(e,t,lFt,n,a)}var i=t.barmode==="group";t.scattermode==="group"&&r("scattergap",i?t.bargap:.2)}});var iv=W((xUr,__e)=>{"use strict";var uFt=hn(),b_e=tt(),cFt=b_e.dateTime2ms,WF=b_e.incrementMonth,fFt=(ra(),Pt(ia)),hFt=fFt.ONEAVGMONTH;__e.exports=function(t,r,i,n){if(r.type!=="date")return{vals:n};var a=t[i+"periodalignment"];if(!a)return{vals:n};var o=t[i+"period"],s;if(uFt(o)){if(o=+o,o<=0)return{vals:n}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:n}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[i+"period0"],p=cFt(h,u)||0,d=[],v=[],m=[],g=n.length,w=0;w_;)x=WF(x,-s,u);for(;x<=_;)x=WF(x,s,u);M=WF(x,-s,u)}else{for(b=Math.round((_-p)/o),x=p+b*o;x>_;)x-=o;for(;x<=_;)x+=o;M=x-o}d[w]=c?M:f?x:(M+x)/2,v[w]=M,m[w]=x}return{vals:d,starts:v,ends:m}}});var Fd=W((bUr,T_e)=>{"use strict";var w$=Sc().hasColorscale,T$=rf(),w_e=Wo();T_e.exports=function(t,r){w_e.hasLines(r)&&w$(r,"line")&&T$(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),w_e.hasMarkers(r)&&(w$(r,"marker")&&T$(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),w$(r,"marker.line")&&T$(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var L1=W((_Ur,A_e)=>{"use strict";var ol=tt();A_e.exports=function(t,r){for(var i=0;i{"use strict";var M_e=tt();S_e.exports=function(t,r){M_e.isArrayOrTypedArray(r.selectedpoints)&&M_e.tagSelected(t,r)}});var Ld=W((TUr,P_e)=>{"use strict";var E_e=hn(),M$=tt(),EM=Yi(),k_e=iv(),A$=(ra(),Pt(ia)).BADNUM,S$=Wo(),dFt=Fd(),pFt=L1(),vFt=C0();function gFt(e,t){var r=e._fullLayout,i=t._xA=EM.getFromId(e,t.xaxis||"x","x"),n=t._yA=EM.getFromId(e,t.yaxis||"y","y"),a=i.makeCalcdata(t,"x"),o=n.makeCalcdata(t,"y"),s=k_e(t,i,"x",a),l=k_e(t,n,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),p=t.ids,d=E$(t,r,i,n),v=!1,m,g,w,_,b,M;F_e(r,t);var x="x",A="y",T;if(d)M$.pushUnique(d.traceIndices,t.index),m=d.orientation==="v",m?(A="s",T="x"):(x="s",T="y"),b=d.stackgaps==="interpolate";else{var y=D_e(t,f);C_e(e,t,i,n,u,c,y)}var E=!!t.xperiodalignment,S=!!t.yperiodalignment;for(g=0;gg&&h[_].gap;)_--;for(M=h[_].s,w=h.length-1;w>_;w--)h[w].s=M;for(;g<_;)if(g++,h[g].gap){for(w=g+1;h[w].gap;)w++;for(var F=h[g-1][T],P=h[g-1].s,R=(h[w].s-P)/(h[w][T]-F);g{"use strict";I_e.exports=YF;var mFt=tt().distinctVals;function YF(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),n=[],a=0;ayFt,eventDataKeys:()=>xFt});var yFt,xFt,Qy=Ci(()=>{"use strict";yFt=3,xFt=["value","label"]});var Ib=W((MUr,O_e)=>{"use strict";var Pd=hn(),{isArrayOrTypedArray:tm}=tt(),{BADNUM:e5}=(ra(),Pt(ia)),bFt=xi(),kM=Yi(),{getAxisGroup:_Ft}=kb(),XF=R_e(),{TEXTPAD:wFt}=(Qy(),Pt(Jy)),{LINE_SPACING:TFt}=(Jl(),Pt(Kl)),{BR_TAG_ALL:AFt}=ao();function MFt(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!Pd(s))}for(var c=0;ci(a))):i(e.text);let n=e.outsidetextfont.size*TFt*r+wFt;return{ppadplus:t.some(a=>a.s<0)?n:0,ppadminus:t.some(a=>a.s>=0)?n:0}}return{ppadplus:void 0,ppadminus:void 0}}function RFt(e,t,r,i){for(var n=t5(i),a=0;a{"use strict";var N_e=Ld(),U_e=Ib().setGroupPositions;function BFt(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;uy[c]&&c{"use strict";var OFt=Qi(),W_e=(ra(),Pt(ia)),CM=W_e.BADNUM,Y_e=W_e.LOG_CLIP,H_e=Y_e+.5,j_e=Y_e-.5,ZF=tt(),NFt=ZF.segmentsIntersect,$_e=ZF.constrain,I$=(k1(),Pt(E1));X_e.exports=function(t,r){var i=r.trace||{},n=r.xaxis,a=r.yaxis,o=n.type==="log",s=a.type==="log",l=n._length,u=a._length,c=r.backoff,f=i.marker,h=r.connectGaps,p=r.baseTolerance,d=r.shape,v=d==="linear",m=i.fill&&i.fill!=="none",g=[],w=I$.minTolerance,_=t.length,b=new Array(_),M=0,x,A,T,y,E,S,C,k,D,F,P,R,L,I,B,O;function $(Ke){var bt=t[Ke];if(!bt)return!1;var pt=r.linearized?n.l2p(bt.x):n.c2p(bt.x),Oe=r.linearized?a.l2p(bt.y):a.c2p(bt.y);if(pt===CM){if(o&&(pt=n.c2p(bt.x,!0)),pt===CM)return!1;s&&Oe===CM&&(pt*=Math.abs(n._m*u*(n._m>0?H_e:j_e)/(a._m*l*(a._m>0?H_e:j_e)))),pt*=1e3}if(Oe===CM){if(s&&(Oe=a.c2p(bt.y,!0)),Oe===CM)return!1;Oe*=1e3}return[pt,Oe]}function X(Ke,bt,pt,Oe){var Ue=pt-Ke,je=Oe-bt,$e=.5-Ke,Ie=.5-bt,Ve=Ue*Ue+je*je,st=Ue*$e+je*Ie;if(st>0&&st1||Math.abs($e.y-pt[0][1])>1)&&($e=[$e.x,$e.y],Oe&&J($e,Ke)Y||Ke[1]j)return[$_e(Ke[0],V,Y),$_e(Ke[1],H,j)]}function be(Ke,bt){if(Ke[0]===bt[0]&&(Ke[0]===V||Ke[0]===Y)||Ke[1]===bt[1]&&(Ke[1]===H||Ke[1]===j))return!0}function fe(Ke,bt){var pt=[],Oe=Se(Ke),Ue=Se(bt);return Oe&&Ue&&be(Oe,Ue)||(Oe&&pt.push(Oe),Ue&&pt.push(Ue)),pt}function ee(Ke,bt,pt){return function(Oe,Ue){var je=Se(Oe),$e=Se(Ue),Ie=[];if(je&&$e&&be(je,$e))return Ie;je&&Ie.push(je),$e&&Ie.push($e);var Ve=2*ZF.constrain((Oe[Ke]+Ue[Ke])/2,bt,pt)-((je||Oe)[Ke]+($e||Ue)[Ke]);if(Ve){var st;je&&$e?st=Ve>0==je[Ke]>$e[Ke]?je:$e:st=je||$e,st[Ke]+=Ve}return Ie}}var ae;d==="linear"||d==="spline"?ae=oe:d==="hv"||d==="vh"?ae=fe:d==="hvh"?ae=ee(0,V,Y):d==="vhv"&&(ae=ee(1,H,j));function _e(Ke,bt){var pt=bt[0]-Ke[0],Oe=(bt[1]-Ke[1])/pt,Ue=(Ke[1]*bt[0]-bt[1]*Ke[0])/pt;return Ue>0?[Oe>0?V:Y,j]:[Oe>0?Y:V,H]}function re(Ke){var bt=Ke[0],pt=Ke[1],Oe=bt===b[M-1][0],Ue=pt===b[M-1][1];if(!(Oe&&Ue))if(M>1){var je=bt===b[M-2][0],$e=pt===b[M-2][1];Oe&&(bt===V||bt===Y)&&je?$e?M--:b[M-1]=Ke:Ue&&(pt===H||pt===j)&&$e?je?M--:b[M-1]=Ke:b[M++]=Ke}else b[M++]=Ke}function pe(Ke){b[M-1][0]!==Ke[0]&&b[M-1][1]!==Ke[1]&&re([ge,Ee]),re(Ke),xe=null,ge=Ee=0}var Te=ZF.isArrayOrTypedArray(f);function Ce(Ke){if(Ke&&c&&(Ke.i=x,Ke.d=t,Ke.trace=i,Ke.marker=Te?f[Ke.i]:f,Ke.backoff=c),K=Ke[0]/l,G=Ke[1]/u,te=Ke[0]Y?Y:0,ue=Ke[1]j?j:0,te||ue){if(!M)b[M++]=[te||Ke[0],ue||Ke[1]];else if(xe){var bt=ae(xe,Ke);bt.length>1&&(pe(bt[0]),b[M++]=bt[1])}else ce=ae(b[M-1],Ke)[0],b[M++]=ce;var pt=b[M-1];te&&ue&&(pt[0]!==te||pt[1]!==ue)?(xe&&(ge!==te&&Ee!==ue?re(ge&&Ee?_e(xe,Ke):[ge||te,Ee||ue]):ge&&Ee&&re([ge,Ee])),re([te,ue])):ge-te&&Ee-ue&&re([te||ge,ue||Ee]),xe=Ke,ge=te,Ee=ue}else xe&&pe(ae(xe,Ke)[0]),b[M++]=Ke}for(x=0;x<_;x++)if(A=$(x),!!A){for(M=0,xe=null,Ce(A),x++;x<_;x++){if(y=$(x),!y){if(h)continue;break}if(!v||!r.simplify){Ce(y);continue}var ze=$(x+1);if(F=J(y,A),!(!(m&&(M===0||M===_-1))&&Fq(S,ze))break;T=S,L=D[0]*k[0]+D[1]*k[1],L>P?(P=L,y=S,C=!1):L=t.length||!S)break;Ce(S),A=S}}xe&&re([ge||xe[0],Ee||xe[1]]),g.push(b.slice(0,M))}var we=d.slice(d.length-1);if(c&&we!=="h"&&we!=="v"){for(var me=!1,Le=-1,Ne=[],Je=0;Je{"use strict";var Z_e={tonextx:1,tonexty:1,tonext:1};K_e.exports=function(t,r,i){var n,a,o,s,l,u={},c=!1,f=-1,h=0,p=-1;for(a=0;a=0?l=p:(l=p=h,h++),l{"use strict";var nv=gi(),UFt=xi(),DM=tt(),r5=DM.ensureSingle,Q_e=DM.identity,yl=Qi(),i5=Wo(),VFt=R$(),GFt=z$(),KF=nM().tester;e3e.exports=function(t,r,i,n,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=GFt(t,r,i);if(s=n.selectAll("g.trace").data(f,function(p){return p[0].trace.uid}),s.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),s.order(),HFt(t,s,r),c){o&&(l=o());var h=nv.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){n.selectAll("g.trace").each(function(p,d){J_e(t,d,r,p,f,this,a)})})}else s.each(function(p,d){J_e(t,d,r,p,f,this,a)});u&&s.exit().remove(),n.selectAll("path:not([d])").remove()};function HFt(e,t,r){t.each(function(i){var n=r5(nv.select(this),"g","fills");yl.setClipUrl(n,r.layerClipId,e);var a=i[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=n.selectAll("g").data(o,Q_e);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){a[l]=r5(nv.select(this),"path","js-fill")})})}function J_e(e,t,r,i,n,a,o){var s=e._context.staticPlot,l;jFt(e,t,r,i,n);var u=!!o&&o.duration>0;function c(ee){return u?ee.transition():ee}var f=r.xaxis,h=r.yaxis,p=i[0].trace,d=p.line,v=nv.select(a),m=r5(v,"g","errorbars"),g=r5(v,"g","lines"),w=r5(v,"g","points"),_=r5(v,"g","text");if(UFt.getComponentMethod("errorbars","plot")(e,m,r,o),p.visible!==!0)return;c(v).style("opacity",p.opacity);var b,M,x=p.fill.charAt(p.fill.length-1);x!=="x"&&x!=="y"&&(x="");var A,T;x==="y"?(A=1,T=h.c2p(0,!0)):x==="x"&&(A=0,T=f.c2p(0,!0)),i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=v;var y="",E=[],S=p._prevtrace,C=null,k=null;S&&(y=S._prevRevpath||"",M=S._nextFill,E=S._ownPolygons,C=S._fillsegments,k=S._fillElement);var D,F,P="",R="",L,I,B,O,$,X,K=[];p._polygons=[];var G=[],q=[],J=DM.noop;if(b=p._ownFill,i5.hasLines(p)||p.fill!=="none"){M&&M.datum(i),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(L=yl.steps(d.shape),I=yl.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?L=I=function(ee){var ae=ee[ee.length-1];return ee.length>1&&ee[0][0]===ae[0]&&ee[0][1]===ae[1]?yl.smoothclosed(ee.slice(1),d.smoothing):yl.smoothopen(ee,d.smoothing)}:L=I=function(ee){return"M"+ee.join("L")},B=function(ee){return I(ee.reverse())},q=VFt(i,{xaxis:f,yaxis:h,trace:p,connectGaps:p.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,backoff:d.backoff,simplify:d.simplify,fill:p.fill}),G=new Array(q.length);var N=0;for(l=0;l=s[0]&&v.x<=s[1]&&v.y>=l[0]&&v.y<=l[1]}),h=Math.ceil(f.length/c),p=0;n.forEach(function(v,m){var g=v[0].trace;i5.hasMarkers(g)&&g.marker.maxdisplayed>0&&m{"use strict";t3e.exports={container:"marker",min:"cmin",max:"cmax"}});var QF=W((FUr,r3e)=>{"use strict";var JF=Yi();r3e.exports=function(t,r,i){var n={},a={_fullLayout:i},o=JF.getFromTrace(a,r,"x"),s=JF.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),n.xLabel=JF.tickText(o,o.c2l(l),!0).text,n.yLabel=JF.tickText(s,s.c2l(u),!0).text,n}});var lh=W((LUr,i3e)=>{"use strict";var B$=gi(),a5=Qi(),$Ft=xi();function WFt(e){var t=B$.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var i=B$.select(this),n=r.trace||r[0].trace;q$(i,n,e)}),t.selectAll("g.text").each(function(r){var i=B$.select(this),n=r.trace||r[0].trace;O$(i,n,e)}),t.selectAll("g.trace path.js-line").call(a5.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(a5.fillGroupStyle,e,!1),$Ft.getComponentMethod("errorbars","style")(t)}function q$(e,t,r){a5.pointStyle(e.selectAll("path.point"),t,r)}function O$(e,t,r){a5.textPointStyle(e.selectAll("text"),t,r)}function YFt(e,t,r){var i=t[0].trace;i.selectedpoints?(a5.selectedPointStyle(r.selectAll("path.point"),i),a5.selectedTextStyle(r.selectAll("text"),i)):(q$(r,i,e),O$(r,i,e))}i3e.exports={style:WFt,stylePoints:q$,styleText:O$,styleOnSelect:YFt}});var s5=W((PUr,n3e)=>{"use strict";var o5=ti(),XFt=Wo();n3e.exports=function(t,r){var i,n;if(t.mode==="lines")return i=t.line.color,i&&o5.opacity(i)?i:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var a=r.mcc||r.mc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return n=a&&o5.opacity(a)?a:o&&o5.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",n?o5.opacity(n)<.3?o5.addOpacity(n,.3):n:(i=(t.line||{}).color,i&&o5.opacity(i)&&XFt.hasLines(t)&&t.line.width?i:t.fillcolor)}});var l5=W((IUr,o3e)=>{"use strict";var eL=tt(),a3e=Is(),ZFt=xi(),KFt=s5(),N$=ti(),JFt=eL.fillText;o3e.exports=function(t,r,i,n){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(i),f=[u,c],h=o.hoveron||"",p=o.mode.indexOf("markers")!==-1?3:.5,d=!!o.xperiodalignment,v=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var m=function(R){if(d){var L=s.c2p(R.xStart),I=s.c2p(R.xEnd);return u>=Math.min(L,I)&&u<=Math.max(L,I)?0:1/0}var B=Math.max(3,R.mrc||0),O=1-1/B,$=Math.abs(s.c2p(R.x)-u);return $=Math.min(L,I)&&c<=Math.max(L,I)?0:1/0}var B=Math.max(3,R.mrc||0),O=1-1/B,$=Math.abs(l.c2p(R.y)-c);return $K!=j>=K&&(V=J[q-1][0],Y=J[q][0],j-H&&(N=V+(Y-V)*(K-H)/(j-H),B=Math.min(B,N),O=Math.max(O,N)));return B=Math.max(B,0),O=Math.min(O,s._length),{x0:B,x1:O,y0:K,y1:K}}if(h.indexOf("fills")!==-1&&o._fillElement){var D=C(o._fillElement)&&!C(o._fillExclusionElement);if(D){var F=k(o._polygons);F===null&&(F={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var P=N$.defaultLine;return N$.opacity(o.fillcolor)?P=o.fillcolor:N$.opacity((o.line||{}).color)&&(P=o.line.color),eL.extendFlat(t,{distance:t.maxHoverDistance,x0:F.x0,x1:F.x1,y0:F.y0,y1:F.y1,color:P,hovertemplate:!1}),delete t.index,o.text&&!eL.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var Rb=W((RUr,l3e)=>{"use strict";var s3e=Wo();l3e.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l,u,c,f,h=s.mode&&!s3e.hasMarkers(s)&&!s3e.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";u3e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var V$=W((BUr,d3e)=>{"use strict";var tL=xi().traceIs,U$=Rw();d3e.exports=function(t,r,i,n){i("autotypenumbers",n.autotypenumbersDflt);var a=i("type",(n.splomStash||{}).type);a==="-"&&(QFt(r,n.data),r.type==="-"?r.type="linear":t.type=r.type)};function QFt(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),n;r.indexOf("scene")!==-1&&(r=i);var a=eLt(t,r,i);if(a){if(a.type==="histogram"&&i==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=i+"calendar",s=a[o],l={noMultiCategory:!tL(a,"cartesian")||tL(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&i==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,h3e(a,i)){var u=f3e(a),c=[];for(n=0;n0&&(n["_"+r+"axes"]||{})[t])return n;if((n[r+"axis"]||r)===t){if(h3e(n,r))return n;if((n[r]||[]).length||n[r+"0"])return n}}}function f3e(e){return{v:"x",h:"y"}[e.orientation||"v"]}function h3e(e,t){var r=f3e(e),i=tL(e,"box-violin");return i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var rL=W((qUr,p3e)=>{"use strict";var tLt=Tc().isTypedArraySpec;function rLt(e,t){var r=t.dataAttr||e._id.charAt(0),i={},n,a,o;if(t.axData)n=t.axData;else for(n=[],a=0;a0||tLt(a),s;o&&(s="array");var l=i("categoryorder",s),u;l==="array"&&(u=i("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=rLt(r,n).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var FM=W((OUr,g3e)=>{"use strict";var v3e=ti(),iLt=Yl(),nLt=tt();g3e.exports=function(t,r,i,n){n=n||{};var a=n.dfltColor;function o(T,y){return nLt.coerce2(t,r,n.attributes,T,y)}var s=o("linecolor",a),l=o("linewidth"),u=i("showline",n.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=v3e.mix(a,n.bgColor,n.blend||iLt.lightFraction),f=o("gridcolor",c),h=o("gridwidth"),p=o("griddash"),d=i("showgrid",n.showGrid||!!f||!!h||!!p);if(d||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),n.hasMinor){var v=v3e.mix(r.gridcolor,n.bgColor,67),m=o("minor.gridcolor",v),g=o("minor.gridwidth",r.gridwidth||1),w=o("minor.griddash",r.griddash||"solid"),_=i("minor.showgrid",!!m||!!g||!!w);_||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!n.noZeroLine){var b=o("zerolinelayer"),M=o("zerolinecolor",a),x=o("zerolinewidth"),A=i("zeroline",n.showGrid||!!M||!!x);A||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var PM=W((NUr,w3e)=>{"use strict";var m3e=hn(),aLt=xi(),LM=tt(),oLt=Ra(),sLt=tf(),G$=ac(),y3e=ub(),x3e=Cw(),lLt=Py(),uLt=Iy(),cLt=rL(),fLt=FM(),hLt=LH(),b3e=g1(),iL=(Zl(),Pt(Xl)).WEEKDAY_PATTERN,dLt=(Zl(),Pt(Xl)).HOUR_PATTERN;w3e.exports=function(t,r,i,n,a){var o=n.letter,s=n.font||{},l=n.splomStash||{},u=i("visible",!n.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var p=aLt.getComponentMethod("calendars","handleDefaults");p(t,r,"calendar",n.calendar),n.noTicklabelmode||(h=i("ticklabelmode"))}!n.noTicklabelindex&&(f==="date"||f==="linear")&&i("ticklabelindex");var d="";(!n.noTicklabelposition||f==="multicategory")&&(d=LM.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||i("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),b3e(r,a),hLt(t,r,i,n),cLt(t,r,i,n),n.noHover||(f!=="category"&&i("hoverformat"),n.noUnifiedhovertitle||i("unifiedhovertitle.text"));var v=i("color"),m=v!==G$.color.dflt?v:s.color,g=l.label||a._dfltTitle[o];if(uLt(t,r,i,f,n),!u)return r;i("title.text",g),LM.coerceFont(i,"title.font",s,{overrideDflt:{size:LM.bigFont(s.size),color:m}}),y3e(t,r,i,f);var w=n.hasMinor;if(w&&(oLt.newContainer(r,"minor"),y3e(t,r,i,f,{isMinor:!0})),lLt(t,r,i,f,n),x3e(t,r,i,n),w){var _=n.isMinor;n.isMinor=!0,x3e(t,r,i,n),n.isMinor=_}fLt(t,r,i,{dfltColor:v,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:w,attributes:G$}),w&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&i("mirror");var b=f==="multicategory";if(!n.noTickson&&(f==="category"||b)&&(r.ticks||r.showgrid)&&(b?(i("tickson","boundaries"),delete r.ticklabelposition):i("tickson")),b){var M=i("showdividers");M&&(i("dividercolor"),i("dividerwidth"))}if(f==="date")if(sLt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:pLt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=_3e(a[s]),l){o=iL;break}}var u=i("pattern",o);if(u===iL)for(s=0;s<2;s++)l=_3e(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case iL:if(!m3e(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case dLt:if(!m3e(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]{"use strict";var gLt=hn(),nL=tt();T3e.exports=function(t,r,i,n){var a=n.counterAxes||[],o=n.overlayableAxes||[],s=n.letter,l=n.grid,u=n.overlayingDomain,c,f,h,p,d,v;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],p=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(gLt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),p=p||0,d=0,v=!1;var m=nL.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),g=nL.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(m==="free"){if(s==="y"){var w=i("autoshift");w&&(p=g==="left"?u[0]:u[1],v=r.automargin?r.automargin:!0,d=g==="left"?-3:3),i("shift",d)}i("position",p)}i("automargin",v);var _=!1;if(o.length&&(_=nL.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!_){var b=i("domain",f);b[0]>b[1]-1/4096&&(r.domain=f),nL.noneOrAll(t.domain,r.domain,f),s==="x"?(i("domainpad.left"),i("domainpad.right")):(i("domainpad.top"),i("domainpad.bottom")),r.tickmode==="sync"&&(r.tickmode="auto")}return i("layer"),r}});var L3e=W((VUr,F3e)=>{"use strict";var zb=tt(),A3e=ti(),mLt=ah().isUnifiedHover,yLt=aj(),M3e=Ra(),xLt=pw(),S3e=ac(),bLt=V$(),E3e=PM(),_Lt=kb(),k3e=aL(),j$=Ls(),P1=j$.id2name,C3e=j$.name2id,wLt=(Zl(),Pt(Xl)).AX_ID_PATTERN,D3e=xi(),oL=D3e.traceIs,H$=D3e.getComponentMethod;function sL(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}F3e.exports=function(t,r,i){var n=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},p={},d={},v,m;for(v=0;v{"use strict";var TLt=gi(),P3e=xi(),lL=tt(),D0=Qi(),uL=Yi();I3e.exports=function(t,r,i,n){var a=t._fullLayout;if(r.length===0){uL.redrawComponents(t);return}function o(m){var g=m.xaxis,w=m.yaxis;a._defs.select("#"+m.clipId+"> rect").call(D0.setTranslate,0,0).call(D0.setScale,1,1),m.plot.call(D0.setTranslate,g._offset,w._offset).call(D0.setScale,1,1);var _=m.plot.selectAll(".scatterlayer .trace");_.selectAll(".point").call(D0.setPointGroupScale,1,1),_.selectAll(".textpoint").call(D0.setTextPointsScale,1,1),_.call(D0.hideOutsideRangePoints,m)}function s(m,g){var w=m.plotinfo,_=w.xaxis,b=w.yaxis,M=_._length,x=b._length,A=!!m.xr1,T=!!m.yr1,y=[];if(A){var E=lL.simpleMap(m.xr0,_.r2l),S=lL.simpleMap(m.xr1,_.r2l),C=E[1]-E[0],k=S[1]-S[0];y[0]=(E[0]*(1-g)+g*S[0]-E[0])/(E[1]-E[0])*M,y[2]=M*(1-g+g*k/C),_.range[0]=_.l2r(E[0]*(1-g)+g*S[0]),_.range[1]=_.l2r(E[1]*(1-g)+g*S[1])}else y[0]=0,y[2]=M;if(T){var D=lL.simpleMap(m.yr0,b.r2l),F=lL.simpleMap(m.yr1,b.r2l),P=D[1]-D[0],R=F[1]-F[0];y[1]=(D[1]*(1-g)+g*F[1]-D[1])/(D[0]-D[1])*x,y[3]=x*(1-g+g*R/P),b.range[0]=_.l2r(D[0]*(1-g)+g*F[0]),b.range[1]=b.l2r(D[1]*(1-g)+g*F[1])}else y[1]=0,y[3]=x;uL.drawOne(t,_,{skipTitle:!0}),uL.drawOne(t,b,{skipTitle:!0}),uL.redrawComponents(t,[_._id,b._id]);var L=A?M/y[2]:1,I=T?x/y[3]:1,B=A?y[0]:0,O=T?y[1]:0,$=A?y[0]/y[2]*M:0,X=T?y[1]/y[3]*x:0,K=_._offset-$,G=b._offset-X;w.clipRect.call(D0.setTranslate,B,O).call(D0.setScale,1/L,1/I),w.plot.call(D0.setTranslate,K,G).call(D0.setScale,L,I),D0.setPointGroupScale(w.zoomScalePts,1/L,1/I),D0.setTextPointsScale(w.zoomScaleTxt,1/L,1/I)}var l;n&&(l=n());function u(){for(var m={},g=0;gi.duration?(u(),p=window.cancelAnimationFrame(v)):p=window.requestAnimationFrame(v)}return f=Date.now(),p=window.requestAnimationFrame(v),Promise.resolve()}});var xl=W(af=>{"use strict";var fL=gi(),z3e=xi(),Bb=tt(),ALt=Qo(),MLt=Qi(),B3e=Mc().getModuleCalcData,e2=Ls(),av=(Zl(),Pt(Xl)),SLt=(md(),Pt(gd)),eo=Bb.ensureSingle;function cL(e,t,r){return Bb.ensureSingle(e,t,r,function(i){i.datum(r)})}var qb=av.zindexSeparator;af.name="cartesian";af.attr=["xaxis","yaxis"];af.idRoot=["x","y"];af.idRegex=av.idRegex;af.attrRegex=av.attrRegex;af.attributes=c3e();af.layoutAttributes=ac();af.supplyLayoutDefaults=L3e();af.transitionAxes=R3e();af.finalizeSubplots=function(e,t){var r=t._subplots,i=r.xaxis,n=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u0){var p=h.id;if(p.indexOf(qb)!==-1)continue;p+=qb+(u+1),h=Bb.extendFlat({},h,{id:p,plot:n._cartesianlayer.selectAll(".subplot").select("."+p)})}for(var d=[],v,m=0;m1&&(M+=qb+b),_.push(s+M),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=eo(i,"path","xlines-above"),t.ylines=eo(i,"path","ylines-above"),t.xaxislayer=eo(i,"g","xaxislayer-above"),t.yaxislayer=eo(i,"g","yaxislayer-above");else{if(!o){var h=eo(i,"g","layer-subplot");t.shapelayer=eo(h,"g","shapelayer"),t.imagelayer=eo(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=eo(i,"g","minor-gridlayer"),t.gridlayer=eo(i,"g","gridlayer"),t.zerolinelayer=eo(i,"g","zerolinelayer"));var p=eo(i,"g","layer-between");t.shapelayerBetween=eo(p,"g","shapelayer"),t.imagelayerBetween=eo(p,"g","imagelayer"),eo(i,"path","xlines-below"),eo(i,"path","ylines-below"),t.overlinesBelow=eo(i,"g","overlines-below"),eo(i,"g","xaxislayer-below"),eo(i,"g","yaxislayer-below"),t.overaxesBelow=eo(i,"g","overaxes-below")}t.overplot=eo(i,"g","overplot"),t.plot=eo(t.overplot,"g",n),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=eo(i,"g","zerolinelayer-above"),o||(t.xlines=eo(i,"path","xlines-above"),t.ylines=eo(i,"path","ylines-above"),t.overlinesAbove=eo(i,"g","overlines-above"),eo(i,"g","xaxislayer-above"),eo(i,"g","yaxislayer-above"),t.overaxesAbove=eo(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+s),t.ylines=i.select(".ylines-"+l),t.xaxislayer=i.select(".xaxislayer-"+s),t.yaxislayer=i.select(".yaxislayer-"+l))}else{var d=f.plotgroup,v=n+"-x",m=n+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,eo(f.overlinesBelow,"path",v),eo(f.overlinesBelow,"path",m),eo(f.overaxesBelow,"g",v),eo(f.overaxesBelow,"g",m),t.plot=eo(f.overplot,"g",n),eo(f.overlinesAbove,"path",v),eo(f.overlinesAbove,"path",m),eo(f.overaxesAbove,"g",v),eo(f.overaxesAbove,"g",m),t.xlines=d.select(".overlines-"+s).select("."+v),t.ylines=d.select(".overlines-"+l).select("."+m),t.xaxislayer=d.select(".overaxes-"+s).select("."+v),t.yaxislayer=d.select(".overaxes-"+l).select("."+m)}o||(u||(cL(t.minorGridlayer,"g",t.xaxis._id),cL(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(g){return g[0]}).sort(e2.idSort),cL(t.gridlayer,"g",t.xaxis._id),cL(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(g){return g[0]}).sort(e2.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function N3e(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=fL.select(this);c.remove(),U3e(u,t),r[u]=!0});for(var i in t._plots)for(var n=t._plots[i],a=n.overlays||[],o=0;o{"use strict";var hL=Wo();V3e.exports={hasLines:hL.hasLines,hasMarkers:hL.hasMarkers,hasText:hL.hasText,isBubble:hL.isBubble,attributes:Ws(),layoutAttributes:UD(),supplyDefaults:v_e(),crossTraceDefaults:_$(),supplyLayoutDefaults:x_e(),calc:Ld().calc,crossTraceCalc:G_e(),arraysToCalcdata:L1(),plot:n5(),colorbar:Cc(),formatLabels:QF(),style:lh().style,styleOnSelect:lh().styleOnSelect,hoverPoints:l5(),selectPoints:Rb(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:xl(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var $3e=W(($Ur,j3e)=>{"use strict";var kLt=gi(),CLt=ti(),H3e=Yj(),$$=tt(),DLt=$$.strScale,FLt=$$.strRotate,LLt=$$.strTranslate;j3e.exports=function(t,r,i){var n=t.node(),a=H3e[i.arrowhead||0],o=H3e[i.startarrowhead||0],s=(i.arrowwidth||1)*(i.arrowsize||1),l=(i.arrowwidth||1)*(i.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+i.standoff,h=o.backoff*l+i.startstandoff,p,d,v,m;if(n.nodeName==="line"){p={x:+t.attr("x1"),y:+t.attr("y1")},d={x:+t.attr("x2"),y:+t.attr("y2")};var g=p.x-d.x,w=p.y-d.y;if(v=Math.atan2(w,g),m=v+Math.PI,f&&h&&f+h>Math.sqrt(g*g+w*w)){D();return}if(f){if(f*f>g*g+w*w){D();return}var _=f*Math.cos(v),b=f*Math.sin(v);d.x+=_,d.y+=b,t.attr({x2:d.x,y2:d.y})}if(h){if(h*h>g*g+w*w){D();return}var M=h*Math.cos(v),x=h*Math.sin(v);p.x-=M,p.y-=x,t.attr({x1:p.x,y1:p.y})}}else if(n.nodeName==="path"){var A=n.getTotalLength(),T="";if(A{"use strict";var W3e=gi(),W$=xi(),PLt=Qo(),r2=tt(),Y$=r2.strTranslate,RM=Yi(),Ob=ti(),rm=Qi(),Y3e=Is(),X$=ao(),Z$=Xp(),IM=Ef(),ILt=Ra().arrayEditor,RLt=$3e();K3e.exports={draw:zLt,drawOne:X3e,drawRaw:Z3e};function zLt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Ue="right":Ue="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ue]}for(var H=!1,j=["x","y"],Q=0;Q1)&&(ge===ue?(ze=Ee.r2fraction(t["a"+te]),(ze<0||ze>1)&&(H=!0)):H=!0),ae=Ee._offset+Ee.r2p(t[te]),pe=.5}else{var we=Ce==="domain";te==="x"?(re=t[te],ae=we?Ee._offset+Ee._length*re:ae=s.l+s.w*re):(re=1-t[te],ae=we?Ee._offset+Ee._length*re:ae=s.t+s.h*re),pe=t.showarrow?.5:re}if(t.showarrow){ee.head=ae;var me=t["a"+te];if(Te=ce*Y(.5,t.xanchor)-oe*Y(.5,t.yanchor),ge===ue){var Le=RM.getRefType(ge);Le==="domain"?(te==="y"&&(me=1-me),ee.tail=Ee._offset+Ee._length*me):Le==="paper"?te==="y"?(me=1-me,ee.tail=s.t+s.h*me):ee.tail=s.l+s.w*me:ee.tail=Ee._offset+Ee.r2p(me),_e=Te}else ee.tail=ae+me,_e=Te+me;ee.text=ee.tail+Te;var Ne=o[te==="x"?"width":"height"];if(ue==="paper"&&(ee.head=r2.constrain(ee.head,1,Ne-1)),ge==="pixel"){var Je=-Math.max(ee.tail-3,ee.text),rt=Math.min(ee.tail+3,ee.text)-Ne;Je>0?(ee.tail+=Je,ee.text+=Je):rt>0&&(ee.tail-=rt,ee.text-=rt)}ee.tail+=fe,ee.head+=fe}else Te=Se*Y(pe,be),_e=Te,ee.text=ae+Te;ee.text+=fe,Te+=fe,_e+=fe,t["_"+te+"padplus"]=Se/2+_e,t["_"+te+"padminus"]=Se/2-_e,t["_"+te+"size"]=Se,t["_"+te+"shift"]=Te}if(H){A.remove();return}var mt=0,dt=0;if(t.align!=="left"&&(mt=(q-K)*(t.align==="center"?.5:1)),t.valign!=="top"&&(dt=(J-G)*(t.valign==="middle"?.5:1)),$)O.select("svg").attr({x:E+mt-1,y:E+dt}).call(rm.setClipUrl,C?v:null,e);else{var St=E+dt-X.top,Ke=E+mt-X.left;P.call(X$.positionText,Ke,St).call(rm.setClipUrl,C?v:null,e)}k.select("rect").call(rm.setRect,E,E,q,J),S.call(rm.setRect,T/2,T/2,N-T,V-T),A.call(rm.setTranslate,Math.round(m.x.text-N/2),Math.round(m.y.text-V/2)),_.attr({transform:"rotate("+g+","+m.x.text+","+m.y.text+")"});var bt=function(Oe,Ue){w.selectAll(".annotation-arrow-g").remove();var je=m.x.head,$e=m.y.head,Ie=m.x.tail+Oe,Ve=m.y.tail+Ue,st=m.x.text+Oe,_t=m.y.text+Ue,Wt=r2.rotationXYMatrix(g,st,_t),Ht=r2.apply2DTransform(Wt),fr=r2.apply2DTransform2(Wt),lr=+S.attr("width"),Ot=+S.attr("height"),Jt=st-.5*lr,Cr=Jt+lr,Ge=_t-.5*Ot,Qe=Ge+Ot,nt=[[Jt,Ge,Jt,Qe],[Jt,Qe,Cr,Qe],[Cr,Qe,Cr,Ge],[Cr,Ge,Jt,Ge]].map(fr);if(!nt.reduce(function(ln,la){return ln^!!r2.segmentsIntersect(je,$e,je+1e6,$e+1e6,la[0],la[1],la[2],la[3])},!1)){nt.forEach(function(ln){var la=r2.segmentsIntersect(Ie,Ve,je,$e,ln[0],ln[1],ln[2],ln[3]);la&&(Ie=la.x,Ve=la.y)});var gt=t.arrowwidth,ht=t.arrowcolor,Ft=t.arrowside,hr=w.append("g").style({opacity:Ob.opacity(ht)}).classed("annotation-arrow-g",!0),Ut=hr.append("path").attr("d","M"+Ie+","+Ve+"L"+je+","+$e).style("stroke-width",gt+"px").call(Ob.stroke,Ob.rgb(ht));if(RLt(Ut,Ft,t),l.annotationPosition&&Ut.node().parentNode&&!i){var Lr=je,jr=$e;if(t.standoff){var ii=Math.sqrt(Math.pow(je-Ie,2)+Math.pow($e-Ve,2));Lr+=t.standoff*(Ie-je)/ii,jr+=t.standoff*(Ve-$e)/ii}var Fr=hr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Ie-Lr)+","+(Ve-jr),transform:Y$(Lr,jr)}).style("stroke-width",gt+6+"px").call(Ob.stroke,"rgba(0,0,0,0)").call(Ob.fill,"rgba(0,0,0,0)"),Ii,Xi;IM.init({element:Fr.node(),gd:e,prepFn:function(){var ln=rm.getTranslate(A);Ii=ln.x,Xi=ln.y,n&&n.autorange&&h(n._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(ln,la){var mo=Ht(Ii,Xi),pn=mo[0]+ln,zn=mo[1]+la;A.call(rm.setTranslate,pn,zn),p("x",t2(n,ln,"x",s,t)),p("y",t2(a,la,"y",s,t)),t.axref===t.xref&&p("ax",t2(n,ln,"ax",s,t)),t.ayref===t.yref&&p("ay",t2(a,la,"ay",s,t)),hr.attr("transform",Y$(ln,la)),_.attr({transform:"rotate("+g+","+pn+","+zn+")"})},doneFn:function(){W$.call("_guiRelayout",e,d());var ln=document.querySelector(".js-notes-box-panel");ln&&ln.redraw(ln.selectedObj)}})}}};if(t.showarrow&&bt(0,0),b){var pt;IM.init({element:A.node(),gd:e,prepFn:function(){pt=_.attr("transform")},moveFn:function(Oe,Ue){var je="pointer";if(t.showarrow)t.axref===t.xref?p("ax",t2(n,Oe,"ax",s,t)):p("ax",t.ax+Oe),t.ayref===t.yref?p("ay",t2(a,Ue,"ay",s.w,t)):p("ay",t.ay+Ue),bt(Oe,Ue);else{if(i)return;var $e,Ie;if(n)$e=t2(n,Oe,"x",s,t);else{var Ve=t._xsize/s.w,st=t.x+(t._xshift-t.xshift)/s.w-Ve/2;$e=IM.align(st+Oe/s.w,Ve,0,1,t.xanchor)}if(a)Ie=t2(a,Ue,"y",s,t);else{var _t=t._ysize/s.h,Wt=t.y-(t._yshift+t.yshift)/s.h-_t/2;Ie=IM.align(Wt-Ue/s.h,_t,0,1,t.yanchor)}p("x",$e),p("y",Ie),(!n||!a)&&(je=IM.getCursor(n?.5:$e,a?.5:Ie,t.xanchor,t.yanchor))}_.attr({transform:Y$(Oe,Ue)+pt}),Z$(A,je)},clickFn:function(Oe,Ue){t.captureevents&&e.emit("plotly_clickannotation",x(Ue))},doneFn:function(){Z$(A),W$.call("_guiRelayout",e,d());var Oe=document.querySelector(".js-notes-box-panel");Oe&&Oe.redraw(Oe.selectedObj)}})}}l.annotationText?P.call(X$.makeEditable,{delegate:A,gd:e}).call(R).on("edit",function(I){t.text=I,this.call(R),p("text",I),n&&n.autorange&&h(n._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),W$.call("_guiRelayout",e,d())}):P.call(R)}});var iwe=W((YUr,rwe)=>{"use strict";var J3e=tt(),BLt=xi(),Q3e=Ra().arrayEditor;rwe.exports={hasClickToShow:qLt,onClick:OLt};function qLt(e,t){var r=twe(e,t);return r.on.length>0||r.explicitOff.length>0}function OLt(e,t){var r=twe(e,t),i=r.on,n=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(i.length||n.length){for(s=0;s{"use strict";var K$=tt(),u5=ti();nwe.exports=function(t,r,i,n){n("opacity");var a=n("bgcolor"),o=n("bordercolor"),s=u5.opacity(o);n("borderpad");var l=n("borderwidth"),u=n("showarrow");n("text",u?" ":i._dfltTitle.annotation),n("textangle"),K$.coerceFont(n,"font",i.font),n("width"),n("align");var c=n("height");if(c&&n("valign"),u){var f=n("arrowside"),h,p;f.indexOf("end")!==-1&&(h=n("arrowhead"),p=n("arrowsize")),f.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",p)),n("arrowcolor",s?r.bordercolor:u5.defaultLine),n("arrowwidth",(s&&l||1)*2),n("standoff"),n("startstandoff")}var d=n("hovertext"),v=i.hoverlabel||{};if(d){var m=n("hoverlabel.bgcolor",v.bgcolor||(u5.opacity(a)?u5.rgb(a):u5.defaultLine)),g=n("hoverlabel.bordercolor",v.bordercolor||u5.contrast(m)),w=K$.extendFlat({},v.font);w.color||(w.color=g),K$.coerceFont(n,"hoverlabel.font",w)}n("captureevents",!!d)}});var owe=W((ZUr,awe)=>{"use strict";var Q$=tt(),Nb=Yi(),NLt=tf(),ULt=J$(),VLt=Xy();awe.exports=function(t,r){NLt(t,r,{name:"annotations",handleItemDefaults:GLt})};function GLt(e,t,r){function i(_,b){return Q$.coerce(e,t,VLt,_,b)}var n=i("visible"),a=i("clicktoshow");if(n||a){ULt(e,t,r,i);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=Nb.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var p=Nb.getFromId(u,h);p._annIndices.push(t._index)}if(Nb.coercePosition(t,u,i,h,f,.5),o){var d="a"+f,v=Nb.coerceRef(e,t,u,d,"pixel",["pixel","paper"]);v!=="pixel"&&v!==h&&(v=t[d]="pixel");var m=v==="pixel"?l[c]:.4;Nb.coercePosition(t,u,i,v,d,m)}i(f+"anchor"),i(f+"shift")}if(Q$.noneOrAll(e,t,["x","y"]),o&&Q$.noneOrAll(e,t,["ax","ay"]),a){var g=i("xclick"),w=i("yclick");t._xclick=g===void 0?t.x:Nb.cleanPosition(g,u,t.xref),t._yclick=w===void 0?t.y:Nb.cleanPosition(w,u,t.yref)}}}});var uwe=W((KUr,lwe)=>{"use strict";var eW=tt(),Ub=Yi(),HLt=dL().draw;lwe.exports=function(t){var r=t._fullLayout,i=eW.filterVisible(r.annotations);if(i.length&&t._fullData.length)return eW.syncOrAsync([HLt,jLt],t)};function jLt(e){var t=e._fullLayout;eW.filterVisible(t.annotations).forEach(function(r){var i=Ub.getFromId(e,r.xref),n=Ub.getFromId(e,r.yref),a=Ub.getRefType(r.xref),o=Ub.getRefType(r.yref);r._extremes={},a==="range"&&swe(r,i),o==="range"&&swe(r,n)})}function swe(e,t){var r=t._id,i=r.charAt(0),n=e[i],a=e["a"+i],o=e[i+"ref"],s=e["a"+i+"ref"],l=e["_"+i+"padplus"],u=e["_"+i+"padminus"],c={x:1,y:-1}[i]*e[i+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,p=f-c,d=3*e.startarrowsize*e.arrowwidth||0,v=d+c,m=d-c,g;if(s===o){var w=Ub.findExtremes(t,[t.r2c(n)],{ppadplus:h,ppadminus:p}),_=Ub.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,v),ppadminus:Math.max(u,m)});g={min:[w.min[0],_.min[0]],max:[w.max[0],_.max[0]]}}else v=a?v+a:v,m=a?m-a:m,g=Ub.findExtremes(t,[t.r2c(n)],{ppadplus:Math.max(l,h,v),ppadminus:Math.max(u,p,m)});e._extremes[r]=g}});var fwe=W((JUr,cwe)=>{"use strict";var $Lt=hn(),WLt=N8();cwe.exports=function(t,r,i,n){r=r||{};var a=i==="log"&&r.type==="linear",o=i==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(p){var d=u[p],v=null;a?v=WLt(d,r.range):v=Math.pow(10,d),$Lt(v)||(v=null),n(c+p,v)}for(var h=0;h{"use strict";var tW=dL(),hwe=iwe();dwe.exports={moduleType:"component",name:"annotations",layoutAttributes:Xy(),supplyLayoutDefaults:owe(),includeBasePlot:gM()("annotations"),calcAutorange:uwe(),draw:tW.draw,drawOne:tW.drawOne,drawRaw:tW.drawRaw,hasClickToShow:hwe.hasClickToShow,onClick:hwe.onClick,convertCoords:fwe()}});var pL=W((eVr,vwe)=>{"use strict";var rs=Xy(),YLt=hs().overrideAll,XLt=Ra().templatedArray;vwe.exports=YLt(XLt("annotation",{visible:rs.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:rs.xanchor,xshift:rs.xshift,yanchor:rs.yanchor,yshift:rs.yshift,text:rs.text,textangle:rs.textangle,font:rs.font,width:rs.width,height:rs.height,opacity:rs.opacity,align:rs.align,valign:rs.valign,bgcolor:rs.bgcolor,bordercolor:rs.bordercolor,borderpad:rs.borderpad,borderwidth:rs.borderwidth,showarrow:rs.showarrow,arrowcolor:rs.arrowcolor,arrowhead:rs.arrowhead,startarrowhead:rs.startarrowhead,arrowside:rs.arrowside,arrowsize:rs.arrowsize,startarrowsize:rs.startarrowsize,arrowwidth:rs.arrowwidth,standoff:rs.standoff,startstandoff:rs.startstandoff,hovertext:rs.hovertext,hoverlabel:rs.hoverlabel,captureevents:rs.captureevents}),"calc","from-root")});var mwe=W((tVr,gwe)=>{"use strict";var rW=tt(),ZLt=Yi(),KLt=tf(),JLt=J$(),QLt=pL();gwe.exports=function(t,r,i){KLt(t,r,{name:"annotations",handleItemDefaults:ePt,fullLayout:i.fullLayout})};function ePt(e,t,r,i){function n(s,l){return rW.coerce(e,t,QLt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ZLt.coercePosition(t,u,n,s,s,.5)}var o=n("visible");o&&(JLt(e,t,i.fullLayout,n),a("x"),a("y"),a("z"),rW.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",n("ax",-10),n("ay",-30),rW.noneOrAll(e,t,["ax","ay"])))}});var _we=W((rVr,bwe)=>{"use strict";var ywe=tt(),xwe=Yi();bwe.exports=function(t){for(var r=t.fullSceneLayout,i=r.annotations,n=0;n{"use strict";function iW(e,t){var r=[0,0,0,0],i,n;for(i=0;i<4;++i)for(n=0;n<4;++n)r[n]+=e[4*i+n]*t[i];return r}function rPt(e,t){var r=iW(e.projection,iW(e.view,iW(e.model,[t[0],t[1],t[2],1])));return r}wwe.exports=rPt});var Awe=W((nVr,Twe)=>{"use strict";var iPt=dL().drawRaw,nPt=nW(),aPt=["x","y","z"];Twe.exports=function(t){for(var r=t.fullSceneLayout,i=t.dataScale,n=r.annotations,a=0;a1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=nPt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*i[0],r.yaxis.r2l(o.y)*i[1],r.zaxis.r2l(o.z)*i[2]]),iPt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var Ewe=W((aVr,Swe)=>{"use strict";var oPt=xi(),Mwe=tt();Swe.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:pL()}}},layoutAttributes:pL(),handleDefaults:mwe(),includeBasePlot:sPt,convert:_we(),draw:Awe()};function sPt(e,t){var r=oPt.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,n=Object.keys(e),a=0;a{"use strict";var oVr=(Zl(),Pt(Xl)),kwe=jo(),Cwe=Ws().line,lPt=zu().dash,ov=an().extendFlat,uPt=Ra().templatedArray,sVr=(pM(),Pt(dM)),c5=Ja(),Dwe=Xy(),{shapeTexttemplateAttrs:cPt,templatefallbackAttrs:fPt}=Wa(),hPt=xD();Fwe.exports=uPt("shape",{visible:ov({},c5.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:ov({},c5.legend,{editType:"calc+arraydraw"}),legendgroup:ov({},c5.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:ov({},c5.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:kwe({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:ov({},c5.legendrank,{editType:"calc+arraydraw"}),legendwidth:ov({},c5.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:ov({},Dwe.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:ov({},Dwe.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:ov({},Cwe.color,{editType:"arraydraw"}),width:ov({},Cwe.width,{editType:"calc+arraydraw"}),dash:ov({},lPt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:cPt({},{keys:Object.keys(hPt)}),texttemplatefallback:fPt({editType:"arraydraw"}),font:kwe({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var Pwe=W((uVr,Lwe)=>{"use strict";var f5=tt(),F0=Yi(),dPt=tf(),pPt=aW(),zM=Wy();Lwe.exports=function(t,r){dPt(t,r,{name:"shapes",handleItemDefaults:gPt})};function vPt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function gPt(e,t,r){function i(_,b){return f5.coerce(e,t,pPt,_,b)}t._isShape=!0;var n=i("visible");if(!n)return;var a=i("showlegend");i("legend"),i("legendgroup"),a&&(i("legendwidth"),i("legendgrouptitle.text"),f5.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var o=i("path"),s=o?"path":"rect",l=i("type",s),u=l!=="path";u&&delete t.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var c=i("line.width");c&&(i("line.color"),i("line.dash"));var f=i("xsizemode"),h=i("ysizemode");let p=[.25,.75],d=[0,10];["x","y"].forEach(_=>{var b=_+"anchor",M=_==="x"?f:h,x={_fullLayout:r},A,T,y,E;let S=_+"ref",C=e[S];if(Array.isArray(C)&&C.length>0){let k=zM.countDefiningCoords(l,o,_);E=F0.coerceRefArray(e,t,x,_,void 0,"paper",k),t["_"+_+"refArray"]=!0}else E=F0.coerceRef(e,t,x,_,void 0,"paper");if(Array.isArray(E))E.forEach(function(k){F0.getRefType(k)==="range"&&(A=F0.getFromId(x,k),A&&A._shapeIndices.indexOf(t._index)===-1&&A._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(k){let D=E[k];F0.getRefType(D)==="range"?(A=F0.getFromId(x,D),T=zM.shapePositionToRange(A),y=zM.rangeToShapePosition(A),(A.type==="category"||A.type==="multicategory")&&i(_+k+"shift")):T=y=f5.identity;let P=_+k,R=e[P];if(e[P]=T(e[P],!0),M==="pixel"?i(P,d[k]):F0.coercePosition(t,x,i,D,P,p[k]),t[P]=y(t[P]),e[P]=R,k===0&&M==="pixel"){let L=e[b];e[b]=T(e[b],!0),F0.coercePosition(t,x,i,D,b,.25),t[b]=y(t[b]),e[b]=L}});else{if(F0.getRefType(E)==="range"?(A=F0.getFromId(x,E),A._shapeIndices.push(t._index),y=zM.rangeToShapePosition(A),T=zM.shapePositionToRange(A),u&&(A.type==="category"||A.type==="multicategory")&&(i(_+"0shift"),i(_+"1shift"))):T=y=f5.identity,u){let D=_+"0",F=_+"1",P=e[D],R=e[F];e[D]=T(e[D],!0),e[F]=T(e[F],!0),M==="pixel"?(i(D,d[0]),i(F,d[1])):(F0.coercePosition(t,x,i,E,D,p[0]),F0.coercePosition(t,x,i,E,F,p[1])),t[D]=y(t[D]),t[F]=y(t[F]),e[D]=P,e[F]=R}if(M==="pixel"){let D=e[b];e[b]=T(e[b],!0),F0.coercePosition(t,x,i,E,b,.25),t[b]=y(t[b]),e[b]=D}}}),u&&f5.noneOrAll(e,t,["x0","x1","y0","y1"]);var v=l==="line",m,g;if(u&&(m=i("label.texttemplate"),i("label.texttemplatefallback")),m||(g=i("label.text")),g||m){i("label.textangle");var w=i("label.textposition",v?"middle":"middle center");i("label.xanchor"),i("label.yanchor",vPt(v,w)),i("label.padding"),f5.coerceFont(i,"label.font",r.font)}}});var zwe=W((cVr,Rwe)=>{"use strict";var mPt=ti(),Iwe=tt();function yPt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Rwe.exports=function(t,r,i){i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),Iwe.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity");var n=i("newshape.line.width");if(n){var a=(t||{}).plot_bgcolor||"#FFF";i("newshape.line.color",mPt.contrast(a)),i("newshape.line.dash")}var o=t.dragmode==="drawline",s=i("newshape.label.text"),l=i("newshape.label.texttemplate");if(i("newshape.label.texttemplatefallback"),s||l){i("newshape.label.textangle");var u=i("newshape.label.textposition",o?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",yPt(o,u)),i("newshape.label.padding"),Iwe.coerceFont(i,"newshape.label.font",r.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}});var Gwe=W((fVr,Vwe)=>{"use strict";var oW=tt(),Id=Yi(),I1=($A(),Pt(jA)),sW=Wy();Vwe.exports=function(t){var r=t._fullLayout,i=oW.filterVisible(r.shapes);if(!(!i.length||!t._fullData.length))for(var n=0;n{o=Id.getFromId(t,f),a._extremes[o._id]=Id.findExtremes(o,h,qwe(a))})}else a.xref!=="paper"&&l!=="domain"&&(o=Id.getFromId(t,a.xref),s=Nwe(o,a,I1.paramIsX),s&&(a._extremes[o._id]=Id.findExtremes(o,s,qwe(a))));if(u==="array"){let c=Bwe(t,a,"y");Object.entries(c).forEach(([f,h])=>{o=Id.getFromId(t,f),a._extremes[o._id]=Id.findExtremes(o,h,Owe(a))})}else a.yref!=="paper"&&u!=="domain"&&(o=Id.getFromId(t,a.yref),s=Nwe(o,a,I1.paramIsY),s&&(a._extremes[o._id]=Id.findExtremes(o,s,Owe(a))))}};function Bwe(e,t,r){let i=t[r+"ref"],n=r==="x"?I1.paramIsX:I1.paramIsY;function a(f,h){f==="paper"||Id.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(I1.segmentRE)||[];for(var s=0,l=0;ld&&(a(i[s],v[d]),s++)}}else a(i[0],t[r+"0"]),a(i[1],t[r+"1"]);let u={};for(let f in o){let h=Id.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=sW.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function qwe(e){return Uwe(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function Owe(e){return Uwe(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function Uwe(e,t,r,i,n,a){var o=e/2,s=a;if(t==="pixel"){var l=n?sW.extractPathCoords(n,a?I1.paramIsY:I1.paramIsX):[r,i],u=oW.aggNums(Math.max,null,l),c=oW.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function Nwe(e,t,r){var i=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=n?e.r2c:e.d2c,c=t[i+"sizemode"]==="scaled";if(c?(a=t[i+"0"],o=t[i+"1"],n&&(s=t[i+"0shift"],l=t[i+"1shift"])):(a=t[i+"anchor"],o=t[i+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,p=t.path.match(I1.segmentRE),d,v,m,g,w;for(e.type==="date"&&(u=sW.decodeDate(u)),d=0;dh&&(h=w)));if(h>=f)return[f,h]}}});var $we=W((hVr,jwe)=>{"use strict";var Hwe=rF();jwe.exports={moduleType:"component",name:"shapes",layoutAttributes:aW(),supplyLayoutDefaults:Pwe(),supplyDrawNewShapeDefaults:zwe(),includeBasePlot:gM()("shapes"),calcAutorange:Gwe(),draw:Hwe.draw,drawOne:Hwe.drawOne}});var lW=W((pVr,Ywe)=>{"use strict";var Wwe=(Zl(),Pt(Xl)),xPt=Ra().templatedArray,dVr=(pM(),Pt(dM));Ywe.exports=xPt("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",Wwe.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",Wwe.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Zwe=W((vVr,Xwe)=>{"use strict";var bPt=tt(),uW=Yi(),_Pt=tf(),wPt=lW(),TPt="images";Xwe.exports=function(t,r){var i={name:TPt,handleItemDefaults:APt};_Pt(t,r,i)};function APt(e,t,r){function i(h,p){return bPt.coerce(e,t,wPt,h,p)}var n=i("source"),a=i("visible",!!n);if(!a)return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=uW.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=uW.getFromId(o,c);f._imgIndices.push(t._index)}uW.coercePosition(t,o,i,c,u,0)}return t}});var e5e=W((gVr,Qwe)=>{"use strict";var Kwe=gi(),MPt=Qi(),h5=Yi(),Jwe=Ls(),SPt=(md(),Pt(gd));Qwe.exports=function(t){var r=t._fullLayout,i=[],n={},a=[],o,s;for(s=0;s{"use strict";var t5e=hn(),EPt=N8();r5e.exports=function(t,r,i,n){r=r||{};var a=i==="log"&&r.type==="linear",o=i==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";n5e.exports={moduleType:"component",name:"images",layoutAttributes:lW(),supplyLayoutDefaults:Zwe(),includeBasePlot:gM()("images"),draw:e5e(),convertCoords:i5e()}});var vL={};Jn(vL,{activeColor:()=>JPt,arrowOffsetX:()=>XPt,arrowPadX:()=>HPt,arrowSymbol:()=>e9t,autoMarginIdRoot:()=>OPt,blankHeaderOpts:()=>NPt,buttonClassName:()=>RPt,containerClassName:()=>CPt,dropdownButtonClassName:()=>IPt,dropdownButtonGroupClassName:()=>PPt,gapButton:()=>KPt,gapButtonHeader:()=>ZPt,headerArrowClassName:()=>LPt,headerClassName:()=>FPt,headerGroupClassName:()=>DPt,hoverColor:()=>QPt,itemRectClassName:()=>zPt,itemTextClassName:()=>BPt,menuIndexAttrName:()=>qPt,minHeight:()=>VPt,minWidth:()=>UPt,name:()=>kPt,rx:()=>jPt,ry:()=>$Pt,textOffsetX:()=>WPt,textOffsetY:()=>YPt,textPadX:()=>GPt});var kPt,CPt,DPt,FPt,LPt,PPt,IPt,RPt,zPt,BPt,qPt,OPt,NPt,UPt,VPt,GPt,HPt,jPt,$Pt,WPt,YPt,XPt,ZPt,KPt,JPt,QPt,e9t,gL=Ci(()=>{"use strict";kPt="updatemenus",CPt="updatemenu-container",DPt="updatemenu-header-group",FPt="updatemenu-header",LPt="updatemenu-header-arrow",PPt="updatemenu-dropdown-button-group",IPt="updatemenu-dropdown-button",RPt="updatemenu-button",zPt="updatemenu-item-rect",BPt="updatemenu-item-text",qPt="updatemenu-active-index",OPt="updatemenu-",NPt={label:" "},UPt=30,VPt=30,GPt=24,HPt=16,jPt=2,$Pt=2,WPt=12,YPt=3,XPt=4,ZPt=5,KPt=2,JPt="#F4FAFF",QPt="#F4FAFF",e9t={left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}});var cW=W((xVr,s5e)=>{"use strict";var t9t=jo(),r9t=Yl(),i9t=an().extendFlat,n9t=hs().overrideAll,a9t=bD(),o5e=Ra().templatedArray,o9t=o5e("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});s5e.exports=n9t(o5e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:o9t,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i9t(a9t({editType:"arraydraw"}),{}),font:t9t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:r9t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var f5e=W((bVr,c5e)=>{"use strict";var mL=tt(),l5e=tf(),u5e=cW(),s9t=(gL(),Pt(vL)),l9t=s9t.name,u9t=u5e.buttons;c5e.exports=function(t,r){var i={name:l9t,handleItemDefaults:c9t};l5e(t,r,i)};function c9t(e,t,r){function i(o,s){return mL.coerce(e,t,u5e,o,s)}var n=l5e(e,t,{name:"buttons",handleItemDefaults:f9t}),a=i("visible",n.length>0);a&&(i("active"),i("direction"),i("type"),i("showactive"),i("x"),i("y"),mL.noneOrAll(e,t,["x","y"]),i("xanchor"),i("yanchor"),i("pad.t"),i("pad.r"),i("pad.b"),i("pad.l"),mL.coerceFont(i,"font",r.font),i("bgcolor",r.paper_bgcolor),i("bordercolor"),i("borderwidth"))}function f9t(e,t){function r(n,a){return mL.coerce(e,t,u9t,n,a)}var i=r("visible",e.method==="skip"||Array.isArray(e.args));i&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var p5e=W((_Vr,d5e)=>{"use strict";d5e.exports=Ys;var sv=gi(),h5e=ti(),d5=Qi(),yL=tt();function Ys(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Ys.barWidth=2;Ys.barLength=20;Ys.barRadius=2;Ys.barPad=1;Ys.barColor="#808BA4";Ys.prototype.enable=function(t,r,i){var n=this.gd._fullLayout,a=n.width,o=n.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",p=f==="left",d=f==="right",v=f==="up",m=l,g=c,w,_,b,M;!h&&!p&&!d&&!v&&(this.position.direction="down",h=!0);var x=h||v;x?(w=s,_=w+m,h?(b=u,M=Math.min(b+g,o),g=M-b):(M=u+g,b=Math.max(M-g,0),g=M-b)):(b=u,M=b+g,p?(_=s+m,w=Math.max(_-m,0),m=_-w):(w=s,_=Math.min(w+m,a),m=_-w)),this._box={l:w,t:b,w:m,h:g};var A=l>m,T=Ys.barLength+2*Ys.barPad,y=Ys.barWidth+2*Ys.barPad,E=s,S=u+c;S+y>o&&(S=o-y);var C=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(h5e.fill,Ys.barColor),A?(this.hbar=C.attr({rx:Ys.barRadius,ry:Ys.barRadius,x:E,y:S,width:T,height:y}),this._hbarXMin=E+T/2,this._hbarTranslateMax=m-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var k=c>g,D=Ys.barWidth+2*Ys.barPad,F=Ys.barLength+2*Ys.barPad,P=s+l,R=u;P+D>a&&(P=a-D);var L=this.container.selectAll("rect.scrollbar-vertical").data(k?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(h5e.fill,Ys.barColor),k?(this.vbar=L.attr({rx:Ys.barRadius,ry:Ys.barRadius,x:P,y:R,width:D,height:F}),this._vbarYMin=R+F/2,this._vbarTranslateMax=g-F):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,B=w-.5,O=k?_+D+.5:_+.5,$=b-.5,X=A?M+y+.5:M+.5,K=n._topdefs.selectAll("#"+I).data(A||k?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",I).append("rect"),A||k?(this._clipRect=K.select("rect").attr({x:Math.floor(B),y:Math.floor($),width:Math.ceil(O)-Math.floor(B),height:Math.ceil(X)-Math.floor($)}),this.container.call(d5.setClipUrl,I,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(d5.setClipUrl,null),delete this._clipRect),A||k){var G=sv.behavior.drag().on("dragstart",function(){sv.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(G);var q=sv.behavior.drag().on("dragstart",function(){sv.event.sourceEvent.preventDefault(),sv.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(q),k&&this.vbar.on(".drag",null).call(q)}this.setTranslate(r,i)};Ys.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(d5.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)};Ys.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=sv.event.dx),this.vbar&&(r-=sv.event.dy),this.setTranslate(t,r)};Ys.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=sv.event.deltaY),this.vbar&&(r+=sv.event.deltaY),this.setTranslate(t,r)};Ys.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var i=t+this._hbarXMin,n=i+this._hbarTranslateMax,a=yL.constrain(sv.event.x,i,n),o=(a-i)/(n-i),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=yL.constrain(sv.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Ys.prototype.setTranslate=function(t,r){var i=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=yL.constrain(t||0,0,i),r=yL.constrain(r||0,0,n),this.translateX=t,this.translateY=r,this.container.call(d5.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/i;this.hbar.call(d5.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/n;this.vbar.call(d5.setTranslate,t,r+o*this._vbarTranslateMax)}}});var A5e=W((wVr,T5e)=>{"use strict";var p5=gi(),BM=Qo(),qM=ti(),v5=Qi(),L0=tt(),xL=ao(),h9t=Ra().arrayEditor,g5e=(Jl(),Pt(Kl)).LINE_SPACING,Ln=(gL(),Pt(vL)),d9t=p5e();T5e.exports=function(t){var r=t._fullLayout,i=L0.filterVisible(r[Ln.name]);function n(h){BM.autoMargin(t,_5e(h))}var a=r._menulayer.selectAll("g."+Ln.containerClassName).data(i.length>0?[0]:[]);if(a.enter().append("g").classed(Ln.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){p5.select(this).selectAll("g."+Ln.headerGroupClassName).each(n)}).remove(),i.length!==0){var o=a.selectAll("g."+Ln.headerGroupClassName).data(i,p9t);o.enter().append("g").classed(Ln.headerGroupClassName,!0);for(var s=L0.ensureSingle(a,"g",Ln.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var _9t=(gL(),Pt(vL));M5e.exports={moduleType:"component",name:_9t.name,layoutAttributes:cW(),supplyLayoutDefaults:f5e(),draw:A5e()}});var NM={};Jn(NM,{arrowOffsetX:()=>U9t,autoMarginIdRoot:()=>B9t,containerClassName:()=>T9t,currentValueClass:()=>I9t,currentValueInset:()=>pIt,currentValuePadding:()=>dIt,gripBgActiveColor:()=>iIt,gripBgColor:()=>rIt,gripBorder:()=>Q9t,gripBorderColor:()=>tIt,gripBorderWidth:()=>eIt,gripHeight:()=>J9t,gripRadius:()=>Z9t,gripRectClass:()=>k9t,gripWidth:()=>K9t,groupClassName:()=>A9t,inputAreaClass:()=>M9t,inputProxyClass:()=>D9t,labelClass:()=>P9t,labelGroupClass:()=>L9t,labelOffset:()=>aIt,labelPadding:()=>nIt,labelsClass:()=>F9t,menuIndexAttrName:()=>z9t,minHeight:()=>O9t,minWidth:()=>q9t,minorTickColor:()=>fIt,minorTickLength:()=>hIt,minorTickOffset:()=>cIt,name:()=>w9t,railBgColor:()=>W9t,railBorder:()=>H9t,railBorderColor:()=>$9t,railBorderWidth:()=>j9t,railHeight:()=>R9t,railInset:()=>Y9t,railRadius:()=>V9t,railRectClass:()=>S9t,railTouchRectClass:()=>E9t,railWidth:()=>G9t,stepInset:()=>X9t,textPadX:()=>N9t,tickColor:()=>sIt,tickLength:()=>uIt,tickOffset:()=>lIt,tickRectClass:()=>C9t,tickWidth:()=>oIt});var w9t,T9t,A9t,M9t,S9t,E9t,k9t,C9t,D9t,F9t,L9t,P9t,I9t,R9t,z9t,B9t,q9t,O9t,N9t,U9t,V9t,G9t,H9t,j9t,$9t,W9t,Y9t,X9t,Z9t,K9t,J9t,Q9t,eIt,tIt,rIt,iIt,nIt,aIt,oIt,sIt,lIt,uIt,cIt,fIt,hIt,dIt,pIt,UM=Ci(()=>{"use strict";w9t="sliders",T9t="slider-container",A9t="slider-group",M9t="slider-input-area",S9t="slider-rail-rect",E9t="slider-rail-touch-rect",k9t="slider-grip-rect",C9t="slider-tick-rect",D9t="slider-input-proxy",F9t="slider-labels",L9t="slider-label-group",P9t="slider-label",I9t="slider-current-value",R9t=5,z9t="slider-active-index",B9t="slider-",q9t=30,O9t=30,N9t=40,U9t=4,V9t=2,G9t=5,H9t=4,j9t=1,$9t="#bec8d9",W9t="#f8fafc",Y9t=8,X9t=10,Z9t=10,K9t=20,J9t=20,Q9t=20,eIt=1,tIt="#bec8d9",rIt="#f6f8fa",iIt="#dbdde0",nIt=8,aIt=0,oIt=1,sIt="#333",lIt=25,uIt=7,cIt=25,fIt="#333",hIt=4,dIt=8,pIt=0});var pW=W((AVr,C5e)=>{"use strict";var E5e=jo(),vIt=bD(),gIt=an().extendDeepAll,mIt=hs().overrideAll,yIt=dA(),k5e=Ra().templatedArray,Vb=(UM(),Pt(NM)),xIt=k5e("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});C5e.exports=mIt(k5e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:xIt,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:gIt(vIt({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:yIt.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:E5e({})},font:E5e({}),activebgcolor:{valType:"color",dflt:Vb.gripBgActiveColor},bgcolor:{valType:"color",dflt:Vb.railBgColor},bordercolor:{valType:"color",dflt:Vb.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Vb.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Vb.tickLength},tickcolor:{valType:"color",dflt:Vb.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Vb.minorTickLength}}),"arraydraw","from-root")});var P5e=W((MVr,L5e)=>{"use strict";var g5=tt(),D5e=tf(),F5e=pW(),bIt=(UM(),Pt(NM)),_It=bIt.name,wIt=F5e.steps;L5e.exports=function(t,r){D5e(t,r,{name:_It,handleItemDefaults:TIt})};function TIt(e,t,r){function i(f,h){return g5.coerce(e,t,F5e,f,h)}for(var n=D5e(e,t,{name:"steps",handleItemDefaults:AIt}),a=0,o=0;o{"use strict";var lv=gi(),bL=Qo(),i2=ti(),uv=Qi(),P0=tt(),MIt=P0.strTranslate,VM=ao(),SIt=Ra().arrayEditor,na=(UM(),Pt(NM)),mW=(Jl(),Pt(Kl)),z5e=mW.LINE_SPACING,vW=mW.FROM_TL,gW=mW.FROM_BR;V5e.exports=function(t){var r=t._context.staticPlot,i=t._fullLayout,n=EIt(i,t),a=i._infolayer.selectAll("g."+na.containerClassName).data(n.length>0?[0]:[]);a.enter().append("g").classed(na.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),bL.autoMargin(t,B5e(c))}if(a.exit().each(function(){lv.select(this).selectAll("g."+na.groupClassName).each(o)}).remove(),n.length!==0){var s=a.selectAll("g."+na.groupClassName).data(n,kIt);s.enter().append("g").classed(na.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",MIt(o-na.gripWidth*.5,t._dims.currentValueTotalHeight))}}function yW(e,t){var r=e._dims;return r.inputAreaStart+na.stepInset+(r.inputAreaLength-2*na.stepInset)*Math.min(1,Math.max(0,t))}function R5e(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-na.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*na.stepInset-2*r.inputAreaStart)))}function RIt(e,t,r){var i=r._dims,n=P0.ensureSingle(e,"rect",na.railTouchRectClass,function(a){a.call(N5e,t,e,r).style("pointer-events","all")});n.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,na.tickOffset+r.ticklen+i.labelHeight)}).call(i2.fill,r.bgcolor).attr("opacity",0),uv.setTranslate(n,0,i.currentValueTotalHeight)}function zIt(e,t){var r=t._dims,i=r.inputAreaLength-na.railInset*2,n=P0.ensureSingle(e,"rect",na.railRectClass);n.attr({width:i,height:na.railWidth,rx:na.railRadius,ry:na.railRadius,"shape-rendering":"crispEdges"}).call(i2.stroke,t.bordercolor).call(i2.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),uv.setTranslate(n,na.railInset,(r.inputAreaWidth-na.railWidth)*.5+r.currentValueTotalHeight)}});var j5e=W((EVr,H5e)=>{"use strict";var BIt=(UM(),Pt(NM));H5e.exports={moduleType:"component",name:BIt.name,layoutAttributes:pW(),supplyLayoutDefaults:P5e(),draw:G5e()}});var wL=W((kVr,W5e)=>{"use strict";var $5e=Yl();W5e.exports={bgcolor:{valType:"color",dflt:$5e.background,editType:"plot"},bordercolor:{valType:"color",dflt:$5e.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var xW=W((CVr,Y5e)=>{"use strict";Y5e.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var TL={};Jn(TL,{bgClassName:()=>NIt,containerClassName:()=>OIt,extraPad:()=>uRt,grabAreaCursor:()=>nRt,grabAreaFill:()=>iRt,grabAreaMaxClassName:()=>XIt,grabAreaMinClassName:()=>$It,grabAreaWidth:()=>aRt,grabberMaxClassName:()=>YIt,grabberMinClassName:()=>jIt,handleMaxClassName:()=>ZIt,handleMinClassName:()=>WIt,handleRadius:()=>sRt,handleStrokeWidth:()=>lRt,handleWidth:()=>oRt,maskColor:()=>QIt,maskMaxClassName:()=>GIt,maskMaxOppAxisClassName:()=>JIt,maskMinClassName:()=>VIt,maskMinOppAxisClassName:()=>KIt,maskOppAxisColor:()=>eRt,name:()=>qIt,rangePlotClassName:()=>UIt,slideBoxClassName:()=>HIt,slideBoxCursor:()=>rRt,slideBoxFill:()=>tRt});var qIt,OIt,NIt,UIt,VIt,GIt,HIt,jIt,$It,WIt,YIt,XIt,ZIt,KIt,JIt,QIt,eRt,tRt,rRt,iRt,nRt,aRt,oRt,sRt,lRt,uRt,AL=Ci(()=>{"use strict";qIt="rangeslider",OIt="rangeslider-container",NIt="rangeslider-bg",UIt="rangeslider-rangeplot",VIt="rangeslider-mask-min",GIt="rangeslider-mask-max",HIt="rangeslider-slidebox",jIt="rangeslider-grabber-min",$It="rangeslider-grabarea-min",WIt="rangeslider-handle-min",YIt="rangeslider-grabber-max",XIt="rangeslider-grabarea-max",ZIt="rangeslider-handle-max",KIt="rangeslider-mask-min-opp-axis",JIt="rangeslider-mask-max-opp-axis",QIt="rgba(0,0,0,0.4)",eRt="rgba(0,0,0,0.2)",tRt="transparent",rRt="ew-resize",iRt="transparent",nRt="col-resize",aRt=10,oRt=4,sRt=1,lRt=1,uRt=15});var K5e=W(SL=>{"use strict";var cRt=Ls(),fRt=ao(),X5e=(AL(),Pt(TL)),hRt=(Jl(),Pt(Kl)).LINE_SPACING,ML=X5e.name;function Z5e(e){var t=e&&e[ML];return t&&t.visible}SL.isVisible=Z5e;SL.makeData=function(e){for(var t=cRt.list({_fullLayout:e},"x",!0),r=e.margin,i=[],n=0;n{"use strict";var EL=tt(),J5e=Ra(),Q5e=Ls(),dRt=wL(),pRt=xW();e4e.exports=function(t,r,i){var n=t[i],a=r[i];if(!(n.rangeslider||r._requestRangeslider[a._id]))return;EL.isPlainObject(n.rangeslider)||(n.rangeslider={});var o=n.rangeslider,s=J5e.newContainer(a,"rangeslider");function l(M,x){return EL.coerce(o,s,dRt,M,x)}var u,c;function f(M,x){return EL.coerce(u,c,pRt,M,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var p=r._subplots;if(p)for(var d=p.cartesian.filter(function(M){return M.slice(0,Math.max(0,M.indexOf("y")))===Q5e.name2id(i)}).map(function(M){return M.slice(M.indexOf("y"),M.length)}),v=EL.simpleMap(d,Q5e.id2name),m=0;m{"use strict";var vRt=Ls().list,gRt=Yp().getAutoRange,mRt=(AL(),Pt(TL));r4e.exports=function(t){for(var r=vRt(t,"x",!0),i=0;i{"use strict";var kL=gi(),yRt=xi(),xRt=Qo(),bl=tt(),CL=bl.strTranslate,a4e=Qi(),n2=ti(),bRt=pb(),_Rt=xl(),bW=Ls(),wRt=Ef(),TRt=Xp(),Aa=(AL(),Pt(TL));o4e.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i=R.max)F=E[P+1];else if(D=R.pmax)F=E[P+1];else if(D0?e.touches[0].clientX:0}function ARt(e,t,r,i){if(t._context.staticPlot)return;var n=e.select("rect."+Aa.slideBoxClassName).node(),a=e.select("rect."+Aa.grabAreaMinClassName).node(),o=e.select("rect."+Aa.grabAreaMaxClassName).node();function s(){var l=kL.event,u=l.target,c=n4e(l),f=c-e.node().getBoundingClientRect().left,h=i.d2p(r._rl[0]),p=i.d2p(r._rl[1]),d=wRt.coverSlip();this.addEventListener("touchmove",v),this.addEventListener("touchend",m),d.addEventListener("mousemove",v),d.addEventListener("mouseup",m);function v(g){var w=n4e(g),_=+w-c,b,M,x;switch(u){case n:if(x="ew-resize",h+_>r._length||p+_<0)return;b=h+_,M=p+_;break;case a:if(x="col-resize",h+_>r._length)return;b=h+_,M=p;break;case o:if(x="col-resize",p+_<0)return;b=h,M=p+_;break;default:x="ew-resize",b=f,M=f+_;break}if(M{"use strict";var IRt=tt(),RRt=wL(),zRt=xW(),_W=K5e();l4e.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:IRt.extendFlat({},RRt,{yaxis:zRt})}}},layoutAttributes:wL(),handleDefaults:t4e(),calcAutorange:i4e(),draw:s4e(),isVisible:_W.isVisible,makeData:_W.makeData,autoMarginOpts:_W.autoMarginOpts}});var DL=W((RVr,f4e)=>{"use strict";var BRt=jo(),c4e=Yl(),qRt=Ra().templatedArray,ORt=qRt("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});f4e.exports={visible:{valType:"boolean",editType:"plot"},buttons:ORt,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:BRt({editType:"plot"}),bgcolor:{valType:"color",dflt:c4e.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:c4e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var wW={};Jn(wW,{darkAmount:()=>jRt,lightAmount:()=>HRt,minButtonWidth:()=>URt,rx:()=>VRt,ry:()=>GRt,yPad:()=>NRt});var NRt,URt,VRt,GRt,HRt,jRt,TW=Ci(()=>{"use strict";NRt=.02,URt=30,VRt=3,GRt=3,HRt=25,jRt=10});var p4e=W((zVr,d4e)=>{"use strict";var FL=tt(),$Rt=ti(),WRt=Ra(),YRt=tf(),h4e=DL(),AW=(TW(),Pt(wW));d4e.exports=function(t,r,i,n,a){var o=t.rangeselector||{},s=WRt.newContainer(r,"rangeselector");function l(p,d){return FL.coerce(o,s,h4e,p,d)}var u=YRt(o,s,{name:"buttons",handleItemDefaults:XRt,calendar:a}),c=l("visible",u.length>0);if(c){var f=ZRt(r,i,n);l("x",f[0]),l("y",f[1]),FL.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),FL.coerceFont(l,"font",i.font);var h=l("bgcolor");l("activecolor",$Rt.contrast(h,AW.lightAmount,AW.darkAmount)),l("bordercolor"),l("borderwidth")}};function XRt(e,t,r,i){var n=i.calendar;function a(l,u){return FL.coerce(e,t,h4e.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(n&&n!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function ZRt(e,t,r){for(var i=r.filter(function(s){return t[s].anchor===e._id}),n=0,a=0;a{"use strict";var KRt=JN(),JRt=tt().titleCase;v4e.exports=function(t,r){var i=t._name,n={};if(r.step==="all")n[i+".autorange"]=!0;else{var a=QRt(t,r);n[i+".range[0]"]=a[0],n[i+".range[1]"]=a[1]}return n};function QRt(e,t){var r=e.range,i=new Date(e.r2l(r[1])),n=t.step,a=KRt["utc"+JRt(n)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(i,-o));break;case"todate":var l=a.offset(i,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var A4e=W((qVr,T4e)=>{"use strict";var PL=gi(),ezt=xi(),tzt=Qo(),m4e=ti(),w4e=Qi(),im=tt(),y4e=im.strTranslate,LL=ao(),rzt=Ls(),EW=(Jl(),Pt(Kl)),x4e=EW.LINE_SPACING,b4e=EW.FROM_TL,_4e=EW.FROM_BR,SW=(TW(),Pt(wW)),izt=g4e();T4e.exports=function(t){var r=t._fullLayout,i=r._infolayer.selectAll(".rangeselector").data(nzt(t),azt);i.enter().append("g").classed("rangeselector",!0),i.exit().remove(),i.style({cursor:"pointer","pointer-events":"all"}),i.each(function(n){var a=PL.select(this),o=n,s=o.rangeselector,l=a.selectAll("g.button").data(im.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=PL.select(this),f=izt(o,u);u._isActive=ozt(o,u,f),c.call(MW,s,u),c.call(lzt,s,u,t),c.on("click",function(){t._dragged||ezt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(MW,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(MW,s,u)})}),czt(t,l,s,o._name,a)})};function nzt(e){for(var t=rzt.list(e,"x",!0),r=[],i=0;i{"use strict";M4e.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:DL()}}},layoutAttributes:DL(),handleDefaults:p4e(),draw:A4e()}});var ds=W(kW=>{"use strict";var E4e=an().extendFlat;kW.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},i=e.name?e.name+" ":"",n=e.trace?"trace":"subplot",a=t.description?" "+t.description:"",o={x:E4e({},r,{}),y:E4e({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};kW.defaults=function(e,t,r,i){var n=i&&i.x||[0,1],a=i&&i.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var fzt=tt(),hzt=(fw(),Pt(fA)).counter,dzt=ds().attributes,k4e=(Zl(),Pt(Xl)).idRegex,pzt=Ra(),CW={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[hzt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[k4e.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[k4e.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:dzt({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function IL(e,t,r){var i=t[r+"axes"],n=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(i))return i;if(n.length)return n}function vzt(e,t){var r=e.grid||{},i=IL(t,r,"x"),n=IL(t,r,"y");if(!e.grid&&!i&&!n)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(i),s=Array.isArray(n),l=o&&i!==r.xaxes&&s&&n!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=n.length),o&&(c=i.length));var f=pzt.newContainer(t,"grid");function h(x,A){return fzt.coerce(r,f,CW,x,A)}var p=h("rows",u),d=h("columns",c);if(!(p*d>1)){delete t.grid;return}if(!a&&!o&&!s){var v=h("pattern")==="independent";v&&(a=!0)}f._hasSubplotGrid=a;var m=h("roworder"),g=m==="top to bottom",w=a?.2:.1,_=a?.3:.1,b,M;l&&t._splomGridDflt&&(b=t._splomGridDflt.xside,M=t._splomGridDflt.yside),f._domains={x:C4e("x",h,w,b,d),y:C4e("y",h,_,M,p,g)}}function C4e(e,t,r,i,n,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",i);for(var l=new Array(n),u=s[0],c=(s[1]-u)/(n-o),f=c*(1-o),h=0;h{"use strict";L4e.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var R4e=W((GVr,I4e)=>{"use strict";var P4e=hn(),mzt=xi(),yzt=tt(),xzt=Ra(),bzt=FW();I4e.exports=function(e,t,r,i){var n="error_"+i.axis,a=xzt.newContainer(t,n),o=e[n]||{};function s(d,v){return yzt.coerce(o,a,bzt,d,v)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var h="copy_"+i.inherit+"style";if(i.inherit){var p=t["error_"+i.inherit];(p||{}).visible&&s(h,!(o.color||P4e(o.thickness)||P4e(o.width)))}(!i.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",mzt.traceIs(t,"gl3d")?0:4))}}});var LW=W((HVr,B4e)=>{"use strict";B4e.exports=function(t){var r=t.type,i=t.symmetric;if(r==="data"){var n=t.array||[];if(i)return function(u,c){var f=+n[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+n[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=z4e(r,t.value),s=z4e(r,t.valueminus);return i||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function z4e(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var N4e=W((jVr,O4e)=>{"use strict";var PW=hn(),_zt=xi(),IW=Yi(),wzt=tt(),Tzt=LW();O4e.exports=function(t){for(var r=t.calcdata,i=0;i{"use strict";var U4e=gi(),a2=hn(),Azt=Qi(),Mzt=Wo();V4e.exports=function(t,r,i,n){var a,o=i.xaxis,s=i.yaxis,l=n&&n.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},p=f.error_y||{},d;f.ids&&(d=function(w){return w.id});var v=Mzt.hasMarkers(f)&&f.marker.maxdisplayed>0;!p.visible&&!h.visible&&(c=[]);var m=U4e.select(this).selectAll("g.errorbar").data(c,d);if(m.exit().remove(),!!c.length){h.visible||m.selectAll("path.xerror").remove(),p.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);l&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),Azt.setClipUrl(m,i.layerClipId,t),m.each(function(w){var _=U4e.select(this),b=Szt(w,o,s);if(!(v&&!w.vis)){var M,x=_.select("path.yerror");if(p.visible&&a2(b.x)&&a2(b.yh)&&a2(b.ys)){var A=p.width;M="M"+(b.x-A)+","+b.yh+"h"+2*A+"m-"+A+",0V"+b.ys,b.noYS||(M+="m-"+A+",0h"+2*A),a=!x.size(),a?x=_.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(n.duration).ease(n.easing)),x.attr("d",M)}else x.remove();var T=_.select("path.xerror");if(h.visible&&a2(b.y)&&a2(b.xh)&&a2(b.xs)){var y=(h.copy_ystyle?p:h).width;M="M"+b.xh+","+(b.y-y)+"v"+2*y+"m0,-"+y+"H"+b.xs,b.noXS||(M+="m0,-"+y+"v"+2*y),a=!T.size(),a?T=_.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(T=T.transition().duration(n.duration).ease(n.easing)),T.attr("d",M)}else T.remove()}})}})};function Szt(e,t,r){var i={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(i.yh=r.c2p(e.yh),i.ys=r.c2p(e.ys),a2(i.ys)||(i.noYS=!0,i.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),a2(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}});var $4e=W((WVr,j4e)=>{"use strict";var Ezt=gi(),H4e=ti();j4e.exports=function(t){t.each(function(r){var i=r[0].trace,n=i.error_y||{},a=i.error_x||{},o=Ezt.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(H4e.stroke,n.color),a.copy_ystyle&&(a=n),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(H4e.stroke,a.color)})}});var X4e=W((YVr,Y4e)=>{"use strict";var GM=tt(),W4e=hs().overrideAll,HM=FW(),Gb={error_x:GM.extendFlat({},HM),error_y:GM.extendFlat({},HM)};delete Gb.error_x.copy_zstyle;delete Gb.error_y.copy_zstyle;delete Gb.error_y.copy_ystyle;var jM={error_x:GM.extendFlat({},HM),error_y:GM.extendFlat({},HM),error_z:GM.extendFlat({},HM)};delete jM.error_x.copy_ystyle;delete jM.error_y.copy_ystyle;delete jM.error_z.copy_ystyle;delete jM.error_z.copy_zstyle;Y4e.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Gb,bar:Gb,histogram:Gb,scatter3d:W4e(jM,"calc","nested"),scattergl:W4e(Gb,"calc","nested")}},supplyDefaults:R4e(),calc:N4e(),makeComputeError:LW(),plot:G4e(),style:$4e(),hoverInfo:kzt};function kzt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Z4e={};Jn(Z4e,{cn:()=>Czt});var Czt,K4e=Ci(()=>{"use strict";Czt={colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}});var aTe=W((XVr,nTe)=>{"use strict";var o2=gi(),zL=Qo(),J4e=xi(),nm=Yi(),RL=Ef(),Rd=tt(),fv=Rd.strTranslate,iTe=an().extendFlat,RW=Xp(),cv=Qi(),m5=ti(),Dzt=pb(),Fzt=ao(),Lzt=Sc().flipScale,Pzt=PM(),Izt=aL(),Rzt=ac(),BW=(Jl(),Pt(Kl)),Q4e=BW.LINE_SPACING,eTe=BW.FROM_TL,tTe=BW.FROM_BR,Rs=(K4e(),Pt(Z4e)).cn;function zzt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Rs.colorbar).data(Bzt(e),function(i){return i._id});r.enter().append("g").attr("class",function(i){return i._id}).classed(Rs.colorbar,!0),r.each(function(i){var n=o2.select(this);Rd.ensureSingle(n,"rect",Rs.cbbg),Rd.ensureSingle(n,"g",Rs.cbfills),Rd.ensureSingle(n,"g",Rs.cblines),Rd.ensureSingle(n,"g",Rs.cbaxis,function(o){o.classed(Rs.crisp,!0)}),Rd.ensureSingle(n,"g",Rs.cbtitleunshift,function(o){o.append("g").classed(Rs.cbtitle,!0)}),Rd.ensureSingle(n,"rect",Rs.cboutline);var a=qzt(n,i,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Ozt(n,i,e)}),r.exit().each(function(i){zL.autoMargin(e,i._id)}).remove(),r.order()}function Bzt(e){var t=e._fullLayout,r=e.calcdata,i=[],n,a,o,s;function l(_){return iTe(_,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,n):(n._fillgradient=a.reversescale?Lzt(a.colorscale):a.colorscale,n._zrange=[a[s.min],a[s.max]])}for(var c=0;c[Math.min(e[0]+t,e[1]),e[1]],rTe=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];function qzt(e,t,r){var i=t.orientation==="v",n=t.len,a=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,h=t.yanchor,p=t.xpad,d=t.ypad,v=t.x,m=i?t.y:1-t.y,g=t.yref==="paper",w=t.xref==="paper",_=r._fullLayout,b=_._size,M=t._fillcolor,x=t._line,A=t.title,T=A.side,y=t._zrange||o2.extent((typeof M=="function"?M:x.color).domain()),E=typeof x.color=="function"?x.color:function(){return x.color},S=typeof M=="function"?M:function(){return M},C=t._levels,k=Nzt(r,t,y),D=k.fill,F=k.line,P=Math.round(o*(s==="fraction"?i?b.w:b.h:1)),R=P/(i?b.w:b.h),L=Math.round(n*(a==="fraction"?i?b.h:b.w:1)),I=L/(i?b.h:b.w),B=w?b.w:r._fullLayout.width,O=g?b.h:r._fullLayout.height,$=Math.round(i?v*B+p:m*O+d),X={center:.5,right:1}[f]||0,K={top:1,middle:.5}[h]||0,G=i?v-X*R:m-K*R,q=i?m-K*I:v-X*I,J=Math.round(i?O*(1-q):B*q);t._lenFrac=I,t._thickFrac=R,t._uFrac=G,t._vFrac=q;var N=t._axis=Uzt(r,t,y);N.position=R+(i?v+p/b.w:m+d/b.h);var V=["top","bottom"].indexOf(T)!==-1;if(i&&V&&(N.title.side=T,N.titlex=v+p/b.w,N.titley=q+(A.side==="top"?I-d/b.h:d/b.h)),!i&&!V&&(N.title.side=T,N.titley=m+d/b.h,N.titlex=q+p/b.w),x.color&&t.tickmode==="auto"){N.tickmode="linear",N.tick0=C.start;var Y=C.size,H=Rd.constrain(L/50,4,15)+1,j=(y[1]-y[0])/((t.nticks||H)*Y);if(j>1){var Q=Math.pow(10,Math.floor(Math.log(j)/Math.LN10));Y*=Q*Rd.roundUp(j/Q,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(N.tick0=0)}N.dtick=Y}var te=i?d/b.h:p/b.w;N.domain=rTe(zW([q,q+I],te),te),N.setScale(),e.attr("transform",fv(Math.round(b.l),Math.round(b.t)));var ue=e.select("."+Rs.cbtitleunshift).attr("transform",fv(-Math.round(b.l),-Math.round(b.t))),ge=N.ticklabelposition,Ee=N.title.font.size,xe=e.select("."+Rs.cbaxis),ce,oe=0,Se=0;function be(re,pe){var Te={propContainer:N,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:_._dfltTitle.colorbar,containerGroup:e.select("."+Rs.cbtitle)},Ce=re.charAt(0)==="h"?re.slice(1):"h"+re;e.selectAll("."+Ce+",."+Ce+"-math-group").remove(),Dzt.draw(r,re,iTe(Te,pe||{}))}function fe(){if(i&&V||!i&&!V){var re,pe;T==="top"&&(re=p+b.l+B*v,pe=d+b.t+O*(1-q-I)+3+Ee*.75),T==="bottom"&&(re=p+b.l+B*v,pe=d+b.t+O*(1-q)-3-Ee*.25),T==="right"&&(pe=d+b.t+O*m+3+Ee*.75,re=p+b.l+B*q),be(N._id+"title",{attributes:{x:re,y:pe,"text-anchor":i?"start":"middle"}})}}function ee(){if(i&&!V||!i&&V){var re=N.position||0,pe=N._offset+N._length/2,Te,Ce;if(T==="right")Ce=pe,Te=b.l+B*re+10+Ee*(N.showticklabels?1:.5);else if(Te=pe,T==="bottom"&&(Ce=b.t+O*re+10+(ge.indexOf("inside")===-1?N.tickfont.size:0)+(N.ticks!=="inside"&&t.ticklen||0)),T==="top"){var ze=A.text.split("
").length;Ce=b.t+O*re+10-P-Q4e*Ee*ze}be((i?"h":"v")+N._id+"title",{avoid:{selection:o2.select(r).selectAll("g."+N._id+"tick"),side:T,offsetTop:i?0:b.t,offsetLeft:i?b.l:0,maxShift:i?_.width:_.height},attributes:{x:Te,y:Ce,"text-anchor":"middle"},transform:{rotate:i?-90:0,offset:0}})}}function ae(){if(!i&&!V||i&&V){var re=e.select("."+Rs.cbtitle),pe=re.select("text"),Te=[-l/2,l/2],Ce=re.select(".h"+N._id+"title-math-group").node(),ze=15.6;pe.node()&&(ze=parseInt(pe.node().style.fontSize,10)*Q4e);var we;if(Ce?(we=cv.bBox(Ce),Se=we.width,oe=we.height,oe>ze&&(Te[1]-=(oe-ze)/2)):pe.node()&&!pe.classed(Rs.jsPlaceholder)&&(we=cv.bBox(pe.node()),Se=we.width,oe=we.height),i){if(oe){if(oe+=5,T==="top")N.domain=rTe(N.domain,oe/b.h),Te[1]*=-1;else{N.domain=zW(N.domain,oe/b.h);var me=Fzt.lineCount(pe);Te[1]+=(1-me)*ze}re.attr("transform",fv(Te[0],Te[1])),N.setScale()}}else Se&&(T==="right"&&(N.domain=zW(N.domain,(Se+Ee/2)/b.w)),re.attr("transform",fv(Te[0],Te[1])),N.setScale())}e.selectAll("."+Rs.cbfills+",."+Rs.cblines).attr("transform",i?fv(0,Math.round(b.h*(1-N.domain[1]))):fv(Math.round(b.w*N.domain[0]),0)),xe.attr("transform",i?fv(0,Math.round(-b.t)):fv(Math.round(-b.l),0));var Le=e.select("."+Rs.cbfills).selectAll("rect."+Rs.cbfill).attr("style","").data(D);Le.enter().append("rect").classed(Rs.cbfill,!0).attr("style",""),Le.exit().remove();var Ne=y.map(N.c2p).map(Math.round).sort(function(St,Ke){return St-Ke});Le.each(function(St,Ke){var bt=[Ke===0?y[0]:(D[Ke]+D[Ke-1])/2,Ke===D.length-1?y[1]:(D[Ke]+D[Ke+1])/2].map(N.c2p).map(Math.round);i&&(bt[1]=Rd.constrain(bt[1]+(bt[1]>bt[0])?1:-1,Ne[0],Ne[1]));var pt=o2.select(this).attr(i?"x":"y",$).attr(i?"y":"x",o2.min(bt)).attr(i?"width":"height",Math.max(P,2)).attr(i?"height":"width",Math.max(o2.max(bt)-o2.min(bt),2));if(t._fillgradient)cv.gradient(pt,r,t._id,i?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Oe=S(St).replace("e-","");pt.attr("fill",m5.hexString(Oe))}});var Je=e.select("."+Rs.cblines).selectAll("path."+Rs.cbline).data(x.color&&x.width?F:[]);Je.enter().append("path").classed(Rs.cbline,!0),Je.exit().remove(),Je.each(function(St){var Ke=$,bt=Math.round(N.c2p(St))+x.width/2%1;o2.select(this).attr("d","M"+(i?Ke+","+bt:bt+","+Ke)+(i?"h":"v")+P).call(cv.lineGroupStyle,x.width,E(St),x.dash)}),xe.selectAll("g."+N._id+"tick,path").remove();var rt=$+P+(l||0)/2-(t.ticks==="outside"?1:0),mt=nm.calcTicks(N),dt=nm.getTickSigns(N)[2];return nm.drawTicks(r,N,{vals:N.ticks==="inside"?nm.clipEnds(N,mt):mt,layer:xe,path:nm.makeTickPath(N,rt,dt),transFn:nm.makeTransTickFn(N)}),nm.drawLabels(r,N,{vals:mt,layer:xe,transFn:nm.makeTransTickLabelFn(N),labelFns:nm.makeLabelFns(N,rt)})}function _e(){var re,pe=P+l/2;ge.indexOf("inside")===-1&&(re=cv.bBox(xe.node()),pe+=i?re.width:re.height),ce=ue.select("text");var Te=0,Ce=i&&T==="top",ze=!i&&T==="right",we=0;if(ce.node()&&!ce.classed(Rs.jsPlaceholder)){var me,Le=ue.select(".h"+N._id+"title-math-group").node();Le&&(i&&V||!i&&!V)?(re=cv.bBox(Le),Te=re.width,me=re.height):(re=cv.bBox(ue.node()),Te=re.right-b.l-(i?$:J),me=re.bottom-b.t-(i?J:$),!i&&T==="top"&&(pe+=re.height,we=re.height)),ze&&(ce.attr("transform",fv(Te/2+Ee/2,0)),Te*=2),pe=Math.max(pe,i?Te:me)}var Ne=(i?p:d)*2+pe+u+l/2,Je=0;!i&&A.text&&h==="bottom"&&m<=0&&(Je=Ne/2,Ne+=Je,we+=Je),_._hColorbarMoveTitle=Je,_._hColorbarMoveCBTitle=we;var rt=u+l,mt=(i?$:J)-rt/2-(i?p:0),dt=(i?J:$)-(i?L:d+we-Je);e.select("."+Rs.cbbg).attr("x",mt).attr("y",dt).attr(i?"width":"height",Math.max(Ne-Je,2)).attr(i?"height":"width",Math.max(L+rt,2)).call(m5.fill,c).call(m5.stroke,t.bordercolor).style("stroke-width",u);var St=ze?Math.max(Te-10,0):0;e.selectAll("."+Rs.cboutline).attr("x",(i?$:J+p)+St).attr("y",(i?J+d-L:$)+(Ce?oe:0)).attr(i?"width":"height",Math.max(P,2)).attr(i?"height":"width",Math.max(L-(i?2*d+oe:2*p+St),2)).call(m5.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Ke=i?X*Ne:0,bt=i?0:(1-K)*Ne-we;if(Ke=w?b.l-Ke:-Ke,bt=g?b.t-bt:-bt,e.attr("transform",fv(Ke,bt)),!i&&(u||m5.opacity(c)&&!m5.equals(_.paper_bgcolor,c))){var pt=xe.selectAll("text"),Oe=pt[0].length,Ue=e.select("."+Rs.cbbg).node(),je=cv.bBox(Ue),$e=cv.getTranslate(e),Ie=2;pt.each(function(Cr,Ge){var Qe=0,nt=Oe-1;if(Ge===Qe||Ge===nt){var gt=cv.bBox(this),ht=cv.getTranslate(this),Ft;if(Ge===nt){var hr=gt.right+ht.x,Ut=je.right+$e.x+J-u-Ie+v;Ft=Ut-hr,Ft>0&&(Ft=0)}else if(Ge===Qe){var Lr=gt.left+ht.x,jr=je.left+$e.x+J+u+Ie;Ft=jr-Lr,Ft<0&&(Ft=0)}Ft&&(Oe<3?this.setAttribute("transform","translate("+Ft+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Ve={},st=eTe[f],_t=tTe[f],Wt=eTe[h],Ht=tTe[h],fr=Ne-P;i?(a==="pixels"?(Ve.y=m,Ve.t=L*Wt,Ve.b=L*Ht):(Ve.t=Ve.b=0,Ve.yt=m+n*Wt,Ve.yb=m-n*Ht),s==="pixels"?(Ve.x=v,Ve.l=Ne*st,Ve.r=Ne*_t):(Ve.l=fr*st,Ve.r=fr*_t,Ve.xl=v-o*st,Ve.xr=v+o*_t)):(a==="pixels"?(Ve.x=v,Ve.l=L*st,Ve.r=L*_t):(Ve.l=Ve.r=0,Ve.xl=v+n*st,Ve.xr=v-n*_t),s==="pixels"?(Ve.y=1-m,Ve.t=Ne*Wt,Ve.b=Ne*Ht):(Ve.t=fr*Wt,Ve.b=fr*Ht,Ve.yt=m-o*Wt,Ve.yb=m+o*Ht));var lr=t.y<.5?"b":"t",Ot=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Jt={r:_.width-mt-Ke,l:mt+Ve.r,b:_.height-dt-bt,t:dt+Ve.b};w&&g?zL.autoMargin(r,t._id,Ve):w?r._fullLayout._reservedMargin[t._id][lr]=Jt[lr]:g||i?r._fullLayout._reservedMargin[t._id][Ot]=Jt[Ot]:r._fullLayout._reservedMargin[t._id][lr]=Jt[lr]}return Rd.syncOrAsync([zL.previousPromises,fe,ae,ee,zL.previousPromises,_e],r)}function Ozt(e,t,r){var i=t.orientation==="v",n=r._fullLayout,a=n._size,o,s,l;RL.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),RW(e)},moveFn:function(u,c){e.attr("transform",o+fv(u,c)),s=RL.align((i?t._uFrac:t._vFrac)+u/a.w,i?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=RL.align((i?t._vFrac:1-t._uFrac)-c/a.h,i?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=RL.getCursor(s,l,t.xanchor,t.yanchor);RW(e,f)},doneFn:function(){if(RW(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?J4e.call("_guiRestyle",r,u,t._traceIndex):J4e.call("_guiRelayout",r,u)}}})}function Nzt(e,t,r){var i=t._levels,n=[],a=[],o,s,l=i.end+i.size/100,u=i.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=i.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";oTe.exports={moduleType:"component",name:"colorbar",attributes:YD(),supplyDefaults:VG(),draw:aTe().draw,hasColorbar:RG()}});var uTe=W((KVr,lTe)=>{"use strict";lTe.exports={moduleType:"component",name:"legend",layoutAttributes:BH(),supplyLayoutDefaults:OH(),draw:QH(),style:XH()}});var fTe=W((JVr,cTe)=>{"use strict";cTe.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}});var dTe=W((QVr,hTe)=>{"use strict";hTe.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var OW=W((eGr,mTe)=>{"use strict";var Vzt=xi(),gTe=tt(),qW=gTe.extendFlat,pTe=gTe.extendDeep;function vTe(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function Gzt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}mTe.exports=function(t,r){var i,n=t.data,a=t.layout,o=pTe([],n),s=pTe({},a,vTe(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(i=0;i{"use strict";var Hzt=ib().EventEmitter,jzt=xi(),$zt=tt(),yTe=em(),Wzt=OW(),Yzt=OF(),Xzt=NF();function Zzt(e,t){var r=new Hzt,i=Wzt(e,{format:"png"}),n=i.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function a(){var s=yTe.getDelay(n._fullLayout);setTimeout(function(){var l=Yzt(n),u=document.createElement("canvas");u.id=$zt.randstr(),r=Xzt({format:t.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){n&&document.body.removeChild(n)}},s)}var o=yTe.getRedrawFunc(n);return jzt.call("_doPlot",n,i.data,i.layout,i.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}xTe.exports=Zzt});var TTe=W((rGr,wTe)=>{"use strict";var _Te=em(),Kzt={getDelay:_Te.getDelay,getRedrawFunc:_Te.getRedrawFunc,clone:OW(),toSVG:OF(),svgToImg:NF(),toImage:bTe(),downloadImage:y$()};wTe.exports=Kzt});var MTe=W(am=>{"use strict";am.version=N6().version;eue();qde();var Jzt=xi(),$M=am.register=Jzt.register,UW=Xbe(),ATe=Object.keys(UW);for(BL=0;BL{"use strict";STe.exports=MTe()});var R1=W((aGr,LTe)=>{"use strict";var sl=Ws(),kTe=Ts().axisHoverFormat,{hovertemplateAttrs:Qzt,texttemplateAttrs:eBt,templatefallbackAttrs:CTe}=Wa(),FTe=Fo(),tBt=jo(),DTe=(Qy(),Pt(Jy)),rBt=zu().pattern,Hb=an().extendFlat,VW=tBt({editType:"calc",arrayOk:!0,colorEditType:"style"}),iBt=sl.marker,nBt=iBt.line,aBt=Hb({},nBt.width,{dflt:0}),oBt=Hb({width:aBt,editType:"calc"},FTe("marker.line")),sBt=Hb({line:oBt,editType:"calc"},FTe("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:rBt,cornerradius:{valType:"any",editType:"calc"}});LTe.exports={x:sl.x,x0:sl.x0,dx:sl.dx,y:sl.y,y0:sl.y0,dy:sl.dy,xperiod:sl.xperiod,yperiod:sl.yperiod,xperiod0:sl.xperiod0,yperiod0:sl.yperiod0,xperiodalignment:sl.xperiodalignment,yperiodalignment:sl.yperiodalignment,xhoverformat:kTe("x"),yhoverformat:kTe("y"),text:sl.text,texttemplate:eBt({editType:"plot"},{keys:DTe.eventDataKeys}),texttemplatefallback:CTe({editType:"plot"}),hovertext:sl.hovertext,hovertemplate:Qzt({},{keys:DTe.eventDataKeys}),hovertemplatefallback:CTe(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Hb({},VW,{}),insidetextfont:Hb({},VW,{}),outsidetextfont:Hb({},VW,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Hb({},sl.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:sBt,offsetgroup:sl.offsetgroup,alignmentgroup:sl.alignmentgroup,selected:{marker:{opacity:sl.selected.marker.opacity,color:sl.selected.marker.color,editType:"style"},textfont:sl.selected.textfont,editType:"style"},unselected:{marker:{opacity:sl.unselected.marker.opacity,color:sl.unselected.marker.color,editType:"style"},textfont:sl.unselected.textfont,editType:"style"},zorder:sl.zorder}});var OL=W((oGr,PTe)=>{"use strict";PTe.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var NL=W((sGr,zTe)=>{"use strict";var lBt=ti(),ITe=Sc().hasColorscale,RTe=Bu(),uBt=tt().coercePattern;zTe.exports=function(t,r,i,n,a){var o=i("marker.color",n),s=ITe(t,"marker");s&&RTe(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("marker.line.color",lBt.defaultLine),ITe(t,"marker.line")&&RTe(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width"),i("marker.opacity"),uBt(i,"marker.pattern",o,s),i("selected.marker.color"),i("unselected.marker.color")}});var I0=W((lGr,VTe)=>{"use strict";var BTe=hn(),x5=tt(),qTe=ti(),cBt=xi(),fBt=Lb(),hBt=ev(),dBt=NL(),pBt=Pb(),OTe=R1(),UL=x5.coerceFont;function vBt(e,t,r,i){function n(u,c){return x5.coerce(e,t,OTe,u,c)}var a=fBt(e,t,i,n);if(!a){t.visible=!1;return}hBt(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",t.x&&!t.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var o=n("textposition");UTe(e,t,i,n,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),dBt(e,t,n,r,i);var s=(t.marker.line||{}).color,l=cBt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||qTe.defaultLine,{axis:"y"}),l(e,t,s||qTe.defaultLine,{axis:"x",inherit:"y"}),x5.coerceSelectionMarkerOpacity(t,n)}function gBt(e,t){var r,i;function n(s,l){return x5.coerce(i._input,i,OTe,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&BTe(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function UTe(e,t,r,i,n,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,p=Array.isArray(n)||n==="auto",d=p||n==="inside",v=p||n==="outside";if(d||v){var m=UL(i,"textfont",r.font),g=x5.extendFlat({},m),w=e.textfont&&e.textfont.color,_=!w;if(_&&delete g.color,UL(i,"insidetextfont",g),h){var b=x5.extendFlat({},m);_&&delete b.color,UL(i,"pathbar.textfont",b)}v&&UL(i,"outsidetextfont",m),o&&i("selected.textfont.color"),s&&i("unselected.textfont.color"),l&&i("constraintext"),u&&i("cliponaxis"),c&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}d&&f&&i("insidetextanchor")}VTe.exports={supplyDefaults:vBt,crossTraceDefaults:gBt,handleText:UTe,validateCornerradius:NTe}});var GW=W((uGr,GTe)=>{"use strict";var mBt=xi(),yBt=Yi(),xBt=tt(),bBt=OL(),_Bt=I0().validateCornerradius;GTe.exports=function(e,t,r){function i(v,m){return xBt.coerce(e,t,bBt,v,m)}for(var n=!1,a=!1,o=!1,s={},l=i("barmode"),u=l==="group",c=0;c0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var p=yBt.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);p.type!=="category"&&(a=!0)}}if(!n){delete t.barmode;return}l!=="overlay"&&i("barnorm"),i("bargap",a&&!o?0:.2),i("bargroupgap");var d=i("barcornerradius");t.barcornerradius=_Bt(d)}});var WM=W((cGr,HTe)=>{"use strict";var b5=tt();HTe.exports=function(t,r){for(var i=0;i{"use strict";var jTe=Yi(),$Te=iv(),WTe=Sc().hasColorscale,YTe=rf(),wBt=WM(),TBt=C0();XTe.exports=function(t,r){var i=jTe.getFromId(t,r.xaxis||"x"),n=jTe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=i.makeCalcdata(r,"x",f),s=n.makeCalcdata(r,"y"),l=$Te(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y",f),s=i.makeCalcdata(r,"x"),l=$Te(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),p=new Array(h),d=0;d{"use strict";var ABt=gi(),MBt=tt();function SBt(e,t,r){var i=e._fullLayout,n=i["_"+r+"Text_minsize"];if(n){var a=i.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:n/l.fontSize;var u=ABt.select(this).select("text");MBt.setTransormAndDisplay(u,l)}})}}function EBt(e,t,r){if(r.uniformtext.mode){var i=KTe(e),n=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var CBt=ti(),DBt=hn(),QTe=tt().isArrayOrTypedArray;jb.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};jb.coerceNumber=function(e,t,r){if(DBt(t)){t=+t;var i=e.min,n=e.max,a=i!==void 0&&tn;if(!a)return t}return r!==void 0?r:e.dflt};jb.coerceColor=function(e,t,r){return CBt.isValid(t)?t:r!==void 0?r:e.dflt};jb.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};jb.getValue=function(e,t){var r;return QTe(e)?t{"use strict";var YM=gi(),FBt=ti(),XM=Qi(),e6e=tt(),t6e=xi(),r6e=of().resizeText,HW=R1(),LBt=HW.textfont,PBt=HW.insidetextfont,IBt=HW.outsidetextfont,Dc=VL();function RBt(e){var t=YM.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");r6e(e,t,"bar");var r=t.size(),i=e._fullLayout;t.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(i.barmode==="stack"&&r>1||i.bargap===0&&i.bargroupgap===0&&!n[0].trace.marker.line.width)&&YM.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(n){var a=YM.select(this),o=n[0].trace;i6e(a,o,e)}),t6e.getComponentMethod("errorbars","style")(t)}function i6e(e,t,r){XM.pointStyle(e.selectAll("path"),t,r),n6e(e,t,r)}function n6e(e,t,r){e.selectAll("text").each(function(i){var n=YM.select(this),a=e6e.ensureUniformFontSize(r,a6e(n,i,t,r));XM.font(n,a)})}function zBt(e,t,r){var i=t[0].trace;i.selectedpoints?BBt(r,i,e):(i6e(r,i,e),t6e.getComponentMethod("errorbars","style")(r))}function BBt(e,t,r){XM.selectedPointStyle(e.selectAll("path"),t),qBt(e.selectAll("text"),t,r)}function qBt(e,t,r){e.each(function(i){var n=YM.select(this),a;if(i.selected){a=e6e.ensureUniformFontSize(r,a6e(n,i,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),XM.font(n,a)}else XM.selectedTextStyle(n,t)})}function a6e(e,t,r,i){var n=i._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=u6e(t,r);a=s6e(r,t.i,n,o)}else e.classed("bartext-outside")&&(a=l6e(r,t.i,n));return a}function o6e(e,t,r){return jW(LBt,e.textfont,t,r)}function s6e(e,t,r,i){var n=o6e(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(n={color:FBt.contrast(i),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),jW(PBt,e.insidetextfont,t,n)}function l6e(e,t,r){var i=o6e(e,t,r);return jW(IBt,e.outsidetextfont,t,i)}function jW(e,t,r,i){t=t||{};var n=Dc.getValue(t.family,r),a=Dc.getValue(t.size,r),o=Dc.getValue(t.color,r),s=Dc.getValue(t.weight,r),l=Dc.getValue(t.style,r),u=Dc.getValue(t.variant,r),c=Dc.getValue(t.textcase,r),f=Dc.getValue(t.lineposition,r),h=Dc.getValue(t.shadow,r);return{family:Dc.coerceString(e.family,n,i.family),size:Dc.coerceNumber(e.size,a,i.size),color:Dc.coerceColor(e.color,o,i.color),weight:Dc.coerceString(e.weight,s,i.weight),style:Dc.coerceString(e.style,l,i.style),variant:Dc.coerceString(e.variant,u,i.variant),textcase:Dc.coerceString(e.variant,c,i.textcase),lineposition:Dc.coerceString(e.variant,f,i.lineposition),shadow:Dc.coerceString(e.variant,h,i.shadow)}}function u6e(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}c6e.exports={style:RBt,styleTextPoints:n6e,styleOnSelect:zBt,getInsideTextFont:s6e,getOutsideTextFont:l6e,getBarColor:u6e,resizeText:r6e}});var Wb=W((vGr,y6e)=>{"use strict";var GL=gi(),HL=hn(),sc=tt(),OBt=ao(),NBt=ti(),s2=Qi(),UBt=xi(),jL=Yi().tickText,f6e=of(),VBt=f6e.recordMinTextSize,GBt=f6e.clearMinTextSize,$W=zd(),_5=VL(),HBt=(Qy(),Pt(Jy)),h6e=R1(),jBt=h6e.text,$Bt=h6e.textposition,WBt=ah().appendArrayPointValue,If=HBt.TEXTPAD;function YBt(e){return e.id}function XBt(e){if(e.ids)return YBt}function WW(e){return(e>0)-(e<0)}function hv(e,t){return e0}function KBt(e,t,r,i,n,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;n||(n={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},GBt("bar",l));var c=sc.makeTraceGroups(i,r,"trace bars").each(function(f){var h=GL.select(this),p=f[0].trace,d=f[0].t,v=p.type==="waterfall",m=p.type==="funnel",g=p.type==="histogram",w=p.type==="bar",_=w||m,b=0;v&&p.connector.visible&&p.connector.mode==="between"&&(b=p.connector.line.width/2);var M=p.orientation==="h",x=p6e(n),A=sc.ensureSingle(h,"g","points"),T=XBt(p),y=A.selectAll("g.point").data(sc.identity,T);y.enter().append("g").classed("point",!0),y.exit().remove(),y.each(function(S,C){var k=GL.select(this),D=ZBt(S,o,s,M),F=D[0][0],P=D[0][1],R=D[1][0],L=D[1][1],I=(M?P-F:L-R)===0;I&&_&&_5.getLineWidth(p,S)&&(I=!1),I||(I=!HL(F)||!HL(P)||!HL(R)||!HL(L)),S.isBlank=I,I&&(M?P=F:L=R),b&&!I&&(M?(F-=hv(F,P)*b,P+=hv(F,P)*b):(R-=hv(R,L)*b,L+=hv(R,L)*b));var B,O;if(p.type==="waterfall"){if(!I){var $=p[S.dir].marker;B=$.line.width,O=$.color}}else B=_5.getLineWidth(p,S),O=S.mc||p.marker.color;function X(re){var pe=GL.round(B/2%1,2);return n.gap===0&&n.groupgap===0?GL.round(Math.round(re)-pe,2):re}function K(re,pe,Te){return Te&&re===pe?re:Math.abs(re-pe)>=2?X(re):re>pe?Math.ceil(re):Math.floor(re)}var G=NBt.opacity(O),q=G<1||B>.01?X:K;e._context.staticPlot||(F=q(F,P,M),P=q(P,F,M),R=q(R,L,!M),L=q(L,R,!M));var J=M?o.c2p:s.c2p,N;S.s0>0?N=S._sMax:S.s0<0?N=S._sMin:N=S.s1>0?S._sMax:S._sMin;function V(re,pe){if(!re)return 0;var Te=Math.abs(M?L-R:P-F),Ce=Math.abs(M?P-F:L-R),ze=q(Math.abs(J(N,!0)-J(0,!0))),we=S.hasB?Math.min(Te/2,Ce/2):Math.min(Te/2,ze),me;if(pe==="%"){var Le=Math.min(50,re);me=Te*(Le/100)}else me=re;return q(Math.max(Math.min(me,we),0))}var Y=w||g?V(d.cornerradiusvalue,d.cornerradiusform):0,H,j,Q="M"+F+","+R+"V"+L+"H"+P+"V"+R+"Z",te=0;if(Y&&S.s){var ue=WW(S.s0)===0||WW(S.s)===WW(S.s0)?S.s1:S.s0;if(te=q(S.hasB?0:Math.abs(J(N,!0)-J(ue,!0))),te0?Math.sqrt(te*(2*Y-te)):0,Se=ge>0?Math.max:Math.min;H="M"+F+","+R+"V"+(L-ce*Ee)+"H"+Se(P-(Y-te)*ge,F)+"A "+Y+","+Y+" 0 0 "+xe+" "+P+","+(L-Y*Ee-oe)+"V"+(R+Y*Ee+oe)+"A "+Y+","+Y+" 0 0 "+xe+" "+Se(P-(Y-te)*ge,F)+","+(R+ce*Ee)+"Z"}else if(S.hasB)H="M"+(F+Y*ge)+","+R+"A "+Y+","+Y+" 0 0 "+xe+" "+F+","+(R+Y*Ee)+"V"+(L-Y*Ee)+"A "+Y+","+Y+" 0 0 "+xe+" "+(F+Y*ge)+","+L+"H"+(P-Y*ge)+"A "+Y+","+Y+" 0 0 "+xe+" "+P+","+(L-Y*Ee)+"V"+(R+Y*Ee)+"A "+Y+","+Y+" 0 0 "+xe+" "+(P-Y*ge)+","+R+"Z";else{j=Math.abs(L-R)+te;var be=j0?Math.sqrt(te*(2*Y-te)):0,ee=Ee>0?Math.max:Math.min;H="M"+(F+be*ge)+","+R+"V"+ee(L-(Y-te)*Ee,R)+"A "+Y+","+Y+" 0 0 "+xe+" "+(F+Y*ge-fe)+","+L+"H"+(P-Y*ge+fe)+"A "+Y+","+Y+" 0 0 "+xe+" "+(P-be*ge)+","+ee(L-(Y-te)*Ee,R)+"V"+R+"Z"}}else H=Q}else H=Q;var ae=d6e(sc.ensureSingle(k,"path"),l,n,a);if(ae.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((P-F)*(L-R))||I&&e._context.staticPlot?"M0,0Z":H).call(s2.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var _e=s2.makePointStyleFns(p);s2.singlePointStyle(S,ae,p,_e,e)}JBt(e,t,k,f,C,F,P,R,L,Y,te,n,a),t.layerClipId&&s2.hideOutsideRangePoint(S,k.select("text"),o,s,p.xcalendar,p.ycalendar)});var E=p.cliponaxis===!1;s2.setClipUrl(h,E?null:t.layerClipId,e)});UBt.getComponentMethod("errorbars","plot")(e,c,t,n)}function JBt(e,t,r,i,n,a,o,s,l,u,c,f,h){var p=t.xaxis,d=t.yaxis,v=e._fullLayout,m;function g(Q,te,ue){var ge=sc.ensureSingle(Q,"text").text(te).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(s2.font,ue).call(OBt.convertToTspans,e);return ge}var w=i[0].trace,_=w.orientation==="h",b=iqt(i,_,p,d),M=tqt(v,i,n,p,d);m=rqt(w,n);var x=f.mode==="stack"||f.mode==="relative",A=i[n],T=!x||A._outmost,y=A.hasB,E=u&&u-c>If;if(!M||m==="none"||(A.isBlank||a===o||s===l)&&(m==="auto"||m==="inside")){r.select("text").remove();return}var S=v.font,C=$W.getBarColor(i[n],w),k=$W.getInsideTextFont(w,n,S,C),D=$W.getOutsideTextFont(w,n,S),F=w.insidetextanchor||"end",P=r.datum();_?p.type==="log"&&P.s0<=0&&(p.range[0]0&&K>0,J;E?y?J=$b(I-2*u,B,X,K,_)||$b(I,B-2*u,X,K,_):_?J=$b(I-(u-c),B,X,K,_)||$b(I,B-2*(u-c),X,K,_):J=$b(I,B-(u-c),X,K,_)||$b(I-2*(u-c),B,X,K,_):J=$b(I,B,X,K,_),q&&J?m="inside":(m="outside",O.remove(),O=null)}else m="inside";if(!O){G=sc.ensureUniformFontSize(e,m==="outside"?D:k),O=g(r,M,G);var N=O.attr("transform");if(O.attr("transform",""),$=s2.bBox(O.node()),X=$.width,K=$.height,O.attr("transform",N),X<=0||K<=0){O.remove();return}}var V=w.textangle,Y,H;m==="outside"?(H=w.constraintext==="both"||w.constraintext==="outside",Y=eqt(a,o,s,l,$,{isHorizontal:_,constrained:H,angle:V,zeroBarDir:b})):(H=w.constraintext==="both"||w.constraintext==="inside",Y=m6e(a,o,s,l,$,{isHorizontal:_,constrained:H,angle:V,anchor:F,hasB:y,r:u,overhead:c})),Y.fontSize=G.size,VBt(w.type==="histogram"?"bar":w.type,Y,v),A.transform=Y;var j=d6e(O,v,f,h);sc.setTransormAndDisplay(j,Y)}function $b(e,t,r,i,n){if(e<0||t<0)return!1;var a=r<=e&&i<=t,o=r<=t&&i<=e,s=n?e>=r*(t/i):t>=i*(e/r);return a||o||s}function v6e(e){return e==="auto"?0:e}function g6e(e,t){var r=Math.PI/180*t,i=Math.abs(Math.sin(r)),n=Math.abs(Math.cos(r));return{x:e.width*n+e.height*i,y:e.width*i+e.height*n}}function m6e(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,p=(h+1)/2,d=1-p,v=a.hasB,m=a.r,g=a.overhead,w=n.width,_=n.height,b=Math.abs(t-e),M=Math.abs(i-r),x=b>2*If&&M>2*If?If:0;b-=2*x,M-=2*x;var A=v6e(l);l==="auto"&&!(w<=b&&_<=M)&&(w>b||_>M)&&(!(w>M||_>b)||w<_!=bIf){var S=QBt(e,t,r,i,T,m,g,o,v);y=S.scale,E=S.pad}else y=1,s&&(y=Math.min(1,b/T.x,M/T.y)),E=0;var C=n.left*d+n.right*p,k=(n.top+n.bottom)/2,D=(e+If)*d+(t-If)*p,F=(r+i)/2,P=0,R=0;if(f||c){var L=(o?T.x:T.y)/2;m&&(c||v)&&(x+=E);var I=o?hv(e,t):hv(r,i);o?f?(D=e+I*x,P=-I*L):(D=t-I*x,P=I*L):f?(F=r+I*x,R=-I*L):(F=i-I*x,R=I*L)}return{textX:C,textY:k,targetX:D,targetY:F,anchorX:P,anchorY:R,scale:y,rotate:A}}function QBt(e,t,r,i,n,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*If),c=Math.max(0,Math.abs(i-r)-2*If),f=a-If,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,p=l?f*2:s?f-o:2*h,d=l?f*2:s?2*h:f-o,v,m,g,w,_;return n.y/n.x>=c/(u-p)?w=c/n.y:n.y/n.x<=(c-d)/u?w=u/n.x:!l&&s?(v=n.x*n.x+n.y*n.y/4,m=-2*n.x*(u-f)-n.y*(c/2-f),g=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)):l?(v=(n.x*n.x+n.y*n.y)/4,m=-n.x*(u/2-f)-n.y*(c/2-f),g=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)):(v=n.x*n.x/4+n.y*n.y,m=-n.x*(u/2-f)-2*n.y*(c-f),g=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)),w=Math.min(1,w),s?_=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-n.y*w)/2)*(f-(c-n.y*w)/2)))-o):_=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-n.x*w)/2)*(f-(u-n.x*w)/2)))-o),{scale:w,pad:_}}function eqt(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=n.width,c=n.height,f=Math.abs(t-e),h=Math.abs(i-r),p;o?p=h>2*If?If:0:p=f>2*If?If:0;var d=1;s&&(d=o?Math.min(1,h/c):Math.min(1,f/u));var v=v6e(l),m=g6e(n,v),g=(o?m.x:m.y)/2,w=(n.left+n.right)/2,_=(n.top+n.bottom)/2,b=(e+t)/2,M=(r+i)/2,x=0,A=0,T;return(o?e===t:r===i)&&a.zeroBarDir?T=a.zeroBarDir:T=o?hv(t,e):hv(r,i),o?(b=t-T*p,x=T*g):(M=i+T*p,A=-T*g),{textX:w,textY:_,targetX:b,targetY:M,anchorX:x,anchorY:A,scale:d,rotate:v}}function tqt(e,t,r,i,n){var a=t[0].trace,o=a.texttemplate,s;return o?s=nqt(e,t,r,i,n):a.textinfo?s=aqt(t,r,i,n):s=_5.getValue(a.text,r),_5.coerceString(jBt,s)}function rqt(e,t){var r=_5.getValue(e.textposition,t);return _5.coerceEnumerated($Bt,r)}function iqt(e,t,r,i){for(var n=!1,a=!1,o=0;o0?n=!0:s<0&&(a=!0),n&&a)return 0}var l=t?r:i,u=-hv(l.range[0],l.range[1]);return a?n?0:-u:u}function nqt(e,t,r,i,n){var a=t[0].trace,o=sc.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,p,d;c?(f="y",h=n,p="x",d=i):(f="x",h=i,p="y",d=n);function v(x){return jL(h,h.c2l(x),!0).text}function m(x){return jL(d,d.c2l(x),!0).text}var g=t[r],w={};w.label=g.p,w.labelLabel=w[f+"Label"]=v(g.p);var _=sc.castOption(a,g.i,"text");(_===0||_)&&(w.text=_),w.value=g.s,w.valueLabel=w[p+"Label"]=m(g.s);var b={};WBt(b,a,g.i),(s||b.x===void 0)&&(b.x=c?w.value:w.label),(s||b.y===void 0)&&(b.y=c?w.label:w.value),(s||b.xLabel===void 0)&&(b.xLabel=c?w.valueLabel:w.labelLabel),(s||b.yLabel===void 0)&&(b.yLabel=c?w.labelLabel:w.valueLabel),l&&(w.delta=+g.rawS||g.s,w.deltaLabel=m(w.delta),w.final=g.v,w.finalLabel=m(w.final),w.initial=w.final-w.delta,w.initialLabel=m(w.initial)),u&&(w.value=g.s,w.valueLabel=m(w.value),w.percentInitial=g.begR,w.percentInitialLabel=sc.formatPercent(g.begR),w.percentPrevious=g.difR,w.percentPreviousLabel=sc.formatPercent(g.difR),w.percentTotal=g.sumR,w.percentTotalLabel=sc.formatPercent(g.sumR));var M=sc.castOption(a,g.i,"customdata");return M&&(w.customdata=M),sc.texttemplateString({data:[b,w,a._meta],fallback:a.texttemplatefallback,labels:w,locale:e._d3locale,template:o})}function aqt(e,t,r,i){var n=e[0].trace,a=n.orientation==="h",o=n.type==="waterfall",s=n.type==="funnel";function l(M){var x=a?i:r;return jL(x,M,!0).text}function u(M){var x=a?r:i;return jL(x,+M,!0).text}var c=n.textinfo,f=e[t],h=c.split("+"),p=[],d,v=function(M){return h.indexOf(M)!==-1};if(v("label")&&p.push(l(e[t].p)),v("text")&&(d=sc.castOption(n,f.i,"text"),(d===0||d)&&p.push(d)),o){var m=+f.rawS||f.s,g=f.v,w=g-m;v("initial")&&p.push(u(w)),v("delta")&&p.push(u(m)),v("final")&&p.push(u(g))}if(s){v("value")&&p.push(u(f.s));var _=0;v("percent initial")&&_++,v("percent previous")&&_++,v("percent total")&&_++;var b=_>1;v("percent initial")&&(d=sc.formatPercent(f.begR),b&&(d+=" of initial"),p.push(d)),v("percent previous")&&(d=sc.formatPercent(f.difR),b&&(d+=" of previous"),p.push(d)),v("percent total")&&(d=sc.formatPercent(f.sumR),b&&(d+=" of total"),p.push(d))}return p.join("
")}y6e.exports={plot:KBt,toMoveInsideBar:m6e}});var w5=W((gGr,w6e)=>{"use strict";var ZM=Is(),oqt=xi(),x6e=ti(),sqt=tt().fillText,lqt=VL().getLineWidth,YW=Yi().hoverLabelText,uqt=(ra(),Pt(ia)).BADNUM;function cqt(e,t,r,i,n){var a=b6e(e,t,r,i,n);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=_6e(s,l),oqt.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function b6e(e,t,r,i,n){var a=e.cd,o=a[0].trace,s=a[0].t,l=i==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,p,d,v,m,g,w;o.orientation==="h"?(h=r,p=t,d="y",v="x",m=F,g=C):(h=t,p=r,d="x",v="y",g=F,m=C);var _=o[d+"period"],b=l||_;function M(q){return A(q,-1)}function x(q){return A(q,1)}function A(q,J){var N=q.w;return q[d]+J*N/2}function T(q){return q[d+"End"]-q[d+"Start"]}var y=l?M:_?function(q){return q.p-T(q)/2}:function(q){return Math.min(M(q),q.p-s.bardelta/2)},E=l?x:_?function(q){return q.p+T(q)/2}:function(q){return Math.max(x(q),q.p+s.bardelta/2)};function S(q,J,N){return n.finiteRange&&(N=0),ZM.inbox(q-h,J-h,N+Math.min(1,Math.abs(J-q)/w)-1)}function C(q){return S(y(q),E(q),c)}function k(q){return S(M(q),x(q),f)}function D(q){var J=q[v];if(u){var N=Math.abs(q.rawS)||0;p>0?J+=N:p<0&&(J-=N)}return J}function F(q){var J=p,N=q.b,V=D(q);return ZM.inbox(N-J,V-J,c+(V-J)/(V-N)-1)}function P(q){var J=p,N=q.b,V=D(q);return ZM.inbox(N-J,V-J,f+(V-J)/(V-N)-1)}var R=e[d+"a"],L=e[v+"a"];w=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));function I(q){return(m(q)+g(q))/2}var B=ZM.getDistanceFunction(i,m,g,I);if(ZM.getClosest(a,B,e),e.index!==!1&&a[e.index].p!==uqt){b||(y=function(q){return Math.min(M(q),q.p-s.bargroupwidth/2)},E=function(q){return Math.max(x(q),q.p+s.bargroupwidth/2)});var O=e.index,$=a[O],X=o.base?$.b+$.s:$.s;e[v+"0"]=e[v+"1"]=L.c2p($[v],!0),e[v+"LabelVal"]=X;var K=s.extents[s.extents.round($.p)];e[d+"0"]=R.c2p(l?y($):K[0],!0),e[d+"1"]=R.c2p(l?E($):K[1],!0);var G=$.orig_p!==void 0;return e[d+"LabelVal"]=G?$.orig_p:$.p,e.labelLabel=YW(R,e[d+"LabelVal"],o[d+"hoverformat"]),e.valueLabel=YW(L,e[v+"LabelVal"],o[v+"hoverformat"]),e.baseLabel=YW(L,$.b,o[v+"hoverformat"]),e.spikeDistance=(P($)+k($))/2,e[d+"Spike"]=R.c2p($.p,!0),sqt($,o,e),e.hovertemplate=o.hovertemplate,e}}function _6e(e,t){var r=t.mcc||e.marker.color,i=t.mlcc||e.marker.line.color,n=lqt(e,t);if(x6e.opacity(r))return r;if(x6e.opacity(i)&&n)return i}w6e.exports={hoverPoints:cqt,hoverOnBars:b6e,getTraceColor:_6e}});var A6e=W((mGr,T6e)=>{"use strict";T6e.exports=function(t,r,i){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var T5=W((yGr,M6e)=>{"use strict";M6e.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=i[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";S6e.exports={attributes:R1(),layoutAttributes:OL(),supplyDefaults:I0().supplyDefaults,crossTraceDefaults:I0().crossTraceDefaults,supplyLayoutDefaults:GW(),calc:ZTe(),crossTraceCalc:Ib().crossTraceCalc,colorbar:Cc(),arraysToCalcdata:WM(),plot:Wb().plot,style:zd().style,styleOnSelect:zd().styleOnSelect,hoverPoints:w5().hoverPoints,eventData:A6e(),selectPoints:T5(),moduleType:"trace",name:"bar",basePlotModule:xl(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var C6e=W((bGr,k6e)=>{"use strict";k6e.exports=E6e()});var KM=W((_Gr,P6e)=>{"use strict";var hqt=C1(),Bd=Ws(),D6e=R1(),dqt=Yl(),F6e=Ts().axisHoverFormat,{hovertemplateAttrs:pqt,templatefallbackAttrs:vqt}=Wa(),om=an().extendFlat,A5=Bd.marker,L6e=A5.line;P6e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:Bd.xperiod,yperiod:Bd.yperiod,xperiod0:Bd.xperiod0,yperiod0:Bd.yperiod0,xperiodalignment:Bd.xperiodalignment,yperiodalignment:Bd.yperiodalignment,xhoverformat:F6e("x"),yhoverformat:F6e("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:om({},A5.symbol,{arrayOk:!1,editType:"plot"}),opacity:om({},A5.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:om({},A5.angle,{arrayOk:!1,editType:"calc"}),size:om({},A5.size,{arrayOk:!1,editType:"calc"}),color:om({},A5.color,{arrayOk:!1,editType:"style"}),line:{color:om({},L6e.color,{arrayOk:!1,dflt:dqt.defaultLine,editType:"style"}),width:om({},L6e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:hqt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:D6e.offsetgroup,alignmentgroup:D6e.alignmentgroup,selected:{marker:Bd.selected.marker,editType:"style"},unselected:{marker:Bd.unselected.marker,editType:"style"},text:om({},Bd.text,{}),hovertext:om({},Bd.hovertext,{}),hovertemplate:pqt({}),hovertemplatefallback:vqt(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:Bd.zorder}});var JM=W((wGr,I6e)=>{"use strict";I6e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var eS=W((TGr,q6e)=>{"use strict";var qd=tt(),gqt=xi(),mqt=ti(),yqt=ev(),xqt=Pb(),R6e=Rw(),QM=KM();function bqt(e,t,r,i){function n(d,v){return qd.coerce(e,t,QM,d,v)}if(z6e(e,t,n,i),t.visible!==!1){yqt(e,t,i,n),n("xhoverformat"),n("yhoverformat");var a=t._hasPreCompStats;a&&(n("lowerfence"),n("upperfence")),n("line.color",(e.marker||{}).color||r),n("line.width"),n("fillcolor",mqt.addOpacity(t.line.color,.5));var o=!1;if(a){var s=n("mean"),l=n("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}n("whiskerwidth");var u=n("sizemode"),c;u==="quartiles"&&(c=n("boxmean",o)),n("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&n("sdmultiple"),n("width"),n("quartilemethod");var f=!1;if(a){var h=n("notchspan");h&&h.length&&(f=!0)}else qd.validate(e.notchwidth,QM.notchwidth)&&(f=!0);var p=n("notched",f);p&&n("notchwidth"),B6e(e,t,n,{prefix:"box"}),n("zorder")}}function z6e(e,t,r,i){function n(E){var S=0;return E&&E.length&&(S+=1,qd.isArrayOrTypedArray(E[0])&&E[0].length&&(S+=1)),S}function a(E){return qd.validate(e[E],QM[E])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(qd.minRowLength(u),qd.minRowLength(c),qd.minRowLength(f))}else t._hasPreCompStats=!1;var h=n(o),p=n(s),d=h&&qd.minRowLength(o),v=p&&qd.minRowLength(s),m=i.calendar,g={autotypenumbers:i.autotypenumbers},w,_;if(t._hasPreCompStats)switch(String(p)+String(h)){case"00":var b=a("x0")||a("dx"),M=a("y0")||a("dy");M&&!b?w="h":w="v",_=l;break;case"10":w="v",_=Math.min(l,v);break;case"20":w="h",_=Math.min(l,s.length);break;case"01":w="h",_=Math.min(l,d);break;case"02":w="v",_=Math.min(l,o.length);break;case"12":w="v",_=Math.min(l,v,o.length);break;case"21":w="h",_=Math.min(l,s.length,d);break;case"11":_=0;break;case"22":var x=!1,A;for(A=0;A0?(w="v",p>0?_=Math.min(v,d):_=Math.min(d)):p>0?(w="h",_=Math.min(v)):_=0;if(!_){t.visible=!1;return}t._length=_;var T=r("orientation",w);t._hasPreCompStats?T==="v"&&p===0?(r("x0",0),r("dx",1)):T==="h"&&h===0&&(r("y0",0),r("dy",1)):T==="v"&&p===0?r("x0"):T==="h"&&h===0&&r("y0");var y=gqt.getComponentMethod("calendars","handleTraceDefaults");y(e,t,["x","y"],i)}function B6e(e,t,r,i){var n=i.prefix,a=qd.coerce2(e,t,QM,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(n+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),qd.coerceSelectionMarkerOpacity(t,r)}function _qt(e,t){var r,i;function n(l){return qd.coerce(i._input,i,QM,l)}for(var a=0;a{"use strict";var wqt=xi(),Tqt=tt(),Aqt=JM();function O6e(e,t,r,i,n){for(var a=n+"Layout",o=!1,s=0;s{"use strict";var ZW=hn(),WL=Yi(),Sqt=iv(),Bl=tt(),R0=(ra(),Pt(ia)).BADNUM,sm=Bl._;X6e.exports=function(t,r){var i=t._fullLayout,n=WL.getFromId(t,r.xaxis||"x"),a=WL.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,p,d;r.orientation==="h"?(c=n,f="x",h=a,p="y",d=!!r.yperiodalignment):(c=a,f="y",h=n,p="x",d=!!r.xperiodalignment);var v=Eqt(r,p,h,i[s]),m=v[0],g=v[1],w=Bl.distinctVals(m,h),_=w.vals,b=w.minDiff/2,M,x,A,T,y,E,S=(r.boxpoints||r.points)==="all"?Bl.identity:function(xe){return xe.vM.uf};if(r._hasPreCompStats){var C=r[f],k=function(xe){return c.d2c((r[xe]||[])[l])},D=1/0,F=-1/0;for(l=0;l=M.q1&&M.q3>=M.med){var R=k("lowerfence");M.lf=R!==R0&&R<=M.q1?R:H6e(M,A,T);var L=k("upperfence");M.uf=L!==R0&&L>=M.q3?L:j6e(M,A,T);var I=k("mean");M.mean=I!==R0?I:T?Bl.mean(A,T):(M.q1+M.q3)/2;var B=k("sd");M.sd=I!==R0&&B>=0?B:T?Bl.stdev(A,T,M.mean):M.q3-M.q1,M.lo=$6e(M),M.uo=W6e(M);var O=k("notchspan");O=O!==R0&&O>0?O:Y6e(M,T),M.ln=M.med-O,M.un=M.med+O;var $=M.lf,X=M.uf;r.boxpoints&&A.length&&($=Math.min($,A[0]),X=Math.max(X,A[T-1])),r.notched&&($=Math.min($,M.ln),X=Math.max(X,M.un)),M.min=$,M.max=X}else{Bl.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+M.q1,"median = "+M.med,"q3 = "+M.q3].join(` `));var K;M.med!==R0?K=M.med:M.q1!==R0?M.q3!==R0?K=(M.q1+M.q3)/2:K=M.q1:M.q3!==R0?K=M.q3:K=0,M.med=K,M.q1=M.q3=K,M.lf=M.uf=K,M.mean=M.sd=K,M.ln=M.un=K,M.min=M.max=K}D=Math.min(D,M.min),F=Math.max(F,M.max),M.pts2=x.filter(S),o.push(M)}}r._extremes[c._id]=WL.findExtremes(c,[D,F],{padded:!0})}else{var G=c.makeCalcdata(r,f),q=kqt(_,b),J=_.length,N=Cqt(J);for(l=0;l=0&&V0){if(M={},M.pos=M[p]=_[l],x=M.pts=N[l].sort(V6e),A=M[f]=x.map(G6e),T=A.length,M.min=A[0],M.max=A[T-1],M.mean=Bl.mean(A,T),M.sd=Bl.stdev(A,T,M.mean)*r.sdmultiple,M.med=Bl.interp(A,.5),T%2&&(Q||te)){var ue,ge;Q?(ue=A.slice(0,T/2),ge=A.slice(T/2+1)):te&&(ue=A.slice(0,T/2+1),ge=A.slice(T/2)),M.q1=Bl.interp(ue,.5),M.q3=Bl.interp(ge,.5)}else M.q1=Bl.interp(A,.25),M.q3=Bl.interp(A,.75);M.lf=H6e(M,A,T),M.uf=j6e(M,A,T),M.lo=$6e(M),M.uo=W6e(M);var Ee=Y6e(M,T);M.ln=M.med-Ee,M.un=M.med+Ee,Y=Math.min(Y,M.ln),H=Math.max(H,M.un),M.pts2=x.filter(S),o.push(M)}r.notched&&Bl.isTypedArray(G)&&(G=Array.from(G)),r._extremes[c._id]=WL.findExtremes(c,r.notched?G.concat([Y,H]):G,{padded:!0})}return Dqt(o,r),o.length>0?(o[0].t={num:i[s],dPos:b,posLetter:p,valLetter:f,labels:{med:sm(t,"median:"),min:sm(t,"min:"),q1:sm(t,"q1:"),q3:sm(t,"q3:"),max:sm(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?sm(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):sm(t,"mean:"),lf:sm(t,"lower fence:"),uf:sm(t,"upper fence:")}},i[s]++,o):[{t:{empty:!0}}]};function Eqt(e,t,r,i){var n=t in e,a=t+"0"in e,o="d"+t in e;if(n||a&&o){var s=r.makeCalcdata(e,t),l=Sqt(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||ZW(e.name)&&["linear","log"].indexOf(r.type)!==-1||Bl.isDateTime(e.name)&&r.type==="date")?u=e.name:u=i;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),p=0;p{"use strict";var Z6e=Yi(),Fqt=tt(),Lqt=kb().getAxisGroup,K6e=["v","h"];function Pqt(e,t){for(var r=e.calcdata,i=t.xaxis,n=t.yaxis,a=0;a1,w=1-a[e+"gap"],_=1-a[e+"groupgap"];for(l=0;l0;if(A==="positive"?(L=T*(x?1:.5),O=B,I=O=E):A==="negative"?(L=O=E,I=T*(x?1:.5),$=B):(L=I=T,O=$=B),N){var V=b.pointpos,Y=b.jitter,H=b.marker.size/2,j=0;V+Y>=0&&(j=B*(V+Y),j>L?(J=!0,G=H,X=j):j>O&&(G=H,X=L)),j<=L&&(X=L);var Q=0;V-Y<=0&&(Q=-B*(V-Y),Q>I?(J=!0,q=H,K=Q):Q>$&&(q=H,K=I)),Q<=I&&(K=I)}else X=L,K=I;var te=new Array(c.length);for(u=0;u{"use strict";var M5=gi(),Yb=tt(),Iqt=Qi(),eAe=5,Rqt=.01;function zqt(e,t,r,i){var n=e._context.staticPlot,a=t.xaxis,o=t.yaxis;Yb.makeTraceGroups(i,r,"trace boxes").each(function(s){var l=M5.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,p;f.orientation==="h"?(h=o,p=a):(h=a,p=o),tAe(l,{pos:h,val:p},f,c,n),rAe(l,{x:a,y:o},f,c),iAe(l,{pos:h,val:p},f,c)})}function tAe(e,t,r,i,n){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=i.bPos,c=i.wdPos||0,f=i.bPosPxOffset||0,h=r.whiskerwidth||0,p=r.showwhiskers!==!1,d=r.notched||!1,v=d?1-2*r.notchwidth:1,m,g;Array.isArray(i.bdPos)?(m=i.bdPos[0],g=i.bdPos[1]):(m=i.bdPos,g=i.bdPos);var w=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?Yb.identity:[]);w.enter().append("path").style("vector-effect",n?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(_){if(_.empty)return M5.select(this).attr("d","M0,0Z");var b=s.c2l(_.pos+u,!0),M=s.l2p(b-m)+f,x=s.l2p(b+g)+f,A=l?(M+x)/2:s.l2p(b)+f,T=r.whiskerwidth,y=l?M*T+(1-T)*A:s.l2p(b-c)+f,E=l?x*T+(1-T)*A:s.l2p(b+c)+f,S=s.l2p(b-m*v)+f,C=s.l2p(b+g*v)+f,k=r.sizemode==="sd",D=o.c2p(k?_.mean-_.sd:_.q1,!0),F=k?o.c2p(_.mean+_.sd,!0):o.c2p(_.q3,!0),P=Yb.constrain(k?o.c2p(_.mean,!0):o.c2p(_.med,!0),Math.min(D,F)+1,Math.max(D,F)-1),R=_.lf===void 0||r.boxpoints===!1||k,L=o.c2p(R?_.min:_.lf,!0),I=o.c2p(R?_.max:_.uf,!0),B=o.c2p(_.ln,!0),O=o.c2p(_.un,!0);a?M5.select(this).attr("d","M"+P+","+S+"V"+C+"M"+D+","+M+"V"+x+(d?"H"+B+"L"+P+","+C+"L"+O+","+x:"")+"H"+F+"V"+M+(d?"H"+O+"L"+P+","+S+"L"+B+","+M:"")+"Z"+(p?"M"+D+","+A+"H"+L+"M"+F+","+A+"H"+I+(h===0?"":"M"+L+","+y+"V"+E+"M"+I+","+y+"V"+E):"")):M5.select(this).attr("d","M"+S+","+P+"H"+C+"M"+M+","+D+"H"+x+(d?"V"+B+"L"+C+","+P+"L"+x+","+O:"")+"V"+F+"H"+M+(d?"V"+O+"L"+S+","+P+"L"+M+","+B:"")+"Z"+(p?"M"+A+","+D+"V"+L+"M"+A+","+F+"V"+I+(h===0?"":"M"+y+","+L+"H"+E+"M"+y+","+I+"H"+E):""))})}function rAe(e,t,r,i){var n=t.x,a=t.y,o=i.bdPos,s=i.bPos,l=r.boxpoints||r.points;Yb.seedPseudoRandom();var u=function(h){return h.forEach(function(p){p.t=i,p.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var p,d=h.pts2,v=Math.max((h.max-h.min)/10,h.q3-h.q1),m=v*1e-9,g=v*Rqt,w=[],_=0,b;if(r.jitter){if(v===0)for(_=1,w=new Array(d.length),p=0;ph.lo&&(E.so=!0)}return d});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(Iqt.translatePoints,n,a)}function iAe(e,t,r,i){var n=t.val,a=t.pos,o=!!a.rangebreaks,s=i.bPos,l=i.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(i.bdPos)?(c=i.bdPos[0],f=i.bdPos[1]):(c=i.bdPos,f=i.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?Yb.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(p){var d=a.c2l(p.pos+s,!0),v=a.l2p(d-c)+l,m=a.l2p(d+f)+l,g=o?(v+m)/2:a.l2p(d)+l,w=n.c2p(p.mean,!0),_=n.c2p(p.mean-p.sd,!0),b=n.c2p(p.mean+p.sd,!0);r.orientation==="h"?M5.select(this).attr("d","M"+w+","+v+"V"+m+(u==="sd"?"m0,0L"+_+","+g+"L"+w+","+v+"L"+b+","+g+"Z":"")):M5.select(this).attr("d","M"+v+","+w+"H"+m+(u==="sd"?"m0,0L"+g+","+_+"L"+v+","+w+"L"+g+","+b+"Z":""))})}nAe.exports={plot:zqt,plotBoxAndWhiskers:tAe,plotPoints:rAe,plotBoxMean:iAe}});var ZL=W((kGr,aAe)=>{"use strict";var JW=gi(),QW=ti(),eY=Qi();function Bqt(e,t,r){var i=r||JW.select(e).selectAll("g.trace.boxes");i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=JW.select(this),o=n[0].trace,s=o.line.width;function l(f,h,p,d){f.style("stroke-width",h+"px").call(QW.stroke,p).call(QW.fill,d)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=JW.select(this),p=o[f.dir];l(h,p.line.width,p.line.color,p.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(QW.stroke,o.line.color);var c=a.selectAll("path.point");eY.pointStyle(c,o,e)}})}function qqt(e,t,r){var i=t[0].trace,n=r.selectAll("path.point");i.selectedpoints?eY.selectedPointStyle(n,i):eY.pointStyle(n,i,e)}aAe.exports={style:Bqt,styleOnSelect:qqt}});var rY=W((CGr,uAe)=>{"use strict";var Oqt=Yi(),tY=tt(),l2=Is(),oAe=ti(),Nqt=tY.fillText;function Uqt(e,t,r,i){var n=e.cd,a=n[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(sAe(e,t,r,i))),o.indexOf("points")!==-1&&(l=lAe(e,t,r)),i==="closest"?l?[l]:s:(l&&s.push(l),s)}function sAe(e,t,r,i){var n=e.cd,a=e.xa,o=e.ya,s=n[0].trace,l=n[0].t,u=s.type==="violin",c,f,h,p,d,v,m,g,w,_,b,M=l.bdPos,x,A,T=l.wHover,y=function(H){return h.c2l(H.pos)+l.bPos-h.c2l(v)};u&&s.side!=="both"?(s.side==="positive"&&(w=function(H){var j=y(H);return l2.inbox(j,j+T,_)},x=M,A=0),s.side==="negative"&&(w=function(H){var j=y(H);return l2.inbox(j-T,j,_)},x=0,A=M)):(w=function(H){var j=y(H);return l2.inbox(j-T,j+T,_)},x=A=M);var E;u?E=function(H){return l2.inbox(H.span[0]-d,H.span[1]-d,_)}:E=function(H){return l2.inbox(H.min-d,H.max-d,_)},s.orientation==="h"?(d=t,v=r,m=E,g=w,c="y",h=o,f="x",p=a):(d=r,v=t,m=w,g=E,c="x",h=a,f="y",p=o);var S=Math.min(1,M/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));_=e.maxHoverDistance-S,b=e.maxSpikeDistance-S;function C(H){return(m(H)+g(H))/2}var k=l2.getDistanceFunction(i,m,g,C);if(l2.getClosest(n,k,e),e.index===!1)return[];var D=n[e.index],F=s.line.color,P=(s.marker||{}).color;oAe.opacity(F)&&s.line.width?e.color=F:oAe.opacity(P)&&s.boxpoints?e.color=P:e.color=s.fillcolor,e[c+"0"]=h.c2p(D.pos+l.bPos-A,!0),e[c+"1"]=h.c2p(D.pos+l.bPos+x,!0),e[c+"LabelVal"]=D.orig_p!==void 0?D.orig_p:D.pos;var R=c+"Spike";e.spikeDistance=C(D)*b/_,e[R]=h.c2p(D.pos,!0);var L=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,I=s.boxpoints||s.points,B=I&&L?["max","uf","q3","med","mean","q1","lf","min"]:I&&!L?["max","uf","q3","med","q1","lf","min"]:!I&&L?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],O=p.range[1]{"use strict";cAe.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var iY=W((FGr,hAe)=>{"use strict";hAe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";dAe.exports={attributes:KM(),layoutAttributes:JM(),supplyDefaults:eS().supplyDefaults,crossTraceDefaults:eS().crossTraceDefaults,supplyLayoutDefaults:$L().supplyLayoutDefaults,calc:KW(),crossTraceCalc:YL().crossTraceCalc,plot:XL().plot,style:ZL().style,styleOnSelect:ZL().styleOnSelect,hoverPoints:rY().hoverPoints,eventData:fAe(),selectPoints:iY(),moduleType:"trace",name:"box",basePlotModule:xl(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var gAe=W((PGr,vAe)=>{"use strict";vAe.exports=pAe()});var S5=W((IGr,yAe)=>{"use strict";var Vqt=Fo(),{extendFlat:Yh}=an(),Gqt=Ja(),{axisHoverFormat:nY}=Ts(),Hqt=jo(),{hovertemplateAttrs:jqt,templatefallbackAttrs:mAe,texttemplateAttrs:$qt}=Wa(),z0=Ws();yAe.exports=Yh({z:{valType:"data_array",editType:"calc"},x:Yh({},z0.x,{impliedEdits:{xtype:"array"}}),x0:Yh({},z0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Yh({},z0.dx,{impliedEdits:{xtype:"scaled"}}),y:Yh({},z0.y,{impliedEdits:{ytype:"array"}}),y0:Yh({},z0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Yh({},z0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Yh({},z0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Yh({},z0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Yh({},z0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Yh({},z0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Yh({},z0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Yh({},z0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:nY("x"),yhoverformat:nY("y"),zhoverformat:nY("z",1),hovertemplate:jqt(),hovertemplatefallback:mAe(),texttemplate:$qt({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:mAe({editType:"plot"}),textfont:Hqt({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Yh({},Gqt.showlegend,{dflt:!1}),zorder:z0.zorder},Vqt("",{cLetter:"z",autoColorDflt:!1}))});var JL=W((RGr,bAe)=>{"use strict";var Wqt=hn(),KL=tt(),Yqt=xi();bAe.exports=function(t,r,i,n,a,o){var s=i("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(KL.isArray1D(s)){l=i(a),u=i(o);var c=KL.minRowLength(l),f=KL.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=xAe(a,i),u=xAe(o,i),!Xqt(s))return 0;i("transpose"),r._length=null}var h=Yqt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],n),!0};function xAe(e,t){var r=t(e),i=r?t(e+"type","array"):"scaled";return i==="scaled"&&(t(e+"0"),t("d"+e)),r}function Xqt(e){for(var t=!0,r=!1,i=!1,n,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var _Ae=tt();wAe.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var i=_Ae.extendFlat({},r.font,{color:"auto",size:"auto"});_Ae.coerceFont(t,"textfont",i)}});var aY=W((BGr,TAe)=>{"use strict";TAe.exports=function(t,r,i){var n=i("zsmooth");n===!1&&(i("xgap"),i("ygap")),i("zhoverformat")}});var SAe=W((qGr,MAe)=>{"use strict";var AAe=tt(),Zqt=JL(),Kqt=tS(),Jqt=ev(),Qqt=aY(),eOt=Bu(),tOt=S5();MAe.exports=function(t,r,i,n){function a(s,l){return AAe.coerce(t,r,tOt,s,l)}var o=Zqt(t,r,a,n);if(!o){r.visible=!1;return}Jqt(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),Kqt(a,n),Qqt(t,r,a,n),a("hoverongaps"),a("connectgaps",AAe.isArray1D(r.z)&&r.zsmooth!==!1),eOt(t,r,n,a,{prefix:"",cLetter:"z"}),a("zorder")}});var oY=W((OGr,EAe)=>{"use strict";var E5=hn();EAe.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,i){var n=i[t];return E5(n)?(n=Number(n),r[e]+=n,n):0},avg:function(e,t,r,i,n){var a=i[t];return E5(a)&&(a=Number(a),r[e]+=a,n[e]++),0},min:function(e,t,r,i){var n=i[t];if(E5(n))if(n=Number(n),E5(r[e])){if(r[e]>n){var a=n-r[e];return r[e]=n,a}}else return r[e]=n,n;return 0},max:function(e,t,r,i){var n=i[t];if(E5(n))if(n=Number(n),E5(r[e])){if(r[e]{"use strict";kAe.exports={percent:function(e,t){for(var r=e.length,i=100/t,n=0;n{"use strict";CAe.exports=function(t,r){for(var i=t.length,n=0,a=0;a{"use strict";var k5=(ra(),Pt(ia)),Xb=k5.ONEAVGYEAR,DAe=k5.ONEAVGMONTH,eP=k5.ONEDAY,FAe=k5.ONEHOUR,LAe=k5.ONEMIN,PAe=k5.ONESEC,IAe=Yi().tickIncrement;BAe.exports=function(t,r,i,n,a){var o=-1.1*r,s=-.1*r,l=t-s,u=i[0],c=i[1],f=Math.min(QL(u+s,u+l,n,a),QL(c+s,c+l,n,a)),h=Math.min(QL(u+o,u+s,n,a),QL(c+o,c+s,n,a)),p,d;if(f>h&&heP){var v=p===Xb?1:6,m=p===Xb?"M12":"M1";return function(g,w){var _=n.c2d(g,Xb,a),b=_.indexOf("-",v);b>0&&(_=_.slice(0,b));var M=n.d2c(_,0,a);if(MPAe?e>eP?e>Xb*1.1?Xb:e>DAe*1.1?DAe:eP:e>FAe?FAe:e>LAe?LAe:PAe:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function rOt(e,t,r,i,n,a){if(i&&e>eP){var o=zAe(t,n,a),s=zAe(r,n,a),l=e===Xb?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function zAe(e,t,r){var i=t.c2d(e,Xb,r).split("-");return i[0]===""&&(i.unshift(),i[0]="-"+i[0]),i}});var hY=W((GGr,VAe)=>{"use strict";var cY=hn(),Rf=tt(),qAe=xi(),Od=Yi(),{hasColorscale:OAe}=Sc(),NAe=rf(),iOt=WM(),UAe=oY(),nOt=sY(),aOt=lY(),oOt=uY();function sOt(e,t){var r=[],i=[],n=t.orientation==="h",a=Od.getFromId(e,n?t.yaxis:t.xaxis),o=n?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=fY(e,t,a,o),h=f[0],p=f[1],d=typeof h.size=="string",v=[],m=d?v:h,g=[],w=[],_=[],b=0,M=t.histnorm,x=t.histfunc,A=M.indexOf("density")!==-1,T,y,E;u.enabled&&A&&(M=M.replace(/ ?density$/,""),A=!1);var S=x==="max"||x==="min",C=S?null:0,k=UAe.count,D=nOt[M],F=!1,P=function(j){return a.r2c(j,0,l)},R;for(Rf.isArrayOrTypedArray(t[s])&&x!=="count"&&(R=t[s],F=x==="avg",k=UAe[x]),c=P(h.start),y=P(h.end)+(c-Od.tickIncrement(c,h.size,!1,l))/1e6;c=0&&E=V;c--)if(i[c]){Y=c;break}for(c=V;c<=Y;c++)if(cY(r[c])&&cY(i[c])){var H={p:r[c],s:i[c],b:0};u.enabled||(H.pts=_[c],O?H.ph0=H.ph1=_[c].length?p[_[c][0]]:r[c]:(t._computePh=!0,H.ph0=q(v[c]),H.ph1=q(v[c+1],!0))),N.push(H)}return N.length===1&&(N[0].width1=Od.tickIncrement(N[0].p,h.size,!1,l)-N[0].p),OAe(t,"marker")&&NAe(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),OAe(t,"marker.line")&&NAe(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),iOt(N,t),Rf.isArrayOrTypedArray(t.selectedpoints)&&Rf.tagSelected(N,t,K),N}function fY(e,t,r,i,n){var G;var a=i+"bins",o=e._fullLayout,s=t["_"+i+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,p,d,v,m,g=function(q){return r.r2c(q,0,p)},w=function(q){return r.c2r(q,0,p)},_=r.type==="date"?function(q){return q||q===0?Rf.cleanDate(q,null,p):null}:function(q){return cY(q)?Number(q):null};function b(q,J,N){J[q+"Found"]?(J[q]=_(J[q]),J[q]===null&&(J[q]=N[q])):(v[q]=J[q]=N[q],Rf.nestedProperty(f[0],a+"."+q).set(N[q]))}if(t["_"+i+"autoBinFinished"])delete t["_"+i+"autoBinFinished"];else{f=l.traces;var M=[],x=!0,A=!1,T=!1;for(c=0;cr.r2l(R)&&(I=Od.tickIncrement(I,l.size,!0,p)),k.start=r.l2r(I),P||Rf.nestedProperty(t,a+".start").set(k.start)}var B=l.end,O=r.r2l(C.end),$=O!==void 0;if((l.endFound||$)&&O!==r.r2l(B)){var X=$?O:Rf.aggNums(Math.max,null,d);k.end=r.l2r(X),$||Rf.nestedProperty(t,a+".start").set(k.end)}var K="autobin"+i;return t._input[K]===!1&&(t._input[a]=Rf.extendFlat({},t[a]||{}),delete t._input[K],delete t[K]),[k,d]}function lOt(e,t,r,i,n){var a=e._fullLayout,o=uOt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c=0;i--)s(i);else if(t==="increasing"){for(i=1;i=0;i--)e[i]+=e[i+1];r==="exclude"&&(e.push(0),e.shift())}}VAe.exports={calc:sOt,calcAllAutoBins:fY}});var ZAe=W((HGr,XAe)=>{"use strict";var GAe=tt(),C5=Yi(),HAe=oY(),fOt=sY(),hOt=lY(),dOt=uY(),jAe=hY().calcAllAutoBins;XAe.exports=function(t,r){var i=C5.getFromId(t,r.xaxis),n=C5.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(we){return i.r2c(we,0,a)},l=function(we){return n.r2c(we,0,o)},u=function(we){return i.c2r(we,0,a)},c=function(we){return n.c2r(we,0,o)},f,h,p,d,v=jAe(t,r,i,"x"),m=v[0],g=v[1],w=jAe(t,r,n,"y"),_=w[0],b=w[1],M=r._length;g.length>M&&g.splice(M,g.length-M),b.length>M&&b.splice(M,b.length-M);var x=[],A=[],T=[],y=typeof m.size=="string",E=typeof _.size=="string",S=[],C=[],k=y?S:m,D=E?C:_,F=0,P=[],R=[],L=r.histnorm,I=r.histfunc,B=L.indexOf("density")!==-1,O=I==="max"||I==="min",$=O?null:0,X=HAe.count,K=fOt[L],G=!1,q=[],J=[],N="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";N&&I!=="count"&&(G=I==="avg",X=HAe[I]);var V=m.size,Y=s(m.start),H=s(m.end)+(Y-C5.tickIncrement(Y,V,!1,a))/1e6;for(f=Y;f=0&&p=0&&d{"use strict";var z1=tt(),KAe=(ra(),Pt(ia)).BADNUM,JAe=iv();QAe.exports=function(t,r,i,n,a,o){var s=t._length,l=r.makeCalcdata(t,n),u=i.makeCalcdata(t,a);l=JAe(t,r,n,l).vals,u=JAe(t,i,a,u).vals;var c=t.text,f=c!==void 0&&z1.isArray1D(c),h=t.hovertext,p=h!==void 0&&z1.isArray1D(h),d,v,m=z1.distinctVals(l),g=m.vals,w=z1.distinctVals(u),_=w.vals,b=[],M,x,A=_.length,T=g.length;for(d=0;d{"use strict";var pOt=hn(),vOt=tt(),rP=(ra(),Pt(ia)).BADNUM;eMe.exports=function(t,r,i,n){var a,o,s,l,u,c;function f(g){if(pOt(g))return+g}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var gOt=tt(),tMe=.01,mOt=[[-1,0],[1,0],[0,-1],[0,1]];function yOt(e){return .5-.25*Math.min(1,e*.5)}iMe.exports=function(t,r){var i=1,n;for(rMe(t,r),n=0;ntMe;n++)i=rMe(t,r,yOt(i));return i>tMe&&gOt.log("interp2d didn't converge quickly",i),t};function rMe(e,t,r){var i=0,n,a,o,s,l,u,c,f,h,p,d,v,m;for(s=0;sv&&(i=Math.max(i,Math.abs(e[a][o]-d)/(m-v))))}return i}});var aP=W((YGr,nMe)=>{"use strict";var xOt=tt().maxRowLength;nMe.exports=function(t){var r=[],i={},n=[],a=t[0],o=[],s=[0,0,0],l=xOt(t),u,c,f,h,p,d,v,m;for(c=0;c=0;p--)h=n[p],c=h[0],f=h[1],d=((i[[c-1,f]]||s)[2]+(i[[c+1,f]]||s)[2]+(i[[c,f-1]]||s)[2]+(i[[c,f+1]]||s)[2])/20,d&&(v[h]=[c,f,d],n.splice(p,1),m=!0);if(!m)throw"findEmpties iterated with no new neighbors";for(h in v)i[h]=v[h],r.push(v[h])}return r.sort(function(g,w){return w[2]-g[2]})}});var dY=W((XGr,sMe)=>{"use strict";var aMe=xi(),oMe=tt().isArrayOrTypedArray;sMe.exports=function(t,r,i,n,a,o){var s=[],l=aMe.traceIs(t,"contour"),u=aMe.traceIs(t,"histogram"),c,f,h,p=oMe(r)&&r.length>1;if(p&&!u&&o.type!=="category"){var d=r.length;if(d<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h{"use strict";var lMe=xi(),pY=tt(),oP=Yi(),uMe=iv(),bOt=ZAe(),_Ot=rf(),wOt=tP(),TOt=iP(),AOt=nP(),MOt=aP(),sP=dY(),vY=(ra(),Pt(ia)).BADNUM;fMe.exports=function(t,r){var i=oP.getFromId(t,r.xaxis||"x"),n=oP.getFromId(t,r.yaxis||"y"),a=lMe.traceIs(r,"contour"),o=lMe.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,p,d,v,m,g,w;if(i._minDtick=0,n._minDtick=0,o)w=bOt(t,r),f=w.orig_x,l=w.x,u=w.x0,c=w.dx,v=w.orig_y,h=w.y,p=w.y0,d=w.dy,m=w.z;else{var _=r.z;pY.isArray1D(_)?(wOt(r,i,n,"x","y",["z"]),l=r._x,h=r._y,_=r._z):(f=r.x?i.makeCalcdata(r,"x"):[],v=r.y?n.makeCalcdata(r,"y"):[],l=uMe(r,i,"x",f).vals,h=uMe(r,n,"y",v).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,p=r.y0,d=r.dy,m=TOt(_,r,i,n)}(i.rangebreaks||n.rangebreaks)&&(m=SOt(l,h,m),o||(l=cMe(l),h=cMe(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=MOt(m),AOt(m,r._emptypoints));function b(k){s=r._input.zsmooth=r.zsmooth=!1,pY.warn('cannot use zsmooth: "fast": '+k)}function M(k){if(k.length>1){var D=(k[k.length-1]-k[0])/(k.length-1),F=Math.abs(D/100);for(g=0;gF)return!1}return!0}r._islinear=!1,i.type==="log"||n.type==="log"?s==="fast"&&b("log axis found"):M(l)?M(h)?r._islinear=!0:s==="fast"&&b("y scale is not linear"):s==="fast"&&b("x scale is not linear");var x=pY.maxRowLength(m),A=r.xtype==="scaled"?"":l,T=sP(r,A,u,c,x,i),y=r.ytype==="scaled"?"":h,E=sP(r,y,p,d,m.length,n);r._extremes[i._id]=oP.findExtremes(i,T),r._extremes[n._id]=oP.findExtremes(n,E);var S={x:T,y:E,z:m,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(S.orig_x=f),r.yperiodalignment&&v&&(S.orig_y=v),A&&A.length===T.length-1&&(S.xCenter=A),y&&y.length===E.length-1&&(S.yCenter=y),o&&(S.xRanges=w.xRanges,S.yRanges=w.yRanges,S.pts=w.pts),a||_Ot(t,r,{vals:m,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var C={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};S.xfill=sP(C,A,u,c,x,i),S.yfill=sP(C,y,p,d,m.length,n)}return[S]};function cMe(e){for(var t=[],r=e.length,i=0;ihMe,STYLE:()=>EOt});var hMe,EOt,cP=Ci(()=>{"use strict";hMe=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],EOt=hMe.map(e=>e.join(": ")+"; ").join("")});var mY=W((KGr,pMe)=>{"use strict";var dMe=(cP(),Pt(uP)),kOt=Qi(),gY=tt(),D5=null;function COt(){if(D5!==null)return D5;D5=!1;var e=gY.isSafari()||gY.isMacWKWebView()||gY.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(dMe.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")D5=t.some(function(o){return r.apply(null,o)});else{var i=kOt.tester.append("image").attr("style",dMe.STYLE),n=window.getComputedStyle(i.node()),a=n.imageRendering;D5=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),i.remove()}}return D5}pMe.exports=COt});var fP=W((JGr,AMe)=>{"use strict";var vMe=gi(),DOt=xi(),FOt=Qi(),LOt=Yi(),Nd=tt(),gMe=ao(),POt=QF(),mMe=ti(),IOt=es().extractOpts,ROt=es().makeColorScaleFuncFromTrace,zOt=(md(),Pt(gd)),BOt=(Jl(),Pt(Kl)),yY=BOt.LINE_SPACING,qOt=mY(),OOt=(cP(),Pt(uP)).STYLE,wMe="heatmap-label";function TMe(e){return e.selectAll("g."+wMe)}function yMe(e){TMe(e).remove()}AMe.exports=function(e,t,r,i){var n=t.xaxis,a=t.yaxis;Nd.makeTraceGroups(i,r,"hm").each(function(o){var s=vMe.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,p=l.x,d=l.y,v=l.xCenter,m=l.yCenter,g=DOt.traceIs(u,"contour"),w=g?"best":u.zsmooth,_=h.length,b=Nd.maxRowLength(h),M=!1,x=!1,A,T,y,E,S,C,k,D;for(C=0;A===void 0&&C0;)T=n.c2p(p[C]),C--;for(T0;)S=a.c2p(d[C]),C--;S=n._length||T<=0||E>=a._length||S<=0;if(I){var B=s.selectAll("image").data([]);B.exit().remove(),yMe(s);return}var O,$;F==="fast"?(O=b,$=_):(O=R,$=L);var X=document.createElement("canvas");X.width=O,X.height=$;var K=X.getContext("2d",{willReadFrequently:!0}),G=ROt(u,{noNumericCheck:!0,returnArray:!0}),q,J;F==="fast"?(q=M?function(pn){return b-1-pn}:Nd.identity,J=x?function(pn){return _-1-pn}:Nd.identity):(q=function(pn){return Nd.constrain(Math.round(n.c2p(p[pn])-A),0,R)},J=function(pn){return Nd.constrain(Math.round(a.c2p(d[pn])-E),0,L)});var N=J(0),V=[N,N],Y=M?0:1,H=x?0:1,j=0,Q=0,te=0,ue=0,ge,Ee,xe,ce,oe;function Se(pn,zn=0){if(pn===void 0)return[0,0,0,0];var gn=G(pn);return gn[0]=Math.round(gn[0]),gn[1]=Math.round(gn[1]),gn[2]=Math.round(gn[2]),j+=zn,Q+=gn[0]*zn,te+=gn[1]*zn,ue+=gn[2]*zn,gn}function be(pn,zn,gn,ns){var ua=pn[gn.bin0];if(ua===void 0)return Se(void 0,1);var as=pn[gn.bin1],ro=zn[gn.bin0],ba=zn[gn.bin1],co=as-ua||0,Us=ro-ua||0,Ma;return as===void 0?ba===void 0?Ma=0:ro===void 0?Ma=2*(ba-ua):Ma=(2*ba-ro-ua)*2/3:ba===void 0?ro===void 0?Ma=0:Ma=(2*ua-as-ro)*2/3:ro===void 0?Ma=(2*ba-as-ua)*2/3:Ma=ba+ua-as-ro,Se(ua+gn.frac*co+ns.frac*(Us+gn.frac*Ma))}if(F!=="default"){var fe=0,ee;try{ee=new Uint8Array(O*$*4)}catch(pn){ee=new Array(O*$*4)}if(F==="smooth"){var ae=v||p,_e=m||d,re=new Array(ae.length),pe=new Array(_e.length),Te=new Array(R),Ce=v?bMe:xMe,ze=m?bMe:xMe,we,me,Le;for(C=0;CWt||Wt>a._length))for(k=Ie;kfr||fr>n._length)){var lr=POt({x:Ht,y:_t},u,e._fullLayout);lr.x=Ht,lr.y=_t;var Ot=l.z[C][k];Ot===void 0?(lr.z="",lr.zLabel=""):(lr.z=Ot,lr.zLabel=LOt.tickText(pt,Ot,"hover").text);var Jt=l.text&&l.text[C]&&l.text[C][k];(Jt===void 0||Jt===!1)&&(Jt=""),lr.text=Jt;var Cr=Nd.texttemplateString({data:[lr,u._meta],fallback:u.texttemplatefallback,labels:lr,locale:e._fullLayout._d3locale,template:Ke});if(Cr){var Ge=Cr.split("
"),Qe=Ge.length,nt=0;for(D=0;D{"use strict";MMe.exports={min:"zmin",max:"zmax"}});var hP=W((eHr,SMe)=>{"use strict";var NOt=gi();SMe.exports=function(t){NOt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var pP=W((tHr,kMe)=>{"use strict";var EMe=Is(),rS=tt(),dP=rS.isArrayOrTypedArray,UOt=Yi(),VOt=es().extractOpts;kMe.exports=function(t,r,i,n,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,p=s.z,d=s.xCenter,v=s.yCenter,m=s.zmask,g=l.zhoverformat,w=f,_=h,b,M,x,A;if(t.index!==!1){try{x=Math.round(t.index[1]),A=Math.round(t.index[0])}catch(B){rS.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=p[0].length||A<0||A>p.length)return}else{if(EMe.inbox(r-f[0],r-f[f.length-1],0)>0||EMe.inbox(i-h[0],i-h[h.length-1],0)>0)return;if(o){var T;for(w=[2*f[0]-f[1]],T=1;T{"use strict";CMe.exports={attributes:S5(),supplyDefaults:SAe(),calc:lP(),plot:fP(),colorbar:F5(),style:hP(),hoverPoints:pP(),moduleType:"trace",name:"heatmap",basePlotModule:xl(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var LMe=W((iHr,FMe)=>{"use strict";FMe.exports=DMe()});var xY=W((nHr,PMe)=>{"use strict";PMe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var IMe={};Jn(IMe,{eventDataKeys:()=>GOt});var GOt,RMe=Ci(()=>{"use strict";GOt=["binNumber"]});var vP=W((aHr,OMe)=>{"use strict";var Xh=R1(),zMe=Ts().axisHoverFormat,{hovertemplateAttrs:HOt,texttemplateAttrs:jOt,templatefallbackAttrs:BMe}=Wa(),bY=jo(),qMe=xY(),$Ot=(RMe(),Pt(IMe)),_Y=an().extendFlat;OMe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:zMe("x"),yhoverformat:zMe("y"),text:_Y({},Xh.text,{}),hovertext:_Y({},Xh.hovertext,{}),orientation:Xh.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:qMe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:qMe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:HOt({},{keys:$Ot.eventDataKeys}),hovertemplatefallback:BMe(),texttemplate:jOt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:BMe({editType:"plot"}),textposition:_Y({},Xh.textposition,{arrayOk:!1}),textfont:bY({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:bY({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:bY({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Xh.insidetextanchor,textangle:Xh.textangle,cliponaxis:Xh.cliponaxis,constraintext:Xh.constraintext,marker:Xh.marker,offsetgroup:Xh.offsetgroup,alignmentgroup:Xh.alignmentgroup,selected:Xh.selected,unselected:Xh.unselected,zorder:Xh.zorder}});var GMe=W((oHr,VMe)=>{"use strict";var NMe=xi(),iS=tt(),UMe=ti(),WOt=I0().handleText,YOt=NL(),XOt=vP();VMe.exports=function(t,r,i,n){function a(w,_){return iS.coerce(t,r,XOt,w,_)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");WOt(t,r,n,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",p=o&&s?Math.min(iS.minRowLength(o)&&iS.minRowLength(s)):iS.minRowLength(r[f]||[]);if(!p){r.visible=!1;return}r._length=p;var d=NMe.getComponentMethod("calendars","handleTraceDefaults");d(t,r,["x","y"],n);var v=r[h];v&&a("histfunc"),a("histnorm"),a("autobin"+f),YOt(t,r,a,i,n),iS.coerceSelectionMarkerOpacity(r,a);var m=(r.marker.line||{}).color,g=NMe.getComponentMethod("errorbars","supplyDefaults");g(t,r,m||UMe.defaultLine,{axis:"y"}),g(t,r,m||UMe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var mP=W((sHr,$Me)=>{"use strict";var nS=tt(),ZOt=Ls(),gP=xi().traceIs,KOt=Pb(),JOt=I0().validateCornerradius,HMe=nS.nestedProperty,wY=kb().getAxisGroup,jMe=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],QOt=["x","y"];$Me.exports=function(t,r){var i=r._histogramBinOpts={},n=[],a={},o=[],s,l,u,c,f,h,p;function d(F,P){return nS.coerce(s._input,s,s._module.attributes,F,P)}function v(F){return F.orientation==="v"?"x":"y"}function m(F,P){var R=ZOt.getFromTrace({_fullLayout:r},F,P);return R.type}function g(F,P,R){var L=F.uid+"__"+R;P||(P=L);var I=m(F,R),B=F[R+"calendar"]||"",O=i[P],$=!0;O&&(I===O.axType&&B===O.calendar?($=!1,O.traces.push(F),O.dirs.push(R)):(P=L,I!==O.axType&&nS.warn(["Attempted to group the bins of trace",F.index,"set on a","type:"+I,"axis","with bins on","type:"+O.axType,"axis."].join(" ")),B!==O.calendar&&nS.warn(["Attempted to group the bins of trace",F.index,"set with a",B,"calendar","with bins",O.calendar?"on a "+O.calendar+" calendar":"w/o a set calendar"].join(" ")))),$&&(i[P]={traces:[F],dirs:[R],axType:I,calendar:F[R+"calendar"]||""}),F["_"+R+"bingroup"]=P}for(f=0;f{"use strict";var eNt=w5().hoverPoints,tNt=Yi().hoverLabelText;WMe.exports=function(t,r,i,n,a){var o=eNt(t,r,i,n,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=tNt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var TY=W((uHr,XMe)=>{"use strict";XMe.exports=function(t,r,i,n,a){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(i.cumulative||{}).enabled){var o=Array.isArray(a)?n[0].pts[a[0]][a[1]]:n[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var KMe=W((cHr,ZMe)=>{"use strict";ZMe.exports={attributes:vP(),layoutAttributes:OL(),supplyDefaults:GMe(),crossTraceDefaults:mP(),supplyLayoutDefaults:GW(),calc:hY().calc,crossTraceCalc:Ib().crossTraceCalc,plot:Wb().plot,layerName:"barlayer",style:zd().style,styleOnSelect:zd().styleOnSelect,colorbar:Cc(),hoverPoints:YMe(),selectPoints:T5(),eventData:TY(),moduleType:"trace",name:"histogram",basePlotModule:xl(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var QMe=W((fHr,JMe)=>{"use strict";JMe.exports=KMe()});var xP=W((hHr,rSe)=>{"use strict";var dv=vP(),eSe=xY(),yP=S5(),rNt=Ja(),AY=Ts().axisHoverFormat,{hovertemplateAttrs:iNt,texttemplateAttrs:nNt,templatefallbackAttrs:tSe}=Wa(),aNt=Fo(),aS=an().extendFlat;rSe.exports=aS({x:dv.x,y:dv.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:dv.histnorm,histfunc:dv.histfunc,nbinsx:dv.nbinsx,xbins:eSe("x"),nbinsy:dv.nbinsy,ybins:eSe("y"),autobinx:dv.autobinx,autobiny:dv.autobiny,bingroup:aS({},dv.bingroup,{}),xbingroup:aS({},dv.bingroup,{}),ybingroup:aS({},dv.bingroup,{}),xgap:yP.xgap,ygap:yP.ygap,zsmooth:yP.zsmooth,xhoverformat:AY("x"),yhoverformat:AY("y"),zhoverformat:AY("z",1),hovertemplate:iNt({},{keys:["z"]}),hovertemplatefallback:tSe(),texttemplate:nNt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:tSe({editType:"plot"}),textfont:yP.textfont,showlegend:aS({},rNt.showlegend,{dflt:!1})},aNt("",{cLetter:"z",autoColorDflt:!1}))});var MY=W((dHr,nSe)=>{"use strict";var oNt=xi(),iSe=tt();nSe.exports=function(t,r,i,n){var a=i("x"),o=i("y"),s=iSe.minRowLength(a),l=iSe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=oNt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],n);var c=i("z")||i("marker.color");c&&i("histfunc"),i("histnorm"),i("autobinx"),i("autobiny")}});var oSe=W((pHr,aSe)=>{"use strict";var sNt=tt(),lNt=MY(),uNt=aY(),cNt=Bu(),fNt=tS(),hNt=xP();aSe.exports=function(t,r,i,n){function a(o,s){return sNt.coerce(t,r,hNt,o,s)}lNt(t,r,a,n),r.visible!==!1&&(uNt(t,r,a,n),cNt(t,r,n,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),fNt(a,n),a("xhoverformat"),a("yhoverformat"))}});var uSe=W((vHr,lSe)=>{"use strict";var dNt=pP(),sSe=Yi().hoverLabelText;lSe.exports=function(t,r,i,n,a){var o=dNt(t,r,i,n,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],p=c.yRanges[l];return t.xLabel=sSe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=sSe(t.ya,[p[0],p[1]],f.yhoverformat),o}}});var fSe=W((gHr,cSe)=>{"use strict";cSe.exports={attributes:xP(),supplyDefaults:oSe(),crossTraceDefaults:mP(),calc:lP(),plot:fP(),layerName:"heatmaplayer",colorbar:F5(),style:hP(),hoverPoints:uSe(),eventData:TY(),moduleType:"trace",name:"histogram2d",basePlotModule:xl(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var dSe=W((mHr,hSe)=>{"use strict";hSe.exports=fSe()});var bP={};Jn(bP,{COMPARISON_OPS:()=>pNt,COMPARISON_OPS2:()=>vNt,CONSTRAINT_REDUCTION:()=>yNt,INTERVAL_OPS:()=>gNt,SET_OPS:()=>mNt});var pNt,vNt,gNt,mNt,yNt,_P=Ci(()=>{"use strict";pNt=["=","!=","<",">=",">","<="],vNt=["=","<",">=",">","<="],gNt=["[]","()","[)","(]","][",")(","](",")["],mNt=["{}","}{"],yNt={"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}});var oS=W((yHr,mSe)=>{"use strict";var ql=S5(),wP=Ws(),vSe=Ts(),SY=vSe.axisHoverFormat,xNt=vSe.descriptionOnlyNumbers,bNt=Fo(),_Nt=zu().dash,wNt=jo(),L5=an().extendFlat,gSe=(_P(),Pt(bP)),TNt=gSe.COMPARISON_OPS2,ANt=gSe.INTERVAL_OPS,pSe=wP.line;mSe.exports=L5({z:ql.z,x:ql.x,x0:ql.x0,dx:ql.dx,y:ql.y,y0:ql.y0,dy:ql.dy,xperiod:ql.xperiod,yperiod:ql.yperiod,xperiod0:wP.xperiod0,yperiod0:wP.yperiod0,xperiodalignment:ql.xperiodalignment,yperiodalignment:ql.yperiodalignment,text:ql.text,hovertext:ql.hovertext,transpose:ql.transpose,xtype:ql.xtype,ytype:ql.ytype,xhoverformat:SY("x"),yhoverformat:SY("y"),zhoverformat:SY("z",1),hovertemplate:ql.hovertemplate,hovertemplatefallback:ql.hovertemplatefallback,texttemplate:L5({},ql.texttemplate,{}),texttemplatefallback:ql.texttemplatefallback,textfont:L5({},ql.textfont,{}),hoverongaps:ql.hoverongaps,connectgaps:L5({},ql.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:wNt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:xNt("contour label")},operation:{valType:"enumerated",values:[].concat(TNt).concat(ANt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:L5({},pSe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:_Nt,smoothing:L5({},pSe.smoothing,{}),editType:"plot"},zorder:wP.zorder},bNt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var kY=W((xHr,xSe)=>{"use strict";var sf=xP(),B1=oS(),MNt=Fo(),EY=Ts().axisHoverFormat,ySe=an().extendFlat;xSe.exports=ySe({x:sf.x,y:sf.y,z:sf.z,marker:sf.marker,histnorm:sf.histnorm,histfunc:sf.histfunc,nbinsx:sf.nbinsx,xbins:sf.xbins,nbinsy:sf.nbinsy,ybins:sf.ybins,autobinx:sf.autobinx,autobiny:sf.autobiny,bingroup:sf.bingroup,xbingroup:sf.xbingroup,ybingroup:sf.ybingroup,autocontour:B1.autocontour,ncontours:B1.ncontours,contours:B1.contours,line:{color:B1.line.color,width:ySe({},B1.line.width,{dflt:.5}),dash:B1.line.dash,smoothing:B1.line.smoothing,editType:"plot"},xhoverformat:EY("x"),yhoverformat:EY("y"),zhoverformat:EY("z",1),hovertemplate:sf.hovertemplate,hovertemplatefallback:sf.hovertemplatefallback,texttemplate:B1.texttemplate,texttemplatefallback:B1.texttemplatefallback,textfont:B1.textfont},MNt("",{cLetter:"z",editTypeOverride:"calc"}))});var TP=W((bHr,bSe)=>{"use strict";bSe.exports=function(t,r,i,n){var a=n("contours.start"),o=n("contours.end"),s=a===!1||o===!1,l=i("contours.size"),u;s?u=r.autocontour=!0:u=i("autocontour",!1),(u||!l)&&i("ncontours")}});var CY=W((_Hr,_Se)=>{"use strict";var SNt=tt();_Se.exports=function(t,r,i,n){n||(n={});var a=t("contours.showlabels");if(a){var o=r.font;SNt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:i}}),t("contours.labelformat")}n.hasHover!==!1&&t("zhoverformat")}});var AP=W((wHr,wSe)=>{"use strict";var ENt=Bu(),kNt=CY();wSe.exports=function(t,r,i,n,a){var o=i("contours.coloring"),s,l="";o==="fill"&&(s=i("contours.showlines")),s!==!1&&(o!=="lines"&&(l=i("line.color","#000")),i("line.width",.5),i("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,ENt(t,r,n,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),kNt(i,n,l,a)}});var SSe=W((THr,MSe)=>{"use strict";var TSe=tt(),CNt=MY(),DNt=TP(),FNt=AP(),LNt=tS(),ASe=kY();MSe.exports=function(t,r,i,n){function a(s,l){return TSe.coerce(t,r,ASe,s,l)}function o(s){return TSe.coerce2(t,r,ASe,s)}CNt(t,r,a,n),r.visible!==!1&&(DNt(t,r,a,o),FNt(t,r,a,n),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&LNt(a,n))}});var LY=W((AHr,kSe)=>{"use strict";var FY=Yi(),DY=tt();kSe.exports=function(t,r){var i=t.contours;if(t.autocontour){var n=t.zmin,a=t.zmax;(t.zauto||n===void 0)&&(n=DY.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=DY.aggNums(Math.max,null,r));var o=ESe(n,a,t.ncontours);i.size=o.dtick,i.start=FY.tickFirst(o),o.range.reverse(),i.end=FY.tickFirst(o),i.start===n&&(i.start+=i.size),i.end===a&&(i.end-=i.size),i.start>i.end&&(i.start=i.end=(i.start+i.end)/2),t._input.contours||(t._input.contours={}),DY.extendFlat(t._input.contours,{start:i.start,end:i.end,size:i.size}),t._input.autocontour=!0}else if(i.type!=="constraint"){var s=i.start,l=i.end,u=t._input.contours;if(s>l&&(i.start=u.start=l,l=i.end=u.end=s,s=i.start),!(i.size>0)){var c;s===l?c=1:c=ESe(s,l,t.ncontours).dtick,u.size=i.size=c}}};function ESe(e,t,r){var i={type:"linear",range:[e,t]};return FY.autoTicks(i,(t-e)/(r||15)),i}});var sS=W((MHr,CSe)=>{"use strict";CSe.exports=function(t){return t.end+t.size/1e6}});var PY=W((SHr,FSe)=>{"use strict";var DSe=es(),PNt=lP(),INt=LY(),RNt=sS();FSe.exports=function(t,r){var i=PNt(t,r),n=i[0].z;INt(r,n);var a=r.contours,o=DSe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=RNt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,p=h+f*c;s=[h,p]}else s=n;return DSe.calc(t,r,{vals:s,cLetter:"z"}),i}});var lS={};Jn(lS,{BOTTOMSTART:()=>zNt,CHOOSESADDLE:()=>UNt,LABELDISTANCE:()=>GNt,LABELINCREASE:()=>HNt,LABELMAX:()=>$Nt,LABELMIN:()=>jNt,LABELOPTIMIZER:()=>WNt,LEFTSTART:()=>qNt,NEWDELTA:()=>NNt,RIGHTSTART:()=>ONt,SADDLEREMAINDER:()=>VNt,TOPSTART:()=>BNt});var zNt,BNt,qNt,ONt,NNt,UNt,VNt,GNt,HNt,jNt,$Nt,WNt,uS=Ci(()=>{"use strict";zNt=[1,9,13,104,713],BNt=[4,6,7,104,713],qNt=[8,12,14,208,1114],ONt=[2,3,11,208,1114],NNt=[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]],UNt={104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},VNt={1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},GNt=2,HNt=10,jNt=3,$Nt=10,WNt={EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}});var IY=W((EHr,LSe)=>{"use strict";var MP=(uS(),Pt(lS));LSe.exports=function(t){var r=t[0].z,i=r.length,n=r[0].length,a=i===2||n===2,o,s,l,u,c,f,h,p,d;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var i=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>i?r===5?713:1114:r===5?104:208}return r===15?0:r}});var RY=W((kHr,RSe)=>{"use strict";var SP=tt(),P5=(uS(),Pt(lS));RSe.exports=function(t,r,i){var n,a,o,s,l;for(r=r||.01,i=i||.01,o=0;o20?(o=P5.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=P5.SADDLEREMAINDER[o]):delete e.crossings[a],s=P5.NEWDELTA[o],!s){SP.log("Found bad marching index:",o,t,e.level);break}l.push(ISe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),cS(l[l.length-1],l[l.length-2],i,n)&&l.pop();var d=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),v=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(v||r&&d)break;o=e.crossings[a]}p===1e4&&SP.log("Infinite loop in contour?");var m=cS(l[0],l[l.length-1],i,n),g=0,w=.2*e.smoothing,_=[],b=0,M,x,A,T,y,E,S,C,k,D,F;for(p=1;p=b;p--)if(M=_[p],M=b&&M+_[x]C&&k--,e.edgepaths[k]=F.concat(l,D));break}I||(e.edgepaths[C]=l.concat(D))}for(C=0;C20&&t?e===208||e===1114?i=r[0]===0?1:-1:n=r[1]===0?1:-1:P5.BOTTOMSTART.indexOf(e)!==-1?n=1:P5.LEFTSTART.indexOf(e)!==-1?i=1:P5.TOPSTART.indexOf(e)!==-1?n=-1:i=-1,[i,n]}function ISe(e,t,r){var i=t[0]+Math.max(r[0],0),n=t[1]+Math.max(r[1],0),a=e.z[n][i],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[n][i+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[i]):0)+(l!==0?l*o.c2l(e.x[i+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[n],!0),i+l,n]}else{var c=(e.level-a)/(e.z[n+1][i]-a),f=(c!==1?(1-c)*s.c2l(e.y[n]):0)+(c!==0?c*s.c2l(e.y[n+1]):0);return[o.c2p(e.x[i],!0),s.c2p(s.l2c(f),!0),i,n+c]}}});var OSe=W((CHr,qSe)=>{"use strict";var zY=(_P(),Pt(bP)),KNt=hn();qSe.exports={"[]":zSe("[]"),"][":zSe("]["),">":BY(">"),"<":BY("<"),"=":BY("=")};function BSe(e,t){var r=Array.isArray(t),i;function n(a){return KNt(a)?+a:null}return zY.COMPARISON_OPS2.indexOf(e)!==-1?i=n(r?t[0]:t):zY.INTERVAL_OPS.indexOf(e)!==-1?i=r?[n(t[0]),n(t[1])]:[n(t),n(t)]:zY.SET_OPS.indexOf(e)!==-1&&(i=r?t.map(n):[n(t)]),i}function zSe(e){return function(t){t=BSe(e,t);var r=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return{start:r,end:i,size:i-r}}}function BY(e){return function(t){return t=BSe(e,t),{start:t,end:1/0,size:1/0}}}});var qY=W((DHr,USe)=>{"use strict";var NSe=tt(),JNt=OSe(),QNt=sS();USe.exports=function(t,r,i){for(var n=t.type==="constraint"?JNt[t._operation](t.value):t,a=n.size,o=[],s=QNt(n),l=i.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:i.a,y:i.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:i.x,y:i.y},c=n.start;c1e3){NSe.warn("Too many contours, clipping at 1000",t);break}return o}});var OY=W((FHr,GSe)=>{"use strict";var I5=tt();GSe.exports=function(e,t){var r,i,n,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&I5.warn("Contour data invalid for the specified inequality operation."),i=e[0],r=0;r{"use strict";HSe.exports=function(e,t){var r=e[0],i=r.z,n;switch(t.type){case"levels":var a=Math.min(i[0][0],i[0][1]);for(n=0;no.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(n=0;n":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&p===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),p=Math.max(f[0],f[1]),hu&&(r.prefixBoundary=!0);break}break}}});var EP=W(zf=>{"use strict";var hS=gi(),lc=tt(),lm=Qi(),eUt=es(),WSe=ao(),jSe=Yi(),$Se=g1(),tUt=fP(),YSe=IY(),XSe=RY(),rUt=qY(),iUt=OY(),ZSe=NY(),fS=(uS(),Pt(lS)),q1=fS.LABELOPTIMIZER;zf.plot=function(t,r,i,n){var a=r.xaxis,o=r.yaxis;lc.makeTraceGroups(n,i,"contour").each(function(s){var l=hS.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,p=c.contours,d=rUt(p,r,u),v=lc.ensureSingle(l,"g","heatmapcoloring"),m=[];p.coloring==="heatmap"&&(m=[s]),tUt(t,r,m,v),YSe(d),XSe(d);var g=a.c2p(f[0],!0),w=a.c2p(f[f.length-1],!0),_=o.c2p(h[0],!0),b=o.c2p(h[h.length-1],!0),M=[[g,b],[w,b],[w,_],[g,_]],x=d;p.type==="constraint"&&(x=iUt(d,p._operation)),nUt(l,M,p),aUt(l,x,M,p),oUt(l,d,t,u,p),lUt(l,r,t,u,M)})};function nUt(e,t,r){var i=lc.ensureSingle(e,"g","contourbg"),n=i.selectAll("path").data(r.coloring==="fill"?[0]:[]);n.enter().append("path"),n.exit().remove(),n.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function aUt(e,t,r,i){var n=i.coloring==="fill"||i.type==="constraint"&&i._operation!=="=",a="M"+r.join("L")+"Z";n&&ZSe(t,i);var o=lc.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(n?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+KSe(l,r);u?hS.select(this).attr("d",u).style("stroke","none"):hS.select(this).remove()})}function KSe(e,t){var r="",i=0,n=e.edgepaths.map(function(g,w){return w}),a=!0,o,s,l,u,c,f;function h(g){return Math.abs(g[1]-t[0][1])<.01}function p(g){return Math.abs(g[1]-t[2][1])<.01}function d(g){return Math.abs(g[0]-t[0][0])<.01}function v(g){return Math.abs(g[0]-t[2][0])<.01}for(;n.length;){for(f=lm.smoothopen(e.edgepaths[i],e.smoothing),r+=a?f:f.replace(/^M/,"L"),n.splice(n.indexOf(i),1),o=e.edgepaths[i][e.edgepaths[i].length-1],u=-1,l=0;l<4;l++){if(!o){lc.log("Missing end?",i,e);break}for(h(o)&&!v(o)?s=t[1]:d(o)?s=t[0]:p(o)?s=t[3]:v(o)&&(s=t[2]),c=0;c=0&&(s=m,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-m[1])<.01&&(m[0]-o[0])*(s[0]-m[0])>=0&&(s=m,u=c):lc.log("endpt to newendpt is not vert. or horz.",o,s,m)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){lc.log("unclosed perimeter path");break}i=u,a=n.indexOf(i)===-1,a&&(i=n[0],r+="Z")}for(i=0;iq1.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=q1.MAXCOST)return c};function sUt(e,t,r,i){var n=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*n,c=Math.sin(l)*n,f=(o>i.center?i.right-o:o-i.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>i.middle?i.bottom-s:s-i.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var p=q1.EDGECOST*(1/(f-1)+1/(h-1));p+=q1.ANGLECOST*l*l;for(var d=o-u,v=s-c,m=o+u,g=s+c,w=0;w{"use strict";var cUt=gi(),UY=es(),fUt=sS();JSe.exports=function(t){var r=t.contours,i=r.start,n=fUt(r),a=r.size||1,o=Math.floor((n-i)/a)+1,s=r.coloring==="lines"?0:1,l=UY.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?UY.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),p,d,v=l.min,m=l.max;if(r.coloring==="heatmap"){for(d=0;d=m)&&(i<=v&&(i=v),n>=m&&(n=m),o=Math.floor((n-i)/a)+1,s=0),d=0;dv&&(f.unshift(v),h.unshift(h[0])),f[f.length-1]{"use strict";var kP=gi(),QSe=Qi(),hUt=hP(),dUt=VY();eEe.exports=function(t){var r=kP.select(t).selectAll("g.contour");r.style("opacity",function(i){return i[0].trace.opacity}),r.each(function(i){var n=kP.select(this),a=i[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",p=f||h?dUt(a):null;n.selectAll("g.contourlevel").each(function(m){kP.select(this).selectAll("path").call(QSe.lineGroupStyle,s.width,f?p(m.level):s.color,s.dash)});var d=o.labelfont;if(n.selectAll("g.contourlabels text").each(function(m){QSe.font(kP.select(this),{weight:d.weight,style:d.style,variant:d.variant,textcase:d.textcase,lineposition:d.lineposition,shadow:d.shadow,family:d.family,size:d.size,color:d.color||(f?p(m.level):s.color)})}),c)n.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var v;n.selectAll("g.contourfill path").style("fill",function(m){return v===void 0&&(v=m.level),p(m.level+.5*l)}),v===void 0&&(v=u),n.selectAll("g.contourbg path").style("fill",p(v-.5*l))}}),hUt(t)}});var DP=W((zHr,rEe)=>{"use strict";var tEe=es(),pUt=VY(),vUt=sS();function gUt(e,t,r){var i=t.contours,n=t.line,a=i.size||1,o=i.coloring,s=pUt(t,{isColorbar:!0});if(o==="heatmap"){var l=tEe.extractOpts(t);r._fillgradient=l.reversescale?tEe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:n.color,width:i.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:i.start,end:vUt(i),size:a}}rEe.exports={min:"zmin",max:"zmax",calc:gUt}});var GY=W((BHr,iEe)=>{"use strict";var FP=ti(),mUt=pP();iEe.exports=function(t,r,i,n,a){a||(a={}),a.isContour=!0;var o=mUt(t,r,i,n,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&FP.opacity(l.fillcolor)?s.color=FP.addOpacity(l.fillcolor,1):l.contours.showlines&&FP.opacity(l.line.color)&&(s.color=FP.addOpacity(l.line.color,1)))}),o}});var aEe=W((qHr,nEe)=>{"use strict";nEe.exports={attributes:kY(),supplyDefaults:SSe(),crossTraceDefaults:mP(),calc:PY(),plot:EP().plot,layerName:"contourlayer",style:CP(),colorbar:DP(),hoverPoints:GY(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:xl(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var sEe=W((OHr,oEe)=>{"use strict";oEe.exports=aEe()});var HY=W((NHr,dEe)=>{"use strict";var lEe=hn(),yUt=CY(),fEe=ti(),uEe=fEe.addOpacity,xUt=fEe.opacity,hEe=(_P(),Pt(bP)),cEe=tt().isArrayOrTypedArray,bUt=hEe.CONSTRAINT_REDUCTION,_Ut=hEe.COMPARISON_OPS2;dEe.exports=function(t,r,i,n,a,o){var s=r.contours,l,u,c,f=i("contours.operation");if(s._operation=bUt[f],wUt(i,s),f==="="?l=s.showlines=!0:(l=i("contours.showlines"),c=i("fillcolor",uEe((t.line||{}).color||a,.5))),l){var h=c&&xUt(c)?uEe(r.fillcolor,1):a;u=i("line.color",h),i("line.width",2),i("line.dash")}i("line.smoothing"),yUt(i,n,u,o)};function wUt(e,t){var r;_Ut.indexOf(t.operation)===-1?(e("contours.value",[0,1]),cEe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:lEe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),lEe(t.value)||(cEe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var gEe=W((UHr,vEe)=>{"use strict";var jY=tt(),TUt=JL(),AUt=ev(),MUt=HY(),SUt=TP(),EUt=AP(),kUt=tS(),pEe=oS();vEe.exports=function(t,r,i,n){function a(u,c){return jY.coerce(t,r,pEe,u,c)}function o(u){return jY.coerce2(t,r,pEe,u)}var s=TUt(t,r,a,n);if(!s){r.visible=!1;return}AUt(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",jY.isArray1D(r.z)),l?MUt(t,r,a,n,i):(SUt(t,r,a,o),EUt(t,r,a,n)),r.contours&&r.contours.coloring==="heatmap"&&kUt(a,n),a("zorder")}});var yEe=W((VHr,mEe)=>{"use strict";mEe.exports={attributes:oS(),supplyDefaults:gEe(),calc:PY(),plot:EP().plot,style:CP(),colorbar:DP(),hoverPoints:GY(),moduleType:"trace",name:"contour",basePlotModule:xl(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var bEe=W((GHr,xEe)=>{"use strict";xEe.exports=yEe()});var $Y=W((HHr,AEe)=>{"use strict";var{hovertemplateAttrs:CUt,texttemplateAttrs:DUt,templatefallbackAttrs:_Ee}=Wa(),FUt=C1(),B0=Ws(),LUt=Ja(),wEe=Fo(),PUt=zu().dash,u2=an().extendFlat,Ud=B0.marker,dS=B0.line,TEe=Ud.line;AEe.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:u2({},B0.mode,{dflt:"markers"}),text:u2({},B0.text,{}),texttemplate:DUt({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:_Ee({editType:"plot"}),hovertext:u2({},B0.hovertext,{}),line:{color:dS.color,width:dS.width,dash:PUt,backoff:dS.backoff,shape:u2({},dS.shape,{values:["linear","spline"]}),smoothing:dS.smoothing,editType:"calc"},connectgaps:B0.connectgaps,cliponaxis:B0.cliponaxis,fill:u2({},B0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:FUt(),marker:u2({symbol:Ud.symbol,opacity:Ud.opacity,angle:Ud.angle,angleref:Ud.angleref,standoff:Ud.standoff,maxdisplayed:Ud.maxdisplayed,size:Ud.size,sizeref:Ud.sizeref,sizemin:Ud.sizemin,sizemode:Ud.sizemode,line:u2({width:TEe.width,dash:TEe.dash,editType:"calc"},wEe("marker.line")),gradient:Ud.gradient,editType:"calc"},wEe("marker")),textfont:B0.textfont,textposition:B0.textposition,selected:B0.selected,unselected:B0.unselected,hoverinfo:u2({},LUt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:B0.hoveron,hovertemplate:CUt(),hovertemplatefallback:_Ee()}});var kEe=W((jHr,EEe)=>{"use strict";var MEe=tt(),IUt=(k1(),Pt(E1)),R5=Wo(),RUt=Dd(),zUt=tv(),SEe=Jw(),BUt=rv(),qUt=F1(),OUt=$Y();EEe.exports=function(t,r,i,n){function a(h,p){return MEe.coerce(t,r,OUt,h,p)}var o=a("a"),s=a("b"),l=a("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u{"use strict";var WY=Yi();CEe.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot;return n.aLabel=WY.tickText(a.aaxis,t.a,!0).text,n.bLabel=WY.tickText(a.baxis,t.b,!0).text,n.cLabel=WY.tickText(a.caxis,t.c,!0).text,n}});var IEe=W((WHr,PEe)=>{"use strict";var YY=hn(),NUt=Fd(),UUt=L1(),VUt=C0(),GUt=Ld().calcMarkerSize,FEe=["a","b","c"],LEe={a:["b","c"],b:["a","c"],c:["a","b"]};PEe.exports=function(t,r){var i=t._fullLayout[r.subplot],n=i.sum,a=r.sum||n,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,p;for(l=0;l{"use strict";var HUt=n5();REe.exports=function(t,r,i){var n=r.plotContainer;n.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:n,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var jUt=l5();BEe.exports=function(t,r,i,n){var a=jUt(t,r,i,n);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,p=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var d={};d[h.subplot]={_subplot:p};var v=h._module.formatLabels(f,h,d);o.aLabel=v.aLabel,o.bLabel=v.bLabel,o.cLabel=v.cLabel;var m=f.hi||h.hoverinfo,g=[];function w(b,M){g.push(b._hovertitle+": "+M)}if(!h.hovertemplate){var _=m.split("+");_.indexOf("all")!==-1&&(_=["a","b","c"]),_.indexOf("a")!==-1&&w(p.aaxis,o.aLabel),_.indexOf("b")!==-1&&w(p.baxis,o.bLabel),_.indexOf("c")!==-1&&w(p.caxis,o.cLabel)}return o.extraText=g.join("
"),o.hovertemplate=h.hovertemplate,a}});var NEe=W((ZHr,OEe)=>{"use strict";OEe.exports=function(t,r,i,n,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n[a]){var o=n[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var JEe=W((KHr,KEe)=>{"use strict";var WEe=gi(),XY=xi(),Gd=tt(),Vd=Gd.strTranslate,LP=Gd._,uh=ti(),Zb=Qi(),UEe=ao(),pS=g1(),ZY=an().extendFlat,$Ut=Qo(),um=Yi(),VEe=Ef(),GEe=Is(),YEe=_1(),HEe=YEe.freeMode,WUt=YEe.rectMode,KY=pb(),YUt=xu().prepSelect,XUt=xu().selectOnClick,ZUt=xu().clearOutline,KUt=xu().clearSelectionsCache,XEe=(Zl(),Pt(Xl));function ZEe(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}KEe.exports=ZEe;var pv=ZEe.prototype;pv.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};pv.plot=function(e,t){var r=this,i=t[r.id],n=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;au.showspikes))return;let o=this.sum-a[0].min-a[1].min-a[2].min,s=uh.combine(n[this.id].bgcolor,n.paper_bgcolor),l;for(let u=0;uz5*u?(g=u,m=g*z5):(m=l,g=m/z5),w=o*m/l,_=s*g/u,d=t.l+t.w*n-m/2,v=t.t+t.h*(1-a)-g/2,r.x0=d,r.y0=v,r.w=m,r.h=g,r.sum=c,r.xaxis={type:"linear",range:[f+2*p-c,c-f-2*h],domain:[n-w/2,n+w/2],_id:"x"},pS(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(D){return D.a>=r.aaxis.range[0]&&D.a<=r.aaxis.range[1]&&D.b>=r.baxis.range[1]&&D.b<=r.baxis.range[0]&&D.c>=r.caxis.range[1]&&D.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-p],domain:[a-_/2,a+_/2],_id:"y"},pS(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var b=r.yaxis.domain[0],M=r.aaxis=ZY({},e.aaxis,{range:[f,c-h-p],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[b,b+_*z5],anchor:"free",position:0,_id:"y",_length:m});pS(M,r.graphDiv._fullLayout),M.setScale();var x=r.baxis=ZY({},e.baxis,{range:[c-f-p,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:m});pS(x,r.graphDiv._fullLayout),x.setScale();var A=r.caxis=ZY({},e.caxis,{range:[c-f-h,p],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[b,b+_*z5],anchor:"free",position:0,_id:"y",_length:m});pS(A,r.graphDiv._fullLayout),A.setScale();var T="M"+d+","+(v+g)+"h"+m+"l-"+m/2+",-"+g+"Z";r.clipDef.select("path").attr("d",T),r.layers.plotbg.select("path").attr("d",T);var y="M0,"+g+"h"+m+"l-"+m/2+",-"+g+"Z";r.clipDefRelative.select("path").attr("d",y);var E=Vd(d,v);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",E),r.clipDefRelative.select("path").attr("transform",null);var S=Vd(d-x._offset,v+g);r.layers.baxis.attr("transform",S),r.layers.bgrid.attr("transform",S);var C=Vd(d+m/2,v)+"rotate(30)"+Vd(0,-M._offset);r.layers.aaxis.attr("transform",C),r.layers.agrid.attr("transform",C);var k=Vd(d+m/2,v)+"rotate(-30)"+Vd(0,-A._offset);r.layers.caxis.attr("transform",k),r.layers.cgrid.attr("transform",k),r.drawAxes(!0),r.layers.aline.select("path").attr("d",M.showline?"M"+d+","+(v+g)+"l"+m/2+",-"+g:"M0,0").call(uh.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+d+","+(v+g)+"h"+m:"M0,0").call(uh.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",A.showline?"M"+(d+m/2)+","+v+"l"+m/2+","+g:"M0,0").call(uh.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),Zb.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};pv.drawAxes=function(e){var t=this,r=t.graphDiv,i=t.id.slice(7)+"title",n=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;n["a-title"]=KY.draw(r,"a"+i,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:LP(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=KY.draw(r,"b"+i,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:LP(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),n["c-title"]=KY.draw(r,"c"+i,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:LP(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};pv.drawAx=function(e){var t=this,r=t.graphDiv,i=e._name,n=i.charAt(0),a=e._id,o=t.layers[i],s=30,l=n+"tickLayout",u=JUt(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=um.calcTicks(e),f=um.clipEnds(e,c),h=um.makeTransTickFn(e),p=um.getTickSigns(e)[2],d=Gd.deg2rad(s),v=p*(e.linewidth||1)/2,m=p*e.ticklen,g=t.w,w=t.h,_=n==="b"?"M0,"+v+"l"+Math.sin(d)*m+","+Math.cos(d)*m:"M"+v+",0l"+Math.cos(d)*m+","+-Math.sin(d)*m,b={a:"M0,0l"+w+",-"+g/2,b:"M0,0l-"+g/2+",-"+w,c:"M0,0l-"+w+","+g/2}[n];um.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:_,transFn:h,crisp:!1}),um.drawGrid(r,e,{vals:f,layer:t.layers[n+"grid"],path:b,transFn:h,crisp:!1}),um.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:um.makeLabelFns(e,0,s)})};function JUt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Vu=XEe.MINZOOM/2+.87,QUt="m-0.87,.5h"+Vu+"v3h-"+(Vu+5.2)+"l"+(Vu/2+2.6)+",-"+(Vu*.87+4.5)+"l2.6,1.5l-"+Vu/2+","+Vu*.87+"Z",eVt="m0.87,.5h-"+Vu+"v3h"+(Vu+5.2)+"l-"+(Vu/2+2.6)+",-"+(Vu*.87+4.5)+"l-2.6,1.5l"+Vu/2+","+Vu*.87+"Z",tVt="m0,1l"+Vu/2+","+Vu*.87+"l2.6,-1.5l-"+(Vu/2+2.6)+",-"+(Vu*.87+4.5)+"l-"+(Vu/2+2.6)+","+(Vu*.87+4.5)+"l2.6,1.5l"+Vu/2+",-"+Vu*.87+"Z",rVt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",jEe=!0;pv.clearOutline=function(){KUt(this.dragOptions),ZUt(this.dragOptions.gd)};pv.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,i=r._fullLayout._zoomlayer,n,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(S,C,k){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],n=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var D=e.dragOptions.dragmode=r._fullLayout.dragmode;HEe(D)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,D==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=g,e.dragOptions.doneFn=A,w(S,C,k)):D==="pan"?(e.dragOptions.moveFn=y,e.dragOptions.clickFn=g,e.dragOptions.doneFn=E,T(),e.clearOutline(r)):(WUt(D)||HEe(D))&&YUt(S,C,k,e.dragOptions,D)}};var o,s,l,u,c,f,h,p,d,v;function m(S){var C={};return C[e.id+".aaxis.min"]=S.a,C[e.id+".baxis.min"]=S.b,C[e.id+".caxis.min"]=S.c,C}function g(S,C){var k=r._fullLayout.clickmode;$Ee(r),S===2&&(r.emit("plotly_doubleclick",null),XY.call("_guiRelayout",r,m({a:0,b:0,c:0}))),k.indexOf("select")>-1&&S===1&&XUt(C,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),k.indexOf("event")>-1&&GEe.click(r,C,e.id)}function w(S,C,k){var D=t.getBoundingClientRect();o=C-D.left,s=k-D.top,r._fullLayout._calcInverseTransform(r);var F=r._fullLayout._invTransform,P=Gd.apply3DTransform(F)(o,s);o=P[0],s=P[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=uh.luminosity(e.graphDiv._fullLayout[e.id].bgcolor),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",p=!1,d=i.append("path").attr("class","zoombox").attr("transform",Vd(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),v=i.append("path").attr("class","zoombox-corners").attr("transform",Vd(e.x0,e.y0)).style({fill:uh.background,stroke:uh.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function _(S,C){return 1-C/e.h}function b(S,C){return 1-(S+(e.h-C)/Math.sqrt(3))/e.w}function M(S,C){return(S-(e.h-C)/Math.sqrt(3))/e.w}function x(S,C){var k=o+S*n,D=s+C*a,F=Math.max(0,Math.min(1,_(o,s),_(k,D))),P=Math.max(0,Math.min(1,b(o,s),b(k,D))),R=Math.max(0,Math.min(1,M(o,s),M(k,D))),L=(F/2+R)*e.w,I=(1-F/2-P)*e.w,B=(L+I)/2,O=I-L,$=(1-F)*e.h,X=$-O/z5;O.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),v.transition().style("opacity",1).duration(200),p=!0),r.emit("plotly_relayouting",m(c))}function A(){$Ee(r),c!==l&&(XY.call("_guiRelayout",r,m(c)),jEe&&r.data&&r._context.showTips&&(Gd.notifier(LP(r,"Double-click to zoom back out"),"long",r),jEe=!1))}function T(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function y(S,C){var k=S/e.xaxis._m,D=C/e.yaxis._m;c={a:l.a-D,b:l.b+(k+D)/2,c:l.c-(k-D)/2};var F=[c.a,c.b,c.c].sort(Gd.sorterAsc),P={a:F.indexOf(c.a),b:F.indexOf(c.b),c:F.indexOf(c.c)};F[0]<0&&(F[1]+F[0]/2<0?(F[2]+=F[0]+F[1],F[0]=F[1]=0):(F[2]+=F[0]/2,F[1]+=F[0]/2,F[0]=0),c={a:F[P.a],b:F[P.b],c:F[P.c]},C=(l.a-c.a)*e.yaxis._m,S=(l.c-c.c-l.b+c.b)*e.xaxis._m);var R=Vd(e.x0+S,e.y0+C);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",R);var L=Vd(-S,-C);e.clipDefRelative.select("path").attr("transform",L),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(Zb.hideOutsideRangePoints,e),r.emit("plotly_relayouting",m(c))}function E(){XY.call("_guiRelayout",r,m(c))}t.onmousemove=function(S){GEe.hover(r,S,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(S){r._dragging||VEe.unhover(r,S)},VEe.init(this.dragOptions)};function $Ee(e){WEe.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var QY=W((JHr,QEe)=>{"use strict";var iVt=Yl(),nVt=ds().attributes,La=ac(),aVt=hs().overrideAll,PP=an().extendFlat,JY={title:{text:La.title.text,font:La.title.font},color:La.color,tickmode:La.minor.tickmode,nticks:PP({},La.nticks,{dflt:6,min:1}),tick0:La.tick0,dtick:La.dtick,tickvals:La.tickvals,ticktext:La.ticktext,ticks:La.ticks,ticklen:La.ticklen,tickwidth:La.tickwidth,tickcolor:La.tickcolor,ticklabelstep:La.ticklabelstep,showticklabels:La.showticklabels,labelalias:La.labelalias,showtickprefix:La.showtickprefix,tickprefix:La.tickprefix,showticksuffix:La.showticksuffix,ticksuffix:La.ticksuffix,showexponent:La.showexponent,exponentformat:La.exponentformat,minexponent:La.minexponent,separatethousands:La.separatethousands,tickfont:La.tickfont,tickangle:La.tickangle,tickformat:La.tickformat,tickformatstops:La.tickformatstops,hoverformat:La.hoverformat,showline:PP({},La.showline,{dflt:!0}),linecolor:La.linecolor,linewidth:La.linewidth,showgrid:PP({},La.showgrid,{dflt:!0}),gridcolor:La.gridcolor,gridwidth:La.gridwidth,griddash:La.griddash,layer:La.layer,min:{valType:"number",dflt:0,min:0},showspikes:PP({},La.showspikes,{}),spikecolor:La.spikecolor,spikethickness:La.spikethickness,spikedash:La.spikedash,spikemode:La.spikemode,spikesnap:La.spikesnap},IP=QEe.exports=aVt({domain:nVt({name:"ternary"}),bgcolor:{valType:"color",dflt:iVt.background},sum:{valType:"number",dflt:1,min:0},aaxis:JY,baxis:JY,caxis:JY},"plot","from-root");IP.uirevision={valType:"any",editType:"none"};IP.aaxis.uirevision=IP.baxis.uirevision=IP.caxis.uirevision={valType:"any",editType:"none"}});var Kb=W((QHr,eke)=>{"use strict";var oVt=tt(),sVt=Ra(),lVt=ds().defaults;eke.exports=function(t,r,i,n){var a=n.type,o=n.attributes,s=n.handleDefaults,l=n.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,p;function d(w,_){return oVt.coerce(h,p,o,w,_)}for(var v=0;v{"use strict";var uVt=ti(),cVt=Ra(),vS=tt(),fVt=Kb(),hVt=Py(),dVt=Iy(),pVt=Cw(),vVt=ub(),gVt=FM(),rke=QY(),tke=["aaxis","baxis","caxis"];ike.exports=function(t,r,i){fVt(t,r,i,{type:"ternary",attributes:rke,handleDefaults:mVt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function mVt(e,t,r,i){var n=r("bgcolor"),a=r("sum");i.bgColor=uVt.combine(n,i.paper_bgcolor);for(var o,s,l,u=0;u=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function yVt(e,t,r,i){var n=rke[t._name];function a(b,M){return vS.coerce(e,t,n,b,M)}function o(b,M){return vS.coerce2(e,t,n,b,M)}a("uirevision",i.uirevision),t.type="linear";var s=a("color"),l=s!==n.color.dflt?s:r.font.color,u=t._name,c=u.charAt(0).toUpperCase(),f="Component "+c,h=a("title.text",f);t._hovertitle=h===f?h:c,vS.coerceFont(a,"title.font",r.font,{overrideDflt:{size:vS.bigFont(r.font.size),color:l}}),a("min"),vVt(e,t,a,"linear"),dVt(e,t,a,"linear"),hVt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),pVt(e,t,a,{outerTicks:!0});var p=a("showticklabels");p&&(vS.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:l}}),a("tickangle"),a("tickformat")),gVt(e,t,a,{dfltColor:s,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),a("hoverformat"),a("layer");var d=o("spikecolor"),v=o("spikethickness"),m=o("spikedash"),g=o("spikemode"),w=o("spikesnap"),_=a("showspikes",!!d||!!v||!!m||!!g||!!w);_||(delete t.spikecolor,delete t.spikethickness,delete t.spikedash,delete t.spikemode,delete t.spikesnap)}});var ake=W(Hd=>{"use strict";var xVt=JEe(),bVt=Mc().getSubplotCalcData,_Vt=tt().counterRegex,B5="ternary";Hd.name=B5;var wVt=Hd.attr="subplot";Hd.idRoot=B5;Hd.idRegex=Hd.attrRegex=_Vt(B5);var TVt=Hd.attributes={};TVt[wVt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Hd.layoutAttributes=QY();Hd.supplyLayoutDefaults=nke();Hd.plot=function(t){for(var r=t._fullLayout,i=t.calcdata,n=r._subplots[B5],a=0;a{"use strict";oke.exports={attributes:$Y(),supplyDefaults:kEe(),colorbar:Cc(),formatLabels:DEe(),calc:IEe(),plot:zEe(),style:lh().style,styleOnSelect:lh().styleOnSelect,hoverPoints:qEe(),selectPoints:Rb(),eventData:NEe(),moduleType:"trace",name:"scatterternary",basePlotModule:ake(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var uke=W((ijr,lke)=>{"use strict";lke.exports=ske()});var eX=W((njr,fke)=>{"use strict";var eu=KM(),q5=an().extendFlat,cke=Ts().axisHoverFormat;fke.exports={y:eu.y,x:eu.x,x0:eu.x0,y0:eu.y0,xhoverformat:cke("x"),yhoverformat:cke("y"),name:q5({},eu.name,{}),orientation:q5({},eu.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:eu.fillcolor,points:q5({},eu.boxpoints,{}),jitter:q5({},eu.jitter,{}),pointpos:q5({},eu.pointpos,{}),width:q5({},eu.width,{}),marker:eu.marker,text:eu.text,hovertext:eu.hovertext,hovertemplate:eu.hovertemplate,hovertemplatefallback:eu.hovertemplatefallback,quartilemethod:eu.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:eu.offsetgroup,alignmentgroup:eu.alignmentgroup,selected:eu.selected,unselected:eu.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:eu.zorder}});var iX=W((ajr,hke)=>{"use strict";var tX=JM(),rX=tt().extendFlat;hke.exports={violinmode:rX({},tX.boxmode,{}),violingap:rX({},tX.boxgap,{}),violingroupgap:rX({},tX.boxgroupgap,{})}});var mke=W((ojr,gke)=>{"use strict";var dke=tt(),AVt=ti(),pke=eS(),vke=eX();gke.exports=function(t,r,i,n){function a(M,x){return dke.coerce(t,r,vke,M,x)}function o(M,x){return dke.coerce2(t,r,vke,M,x)}if(pke.handleSampleDefaults(t,r,a,n),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||i),f=a("line.width"),h=a("fillcolor",AVt.addOpacity(r.line.color,.5));pke.handlePointsDefaults(t,r,a,{prefix:""});var p=o("box.width"),d=o("box.fillcolor",h),v=o("box.line.color",c),m=o("box.line.width",f),g=a("box.visible",!!(p||d||v||m));g||(r.box={visible:!1});var w=o("meanline.color",c),_=o("meanline.width",f),b=a("meanline.visible",!!(w||_));b||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var xke=W((sjr,yke)=>{"use strict";var MVt=tt(),SVt=iX(),EVt=$L();yke.exports=function(t,r,i){function n(a,o){return MVt.coerce(t,r,SVt,a,o)}EVt._supply(t,r,i,n,"violin")}});var RP=W(Jb=>{"use strict";var kVt=tt(),CVt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};Jb.makeKDE=function(e,t,r){var i=r.length,n=CVt.gaussian,a=e.bandwidth,o=1/(i*a);return function(s){for(var l=0,u=0;u{"use strict";var nX=tt(),aX=Yi(),DVt=KW(),bke=RP(),FVt=(ra(),Pt(ia)).BADNUM;_ke.exports=function(t,r){var i=DVt(t,r);if(i[0].t.empty)return i;for(var n=t._fullLayout,a=aX.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var RVt=YL().setPositionOffset,Tke=["v","h"];Ake.exports=function(t,r){for(var i=t.calcdata,n=r.xaxis,a=r.yaxis,o=0;o{"use strict";var oX=gi(),sX=tt(),zVt=Qi(),lX=XL(),BVt=R$(),qVt=RP();Ske.exports=function(t,r,i,n){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=BVt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return zVt.smoothopen(h[0],1)}sX.makeTraceGroups(n,i,"trace violins").each(function(c){var f=oX.select(this),h=c[0],p=h.t,d=h.trace;if(d.visible!==!0||p.empty){f.remove();return}var v=p.bPos,m=p.bdPos,g=r[p.valLetter+"axis"],w=r[p.posLetter+"axis"],_=d.side==="both",b=_||d.side==="positive",M=_||d.side==="negative",x=f.selectAll("path.violin").data(sX.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(D){var F=oX.select(this),P=D.density,R=P.length,L=w.c2l(D.pos+v,!0),I=w.l2p(L),B;if(d.width)B=p.maxKDE/m;else{var O=o._violinScaleGroupStats[d.scalegroup];B=d.scalemode==="count"?O.maxKDE/m*(O.maxCount/D.pts.length):O.maxKDE/m}var $,X,K,G,q,J,N;if(b){for(J=new Array(R),G=0;G{"use strict";var kke=gi(),O5=ti(),OVt=lh().stylePoints;Cke.exports=function(t){var r=kke.select(t).selectAll("g.trace.violins");r.style("opacity",function(i){return i[0].trace.opacity}),r.each(function(i){var n=i[0].trace,a=kke.select(this),o=n.box||{},s=o.line||{},l=n.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",n.line.width+"px").call(O5.stroke,n.line.color).call(O5.fill,n.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(O5.stroke,s.color).call(O5.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(O5.stroke,l.color),a.selectAll("path.meanline").style(c).call(O5.stroke,l.color),OVt(a,n,t)})}});var Ike=W((djr,Pke)=>{"use strict";var NVt=ti(),uX=tt(),UVt=Yi(),Fke=rY(),Lke=RP();Pke.exports=function(t,r,i,n,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],p,d;if(c||f){var v=Fke.hoverOnBoxes(t,r,i,n);if(f&&v.length>0){var m=t.xa,g=t.ya,w,_,b,M,x;l.orientation==="h"?(x=r,w="y",b=g,_="x",M=m):(x=i,w="x",b=m,_="y",M=g);var A=s[t.index];if(x>=A.span[0]&&x<=A.span[1]){var T=uX.extendFlat({},t),y=M.c2p(x,!0),E=Lke.getKdeValue(A,l,x),S=Lke.getPositionOnKdePath(A,l,y),C=b._offset,k=b._length;T[w+"0"]=S[0],T[w+"1"]=S[1],T[_+"0"]=T[_+"1"]=y,T[_+"Label"]=_+": "+UVt.hoverLabelText(M,x,l[_+"hoverformat"])+", "+s[0].t.labels.kde+" "+E.toFixed(3);for(var D=0,F=0;F{"use strict";Rke.exports={attributes:eX(),layoutAttributes:iX(),supplyDefaults:mke(),crossTraceDefaults:eS().crossTraceDefaults,supplyLayoutDefaults:xke(),calc:wke(),crossTraceCalc:Mke(),plot:Eke(),style:Dke(),styleOnSelect:lh().styleOnSelect,hoverPoints:Ike(),selectPoints:iY(),moduleType:"trace",name:"violin",basePlotModule:xl(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var qke=W((vjr,Bke)=>{"use strict";Bke.exports=zke()});var Oke={};Jn(Oke,{eventDataKeys:()=>VVt});var VVt,Nke=Ci(()=>{"use strict";VVt=["percentInitial","percentPrevious","percentTotal"]});var fX=W((gjr,Hke)=>{"use strict";var ps=R1(),cX=Ws().line,GVt=Ja(),Uke=Ts().axisHoverFormat,{hovertemplateAttrs:HVt,texttemplateAttrs:jVt,templatefallbackAttrs:Vke}=Wa(),Gke=(Nke(),Pt(Oke)),cm=an().extendFlat,$Vt=ti();Hke.exports={x:ps.x,x0:ps.x0,dx:ps.dx,y:ps.y,y0:ps.y0,dy:ps.dy,xperiod:ps.xperiod,yperiod:ps.yperiod,xperiod0:ps.xperiod0,yperiod0:ps.yperiod0,xperiodalignment:ps.xperiodalignment,yperiodalignment:ps.yperiodalignment,xhoverformat:Uke("x"),yhoverformat:Uke("y"),hovertext:ps.hovertext,hovertemplate:HVt({},{keys:Gke.eventDataKeys}),hovertemplatefallback:Vke(),hoverinfo:cm({},GVt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:jVt({editType:"plot"},{keys:Gke.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Vke({editType:"plot"}),text:ps.text,textposition:ps.textposition,insidetextanchor:cm({},ps.insidetextanchor,{dflt:"middle"}),textangle:cm({},ps.textangle,{dflt:0}),textfont:ps.textfont,insidetextfont:ps.insidetextfont,outsidetextfont:ps.outsidetextfont,constraintext:ps.constraintext,cliponaxis:ps.cliponaxis,orientation:cm({},ps.orientation,{}),offset:cm({},ps.offset,{arrayOk:!1}),width:cm({},ps.width,{arrayOk:!1}),marker:WVt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:cm({},cX.color,{dflt:$Vt.defaultLine}),width:cm({},cX.width,{dflt:0,editType:"plot"}),dash:cX.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:ps.offsetgroup,alignmentgroup:ps.alignmentgroup,zorder:ps.zorder};function WVt(){var e=cm({},ps.marker);return delete e.pattern,delete e.cornerradius,e}});var hX=W((mjr,jke)=>{"use strict";jke.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var pX=W((yjr,Wke)=>{"use strict";var zP=tt(),YVt=Pb(),XVt=I0().handleText,ZVt=Lb(),KVt=ev(),$ke=fX(),dX=ti();function JVt(e,t,r,i){function n(f,h){return zP.coerce(e,t,$ke,f,h)}var a=ZVt(e,t,i,n);if(!a){t.visible=!1;return}KVt(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("orientation",t.y&&!t.x?"v":"h"),n("offset"),n("width");var o=n("text");n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var s=n("textposition");XVt(e,t,i,n,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&n("textinfo",zP.isArrayOrTypedArray(o)?"text+value":"value");var l=n("marker.color",r);n("marker.line.color",dX.defaultLine),n("marker.line.width");var u=n("connector.visible");if(u){n("connector.fillcolor",QVt(l));var c=n("connector.line.width");c&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function QVt(e){var t=zP.isArrayOrTypedArray(e)?"#000":e;return dX.addOpacity(t,.5*dX.opacity(t))}function eGt(e,t){var r,i;function n(o){return zP.coerce(i._input,i,$ke,o)}for(var a=0;a{"use strict";var tGt=tt(),rGt=hX();Yke.exports=function(e,t,r){var i=!1;function n(s,l){return tGt.coerce(e,t,rGt,s,l)}for(var a=0;a{"use strict";var N5=tt();Zke.exports=function(t,r){for(var i=0;i{"use strict";var Jke=Yi(),Qke=iv(),iGt=Kke(),nGt=C0(),gS=(ra(),Pt(ia)).BADNUM;eCe.exports=function(t,r){var i=Jke.getFromId(t,r.xaxis||"x"),n=Jke.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=i.makeCalcdata(r,"x"),s=n.makeCalcdata(r,"y"),l=Qke(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y"),s=i.makeCalcdata(r,"x"),l=Qke(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var p=Math.min(o.length,a.length),d=new Array(p);for(r._base=[],f=0;f{"use strict";var rCe=Ib().setGroupPositions;iCe.exports=function(t,r){var i=t._fullLayout,n=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var BP=gi(),f2=tt(),aCe=Qi(),c2=(ra(),Pt(ia)).BADNUM,aGt=Wb(),oGt=of().clearMinTextSize;sCe.exports=function(t,r,i,n){var a=t._fullLayout;oGt("funnel",a),sGt(t,r,i,n),lGt(t,r,i,n),aGt.plot(t,r,i,n,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function sGt(e,t,r,i){var n=t.xaxis,a=t.yaxis;f2.makeTraceGroups(i,r,"trace bars").each(function(o){var s=BP.select(this),l=o[0].trace,u=f2.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(f2.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(p,d){if(!(d!==h-1&&!p.cNext)){var v=oCe(p,n,a,c),m=v[0],g=v[1],w="";m[0]!==c2&&g[0]!==c2&&m[1]!==c2&&g[1]!==c2&&m[2]!==c2&&g[2]!==c2&&m[3]!==c2&&g[3]!==c2&&(c?w+="M"+m[0]+","+g[1]+"L"+m[2]+","+g[2]+"H"+m[3]+"L"+m[1]+","+g[1]+"Z":w+="M"+m[1]+","+g[1]+"L"+m[2]+","+g[3]+"V"+g[2]+"L"+m[1]+","+g[0]+"Z"),w===""&&(w="M0,0Z"),f2.ensureSingle(BP.select(this),"path").attr("d",w).call(aCe.setClipUrl,t.layerClipId,e)}})})}function lGt(e,t,r,i){var n=t.xaxis,a=t.yaxis;f2.makeTraceGroups(i,r,"trace bars").each(function(o){var s=BP.select(this),l=o[0].trace,u=f2.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(f2.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(p,d){if(!(d!==h-1&&!p.cNext)){var v=oCe(p,n,a,c),m=v[0],g=v[1],w="";m[3]!==void 0&&g[3]!==void 0&&(c?(w+="M"+m[0]+","+g[1]+"L"+m[2]+","+g[2],w+="M"+m[1]+","+g[1]+"L"+m[3]+","+g[2]):(w+="M"+m[1]+","+g[1]+"L"+m[2]+","+g[3],w+="M"+m[1]+","+g[0]+"L"+m[2]+","+g[2])),w===""&&(w="M0,0Z"),f2.ensureSingle(BP.select(this),"path").attr("d",w).call(aCe.setClipUrl,t.layerClipId,e)}})})}function oCe(e,t,r,i){var n=[],a=[],o=i?t:r,s=i?r:t;return n[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),n[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),n[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),i?[n,a]:[a,n]}});var fCe=W((Ajr,cCe)=>{"use strict";var mS=gi(),uCe=Qi(),gX=ti(),uGt=(Ng(),Pt(Og)).DESELECTDIM,cGt=zd(),fGt=of().resizeText,hGt=cGt.styleTextPoints;function dGt(e,t,r){var i=r||mS.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");fGt(e,i,"funnel"),i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=mS.select(this),o=n[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;mS.select(this).call(gX.fill,s.mc||l.color).call(gX.stroke,s.mlc||l.line.color).call(uCe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?uGt:1)}}),hGt(a,o,e),a.selectAll(".regions").each(function(){mS.select(this).selectAll("path").style("stroke-width",0).call(gX.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;uCe.lineGroupStyle(mS.select(this).selectAll("path"),s.width,s.color,s.dash)})})}cCe.exports={style:dGt}});var pCe=W((Mjr,dCe)=>{"use strict";var hCe=ti().opacity,pGt=w5().hoverOnBars,mX=tt().formatPercent;dCe.exports=function(t,r,i,n,a){var o=pGt(t,r,i,n,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=mX(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=mX(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=mX(f.sumR,1);var p=f.hi||l.hoverinfo,d=[];if(p&&p!=="none"&&p!=="skip"){var v=p==="all",m=p.split("+"),g=function(w){return v||m.indexOf(w)!==-1};g("percent initial")&&d.push(o.percentInitialLabel+" of initial"),g("percent previous")&&d.push(o.percentPreviousLabel+" of previous"),g("percent total")&&d.push(o.percentTotalLabel+" of total")}return o.extraText=d.join("
"),o.color=vGt(l,f),[o]}};function vGt(e,t){var r=e.marker,i=t.mc||r.color,n=t.mlc||r.line.color,a=t.mlw||r.line.width;if(hCe(i))return i;if(hCe(n)&&a)return n}});var gCe=W((Sjr,vCe)=>{"use strict";vCe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var yCe=W((Ejr,mCe)=>{"use strict";mCe.exports={attributes:fX(),layoutAttributes:hX(),supplyDefaults:pX().supplyDefaults,crossTraceDefaults:pX().crossTraceDefaults,supplyLayoutDefaults:Xke(),calc:tCe(),crossTraceCalc:nCe(),plot:lCe(),style:fCe().style,hoverPoints:pCe(),eventData:gCe(),selectPoints:T5(),moduleType:"trace",name:"funnel",basePlotModule:xl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var bCe=W((kjr,xCe)=>{"use strict";xCe.exports=yCe()});var _Ce={};Jn(_Ce,{eventDataKeys:()=>gGt});var gGt,wCe=Ci(()=>{"use strict";gGt=["initial","delta","final"]});var bX=W((Cjr,SCe)=>{"use strict";var Xo=R1(),yX=Ws().line,mGt=Ja(),TCe=Ts().axisHoverFormat,{hovertemplateAttrs:yGt,texttemplateAttrs:xGt,templatefallbackAttrs:ACe}=Wa(),MCe=(wCe(),Pt(_Ce)),U5=an().extendFlat,bGt=ti();function xX(e){return{marker:{color:U5({},Xo.marker.color,{arrayOk:!1,editType:"style"}),line:{color:U5({},Xo.marker.line.color,{arrayOk:!1,editType:"style"}),width:U5({},Xo.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}SCe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:Xo.x,x0:Xo.x0,dx:Xo.dx,y:Xo.y,y0:Xo.y0,dy:Xo.dy,xperiod:Xo.xperiod,yperiod:Xo.yperiod,xperiod0:Xo.xperiod0,yperiod0:Xo.yperiod0,xperiodalignment:Xo.xperiodalignment,yperiodalignment:Xo.yperiodalignment,xhoverformat:TCe("x"),yhoverformat:TCe("y"),hovertext:Xo.hovertext,hovertemplate:yGt({},{keys:MCe.eventDataKeys}),hovertemplatefallback:ACe(),hoverinfo:U5({},mGt.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:xGt({editType:"plot"},{keys:MCe.eventDataKeys.concat(["label"])}),texttemplatefallback:ACe({editType:"plot"}),text:Xo.text,textposition:Xo.textposition,insidetextanchor:Xo.insidetextanchor,textangle:Xo.textangle,textfont:Xo.textfont,insidetextfont:Xo.insidetextfont,outsidetextfont:Xo.outsidetextfont,constraintext:Xo.constraintext,cliponaxis:Xo.cliponaxis,orientation:Xo.orientation,offset:Xo.offset,width:Xo.width,increasing:xX("increasing"),decreasing:xX("decreasing"),totals:xX("intermediate sums and total"),connector:{line:{color:U5({},yX.color,{dflt:bGt.defaultLine}),width:U5({},yX.width,{editType:"plot"}),dash:yX.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Xo.offsetgroup,alignmentgroup:Xo.alignmentgroup,zorder:Xo.zorder}});var _X=W((Djr,ECe)=>{"use strict";ECe.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var V5={};Jn(V5,{DECREASING:()=>wGt,INCREASING:()=>_Gt});var _Gt,wGt,G5=Ci(()=>{"use strict";_Gt={COLOR:"#3D9970",SYMBOL:"\u25B2"},wGt={COLOR:"#FF4136",SYMBOL:"\u25BC"}});var TX=W((Fjr,FCe)=>{"use strict";var kCe=tt(),TGt=Pb(),AGt=I0().handleText,MGt=Lb(),SGt=ev(),CCe=bX(),EGt=ti(),DCe=(G5(),Pt(V5)),kGt=DCe.INCREASING.COLOR,CGt=DCe.DECREASING.COLOR,DGt="#4499FF";function wX(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",EGt.defaultLine),e(t+".marker.line.width")}function FGt(e,t,r,i){function n(u,c){return kCe.coerce(e,t,CCe,u,c)}var a=MGt(e,t,i,n);if(!a){t.visible=!1;return}SGt(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("measure"),n("orientation",t.x&&!t.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var o=n("textposition");AGt(e,t,i,n,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(n("texttemplate"),n("texttemplatefallback"),t.texttemplate||n("textinfo")),wX(n,"increasing",kGt),wX(n,"decreasing",CGt),wX(n,"totals",DGt);var s=n("connector.visible");if(s){n("connector.mode");var l=n("connector.line.width");l&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function LGt(e,t){var r,i;function n(o){return kCe.coerce(i._input,i,CCe,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var PGt=tt(),IGt=_X();LCe.exports=function(e,t,r){var i=!1;function n(s,l){return PGt.coerce(e,t,IGt,s,l)}for(var a=0;a{"use strict";var ICe=Yi(),RCe=iv(),zCe=tt().mergeArray,RGt=C0(),BCe=(ra(),Pt(ia)).BADNUM;function AX(e){return e==="a"||e==="absolute"}function MX(e){return e==="t"||e==="total"}qCe.exports=function(t,r){var i=ICe.getFromId(t,r.xaxis||"x"),n=ICe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=i.makeCalcdata(r,"x"),s=n.makeCalcdata(r,"y"),l=RCe(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y"),s=i.makeCalcdata(r,"x"),l=RCe(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),p=0,d,v=!1,m=0;m{"use strict";var NCe=Ib().setGroupPositions;UCe.exports=function(t,r){var i=t._fullLayout,n=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var GCe=gi(),qP=tt(),zGt=Qi(),H5=(ra(),Pt(ia)).BADNUM,BGt=Wb(),qGt=of().clearMinTextSize;HCe.exports=function(t,r,i,n){var a=t._fullLayout;qGt("waterfall",a),BGt.plot(t,r,i,n,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),OGt(t,r,i,n)};function OGt(e,t,r,i){var n=t.xaxis,a=t.yaxis;qP.makeTraceGroups(i,r,"trace bars").each(function(o){var s=GCe.select(this),l=o[0].trace,u=qP.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(qP.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var p=h.size();h.each(function(d,v){if(!(v!==p-1&&!d.cNext)){var m=NGt(d,n,a,c),g=m[0],w=m[1],_="";g[0]!==H5&&w[0]!==H5&&g[1]!==H5&&w[1]!==H5&&(f==="spanning"&&!d.isSum&&v>0&&(c?_+="M"+g[0]+","+w[1]+"V"+w[0]:_+="M"+g[1]+","+w[0]+"H"+g[0]),f!=="between"&&(d.isSum||v{"use strict";var OP=gi(),$Ce=Qi(),WCe=ti(),UGt=(Ng(),Pt(Og)).DESELECTDIM,VGt=zd(),GGt=of().resizeText,HGt=VGt.styleTextPoints;function jGt(e,t,r){var i=r||OP.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");GGt(e,i,"waterfall"),i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=OP.select(this),o=n[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;OP.select(this).call(WCe.fill,l.color).call(WCe.stroke,l.line.color).call($Ce.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?UGt:1)}}),HGt(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;$Ce.lineGroupStyle(OP.select(this).selectAll("path"),s.width,s.color,s.dash)})})}YCe.exports={style:jGt}});var e8e=W((Bjr,QCe)=>{"use strict";var $Gt=Yi().hoverLabelText,ZCe=ti().opacity,WGt=w5().hoverOnBars,KCe=(G5(),Pt(V5)),JCe={increasing:KCe.INCREASING.SYMBOL,decreasing:KCe.DECREASING.SYMBOL};QCe.exports=function(t,r,i,n,a){var o=WGt(t,r,i,n,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(x){return $Gt(f,x,l[c+"hoverformat"])}var p=o.index,d=s[p],v=d.isSum?d.b+d.s:d.rawS;o.initial=d.b+d.s-v,o.delta=v,o.final=o.initial+o.delta;var m=h(Math.abs(o.delta));o.deltaLabel=v<0?"("+m+")":m,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var g=d.hi||l.hoverinfo,w=[];if(g&&g!=="none"&&g!=="skip"){var _=g==="all",b=g.split("+"),M=function(x){return _||b.indexOf(x)!==-1};d.isSum||(M("final")&&(u?!M("x"):!M("y"))&&w.push(o.finalLabel),M("delta")&&(v<0?w.push(o.deltaLabel+" "+JCe.decreasing):w.push(o.deltaLabel+" "+JCe.increasing)),M("initial")&&w.push("Initial: "+o.initialLabel))}return w.length&&(o.extraText=w.join("
")),o.color=YGt(l,d),[o]};function YGt(e,t){var r=e[t.dir].marker,i=r.color,n=r.line.color,a=r.line.width;if(ZCe(i))return i;if(ZCe(n)&&a)return n}});var r8e=W((qjr,t8e)=>{"use strict";t8e.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var n8e=W((Ojr,i8e)=>{"use strict";i8e.exports={attributes:bX(),layoutAttributes:_X(),supplyDefaults:TX().supplyDefaults,crossTraceDefaults:TX().crossTraceDefaults,supplyLayoutDefaults:PCe(),calc:OCe(),crossTraceCalc:VCe(),plot:jCe(),style:XCe().style,hoverPoints:e8e(),eventData:r8e(),selectPoints:T5(),moduleType:"trace",name:"waterfall",basePlotModule:xl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var o8e=W((Njr,a8e)=>{"use strict";a8e.exports=n8e()});var yS={};Jn(yS,{colormodel:()=>SX});var SX,j5=Ci(()=>{"use strict";SX={rgb:{min:[0,0,0],max:[255,255,255],fmt:e=>e.slice(0,3),suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:e=>e.slice(0,4),suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:e=>e.slice(0,4),suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:e=>{let t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:e=>{let t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}});var EX={};Jn(EX,{default:()=>ZGt});var s8e,l8e,NP,u8e,c8e,f8e,h8e,XGt,ZGt,kX=Ci(()=>{"use strict";s8e=l1(an()),l8e=l1(Ja()),NP=l1(Wa()),u8e=l1(Ws());j5();c8e=["rgb","rgba","rgba256","hsl","hsla"],f8e=[],h8e=[];for(let e of c8e){let t=SX[e];f8e.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),h8e.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}XGt={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:c8e,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",f8e.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",h8e.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,s8e.extendFlat)({},l8e.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,NP.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,NP.templatefallbackAttrs)(),zorder:u8e.zorder},ZGt=XGt});var v8e=W((Vjr,p8e)=>{"use strict";var KGt=tt(),JGt=(kX(),Pt(EX)).default,d8e=(j5(),Pt(yS)),QGt=em().IMAGE_URL_PREFIX;p8e.exports=function(t,r){function i(o,s){return KGt.coerce(t,r,JGt,o,s)}i("source"),r.source&&!r.source.match(QGt)&&delete r.source,r._hasSource=!!r.source;var n=i("z");if(r._hasZ=!(n===void 0||!n.length||!n[0]||!n[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}i("x0"),i("y0"),i("dx"),i("dy");var a;r._hasZ?(i("colormodel","rgb"),a=d8e.colormodel[r.colormodel],i("zmin",a.zminDflt||a.min),i("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=d8e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),i("zsmooth"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),r._length=null,i("zorder")}});var fm=W((Gjr,CX)=>{typeof Object.create=="function"?CX.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:CX.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var DX=W((Hjr,g8e)=>{g8e.exports=ib().EventEmitter});var x8e=W(UP=>{"use strict";UP.byteLength=tHt;UP.toByteArray=iHt;UP.fromByteArray=oHt;var O1=[],jd=[],eHt=typeof Uint8Array!="undefined"?Uint8Array:Array,FX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Qb=0,m8e=FX.length;Qb0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function tHt(e){var t=y8e(e),r=t[0],i=t[1];return(r+i)*3/4-i}function rHt(e,t,r){return(t+r)*3/4-r}function iHt(e){var t,r=y8e(e),i=r[0],n=r[1],a=new eHt(rHt(e,i,n)),o=0,s=n>0?i-4:i,l;for(l=0;l>16&255,a[o++]=t>>8&255,a[o++]=t&255;return n===2&&(t=jd[e.charCodeAt(l)]<<2|jd[e.charCodeAt(l+1)]>>4,a[o++]=t&255),n===1&&(t=jd[e.charCodeAt(l)]<<10|jd[e.charCodeAt(l+1)]<<4|jd[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function nHt(e){return O1[e>>18&63]+O1[e>>12&63]+O1[e>>6&63]+O1[e&63]}function aHt(e,t,r){for(var i,n=[],a=t;as?s:o+a));return i===1?(t=e[r-1],n.push(O1[t>>2]+O1[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(O1[t>>10]+O1[t>>4&63]+O1[t<<2&63]+"=")),n.join("")}});var b8e=W(LX=>{LX.read=function(e,t,r,i,n){var a,o,s=n*8-i-1,l=(1<>1,c=-7,f=r?n-1:0,h=r?-1:1,p=e[t+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=i;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(p?-1:1)*(1/0);o=o+Math.pow(2,i),a=a-u}return(p?-1:1)*o*Math.pow(2,a-i)};LX.write=function(e,t,r,i,n,a){var o,s,l,u=a*8-n-1,c=(1<>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:a-1,d=i?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,n),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,n),o=0));n>=8;e[r+p]=s&255,p+=d,s/=256,n-=8);for(o=o<0;e[r+p]=o&255,p+=d,o/=256,u-=8);e[r+p-d]|=v*128}});var t_=W(X5=>{"use strict";var PX=x8e(),W5=b8e(),_8e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;X5.Buffer=Ur;X5.SlowBuffer=hHt;X5.INSPECT_MAX_BYTES=50;var VP=2147483647;X5.kMaxLength=VP;Ur.TYPED_ARRAY_SUPPORT=sHt();!Ur.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function sHt(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(Ur.prototype,"parent",{enumerable:!0,get:function(){if(Ur.isBuffer(this))return this.buffer}});Object.defineProperty(Ur.prototype,"offset",{enumerable:!0,get:function(){if(Ur.isBuffer(this))return this.byteOffset}});function hm(e){if(e>VP)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Ur.prototype),t}function Ur(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return BX(e)}return M8e(e,t,r)}Ur.poolSize=8192;function M8e(e,t,r){if(typeof e=="string")return uHt(e,t);if(ArrayBuffer.isView(e))return cHt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N1(e,ArrayBuffer)||e&&N1(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(N1(e,SharedArrayBuffer)||e&&N1(e.buffer,SharedArrayBuffer)))return RX(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return Ur.from(i,t,r);let n=fHt(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ur.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Ur.from=function(e,t,r){return M8e(e,t,r)};Object.setPrototypeOf(Ur.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ur,Uint8Array);function S8e(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function lHt(e,t,r){return S8e(e),e<=0?hm(e):t!==void 0?typeof r=="string"?hm(e).fill(t,r):hm(e).fill(t):hm(e)}Ur.alloc=function(e,t,r){return lHt(e,t,r)};function BX(e){return S8e(e),hm(e<0?0:qX(e)|0)}Ur.allocUnsafe=function(e){return BX(e)};Ur.allocUnsafeSlow=function(e){return BX(e)};function uHt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Ur.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=E8e(e,t)|0,i=hm(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}function IX(e){let t=e.length<0?0:qX(e.length)|0,r=hm(t);for(let i=0;i=VP)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+VP.toString(16)+" bytes");return e|0}function hHt(e){return+e!=e&&(e=0),Ur.alloc(+e)}Ur.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Ur.prototype};Ur.compare=function(t,r){if(N1(t,Uint8Array)&&(t=Ur.from(t,t.offset,t.byteLength)),N1(r,Uint8Array)&&(r=Ur.from(r,r.offset,r.byteLength)),!Ur.isBuffer(t)||!Ur.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let i=t.length,n=r.length;for(let a=0,o=Math.min(i,n);an.length?(Ur.isBuffer(o)||(o=Ur.from(o)),o.copy(n,a)):Uint8Array.prototype.set.call(n,o,a);else if(Ur.isBuffer(o))o.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return n};function E8e(e,t){if(Ur.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N1(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return zX(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return z8e(e).length;default:if(n)return i?-1:zX(e).length;t=(""+t).toLowerCase(),n=!0}}Ur.byteLength=E8e;function dHt(e,t,r){let i=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return THt(this,t,r);case"utf8":case"utf-8":return C8e(this,t,r);case"ascii":return _Ht(this,t,r);case"latin1":case"binary":return wHt(this,t,r);case"base64":return xHt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return AHt(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}Ur.prototype._isBuffer=!0;function e_(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}Ur.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};_8e&&(Ur.prototype[_8e]=Ur.prototype.inspect);Ur.prototype.compare=function(t,r,i,n,a){if(N1(t,Uint8Array)&&(t=Ur.from(t,t.offset,t.byteLength)),!Ur.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),i===void 0&&(i=t?t.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),r<0||i>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===t)return 0;let o=a-n,s=i-r,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(r,i);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,NX(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof t=="string"&&(t=Ur.from(t,i)),Ur.isBuffer(t))return t.length===0?-1:w8e(e,t,r,i,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w8e(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function w8e(e,t,r,i,n){let a=1,o=e.length,s=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(n){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fn&&(i=n)):i=n;let a=t.length;i>a/2&&(i=a/2);let o;for(o=0;o>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((i===void 0||i>a)&&(i=a),t.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return pHt(this,t,r,i);case"utf8":case"utf-8":return vHt(this,t,r,i);case"ascii":case"latin1":case"binary":return gHt(this,t,r,i);case"base64":return mHt(this,t,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return yHt(this,t,r,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};Ur.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function xHt(e,t,r){return t===0&&r===e.length?PX.fromByteArray(e):PX.fromByteArray(e.slice(t,r))}function C8e(e,t,r){r=Math.min(e.length,r);let i=[],n=t;for(;n239?4:a>223?3:a>191?2:1;if(n+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[n+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[n+1],u=e[n+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[n+1],u=e[n+2],c=e[n+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|o&1023),i.push(o),n+=s}return bHt(i)}var T8e=4096;function bHt(e){let t=e.length;if(t<=T8e)return String.fromCharCode.apply(String,e);let r="",i=0;for(;ii)&&(r=i);let n="";for(let a=t;ai&&(t=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),rr)throw new RangeError("Trying to access beyond buffer length")}Ur.prototype.readUintLE=Ur.prototype.readUIntLE=function(t,r,i){t=t>>>0,r=r>>>0,i||Fc(t,r,this.length);let n=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,i||Fc(t,r,this.length);let n=this[t+--r],a=1;for(;r>0&&(a*=256);)n+=this[t+--r]*a;return n};Ur.prototype.readUint8=Ur.prototype.readUInt8=function(t,r){return t=t>>>0,r||Fc(t,1,this.length),this[t]};Ur.prototype.readUint16LE=Ur.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Fc(t,2,this.length),this[t]|this[t+1]<<8};Ur.prototype.readUint16BE=Ur.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Fc(t,2,this.length),this[t]<<8|this[t+1]};Ur.prototype.readUint32LE=Ur.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Fc(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Ur.prototype.readUint32BE=Ur.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Fc(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Ur.prototype.readBigUInt64LE=h2(function(t){t=t>>>0,Y5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&xS(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<>>0,Y5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&xS(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i;return(BigInt(n)<>>0,r=r>>>0,i||Fc(t,r,this.length);let n=this[t],a=1,o=0;for(;++o=a&&(n-=Math.pow(2,8*r)),n};Ur.prototype.readIntBE=function(t,r,i){t=t>>>0,r=r>>>0,i||Fc(t,r,this.length);let n=r,a=1,o=this[t+--n];for(;n>0&&(a*=256);)o+=this[t+--n]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};Ur.prototype.readInt8=function(t,r){return t=t>>>0,r||Fc(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Ur.prototype.readInt16LE=function(t,r){t=t>>>0,r||Fc(t,2,this.length);let i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i};Ur.prototype.readInt16BE=function(t,r){t=t>>>0,r||Fc(t,2,this.length);let i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i};Ur.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Fc(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Ur.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Fc(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Ur.prototype.readBigInt64LE=h2(function(t){t=t>>>0,Y5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&xS(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(i<<24);return(BigInt(n)<>>0,Y5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&xS(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(n)<>>0,r||Fc(t,4,this.length),W5.read(this,t,!0,23,4)};Ur.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Fc(t,4,this.length),W5.read(this,t,!1,23,4)};Ur.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Fc(t,8,this.length),W5.read(this,t,!0,52,8)};Ur.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Fc(t,8,this.length),W5.read(this,t,!1,52,8)};function Zh(e,t,r,i,n,a){if(!Ur.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}Ur.prototype.writeUintLE=Ur.prototype.writeUIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Zh(this,t,r,i,s,0)}let a=1,o=0;for(this[r]=t&255;++o>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Zh(this,t,r,i,s,0)}let a=i-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+i};Ur.prototype.writeUint8=Ur.prototype.writeUInt8=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,1,255,0),this[r]=t&255,r+1};Ur.prototype.writeUint16LE=Ur.prototype.writeUInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Ur.prototype.writeUint16BE=Ur.prototype.writeUInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Ur.prototype.writeUint32LE=Ur.prototype.writeUInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Ur.prototype.writeUint32BE=Ur.prototype.writeUInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function D8e(e,t,r,i,n){R8e(t,i,n,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function F8e(e,t,r,i,n){R8e(t,i,n,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}Ur.prototype.writeBigUInt64LE=h2(function(t,r=0){return D8e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ur.prototype.writeBigUInt64BE=h2(function(t,r=0){return F8e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ur.prototype.writeIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Zh(this,t,r,i,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+i};Ur.prototype.writeIntBE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Zh(this,t,r,i,l-1,-l)}let a=i-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+i};Ur.prototype.writeInt8=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Ur.prototype.writeInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Ur.prototype.writeInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Ur.prototype.writeInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Ur.prototype.writeInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Zh(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Ur.prototype.writeBigInt64LE=h2(function(t,r=0){return D8e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ur.prototype.writeBigInt64BE=h2(function(t,r=0){return F8e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function L8e(e,t,r,i,n,a){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P8e(e,t,r,i,n){return t=+t,r=r>>>0,n||L8e(e,t,r,4,34028234663852886e22,-34028234663852886e22),W5.write(e,t,r,i,23,4),r+4}Ur.prototype.writeFloatLE=function(t,r,i){return P8e(this,t,r,!0,i)};Ur.prototype.writeFloatBE=function(t,r,i){return P8e(this,t,r,!1,i)};function I8e(e,t,r,i,n){return t=+t,r=r>>>0,n||L8e(e,t,r,8,17976931348623157e292,-17976931348623157e292),W5.write(e,t,r,i,52,8),r+8}Ur.prototype.writeDoubleLE=function(t,r,i){return I8e(this,t,r,!0,i)};Ur.prototype.writeDoubleBE=function(t,r,i){return I8e(this,t,r,!1,i)};Ur.prototype.copy=function(t,r,i,n){if(!Ur.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r>>0,i=i===void 0?this.length:i>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?n=A8e(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=A8e(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i},RangeError);function A8e(e){let t="",r=e.length,i=e[0]==="-"?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function MHt(e,t,r){Y5(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&xS(t,e.length-(r+1))}function R8e(e,t,r,i,n,a){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new $5.ERR_OUT_OF_RANGE("value",s,e)}MHt(i,n,a)}function Y5(e,t){if(typeof e!="number")throw new $5.ERR_INVALID_ARG_TYPE(t,"number",e)}function xS(e,t,r){throw Math.floor(e)!==e?(Y5(e,r),new $5.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new $5.ERR_BUFFER_OUT_OF_BOUNDS:new $5.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var SHt=/[^+/0-9A-Za-z-_]/g;function EHt(e){if(e=e.split("=")[0],e=e.trim().replace(SHt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function zX(e,t){t=t||1/0;let r,i=e.length,n=null,a=[];for(let o=0;o55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function kHt(e){let t=[];for(let r=0;r>8,n=r%256,a.push(n),a.push(i);return a}function z8e(e){return PX.toByteArray(EHt(e))}function GP(e,t,r,i){let n;for(n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function N1(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function NX(e){return e!==e}var DHt=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t})();function h2(e){return typeof BigInt=="undefined"?FHt:e}function FHt(){throw new Error("BigInt not supported")}});var HP=W((Xjr,B8e)=>{"use strict";B8e.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==n||s.enumerable!==!0)return!1}return!0}});var bS=W((Zjr,q8e)=>{"use strict";var LHt=HP();q8e.exports=function(){return LHt()&&!!Symbol.toStringTag}});var jP=W((Kjr,O8e)=>{"use strict";O8e.exports=Object});var U8e=W((Jjr,N8e)=>{"use strict";N8e.exports=Error});var G8e=W((Qjr,V8e)=>{"use strict";V8e.exports=EvalError});var j8e=W((e$r,H8e)=>{"use strict";H8e.exports=RangeError});var W8e=W((t$r,$8e)=>{"use strict";$8e.exports=ReferenceError});var UX=W((r$r,Y8e)=>{"use strict";Y8e.exports=SyntaxError});var Z5=W((i$r,X8e)=>{"use strict";X8e.exports=TypeError});var K8e=W((n$r,Z8e)=>{"use strict";Z8e.exports=URIError});var Q8e=W((a$r,J8e)=>{"use strict";J8e.exports=Math.abs});var tDe=W((o$r,eDe)=>{"use strict";eDe.exports=Math.floor});var iDe=W((s$r,rDe)=>{"use strict";rDe.exports=Math.max});var aDe=W((l$r,nDe)=>{"use strict";nDe.exports=Math.min});var sDe=W((u$r,oDe)=>{"use strict";oDe.exports=Math.pow});var uDe=W((c$r,lDe)=>{"use strict";lDe.exports=Math.round});var fDe=W((f$r,cDe)=>{"use strict";cDe.exports=Number.isNaN||function(t){return t!==t}});var dDe=W((h$r,hDe)=>{"use strict";var PHt=fDe();hDe.exports=function(t){return PHt(t)||t===0?t:t<0?-1:1}});var vDe=W((d$r,pDe)=>{"use strict";pDe.exports=Object.getOwnPropertyDescriptor});var r_=W((p$r,gDe)=>{"use strict";var $P=vDe();if($P)try{$P([],"length")}catch(e){$P=null}gDe.exports=$P});var _S=W((v$r,mDe)=>{"use strict";var WP=Object.defineProperty||!1;if(WP)try{WP({},"a",{value:1})}catch(e){WP=!1}mDe.exports=WP});var bDe=W((g$r,xDe)=>{"use strict";var yDe=typeof Symbol!="undefined"&&Symbol,IHt=HP();xDe.exports=function(){return typeof yDe!="function"||typeof Symbol!="function"||typeof yDe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:IHt()}});var VX=W((m$r,_De)=>{"use strict";_De.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var GX=W((y$r,wDe)=>{"use strict";var RHt=jP();wDe.exports=RHt.getPrototypeOf||null});var MDe=W((x$r,ADe)=>{"use strict";var zHt="Function.prototype.bind called on incompatible ",BHt=Object.prototype.toString,qHt=Math.max,OHt="[object Function]",TDe=function(t,r){for(var i=[],n=0;n{"use strict";var VHt=MDe();SDe.exports=Function.prototype.bind||VHt});var YP=W((_$r,EDe)=>{"use strict";EDe.exports=Function.prototype.call});var XP=W((w$r,kDe)=>{"use strict";kDe.exports=Function.prototype.apply});var DDe=W((T$r,CDe)=>{"use strict";CDe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var HX=W((A$r,FDe)=>{"use strict";var GHt=K5(),HHt=XP(),jHt=YP(),$Ht=DDe();FDe.exports=$Ht||GHt.call(jHt,HHt)});var ZP=W((M$r,LDe)=>{"use strict";var WHt=K5(),YHt=Z5(),XHt=YP(),ZHt=HX();LDe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new YHt("a function is required");return ZHt(WHt,XHt,t)}});var qDe=W((S$r,BDe)=>{"use strict";var KHt=ZP(),PDe=r_(),RDe;try{RDe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var jX=!!RDe&&PDe&&PDe(Object.prototype,"__proto__"),zDe=Object,IDe=zDe.getPrototypeOf;BDe.exports=jX&&typeof jX.get=="function"?KHt([jX.get]):typeof IDe=="function"?function(t){return IDe(t==null?t:zDe(t))}:!1});var KP=W((E$r,VDe)=>{"use strict";var ODe=VX(),NDe=GX(),UDe=qDe();VDe.exports=ODe?function(t){return ODe(t)}:NDe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return NDe(t)}:UDe?function(t){return UDe(t)}:null});var $X=W((k$r,GDe)=>{"use strict";var JHt=Function.prototype.call,QHt=Object.prototype.hasOwnProperty,ejt=K5();GDe.exports=ejt.call(JHt,QHt)});var e9=W((C$r,XDe)=>{"use strict";var oo,tjt=jP(),rjt=U8e(),ijt=G8e(),njt=j8e(),ajt=W8e(),t4=UX(),e4=Z5(),ojt=K8e(),sjt=Q8e(),ljt=tDe(),ujt=iDe(),cjt=aDe(),fjt=sDe(),hjt=uDe(),djt=dDe(),WDe=Function,WX=function(e){try{return WDe('"use strict"; return ('+e+").constructor;")()}catch(t){}},wS=r_(),pjt=_S(),YX=function(){throw new e4},vjt=wS?(function(){try{return arguments.callee,YX}catch(e){try{return wS(arguments,"callee").get}catch(t){return YX}}})():YX,J5=bDe()(),Lc=KP(),gjt=GX(),mjt=VX(),YDe=XP(),TS=YP(),Q5={},yjt=typeof Uint8Array=="undefined"||!Lc?oo:Lc(Uint8Array),i_={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?oo:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?oo:ArrayBuffer,"%ArrayIteratorPrototype%":J5&&Lc?Lc([][Symbol.iterator]()):oo,"%AsyncFromSyncIteratorPrototype%":oo,"%AsyncFunction%":Q5,"%AsyncGenerator%":Q5,"%AsyncGeneratorFunction%":Q5,"%AsyncIteratorPrototype%":Q5,"%Atomics%":typeof Atomics=="undefined"?oo:Atomics,"%BigInt%":typeof BigInt=="undefined"?oo:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?oo:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?oo:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?oo:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":rjt,"%eval%":eval,"%EvalError%":ijt,"%Float16Array%":typeof Float16Array=="undefined"?oo:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?oo:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?oo:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?oo:FinalizationRegistry,"%Function%":WDe,"%GeneratorFunction%":Q5,"%Int8Array%":typeof Int8Array=="undefined"?oo:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?oo:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?oo:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":J5&&Lc?Lc(Lc([][Symbol.iterator]())):oo,"%JSON%":typeof JSON=="object"?JSON:oo,"%Map%":typeof Map=="undefined"?oo:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!J5||!Lc?oo:Lc(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":tjt,"%Object.getOwnPropertyDescriptor%":wS,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?oo:Promise,"%Proxy%":typeof Proxy=="undefined"?oo:Proxy,"%RangeError%":njt,"%ReferenceError%":ajt,"%Reflect%":typeof Reflect=="undefined"?oo:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?oo:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!J5||!Lc?oo:Lc(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?oo:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":J5&&Lc?Lc(""[Symbol.iterator]()):oo,"%Symbol%":J5?Symbol:oo,"%SyntaxError%":t4,"%ThrowTypeError%":vjt,"%TypedArray%":yjt,"%TypeError%":e4,"%Uint8Array%":typeof Uint8Array=="undefined"?oo:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?oo:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?oo:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?oo:Uint32Array,"%URIError%":ojt,"%WeakMap%":typeof WeakMap=="undefined"?oo:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?oo:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?oo:WeakSet,"%Function.prototype.call%":TS,"%Function.prototype.apply%":YDe,"%Object.defineProperty%":pjt,"%Object.getPrototypeOf%":gjt,"%Math.abs%":sjt,"%Math.floor%":ljt,"%Math.max%":ujt,"%Math.min%":cjt,"%Math.pow%":fjt,"%Math.round%":hjt,"%Math.sign%":djt,"%Reflect.getPrototypeOf%":mjt};if(Lc)try{null.error}catch(e){HDe=Lc(Lc(e)),i_["%Error.prototype%"]=HDe}var HDe,xjt=function e(t){var r;if(t==="%AsyncFunction%")r=WX("async function () {}");else if(t==="%GeneratorFunction%")r=WX("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=WX("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Lc&&(r=Lc(n.prototype))}return i_[t]=r,r},jDe={__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"]},AS=K5(),JP=$X(),bjt=AS.call(TS,Array.prototype.concat),_jt=AS.call(YDe,Array.prototype.splice),$De=AS.call(TS,String.prototype.replace),QP=AS.call(TS,String.prototype.slice),wjt=AS.call(TS,RegExp.prototype.exec),Tjt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ajt=/\\(\\)?/g,Mjt=function(t){var r=QP(t,0,1),i=QP(t,-1);if(r==="%"&&i!=="%")throw new t4("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new t4("invalid intrinsic syntax, expected opening `%`");var n=[];return $De(t,Tjt,function(a,o,s,l){n[n.length]=s?$De(l,Ajt,"$1"):o||a}),n},Sjt=function(t,r){var i=t,n;if(JP(jDe,i)&&(n=jDe[i],i="%"+n[0]+"%"),JP(i_,i)){var a=i_[i];if(a===Q5&&(a=xjt(i)),typeof a=="undefined"&&!r)throw new e4("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new t4("intrinsic "+t+" does not exist!")};XDe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new e4("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new e4('"allowMissing" argument must be a boolean');if(wjt(/^%?[^%]*%?$/,t)===null)throw new t4("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Mjt(t),n=i.length>0?i[0]:"",a=Sjt("%"+n+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(n=u[0],_jt(i,bjt([0,1],u)));for(var c=1,f=!0;c=i.length){var v=wS(s,h);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[h]}else f=JP(s,h),s=s[h];f&&!l&&(i_[o]=s)}}return s}});var n_=W((D$r,JDe)=>{"use strict";var ZDe=e9(),KDe=ZP(),Ejt=KDe([ZDe("%String.prototype.indexOf%")]);JDe.exports=function(t,r){var i=ZDe(t,!!r);return typeof i=="function"&&Ejt(t,".prototype.")>-1?KDe([i]):i}});var t7e=W((F$r,e7e)=>{"use strict";var kjt=bS()(),Cjt=n_(),XX=Cjt("Object.prototype.toString"),t9=function(t){return kjt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:XX(t)==="[object Arguments]"},QDe=function(t){return t9(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&XX(t)!=="[object Array]"&&"callee"in t&&XX(t.callee)==="[object Function]"},Djt=(function(){return t9(arguments)})();t9.isLegacyArguments=QDe;e7e.exports=Djt?t9:QDe});var s7e=W((L$r,o7e)=>{"use strict";var r7e=n_(),Fjt=bS()(),Ljt=$X(),Pjt=r_(),JX;Fjt?(i7e=r7e("RegExp.prototype.exec"),ZX={},r9=function(){throw ZX},KX={toString:r9,valueOf:r9},typeof Symbol.toPrimitive=="symbol"&&(KX[Symbol.toPrimitive]=r9),JX=function(t){if(!t||typeof t!="object")return!1;var r=Pjt(t,"lastIndex"),i=r&&Ljt(r,"value");if(!i)return!1;try{i7e(t,KX)}catch(n){return n===ZX}}):(n7e=r7e("Object.prototype.toString"),a7e="[object RegExp]",JX=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:n7e(t)===a7e});var i7e,ZX,r9,KX,n7e,a7e;o7e.exports=JX});var u7e=W((P$r,l7e)=>{"use strict";var Ijt=n_(),Rjt=s7e(),zjt=Ijt("RegExp.prototype.exec"),Bjt=Z5();l7e.exports=function(t){if(!Rjt(t))throw new Bjt("`regex` must be a RegExp");return function(i){return zjt(t,i)!==null}}});var f7e=W((I$r,c7e)=>{"use strict";var qjt=function*(){}.constructor;c7e.exports=()=>qjt});var v7e=W((R$r,p7e)=>{"use strict";var d7e=n_(),Ojt=u7e(),Njt=Ojt(/^\s*(?:function)?\*/),Ujt=bS()(),h7e=KP(),Vjt=d7e("Object.prototype.toString"),Gjt=d7e("Function.prototype.toString"),Hjt=f7e();p7e.exports=function(t){if(typeof t!="function")return!1;if(Njt(Gjt(t)))return!0;if(!Ujt){var r=Vjt(t);return r==="[object GeneratorFunction]"}if(!h7e)return!1;var i=Hjt();return i&&h7e(t)===i.prototype}});var x7e=W((z$r,y7e)=>{"use strict";var m7e=Function.prototype.toString,r4=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,eZ,i9;if(typeof r4=="function"&&typeof Object.defineProperty=="function")try{eZ=Object.defineProperty({},"length",{get:function(){throw i9}}),i9={},r4(function(){throw 42},null,eZ)}catch(e){e!==i9&&(r4=null)}else r4=null;var jjt=/^\s*class\b/,tZ=function(t){try{var r=m7e.call(t);return jjt.test(r)}catch(i){return!1}},QX=function(t){try{return tZ(t)?!1:(m7e.call(t),!0)}catch(r){return!1}},n9=Object.prototype.toString,$jt="[object Object]",Wjt="[object Function]",Yjt="[object GeneratorFunction]",Xjt="[object HTMLAllCollection]",Zjt="[object HTML document.all class]",Kjt="[object HTMLCollection]",Jjt=typeof Symbol=="function"&&!!Symbol.toStringTag,Qjt=!(0 in[,]),rZ=function(){return!1};typeof document=="object"&&(g7e=document.all,n9.call(g7e)===n9.call(document.all)&&(rZ=function(t){if((Qjt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=n9.call(t);return(r===Xjt||r===Zjt||r===Kjt||r===$jt)&&t("")==null}catch(i){}return!1}));var g7e;y7e.exports=r4?function(t){if(rZ(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{r4(t,null,eZ)}catch(r){if(r!==i9)return!1}return!tZ(t)&&QX(t)}:function(t){if(rZ(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(Jjt)return QX(t);if(tZ(t))return!1;var r=n9.call(t);return r!==Wjt&&r!==Yjt&&!/^\[object HTML/.test(r)?!1:QX(t)}});var w7e=W((B$r,_7e)=>{"use strict";var e$t=x7e(),t$t=Object.prototype.toString,b7e=Object.prototype.hasOwnProperty,r$t=function(t,r,i){for(var n=0,a=t.length;n=3&&(n=i),a$t(t)?r$t(t,r,n):typeof t=="string"?i$t(t,r,n):n$t(t,r,n)}});var A7e=W((q$r,T7e)=>{"use strict";T7e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var S7e=W((O$r,M7e)=>{"use strict";var iZ=A7e(),o$t=typeof globalThis=="undefined"?window:globalThis;M7e.exports=function(){for(var t=[],r=0;r{"use strict";var E7e=_S(),s$t=UX(),i4=Z5(),k7e=r_();C7e.exports=function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new i4("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new i4("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new i4("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new i4("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new i4("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new i4("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!k7e&&k7e(t,r);if(E7e)E7e(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:a===null&&l?l.writable:!a});else if(s||!n&&!a&&!o)t[r]=i;else throw new s$t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var oZ=W((U$r,F7e)=>{"use strict";var aZ=_S(),D7e=function(){return!!aZ};D7e.hasArrayLengthDefineBug=function(){if(!aZ)return null;try{return aZ([],"length",{value:1}).length!==1}catch(t){return!0}};F7e.exports=D7e});var z7e=W((V$r,R7e)=>{"use strict";var l$t=e9(),L7e=nZ(),u$t=oZ()(),P7e=r_(),I7e=Z5(),c$t=l$t("%Math.floor%");R7e.exports=function(t,r){if(typeof t!="function")throw new I7e("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||c$t(r)!==r)throw new I7e("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in t&&P7e){var o=P7e(t,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(a=!1)}return(n||a||!i)&&(u$t?L7e(t,"length",r,!0,!0):L7e(t,"length",r)),t}});var q7e=W((G$r,B7e)=>{"use strict";var f$t=K5(),h$t=XP(),d$t=HX();B7e.exports=function(){return d$t(f$t,h$t,arguments)}});var MS=W((H$r,a9)=>{"use strict";var p$t=z7e(),O7e=_S(),v$t=ZP(),N7e=q7e();a9.exports=function(t){var r=v$t(arguments),i=1+t.length-(arguments.length-1);return p$t(r,i>0?i:0,!0)};O7e?O7e(a9.exports,"apply",{value:N7e}):a9.exports.apply=N7e});var cZ=W((j$r,H7e)=>{"use strict";var l9=w7e(),g$t=S7e(),U7e=MS(),lZ=n_(),s9=r_(),o9=KP(),m$t=lZ("Object.prototype.toString"),G7e=bS()(),V7e=typeof globalThis=="undefined"?window:globalThis,sZ=g$t(),uZ=lZ("String.prototype.slice"),y$t=lZ("Array.prototype.indexOf",!0)||function(t,r){for(var i=0;i-1}function w$t(e){if(!e||typeof e!="object")return!1;if(!G7e){var t=uZ(m$t(e),8,-1);return _$t(t)?t:t!=="Object"?!1:b$t(e)}return s9?x$t(e):null}H7e.exports=w$t});var $7e=W(($$r,j7e)=>{"use strict";var T$t=cZ();j7e.exports=function(t){return!!T$t(t)}});var dZ=W(so=>{"use strict";var A$t=t7e(),M$t=v7e(),vv=cZ(),W7e=$7e();function n4(e){return e.call.bind(e)}var Y7e=typeof BigInt!="undefined",X7e=typeof Symbol!="undefined",$d=n4(Object.prototype.toString),S$t=n4(Number.prototype.valueOf),E$t=n4(String.prototype.valueOf),k$t=n4(Boolean.prototype.valueOf);Y7e&&(Z7e=n4(BigInt.prototype.valueOf));var Z7e;X7e&&(K7e=n4(Symbol.prototype.valueOf));var K7e;function ES(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}so.isArgumentsObject=A$t;so.isGeneratorFunction=M$t;so.isTypedArray=W7e;function C$t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}so.isPromise=C$t;function D$t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):W7e(e)||Q7e(e)}so.isArrayBufferView=D$t;function F$t(e){return vv(e)==="Uint8Array"}so.isUint8Array=F$t;function L$t(e){return vv(e)==="Uint8ClampedArray"}so.isUint8ClampedArray=L$t;function P$t(e){return vv(e)==="Uint16Array"}so.isUint16Array=P$t;function I$t(e){return vv(e)==="Uint32Array"}so.isUint32Array=I$t;function R$t(e){return vv(e)==="Int8Array"}so.isInt8Array=R$t;function z$t(e){return vv(e)==="Int16Array"}so.isInt16Array=z$t;function B$t(e){return vv(e)==="Int32Array"}so.isInt32Array=B$t;function q$t(e){return vv(e)==="Float32Array"}so.isFloat32Array=q$t;function O$t(e){return vv(e)==="Float64Array"}so.isFloat64Array=O$t;function N$t(e){return vv(e)==="BigInt64Array"}so.isBigInt64Array=N$t;function U$t(e){return vv(e)==="BigUint64Array"}so.isBigUint64Array=U$t;function c9(e){return $d(e)==="[object Map]"}c9.working=typeof Map!="undefined"&&c9(new Map);function V$t(e){return typeof Map=="undefined"?!1:c9.working?c9(e):e instanceof Map}so.isMap=V$t;function f9(e){return $d(e)==="[object Set]"}f9.working=typeof Set!="undefined"&&f9(new Set);function G$t(e){return typeof Set=="undefined"?!1:f9.working?f9(e):e instanceof Set}so.isSet=G$t;function h9(e){return $d(e)==="[object WeakMap]"}h9.working=typeof WeakMap!="undefined"&&h9(new WeakMap);function H$t(e){return typeof WeakMap=="undefined"?!1:h9.working?h9(e):e instanceof WeakMap}so.isWeakMap=H$t;function hZ(e){return $d(e)==="[object WeakSet]"}hZ.working=typeof WeakSet!="undefined"&&hZ(new WeakSet);function j$t(e){return hZ(e)}so.isWeakSet=j$t;function d9(e){return $d(e)==="[object ArrayBuffer]"}d9.working=typeof ArrayBuffer!="undefined"&&d9(new ArrayBuffer);function J7e(e){return typeof ArrayBuffer=="undefined"?!1:d9.working?d9(e):e instanceof ArrayBuffer}so.isArrayBuffer=J7e;function p9(e){return $d(e)==="[object DataView]"}p9.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&p9(new DataView(new ArrayBuffer(1),0,1));function Q7e(e){return typeof DataView=="undefined"?!1:p9.working?p9(e):e instanceof DataView}so.isDataView=Q7e;var fZ=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function SS(e){return $d(e)==="[object SharedArrayBuffer]"}function eFe(e){return typeof fZ=="undefined"?!1:(typeof SS.working=="undefined"&&(SS.working=SS(new fZ)),SS.working?SS(e):e instanceof fZ)}so.isSharedArrayBuffer=eFe;function $$t(e){return $d(e)==="[object AsyncFunction]"}so.isAsyncFunction=$$t;function W$t(e){return $d(e)==="[object Map Iterator]"}so.isMapIterator=W$t;function Y$t(e){return $d(e)==="[object Set Iterator]"}so.isSetIterator=Y$t;function X$t(e){return $d(e)==="[object Generator]"}so.isGeneratorObject=X$t;function Z$t(e){return $d(e)==="[object WebAssembly.Module]"}so.isWebAssemblyCompiledModule=Z$t;function tFe(e){return ES(e,S$t)}so.isNumberObject=tFe;function rFe(e){return ES(e,E$t)}so.isStringObject=rFe;function iFe(e){return ES(e,k$t)}so.isBooleanObject=iFe;function nFe(e){return Y7e&&ES(e,Z7e)}so.isBigIntObject=nFe;function aFe(e){return X7e&&ES(e,K7e)}so.isSymbolObject=aFe;function K$t(e){return tFe(e)||rFe(e)||iFe(e)||nFe(e)||aFe(e)}so.isBoxedPrimitive=K$t;function J$t(e){return typeof Uint8Array!="undefined"&&(J7e(e)||eFe(e))}so.isAnyArrayBuffer=J$t;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(so,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var pZ=W((Y$r,oFe)=>{oFe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var bZ=W(lo=>{var sFe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(l){return"[Circular]"}default:return s}}),o=i[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),yZ(t)?r.showHidden=t:t&&lo._extend(r,t),o_(r.showHidden)&&(r.showHidden=!1),o_(r.depth)&&(r.depth=2),o_(r.colors)&&(r.colors=!1),o_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=eWt),y9(r,e,r.depth)}lo.inspect=d2;d2.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]};d2.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function eWt(e,t){var r=d2.styles[t];return r?"\x1B["+d2.colors[r][0]+"m"+e+"\x1B["+d2.colors[r][1]+"m":e}function tWt(e,t){return e}function rWt(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function y9(e,t,r){if(e.customInspect&&t&&m9(t.inspect)&&t.inspect!==lo.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return _9(i)||(i=y9(e,i,r)),i}var n=iWt(e,t);if(n)return n;var a=Object.keys(t),o=rWt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),CS(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return vZ(t);if(a.length===0){if(m9(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(kS(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x9(t))return e.stylize(Date.prototype.toString.call(t),"date");if(CS(t))return vZ(t)}var l="",u=!1,c=["{","}"];if(uFe(t)&&(u=!0,c=["[","]"]),m9(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(kS(t)&&(l=" "+RegExp.prototype.toString.call(t)),x9(t)&&(l=" "+Date.prototype.toUTCString.call(t)),CS(t)&&(l=" "+vZ(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return kS(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=nWt(e,t,r,o,a):h=a.map(function(p){return mZ(e,t,r,o,p,u)}),e.seen.pop(),aWt(h,l,c)}function iWt(e,t){if(o_(t))return e.stylize("undefined","undefined");if(_9(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(cFe(t))return e.stylize(""+t,"number");if(yZ(t))return e.stylize(""+t,"boolean");if(b9(t))return e.stylize("null","null")}function vZ(e){return"["+Error.prototype.toString.call(e)+"]"}function nWt(e,t,r,i,n){for(var a=[],o=0,s=t.length;o-1&&(a?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` `))):s=e.stylize("[Circular]","special")),o_(o)){if(a&&n.match(/^\d+$/))return s;o=JSON.stringify(""+n),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function aWt(e,t,r){var i=0,n=e.reduce(function(a,o){return i++,o.indexOf(` `)>=0&&i++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}lo.types=dZ();function uFe(e){return Array.isArray(e)}lo.isArray=uFe;function yZ(e){return typeof e=="boolean"}lo.isBoolean=yZ;function b9(e){return e===null}lo.isNull=b9;function oWt(e){return e==null}lo.isNullOrUndefined=oWt;function cFe(e){return typeof e=="number"}lo.isNumber=cFe;function _9(e){return typeof e=="string"}lo.isString=_9;function sWt(e){return typeof e=="symbol"}lo.isSymbol=sWt;function o_(e){return e===void 0}lo.isUndefined=o_;function kS(e){return a4(e)&&xZ(e)==="[object RegExp]"}lo.isRegExp=kS;lo.types.isRegExp=kS;function a4(e){return typeof e=="object"&&e!==null}lo.isObject=a4;function x9(e){return a4(e)&&xZ(e)==="[object Date]"}lo.isDate=x9;lo.types.isDate=x9;function CS(e){return a4(e)&&(xZ(e)==="[object Error]"||e instanceof Error)}lo.isError=CS;lo.types.isNativeError=CS;function m9(e){return typeof e=="function"}lo.isFunction=m9;function lWt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}lo.isPrimitive=lWt;lo.isBuffer=pZ();function xZ(e){return Object.prototype.toString.call(e)}function gZ(e){return e<10?"0"+e.toString(10):e.toString(10)}var uWt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function cWt(){var e=new Date,t=[gZ(e.getHours()),gZ(e.getMinutes()),gZ(e.getSeconds())].join(":");return[e.getDate(),uWt[e.getMonth()],t].join(" ")}lo.log=function(){console.log("%s - %s",cWt(),lo.format.apply(lo,arguments))};lo.inherits=fm();lo._extend=function(e,t){if(!t||!a4(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function fFe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var a_=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;lo.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(a_&&t[a_]){var r=t[a_];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,a_,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(l,u){i=l,n=u}),o=[],s=0;s{"use strict";function hFe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function dFe(e){for(var t=1;t0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return w9.alloc(0);for(var i=w9.allocUnsafe(r>>>0),n=this.head,a=0;n;)bWt(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return ro.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=w9.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,s=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,s),r-=s,r===0){s===o.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++a}return this.length-=a,i}},{key:xWt,value:function(r,i){return _Z(this,dFe(dFe({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var TZ=W((K$r,xFe)=>{"use strict";function _Wt(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(wZ,this,e)):process.nextTick(wZ,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(T9,r):(r._writableState.errorEmitted=!0,process.nextTick(yFe,r,a)):process.nextTick(yFe,r,a):t?(process.nextTick(T9,r),t(a)):process.nextTick(T9,r)}),this)}function yFe(e,t){wZ(e,t),T9(e)}function T9(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function wWt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function wZ(e,t){e.emit("error",t)}function TWt(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}xFe.exports={destroy:_Wt,undestroy:wWt,errorOrDestroy:TWt}});var s_=W((J$r,wFe)=>{"use strict";function AWt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var _Fe={};function Wd(e,t,r){r||(r=Error);function i(a,o,s){return typeof t=="string"?t:t(a,o,s)}var n=(function(a){AWt(o,a);function o(s,l,u){return a.call(this,i(s,l,u))||this}return o})(r);n.prototype.name=r.name,n.prototype.code=e,_Fe[e]=n}function bFe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function MWt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function SWt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function EWt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Wd("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Wd("ERR_INVALID_ARG_TYPE",function(e,t,r){var i;typeof t=="string"&&MWt(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(SWt(e," argument"))n="The ".concat(e," ").concat(i," ").concat(bFe(t,"type"));else{var a=EWt(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(bFe(t,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);Wd("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Wd("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Wd("ERR_STREAM_PREMATURE_CLOSE","Premature close");Wd("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Wd("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Wd("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Wd("ERR_STREAM_WRITE_AFTER_END","write after end");Wd("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Wd("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Wd("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");wFe.exports.codes=_Fe});var AZ=W((Q$r,TFe)=>{"use strict";var kWt=s_().codes.ERR_INVALID_OPT_VALUE;function CWt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function DWt(e,t,r,i){var n=CWt(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new kWt(a,n)}return Math.floor(n)}return e.objectMode?16:16*1024}TFe.exports={getHighWaterMark:DWt}});var MFe=W((eWr,AFe)=>{AFe.exports=FWt;function FWt(e,t){if(MZ("noDeprecation"))return e;var r=!1;function i(){if(!r){if(MZ("throwDeprecation"))throw new Error(t);MZ("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function MZ(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var kZ=W((tWr,FFe)=>{"use strict";FFe.exports=tu;function EFe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){nYt(t,e)}}var o4;tu.WritableState=FS;var LWt={deprecate:MFe()},kFe=DX(),M9=t_().Buffer,PWt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function IWt(e){return M9.from(e)}function RWt(e){return M9.isBuffer(e)||e instanceof PWt}var EZ=TZ(),zWt=AZ(),BWt=zWt.getHighWaterMark,p2=s_().codes,qWt=p2.ERR_INVALID_ARG_TYPE,OWt=p2.ERR_METHOD_NOT_IMPLEMENTED,NWt=p2.ERR_MULTIPLE_CALLBACK,UWt=p2.ERR_STREAM_CANNOT_PIPE,VWt=p2.ERR_STREAM_DESTROYED,GWt=p2.ERR_STREAM_NULL_VALUES,HWt=p2.ERR_STREAM_WRITE_AFTER_END,jWt=p2.ERR_UNKNOWN_ENCODING,s4=EZ.errorOrDestroy;fm()(tu,kFe);function $Wt(){}function FS(e,t,r){o4=o4||l_(),e=e||{},typeof r!="boolean"&&(r=t instanceof o4),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=BWt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){QWt(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new EFe(this)}FS.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(FS.prototype,"buffer",{get:LWt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var A9;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A9=Function.prototype[Symbol.hasInstance],Object.defineProperty(tu,Symbol.hasInstance,{value:function(t){return A9.call(this,t)?!0:this!==tu?!1:t&&t._writableState instanceof FS}})):A9=function(t){return t instanceof this};function tu(e){o4=o4||l_();var t=this instanceof o4;if(!t&&!A9.call(tu,this))return new tu(e);this._writableState=new FS(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),kFe.call(this)}tu.prototype.pipe=function(){s4(this,new UWt)};function WWt(e,t){var r=new HWt;s4(e,r),process.nextTick(t,r)}function YWt(e,t,r,i){var n;return r===null?n=new GWt:typeof r!="string"&&!t.objectMode&&(n=new qWt("chunk",["string","Buffer"],r)),n?(s4(e,n),process.nextTick(i,n),!1):!0}tu.prototype.write=function(e,t,r){var i=this._writableState,n=!1,a=!i.objectMode&&RWt(e);return a&&!M9.isBuffer(e)&&(e=IWt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=$Wt),i.ending?WWt(this,r):(a||YWt(this,i,e,r))&&(i.pendingcb++,n=ZWt(this,i,a,e,t,r)),n};tu.prototype.cork=function(){this._writableState.corked++};tu.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&CFe(this,e))};tu.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new jWt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(tu.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function XWt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=M9.from(t,r)),t}Object.defineProperty(tu.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ZWt(e,t,r,i,n,a){if(!r){var o=XWt(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var l=t.length{"use strict";var aYt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};PFe.exports=U1;var LFe=FZ(),DZ=kZ();fm()(U1,LFe);for(CZ=aYt(DZ.prototype),S9=0;S9{var k9=t_(),V1=k9.Buffer;function IFe(e,t){for(var r in e)t[r]=e[r]}V1.from&&V1.alloc&&V1.allocUnsafe&&V1.allocUnsafeSlow?RFe.exports=k9:(IFe(k9,LZ),LZ.Buffer=u_);function u_(e,t,r){return V1(e,t,r)}u_.prototype=Object.create(V1.prototype);IFe(V1,u_);u_.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return V1(e,t,r)};u_.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=V1(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};u_.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return V1(e)};u_.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return k9.SlowBuffer(e)}});var RZ=W(qFe=>{"use strict";var IZ=zFe().Buffer,BFe=IZ.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function lYt(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function uYt(e){var t=lYt(e);if(typeof t!="string"&&(IZ.isEncoding===BFe||!BFe(e)))throw new Error("Unknown encoding: "+e);return t||e}qFe.StringDecoder=LS;function LS(e){this.encoding=uYt(e);var t;switch(this.encoding){case"utf16le":this.text=vYt,this.end=gYt,t=4;break;case"utf8":this.fillLast=hYt,t=4;break;case"base64":this.text=mYt,this.end=yYt,t=3;break;default:this.write=xYt,this.end=bYt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=IZ.allocUnsafe(t)}LS.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function cYt(e,t,r){var i=t.length-1;if(i=0?(n>0&&(e.lastNeed=n-1),n):--i=0?(n>0&&(e.lastNeed=n-2),n):--i=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function fYt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function hYt(e){var t=this.lastTotal-this.lastNeed,r=fYt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function dYt(e,t){var r=cYt(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function pYt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function vYt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function gYt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function mYt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function yYt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function xYt(e){return e.toString(this.encoding)}function bYt(e){return e&&e.length?this.write(e):""}});var C9=W((nWr,UFe)=>{"use strict";var OFe=s_().codes.ERR_STREAM_PREMATURE_CLOSE;function _Yt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n{"use strict";var D9;function v2(e,t,r){return t=AYt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AYt(e){var t=MYt(e,"string");return typeof t=="symbol"?t:String(t)}function MYt(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SYt=C9(),g2=Symbol("lastResolve"),c_=Symbol("lastReject"),PS=Symbol("error"),F9=Symbol("ended"),f_=Symbol("lastPromise"),zZ=Symbol("handlePromise"),h_=Symbol("stream");function m2(e,t){return{value:e,done:t}}function EYt(e){var t=e[g2];if(t!==null){var r=e[h_].read();r!==null&&(e[f_]=null,e[g2]=null,e[c_]=null,t(m2(r,!1)))}}function kYt(e){process.nextTick(EYt,e)}function CYt(e,t){return function(r,i){e.then(function(){if(t[F9]){r(m2(void 0,!0));return}t[zZ](r,i)},i)}}var DYt=Object.getPrototypeOf(function(){}),FYt=Object.setPrototypeOf((D9={get stream(){return this[h_]},next:function(){var t=this,r=this[PS];if(r!==null)return Promise.reject(r);if(this[F9])return Promise.resolve(m2(void 0,!0));if(this[h_].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[PS]?s(t[PS]):o(m2(void 0,!0))})});var i=this[f_],n;if(i)n=new Promise(CYt(i,this));else{var a=this[h_].read();if(a!==null)return Promise.resolve(m2(a,!1));n=new Promise(this[zZ])}return this[f_]=n,n}},v2(D9,Symbol.asyncIterator,function(){return this}),v2(D9,"return",function(){var t=this;return new Promise(function(r,i){t[h_].destroy(null,function(n){if(n){i(n);return}r(m2(void 0,!0))})})}),D9),DYt),LYt=function(t){var r,i=Object.create(FYt,(r={},v2(r,h_,{value:t,writable:!0}),v2(r,g2,{value:null,writable:!0}),v2(r,c_,{value:null,writable:!0}),v2(r,PS,{value:null,writable:!0}),v2(r,F9,{value:t._readableState.endEmitted,writable:!0}),v2(r,zZ,{value:function(a,o){var s=i[h_].read();s?(i[f_]=null,i[g2]=null,i[c_]=null,a(m2(s,!1))):(i[g2]=a,i[c_]=o)},writable:!0}),r));return i[f_]=null,SYt(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[c_];a!==null&&(i[f_]=null,i[g2]=null,i[c_]=null,a(n)),i[PS]=n;return}var o=i[g2];o!==null&&(i[f_]=null,i[g2]=null,i[c_]=null,o(m2(void 0,!0))),i[F9]=!0}),t.on("readable",kYt.bind(null,i)),i};VFe.exports=LYt});var jFe=W((oWr,HFe)=>{HFe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var FZ=W((lWr,tLe)=>{"use strict";tLe.exports=Lo;var l4;Lo.ReadableState=XFe;var sWr=ib().EventEmitter,YFe=function(t,r){return t.listeners(r).length},RS=DX(),L9=t_().Buffer,PYt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function IYt(e){return L9.from(e)}function RYt(e){return L9.isBuffer(e)||e instanceof PYt}var BZ=bZ(),to;BZ&&BZ.debuglog?to=BZ.debuglog("stream"):to=function(){};var zYt=mFe(),HZ=TZ(),BYt=AZ(),qYt=BYt.getHighWaterMark,P9=s_().codes,OYt=P9.ERR_INVALID_ARG_TYPE,NYt=P9.ERR_STREAM_PUSH_AFTER_EOF,UYt=P9.ERR_METHOD_NOT_IMPLEMENTED,VYt=P9.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,u4,qZ,OZ;fm()(Lo,RS);var IS=HZ.errorOrDestroy,NZ=["error","close","destroy","pause","resume"];function GYt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function XFe(e,t,r){l4=l4||l_(),e=e||{},typeof r!="boolean"&&(r=t instanceof l4),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=qYt(this,e,"readableHighWaterMark",r),this.buffer=new zYt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u4||(u4=RZ().StringDecoder),this.decoder=new u4(e.encoding),this.encoding=e.encoding)}function Lo(e){if(l4=l4||l_(),!(this instanceof Lo))return new Lo(e);var t=this instanceof l4;this._readableState=new XFe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),RS.call(this)}Object.defineProperty(Lo.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Lo.prototype.destroy=HZ.destroy;Lo.prototype._undestroy=HZ.undestroy;Lo.prototype._destroy=function(e,t){t(e)};Lo.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=L9.from(e,t),t=""),i=!0),ZFe(this,e,t,!1,i)};Lo.prototype.unshift=function(e){return ZFe(this,e,null,!0,!1)};function ZFe(e,t,r,i,n){to("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,$Yt(e,a);else{var o;if(n||(o=HYt(a,t)),o)IS(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==L9.prototype&&(t=IYt(t)),i)a.endEmitted?IS(e,new VYt):UZ(e,a,t,!0);else if(a.ended)IS(e,new NYt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?UZ(e,a,t,!1):GZ(e,a)):UZ(e,a,t,!1)}else i||(a.reading=!1,GZ(e,a))}return!a.ended&&(a.length=$Fe?e=$Fe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function WFe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=jYt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Lo.prototype.read=function(e){to("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return to("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?VZ(this):I9(this),null;if(e=WFe(e,t),e===0&&t.ended)return t.length===0&&VZ(this),null;var i=t.needReadable;to("need readable",i),(t.length===0||t.length-e0?n=QFe(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&VZ(this)),n!==null&&this.emit("data",n),n};function $Yt(e,t){if(to("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I9(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,KFe(e)))}}function I9(e){var t=e._readableState;to("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(to("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(KFe,e))}function KFe(e){var t=e._readableState;to("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,jZ(e)}function GZ(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(WYt,e,t))}function WYt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&eLe(i.pipes,e)!==-1)&&!u&&(to("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(m){to("onerror",m),v(),e.removeListener("error",h),YFe(e,"error")===0&&IS(e,m)}GYt(e,"error",h);function p(){e.removeListener("finish",d),v()}e.once("close",p);function d(){to("onfinish"),e.removeListener("close",p),v()}e.once("finish",d);function v(){to("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(to("pipe resume"),r.resume()),e};function YYt(e){return function(){var r=e._readableState;to("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&YFe(e,"data")&&(r.flowing=!0,jZ(e))}}Lo.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,to("on readable",i.length,i.reading),i.length?I9(this):i.reading||process.nextTick(XYt,this)),r};Lo.prototype.addListener=Lo.prototype.on;Lo.prototype.removeListener=function(e,t){var r=RS.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(JFe,this),r};Lo.prototype.removeAllListeners=function(e){var t=RS.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(JFe,this),t};function JFe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function XYt(e){to("readable nexttick read 0"),e.read(0)}Lo.prototype.resume=function(){var e=this._readableState;return e.flowing||(to("resume"),e.flowing=!e.readableListening,ZYt(this,e)),e.paused=!1,this};function ZYt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(KYt,e,t))}function KYt(e,t){to("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),jZ(e),t.flowing&&!t.reading&&e.read(0)}Lo.prototype.pause=function(){return to("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(to("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function jZ(e){var t=e._readableState;for(to("flow",t.flowing);t.flowing&&e.read()!==null;);}Lo.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(to("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(to("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(s){return function(){return e[s].apply(e,arguments)}})(n));for(var a=0;a=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function VZ(e){var t=e._readableState;to("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(JYt,t,e))}function JYt(e,t){if(to("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Lo.from=function(e,t){return OZ===void 0&&(OZ=jFe()),OZ(Lo,e,t)});function eLe(e,t){for(var r=0,i=e.length;r{"use strict";iLe.exports=dm;var R9=s_().codes,QYt=R9.ERR_METHOD_NOT_IMPLEMENTED,eXt=R9.ERR_MULTIPLE_CALLBACK,tXt=R9.ERR_TRANSFORM_ALREADY_TRANSFORMING,rXt=R9.ERR_TRANSFORM_WITH_LENGTH_0,z9=l_();fm()(dm,z9);function iXt(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new eXt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";aLe.exports=zS;var nLe=$Z();fm()(zS,nLe);function zS(e){if(!(this instanceof zS))return new zS(e);nLe.call(this,e)}zS.prototype._transform=function(e,t,r){r(null,e)}});var fLe=W((fWr,cLe)=>{"use strict";var WZ;function aXt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var uLe=s_().codes,oXt=uLe.ERR_MISSING_ARGS,sXt=uLe.ERR_STREAM_DESTROYED;function sLe(e){if(e)throw e}function lXt(e){return e.setHeader&&typeof e.abort=="function"}function uXt(e,t,r,i){i=aXt(i);var n=!1;e.on("close",function(){n=!0}),WZ===void 0&&(WZ=C9()),WZ(e,{readable:t,writable:r},function(o){if(o)return i(o);n=!0,i()});var a=!1;return function(o){if(!n&&!a){if(a=!0,lXt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(o||new sXt("pipe"))}}}function lLe(e){e()}function cXt(e,t){return e.pipe(t)}function fXt(e){return!e.length||typeof e[e.length-1]!="function"?sLe:e.pop()}function hXt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return uXt(o,l,u,function(c){n||(n=c),c&&a.forEach(lLe),!l&&(a.forEach(lLe),i(n))})});return t.reduce(cXt)}cLe.exports=hXt});var dLe=W((hWr,hLe)=>{hLe.exports=Yd;var YZ=ib().EventEmitter,dXt=fm();dXt(Yd,YZ);Yd.Readable=FZ();Yd.Writable=kZ();Yd.Duplex=l_();Yd.Transform=$Z();Yd.PassThrough=oLe();Yd.finished=C9();Yd.pipeline=fLe();Yd.Stream=Yd;function Yd(){YZ.call(this)}Yd.prototype.pipe=function(e,t){var r=this;function i(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}e.on("drain",n),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),YZ.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",i),e.removeListener("drain",n),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var f4=W(uo=>{var pLe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(l){return"[Circular]"}default:return s}}),o=i[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),JZ(t)?r.showHidden=t:t&&uo._extend(r,t),p_(r.showHidden)&&(r.showHidden=!1),p_(r.depth)&&(r.depth=2),p_(r.colors)&&(r.colors=!1),p_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=vXt),N9(r,e,r.depth)}uo.inspect=y2;y2.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]};y2.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function vXt(e,t){var r=y2.styles[t];return r?"\x1B["+y2.colors[r][0]+"m"+e+"\x1B["+y2.colors[r][1]+"m":e}function gXt(e,t){return e}function mXt(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function N9(e,t,r){if(e.customInspect&&t&&O9(t.inspect)&&t.inspect!==uo.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return G9(i)||(i=N9(e,i,r)),i}var n=yXt(e,t);if(n)return n;var a=Object.keys(t),o=mXt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),qS(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return XZ(t);if(a.length===0){if(O9(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(BS(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(U9(t))return e.stylize(Date.prototype.toString.call(t),"date");if(qS(t))return XZ(t)}var l="",u=!1,c=["{","}"];if(gLe(t)&&(u=!0,c=["[","]"]),O9(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(BS(t)&&(l=" "+RegExp.prototype.toString.call(t)),U9(t)&&(l=" "+Date.prototype.toUTCString.call(t)),qS(t)&&(l=" "+XZ(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return BS(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=xXt(e,t,r,o,a):h=a.map(function(p){return KZ(e,t,r,o,p,u)}),e.seen.pop(),bXt(h,l,c)}function yXt(e,t){if(p_(t))return e.stylize("undefined","undefined");if(G9(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(mLe(t))return e.stylize(""+t,"number");if(JZ(t))return e.stylize(""+t,"boolean");if(V9(t))return e.stylize("null","null")}function XZ(e){return"["+Error.prototype.toString.call(e)+"]"}function xXt(e,t,r,i,n){for(var a=[],o=0,s=t.length;o-1&&(a?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` `))):s=e.stylize("[Circular]","special")),p_(o)){if(a&&n.match(/^\d+$/))return s;o=JSON.stringify(""+n),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function bXt(e,t,r){var i=0,n=e.reduce(function(a,o){return i++,o.indexOf(` `)>=0&&i++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}uo.types=dZ();function gLe(e){return Array.isArray(e)}uo.isArray=gLe;function JZ(e){return typeof e=="boolean"}uo.isBoolean=JZ;function V9(e){return e===null}uo.isNull=V9;function _Xt(e){return e==null}uo.isNullOrUndefined=_Xt;function mLe(e){return typeof e=="number"}uo.isNumber=mLe;function G9(e){return typeof e=="string"}uo.isString=G9;function wXt(e){return typeof e=="symbol"}uo.isSymbol=wXt;function p_(e){return e===void 0}uo.isUndefined=p_;function BS(e){return c4(e)&&QZ(e)==="[object RegExp]"}uo.isRegExp=BS;uo.types.isRegExp=BS;function c4(e){return typeof e=="object"&&e!==null}uo.isObject=c4;function U9(e){return c4(e)&&QZ(e)==="[object Date]"}uo.isDate=U9;uo.types.isDate=U9;function qS(e){return c4(e)&&(QZ(e)==="[object Error]"||e instanceof Error)}uo.isError=qS;uo.types.isNativeError=qS;function O9(e){return typeof e=="function"}uo.isFunction=O9;function TXt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}uo.isPrimitive=TXt;uo.isBuffer=pZ();function QZ(e){return Object.prototype.toString.call(e)}function ZZ(e){return e<10?"0"+e.toString(10):e.toString(10)}var AXt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function MXt(){var e=new Date,t=[ZZ(e.getHours()),ZZ(e.getMinutes()),ZZ(e.getSeconds())].join(":");return[e.getDate(),AXt[e.getMonth()],t].join(" ")}uo.log=function(){console.log("%s - %s",MXt(),uo.format.apply(uo,arguments))};uo.inherits=fm();uo._extend=function(e,t){if(!t||!c4(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function yLe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var d_=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;uo.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(d_&&t[d_]){var r=t[d_];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,d_,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(l,u){i=l,n=u}),o=[],s=0;s{"use strict";function x2(e){"@babel/helpers - typeof";return x2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x2(e)}function xLe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function BXt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function qXt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function OXt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}OS("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);OS("ERR_INVALID_ARG_TYPE",function(e,t,r){h4===void 0&&(h4=j9()),h4(typeof e=="string","'name' must be a string");var i;typeof t=="string"&&BXt(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(qXt(e," argument"))n="The ".concat(e," ").concat(i," ").concat(bLe(t,"type"));else{var a=OXt(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(bLe(t,"type"))}return n+=". Received type ".concat(x2(r)),n},TypeError);OS("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";eK===void 0&&(eK=f4());var i=eK.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)},TypeError,RangeError);OS("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return r&&r.constructor&&r.constructor.name?i="instance of ".concat(r.constructor.name):i="type ".concat(x2(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError);OS("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var i="The ",n=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),n){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,n-1).join(", "),i+=", and ".concat(t[n-1]," arguments");break}return"".concat(i," must be specified")},TypeError);wLe.exports.codes=_Le});var LLe=W((vWr,FLe)=>{"use strict";function TLe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ALe(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function ZXt(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var gv="",NS="",US="",lf="",v_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},KXt=10;function ELe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(i){r[i]=e[i]}),Object.defineProperty(r,"message",{value:e.message}),r}function VS(e){return aK(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function JXt(e,t,r){var i="",n="",a=0,o="",s=!1,l=VS(e),u=l.split(` `),c=VS(t).split(` `),f=0,h="";if(r==="strictEqual"&&Kh(e)==="object"&&Kh(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var p=u[0].length+c[0].length;if(p<=KXt){if((Kh(e)!=="object"||e===null)&&(Kh(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(v_[r],` `)+"".concat(u[0]," !== ").concat(c[0],` `)}else if(r!=="strictEqualObject"){var d=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(p2&&(h=` `.concat(ZXt(" ",f),"^"),f=0)}}}for(var v=u[u.length-1],m=c[c.length-1];v===m&&(f++<2?o=` `.concat(v).concat(o):i=v,u.pop(),c.pop(),!(u.length===0||c.length===0));)v=u[u.length-1],m=c[c.length-1];var g=Math.max(u.length,c.length);if(g===0){var w=l.split(` `);if(w.length>30)for(w[26]="".concat(gv,"...").concat(lf);w.length>27;)w.pop();return"".concat(v_.notIdentical,` `).concat(w.join(` `),` `)}f>3&&(o=` `.concat(gv,"...").concat(lf).concat(o),s=!0),i!==""&&(o=` `.concat(i).concat(o),i="");var _=0,b=v_[r]+` `.concat(NS,"+ actual").concat(lf," ").concat(US,"- expected").concat(lf),M=" ".concat(gv,"...").concat(lf," Lines skipped");for(f=0;f1&&f>2&&(x>4?(n+=` `.concat(gv,"...").concat(lf),s=!0):x>3&&(n+=` `.concat(c[f-2]),_++),n+=` `.concat(c[f-1]),_++),a=f,i+=` `.concat(US,"-").concat(lf," ").concat(c[f]),_++;else if(c.length1&&f>2&&(x>4?(n+=` `.concat(gv,"...").concat(lf),s=!0):x>3&&(n+=` `.concat(u[f-2]),_++),n+=` `.concat(u[f-1]),_++),a=f,n+=` `.concat(NS,"+").concat(lf," ").concat(u[f]),_++;else{var A=c[f],T=u[f],y=T!==A&&(!SLe(T,",")||T.slice(0,-1)!==A);y&&SLe(A,",")&&A.slice(0,-1)===T&&(y=!1,T+=","),y?(x>1&&f>2&&(x>4?(n+=` `.concat(gv,"...").concat(lf),s=!0):x>3&&(n+=` `.concat(u[f-2]),_++),n+=` `.concat(u[f-1]),_++),a=f,n+=` `.concat(NS,"+").concat(lf," ").concat(T),i+=` `.concat(US,"-").concat(lf," ").concat(A),_+=2):(n+=i,i="",(x===1||f===0)&&(n+=` `.concat(T),_++))}if(_>20&&f30)for(p[26]="".concat(gv,"...").concat(lf);p.length>27;)p.pop();p.length===1?a=r.call(this,"".concat(h," ").concat(p[0])):a=r.call(this,"".concat(h,` `).concat(p.join(` `),` `))}else{var d=VS(u),v="",m=v_[s];s==="notDeepEqual"||s==="notEqual"?(d="".concat(v_[s],` `).concat(d),d.length>1024&&(d="".concat(d.slice(0,1021),"..."))):(v="".concat(VS(c)),d.length>512&&(d="".concat(d.slice(0,509),"...")),v.length>512&&(v="".concat(v.slice(0,509),"...")),s==="deepEqual"||s==="equal"?d="".concat(m,` `).concat(d,` should equal `):v=" ".concat(s," ").concat(v)),a=r.call(this,"".concat(d).concat(v))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(iK(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(iK(a),l),a.stack,a.name="AssertionError",CLe(a)}return VXt(i,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return aK(this,ALe(ALe({},o),{},{customInspect:!1,depth:0}))}}]),i})(nK(Error),aK.custom);FLe.exports=QXt});var oK=W((gWr,ILe)=>{"use strict";var PLe=Object.prototype.toString;ILe.exports=function(t){var r=PLe.call(t),i=r==="[object Arguments]";return i||(i=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&PLe.call(t.callee)==="[object Function]"),i}});var GLe=W((mWr,VLe)=>{"use strict";var ULe;Object.keys||(jS=Object.prototype.hasOwnProperty,sK=Object.prototype.toString,RLe=oK(),lK=Object.prototype.propertyIsEnumerable,zLe=!lK.call({toString:null},"toString"),BLe=lK.call(function(){},"prototype"),$S=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],W9=function(e){var t=e.constructor;return t&&t.prototype===e},qLe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},OLe=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!qLe["$"+e]&&jS.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{W9(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),NLe=function(e){if(typeof window=="undefined"||!OLe)return W9(e);try{return W9(e)}catch(t){return!1}},ULe=function(t){var r=t!==null&&typeof t=="object",i=sK.call(t)==="[object Function]",n=RLe(t),a=r&&sK.call(t)==="[object String]",o=[];if(!r&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var s=BLe&&i;if(a&&t.length>0&&!jS.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var eZt=Array.prototype.slice,tZt=oK(),HLe=Object.keys,Y9=HLe?function(t){return HLe(t)}:GLe(),jLe=Object.keys;Y9.shim=function(){if(Object.keys){var t=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);t||(Object.keys=function(i){return tZt(i)?jLe(eZt.call(i)):jLe(i)})}else Object.keys=Y9;return Object.keys||Y9};$Le.exports=Y9});var KLe=W((xWr,ZLe)=>{"use strict";var rZt=uK(),YLe=HP()(),XLe=n_(),X9=jP(),iZt=XLe("Array.prototype.push"),WLe=XLe("Object.prototype.propertyIsEnumerable"),nZt=YLe?X9.getOwnPropertySymbols:null;ZLe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var i=X9(t);if(arguments.length===1)return i;for(var n=1;n{"use strict";var cK=KLe(),aZt=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},i=0;i{"use strict";var ePe=function(e){return e!==e};tPe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||ePe(t)&&ePe(r))}});var Z9=W((wWr,rPe)=>{"use strict";var sZt=fK();rPe.exports=function(){return typeof Object.is=="function"?Object.is:sZt}});var oPe=W((TWr,aPe)=>{"use strict";var iPe=e9(),nPe=MS(),lZt=nPe(iPe("String.prototype.indexOf"));aPe.exports=function(t,r){var i=iPe(t,!!r);return typeof i=="function"&&lZt(t,".prototype.")>-1?nPe(i):i}});var WS=W((AWr,cPe)=>{"use strict";var uZt=uK(),cZt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",fZt=Object.prototype.toString,hZt=Array.prototype.concat,sPe=nZ(),dZt=function(e){return typeof e=="function"&&fZt.call(e)==="[object Function]"},lPe=oZ()(),pZt=function(e,t,r,i){if(t in e){if(i===!0){if(e[t]===r)return}else if(!dZt(i)||!i())return}lPe?sPe(e,t,r,!0):sPe(e,t,r)},uPe=function(e,t){var r=arguments.length>2?arguments[2]:{},i=uZt(t);cZt&&(i=hZt.call(i,Object.getOwnPropertySymbols(t)));for(var n=0;n{"use strict";var vZt=Z9(),gZt=WS();fPe.exports=function(){var t=vZt();return gZt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var gPe=W((SWr,vPe)=>{"use strict";var mZt=WS(),yZt=MS(),xZt=fK(),dPe=Z9(),bZt=hPe(),pPe=yZt(dPe(),Object);mZt(pPe,{getPolyfill:dPe,implementation:xZt,shim:bZt});vPe.exports=pPe});var hK=W((EWr,mPe)=>{"use strict";mPe.exports=function(t){return t!==t}});var dK=W((kWr,yPe)=>{"use strict";var _Zt=hK();yPe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:_Zt}});var bPe=W((CWr,xPe)=>{"use strict";var wZt=WS(),TZt=dK();xPe.exports=function(){var t=TZt();return wZt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var APe=W((DWr,TPe)=>{"use strict";var AZt=MS(),MZt=WS(),SZt=hK(),_Pe=dK(),EZt=bPe(),wPe=AZt(_Pe(),Number);MZt(wPe,{getPolyfill:_Pe,implementation:SZt,shim:EZt});TPe.exports=wPe});var HPe=W((FWr,GPe)=>{"use strict";function MPe(e,t){return FZt(e)||DZt(e,t)||CZt(e,t)||kZt()}function kZt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CZt(e,t){if(e){if(typeof e=="string")return SPe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SPe(e,t)}}function SPe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function Q9(e){return Object.keys(e).filter(NZt).concat(tI(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function OPe(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n{"use strict";function mv(e){"@babel/helpers - typeof";return mv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mv(e)}function jPe(e,t){for(var r=0;r1?r-1:0),n=1;n1?r-1:0),n=1;n1?r-1:0),n=1;n1?r-1:0),n=1;n{var JS=1e3,QS=JS*60,eE=QS*60,tE=eE*24,hKt=tE*365.25;u9e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return dKt(e);if(r==="number"&&isNaN(e)===!1)return t.long?vKt(e):pKt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function dKt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*hKt;case"days":case"day":case"d":return r*tE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*eE;case"minutes":case"minute":case"mins":case"min":case"m":return r*QS;case"seconds":case"second":case"secs":case"sec":case"s":return r*JS;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function pKt(e){return e>=tE?Math.round(e/tE)+"d":e>=eE?Math.round(e/eE)+"h":e>=QS?Math.round(e/QS)+"m":e>=JS?Math.round(e/JS)+"s":e+"ms"}function vKt(e){return uI(e,tE,"day")||uI(e,eE,"hour")||uI(e,QS,"minute")||uI(e,JS,"second")||e+" ms"}function uI(e,t,r){if(!(e{is=f9e.exports=bK.debug=bK.default=bK;is.coerce=bKt;is.disable=yKt;is.enable=mKt;is.enabled=xKt;is.humanize=c9e();is.names=[];is.skips=[];is.formatters={};var xK;function gKt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return is.colors[Math.abs(t)%is.colors.length]}function bK(e){function t(){if(t.enabled){var r=t,i=+new Date,n=i-(xK||i);r.diff=n,r.prev=xK,r.curr=i,xK=i;for(var a=new Array(arguments.length),o=0;o{fh=p9e.exports=h9e();fh.log=TKt;fh.formatArgs=wKt;fh.save=AKt;fh.load=d9e;fh.useColors=_Kt;fh.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:MKt();fh.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function _Kt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}fh.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function wKt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+fh.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,n=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(i++,a==="%c"&&(n=i))}),e.splice(n,0,r)}}function TKt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function AKt(e){try{e==null?fh.storage.removeItem("debug"):fh.storage.debug=e}catch(t){}}function d9e(){var e;try{e=fh.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}fh.enable(d9e());function MKt(){try{return window.localStorage}catch(e){}}});var T9e=W((IWr,w9e)=>{var p4=j9(),T2=v9e()("stream-parser");w9e.exports=EKt;var m9e=-1,cI=0,SKt=1,y9e=2;function EKt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");T2("extending Parser into stream"),e._bytes=kKt,e._skipBytes=CKt,t&&(e._passthrough=DKt),t?e._transform=LKt:e._write=FKt}function rE(e){T2("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=m9e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function kKt(e,t){p4(!this._parserCallback,'there is already a "callback" set!'),p4(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||rE(this),T2("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=cI}function CKt(e,t){p4(!this._parserCallback,'there is already a "callback" set!'),p4(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||rE(this),T2("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=SKt}function DKt(e,t){p4(!this._parserCallback,'There is already a "callback" set!'),p4(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||rE(this),T2("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=y9e}function FKt(e,t,r){this._parserInit||rE(this),T2("write(%o bytes)",e.length),typeof t=="function"&&(r=t),b9e(this,e,null,r)}function LKt(e,t,r){this._parserInit||rE(this),T2("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),b9e(this,e,t,r)}function x9e(e,t,r,i){return e._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return g9e(e,t,r,i)}:function(){var n=t.slice(0,e._parserBytesLeft);return g9e(e,n,r,function(a){if(a)return i(a);if(t.length>n.length)return function(){return x9e(e,t.slice(n.length),r,i)}})}}function g9e(e,t,r,i){if(e._parserBytesLeft-=t.length,T2("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===cI?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===y9e&&r(t),e._parserBytesLeft===0){var n=e._parserCallback;if(n&&e._parserState===cI&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==cI&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=m9e,e._parserBuffers.splice(0),n){var a=[];t&&a.push(t),r&&a.push(r);var o=n.length>a.length;o&&a.push(_9e(i));var s=n.apply(e,a);if(!o||i===s)return i}}else return i}var b9e=_9e(x9e);function _9e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var A9e=W(q0=>{"use strict";q0.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8};q0.readUInt16BE=function(e,t){return e[t]<<8|e[t+1]};q0.readInt16LE=function(e,t){return q0.readUInt16LE(e,t)<<16>>16};q0.readInt16BE=function(e,t){return q0.readUInt16BE(e,t)<<16>>16};q0.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216};q0.readUInt32BE=function(e,t){return e[t]*16777216+(e[t+1]<<16|e[t+2]<<8|e[t+3])};q0.readInt32LE=function(e,t){return q0.readUInt32LE(e,t)|0};q0.readInt32BE=function(e,t){return q0.readUInt32BE(e,t)|0}});var Ao=W(O0=>{"use strict";var M9e=dLe().Transform,PKt=T9e(),A2=A9e();function iE(){M9e.call(this,{readableObjectMode:!0})}iE.prototype=Object.create(M9e.prototype);iE.prototype.constructor=iE;PKt(iE.prototype);O0.ParserStream=iE;O0.sliceEq=function(e,t,r){for(var i=t,n=0;n{"use strict";var v4=Ao().readUInt16BE,wK=Ao().readUInt32BE;function nE(e,t){if(e.length<4+t)return null;var r=wK(e,t);return e.length>4&15,i=e[4]&15,n=e[5]>>4&15,a=v4(e,6),o=8,s=0;sa.width||n.width===a.width&&n.height>a.height?n:a}),r=e.reduce(function(n,a){return n.height>a.height||n.height===a.height&&n.width>a.width?n:a}),i;return t.width>r.height||t.width===r.height&&t.height>r.width?i=t:i=r,i}hI.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(qKt(e,t),!!t.sizes.length){var r=OKt(t.sizes),i=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type==="imir"&&(a.value===0?i=s[i]:(i=s[i],i=o[i],i=o[i])),a.type==="irot")for(var l=0;l{"use strict";function dI(e,t){var r=new Error(e);return r.code=t,r}function NKt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function pm(e,t,r){this.input=e.subarray(t,r),this.start=t;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if(i!=="II*\0"&&i!=="MM\0*")throw dI("invalid TIFF signature","EBADDATA");this.big_endian=i[0]==="M"}pm.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};pm.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw dI("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};pm.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw dI("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};pm.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};pm.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};pm.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};pm.prototype.scan_ifd=function(e,t,r){var i=this.read_uint16(t);t+=2;for(var n=0;nthis.input.length)throw dI("unexpected EOF","EBADDATA");for(var h=[],p=c,d=0;d0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var m={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(m)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};TK.exports.ExifParser=pm;TK.exports.get_orientation=function(e){var t=0;try{return new pm(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var k9e=W((OWr,E9e)=>{"use strict";var UKt=Ao().str2arr,VKt=Ao().sliceEq,GKt=Ao().readUInt32BE,vI=S9e(),HKt=pI(),jKt=UKt("ftyp");E9e.exports=function(e){if(VKt(e,4,jKt)){var t=vI.unbox(e,0);if(t){var r=vI.getMimeType(t.data);if(r){for(var i,n=t.end;;){var a=vI.unbox(e,n);if(!a)break;if(n=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){i=a.data;break}}if(i){var o=vI.readSizeFromMeta(i);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=GKt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=HKt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var L9e=W((NWr,F9e)=>{"use strict";var $Kt=Ao().str2arr,WKt=Ao().sliceEq,C9e=Ao().readInt16LE,D9e=Ao().readInt32LE,YKt=Ao().readUInt32LE,XKt=$Kt("BM");F9e.exports=function(e){if(!(e.length<26)&&WKt(e,0,XKt)){var t,r,i=YKt(e,14);if(i===12)r=C9e(e,18),t=C9e(e,20);else if(i>12)r=D9e(e,18),t=D9e(e,22);else return;return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}});var B9e=W((UWr,z9e)=>{"use strict";var R9e=Ao().str2arr,P9e=Ao().sliceEq,I9e=Ao().readUInt16LE,ZKt=R9e("GIF87a"),KKt=R9e("GIF89a");z9e.exports=function(e){if(!(e.length<10)&&!(!P9e(e,0,ZKt)&&!P9e(e,0,KKt)))return{width:I9e(e,6),height:I9e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var O9e=W((VWr,q9e)=>{"use strict";var AK=Ao().readUInt16LE,JKt=0,QKt=1,MK=16;q9e.exports=function(e){var t=AK(e,0),r=AK(e,2),i=AK(e,4);if(!(t!==JKt||r!==QKt||!i)&&!(e.length<6+i*MK)){for(var n=[],a={width:0,height:0},o=0;oa.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var U9e=W((GWr,N9e)=>{"use strict";var SK=Ao().readUInt16BE,eJt=Ao().str2arr,tJt=Ao().sliceEq,rJt=pI(),iJt=eJt("Exif\0\0");N9e.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],i;r===255;)r=e[t++];if(r>=208&&r<=217||r===1)i=0;else if(r>=192&&r<=254){if(e.length-t<2)return;i=SK(e,t)-2,t+=2}else return;if(r===217||r===218)return;var n;if(r===225&&i>=10&&tJt(e,t,iJt)&&(n=rJt.get_orientation(e.slice(t+6,t+i))),i>=5&&r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(a.orientation=n),a}t+=i}}});var $9e=W((HWr,j9e)=>{"use strict";var H9e=Ao().str2arr,V9e=Ao().sliceEq,G9e=Ao().readUInt32BE,nJt=H9e(`\x89PNG\r  `),aJt=H9e("IHDR");j9e.exports=function(e){if(!(e.length<24)&&V9e(e,0,nJt)&&V9e(e,12,aJt))return{width:G9e(e,16),height:G9e(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var X9e=W((jWr,Y9e)=>{"use strict";var oJt=Ao().str2arr,sJt=Ao().sliceEq,W9e=Ao().readUInt32BE,lJt=oJt("8BPS\0");Y9e.exports=function(e){if(!(e.length<22)&&sJt(e,0,lJt))return{width:W9e(e,18),height:W9e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var CK=W(kK=>{"use strict";kK.MAX_DATA_LENGTH=1024*10;var EK="[a-zA-Z_:][a-zA-Z0-9:._-]*",K9e="[^\"'=<>`\\x00-\\x20]+",uJt="'[^']*'",cJt='"[^"]*"',fJt="(?:"+K9e+"|"+uJt+"|"+cJt+")",hJt="(?:\\s+"+EK+"(?:\\s*=\\s*"+fJt+")?)",dJt="<[?][\\s\\S]*?[?]>",pJt="",vJt="",gJt="]*(?:\\[[\\s\\S]*?\\][^>]*)?>",mJt=new RegExp("^(?:\\s+|"+dJt+"|"+pJt+"|"+vJt+"|"+gJt+")*"),yJt=new RegExp("^<("+EK+")("+hJt+"*)\\s*/?>"),Z9e=new RegExp("\\s+("+EK+")(?:\\s*=\\s*(?:("+K9e+`)|'([^']*)'|"([^"]*)"))?`,"g"),xJt=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function g4(e){return typeof e=="number"&&isFinite(e)&&e>0}function G1(e){var t=e.slice(-2),r=t.match(xJt);return r===null?"px":r[0]}kK.parse=function(e){var t=e.match(mJt)[0],r=yJt.exec(t.length?e.slice(t.length):e);if(r){var i=r[1];if(!(i!=="svg"&&i.slice(-4)!==":svg")){var n={},a;for(Z9e.lastIndex=0;(a=Z9e.exec(r[2]))!==null;)n[a[1]]=a[2]!==void 0?a[2]:a[3]!==void 0?a[3]:a[4];var o=n.width,s=n.height,l=n.viewBox||n.viewbox;o&&o.indexOf("%")!==-1&&(o=void 0),s&&s.indexOf("%")!==-1&&(s=void 0);var u=parseFloat(o),c=parseFloat(s);if(o&&s)return!g4(u)||!g4(c)?void 0:{width:u,height:c,type:"svg",mime:"image/svg+xml",wUnits:G1(o),hUnits:G1(s)};var f=(l||"").trim().split(/[\s,]+/),h=parseFloat(f[2]),p=parseFloat(f[3]);if(!(!g4(h)||!g4(p))&&G1(f[2])===G1(f[3])){var d=h/p;return o?g4(u)?{width:u,height:u/d,type:"svg",mime:"image/svg+xml",wUnits:G1(o),hUnits:G1(o)}:void 0:s?g4(c)?{width:c*d,height:c,type:"svg",mime:"image/svg+xml",wUnits:G1(s),hUnits:G1(s)}:void 0:{width:h,height:p,type:"svg",mime:"image/svg+xml",wUnits:G1(f[2]),hUnits:G1(f[3])}}}}}});var Q9e=W((WWr,J9e)=>{"use strict";var bJt=CK().parse,_Jt=CK().MAX_DATA_LENGTH;J9e.exports=function(e){var t=0;e[0]===239&&e[1]===187&&e[2]===191&&(t=3);for(var r="",i=Math.min(e.length,t+_Jt),n=t;n{"use strict";var rIe=Ao().str2arr,eIe=Ao().sliceEq,wJt=Ao().readUInt16LE,TJt=Ao().readUInt16BE,AJt=Ao().readUInt32LE,MJt=Ao().readUInt32BE,SJt=rIe("II*\0"),EJt=rIe("MM\0*");function gI(e,t,r){return r?TJt(e,t):wJt(e,t)}function DK(e,t,r){return r?MJt(e,t):AJt(e,t)}function tIe(e,t,r){var i=gI(e,t+2,r),n=DK(e,t+4,r);return n!==1||i!==3&&i!==4?null:i===3?gI(e,t+8,r):DK(e,t+8,r)}iIe.exports=function(e){if(!(e.length<8)&&!(!eIe(e,0,SJt)&&!eIe(e,0,EJt))){var t=e[0]===77,r=DK(e,4,t)-8;if(!(r<0)){var i=r+8;if(!(e.length-i<2)){var n=gI(e,i+0,t)*12;if(!(n<=0)&&(i+=2,!(e.length-i{"use strict";var sIe=Ao().str2arr,aIe=Ao().sliceEq,oIe=Ao().readUInt16LE,FK=Ao().readUInt32LE,kJt=pI(),CJt=sIe("RIFF"),DJt=sIe("WEBP");function FJt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:oIe(e,t+6)&16383,height:oIe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function LJt(e,t){if(e[t]===47){var r=FK(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function PJt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<16|e[t+8]<<8|e[t+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}lIe.exports=function(e){if(!(e.length<16)&&!(!aIe(e,0,CJt)||!aIe(e,8,DJt))){var t=12,r=null,i=0,n=FK(e,4)+8;if(!(n>e.length)){for(;t+8=10?r=r||FJt(e,t+8):a==="VP8L"&&o>=5?r=r||LJt(e,t+8):a==="VP8X"&&o>=10?r=r||PJt(e,t+8):a==="EXIF"&&(i=kJt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return i>0&&(r.orientation=i),r}}}});var fIe=W((ZWr,cIe)=>{"use strict";cIe.exports={avif:k9e(),bmp:L9e(),gif:B9e(),ico:O9e(),jpeg:U9e(),png:$9e(),psd:X9e(),svg:Q9e(),tiff:nIe(),webp:uIe()}});var hIe=W((KWr,PK)=>{"use strict";var LK=fIe();function IJt(e){for(var t=Object.keys(LK),r=0;r0&&i.height>0?i:null}return null}PK.exports=function(t){return IJt(t)};PK.exports.parsers=LK});var pIe=W(dIe=>{"use strict";var RJt=hIe(),zJt=em().IMAGE_URL_PREFIX,BJt=t_().Buffer;dIe.getImageSize=function(e){var t=e.replace(zJt,""),r=new BJt(t,"base64");return RJt(r)}});var mIe=W((QWr,gIe)=>{"use strict";var vIe=tt(),qJt=(j5(),Pt(yS)),OJt=hn(),mI=Yi(),NJt=tt().maxRowLength,UJt=pIe().getImageSize;gIe.exports=function(t,r){var i,n;if(r._hasZ)i=r.z.length,n=NJt(r.z);else if(r._hasSource){var a=UJt(r.source);i=a.height,n=a.width}var o=mI.getFromId(t,r.xaxis||"x"),s=mI.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+n*r.dx],h=[u,u+i*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var jJt=gi(),g_=tt(),yIe=g_.strTranslate,$Jt=(md(),Pt(gd)),WJt=(j5(),Pt(yS)),YJt=mY(),XJt=(cP(),Pt(uP)).STYLE;xIe.exports=function(t,r,i,n){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&YJt();g_.makeTraceGroups(n,i,"im").each(function(l){var u=jJt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var p=c.z,d=c.x0,v=c.y0,m=c.w,g=c.h,w=f.dx,_=f.dy,b,M,x,A,T,y;for(y=0;b===void 0&&y0;)M=a.c2p(d+y*w),y--;for(y=0;A===void 0&&y0;)T=o.c2p(v+y*_),y--;if(MI[0];if(B||O){var $=b+S/2,X=A+C/2;R+="transform:"+yIe($+"px",X+"px")+"scale("+(B?-1:1)+","+(O?-1:1)+")"+yIe(-$+"px",-X+"px")+";"}}P.attr("style",R);var K=new Promise(function(G){if(f._hasZ)G();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===m&&f._canvas.el.height===g&&f._canvas.source===f.source)G();else{var q=document.createElement("canvas");q.width=m,q.height=g;var J=q.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var N=f._image;N.onload=function(){J.drawImage(N,0,0),f._canvas={el:q,source:f.source},G()},N.setAttribute("src",f.source)}}).then(function(){var G,q;if(f._hasZ)q=F(function(V,Y){var H=p[Y][V];return g_.isTypedArray(H)&&(H=Array.from(H)),H}),G=q.toDataURL("image/png");else if(f._hasSource)if(h)G=f.source;else{var J=f._canvas.el.getContext("2d",{willReadFrequently:!0}),N=J.getImageData(0,0,m,g).data;q=F(function(V,Y){var H=4*(Y*m+V);return[N[H],N[H+1],N[H+2],N[H+3]]}),G=q.toDataURL("image/png")}P.attr({"xlink:href":G,height:C,width:S,x:b,y:A})});t._promises.push(K)})}});var wIe=W((tYr,_Ie)=>{"use strict";var ZJt=gi();_Ie.exports=function(t){ZJt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var SIe=W((rYr,MIe)=>{"use strict";var TIe=Is(),AIe=tt(),yI=AIe.isArrayOrTypedArray,KJt=(j5(),Pt(yS));MIe.exports=function(t,r,i){var n=t.cd[0],a=n.trace,o=t.xa,s=t.ya;if(!(TIe.inbox(r-n.x0,r-(n.x0+n.w*a.dx),0)>0||TIe.inbox(i-n.y0,i-(n.y0+n.h*a.dy),0)>0)){var l=Math.floor((r-n.x0)/a.dx),u=Math.floor(Math.abs(i-n.y0)/a.dy),c;if(a._hasZ?c=n.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=n.hi||a.hoverinfo,h;if(f){var p=f.split("+");p.indexOf("all")!==-1&&(p=["color"]),p.indexOf("color")!==-1&&(h=!0)}var d=KJt.colormodel[a.colormodel],v=d.colormodel||a.colormodel,m=v.length,g=a._scaler(c),w=d.suffix,_=[];(a.hovertemplate||h)&&(_.push("["+[g[0]+w[0],g[1]+w[1],g[2]+w[2]].join(", ")),m===4&&_.push(", "+g[3]+w[3]),_.push("]"),_=_.join(""),t.extraText=v.toUpperCase()+": "+_);var b;yI(a.hovertext)&&yI(a.hovertext[u])?b=a.hovertext[u][l]:yI(a.text)&&yI(a.text[u])&&(b=a.text[u][l]);var M=s.c2p(n.y0+(u+.5)*a.dy),x=n.x0+(l+.5)*a.dx,A=n.y0+(u+.5)*a.dy,T="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[AIe.extendFlat(t,{index:[u,l],x0:o.c2p(n.x0+l*a.dx),x1:o.c2p(n.x0+(l+1)*a.dx),y0:M,y1:M,color:g,xVal:x,xLabelVal:x,yVal:A,yLabelVal:A,zLabelVal:T,text:b,hovertemplateLabels:{zLabel:T,colorLabel:_,"color[0]Label":g[0]+w[0],"color[1]Label":g[1]+w[1],"color[2]Label":g[2]+w[2],"color[3]Label":g[3]+w[3]}})]}}}});var kIe=W((iYr,EIe)=>{"use strict";EIe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var DIe=W((nYr,CIe)=>{"use strict";CIe.exports={attributes:(kX(),Pt(EX)).default,supplyDefaults:v8e(),calc:mIe(),plot:bIe(),style:wIe(),hoverPoints:SIe(),eventData:kIe(),moduleType:"trace",name:"image",basePlotModule:xl(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var LIe=W((aYr,FIe)=>{"use strict";FIe.exports=DIe()});var m_=W((oYr,IIe)=>{"use strict";var xI=Ja(),JJt=ds().attributes,QJt=jo(),eQt=Yl(),{hovertemplateAttrs:tQt,texttemplateAttrs:rQt,templatefallbackAttrs:PIe}=Wa(),M2=an().extendFlat,iQt=zu().pattern,bI=QJt({editType:"plot",arrayOk:!0,colorEditType:"plot"});IIe.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:eQt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:iQt,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:M2({},xI.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:tQt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:PIe(),texttemplate:rQt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:PIe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:M2({},bI,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:M2({},bI,{}),outsidetextfont:M2({},bI,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:M2({},xI.showlegend,{arrayOk:!0}),legend:M2({},xI.legend,{arrayOk:!0}),legendrank:M2({},xI.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:M2({},bI,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:JJt({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}});var y_=W((sYr,BIe)=>{"use strict";var nQt=hn(),aE=tt(),aQt=m_(),oQt=ds().defaults,sQt=I0().handleText,lQt=tt().coercePattern;function RIe(e,t){var r=aE.isArrayOrTypedArray(e),i=aE.isArrayOrTypedArray(t),n=Math.min(r?e.length:1/0,i?t.length:1/0);if(isFinite(n)||(n=0),n&&i){for(var a,o=0;o0){a=!0;break}}a||(n=0)}return{hasLabels:r,hasValues:i,len:n}}function zIe(e,t,r,i,n){var a=i("marker.line.width");a&&i("marker.line.color",n?void 0:r.paper_bgcolor);var o=i("marker.colors");lQt(i,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function uQt(e,t,r,i){function n(w,_){return aE.coerce(e,t,aQt,w,_)}var a=n("labels"),o=n("values"),s=RIe(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(n("label0"),n("dlabel")),!l){t.visible=!1;return}t._length=l,zIe(e,t,i,n,!0),n("scalegroup");var u=n("text"),c=n("texttemplate");n("texttemplatefallback");var f;if(c||(f=n("textinfo",aE.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),c||f&&f!=="none"){var h=n("textposition");sQt(e,t,i,n,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var p=Array.isArray(h)||h==="auto",d=p||h==="outside";d&&n("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&n("insidetextorientation")}else f==="none"&&n("textposition","none");oQt(t,i,n);var v=n("hole"),m=n("title.text");if(m){var g=n("title.position",v?"middle center":"top center");!v&&g==="middle center"&&(t.title.position="top center"),aE.coerceFont(n,"title.font",i.font)}n("sort"),n("direction"),n("rotation"),n("pull")}BIe.exports={handleLabelsAndValues:RIe,handleMarkerDefaults:zIe,supplyDefaults:uQt}});var _I=W((lYr,qIe)=>{"use strict";qIe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var NIe=W((uYr,OIe)=>{"use strict";var cQt=tt(),fQt=_I();OIe.exports=function(t,r){function i(n,a){return cQt.coerce(t,r,fQt,n,a)}i("hiddenlabels"),i("piecolorway",r.colorway),i("extendpiecolors")}});var y4=W((cYr,GIe)=>{"use strict";var hQt=hn(),m4=ti(),dQt={};function pQt(e,t){var r=[],i=e._fullLayout,n=i.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c=0});var b=t.type==="funnelarea"?v:t.sort;return b&&r.sort(function(M,x){return x.v-M.v}),r[0]&&(r[0].vTotal=d),r}function UIe(e){return function(r,i){if(!r||!m4.isValid(r))return!1;let n=m4.rgbaString(r);return e[i]||(e[i]=n),n}}function vQt(e,t){var r=(t||{}).type;r||(r="pie");var i=e._fullLayout,n=e.calcdata,a=i[r+"colorway"],o=i["_"+r+"colormap"];i["extend"+r+"colors"]&&(a=VIe(a,dQt));for(var s=0,l=0;l{"use strict";var gQt=ah().appendArrayMultiPointValues;HIe.exports=function(t,r){var i={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(i.pointNumber=i.i=t.pts[0]),gQt(i,r,t.pts),r.type==="funnelarea"&&(delete i.v,delete i.i),i}});var MI=W((hYr,hRe)=>{"use strict";var Jh=gi(),mQt=Qo(),wI=Is(),KIe=ti(),vm=Qi(),Pc=tt(),yQt=Pc.strScale,$Ie=Pc.strTranslate,IK=ao(),JIe=of(),xQt=JIe.recordMinTextSize,bQt=JIe.clearMinTextSize,QIe=(Qy(),Pt(Jy)).TEXTPAD,Rn=Gy(),TI=jIe(),WIe=tt().isValidTextValue;function _Qt(e,t){var r=e._context.staticPlot,i=e._fullLayout,n=i._size;bQt("pie",i),rRe(t,e),uRe(t,n);var a=Pc.makeTraceGroups(i._pielayer,t,"trace").each(function(o){var s=Jh.select(this),l=o[0],u=l.trace;DQt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=Jh.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(b,M){if(b.hidden){Jh.select(this).selectAll("path,g").remove();return}b.pointNumber=b.i,b.curveNumber=u.index,f[b.pxmid[1]<0?0:1][b.pxmid[0]<0?0:1].push(b);var x=l.cx,A=l.cy,T=Jh.select(this),y=T.selectAll("path.surface").data([b]);if(y.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),T.call(eRe,e,o),u.pull){var E=+Rn.castOption(u.pull,b.pts)||0;E>0&&(x+=E*b.pxmid[0],A+=E*b.pxmid[1])}b.cxFinal=x,b.cyFinal=A;function S(L,I,B,O){var $=O*(I[0]-L[0]),X=O*(I[1]-L[1]);return"a"+O*l.r+","+O*l.r+" 0 "+b.largeArc+(B?" 1 ":" 0 ")+$+","+X}var C=u.hole;if(b.v===l.vTotal){var k="M"+(x+b.px0[0])+","+(A+b.px0[1])+S(b.px0,b.pxmid,!0,1)+S(b.pxmid,b.px0,!0,1)+"Z";C?y.attr("d","M"+(x+C*b.px0[0])+","+(A+C*b.px0[1])+S(b.px0,b.pxmid,!1,C)+S(b.pxmid,b.px0,!1,C)+"Z"+k):y.attr("d",k)}else{var D=S(b.px0,b.px1,!0,1);if(C){var F=1-C;y.attr("d","M"+(x+C*b.px1[0])+","+(A+C*b.px1[1])+S(b.px1,b.px0,!1,C)+"l"+F*b.px0[0]+","+F*b.px0[1]+D+"Z")}else y.attr("d","M"+x+","+A+"l"+b.px0[0]+","+b.px0[1]+D+"Z")}cRe(e,b,l);var P=Rn.castOption(u.textposition,b.pts),R=T.selectAll("g.slicetext").data(b.text&&P!=="none"?[0]:[]);R.enter().append("g").classed("slicetext",!0),R.exit().remove(),R.each(function(){var L=Pc.ensureSingle(Jh.select(this),"text","",function(q){q.attr("data-notex",1)}),I=Pc.ensureUniformFontSize(e,P==="outside"?TQt(u,b,i.font):tRe(u,b,i.font));L.text(b.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(vm.font,I).call(IK.convertToTspans,e);var B=vm.bBox(L.node()),O;if(P==="outside")O=ZIe(B,b);else if(O=iRe(B,b,l),P==="auto"&&O.scale<1){var $=Pc.ensureUniformFontSize(e,u.outsidetextfont);L.call(vm.font,$),B=vm.bBox(L.node()),O=ZIe(B,b)}var X=O.textPosAngle,K=X===void 0?b.pxmid:AI(l.r,X);if(O.targetX=x+K[0]*O.rCenter+(O.x||0),O.targetY=A+K[1]*O.rCenter+(O.y||0),fRe(O,B),O.outside){var G=O.targetY;b.yLabelMin=G-B.height/2,b.yLabelMid=G,b.yLabelMax=G+B.height/2,b.labelExtraX=0,b.labelExtraY=0,h=!0}O.fontSize=I.size,xQt(u.type,O,i),o[M].transform=O,Pc.setTransormAndDisplay(L,O)})});var p=Jh.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(p.enter().append("g").classed("titletext",!0),p.exit().remove(),p.each(function(){var b=Pc.ensureSingle(Jh.select(this),"text","",function(A){A.attr("data-notex",1)}),M=u.title.text;u._meta&&(M=Pc.templateString(M,u._meta)),b.text(M).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(vm.font,u.title.font).call(IK.convertToTspans,e);var x;u.title.position==="middle center"?x=SQt(l):x=sRe(l,n),b.attr("transform",$Ie(x.x,x.y)+yQt(Math.min(1,x.scale))+$Ie(x.tx,x.ty))}),h&&kQt(f,u),wQt(c,u),h&&u.automargin){var d=vm.bBox(s.node()),v=u.domain,m=n.w*(v.x[1]-v.x[0]),g=n.h*(v.y[1]-v.y[0]),w=(.5*m-l.r)/n.w,_=(.5*g-l.r)/n.h;mQt.autoMargin(e,"pie."+u.uid+".automargin",{xl:v.x[0]-w,xr:v.x[1]+w,yb:v.y[0]-_,yt:v.y[1]+_,l:Math.max(l.cx-l.r-d.left,0),r:Math.max(d.right-(l.cx+l.r),0),b:Math.max(d.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-d.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Jh.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function wQt(e,t){e.each(function(r){var i=Jh.select(this);if(!r.labelExtraX&&!r.labelExtraY){i.select("path.textline").remove();return}var n=i.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,Pc.setTransormAndDisplay(n,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;Pc.ensureSingle(i,"path","textline").call(KIe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function eRe(e,t,r){var i=r[0],n=i.cx,a=i.cy,o=i.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=wI.castHoverinfo({hoverinfo:[Rn.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,p=n+l.pxmid[0]*(1-h),d=a+l.pxmid[1]*(1-h),v=u.separators,m=[];if(f&&f.indexOf("label")!==-1&&m.push(l.label),l.text=Rn.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var g=l.text;Pc.isValidTextValue(g)&&m.push(g)}l.value=l.v,l.valueLabel=Rn.formatPieValue(l.v,v),f&&f.indexOf("value")!==-1&&m.push(l.valueLabel),l.percent=l.v/i.vTotal,l.percentLabel=Rn.formatPiePercent(l.percent,v),f&&f.indexOf("percent")!==-1&&m.push(l.percentLabel);var w=c.hoverlabel,_=w.font,b=[];wI.loneHover({trace:o,x0:p-h*i.r,x1:p+h*i.r,y:d,_x0:s?n+l.TL[0]:p-h*i.r,_x1:s?n+l.TR[0]:p+h*i.r,_y0:s?a+l.TL[1]:d-h*i.r,_y1:s?a+l.BL[1]:d+h*i.r,text:m.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Rn.castOption(w.bgcolor,l.pts)||l.color,borderColor:Rn.castOption(w.bordercolor,l.pts),fontFamily:Rn.castOption(_.family,l.pts),fontSize:Rn.castOption(_.size,l.pts),fontColor:Rn.castOption(_.color,l.pts),nameLength:Rn.castOption(w.namelength,l.pts),textAlign:Rn.castOption(w.align,l.pts),hovertemplate:Rn.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[TI(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:b}),l.bbox=b[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[TI(l,c)],event:Jh.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Jh.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Jh.event,t.emit("plotly_unhover",{points:[TI(f,c)],event:Jh.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(wI.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[TI(l,c)],wI.click(t,Jh.event))})}function TQt(e,t,r){var i=Rn.castOption(e.outsidetextfont.color,t.pts)||Rn.castOption(e.textfont.color,t.pts)||r.color,n=Rn.castOption(e.outsidetextfont.family,t.pts)||Rn.castOption(e.textfont.family,t.pts)||r.family,a=Rn.castOption(e.outsidetextfont.size,t.pts)||Rn.castOption(e.textfont.size,t.pts)||r.size,o=Rn.castOption(e.outsidetextfont.weight,t.pts)||Rn.castOption(e.textfont.weight,t.pts)||r.weight,s=Rn.castOption(e.outsidetextfont.style,t.pts)||Rn.castOption(e.textfont.style,t.pts)||r.style,l=Rn.castOption(e.outsidetextfont.variant,t.pts)||Rn.castOption(e.textfont.variant,t.pts)||r.variant,u=Rn.castOption(e.outsidetextfont.textcase,t.pts)||Rn.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Rn.castOption(e.outsidetextfont.lineposition,t.pts)||Rn.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Rn.castOption(e.outsidetextfont.shadow,t.pts)||Rn.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i,family:n,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function tRe(e,t,r){var i=Rn.castOption(e.insidetextfont.color,t.pts);!i&&e._input.textfont&&(i=Rn.castOption(e._input.textfont.color,t.pts));var n=Rn.castOption(e.insidetextfont.family,t.pts)||Rn.castOption(e.textfont.family,t.pts)||r.family,a=Rn.castOption(e.insidetextfont.size,t.pts)||Rn.castOption(e.textfont.size,t.pts)||r.size,o=Rn.castOption(e.insidetextfont.weight,t.pts)||Rn.castOption(e.textfont.weight,t.pts)||r.weight,s=Rn.castOption(e.insidetextfont.style,t.pts)||Rn.castOption(e.textfont.style,t.pts)||r.style,l=Rn.castOption(e.insidetextfont.variant,t.pts)||Rn.castOption(e.textfont.variant,t.pts)||r.variant,u=Rn.castOption(e.insidetextfont.textcase,t.pts)||Rn.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Rn.castOption(e.insidetextfont.lineposition,t.pts)||Rn.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Rn.castOption(e.insidetextfont.shadow,t.pts)||Rn.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i||KIe.contrast(t.color),family:n,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function rRe(e,t){for(var r,i,n=0;n=-4;w-=2)g(Math.PI*w,"tan");for(w=4;w>=-4;w-=2)g(Math.PI*(w+1),"tan")}if(f||p){for(w=4;w>=-4;w-=2)g(Math.PI*(w+1.5),"rad");for(w=4;w>=-4;w-=2)g(Math.PI*(w+.5),"rad")}}if(s||d||f){var _=Math.sqrt(e.width*e.width+e.height*e.height);if(m={scale:n*i*2/_,rCenter:1-n,rotate:0},m.textPosAngle=(t.startangle+t.stopangle)/2,m.scale>=1)return m;v.push(m)}(d||p)&&(m=YIe(e,i,o,l,u),m.textPosAngle=(t.startangle+t.stopangle)/2,v.push(m)),(d||h)&&(m=XIe(e,i,o,l,u),m.textPosAngle=(t.startangle+t.stopangle)/2,v.push(m));for(var b=0,M=0,x=0;x=1)break}return v[b]}function AQt(e,t){var r=e.startangle,i=e.stopangle;return r>t&&t>i||r0?1:-1)/2,y:a/(1+r*r/(i*i)),outside:!0}}function SQt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function sRe(e,t){var r=1,i=1,n,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,n=lRe(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+n)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+n)*e.r);var l=EQt(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+n)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+n)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,i=RK(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,i),tx:s.tx,ty:s.ty}}function EQt(e,t){return e/(t===void 0?1:t)}function RK(e,t){var r=e.trace,i=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,i/2)}function lRe(e){var t=e.pull;if(!t)return 0;var r;if(Pc.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function kQt(e,t){var r,i,n,a,o,s,l,u,c,f,h,p,d;function v(_,b){return _.pxmid[1]-b.pxmid[1]}function m(_,b){return b.pxmid[1]-_.pxmid[1]}function g(_,b){b||(b={});var M=b.labelExtraY+(i?b.yLabelMax:b.yLabelMin),x=i?_.yLabelMin:_.yLabelMax,A=i?_.yLabelMax:_.yLabelMin,T=_.cyFinal+o(_.px0[1],_.px1[1]),y=M-x,E,S,C,k,D,F;if(y*l>0&&(_.labelExtraY=y),!!Pc.isArrayOrTypedArray(t.pull))for(S=0;S=(Rn.castOption(t.pull,C.pts)||0))&&((_.pxmid[1]-C.pxmid[1])*l>0?(k=C.cyFinal+o(C.px0[1],C.px1[1]),y=k-x-_.labelExtraY,y*l>0&&(_.labelExtraY+=y)):(A+_.labelExtraY-T)*l>0&&(E=3*s*Math.abs(S-f.indexOf(_)),D=C.cxFinal+a(C.px0[0],C.px1[0]),F=D+E-(_.cxFinal+_.pxmid[0])-_.labelExtraX,F*s>0&&(_.labelExtraX+=F)))}for(i=0;i<2;i++)for(n=i?v:m,o=i?Math.max:Math.min,l=i?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[i][r],u.sort(n),c=e[1-i][r],f=c.concat(u),p=[],h=0;h1?(u=r.r,c=u/n.aspectratio):(c=r.r,u=c*n.aspectratio),u*=(1+n.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(i=0;it.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-i.hole,u.rInscribed=MQt(u,t))}function AI(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function cRe(e,t,r){var i=e._fullLayout,n=r.trace,a=n.texttemplate,o=n.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(b){return s.indexOf(b)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),p=i.separators,d;if(d=u?[t.label]:[],c){var v=Rn.getFirstFilled(n.text,t.pts);WIe(v)&&d.push(v)}f&&d.push(Rn.formatPieValue(t.v,p)),h&&d.push(Rn.formatPiePercent(t.v/r.vTotal,p)),t.text=d.join("
")}function m(b){return{label:b.label,value:b.v,valueLabel:Rn.formatPieValue(b.v,i.separators),percent:b.v/r.vTotal,percentLabel:Rn.formatPiePercent(b.v/r.vTotal,i.separators),color:b.color,text:b.text,customdata:Pc.castOption(n,b.i,"customdata")}}if(a){var g=Pc.castOption(n,t.i,"texttemplate");if(!g)t.text="";else{var w=m(t),_=Rn.getFirstFilled(n.text,t.pts);(WIe(_)||_==="")&&(w.text=_),t.text=Pc.texttemplateString({data:[w,n._meta],fallback:n.texttemplatefallback,labels:w,locale:e._fullLayout._d3locale,template:g})}}}function fRe(e,t){var r=e.rotate*Math.PI/180,i=Math.cos(r),n=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*i-o*n,e.textY=a*n+o*i,e.noCenter=!0}hRe.exports={plot:_Qt,formatSliceLabel:cRe,transformInsideText:iRe,determineInsideTextFont:tRe,positionTitleOutside:sRe,prerenderTitles:rRe,layoutAreas:uRe,attachFxHandlers:eRe,computeTransform:fRe}});var vRe=W((dYr,pRe)=>{"use strict";var dRe=gi(),FQt=Nw(),LQt=of().resizeText;pRe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");LQt(t,r,"pie"),r.each(function(i){var n=i[0],a=n.trace,o=dRe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){dRe.select(this).call(FQt,s,a,t)})})}});var mRe=W(x4=>{"use strict";var gRe=Qo();x4.name="pie";x4.plot=function(e,t,r,i){gRe.plotBasePlot(x4.name,e,t,r,i)};x4.clean=function(e,t,r,i){gRe.cleanBasePlot(x4.name,e,t,r,i)}});var xRe=W((vYr,yRe)=>{"use strict";yRe.exports={attributes:m_(),supplyDefaults:y_().supplyDefaults,supplyLayoutDefaults:NIe(),layoutAttributes:_I(),calc:y4().calc,crossTraceCalc:y4().crossTraceCalc,plot:MI().plot,style:vRe(),styleOne:Nw(),moduleType:"trace",name:"pie",basePlotModule:mRe(),categories:["pie-like","pie","showLegend"],meta:{}}});var _Re=W((gYr,bRe)=>{"use strict";bRe.exports=xRe()});var TRe=W(b4=>{"use strict";var wRe=Qo();b4.name="sunburst";b4.plot=function(e,t,r,i){wRe.plotBasePlot(b4.name,e,t,r,i)};b4.clean=function(e,t,r,i){wRe.cleanBasePlot(b4.name,e,t,r,i)}});var zK={};Jn(zK,{CLICK_TRANSITION_EASING:()=>IQt,CLICK_TRANSITION_TIME:()=>PQt,eventDataKeys:()=>RQt});var PQt,IQt,RQt,BK=Ci(()=>{"use strict";PQt=750,IQt="linear",RQt=["currentPath","root","entry","percentRoot","percentEntry","percentParent"]});var sE=W((yYr,SRe)=>{"use strict";var zQt=Ja(),{hovertemplateAttrs:BQt,texttemplateAttrs:qQt,templatefallbackAttrs:ARe}=Wa(),OQt=Fo(),NQt=ds().attributes,gm=m_(),MRe=(BK(),Pt(zK)),oE=an().extendFlat,UQt=zu().pattern;SRe.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:oE({colors:{valType:"data_array",editType:"calc"},line:{color:oE({},gm.marker.line.color,{dflt:null}),width:oE({},gm.marker.line.width,{dflt:1}),editType:"calc"},pattern:UQt,editType:"calc"},OQt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:gm.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:qQt({editType:"plot"},{keys:MRe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:ARe({editType:"plot"}),hovertext:gm.hovertext,hoverinfo:oE({},zQt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:BQt({},{keys:MRe.eventDataKeys}),hovertemplatefallback:ARe(),textfont:gm.textfont,insidetextorientation:gm.insidetextorientation,insidetextfont:gm.insidetextfont,outsidetextfont:oE({},gm.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:gm.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:NQt({name:"sunburst",trace:!0,editType:"calc"})}});var qK=W((xYr,ERe)=>{"use strict";ERe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var FRe=W((bYr,DRe)=>{"use strict";var kRe=tt(),VQt=sE(),GQt=ds().defaults,HQt=I0().handleText,jQt=y_().handleMarkerDefaults,CRe=es(),$Qt=CRe.hasColorscale,WQt=CRe.handleDefaults;DRe.exports=function(t,r,i,n){function a(h,p){return kRe.coerce(t,r,VQt,h,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),jQt(t,r,n,a);var u=r._hasColorscale=$Qt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&WQt(t,r,n,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",kRe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";HQt(t,r,n,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),GQt(r,n,a),r._length=null}});var PRe=W((_Yr,LRe)=>{"use strict";var YQt=tt(),XQt=qK();LRe.exports=function(t,r){function i(n,a){return YQt.coerce(t,r,XQt,n,a)}i("sunburstcolorway",r.colorway),i("extendsunburstcolors")}});var lE=W((SI,IRe)=>{(function(e,t){typeof SI=="object"&&typeof IRe!="undefined"?t(SI):(e=e||self,t(e.d3=e.d3||{}))})(SI,function(e){"use strict";function t(Oe,Ue){return Oe.parent===Ue.parent?1:2}function r(Oe){return Oe.reduce(i,0)/Oe.length}function i(Oe,Ue){return Oe+Ue.x}function n(Oe){return 1+Oe.reduce(a,0)}function a(Oe,Ue){return Math.max(Oe,Ue.y)}function o(Oe){for(var Ue;Ue=Oe.children;)Oe=Ue[0];return Oe}function s(Oe){for(var Ue;Ue=Oe.children;)Oe=Ue[Ue.length-1];return Oe}function l(){var Oe=t,Ue=1,je=1,$e=!1;function Ie(Ve){var st,_t=0;Ve.eachAfter(function(Ot){var Jt=Ot.children;Jt?(Ot.x=r(Jt),Ot.y=n(Jt)):(Ot.x=st?_t+=Oe(Ot,st):0,Ot.y=0,st=Ot)});var Wt=o(Ve),Ht=s(Ve),fr=Wt.x-Oe(Wt,Ht)/2,lr=Ht.x+Oe(Ht,Wt)/2;return Ve.eachAfter($e?function(Ot){Ot.x=(Ot.x-Ve.x)*Ue,Ot.y=(Ve.y-Ot.y)*je}:function(Ot){Ot.x=(Ot.x-fr)/(lr-fr)*Ue,Ot.y=(1-(Ve.y?Ot.y/Ve.y:1))*je})}return Ie.separation=function(Ve){return arguments.length?(Oe=Ve,Ie):Oe},Ie.size=function(Ve){return arguments.length?($e=!1,Ue=+Ve[0],je=+Ve[1],Ie):$e?null:[Ue,je]},Ie.nodeSize=function(Ve){return arguments.length?($e=!0,Ue=+Ve[0],je=+Ve[1],Ie):$e?[Ue,je]:null},Ie}function u(Oe){var Ue=0,je=Oe.children,$e=je&&je.length;if(!$e)Ue=1;else for(;--$e>=0;)Ue+=je[$e].value;Oe.value=Ue}function c(){return this.eachAfter(u)}function f(Oe){var Ue=this,je,$e=[Ue],Ie,Ve,st;do for(je=$e.reverse(),$e=[];Ue=je.pop();)if(Oe(Ue),Ie=Ue.children,Ie)for(Ve=0,st=Ie.length;Ve=0;--Ie)je.push($e[Ie]);return this}function p(Oe){for(var Ue=this,je=[Ue],$e=[],Ie,Ve,st;Ue=je.pop();)if($e.push(Ue),Ie=Ue.children,Ie)for(Ve=0,st=Ie.length;Ve=0;)je+=$e[Ie].value;Ue.value=je})}function v(Oe){return this.eachBefore(function(Ue){Ue.children&&Ue.children.sort(Oe)})}function m(Oe){for(var Ue=this,je=g(Ue,Oe),$e=[Ue];Ue!==je;)Ue=Ue.parent,$e.push(Ue);for(var Ie=$e.length;Oe!==je;)$e.splice(Ie,0,Oe),Oe=Oe.parent;return $e}function g(Oe,Ue){if(Oe===Ue)return Oe;var je=Oe.ancestors(),$e=Ue.ancestors(),Ie=null;for(Oe=je.pop(),Ue=$e.pop();Oe===Ue;)Ie=Oe,Oe=je.pop(),Ue=$e.pop();return Ie}function w(){for(var Oe=this,Ue=[Oe];Oe=Oe.parent;)Ue.push(Oe);return Ue}function _(){var Oe=[];return this.each(function(Ue){Oe.push(Ue)}),Oe}function b(){var Oe=[];return this.eachBefore(function(Ue){Ue.children||Oe.push(Ue)}),Oe}function M(){var Oe=this,Ue=[];return Oe.each(function(je){je!==Oe&&Ue.push({source:je.parent,target:je})}),Ue}function x(Oe,Ue){var je=new S(Oe),$e=+Oe.value&&(je.value=Oe.value),Ie,Ve=[je],st,_t,Wt,Ht;for(Ue==null&&(Ue=T);Ie=Ve.pop();)if($e&&(Ie.value=+Ie.data.value),(_t=Ue(Ie.data))&&(Ht=_t.length))for(Ie.children=new Array(Ht),Wt=Ht-1;Wt>=0;--Wt)Ve.push(st=Ie.children[Wt]=new S(_t[Wt])),st.parent=Ie,st.depth=Ie.depth+1;return je.eachBefore(E)}function A(){return x(this).eachBefore(y)}function T(Oe){return Oe.children}function y(Oe){Oe.data=Oe.data.data}function E(Oe){var Ue=0;do Oe.height=Ue;while((Oe=Oe.parent)&&Oe.height<++Ue)}function S(Oe){this.data=Oe,this.depth=this.height=0,this.parent=null}S.prototype=x.prototype={constructor:S,count:c,each:f,eachAfter:p,eachBefore:h,sum:d,sort:v,path:m,ancestors:w,descendants:_,leaves:b,links:M,copy:A};var C=Array.prototype.slice;function k(Oe){for(var Ue=Oe.length,je,$e;Ue;)$e=Math.random()*Ue--|0,je=Oe[Ue],Oe[Ue]=Oe[$e],Oe[$e]=je;return Oe}function D(Oe){for(var Ue=0,je=(Oe=k(C.call(Oe))).length,$e=[],Ie,Ve;Ue0&&je*je>$e*$e+Ie*Ie}function L(Oe,Ue){for(var je=0;jeWt?(Ie=(Ht+Wt-Ve)/(2*Ht),_t=Math.sqrt(Math.max(0,Wt/Ht-Ie*Ie)),je.x=Oe.x-Ie*$e-_t*st,je.y=Oe.y-Ie*st+_t*$e):(Ie=(Ht+Ve-Wt)/(2*Ht),_t=Math.sqrt(Math.max(0,Ve/Ht-Ie*Ie)),je.x=Ue.x+Ie*$e-_t*st,je.y=Ue.y+Ie*st+_t*$e)):(je.x=Ue.x+je.r,je.y=Ue.y)}function K(Oe,Ue){var je=Oe.r+Ue.r-1e-6,$e=Ue.x-Oe.x,Ie=Ue.y-Oe.y;return je>0&&je*je>$e*$e+Ie*Ie}function G(Oe){var Ue=Oe._,je=Oe.next._,$e=Ue.r+je.r,Ie=(Ue.x*je.r+je.x*Ue.r)/$e,Ve=(Ue.y*je.r+je.y*Ue.r)/$e;return Ie*Ie+Ve*Ve}function q(Oe){this._=Oe,this.next=null,this.previous=null}function J(Oe){if(!(Ie=Oe.length))return 0;var Ue,je,$e,Ie,Ve,st,_t,Wt,Ht,fr,lr;if(Ue=Oe[0],Ue.x=0,Ue.y=0,!(Ie>1))return Ue.r;if(je=Oe[1],Ue.x=-je.r,je.x=Ue.r,je.y=0,!(Ie>2))return Ue.r+je.r;X(je,Ue,$e=Oe[2]),Ue=new q(Ue),je=new q(je),$e=new q($e),Ue.next=$e.previous=je,je.next=Ue.previous=$e,$e.next=je.previous=Ue;e:for(_t=3;_t0)throw new Error("cycle");return _t}return je.id=function($e){return arguments.length?(Oe=Y($e),je):Oe},je.parentId=function($e){return arguments.length?(Ue=Y($e),je):Ue},je}function re(Oe,Ue){return Oe.parent===Ue.parent?1:2}function pe(Oe){var Ue=Oe.children;return Ue?Ue[0]:Oe.t}function Te(Oe){var Ue=Oe.children;return Ue?Ue[Ue.length-1]:Oe.t}function Ce(Oe,Ue,je){var $e=je/(Ue.i-Oe.i);Ue.c-=$e,Ue.s+=je,Oe.c+=$e,Ue.z+=je,Ue.m+=je}function ze(Oe){for(var Ue=0,je=0,$e=Oe.children,Ie=$e.length,Ve;--Ie>=0;)Ve=$e[Ie],Ve.z+=Ue,Ve.m+=Ue,Ue+=Ve.s+(je+=Ve.c)}function we(Oe,Ue,je){return Oe.a.parent===Ue.parent?Oe.a:je}function me(Oe,Ue){this._=Oe,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ue}me.prototype=Object.create(S.prototype);function Le(Oe){for(var Ue=new me(Oe,0),je,$e=[Ue],Ie,Ve,st,_t;je=$e.pop();)if(Ve=je._.children)for(je.children=new Array(_t=Ve.length),st=_t-1;st>=0;--st)$e.push(Ie=je.children[st]=new me(Ve[st],st)),Ie.parent=je;return(Ue.parent=new me(null,0)).children=[Ue],Ue}function Ne(){var Oe=re,Ue=1,je=1,$e=null;function Ie(Ht){var fr=Le(Ht);if(fr.eachAfter(Ve),fr.parent.m=-fr.z,fr.eachBefore(st),$e)Ht.eachBefore(Wt);else{var lr=Ht,Ot=Ht,Jt=Ht;Ht.eachBefore(function(gt){gt.xOt.x&&(Ot=gt),gt.depth>Jt.depth&&(Jt=gt)});var Cr=lr===Ot?1:Oe(lr,Ot)/2,Ge=Cr-lr.x,Qe=Ue/(Ot.x+Cr+Ge),nt=je/(Jt.depth||1);Ht.eachBefore(function(gt){gt.x=(gt.x+Ge)*Qe,gt.y=gt.depth*nt})}return Ht}function Ve(Ht){var fr=Ht.children,lr=Ht.parent.children,Ot=Ht.i?lr[Ht.i-1]:null;if(fr){ze(Ht);var Jt=(fr[0].z+fr[fr.length-1].z)/2;Ot?(Ht.z=Ot.z+Oe(Ht._,Ot._),Ht.m=Ht.z-Jt):Ht.z=Jt}else Ot&&(Ht.z=Ot.z+Oe(Ht._,Ot._));Ht.parent.A=_t(Ht,Ot,Ht.parent.A||lr[0])}function st(Ht){Ht._.x=Ht.z+Ht.parent.m,Ht.m+=Ht.parent.m}function _t(Ht,fr,lr){if(fr){for(var Ot=Ht,Jt=Ht,Cr=fr,Ge=Ot.parent.children[0],Qe=Ot.m,nt=Jt.m,gt=Cr.m,ht=Ge.m,Ft;Cr=Te(Cr),Ot=pe(Ot),Cr&&Ot;)Ge=pe(Ge),Jt=Te(Jt),Jt.a=Ht,Ft=Cr.z+gt-Ot.z-Qe+Oe(Cr._,Ot._),Ft>0&&(Ce(we(Cr,Ht,lr),Ht,Ft),Qe+=Ft,nt+=Ft),gt+=Cr.m,Qe+=Ot.m,ht+=Ge.m,nt+=Jt.m;Cr&&!Te(Jt)&&(Jt.t=Cr,Jt.m+=gt-nt),Ot&&!pe(Ge)&&(Ge.t=Ot,Ge.m+=Qe-ht,lr=Ht)}return lr}function Wt(Ht){Ht.x*=Ue,Ht.y=Ht.depth*je}return Ie.separation=function(Ht){return arguments.length?(Oe=Ht,Ie):Oe},Ie.size=function(Ht){return arguments.length?($e=!1,Ue=+Ht[0],je=+Ht[1],Ie):$e?null:[Ue,je]},Ie.nodeSize=function(Ht){return arguments.length?($e=!0,Ue=+Ht[0],je=+Ht[1],Ie):$e?[Ue,je]:null},Ie}function Je(Oe,Ue,je,$e,Ie){for(var Ve=Oe.children,st,_t=-1,Wt=Ve.length,Ht=Oe.value&&(Ie-je)/Oe.value;++_tgt&&(gt=Ht),Ut=Qe*Qe*hr,ht=Math.max(gt/Ut,Ut/nt),ht>Ft){Qe-=Ht;break}Ft=ht}st.push(Wt={value:Qe,dice:Jt1?$e:1)},je})(rt);function St(){var Oe=dt,Ue=!1,je=1,$e=1,Ie=[0],Ve=H,st=H,_t=H,Wt=H,Ht=H;function fr(Ot){return Ot.x0=Ot.y0=0,Ot.x1=je,Ot.y1=$e,Ot.eachBefore(lr),Ie=[0],Ue&&Ot.eachBefore(xe),Ot}function lr(Ot){var Jt=Ie[Ot.depth],Cr=Ot.x0+Jt,Ge=Ot.y0+Jt,Qe=Ot.x1-Jt,nt=Ot.y1-Jt;Qe=Ot-1){var gt=Ve[lr];gt.x0=Cr,gt.y0=Ge,gt.x1=Qe,gt.y1=nt;return}for(var ht=Ht[lr],Ft=Jt/2+ht,hr=lr+1,Ut=Ot-1;hr>>1;Ht[Lr]nt-Ge){var Fr=(Cr*ii+Qe*jr)/Jt;fr(lr,hr,jr,Cr,Ge,Fr,nt),fr(hr,Ot,ii,Fr,Ge,Qe,nt)}else{var Ii=(Ge*ii+nt*jr)/Jt;fr(lr,hr,jr,Cr,Ge,Qe,Ii),fr(hr,Ot,ii,Cr,Ii,Qe,nt)}}}function bt(Oe,Ue,je,$e,Ie){(Oe.depth&1?Je:ce)(Oe,Ue,je,$e,Ie)}var pt=(function Oe(Ue){function je($e,Ie,Ve,st,_t){if((Wt=$e._squarify)&&Wt.ratio===Ue)for(var Wt,Ht,fr,lr,Ot=-1,Jt,Cr=Wt.length,Ge=$e.value;++Ot1?$e:1)},je})(rt);e.cluster=l,e.hierarchy=x,e.pack=te,e.packEnclose=D,e.packSiblings=N,e.partition=oe,e.stratify=_e,e.tree=Ne,e.treemap=St,e.treemapBinary=Ke,e.treemapDice=ce,e.treemapResquarify=pt,e.treemapSlice=Je,e.treemapSliceDice=bt,e.treemapSquarify=dt,Object.defineProperty(e,"__esModule",{value:!0})})});var cE=W(uE=>{"use strict";var RRe=lE(),ZQt=hn(),_4=tt(),KQt=es().makeColorScaleFuncFromTrace,JQt=y4().makePullColorFn,QQt=y4().generateExtendedColors,eer=es().calc,ter=(ra(),Pt(ia)).ALMOST_EQUAL,rer={},ier={},ner={};uE.calc=function(e,t){var r=e._fullLayout,i=t.ids,n=_4.isArrayOrTypedArray(i),a=t.labels,o=t.parents,s=t.values,l=_4.isArrayOrTypedArray(s),u=[],c={},f={},h=function(R,L){c[R]?c[R].push(L):c[R]=[L],f[L]=1},p=function(R){return R||typeof R=="number"},d=function(R){return!l||ZQt(s[R])&&s[R]>=0},v,m,g;n?(v=Math.min(i.length,o.length),m=function(R){return p(i[R])&&d(R)},g=function(R){return String(i[R])}):(v=Math.min(a.length,o.length),m=function(R){return p(a[R])&&d(R)},g=function(R){return String(a[R])}),l&&(v=Math.min(v,s.length));for(var w=0;w1){for(var T=_4.randstr(),y=0;y{});function j1(){}function qRe(){return this.rgb().formatHex()}function her(){return this.rgb().formatHex8()}function der(){return jRe(this).formatHsl()}function ORe(){return this.rgb().formatRgb()}function k2(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=aer.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?NRe(t):r===3?new Gu(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?kI(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?kI(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=oer.exec(e))?new Gu(t[1],t[2],t[3],1):(t=ser.exec(e))?new Gu(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ler.exec(e))?kI(t[1],t[2],t[3],t[4]):(t=uer.exec(e))?kI(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cer.exec(e))?GRe(t[1],t[2]/100,t[3]/100,1):(t=fer.exec(e))?GRe(t[1],t[2]/100,t[3]/100,t[4]):BRe.hasOwnProperty(e)?NRe(BRe[e]):e==="transparent"?new Gu(NaN,NaN,NaN,0):null}function NRe(e){return new Gu(e>>16&255,e>>8&255,e&255,1)}function kI(e,t,r,i){return i<=0&&(e=t=r=NaN),new Gu(e,t,r,i)}function hE(e){return e instanceof j1||(e=k2(e)),e?(e=e.rgb(),new Gu(e.r,e.g,e.b,e.opacity)):new Gu}function T4(e,t,r,i){return arguments.length===1?hE(e):new Gu(e,t,r,i==null?1:i)}function Gu(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function URe(){return`#${x_(this.r)}${x_(this.g)}${x_(this.b)}`}function per(){return`#${x_(this.r)}${x_(this.g)}${x_(this.b)}${x_((isNaN(this.opacity)?1:this.opacity)*255)}`}function VRe(){let e=DI(this.opacity);return`${e===1?"rgb(":"rgba("}${b_(this.r)}, ${b_(this.g)}, ${b_(this.b)}${e===1?")":`, ${e})`}`}function DI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function b_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function x_(e){return e=b_(e),(e<16?"0":"")+e.toString(16)}function GRe(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new xv(e,t,r,i)}function jRe(e){if(e instanceof xv)return new xv(e.h,e.s,e.l,e.opacity);if(e instanceof j1||(e=k2(e)),!e)return new xv;if(e instanceof xv)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r0&&l<1?0:o,new xv(o,s,l,e.opacity)}function dE(e,t,r,i){return arguments.length===1?jRe(e):new xv(e,t,r,i==null?1:i)}function xv(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function HRe(e){return e=(e||0)%360,e<0?e+360:e}function CI(e){return Math.max(0,Math.min(1,e||0))}function OK(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var E2,__,w4,fE,H1,aer,oer,ser,ler,uer,cer,fer,BRe,FI=Ci(()=>{EI();E2=.7,__=1/E2,w4="\\s*([+-]?\\d+)\\s*",fE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",H1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aer=/^#([0-9a-f]{3,8})$/,oer=new RegExp(`^rgb\\(${w4},${w4},${w4}\\)$`),ser=new RegExp(`^rgb\\(${H1},${H1},${H1}\\)$`),ler=new RegExp(`^rgba\\(${w4},${w4},${w4},${fE}\\)$`),uer=new RegExp(`^rgba\\(${H1},${H1},${H1},${fE}\\)$`),cer=new RegExp(`^hsl\\(${fE},${H1},${H1}\\)$`),fer=new RegExp(`^hsla\\(${fE},${H1},${H1},${fE}\\)$`),BRe={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};mm(j1,k2,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:qRe,formatHex:qRe,formatHex8:her,formatHsl:der,formatRgb:ORe,toString:ORe});mm(Gu,T4,S2(j1,{brighter(e){return e=e==null?__:Math.pow(__,e),new Gu(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?E2:Math.pow(E2,e),new Gu(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gu(b_(this.r),b_(this.g),b_(this.b),DI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:URe,formatHex:URe,formatHex8:per,formatRgb:VRe,toString:VRe}));mm(xv,dE,S2(j1,{brighter(e){return e=e==null?__:Math.pow(__,e),new xv(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?E2:Math.pow(E2,e),new xv(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Gu(OK(e>=240?e-240:e+120,n,i),OK(e,n,i),OK(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new xv(HRe(this.h),CI(this.s),CI(this.l),DI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=DI(this.opacity);return`${e===1?"hsl(":"hsla("}${HRe(this.h)}, ${CI(this.s)*100}%, ${CI(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var LI,PI,NK=Ci(()=>{LI=Math.PI/180,PI=180/Math.PI});function KRe(e){if(e instanceof $1)return new $1(e.l,e.a,e.b,e.opacity);if(e instanceof ym)return JRe(e);e instanceof Gu||(e=hE(e));var t=HK(e.r),r=HK(e.g),i=HK(e.b),n=UK((.2225045*t+.7168786*r+.0606169*i)/WRe),a,o;return t===r&&r===i?a=o=n:(a=UK((.4360747*t+.3850649*r+.1430804*i)/$Re),o=UK((.0139322*t+.0971045*r+.7141733*i)/YRe)),new $1(116*n-16,500*(a-n),200*(n-o),e.opacity)}function M4(e,t,r,i){return arguments.length===1?KRe(e):new $1(e,t,r,i==null?1:i)}function $1(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function UK(e){return e>ver?Math.pow(e,1/3):e/ZRe+XRe}function VK(e){return e>A4?e*e*e:ZRe*(e-XRe)}function GK(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function HK(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ger(e){if(e instanceof ym)return new ym(e.h,e.c,e.l,e.opacity);if(e instanceof $1||(e=KRe(e)),e.a===0&&e.b===0)return new ym(NaN,0{EI();FI();NK();II=18,$Re=.96422,WRe=1,YRe=.82521,XRe=4/29,A4=6/29,ZRe=3*A4*A4,ver=A4*A4*A4;mm($1,M4,S2(j1,{brighter(e){return new $1(this.l+II*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new $1(this.l-II*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=$Re*VK(t),e=WRe*VK(e),r=YRe*VK(r),new Gu(GK(3.1338561*t-1.6168667*e-.4906146*r),GK(-.9787684*t+1.9161415*e+.033454*r),GK(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));mm(ym,pE,S2(j1,{brighter(e){return new ym(this.h,this.c,this.l+II*(e==null?1:e),this.opacity)},darker(e){return new ym(this.h,this.c,this.l-II*(e==null?1:e),this.opacity)},rgb(){return JRe(this).rgb()}}))});function mer(e){if(e instanceof w_)return new w_(e.h,e.s,e.l,e.opacity);e instanceof Gu||(e=hE(e));var t=e.r/255,r=e.g/255,i=e.b/255,n=(rze*i+eze*t-tze*r)/(rze+eze-tze),a=i-n,o=(vE*(r-n)-$K*a)/RI,s=Math.sqrt(o*o+a*a)/(vE*n*(1-n)),l=s?Math.atan2(o,a)*PI-120:NaN;return new w_(l<0?l+360:l,s,n,e.opacity)}function S4(e,t,r,i){return arguments.length===1?mer(e):new w_(e,t,r,i==null?1:i)}function w_(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}var ize,jK,$K,RI,vE,eze,tze,rze,nze=Ci(()=>{EI();FI();NK();ize=-.14861,jK=1.78277,$K=-.29227,RI=-.90649,vE=1.97294,eze=vE*RI,tze=vE*jK,rze=jK*$K-RI*ize;mm(w_,S4,S2(j1,{brighter(e){return e=e==null?__:Math.pow(__,e),new w_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?E2:Math.pow(E2,e),new w_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*LI,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),n=Math.sin(e);return new Gu(255*(t+r*(ize*i+jK*n)),255*(t+r*($K*i+RI*n)),255*(t+r*(vE*i)),this.opacity)}}))});var T_=Ci(()=>{FI();QRe();nze()});function WK(e,t,r,i,n){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*i+o*n)/6}function zI(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],o=i>0?e[i-1]:2*n-a,s=i{});function qI(e){var t=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*t),n=e[(i+t-1)%t],a=e[i%t],o=e[(i+1)%t],s=e[(i+2)%t];return WK((r-i/t)*t,n,a,o,s)}}var YK=Ci(()=>{BI()});var E4,XK=Ci(()=>{E4=e=>()=>e});function aze(e,t){return function(r){return e+r*t}}function yer(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function C2(e,t){var r=t-e;return r?aze(e,r>180||r<-180?r-360*Math.round(r/360):r):E4(isNaN(e)?t:e)}function oze(e){return(e=+e)==1?_l:function(t,r){return r-t?yer(t,r,e):E4(isNaN(t)?r:t)}}function _l(e,t){var r=t-e;return r?aze(e,r):E4(isNaN(e)?t:e)}var A_=Ci(()=>{XK()});function sze(e){return function(t){var r=t.length,i=new Array(r),n=new Array(r),a=new Array(r),o,s;for(o=0;o{T_();BI();YK();A_();gE=(function e(t){var r=oze(t);function i(n,a){var o=r((n=T4(n)).r,(a=T4(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),u=_l(n.opacity,a.opacity);return function(c){return n.r=o(c),n.g=s(c),n.b=l(c),n.opacity=u(c),n+""}}return i.gamma=e,i})(1);lze=sze(zI),uze=sze(qI)});function k4(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n{});function cze(e,t){return(OI(t)?k4:KK)(e,t)}function KK(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),o;for(o=0;o{mE();NI()});function UI(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}var QK=Ci(()=>{});function Qh(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var yE=Ci(()=>{});function VI(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=D2(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var eJ=Ci(()=>{mE()});function xer(e){return function(){return e}}function ber(e){return function(t){return e(t)+""}}function GI(e,t){var r=rJ.lastIndex=tJ.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=rJ.exec(e))&&(n=tJ.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Qh(i,n)})),r=tJ.lastIndex;return r{yE();rJ=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tJ=new RegExp(rJ.source,"g")});function D2(e,t){var r=typeof t,i;return t==null||r==="boolean"?E4(t):(r==="number"?Qh:r==="string"?(i=k2(t))?(t=i,gE):GI:t instanceof k2?gE:t instanceof Date?UI:OI(t)?k4:Array.isArray(t)?KK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?VI:Qh)(e,t)}var mE=Ci(()=>{T_();ZK();JK();QK();yE();eJ();iJ();XK();NI()});function fze(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var hze=Ci(()=>{});function dze(e,t){var r=C2(+e,+t);return function(i){var n=r(i);return n-360*Math.floor(n/360)}}var pze=Ci(()=>{A_()});function vze(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var gze=Ci(()=>{});function nJ(e,t,r,i,n,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i{mze=180/Math.PI,HI={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function xze(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?HI:nJ(t.a,t.b,t.c,t.d,t.e,t.f)}function bze(e){return e==null?HI:(jI||(jI=document.createElementNS("http://www.w3.org/2000/svg","g")),jI.setAttribute("transform",e),(e=jI.transform.baseVal.consolidate())?(e=e.matrix,nJ(e.a,e.b,e.c,e.d,e.e,e.f)):HI)}var jI,_ze=Ci(()=>{yze()});function wze(e,t,r,i){function n(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push("translate(",null,t,null,r);d.push({i:v-4,x:Qh(u,f)},{i:v-2,x:Qh(c,h)})}else(f||h)&&p.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(n(f)+"rotate(",null,i)-2,x:Qh(u,c)})):c&&f.push(n(f)+"rotate("+c+i)}function s(u,c,f,h){u!==c?h.push({i:f.push(n(f)+"skewX(",null,i)-2,x:Qh(u,c)}):c&&f.push(n(f)+"skewX("+c+i)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push(n(p)+"scale(",null,",",null,")");d.push({i:v-4,x:Qh(u,f)},{i:v-2,x:Qh(c,h)})}else(f!==1||h!==1)&&p.push(n(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,v=h.length,m;++d{yE();_ze();Tze=wze(xze,"px, ","px)","deg)"),Aze=wze(bze,", ",")",")")});function Sze(e){return((e=Math.exp(e))+1/e)/2}function wer(e){return((e=Math.exp(e))-1/e)/2}function Ter(e){return((e=Math.exp(2*e))-1)/(e+1)}var _er,Eze,kze=Ci(()=>{_er=1e-12;Eze=(function e(t,r,i){function n(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],p=c-s,d=f-l,v=p*p+d*d,m,g;if(v<_er)g=Math.log(h/u)/t,m=function(A){return[s+A*p,l+A*d,u*Math.exp(t*A*g)]};else{var w=Math.sqrt(v),_=(h*h-u*u+i*v)/(2*u*r*w),b=(h*h-u*u-i*v)/(2*h*r*w),M=Math.log(Math.sqrt(_*_+1)-_),x=Math.log(Math.sqrt(b*b+1)-b);g=(x-M)/t,m=function(A){var T=A*g,y=Sze(M),E=u/(r*w)*(y*Ter(t*T+M)-wer(M));return[s+E*p,l+E*d,u*y/Sze(t*T+M)]}}return m.duration=g*1e3*t/Math.SQRT2,m}return n.rho=function(a){var o=Math.max(.001,+a),s=o*o,l=s*s;return e(o,s,l)},n})(Math.SQRT2,2,4)});function Cze(e){return function(t,r){var i=e((t=dE(t)).h,(r=dE(r)).h),n=_l(t.s,r.s),a=_l(t.l,r.l),o=_l(t.opacity,r.opacity);return function(s){return t.h=i(s),t.s=n(s),t.l=a(s),t.opacity=o(s),t+""}}}var Dze,Fze,Lze=Ci(()=>{T_();A_();Dze=Cze(C2),Fze=Cze(_l)});function aJ(e,t){var r=_l((e=M4(e)).l,(t=M4(t)).l),i=_l(e.a,t.a),n=_l(e.b,t.b),a=_l(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=i(o),e.b=n(o),e.opacity=a(o),e+""}}var Pze=Ci(()=>{T_();A_()});function Ize(e){return function(t,r){var i=e((t=pE(t)).h,(r=pE(r)).h),n=_l(t.c,r.c),a=_l(t.l,r.l),o=_l(t.opacity,r.opacity);return function(s){return t.h=i(s),t.c=n(s),t.l=a(s),t.opacity=o(s),t+""}}}var Rze,zze,Bze=Ci(()=>{T_();A_();Rze=Ize(C2),zze=Ize(_l)});function qze(e){return(function t(r){r=+r;function i(n,a){var o=e((n=S4(n)).h,(a=S4(a)).h),s=_l(n.s,a.s),l=_l(n.l,a.l),u=_l(n.opacity,a.opacity);return function(c){return n.h=o(c),n.s=s(c),n.l=l(Math.pow(c,r)),n.opacity=u(c),n+""}}return i.gamma=t,i})(1)}var Oze,Nze,Uze=Ci(()=>{T_();A_();Oze=qze(C2),Nze=qze(_l)});function oJ(e,t){t===void 0&&(t=e,e=D2);for(var r=0,i=t.length-1,n=t[0],a=new Array(i<0?0:i);r{mE()});function Gze(e,t){for(var r=new Array(t),i=0;i{});var M_={};Jn(M_,{interpolate:()=>D2,interpolateArray:()=>cze,interpolateBasis:()=>zI,interpolateBasisClosed:()=>qI,interpolateCubehelix:()=>Oze,interpolateCubehelixLong:()=>Nze,interpolateDate:()=>UI,interpolateDiscrete:()=>fze,interpolateHcl:()=>Rze,interpolateHclLong:()=>zze,interpolateHsl:()=>Dze,interpolateHslLong:()=>Fze,interpolateHue:()=>dze,interpolateLab:()=>aJ,interpolateNumber:()=>Qh,interpolateNumberArray:()=>k4,interpolateObject:()=>VI,interpolateRgb:()=>gE,interpolateRgbBasis:()=>lze,interpolateRgbBasisClosed:()=>uze,interpolateRound:()=>vze,interpolateString:()=>GI,interpolateTransformCss:()=>Tze,interpolateTransformSvg:()=>Aze,interpolateZoom:()=>Eze,piecewise:()=>oJ,quantize:()=>Gze});var S_=Ci(()=>{mE();JK();BI();YK();QK();hze();pze();yE();NI();eJ();gze();iJ();Mze();kze();ZK();Lze();Pze();Bze();Uze();Vze();Hze()});var $I=W((fZr,jze)=>{"use strict";var Aer=Qi(),Mer=ti();jze.exports=function(t,r,i,n,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=i.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),Aer.pointStyle(t,i,n,r)}else Mer.fill(t,l)}});var sJ=W((hZr,Zze)=>{"use strict";var $ze=gi(),Wze=ti(),Yze=tt(),Ser=of().resizeText,Eer=$I();function ker(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");Ser(e,t,"sunburst"),t.each(function(r){var i=$ze.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){$ze.select(this).call(Xze,o,a,e)})})}function Xze(e,t,r,i){var n=t.data.data,a=!t.children,o=n.i,s=Yze.castOption(r,o,"marker.line.color")||Wze.defaultLine,l=Yze.castOption(r,o,"marker.line.width")||0;e.call(Eer,t,r,i).style("stroke-width",l).call(Wze.stroke,s).style("opacity",a?r.leaf.opacity:null)}Zze.exports={style:ker,styleOne:Xze}});var xm=W(sa=>{"use strict";var E_=tt(),Cer=ti(),Der=Xp(),Kze=Gy();sa.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(i){if(sa.getPtId(i)===t)return r=i.copy()}),r||e};sa.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(i){for(var n=i.children||[],a=0;a0)};sa.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};sa.isHeader=function(e,t){return!(sa.isLeaf(e)||e.depth===t._maxDepth-1)};function Jze(e){return e.data.data.pid}sa.getParent=function(e,t){return sa.findEntryWithLevel(e,Jze(t))};sa.listPath=function(e,t){var r=e.parent;if(!r)return[];var i=t?[r.data[t]]:[r];return sa.listPath(r,t).concat(i)};sa.getPath=function(e){return sa.listPath(e,"label").join("/")+"/"};sa.formatValue=Kze.formatPieValue;sa.formatPercent=function(e,t){var r=E_.formatPercent(e,0);return r==="0%"&&(r=Kze.formatPiePercent(e,t)),r}});var _E=W((pZr,tBe)=>{"use strict";var C4=gi(),Qze=xi(),Per=ah().appendArrayPointValue,xE=Is(),eBe=tt(),Ier=ww(),_u=xm(),Rer=Gy(),zer=Rer.formatPieValue;tBe.exports=function(t,r,i,n,a){var o=n[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(d){var v=i._fullLayout;if(!(i._dragging||v.hovermode===!1)){var m=i._fullData[s.index],g=d.data.data,w=g.i,_=_u.isHierarchyRoot(d),b=_u.getParent(l,d),M=_u.getValue(d),x=function(X){return eBe.castOption(m,w,X)},A=x("hovertemplate"),T=xE.castHoverinfo(m,v,w),y=v.separators,E;if(A||T&&T!=="none"&&T!=="skip"){var S,C;u&&(S=o.cx+d.pxmid[0]*(1-d.rInscribed),C=o.cy+d.pxmid[1]*(1-d.rInscribed)),c&&(S=d._hoverX,C=d._hoverY);var k={},D=[],F=[],P=function(X){return D.indexOf(X)!==-1};T&&(D=T==="all"?m._module.attributes.hoverinfo.flags:T.split("+")),k.label=g.label,P("label")&&k.label&&F.push(k.label),g.hasOwnProperty("v")&&(k.value=g.v,k.valueLabel=zer(k.value,y),P("value")&&F.push(k.valueLabel)),k.currentPath=d.currentPath=_u.getPath(d.data),P("current path")&&!_&&F.push(k.currentPath);var R,L=[],I=function(){L.indexOf(R)===-1&&(F.push(R),L.push(R))};k.percentParent=d.percentParent=M/_u.getValue(b),k.parent=d.parentString=_u.getPtLabel(b),P("percent parent")&&(R=_u.formatPercent(k.percentParent,y)+" of "+k.parent,I()),k.percentEntry=d.percentEntry=M/_u.getValue(r),k.entry=d.entry=_u.getPtLabel(r),P("percent entry")&&!_&&!d.onPathbar&&(R=_u.formatPercent(k.percentEntry,y)+" of "+k.entry,I()),k.percentRoot=d.percentRoot=M/_u.getValue(l),k.root=d.root=_u.getPtLabel(l),P("percent root")&&!_&&(R=_u.formatPercent(k.percentRoot,y)+" of "+k.root,I()),k.text=x("hovertext")||x("text"),P("text")&&(R=k.text,eBe.isValidTextValue(R)&&F.push(R)),E=[bE(d,m,a.eventDataKeys)];var B={trace:m,y:C,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:F.join("
"),name:A||P("name")?m.name:void 0,color:x("hoverlabel.bgcolor")||g.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:k,eventData:E};u&&(B.x0=S-d.rInscribed*d.rpx1,B.x1=S+d.rInscribed*d.rpx1,B.idealAlign=d.pxmid[0]<0?"left":"right"),c&&(B.x=S,B.idealAlign=S<0?"left":"right");var O=[];xE.loneHover(B,{container:v._hoverlayer.node(),outerContainer:v._paper.node(),gd:i,inOut_bbox:O}),E[0].bbox=O[0],s._hasHoverLabel=!0}if(c){var $=t.select("path.surface");a.styleOne($,d,m,i,{hovered:!0})}s._hasHoverEvent=!0,i.emit("plotly_hover",{points:E||[bE(d,m,a.eventDataKeys)],event:C4.event})}},h=function(d){var v=i._fullLayout,m=i._fullData[s.index],g=C4.select(this).datum();if(s._hasHoverEvent&&(d.originalEvent=C4.event,i.emit("plotly_unhover",{points:[bE(g,m,a.eventDataKeys)],event:C4.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(xE.loneUnhover(v._hoverlayer.node()),s._hasHoverLabel=!1),c){var w=t.select("path.surface");a.styleOne(w,g,m,i,{hovered:!1})}},p=function(d){var v=i._fullLayout,m=i._fullData[s.index],g=u&&(_u.isHierarchyRoot(d)||_u.isLeaf(d)),w=_u.getPtId(d),_=_u.isEntry(d)?_u.findEntryWithChild(l,w):_u.findEntryWithLevel(l,w),b=_u.getPtId(_),M={points:[bE(d,m,a.eventDataKeys)],event:C4.event};g||(M.nextLevel=b);var x=Ier.triggerHandler(i,"plotly_"+s.type+"click",M);if(x!==!1&&v.hovermode&&(i._hoverdata=[bE(d,m,a.eventDataKeys)],xE.click(i,C4.event)),!g&&x!==!1&&!i._dragging&&!i._transitioning){Qze.call("_storeDirectGUIEdit",m,v._tracePreGUI[m.uid],{level:m.level});var A={data:[{level:b}],traces:[s.index]},T={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};xE.loneUnhover(v._hoverlayer.node()),Qze.call("animate",i,A,T)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",p)};function bE(e,t,r){for(var i=e.data.data,n={curveNumber:t.index,pointNumber:i.i,data:t._input,fullData:t},a=0;a{"use strict";var wE=gi(),Ber=lE(),bv=(S_(),Pt(M_)).interpolate,rBe=Qi(),uf=tt(),qer=ao(),oBe=of(),iBe=oBe.recordMinTextSize,Oer=oBe.clearMinTextSize,sBe=MI(),Ner=Gy().getRotationAngle,Uer=sBe.computeTransform,Ver=sBe.transformInsideText,Ger=sJ().styleOne,Her=zd().resizeText,jer=_E(),lJ=(BK(),Pt(zK)),qa=xm();WI.plot=function(e,t,r,i){var n=e._fullLayout,a=n._sunburstlayer,o,s,l=!r,u=!n.uniformtext.mode&&qa.hasTransition(r);if(Oer("sunburst",n),o=a.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){i&&(s=i());var c=wE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){a.selectAll("g.trace").each(function(f){nBe(e,f,this,r)})})}else o.each(function(f){nBe(e,f,this,r)}),n.uniformtext.mode&&Her(e,n._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function nBe(e,t,r,i){var n=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&qa.hasTransition(i),s=wE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=qa.findEntryWithLevel(f,c.level),p=qa.getMaxDepth(c),d=a._size,v=c.domain,m=d.w*(v.x[1]-v.x[0]),g=d.h*(v.y[1]-v.y[0]),w=.5*Math.min(m,g),_=u.cx=d.l+d.w*(v.x[1]+v.x[0])/2,b=u.cy=d.t+d.h*(1-v.y[0])-g/2;if(!h)return l.remove();var M=null,x={};o&&l.each(function(G){x[qa.getPtId(G)]={rpx0:G.rpx0,rpx1:G.rpx1,x0:G.x0,x1:G.x1,transform:G.transform},!M&&qa.isEntry(G)&&(M=G)});var A=$er(h).descendants(),T=h.height+1,y=0,E=p;u.hasMultipleRoots&&qa.isHierarchyRoot(h)&&(A=A.slice(1),T-=1,y=1,E+=1),A=A.filter(function(G){return G.y1<=E});var S=Ner(c.rotation);S&&A.forEach(function(G){G.x0+=S,G.x1+=S});var C=Math.min(T,p),k=function(G){return(G-y)/C*w},D=function(G,q){return[G*Math.cos(q),-G*Math.sin(q)]},F=function(G){return uf.pathAnnulus(G.rpx0,G.rpx1,G.x0,G.x1,_,b)},P=function(G){return _+aBe(G)[0]*(G.transform.rCenter||0)+(G.transform.x||0)},R=function(G){return b+aBe(G)[1]*(G.transform.rCenter||0)+(G.transform.y||0)};l=l.data(A,qa.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var G=wE.select(this),q=G.select("path.surface");q.transition().attrTween("d",function(N){var V=O(N);return function(Y){return F(V(Y))}});var J=G.select("g.slicetext");J.attr("opacity",0)}).remove():l.exit().remove(),l.order();var L=null;if(o&&M){var I=qa.getPtId(M);l.each(function(G){L===null&&qa.getPtId(G)===I&&(L=G.x1)})}var B=l;o&&(B=B.transition().each("end",function(){var G=wE.select(this);qa.setSliceCursor(G,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),B.each(function(G){var q=wE.select(this),J=uf.ensureSingle(q,"path","surface",function(Q){Q.style("pointer-events",n?"none":"all")});G.rpx0=k(G.y0),G.rpx1=k(G.y1),G.xmid=(G.x0+G.x1)/2,G.pxmid=D(G.rpx1,G.xmid),G.midangle=-(G.xmid-Math.PI/2),G.startangle=-(G.x0-Math.PI/2),G.stopangle=-(G.x1-Math.PI/2),G.halfangle=.5*Math.min(uf.angleDelta(G.x0,G.x1)||Math.PI,Math.PI),G.ring=1-G.rpx0/G.rpx1,G.rInscribed=Wer(G,c),o?J.transition().attrTween("d",function(Q){var te=$(Q);return function(ue){return F(te(ue))}}):J.attr("d",F),q.call(jer,h,e,t,{eventDataKeys:lJ.eventDataKeys,transitionTime:lJ.CLICK_TRANSITION_TIME,transitionEasing:lJ.CLICK_TRANSITION_EASING}).call(qa.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),J.call(Ger,G,c,e);var N=uf.ensureSingle(q,"g","slicetext"),V=uf.ensureSingle(N,"text","",function(Q){Q.attr("data-notex",1)}),Y=uf.ensureUniformFontSize(e,qa.determineTextFont(c,G,a.font));V.text(WI.formatSliceLabel(G,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(rBe.font,Y).call(qer.convertToTspans,e);var H=rBe.bBox(V.node());G.transform=Ver(H,G,u),G.transform.targetX=P(G),G.transform.targetY=R(G);var j=function(Q,te){var ue=Q.transform;return Uer(ue,te),ue.fontSize=Y.size,iBe(c.type,ue,a),uf.getTextTransform(ue)};o?V.transition().attrTween("transform",function(Q){var te=X(Q);return function(ue){return j(te(ue),H)}}):V.attr("transform",j(G,H))});function O(G){var q=qa.getPtId(G),J=x[q],N=x[qa.getPtId(h)],V;if(N){var Y=(G.x1>N.x1?2*Math.PI:0)+S;V=G.rpx1L?2*Math.PI:0)+S;J={x0:V,x1:V}}else J={rpx0:w,rpx1:w},uf.extendFlat(J,K(G));else J={rpx0:0,rpx1:0};else J={x0:S,x1:S};return bv(J,N)}function X(G){var q=x[qa.getPtId(G)],J,N=G.transform;if(q)J=q;else if(J={rpx1:G.rpx1,transform:{textPosAngle:N.textPosAngle,scale:0,rotate:N.rotate,rCenter:N.rCenter,x:N.x,y:N.y}},M)if(G.parent)if(L){var V=G.x1>L?2*Math.PI:0;J.x0=J.x1=V}else uf.extendFlat(J,K(G));else J.x0=J.x1=S;else J.x0=J.x1=S;var Y=bv(J.transform.textPosAngle,G.transform.textPosAngle),H=bv(J.rpx1,G.rpx1),j=bv(J.x0,G.x0),Q=bv(J.x1,G.x1),te=bv(J.transform.scale,N.scale),ue=bv(J.transform.rotate,N.rotate),ge=N.rCenter===0?3:J.transform.rCenter===0?1/3:1,Ee=bv(J.transform.rCenter,N.rCenter),xe=function(ce){return Ee(Math.pow(ce,ge))};return function(ce){var oe=H(ce),Se=j(ce),be=Q(ce),fe=xe(ce),ee=D(oe,(Se+be)/2),ae=Y(ce),_e={pxmid:ee,rpx1:oe,transform:{textPosAngle:ae,rCenter:fe,x:N.x,y:N.y}};return iBe(c.type,N,a),{transform:{targetX:P(_e),targetY:R(_e),scale:te(ce),rotate:ue(ce),rCenter:fe}}}}function K(G){var q=G.parent,J=x[qa.getPtId(q)],N={};if(J){var V=q.children,Y=V.indexOf(G),H=V.length,j=bv(J.x0,J.x1);N.x0=j(Y/H),N.x1=j(Y/H)}else N.x0=N.x1=0;return N}}function $er(e){return Ber.partition().size([2*Math.PI,e.height+1])(e)}WI.formatSliceLabel=function(e,t,r,i,n){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=n.separators,l=i[0],u=e.data.data,c=l.hierarchy,f=qa.isHierarchyRoot(e),h=qa.getParent(c,e),p=qa.getValue(e);if(!a){var d=o.split("+"),v=function(y){return d.indexOf(y)!==-1},m=[],g;if(v("label")&&u.label&&m.push(u.label),u.hasOwnProperty("v")&&v("value")&&m.push(qa.formatValue(u.v,s)),!f){v("current path")&&m.push(qa.getPath(e.data));var w=0;v("percent parent")&&w++,v("percent entry")&&w++,v("percent root")&&w++;var _=w>1;if(w){var b,M=function(y){g=qa.formatPercent(b,s),_&&(g+=" of "+y),m.push(g)};v("percent parent")&&!f&&(b=p/qa.getValue(h),M("parent")),v("percent entry")&&(b=p/qa.getValue(t),M("entry")),v("percent root")&&(b=p/qa.getValue(c),M("root"))}}return v("text")&&(g=uf.castOption(r,u.i,"text"),uf.isValidTextValue(g)&&m.push(g)),m.join("
")}var x=uf.castOption(r,u.i,"texttemplate");if(!x)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=qa.formatValue(u.v,s)),A.currentPath=qa.getPath(e.data),f||(A.percentParent=p/qa.getValue(h),A.percentParentLabel=qa.formatPercent(A.percentParent,s),A.parent=qa.getPtLabel(h)),A.percentEntry=p/qa.getValue(t),A.percentEntryLabel=qa.formatPercent(A.percentEntry,s),A.entry=qa.getPtLabel(t),A.percentRoot=p/qa.getValue(c),A.percentRootLabel=qa.formatPercent(A.percentRoot,s),A.root=qa.getPtLabel(c),u.hasOwnProperty("color")&&(A.color=u.color);var T=uf.castOption(r,u.i,"text");return(uf.isValidTextValue(T)||T==="")&&(A.text=T),A.customdata=uf.castOption(r,u.i,"customdata"),uf.texttemplateString({data:[A,r._meta],fallback:r.texttemplatefallback,labels:A,locale:n._d3locale,template:x})};function Wer(e){return e.rpx0===0&&uf.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function aBe(e){return Yer(e.rpx1,e.transform.textPosAngle)}function Yer(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var uBe=W((gZr,lBe)=>{"use strict";lBe.exports={moduleType:"trace",name:"sunburst",basePlotModule:TRe(),categories:[],animatable:!0,attributes:sE(),layoutAttributes:qK(),supplyDefaults:FRe(),supplyLayoutDefaults:PRe(),calc:cE().calc,crossTraceCalc:cE().crossTraceCalc,plot:YI().plot,style:sJ().style,colorbar:Cc(),meta:{}}});var fBe=W((mZr,cBe)=>{"use strict";cBe.exports=uBe()});var dBe=W(D4=>{"use strict";var hBe=Qo();D4.name="treemap";D4.plot=function(e,t,r,i){hBe.plotBasePlot(D4.name,e,t,r,i)};D4.clean=function(e,t,r,i){hBe.cleanBasePlot(D4.name,e,t,r,i)}});var k_={};Jn(k_,{CLICK_TRANSITION_EASING:()=>Zer,CLICK_TRANSITION_TIME:()=>Xer,eventDataKeys:()=>Ker,gapWithPathbar:()=>Jer});var Xer,Zer,Ker,Jer,C_=Ci(()=>{"use strict";Xer=750,Zer="poly",Ker=["currentPath","root","entry","percentRoot","percentEntry","percentParent"],Jer=1});var XI=W((xZr,gBe)=>{"use strict";var{hovertemplateAttrs:Qer,texttemplateAttrs:etr,templatefallbackAttrs:pBe}=Wa(),ttr=Fo(),rtr=ds().attributes,D_=m_(),Kd=sE(),vBe=(C_(),Pt(k_)),uJ=an().extendFlat,itr=zu().pattern;gBe.exports={labels:Kd.labels,parents:Kd.parents,values:Kd.values,branchvalues:Kd.branchvalues,count:Kd.count,level:Kd.level,maxdepth:Kd.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:uJ({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:Kd.marker.colors,pattern:itr,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Kd.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},ttr("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:uJ({},D_.textfont,{}),editType:"calc"},text:D_.text,textinfo:Kd.textinfo,texttemplate:etr({editType:"plot"},{keys:vBe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:pBe({editType:"plot"}),hovertext:D_.hovertext,hoverinfo:Kd.hoverinfo,hovertemplate:Qer({},{keys:vBe.eventDataKeys}),hovertemplatefallback:pBe(),textfont:D_.textfont,insidetextfont:D_.insidetextfont,outsidetextfont:uJ({},D_.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:D_.sort,root:Kd.root,domain:rtr({name:"treemap",trace:!0,editType:"calc"})}});var cJ=W((bZr,mBe)=>{"use strict";mBe.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var _Be=W((_Zr,bBe)=>{"use strict";var yBe=tt(),ntr=XI(),atr=ti(),otr=ds().defaults,str=I0().handleText,ltr=(Qy(),Pt(Jy)).TEXTPAD,utr=y_().handleMarkerDefaults,xBe=es(),ctr=xBe.hasColorscale,ftr=xBe.handleDefaults;bBe.exports=function(t,r,i,n){function a(m,g){return yBe.coerce(t,r,ntr,m,g)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",yBe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";str(t,r,n,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var p=r.textposition.indexOf("bottom")!==-1;utr(t,r,n,a);var d=r._hasColorscale=ctr(t,"marker","colors")||(t.marker||{}).coloraxis;d?ftr(t,r,n,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var v=r.textfont.size*2;a("marker.pad.t",p?v/4:v),a("marker.pad.l",v/4),a("marker.pad.r",v/4),a("marker.pad.b",p?v:v/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:atr.contrast(n.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*ltr),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),otr(r,n,a),r._length=null}});var TBe=W((wZr,wBe)=>{"use strict";var htr=tt(),dtr=cJ();wBe.exports=function(t,r){function i(n,a){return htr.coerce(t,r,dtr,n,a)}i("treemapcolorway",r.colorway),i("extendtreemapcolors")}});var hJ=W(fJ=>{"use strict";var ABe=cE();fJ.calc=function(e,t){return ABe.calc(e,t)};fJ.crossTraceCalc=function(e){return ABe._runCrossTraceCalc("treemap",e)}});var dJ=W((AZr,MBe)=>{"use strict";MBe.exports=function e(t,r,i){var n;i.swapXY&&(n=t.x0,t.x0=t.y0,t.y0=n,n=t.x1,t.x1=t.y1,t.y1=n),i.flipX&&(n=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-n),i.flipY&&(n=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-n);var a=t.children;if(a)for(var o=0;o{"use strict";var F4=lE(),ptr=dJ();SBe.exports=function(t,r,i){var n=i.flipX,a=i.flipY,o=i.packing==="dice-slice",s=i.pad[a?"bottom":"top"],l=i.pad[n?"right":"left"],u=i.pad[n?"left":"right"],c=i.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=F4.treemap().tile(vtr(i.packing,i.squarifyratio)).paddingInner(i.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||n||a)&&ptr(h,r,{swapXY:o,flipX:n,flipY:a}),h};function vtr(e,t){switch(e){case"squarify":return F4.treemapSquarify.ratio(t);case"binary":return F4.treemapBinary;case"dice":return F4.treemapDice;case"slice":return F4.treemapSlice;default:return F4.treemapSliceDice}}});var ZI=W((SZr,DBe)=>{"use strict";var EBe=gi(),L4=ti(),kBe=tt(),vJ=xm(),gtr=of().resizeText,mtr=$I();function ytr(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");gtr(e,t,"treemap"),t.each(function(r){var i=EBe.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){EBe.select(this).call(CBe,o,a,e,{hovered:!1})})})}function CBe(e,t,r,i,n){var a=(n||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=vJ.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=kBe.castOption(r,s,"marker.line.color")||L4.defaultLine,u=kBe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var p=r.marker.depthfade;if(p){var d=L4.combine(L4.addOpacity(r._backgroundColor,.75),c),v;if(p===!0){var m=vJ.getMaxDepth(r);isFinite(m)?vJ.isLeaf(t)?v=0:v=r._maxVisibleLayers-(t.data.depth-r._entryDepth):v=t.data.height+1}else v=t.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var g=0;g{"use strict";var FBe=gi(),KI=tt(),LBe=Qi(),xtr=ao(),btr=pJ(),PBe=ZI().styleOne,gJ=(C_(),Pt(k_)),P4=xm(),_tr=_E(),mJ=!0;IBe.exports=function(t,r,i,n,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,p=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,g=a.makeUpdateTextInterpolator,w={},_=t._context.staticPlot,b=t._fullLayout,M=r[0],x=M.trace,A=M.hierarchy,T=s/x._entryDepth,y=P4.listPath(i.data,"id"),E=btr(A.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();E=E.filter(function(C){var k=y.indexOf(C.data.id);return k===-1?!1:(C.x0=T*k,C.x1=T*(k+1),C.y0=o,C.y1=o+l,C.onPathbar=!0,!0)}),E.reverse(),n=n.data(E,P4.getPtId),n.enter().append("g").classed("pathbar",!0),v(n,mJ,w,[s,l],f),n.order();var S=n;d&&(S=S.transition().each("end",function(){var C=FBe.select(this);P4.setSliceCursor(C,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),S.each(function(C){C._x0=u(C.x0),C._x1=u(C.x1),C._y0=c(C.y0),C._y1=c(C.y1),C._hoverX=u(C.x1-Math.min(s,l)/2),C._hoverY=c(C.y1-l/2);var k=FBe.select(this),D=KI.ensureSingle(k,"path","surface",function(L){L.style("pointer-events",_?"none":"all")});d?D.transition().attrTween("d",function(L){var I=m(L,mJ,w,[s,l]);return function(B){return f(I(B))}}):D.attr("d",f),k.call(_tr,i,t,r,{styleOne:PBe,eventDataKeys:gJ.eventDataKeys,transitionTime:gJ.CLICK_TRANSITION_TIME,transitionEasing:gJ.CLICK_TRANSITION_EASING}).call(P4.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),D.call(PBe,C,x,t,{hovered:!1}),C._text=(P4.getPtLabel(C)||"").split("
").join(" ")||"";var F=KI.ensureSingle(k,"g","slicetext"),P=KI.ensureSingle(F,"text","",function(L){L.attr("data-notex",1)}),R=KI.ensureUniformFontSize(t,P4.determineTextFont(x,C,b.font,{onPathbar:!0}));P.text(C._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(LBe.font,R).call(xtr.convertToTspans,t),C.textBB=LBe.bBox(P.node()),C.transform=h(C,{fontSize:R.size,onPathbar:!0}),C.transform.fontSize=R.size,d?P.transition().attrTween("transform",function(L){var I=g(L,mJ,w,[s,l]);return function(B){return p(I(B))}}):P.attr("transform",p(C))})}});var OBe=W((kZr,qBe)=>{"use strict";var zBe=gi(),yJ=(S_(),Pt(M_)).interpolate,F2=xm(),TE=tt(),BBe=(Qy(),Pt(Jy)).TEXTPAD,wtr=Wb(),Ttr=wtr.toMoveInsideBar,Atr=of(),xJ=Atr.recordMinTextSize,Mtr=(C_(),Pt(k_)),Str=RBe();function F_(e){return F2.isHierarchyRoot(e)?"":F2.getPtId(e)}qBe.exports=function(t,r,i,n,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=F2.findEntryWithLevel(f,l.level),p=zBe.select(i),d=p.selectAll("g.pathbar"),v=p.selectAll("g.slice");if(!h){d.remove(),v.remove();return}var m=F2.isHierarchyRoot(h),g=!o.uniformtext.mode&&F2.hasTransition(n),w=F2.getMaxDepth(l),_=function(re){return re.data.depth-h.data.depth-1?A+E:-(y+E):0,C={x0:T,x1:T,y0:S,y1:S+y},k=function(re,pe,Te){var Ce=l.tiling.pad,ze=function(Ne){return Ne-Ce<=pe.x0},we=function(Ne){return Ne+Ce>=pe.x1},me=function(Ne){return Ne-Ce<=pe.y0},Le=function(Ne){return Ne+Ce>=pe.y1};return re.x0===pe.x0&&re.x1===pe.x1&&re.y0===pe.y0&&re.y1===pe.y1?{x0:re.x0,x1:re.x1,y0:re.y0,y1:re.y1}:{x0:ze(re.x0-Ce)?0:we(re.x0-Ce)?Te[0]:re.x0,x1:ze(re.x1+Ce)?0:we(re.x1+Ce)?Te[0]:re.x1,y0:me(re.y0-Ce)?0:Le(re.y0-Ce)?Te[1]:re.y0,y1:me(re.y1+Ce)?0:Le(re.y1+Ce)?Te[1]:re.y1}},D=null,F={},P={},R=null,L=function(re,pe){return pe?F[F_(re)]:P[F_(re)]},I=function(re,pe,Te,Ce){if(pe)return F[F_(f)]||C;var ze=P[l.level]||Te;return _(re)?k(re,ze,Ce):{}};s.hasMultipleRoots&&m&&w++,l._maxDepth=w,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=m;var B=-x/2+b.l+b.w*(M.x[1]+M.x[0])/2,O=-A/2+b.t+b.h*(1-(M.y[1]+M.y[0])/2),$=function(re){return B+re},X=function(re){return O+re},K=X(0),G=$(0),q=function(re){return G+re},J=function(re){return K+re};function N(re,pe){return re+","+pe}var V=q(0),Y=function(re){re.x=Math.max(V,re.x)},H=l.pathbar.edgeshape,j=function(re){var pe=q(Math.max(Math.min(re.x0,re.x0),0)),Te=q(Math.min(Math.max(re.x1,re.x1),T)),Ce=J(re.y0),ze=J(re.y1),we=y/2,me={},Le={};me.x=pe,Le.x=Te,me.y=Le.y=(Ce+ze)/2;var Ne={x:pe,y:Ce},Je={x:Te,y:Ce},rt={x:Te,y:ze},mt={x:pe,y:ze};return H===">"?(Ne.x-=we,Je.x-=we,rt.x-=we,mt.x-=we):H==="/"?(rt.x-=we,mt.x-=we,me.x-=we/2,Le.x-=we/2):H==="\\"?(Ne.x-=we,Je.x-=we,me.x-=we/2,Le.x-=we/2):H==="<"&&(me.x-=we,Le.x-=we),Y(Ne),Y(mt),Y(me),Y(Je),Y(rt),Y(Le),"M"+N(Ne.x,Ne.y)+"L"+N(Je.x,Je.y)+"L"+N(Le.x,Le.y)+"L"+N(rt.x,rt.y)+"L"+N(mt.x,mt.y)+"L"+N(me.x,me.y)+"Z"},Q=l[c?"tiling":"marker"].pad,te=function(re){return l.textposition.indexOf(re)!==-1},ue=te("top"),ge=te("left"),Ee=te("right"),xe=te("bottom"),ce=function(re){var pe=$(re.x0),Te=$(re.x1),Ce=X(re.y0),ze=X(re.y1),we=Te-pe,me=ze-Ce;if(!we||!me)return"";var Le=l.marker.cornerradius||0,Ne=Math.min(Le,we/2,me/2);Ne&&re.data&&re.data.data&&re.data.data.label&&(ue&&(Ne=Math.min(Ne,Q.t)),ge&&(Ne=Math.min(Ne,Q.l)),Ee&&(Ne=Math.min(Ne,Q.r)),xe&&(Ne=Math.min(Ne,Q.b)));var Je=function(rt,mt){return Ne?"a"+N(Ne,Ne)+" 0 0 1 "+N(rt,mt):""};return"M"+N(pe,Ce+Ne)+Je(Ne,-Ne)+"L"+N(Te-Ne,Ce)+Je(Ne,Ne)+"L"+N(Te,ze-Ne)+Je(-Ne,Ne)+"L"+N(pe+Ne,ze)+Je(-Ne,-Ne)+"Z"},oe=function(re,pe){var Te=re.x0,Ce=re.x1,ze=re.y0,we=re.y1,me=re.textBB,Le=ue||pe.isHeader&&!xe,Ne=Le?"start":xe?"end":"middle",Je=te("right"),rt=te("left")||pe.onPathbar,mt=rt?-1:Je?1:0;if(pe.isHeader){if(Te+=(c?Q:Q.l)-BBe,Ce-=(c?Q:Q.r)-BBe,Te>=Ce){var dt=(Te+Ce)/2;Te=dt,Ce=dt}var St;xe?(St=we-(c?Q:Q.b),ze{"use strict";var Etr=gi(),ktr=xm(),Ctr=of(),Dtr=Ctr.clearMinTextSize,Ftr=zd().resizeText,NBe=OBe();UBe.exports=function(t,r,i,n,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!i;if(Dtr(o,l),c=u.selectAll("g.trace."+o).data(r,function(d){return d[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&ktr.hasTransition(i)){n&&(f=n());var p=Etr.transition().duration(i.duration).ease(i.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});p.each(function(){u.selectAll("g.trace").each(function(d){NBe(t,d,this,i,s)})})}else c.each(function(d){NBe(t,d,this,i,s)}),l.uniformtext.mode&&Ftr(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var $Be=W((DZr,jBe)=>{"use strict";var VBe=gi(),JI=tt(),GBe=Qi(),Ltr=ao(),Ptr=pJ(),HBe=ZI().styleOne,_J=(C_(),Pt(k_)),L2=xm(),Itr=_E(),Rtr=YI().formatSliceLabel,wJ=!1;jBe.exports=function(t,r,i,n,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,p=a.hasTransition,d=a.handleSlicesExit,v=a.makeUpdateSliceInterpolator,m=a.makeUpdateTextInterpolator,g=a.prevEntry,w={},_=t._context.staticPlot,b=t._fullLayout,M=r[0],x=M.trace,A=x.textposition.indexOf("left")!==-1,T=x.textposition.indexOf("right")!==-1,y=x.textposition.indexOf("bottom")!==-1,E=!y&&!x.marker.pad.t||y&&!x.marker.pad.b,S=Ptr(i,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),C=S.descendants(),k=1/0,D=-1/0;C.forEach(function(I){var B=I.depth;B>=x._maxDepth?(I.x0=I.x1=(I.x0+I.x1)/2,I.y0=I.y1=(I.y0+I.y1)/2):(k=Math.min(k,B),D=Math.max(D,B))}),n=n.data(C,L2.getPtId),x._maxVisibleLayers=isFinite(D)?D-k+1:0,n.enter().append("g").classed("slice",!0),d(n,wJ,w,[o,s],c),n.order();var F=null;if(p&&g){var P=L2.getPtId(g);n.each(function(I){F===null&&L2.getPtId(I)===P&&(F={x0:I.x0,x1:I.x1,y0:I.y0,y1:I.y1})})}var R=function(){return F||{x0:0,x1:o,y0:0,y1:s}},L=n;return p&&(L=L.transition().each("end",function(){var I=VBe.select(this);L2.setSliceCursor(I,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),L.each(function(I){var B=L2.isHeader(I,x);I._x0=l(I.x0),I._x1=l(I.x1),I._y0=u(I.y0),I._y1=u(I.y1),I._hoverX=l(I.x1-x.marker.pad.r),I._hoverY=u(y?I.y1-x.marker.pad.b/2:I.y0+x.marker.pad.t/2);var O=VBe.select(this),$=JI.ensureSingle(O,"path","surface",function(N){N.style("pointer-events",_?"none":"all")});p?$.transition().attrTween("d",function(N){var V=v(N,wJ,R(),[o,s]);return function(Y){return c(V(Y))}}):$.attr("d",c),O.call(Itr,i,t,r,{styleOne:HBe,eventDataKeys:_J.eventDataKeys,transitionTime:_J.CLICK_TRANSITION_TIME,transitionEasing:_J.CLICK_TRANSITION_EASING}).call(L2.setSliceCursor,t,{isTransitioning:t._transitioning}),$.call(HBe,I,x,t,{hovered:!1}),I.x0===I.x1||I.y0===I.y1?I._text="":B?I._text=E?"":L2.getPtLabel(I)||"":I._text=Rtr(I,i,x,r,b)||"";var X=JI.ensureSingle(O,"g","slicetext"),K=JI.ensureSingle(X,"text","",function(N){N.attr("data-notex",1)}),G=JI.ensureUniformFontSize(t,L2.determineTextFont(x,I,b.font)),q=I._text||" ",J=B&&q.indexOf("
")===-1;K.text(q).classed("slicetext",!0).attr("text-anchor",T?"end":A||J?"start":"middle").call(GBe.font,G).call(Ltr.convertToTspans,t),I.textBB=GBe.bBox(K.node()),I.transform=f(I,{fontSize:G.size,isHeader:B}),I.transform.fontSize=G.size,p?K.transition().attrTween("transform",function(N){var V=m(N,wJ,R(),[o,s]);return function(Y){return h(V(Y))}}):K.attr("transform",h(I))}),F}});var YBe=W((FZr,WBe)=>{"use strict";var ztr=bJ(),Btr=$Be();WBe.exports=function(t,r,i,n){return ztr(t,r,i,n,{type:"treemap",drawDescendants:Btr})}});var ZBe=W((LZr,XBe)=>{"use strict";XBe.exports={moduleType:"trace",name:"treemap",basePlotModule:dBe(),categories:[],animatable:!0,attributes:XI(),layoutAttributes:cJ(),supplyDefaults:_Be(),supplyLayoutDefaults:TBe(),calc:hJ().calc,crossTraceCalc:hJ().crossTraceCalc,plot:YBe(),style:ZI().style,colorbar:Cc(),meta:{}}});var JBe=W((PZr,KBe)=>{"use strict";KBe.exports=ZBe()});var eqe=W(I4=>{"use strict";var QBe=Qo();I4.name="icicle";I4.plot=function(e,t,r,i){QBe.plotBasePlot(I4.name,e,t,r,i)};I4.clean=function(e,t,r,i){QBe.cleanBasePlot(I4.name,e,t,r,i)}});var TJ=W((RZr,iqe)=>{"use strict";var{hovertemplateAttrs:qtr,texttemplateAttrs:Otr,templatefallbackAttrs:tqe}=Wa(),Ntr=Fo(),Utr=ds().attributes,AE=m_(),N0=sE(),QI=XI(),rqe=(C_(),Pt(k_)),Vtr=an().extendFlat,Gtr=zu().pattern;iqe.exports={labels:N0.labels,parents:N0.parents,values:N0.values,branchvalues:N0.branchvalues,count:N0.count,level:N0.level,maxdepth:N0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:QI.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:Vtr({colors:N0.marker.colors,line:N0.marker.line,pattern:Gtr,editType:"calc"},Ntr("marker",{colorAttr:"colors",anim:!1})),leaf:N0.leaf,pathbar:QI.pathbar,text:AE.text,textinfo:N0.textinfo,texttemplate:Otr({editType:"plot"},{keys:rqe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:tqe({editType:"plot"}),hovertext:AE.hovertext,hoverinfo:N0.hoverinfo,hovertemplate:qtr({},{keys:rqe.eventDataKeys}),hovertemplatefallback:tqe(),textfont:AE.textfont,insidetextfont:AE.insidetextfont,outsidetextfont:QI.outsidetextfont,textposition:QI.textposition,sort:AE.sort,root:N0.root,domain:Utr({name:"icicle",trace:!0,editType:"calc"})}});var AJ=W((zZr,nqe)=>{"use strict";nqe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var lqe=W((BZr,sqe)=>{"use strict";var aqe=tt(),Htr=TJ(),jtr=ti(),$tr=ds().defaults,Wtr=I0().handleText,Ytr=(Qy(),Pt(Jy)).TEXTPAD,Xtr=y_().handleMarkerDefaults,oqe=es(),Ztr=oqe.hasColorscale,Ktr=oqe.handleDefaults;sqe.exports=function(t,r,i,n){function a(p,d){return aqe.coerce(t,r,Htr,p,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",aqe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";Wtr(t,r,n,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),Xtr(t,r,n,a);var h=r._hasColorscale=Ztr(t,"marker","colors")||(t.marker||{}).coloraxis;h&&Ktr(t,r,n,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:jtr.contrast(n.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*Ytr),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),$tr(r,n,a),r._length=null}});var cqe=W((qZr,uqe)=>{"use strict";var Jtr=tt(),Qtr=AJ();uqe.exports=function(t,r){function i(n,a){return Jtr.coerce(t,r,Qtr,n,a)}i("iciclecolorway",r.colorway),i("extendiciclecolors")}});var SJ=W(MJ=>{"use strict";var fqe=cE();MJ.calc=function(e,t){return fqe.calc(e,t)};MJ.crossTraceCalc=function(e){return fqe._runCrossTraceCalc("icicle",e)}});var dqe=W((NZr,hqe)=>{"use strict";var err=lE(),trr=dJ();hqe.exports=function(t,r,i){var n=i.flipX,a=i.flipY,o=i.orientation==="h",s=i.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=err.partition().padding(i.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||n||a)&&trr(c,r,{swapXY:o,flipX:n,flipY:a}),c}});var EJ=W((UZr,yqe)=>{"use strict";var pqe=gi(),vqe=ti(),gqe=tt(),rrr=of().resizeText,irr=$I();function nrr(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");rrr(e,t,"icicle"),t.each(function(r){var i=pqe.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){pqe.select(this).call(mqe,o,a,e)})})}function mqe(e,t,r,i){var n=t.data.data,a=!t.children,o=n.i,s=gqe.castOption(r,o,"marker.line.color")||vqe.defaultLine,l=gqe.castOption(r,o,"marker.line.width")||0;e.call(irr,t,r,i).style("stroke-width",l).call(vqe.stroke,s).style("opacity",a?r.leaf.opacity:null)}yqe.exports={style:nrr,styleOne:mqe}});var Tqe=W((VZr,wqe)=>{"use strict";var xqe=gi(),eR=tt(),bqe=Qi(),arr=ao(),orr=dqe(),_qe=EJ().styleOne,kJ=(C_(),Pt(k_)),R4=xm(),srr=_E(),lrr=YI().formatSliceLabel,CJ=!1;wqe.exports=function(t,r,i,n,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,p=a.hasTransition,d=a.handleSlicesExit,v=a.makeUpdateSliceInterpolator,m=a.makeUpdateTextInterpolator,g=a.prevEntry,w={},_=t._context.staticPlot,b=t._fullLayout,M=r[0],x=M.trace,A=x.textposition.indexOf("left")!==-1,T=x.textposition.indexOf("right")!==-1,y=x.textposition.indexOf("bottom")!==-1,E=orr(i,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),S=E.descendants(),C=1/0,k=-1/0;S.forEach(function(L){var I=L.depth;I>=x._maxDepth?(L.x0=L.x1=(L.x0+L.x1)/2,L.y0=L.y1=(L.y0+L.y1)/2):(C=Math.min(C,I),k=Math.max(k,I))}),n=n.data(S,R4.getPtId),x._maxVisibleLayers=isFinite(k)?k-C+1:0,n.enter().append("g").classed("slice",!0),d(n,CJ,w,[o,s],c),n.order();var D=null;if(p&&g){var F=R4.getPtId(g);n.each(function(L){D===null&&R4.getPtId(L)===F&&(D={x0:L.x0,x1:L.x1,y0:L.y0,y1:L.y1})})}var P=function(){return D||{x0:0,x1:o,y0:0,y1:s}},R=n;return p&&(R=R.transition().each("end",function(){var L=xqe.select(this);R4.setSliceCursor(L,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(L){L._x0=l(L.x0),L._x1=l(L.x1),L._y0=u(L.y0),L._y1=u(L.y1),L._hoverX=l(L.x1-x.tiling.pad),L._hoverY=u(y?L.y1-x.tiling.pad/2:L.y0+x.tiling.pad/2);var I=xqe.select(this),B=eR.ensureSingle(I,"path","surface",function(K){K.style("pointer-events",_?"none":"all")});p?B.transition().attrTween("d",function(K){var G=v(K,CJ,P(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(q){return c(G(q))}}):B.attr("d",c),I.call(srr,i,t,r,{styleOne:_qe,eventDataKeys:kJ.eventDataKeys,transitionTime:kJ.CLICK_TRANSITION_TIME,transitionEasing:kJ.CLICK_TRANSITION_EASING}).call(R4.setSliceCursor,t,{isTransitioning:t._transitioning}),B.call(_qe,L,x,t,{hovered:!1}),L.x0===L.x1||L.y0===L.y1?L._text="":L._text=lrr(L,i,x,r,b)||"";var O=eR.ensureSingle(I,"g","slicetext"),$=eR.ensureSingle(O,"text","",function(K){K.attr("data-notex",1)}),X=eR.ensureUniformFontSize(t,R4.determineTextFont(x,L,b.font));$.text(L._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":A?"start":"middle").call(bqe.font,X).call(arr.convertToTspans,t),L.textBB=bqe.bBox($.node()),L.transform=f(L,{fontSize:X.size}),L.transform.fontSize=X.size,p?$.transition().attrTween("transform",function(K){var G=m(K,CJ,P(),[o,s]);return function(q){return h(G(q))}}):$.attr("transform",h(L))}),D}});var Mqe=W((GZr,Aqe)=>{"use strict";var urr=bJ(),crr=Tqe();Aqe.exports=function(t,r,i,n){return urr(t,r,i,n,{type:"icicle",drawDescendants:crr})}});var Eqe=W((HZr,Sqe)=>{"use strict";Sqe.exports={moduleType:"trace",name:"icicle",basePlotModule:eqe(),categories:[],animatable:!0,attributes:TJ(),layoutAttributes:AJ(),supplyDefaults:lqe(),supplyLayoutDefaults:cqe(),calc:SJ().calc,crossTraceCalc:SJ().crossTraceCalc,plot:Mqe(),style:EJ().style,colorbar:Cc(),meta:{}}});var Cqe=W((jZr,kqe)=>{"use strict";kqe.exports=Eqe()});var Fqe=W(z4=>{"use strict";var Dqe=Qo();z4.name="funnelarea";z4.plot=function(e,t,r,i){Dqe.plotBasePlot(z4.name,e,t,r,i)};z4.clean=function(e,t,r,i){Dqe.cleanBasePlot(z4.name,e,t,r,i)}});var DJ=W((WZr,Pqe)=>{"use strict";var Ic=m_(),frr=Ja(),hrr=ds().attributes,{hovertemplateAttrs:drr,texttemplateAttrs:prr,templatefallbackAttrs:Lqe}=Wa(),L_=an().extendFlat;Pqe.exports={labels:Ic.labels,label0:Ic.label0,dlabel:Ic.dlabel,values:Ic.values,marker:{colors:Ic.marker.colors,line:{color:L_({},Ic.marker.line.color,{dflt:null}),width:L_({},Ic.marker.line.width,{dflt:1}),editType:"calc"},pattern:Ic.marker.pattern,editType:"calc"},text:Ic.text,hovertext:Ic.hovertext,scalegroup:L_({},Ic.scalegroup,{}),textinfo:L_({},Ic.textinfo,{flags:["label","text","value","percent"]}),texttemplate:prr({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:Lqe({editType:"plot"}),hoverinfo:L_({},frr.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:drr({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:Lqe(),textposition:L_({},Ic.textposition,{values:["inside","none"],dflt:"inside"}),textfont:Ic.textfont,insidetextfont:Ic.insidetextfont,title:{text:Ic.title.text,font:Ic.title.font,position:L_({},Ic.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:hrr({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}});var FJ=W((YZr,Iqe)=>{"use strict";var vrr=_I().hiddenlabels;Iqe.exports={hiddenlabels:vrr,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var Bqe=W((XZr,zqe)=>{"use strict";var Rqe=tt(),grr=DJ(),mrr=ds().defaults,yrr=I0().handleText,xrr=y_().handleLabelsAndValues,brr=y_().handleMarkerDefaults;zqe.exports=function(t,r,i,n){function a(v,m){return Rqe.coerce(t,r,grr,v,m)}var o=a("labels"),s=a("values"),l=xrr(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!u){r.visible=!1;return}r._length=u,brr(t,r,n,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var p=a("textposition");yrr(t,r,n,a,p,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");mrr(r,n,a);var d=a("title.text");d&&(a("title.position"),Rqe.coerceFont(a,"title.font",n.font)),a("aspectratio"),a("baseratio")}});var Oqe=W((ZZr,qqe)=>{"use strict";var _rr=tt(),wrr=FJ();qqe.exports=function(t,r){function i(n,a){return _rr.coerce(t,r,wrr,n,a)}i("hiddenlabels"),i("funnelareacolorway",r.colorway),i("extendfunnelareacolors")}});var LJ=W((KZr,Uqe)=>{"use strict";var Nqe=y4();function Trr(e,t){return Nqe.calc(e,t)}function Arr(e){Nqe.crossTraceCalc(e,{type:"funnelarea"})}Uqe.exports={calc:Trr,crossTraceCalc:Arr}});var $qe=W((JZr,jqe)=>{"use strict";var P_=gi(),PJ=Qi(),P2=tt(),Mrr=P2.strScale,Vqe=P2.strTranslate,Gqe=ao(),Srr=Wb(),Err=Srr.toMoveInsideBar,Hqe=of(),krr=Hqe.recordMinTextSize,Crr=Hqe.clearMinTextSize,Drr=Gy(),B4=MI(),Frr=B4.attachFxHandlers,Lrr=B4.determineInsideTextFont,Prr=B4.layoutAreas,Irr=B4.prerenderTitles,Rrr=B4.positionTitleOutside,zrr=B4.formatSliceLabel;jqe.exports=function(t,r){var i=t._context.staticPlot,n=t._fullLayout;Crr("funnelarea",n),Irr(r,t),Prr(r,n._size),P2.makeTraceGroups(n._funnelarealayer,r,"trace").each(function(a){var o=P_.select(this),s=a[0],l=s.trace;qrr(a),o.each(function(){var u=P_.select(this).selectAll("g.slice").data(a);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){P_.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var p=s.cx,d=s.cy,v=P_.select(this),m=v.selectAll("path.surface").data([f]);m.enter().append("path").classed("surface",!0).style({"pointer-events":i?"none":"all"}),v.call(Frr,t,a);var g="M"+(p+f.TR[0])+","+(d+f.TR[1])+IJ(f.TR,f.BR)+IJ(f.BR,f.BL)+IJ(f.BL,f.TL)+"Z";m.attr("d",g),zrr(t,f,s);var w=Drr.castOption(l.textposition,f.pts),_=v.selectAll("g.slicetext").data(f.text&&w!=="none"?[0]:[]);_.enter().append("g").classed("slicetext",!0),_.exit().remove(),_.each(function(){var b=P2.ensureSingle(P_.select(this),"text","",function(C){C.attr("data-notex",1)}),M=P2.ensureUniformFontSize(t,Lrr(l,f,n.font));b.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(PJ.font,M).call(Gqe.convertToTspans,t);var x=PJ.bBox(b.node()),A,T,y,E=Math.min(f.BL[1],f.BR[1])+d,S=Math.max(f.TL[1],f.TR[1])+d;T=Math.max(f.TL[0],f.BL[0])+p,y=Math.min(f.TR[0],f.BR[0])+p,A=Err(T,y,E,S,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),A.fontSize=M.size,krr(l.type,A,n),a[h].transform=A,P2.setTransormAndDisplay(b,A)})});var c=P_.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=P2.ensureSingle(P_.select(this),"text","",function(d){d.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=P2.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(PJ.font,l.title.font).call(Gqe.convertToTspans,t);var p=Rrr(s,n._size);f.attr("transform",Vqe(p.x,p.y)+Mrr(Math.min(1,p.scale))+Vqe(p.tx,p.ty))})})})};function IJ(e,t){var r=t[0]-e[0],i=t[1]-e[1];return"l"+r+","+i}function Brr(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function qrr(e){if(!e.length)return;var t=e[0],r=t.trace,i=r.aspectratio,n=r.baseratio;n>.999&&(n=.999);var a=Math.pow(n,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var k=Math.sqrt(u);return{x:k,y:-k}}function f(){var k=c();return[k.x,k.y]}var h,p=[];p.push(f());var d,v;for(d=e.length-1;d>-1;d--)if(v=e[d],!v.hidden){var m=v.v/l;u+=m,p.push(f())}var g=1/0,w=-1/0;for(d=0;d-1;d--)if(v=e[d],!v.hidden){E+=1;var S=p[E][0],C=p[E][1];v.TL=[-S,C],v.TR=[S,C],v.BL=T,v.BR=y,v.pxmid=Brr(v.TR,v.BR),T=v.TL,y=v.TR}}});var Xqe=W((QZr,Yqe)=>{"use strict";var Wqe=gi(),Orr=Nw(),Nrr=of().resizeText;Yqe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");Nrr(t,r,"funnelarea"),r.each(function(i){var n=i[0],a=n.trace,o=Wqe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){Wqe.select(this).call(Orr,s,a,t)})})}});var Kqe=W((eKr,Zqe)=>{"use strict";Zqe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Fqe(),categories:["pie-like","funnelarea","showLegend"],attributes:DJ(),layoutAttributes:FJ(),supplyDefaults:Bqe(),supplyLayoutDefaults:Oqe(),calc:LJ().calc,crossTraceCalc:LJ().crossTraceCalc,plot:$qe(),style:Xqe(),styleOne:Nw(),meta:{}}});var Qqe=W((tKr,Jqe)=>{"use strict";Jqe.exports=Kqe()});var uc=W((rKr,eOe)=>{"use strict";(()=>{var e={3065(n,a,o){n.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},6296(n,a,o){"use strict";n.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(p,d){this._controllerNames=Object.keys(p),this._controllerList=this._controllerNames.map(function(v){return p[v]}),this._mode=d,this._active=p[d],this._active||(this._mode="turntable",this._active=p.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var f=c.prototype;f.flush=function(p){for(var d=this._controllerList,v=0;v0)throw new Error("Invalid string. Length must be a multiple of 4");var M=_.indexOf("=");M===-1&&(M=b);var x=M===b?0:4-M%4;return[M,x]}function p(_){var b=h(_),M=b[0],x=b[1];return(M+x)*3/4-x}function d(_,b,M){return(b+M)*3/4-M}function v(_){var b,M=h(_),x=M[0],A=M[1],T=new l(d(_,x,A)),y=0,E=A>0?x-4:x,S;for(S=0;S>16&255,T[y++]=b>>8&255,T[y++]=b&255;return A===2&&(b=s[_.charCodeAt(S)]<<2|s[_.charCodeAt(S+1)]>>4,T[y++]=b&255),A===1&&(b=s[_.charCodeAt(S)]<<10|s[_.charCodeAt(S+1)]<<4|s[_.charCodeAt(S+2)]>>2,T[y++]=b>>8&255,T[y++]=b&255),T}function m(_){return o[_>>18&63]+o[_>>12&63]+o[_>>6&63]+o[_&63]}function g(_,b,M){for(var x,A=[],T=b;TE?E:y+T));return x===1?(b=_[M-1],A.push(o[b>>2]+o[b<<4&63]+"==")):x===2&&(b=(_[M-2]<<8)+_[M-1],A.push(o[b>>10]+o[b>>4&63]+o[b<<2&63]+"=")),A.join("")}},3865(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318(n){"use strict";n.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842(n,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);n.exports=p;function p(d,v){if(s(d))return v?h(d,p(v)):[d[0].clone(),d[1].clone()];var m=0,g,w;if(l(d))g=d.clone();else if(typeof d=="string")g=c(d);else{if(d===0)return[u(0),u(1)];if(d===Math.floor(d))g=u(d);else{for(;d!==Math.floor(d);)d=d*Math.pow(2,256),m-=256;g=u(d)}}if(s(v))g.mul(v[1]),w=v[0].clone();else if(l(v))w=v.clone();else if(typeof v=="string")w=c(v);else if(!v)w=u(1);else if(v===Math.floor(v))w=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),m+=256;w=u(v)}return m>0?g=g.ushln(m):m<0&&(w=w.ushln(-m)),f(g,w)}},6330(n,a,o){"use strict";var s=o(1533);n.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return u.cmp(new s(0))}},1369(n,a,o){"use strict";var s=o(5716);n.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var p=0;p20?52:h+32}},1533(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651(n,a,o){"use strict";var s=o(6859),l=o(2361);n.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869(n,a,o){"use strict";var s=o(2651),l=o(5716);n.exports=u;function u(c,f){var h=l(c),p=l(f);if(h===0)return[s(0),s(1)];if(p===0)return[s(0),s(0)];p<0&&(c=c.neg(),f=f.neg());var d=c.gcd(f);return d.cmpn(1)?[c.div(d),f.div(d)]:[c,f]}},6768(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return new s(u)}},6504(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721(n,a,o){"use strict";var s=o(5716);n.exports=l;function l(u){return s(u[0])*s(u[1])}},5572(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946(n,a,o){"use strict";var s=o(1369),l=o(4025);n.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var p=f.abs().divmod(h.abs()),d=p.div,v=s(d),m=p.mod,g=f.negative!==h.negative?-1:1;if(m.cmpn(0)===0)return g*v;if(v){var w=l(v)+4,_=s(m.ushln(w).divRound(h));return g*(v+_*Math.pow(2,-w))}else{var b=h.bitLength()-m.bitLength()+53,_=s(m.ushln(b).divRound(h));return b<1023?g*_*Math.pow(2,-b):(_*=Math.pow(2,-1023),g*_*Math.pow(2,1023-b))}}},2478(n){"use strict";function a(f,h,p,d,v){for(var m=v+1;d<=v;){var g=d+v>>>1,w=f[g],_=p!==void 0?p(w,h):w-h;_>=0?(m=g,v=g-1):d=g+1}return m}function o(f,h,p,d,v){for(var m=v+1;d<=v;){var g=d+v>>>1,w=f[g],_=p!==void 0?p(w,h):w-h;_>0?(m=g,v=g-1):d=g+1}return m}function s(f,h,p,d,v){for(var m=d-1;d<=v;){var g=d+v>>>1,w=f[g],_=p!==void 0?p(w,h):w-h;_<0?(m=g,d=g+1):v=g-1}return m}function l(f,h,p,d,v){for(var m=d-1;d<=v;){var g=d+v>>>1,w=f[g],_=p!==void 0?p(w,h):w-h;_<=0?(m=g,d=g+1):v=g-1}return m}function u(f,h,p,d,v){for(;d<=v;){var m=d+v>>>1,g=f[m],w=p!==void 0?p(g,h):g-h;if(w===0)return m;w<=0?d=m+1:v=m-1}return-1}function c(f,h,p,d,v,m){return typeof p=="function"?m(f,h,p,d===void 0?0:d|0,v===void 0?f.length-1:v|0):m(f,h,void 0,p===void 0?0:p|0,d===void 0?f.length-1:d|0)}n.exports={ge:function(f,h,p,d,v){return c(f,h,p,d,v,a)},gt:function(f,h,p,d,v){return c(f,h,p,d,v,o)},lt:function(f,h,p,d,v){return c(f,h,p,d,v,s)},le:function(f,h,p,d,v){return c(f,h,p,d,v,l)},eq:function(f,h,p,d,v){return c(f,h,p,d,v,u)}}},8828(n,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,p=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--p;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859(n,a,o){n=o.nmd(n),(function(s,l){"use strict";function u(R,L){if(!R)throw new Error(L||"Assertion failed")}function c(R,L){R.super_=L;var I=function(){};I.prototype=L.prototype,R.prototype=new I,R.prototype.constructor=R}function f(R,L,I){if(f.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((L==="le"||L==="be")&&(I=L,L=10),this._init(R||0,L||10,I||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(R){}f.isBN=function(L){return L instanceof f?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===f.wordSize&&Array.isArray(L.words)},f.max=function(L,I){return L.cmp(I)>0?L:I},f.min=function(L,I){return L.cmp(I)<0?L:I},f.prototype._init=function(L,I,B){if(typeof L=="number")return this._initNumber(L,I,B);if(typeof L=="object")return this._initArray(L,I,B);I==="hex"&&(I=16),u(I===(I|0)&&I>=2&&I<=36),L=L.toString().replace(/\s+/g,"");var O=0;L[0]==="-"&&(O++,this.negative=1),O=0;O-=3)X=L[O]|L[O-1]<<8|L[O-2]<<16,this.words[$]|=X<>>26-K&67108863,K+=24,K>=26&&(K-=26,$++);else if(B==="le")for(O=0,$=0;O>>26-K&67108863,K+=24,K>=26&&(K-=26,$++);return this.strip()};function p(R,L){var I=R.charCodeAt(L);return I>=65&&I<=70?I-55:I>=97&&I<=102?I-87:I-48&15}function d(R,L,I){var B=p(R,I);return I-1>=L&&(B|=p(R,I-1)<<4),B}f.prototype._parseHex=function(L,I,B){this.length=Math.ceil((L.length-I)/6),this.words=new Array(this.length);for(var O=0;O=I;O-=2)K=d(L,I,O)<<$,this.words[X]|=K&67108863,$>=18?($-=18,X+=1,this.words[X]|=K>>>26):$+=8;else{var G=L.length-I;for(O=G%2===0?I+1:I;O=18?($-=18,X+=1,this.words[X]|=K>>>26):$+=8}this.strip()};function v(R,L,I,B){for(var O=0,$=Math.min(R.length,I),X=L;X<$;X++){var K=R.charCodeAt(X)-48;O*=B,K>=49?O+=K-49+10:K>=17?O+=K-17+10:O+=K}return O}f.prototype._parseBase=function(L,I,B){this.words=[0],this.length=1;for(var O=0,$=1;$<=67108863;$*=I)O++;O--,$=$/I|0;for(var X=L.length-B,K=X%O,G=Math.min(X,X-K)+B,q=0,J=B;J1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(L,I){L=L||10,I=I|0||1;var B;if(L===16||L==="hex"){B="";for(var O=0,$=0,X=0;X>>24-O&16777215,O+=2,O>=26&&(O-=26,X--),$!==0||X!==this.length-1?B=m[6-G.length]+G+B:B=G+B}for($!==0&&(B=$.toString(16)+B);B.length%I!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(L===(L|0)&&L>=2&&L<=36){var q=g[L],J=w[L];B="";var N=this.clone();for(N.negative=0;!N.isZero();){var V=N.modn(J).toString(L);N=N.idivn(J),N.isZero()?B=V+B:B=m[q-V.length]+V+B}for(this.isZero()&&(B="0"+B);B.length%I!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(L,I){return u(typeof h!="undefined"),this.toArrayLike(h,L,I)},f.prototype.toArray=function(L,I){return this.toArrayLike(Array,L,I)},f.prototype.toArrayLike=function(L,I,B){var O=this.byteLength(),$=B||Math.max(1,O);u(O<=$,"byte array longer than desired length"),u($>0,"Requested array length <= 0"),this.strip();var X=I==="le",K=new L($),G,q,J=this.clone();if(X){for(q=0;!J.isZero();q++)G=J.andln(255),J.iushrn(8),K[q]=G;for(;q<$;q++)K[q]=0}else{for(q=0;q<$-O;q++)K[q]=0;for(q=0;!J.isZero();q++)G=J.andln(255),J.iushrn(8),K[$-q-1]=G}return K},Math.clz32?f.prototype._countBits=function(L){return 32-Math.clz32(L)}:f.prototype._countBits=function(L){var I=L,B=0;return I>=4096&&(B+=13,I>>>=13),I>=64&&(B+=7,I>>>=7),I>=8&&(B+=4,I>>>=4),I>=2&&(B+=2,I>>>=2),B+I},f.prototype._zeroBits=function(L){if(L===0)return 26;var I=L,B=0;return(I&8191)===0&&(B+=13,I>>>=13),(I&127)===0&&(B+=7,I>>>=7),(I&15)===0&&(B+=4,I>>>=4),(I&3)===0&&(B+=2,I>>>=2),(I&1)===0&&B++,B},f.prototype.bitLength=function(){var L=this.words[this.length-1],I=this._countBits(L);return(this.length-1)*26+I};function _(R){for(var L=new Array(R.bitLength()),I=0;I>>O}return L}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,I=0;IL.length?this.clone().ior(L):L.clone().ior(this)},f.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},f.prototype.iuand=function(L){var I;this.length>L.length?I=L:I=this;for(var B=0;BL.length?this.clone().iand(L):L.clone().iand(this)},f.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},f.prototype.iuxor=function(L){var I,B;this.length>L.length?(I=this,B=L):(I=L,B=this);for(var O=0;OL.length?this.clone().ixor(L):L.clone().ixor(this)},f.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},f.prototype.inotn=function(L){u(typeof L=="number"&&L>=0);var I=Math.ceil(L/26)|0,B=L%26;this._expand(I),B>0&&I--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-B,O++);O=0);var B=L/26|0,O=L%26;return this._expand(B+1),I?this.words[B]=this.words[B]|1<L.length?(B=this,O=L):(B=L,O=this);for(var $=0,X=0;X>>26;for(;$!==0&&X>>26;if(this.length=B.length,$!==0)this.words[this.length]=$,this.length++;else if(B!==this)for(;XL.length?this.clone().iadd(L):L.clone().iadd(this)},f.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var I=this.iadd(L);return L.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var B=this.cmp(L);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,$;B>0?(O=this,$=L):(O=L,$=this);for(var X=0,K=0;K<$.length;K++)I=(O.words[K]|0)-($.words[K]|0)+X,X=I>>26,this.words[K]=I&67108863;for(;X!==0&&K>26,this.words[K]=I&67108863;if(X===0&&K>>26,N=G&67108863,V=Math.min(q,L.length-1),Y=Math.max(0,q-R.length+1);Y<=V;Y++){var H=q-Y|0;O=R.words[H]|0,$=L.words[Y]|0,X=O*$+N,J+=X/67108864|0,N=X&67108863}I.words[q]=N|0,G=J|0}return G!==0?I.words[q]=G|0:I.length--,I.strip()}var M=function(L,I,B){var O=L.words,$=I.words,X=B.words,K=0,G,q,J,N=O[0]|0,V=N&8191,Y=N>>>13,H=O[1]|0,j=H&8191,Q=H>>>13,te=O[2]|0,ue=te&8191,ge=te>>>13,Ee=O[3]|0,xe=Ee&8191,ce=Ee>>>13,oe=O[4]|0,Se=oe&8191,be=oe>>>13,fe=O[5]|0,ee=fe&8191,ae=fe>>>13,_e=O[6]|0,re=_e&8191,pe=_e>>>13,Te=O[7]|0,Ce=Te&8191,ze=Te>>>13,we=O[8]|0,me=we&8191,Le=we>>>13,Ne=O[9]|0,Je=Ne&8191,rt=Ne>>>13,mt=$[0]|0,dt=mt&8191,St=mt>>>13,Ke=$[1]|0,bt=Ke&8191,pt=Ke>>>13,Oe=$[2]|0,Ue=Oe&8191,je=Oe>>>13,$e=$[3]|0,Ie=$e&8191,Ve=$e>>>13,st=$[4]|0,_t=st&8191,Wt=st>>>13,Ht=$[5]|0,fr=Ht&8191,lr=Ht>>>13,Ot=$[6]|0,Jt=Ot&8191,Cr=Ot>>>13,Ge=$[7]|0,Qe=Ge&8191,nt=Ge>>>13,gt=$[8]|0,ht=gt&8191,Ft=gt>>>13,hr=$[9]|0,Ut=hr&8191,Lr=hr>>>13;B.negative=L.negative^I.negative,B.length=19,G=Math.imul(V,dt),q=Math.imul(V,St),q=q+Math.imul(Y,dt)|0,J=Math.imul(Y,St);var jr=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(jr>>>26)|0,jr&=67108863,G=Math.imul(j,dt),q=Math.imul(j,St),q=q+Math.imul(Q,dt)|0,J=Math.imul(Q,St),G=G+Math.imul(V,bt)|0,q=q+Math.imul(V,pt)|0,q=q+Math.imul(Y,bt)|0,J=J+Math.imul(Y,pt)|0;var ii=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ii>>>26)|0,ii&=67108863,G=Math.imul(ue,dt),q=Math.imul(ue,St),q=q+Math.imul(ge,dt)|0,J=Math.imul(ge,St),G=G+Math.imul(j,bt)|0,q=q+Math.imul(j,pt)|0,q=q+Math.imul(Q,bt)|0,J=J+Math.imul(Q,pt)|0,G=G+Math.imul(V,Ue)|0,q=q+Math.imul(V,je)|0,q=q+Math.imul(Y,Ue)|0,J=J+Math.imul(Y,je)|0;var Fr=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,G=Math.imul(xe,dt),q=Math.imul(xe,St),q=q+Math.imul(ce,dt)|0,J=Math.imul(ce,St),G=G+Math.imul(ue,bt)|0,q=q+Math.imul(ue,pt)|0,q=q+Math.imul(ge,bt)|0,J=J+Math.imul(ge,pt)|0,G=G+Math.imul(j,Ue)|0,q=q+Math.imul(j,je)|0,q=q+Math.imul(Q,Ue)|0,J=J+Math.imul(Q,je)|0,G=G+Math.imul(V,Ie)|0,q=q+Math.imul(V,Ve)|0,q=q+Math.imul(Y,Ie)|0,J=J+Math.imul(Y,Ve)|0;var Ii=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,G=Math.imul(Se,dt),q=Math.imul(Se,St),q=q+Math.imul(be,dt)|0,J=Math.imul(be,St),G=G+Math.imul(xe,bt)|0,q=q+Math.imul(xe,pt)|0,q=q+Math.imul(ce,bt)|0,J=J+Math.imul(ce,pt)|0,G=G+Math.imul(ue,Ue)|0,q=q+Math.imul(ue,je)|0,q=q+Math.imul(ge,Ue)|0,J=J+Math.imul(ge,je)|0,G=G+Math.imul(j,Ie)|0,q=q+Math.imul(j,Ve)|0,q=q+Math.imul(Q,Ie)|0,J=J+Math.imul(Q,Ve)|0,G=G+Math.imul(V,_t)|0,q=q+Math.imul(V,Wt)|0,q=q+Math.imul(Y,_t)|0,J=J+Math.imul(Y,Wt)|0;var Xi=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,G=Math.imul(ee,dt),q=Math.imul(ee,St),q=q+Math.imul(ae,dt)|0,J=Math.imul(ae,St),G=G+Math.imul(Se,bt)|0,q=q+Math.imul(Se,pt)|0,q=q+Math.imul(be,bt)|0,J=J+Math.imul(be,pt)|0,G=G+Math.imul(xe,Ue)|0,q=q+Math.imul(xe,je)|0,q=q+Math.imul(ce,Ue)|0,J=J+Math.imul(ce,je)|0,G=G+Math.imul(ue,Ie)|0,q=q+Math.imul(ue,Ve)|0,q=q+Math.imul(ge,Ie)|0,J=J+Math.imul(ge,Ve)|0,G=G+Math.imul(j,_t)|0,q=q+Math.imul(j,Wt)|0,q=q+Math.imul(Q,_t)|0,J=J+Math.imul(Q,Wt)|0,G=G+Math.imul(V,fr)|0,q=q+Math.imul(V,lr)|0,q=q+Math.imul(Y,fr)|0,J=J+Math.imul(Y,lr)|0;var ln=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ln>>>26)|0,ln&=67108863,G=Math.imul(re,dt),q=Math.imul(re,St),q=q+Math.imul(pe,dt)|0,J=Math.imul(pe,St),G=G+Math.imul(ee,bt)|0,q=q+Math.imul(ee,pt)|0,q=q+Math.imul(ae,bt)|0,J=J+Math.imul(ae,pt)|0,G=G+Math.imul(Se,Ue)|0,q=q+Math.imul(Se,je)|0,q=q+Math.imul(be,Ue)|0,J=J+Math.imul(be,je)|0,G=G+Math.imul(xe,Ie)|0,q=q+Math.imul(xe,Ve)|0,q=q+Math.imul(ce,Ie)|0,J=J+Math.imul(ce,Ve)|0,G=G+Math.imul(ue,_t)|0,q=q+Math.imul(ue,Wt)|0,q=q+Math.imul(ge,_t)|0,J=J+Math.imul(ge,Wt)|0,G=G+Math.imul(j,fr)|0,q=q+Math.imul(j,lr)|0,q=q+Math.imul(Q,fr)|0,J=J+Math.imul(Q,lr)|0,G=G+Math.imul(V,Jt)|0,q=q+Math.imul(V,Cr)|0,q=q+Math.imul(Y,Jt)|0,J=J+Math.imul(Y,Cr)|0;var la=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(la>>>26)|0,la&=67108863,G=Math.imul(Ce,dt),q=Math.imul(Ce,St),q=q+Math.imul(ze,dt)|0,J=Math.imul(ze,St),G=G+Math.imul(re,bt)|0,q=q+Math.imul(re,pt)|0,q=q+Math.imul(pe,bt)|0,J=J+Math.imul(pe,pt)|0,G=G+Math.imul(ee,Ue)|0,q=q+Math.imul(ee,je)|0,q=q+Math.imul(ae,Ue)|0,J=J+Math.imul(ae,je)|0,G=G+Math.imul(Se,Ie)|0,q=q+Math.imul(Se,Ve)|0,q=q+Math.imul(be,Ie)|0,J=J+Math.imul(be,Ve)|0,G=G+Math.imul(xe,_t)|0,q=q+Math.imul(xe,Wt)|0,q=q+Math.imul(ce,_t)|0,J=J+Math.imul(ce,Wt)|0,G=G+Math.imul(ue,fr)|0,q=q+Math.imul(ue,lr)|0,q=q+Math.imul(ge,fr)|0,J=J+Math.imul(ge,lr)|0,G=G+Math.imul(j,Jt)|0,q=q+Math.imul(j,Cr)|0,q=q+Math.imul(Q,Jt)|0,J=J+Math.imul(Q,Cr)|0,G=G+Math.imul(V,Qe)|0,q=q+Math.imul(V,nt)|0,q=q+Math.imul(Y,Qe)|0,J=J+Math.imul(Y,nt)|0;var mo=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(mo>>>26)|0,mo&=67108863,G=Math.imul(me,dt),q=Math.imul(me,St),q=q+Math.imul(Le,dt)|0,J=Math.imul(Le,St),G=G+Math.imul(Ce,bt)|0,q=q+Math.imul(Ce,pt)|0,q=q+Math.imul(ze,bt)|0,J=J+Math.imul(ze,pt)|0,G=G+Math.imul(re,Ue)|0,q=q+Math.imul(re,je)|0,q=q+Math.imul(pe,Ue)|0,J=J+Math.imul(pe,je)|0,G=G+Math.imul(ee,Ie)|0,q=q+Math.imul(ee,Ve)|0,q=q+Math.imul(ae,Ie)|0,J=J+Math.imul(ae,Ve)|0,G=G+Math.imul(Se,_t)|0,q=q+Math.imul(Se,Wt)|0,q=q+Math.imul(be,_t)|0,J=J+Math.imul(be,Wt)|0,G=G+Math.imul(xe,fr)|0,q=q+Math.imul(xe,lr)|0,q=q+Math.imul(ce,fr)|0,J=J+Math.imul(ce,lr)|0,G=G+Math.imul(ue,Jt)|0,q=q+Math.imul(ue,Cr)|0,q=q+Math.imul(ge,Jt)|0,J=J+Math.imul(ge,Cr)|0,G=G+Math.imul(j,Qe)|0,q=q+Math.imul(j,nt)|0,q=q+Math.imul(Q,Qe)|0,J=J+Math.imul(Q,nt)|0,G=G+Math.imul(V,ht)|0,q=q+Math.imul(V,Ft)|0,q=q+Math.imul(Y,ht)|0,J=J+Math.imul(Y,Ft)|0;var pn=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(pn>>>26)|0,pn&=67108863,G=Math.imul(Je,dt),q=Math.imul(Je,St),q=q+Math.imul(rt,dt)|0,J=Math.imul(rt,St),G=G+Math.imul(me,bt)|0,q=q+Math.imul(me,pt)|0,q=q+Math.imul(Le,bt)|0,J=J+Math.imul(Le,pt)|0,G=G+Math.imul(Ce,Ue)|0,q=q+Math.imul(Ce,je)|0,q=q+Math.imul(ze,Ue)|0,J=J+Math.imul(ze,je)|0,G=G+Math.imul(re,Ie)|0,q=q+Math.imul(re,Ve)|0,q=q+Math.imul(pe,Ie)|0,J=J+Math.imul(pe,Ve)|0,G=G+Math.imul(ee,_t)|0,q=q+Math.imul(ee,Wt)|0,q=q+Math.imul(ae,_t)|0,J=J+Math.imul(ae,Wt)|0,G=G+Math.imul(Se,fr)|0,q=q+Math.imul(Se,lr)|0,q=q+Math.imul(be,fr)|0,J=J+Math.imul(be,lr)|0,G=G+Math.imul(xe,Jt)|0,q=q+Math.imul(xe,Cr)|0,q=q+Math.imul(ce,Jt)|0,J=J+Math.imul(ce,Cr)|0,G=G+Math.imul(ue,Qe)|0,q=q+Math.imul(ue,nt)|0,q=q+Math.imul(ge,Qe)|0,J=J+Math.imul(ge,nt)|0,G=G+Math.imul(j,ht)|0,q=q+Math.imul(j,Ft)|0,q=q+Math.imul(Q,ht)|0,J=J+Math.imul(Q,Ft)|0,G=G+Math.imul(V,Ut)|0,q=q+Math.imul(V,Lr)|0,q=q+Math.imul(Y,Ut)|0,J=J+Math.imul(Y,Lr)|0;var zn=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(zn>>>26)|0,zn&=67108863,G=Math.imul(Je,bt),q=Math.imul(Je,pt),q=q+Math.imul(rt,bt)|0,J=Math.imul(rt,pt),G=G+Math.imul(me,Ue)|0,q=q+Math.imul(me,je)|0,q=q+Math.imul(Le,Ue)|0,J=J+Math.imul(Le,je)|0,G=G+Math.imul(Ce,Ie)|0,q=q+Math.imul(Ce,Ve)|0,q=q+Math.imul(ze,Ie)|0,J=J+Math.imul(ze,Ve)|0,G=G+Math.imul(re,_t)|0,q=q+Math.imul(re,Wt)|0,q=q+Math.imul(pe,_t)|0,J=J+Math.imul(pe,Wt)|0,G=G+Math.imul(ee,fr)|0,q=q+Math.imul(ee,lr)|0,q=q+Math.imul(ae,fr)|0,J=J+Math.imul(ae,lr)|0,G=G+Math.imul(Se,Jt)|0,q=q+Math.imul(Se,Cr)|0,q=q+Math.imul(be,Jt)|0,J=J+Math.imul(be,Cr)|0,G=G+Math.imul(xe,Qe)|0,q=q+Math.imul(xe,nt)|0,q=q+Math.imul(ce,Qe)|0,J=J+Math.imul(ce,nt)|0,G=G+Math.imul(ue,ht)|0,q=q+Math.imul(ue,Ft)|0,q=q+Math.imul(ge,ht)|0,J=J+Math.imul(ge,Ft)|0,G=G+Math.imul(j,Ut)|0,q=q+Math.imul(j,Lr)|0,q=q+Math.imul(Q,Ut)|0,J=J+Math.imul(Q,Lr)|0;var gn=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(gn>>>26)|0,gn&=67108863,G=Math.imul(Je,Ue),q=Math.imul(Je,je),q=q+Math.imul(rt,Ue)|0,J=Math.imul(rt,je),G=G+Math.imul(me,Ie)|0,q=q+Math.imul(me,Ve)|0,q=q+Math.imul(Le,Ie)|0,J=J+Math.imul(Le,Ve)|0,G=G+Math.imul(Ce,_t)|0,q=q+Math.imul(Ce,Wt)|0,q=q+Math.imul(ze,_t)|0,J=J+Math.imul(ze,Wt)|0,G=G+Math.imul(re,fr)|0,q=q+Math.imul(re,lr)|0,q=q+Math.imul(pe,fr)|0,J=J+Math.imul(pe,lr)|0,G=G+Math.imul(ee,Jt)|0,q=q+Math.imul(ee,Cr)|0,q=q+Math.imul(ae,Jt)|0,J=J+Math.imul(ae,Cr)|0,G=G+Math.imul(Se,Qe)|0,q=q+Math.imul(Se,nt)|0,q=q+Math.imul(be,Qe)|0,J=J+Math.imul(be,nt)|0,G=G+Math.imul(xe,ht)|0,q=q+Math.imul(xe,Ft)|0,q=q+Math.imul(ce,ht)|0,J=J+Math.imul(ce,Ft)|0,G=G+Math.imul(ue,Ut)|0,q=q+Math.imul(ue,Lr)|0,q=q+Math.imul(ge,Ut)|0,J=J+Math.imul(ge,Lr)|0;var ns=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ns>>>26)|0,ns&=67108863,G=Math.imul(Je,Ie),q=Math.imul(Je,Ve),q=q+Math.imul(rt,Ie)|0,J=Math.imul(rt,Ve),G=G+Math.imul(me,_t)|0,q=q+Math.imul(me,Wt)|0,q=q+Math.imul(Le,_t)|0,J=J+Math.imul(Le,Wt)|0,G=G+Math.imul(Ce,fr)|0,q=q+Math.imul(Ce,lr)|0,q=q+Math.imul(ze,fr)|0,J=J+Math.imul(ze,lr)|0,G=G+Math.imul(re,Jt)|0,q=q+Math.imul(re,Cr)|0,q=q+Math.imul(pe,Jt)|0,J=J+Math.imul(pe,Cr)|0,G=G+Math.imul(ee,Qe)|0,q=q+Math.imul(ee,nt)|0,q=q+Math.imul(ae,Qe)|0,J=J+Math.imul(ae,nt)|0,G=G+Math.imul(Se,ht)|0,q=q+Math.imul(Se,Ft)|0,q=q+Math.imul(be,ht)|0,J=J+Math.imul(be,Ft)|0,G=G+Math.imul(xe,Ut)|0,q=q+Math.imul(xe,Lr)|0,q=q+Math.imul(ce,Ut)|0,J=J+Math.imul(ce,Lr)|0;var ua=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ua>>>26)|0,ua&=67108863,G=Math.imul(Je,_t),q=Math.imul(Je,Wt),q=q+Math.imul(rt,_t)|0,J=Math.imul(rt,Wt),G=G+Math.imul(me,fr)|0,q=q+Math.imul(me,lr)|0,q=q+Math.imul(Le,fr)|0,J=J+Math.imul(Le,lr)|0,G=G+Math.imul(Ce,Jt)|0,q=q+Math.imul(Ce,Cr)|0,q=q+Math.imul(ze,Jt)|0,J=J+Math.imul(ze,Cr)|0,G=G+Math.imul(re,Qe)|0,q=q+Math.imul(re,nt)|0,q=q+Math.imul(pe,Qe)|0,J=J+Math.imul(pe,nt)|0,G=G+Math.imul(ee,ht)|0,q=q+Math.imul(ee,Ft)|0,q=q+Math.imul(ae,ht)|0,J=J+Math.imul(ae,Ft)|0,G=G+Math.imul(Se,Ut)|0,q=q+Math.imul(Se,Lr)|0,q=q+Math.imul(be,Ut)|0,J=J+Math.imul(be,Lr)|0;var as=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(as>>>26)|0,as&=67108863,G=Math.imul(Je,fr),q=Math.imul(Je,lr),q=q+Math.imul(rt,fr)|0,J=Math.imul(rt,lr),G=G+Math.imul(me,Jt)|0,q=q+Math.imul(me,Cr)|0,q=q+Math.imul(Le,Jt)|0,J=J+Math.imul(Le,Cr)|0,G=G+Math.imul(Ce,Qe)|0,q=q+Math.imul(Ce,nt)|0,q=q+Math.imul(ze,Qe)|0,J=J+Math.imul(ze,nt)|0,G=G+Math.imul(re,ht)|0,q=q+Math.imul(re,Ft)|0,q=q+Math.imul(pe,ht)|0,J=J+Math.imul(pe,Ft)|0,G=G+Math.imul(ee,Ut)|0,q=q+Math.imul(ee,Lr)|0,q=q+Math.imul(ae,Ut)|0,J=J+Math.imul(ae,Lr)|0;var ro=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ro>>>26)|0,ro&=67108863,G=Math.imul(Je,Jt),q=Math.imul(Je,Cr),q=q+Math.imul(rt,Jt)|0,J=Math.imul(rt,Cr),G=G+Math.imul(me,Qe)|0,q=q+Math.imul(me,nt)|0,q=q+Math.imul(Le,Qe)|0,J=J+Math.imul(Le,nt)|0,G=G+Math.imul(Ce,ht)|0,q=q+Math.imul(Ce,Ft)|0,q=q+Math.imul(ze,ht)|0,J=J+Math.imul(ze,Ft)|0,G=G+Math.imul(re,Ut)|0,q=q+Math.imul(re,Lr)|0,q=q+Math.imul(pe,Ut)|0,J=J+Math.imul(pe,Lr)|0;var ba=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ba>>>26)|0,ba&=67108863,G=Math.imul(Je,Qe),q=Math.imul(Je,nt),q=q+Math.imul(rt,Qe)|0,J=Math.imul(rt,nt),G=G+Math.imul(me,ht)|0,q=q+Math.imul(me,Ft)|0,q=q+Math.imul(Le,ht)|0,J=J+Math.imul(Le,Ft)|0,G=G+Math.imul(Ce,Ut)|0,q=q+Math.imul(Ce,Lr)|0,q=q+Math.imul(ze,Ut)|0,J=J+Math.imul(ze,Lr)|0;var co=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(co>>>26)|0,co&=67108863,G=Math.imul(Je,ht),q=Math.imul(Je,Ft),q=q+Math.imul(rt,ht)|0,J=Math.imul(rt,Ft),G=G+Math.imul(me,Ut)|0,q=q+Math.imul(me,Lr)|0,q=q+Math.imul(Le,Ut)|0,J=J+Math.imul(Le,Lr)|0;var Us=(K+G|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Us>>>26)|0,Us&=67108863,G=Math.imul(Je,Ut),q=Math.imul(Je,Lr),q=q+Math.imul(rt,Ut)|0,J=Math.imul(rt,Lr);var Ma=(K+G|0)+((q&8191)<<13)|0;return K=(J+(q>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,X[0]=jr,X[1]=ii,X[2]=Fr,X[3]=Ii,X[4]=Xi,X[5]=ln,X[6]=la,X[7]=mo,X[8]=pn,X[9]=zn,X[10]=gn,X[11]=ns,X[12]=ua,X[13]=as,X[14]=ro,X[15]=ba,X[16]=co,X[17]=Us,X[18]=Ma,K!==0&&(X[19]=K,B.length++),B};Math.imul||(M=b);function x(R,L,I){I.negative=L.negative^R.negative,I.length=R.length+L.length;for(var B=0,O=0,$=0;$>>26)|0,O+=X>>>26,X&=67108863}I.words[$]=K,B=X,X=O}return B!==0?I.words[$]=B:I.length--,I.strip()}function A(R,L,I){var B=new T;return B.mulp(R,L,I)}f.prototype.mulTo=function(L,I){var B,O=this.length+L.length;return this.length===10&&L.length===10?B=M(this,L,I):O<63?B=b(this,L,I):O<1024?B=x(this,L,I):B=A(this,L,I),B};function T(R,L){this.x=R,this.y=L}T.prototype.makeRBT=function(L){for(var I=new Array(L),B=f.prototype._countBits(L)-1,O=0;O>=1;return O},T.prototype.permute=function(L,I,B,O,$,X){for(var K=0;K>>1)$++;return 1<<$+1+O},T.prototype.conjugate=function(L,I,B){if(!(B<=1))for(var O=0;O>>13,B[2*X+1]=$&8191,$=$>>>13;for(X=2*I;X>=26,I+=O/67108864|0,I+=$>>>26,this.words[B]=$&67108863}return I!==0&&(this.words[B]=I,this.length++),L===0&&(this.length=1,this._normSign()),this},f.prototype.muln=function(L){return this.clone().imuln(L)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(L){var I=_(L);if(I.length===0)return new f(1);for(var B=this,O=0;O=0);var I=L%26,B=(L-I)/26,O=67108863>>>26-I<<26-I,$;if(I!==0){var X=0;for($=0;$>>26-I}X&&(this.words[$]=X,this.length++)}if(B!==0){for($=this.length-1;$>=0;$--)this.words[$+B]=this.words[$];for($=0;$=0);var O;I?O=(I-I%26)/26:O=0;var $=L%26,X=Math.min((L-$)/26,this.length),K=67108863^67108863>>>$<<$,G=B;if(O-=X,O=Math.max(0,O),G){for(var q=0;qX)for(this.length-=X,q=0;q=0&&(J!==0||q>=O);q--){var N=this.words[q]|0;this.words[q]=J<<26-$|N>>>$,J=N&K}return G&&J!==0&&(G.words[G.length++]=J),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(L,I,B){return u(this.negative===0),this.iushrn(L,I,B)},f.prototype.shln=function(L){return this.clone().ishln(L)},f.prototype.ushln=function(L){return this.clone().iushln(L)},f.prototype.shrn=function(L){return this.clone().ishrn(L)},f.prototype.ushrn=function(L){return this.clone().iushrn(L)},f.prototype.testn=function(L){u(typeof L=="number"&&L>=0);var I=L%26,B=(L-I)/26,O=1<=0);var I=L%26,B=(L-I)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(I!==0&&B++,this.length=Math.min(B,this.length),I!==0){var O=67108863^67108863>>>I<=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},f.prototype.isubn=function(L){if(u(typeof L=="number"),u(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I>26)-(G/67108864|0),this.words[$+B]=X&67108863}for(;$>26,this.words[$+B]=X&67108863;if(K===0)return this.strip();for(u(K===-1),K=0,$=0;$>26,this.words[$]=X&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(L,I){var B=this.length-L.length,O=this.clone(),$=L,X=$.words[$.length-1]|0,K=this._countBits(X);B=26-K,B!==0&&($=$.ushln(B),O.iushln(B),X=$.words[$.length-1]|0);var G=O.length-$.length,q;if(I!=="mod"){q=new f(null),q.length=G+1,q.words=new Array(q.length);for(var J=0;J=0;V--){var Y=(O.words[$.length+V]|0)*67108864+(O.words[$.length+V-1]|0);for(Y=Math.min(Y/X|0,67108863),O._ishlnsubmul($,Y,V);O.negative!==0;)Y--,O.negative=0,O._ishlnsubmul($,1,V),O.isZero()||(O.negative^=1);q&&(q.words[V]=Y)}return q&&q.strip(),O.strip(),I!=="div"&&B!==0&&O.iushrn(B),{div:q||null,mod:O}},f.prototype.divmod=function(L,I,B){if(u(!L.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var O,$,X;return this.negative!==0&&L.negative===0?(X=this.neg().divmod(L,I),I!=="mod"&&(O=X.div.neg()),I!=="div"&&($=X.mod.neg(),B&&$.negative!==0&&$.iadd(L)),{div:O,mod:$}):this.negative===0&&L.negative!==0?(X=this.divmod(L.neg(),I),I!=="mod"&&(O=X.div.neg()),{div:O,mod:X.mod}):(this.negative&L.negative)!==0?(X=this.neg().divmod(L.neg(),I),I!=="div"&&($=X.mod.neg(),B&&$.negative!==0&&$.isub(L)),{div:X.div,mod:$}):L.length>this.length||this.cmp(L)<0?{div:new f(0),mod:this}:L.length===1?I==="div"?{div:this.divn(L.words[0]),mod:null}:I==="mod"?{div:null,mod:new f(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new f(this.modn(L.words[0]))}:this._wordDiv(L,I)},f.prototype.div=function(L){return this.divmod(L,"div",!1).div},f.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},f.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},f.prototype.divRound=function(L){var I=this.divmod(L);if(I.mod.isZero())return I.div;var B=I.mod.abs(),O=L.abs().iushrn(1),$=L.words[0]&1,X=B.cmp(O);if(X<0||$===1&&X===0)return I.div;var K=new f(1);return K.negative=this.negative^L.negative,I.div.iadd(K)},f.prototype.modn=function(L){u(L<=67108863);for(var I=(1<<26)%L,B=0,O=this.length-1;O>=0;O--)B=(I*B+(this.words[O]|0))%L;return B},f.prototype.idivn=function(L){u(L<=67108863);for(var I=0,B=this.length-1;B>=0;B--){var O=(this.words[B]|0)+I*67108864;this.words[B]=O/L|0,I=O%L}return this.strip()},f.prototype.divn=function(L){return this.clone().idivn(L)},f.prototype.egcd=function(L){u(L.negative===0),u(!L.isZero());var I=this,B=L.clone();I.negative!==0?I=I.umod(L):I=I.clone();for(var O=new f(1),$=new f(0),X=new f(0),K=new f(1),G=0;I.isEven()&&B.isEven();)I.iushrn(1),B.iushrn(1),++G;for(var q=B.clone(),J=I.clone();!I.isZero();){for(var N=0,V=1;(I.words[0]&V)===0&&N<26;++N,V<<=1);if(N>0)for(I.iushrn(N);N-- >0;)(O.isOdd()||$.isOdd())&&(O.iadd(q),$.isub(J)),O.iushrn(1),$.iushrn(1);for(var Y=0,H=1;(B.words[0]&H)===0&&Y<26;++Y,H<<=1);if(Y>0)for(B.iushrn(Y);Y-- >0;)(X.isOdd()||K.isOdd())&&(X.iadd(q),K.isub(J)),X.iushrn(1),K.iushrn(1);I.cmp(B)>=0?(I.isub(B),O.isub(X),$.isub(K)):(B.isub(I),X.isub(O),K.isub($))}return{a:X,b:K,gcd:B.iushln(G)}},f.prototype._invmp=function(L){u(L.negative===0),u(!L.isZero());var I=this,B=L.clone();I.negative!==0?I=I.umod(L):I=I.clone();for(var O=new f(1),$=new f(0),X=B.clone();I.cmpn(1)>0&&B.cmpn(1)>0;){for(var K=0,G=1;(I.words[0]&G)===0&&K<26;++K,G<<=1);if(K>0)for(I.iushrn(K);K-- >0;)O.isOdd()&&O.iadd(X),O.iushrn(1);for(var q=0,J=1;(B.words[0]&J)===0&&q<26;++q,J<<=1);if(q>0)for(B.iushrn(q);q-- >0;)$.isOdd()&&$.iadd(X),$.iushrn(1);I.cmp(B)>=0?(I.isub(B),O.isub($)):(B.isub(I),$.isub(O))}var N;return I.cmpn(1)===0?N=O:N=$,N.cmpn(0)<0&&N.iadd(L),N},f.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var I=this.clone(),B=L.clone();I.negative=0,B.negative=0;for(var O=0;I.isEven()&&B.isEven();O++)I.iushrn(1),B.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;B.isEven();)B.iushrn(1);var $=I.cmp(B);if($<0){var X=I;I=B,B=X}else if($===0||B.cmpn(1)===0)break;I.isub(B)}while(!0);return B.iushln(O)},f.prototype.invm=function(L){return this.egcd(L).a.umod(L)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(L){return this.words[0]&L},f.prototype.bincn=function(L){u(typeof L=="number");var I=L%26,B=(L-I)/26,O=1<>>26,K&=67108863,this.words[X]=K}return $!==0&&(this.words[X]=$,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(L){var I=L<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this.strip();var B;if(this.length>1)B=1;else{I&&(L=-L),u(L<=67108863,"Number is too big");var O=this.words[0]|0;B=O===L?0:OL.length)return 1;if(this.length=0;B--){var O=this.words[B]|0,$=L.words[B]|0;if(O!==$){O<$?I=-1:O>$&&(I=1);break}}return I},f.prototype.gtn=function(L){return this.cmpn(L)===1},f.prototype.gt=function(L){return this.cmp(L)===1},f.prototype.gten=function(L){return this.cmpn(L)>=0},f.prototype.gte=function(L){return this.cmp(L)>=0},f.prototype.ltn=function(L){return this.cmpn(L)===-1},f.prototype.lt=function(L){return this.cmp(L)===-1},f.prototype.lten=function(L){return this.cmpn(L)<=0},f.prototype.lte=function(L){return this.cmp(L)<=0},f.prototype.eqn=function(L){return this.cmpn(L)===0},f.prototype.eq=function(L){return this.cmp(L)===0},f.red=function(L){return new F(L)},f.prototype.toRed=function(L){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(L){return this.red=L,this},f.prototype.forceRed=function(L){return u(!this.red,"Already a number in reduction context"),this._forceRed(L)},f.prototype.redAdd=function(L){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},f.prototype.redIAdd=function(L){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},f.prototype.redSub=function(L){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},f.prototype.redISub=function(L){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},f.prototype.redShl=function(L){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},f.prototype.redMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},f.prototype.redIMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(L){return u(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var y={k256:null,p224:null,p192:null,p25519:null};function E(R,L){this.name=R,this.p=new f(L,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}E.prototype._tmp=function(){var L=new f(null);return L.words=new Array(Math.ceil(this.n/13)),L},E.prototype.ireduce=function(L){var I=L,B;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),B=I.bitLength();while(B>this.n);var O=B0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},E.prototype.split=function(L,I){L.iushrn(this.n,0,I)},E.prototype.imulK=function(L){return L.imul(this.k)};function S(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(S,E),S.prototype.split=function(L,I){for(var B=4194303,O=Math.min(L.length,9),$=0;$>>22,X=K}X>>>=22,L.words[$-10]=X,X===0&&L.length>10?L.length-=10:L.length-=9},S.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var I=0,B=0;B>>=26,L.words[B]=$,I=O}return I!==0&&(L.words[L.length++]=I),L},f._prime=function(L){if(y[L])return y[L];var I;if(L==="k256")I=new S;else if(L==="p224")I=new C;else if(L==="p192")I=new k;else if(L==="p25519")I=new D;else throw new Error("Unknown prime "+L);return y[L]=I,I};function F(R){if(typeof R=="string"){var L=f._prime(R);this.m=L.p,this.prime=L}else u(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}F.prototype._verify1=function(L){u(L.negative===0,"red works only with positives"),u(L.red,"red works only with red numbers")},F.prototype._verify2=function(L,I){u((L.negative|I.negative)===0,"red works only with positives"),u(L.red&&L.red===I.red,"red works only with red numbers")},F.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},F.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},F.prototype.add=function(L,I){this._verify2(L,I);var B=L.add(I);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},F.prototype.iadd=function(L,I){this._verify2(L,I);var B=L.iadd(I);return B.cmp(this.m)>=0&&B.isub(this.m),B},F.prototype.sub=function(L,I){this._verify2(L,I);var B=L.sub(I);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},F.prototype.isub=function(L,I){this._verify2(L,I);var B=L.isub(I);return B.cmpn(0)<0&&B.iadd(this.m),B},F.prototype.shl=function(L,I){return this._verify1(L),this.imod(L.ushln(I))},F.prototype.imul=function(L,I){return this._verify2(L,I),this.imod(L.imul(I))},F.prototype.mul=function(L,I){return this._verify2(L,I),this.imod(L.mul(I))},F.prototype.isqr=function(L){return this.imul(L,L.clone())},F.prototype.sqr=function(L){return this.mul(L,L)},F.prototype.sqrt=function(L){if(L.isZero())return L.clone();var I=this.m.andln(3);if(u(I%2===1),I===3){var B=this.m.add(new f(1)).iushrn(2);return this.pow(L,B)}for(var O=this.m.subn(1),$=0;!O.isZero()&&O.andln(1)===0;)$++,O.iushrn(1);u(!O.isZero());var X=new f(1).toRed(this),K=X.redNeg(),G=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new f(2*q*q).toRed(this);this.pow(q,G).cmp(K)!==0;)q.redIAdd(K);for(var J=this.pow(q,O),N=this.pow(L,O.addn(1).iushrn(1)),V=this.pow(L,O),Y=$;V.cmp(X)!==0;){for(var H=V,j=0;H.cmp(X)!==0;j++)H=H.redSqr();u(j=0;$--){for(var J=I.words[$],N=q-1;N>=0;N--){var V=J>>N&1;if(X!==O[0]&&(X=this.sqr(X)),V===0&&K===0){G=0;continue}K<<=1,K|=V,G++,!(G!==B&&($!==0||N!==0))&&(X=this.mul(X,O[K]),G=0,K=0)}q=26}return X},F.prototype.convertTo=function(L){var I=L.umod(this.m);return I===L?I.clone():I},F.prototype.convertFrom=function(L){var I=L.clone();return I.red=null,I},f.mont=function(L){return new P(L)};function P(R){F.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c(P,F),P.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},P.prototype.convertFrom=function(L){var I=this.imod(L.mul(this.rinv));return I.red=null,I},P.prototype.imul=function(L,I){if(L.isZero()||I.isZero())return L.words[0]=0,L.length=1,L;var B=L.imul(I),O=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(O).iushrn(this.shift),X=$;return $.cmp(this.m)>=0?X=$.isub(this.m):$.cmpn(0)<0&&(X=$.iadd(this.m)),X._forceRed(this)},P.prototype.mul=function(L,I){if(L.isZero()||I.isZero())return new f(0)._forceRed(this);var B=L.mul(I),O=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(O).iushrn(this.shift),X=$;return $.cmp(this.m)>=0?X=$.isub(this.m):$.cmpn(0)<0&&(X=$.iadd(this.m)),X._forceRed(this)},P.prototype.invm=function(L){var I=this.imod(L._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(n,this)},6204(n){"use strict";n.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(T<=0)){var y,E=s.mallocDouble(2*T*x),S=s.mallocInt32(x);if(x=f(w,T,E,S),x>0){if(T===1&&M)l.init(x),y=l.sweepComplete(T,b,0,x,E,S,0,x,E,S);else{var C=s.mallocDouble(2*T*A),k=s.mallocInt32(A);A=f(_,T,C,k),A>0&&(l.init(x+A),T===1?y=l.sweepBipartite(T,b,0,x,E,S,0,A,C,k):y=u(T,b,M,x,E,S,A,C,k),s.free(C),s.free(k))}s.free(E),s.free(S)}return y}}}var p;function d(w,_){p.push([w,_])}function v(w){return p=[],h(w,w,d,!0),p}function m(w,_){return p=[],h(w,_,d,!1),p}function g(w,_,b){switch(arguments.length){case 1:return v(w);case 2:return typeof _=="function"?h(w,w,_,!0):m(w,_);case 3:return h(w,_,b,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(n,a){"use strict";function o(){function u(h,p,d,v,m,g,w,_,b,M,x){for(var A=2*h,T=v,y=A*v;Tb-_?u(h,p,d,v,m,g,w,_,b,M,x):c(h,p,d,v,m,g,w,_,b,M,x)}return f}function s(){function u(d,v,m,g,w,_,b,M,x,A,T){for(var y=2*d,E=g,S=y*g;EA-x?g?u(d,v,m,w,_,b,M,x,A,T,y):c(d,v,m,w,_,b,M,x,A,T,y):g?f(d,v,m,w,_,b,M,x,A,T,y):h(d,v,m,w,_,b,M,x,A,T,y)}return p}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150(n,a,o){"use strict";n.exports=R;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),p=o(3545),d=o(8105),v=128,m=1<<22,g=1<<22,w=d("!(lo>=p0)&&!(p1>=hi)"),_=d("lo===p0"),b=d("lo0;){J-=1;var Y=J*T,H=S[Y],j=S[Y+1],Q=S[Y+2],te=S[Y+3],ue=S[Y+4],ge=S[Y+5],Ee=J*y,xe=C[Ee],ce=C[Ee+1],oe=ge&1,Se=!!(ge&16),be=$,fe=X,ee=G,ae=q;if(oe&&(be=G,fe=q,ee=$,ae=X),!(ge&2&&(Q=b(L,H,j,Q,be,fe,ce),j>=Q))&&!(ge&4&&(j=M(L,H,j,Q,be,fe,xe),j>=Q))){var _e=Q-j,re=ue-te;if(Se){if(L*_e*(_e+re)d&&m[A+p]>M;--x,A-=w){for(var T=A,y=A+w,E=0;E>>1,M=2*h,x=b,A=m[M*b+p];w<_;){if(_-w=C?(x=S,A=C):E>=D?(x=y,A=E):(x=k,A=D):C>=D?(x=S,A=C):D>=E?(x=y,A=E):(x=k,A=D);for(var R=M*(_-1),L=M*x,F=0;F=p0)&&!(p1>=hi)":p};function o(d){return a[d]}function s(d,v,m,g,w,_,b){for(var M=2*d,x=M*m,A=x,T=m,y=v,E=d+v,S=m;g>S;++S,x+=M){var C=w[x+y];if(C===b)if(T===S)T+=1,A+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[A],w[A++]=D}var F=_[S];_[S]=_[T],_[T++]=F}}return T}function l(d,v,m,g,w,_,b){for(var M=2*d,x=M*m,A=x,T=m,y=v,E=d+v,S=m;g>S;++S,x+=M){var C=w[x+y];if(Ck;++k){var D=w[x+k];w[x+k]=w[A],w[A++]=D}var F=_[S];_[S]=_[T],_[T++]=F}}return T}function u(d,v,m,g,w,_,b){for(var M=2*d,x=M*m,A=x,T=m,y=v,E=d+v,S=m;g>S;++S,x+=M){var C=w[x+E];if(C<=b)if(T===S)T+=1,A+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[A],w[A++]=D}var F=_[S];_[S]=_[T],_[T++]=F}}return T}function c(d,v,m,g,w,_,b){for(var M=2*d,x=M*m,A=x,T=m,y=v,E=d+v,S=m;g>S;++S,x+=M){var C=w[x+E];if(C<=b)if(T===S)T+=1,A+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[A],w[A++]=D}var F=_[S];_[S]=_[T],_[T++]=F}}return T}function f(d,v,m,g,w,_,b){for(var M=2*d,x=M*m,A=x,T=m,y=v,E=d+v,S=m;g>S;++S,x+=M){var C=w[x+y],k=w[x+E];if(C<=b&&b<=k)if(T===S)T+=1,A+=M;else{for(var D=0;M>D;++D){var F=w[x+D];w[x+D]=w[A],w[A++]=F}var P=_[S];_[S]=_[T],_[T++]=P}}return T}function h(d,v,m,g,w,_,b){for(var M=2*d,x=M*m,A=x,T=m,y=v,E=d+v,S=m;g>S;++S,x+=M){var C=w[x+y],k=w[x+E];if(CD;++D){var F=w[x+D];w[x+D]=w[A],w[A++]=F}var P=_[S];_[S]=_[T],_[T++]=P}}return T}function p(d,v,m,g,w,_,b,M){for(var x=2*d,A=x*m,T=A,y=m,E=v,S=d+v,C=m;g>C;++C,A+=x){var k=w[A+E],D=w[A+S];if(!(k>=b)&&!(M>=D))if(y===C)y+=1,T+=x;else{for(var F=0;x>F;++F){var P=w[A+F];w[A+F]=w[T],w[T++]=P}var R=_[C];_[C]=_[y],_[y++]=R}}return y}},4192(n){"use strict";n.exports=o;var a=32;function o(v,m){m<=4*a?s(0,m-1,v):d(0,m-1,v)}function s(v,m,g){for(var w=2*(v+1),_=v+1;_<=m;++_){for(var b=g[w++],M=g[w++],x=_,A=w-2;x-- >v;){var T=g[A-2],y=g[A-1];if(Tg[m+1]:!0}function p(v,m,g,w){v*=2;var _=w[v];return _>1,x=M-w,A=M+w,T=_,y=x,E=M,S=A,C=b,k=v+1,D=m-1,F=0;h(T,y,g)&&(F=T,T=y,y=F),h(S,C,g)&&(F=S,S=C,C=F),h(T,E,g)&&(F=T,T=E,E=F),h(y,E,g)&&(F=y,y=E,E=F),h(T,S,g)&&(F=T,T=S,S=F),h(E,S,g)&&(F=E,E=S,S=F),h(y,C,g)&&(F=y,y=C,C=F),h(y,E,g)&&(F=y,y=E,E=F),h(S,C,g)&&(F=S,S=C,C=F);for(var P=g[2*y],R=g[2*y+1],L=g[2*S],I=g[2*S+1],B=2*T,O=2*E,$=2*C,X=2*_,K=2*M,G=2*b,q=0;q<2;++q){var J=g[B+q],N=g[O+q],V=g[$+q];g[X+q]=J,g[K+q]=N,g[G+q]=V}u(x,v,g),u(A,m,g);for(var Y=k;Y<=D;++Y)if(p(Y,P,R,g))Y!==k&&l(Y,k,g),++k;else if(!p(Y,L,I,g))for(;;)if(p(D,L,I,g)){p(D,P,R,g)?(c(Y,k,D,g),++k,--D):(l(Y,D,g),--D);break}else{if(--D>>1;u(w,N);for(var V=0,Y=0,K=0;K=c)H=H-c|0,b(d,v,Y--,H);else if(H>=0)b(h,p,V--,H);else if(H<=-c){H=-H-c|0;for(var j=0;j>>1;u(w,N);for(var V=0,Y=0,H=0,K=0;K>1===w[2*K+3]>>1&&(Q=2,K+=1),j<0){for(var te=-(j>>1)-1,ue=0;ue>1)-1;Q===0?b(h,p,V--,te):Q===1?b(d,v,Y--,te):Q===2&&b(m,g,H--,te)}}}function T(E,S,C,k,D,F,P,R,L,I,B,O){var $=0,X=2*E,K=S,G=S+E,q=1,J=1;k?J=c:q=c;for(var N=D;N>>1;u(w,j);for(var Q=0,N=0;N=c?(ue=!k,V-=c):(ue=!!k,V-=1),ue)M(h,p,Q++,V);else{var ge=O[V],Ee=X*V,xe=B[Ee+S+1],ce=B[Ee+S+1+E];e:for(var oe=0;oe>>1;u(w,V);for(var Y=0,G=0;G=c)h[Y++]=q-c;else{q-=1;var j=B[q],Q=$*q,te=I[Q+S+1],ue=I[Q+S+1+E];e:for(var ge=0;ge=0;--ge)if(h[ge]===q){for(var oe=ge+1;oef)throw new RangeError('The value "'+fe+'" is invalid for option "size"');var ee=new Uint8Array(fe);return Object.setPrototypeOf(ee,d.prototype),ee}function d(fe,ee,ae){if(typeof fe=="number"){if(typeof ee=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(fe)}return v(fe,ee,ae)}d.poolSize=8192;function v(fe,ee,ae){if(typeof fe=="string")return _(fe,ee);if(ArrayBuffer.isView(fe))return M(fe);if(fe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof fe);if(oe(fe,ArrayBuffer)||fe&&oe(fe.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(oe(fe,SharedArrayBuffer)||fe&&oe(fe.buffer,SharedArrayBuffer)))return x(fe,ee,ae);if(typeof fe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var _e=fe.valueOf&&fe.valueOf();if(_e!=null&&_e!==fe)return d.from(_e,ee,ae);var re=A(fe);if(re)return re;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof fe[Symbol.toPrimitive]=="function")return d.from(fe[Symbol.toPrimitive]("string"),ee,ae);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof fe)}d.from=function(fe,ee,ae){return v(fe,ee,ae)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function m(fe){if(typeof fe!="number")throw new TypeError('"size" argument must be of type number');if(fe<0)throw new RangeError('The value "'+fe+'" is invalid for option "size"')}function g(fe,ee,ae){return m(fe),fe<=0?p(fe):ee!==void 0?typeof ae=="string"?p(fe).fill(ee,ae):p(fe).fill(ee):p(fe)}d.alloc=function(fe,ee,ae){return g(fe,ee,ae)};function w(fe){return m(fe),p(fe<0?0:T(fe)|0)}d.allocUnsafe=function(fe){return w(fe)},d.allocUnsafeSlow=function(fe){return w(fe)};function _(fe,ee){if((typeof ee!="string"||ee==="")&&(ee="utf8"),!d.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);var ae=E(fe,ee)|0,_e=p(ae),re=_e.write(fe,ee);return re!==ae&&(_e=_e.slice(0,re)),_e}function b(fe){for(var ee=fe.length<0?0:T(fe.length)|0,ae=p(ee),_e=0;_e=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return fe|0}function y(fe){return+fe!=fe&&(fe=0),d.alloc(+fe)}d.isBuffer=function(ee){return ee!=null&&ee._isBuffer===!0&&ee!==d.prototype},d.compare=function(ee,ae){if(oe(ee,Uint8Array)&&(ee=d.from(ee,ee.offset,ee.byteLength)),oe(ae,Uint8Array)&&(ae=d.from(ae,ae.offset,ae.byteLength)),!d.isBuffer(ee)||!d.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ee===ae)return 0;for(var _e=ee.length,re=ae.length,pe=0,Te=Math.min(_e,re);pere.length?d.from(Te).copy(re,pe):Uint8Array.prototype.set.call(re,Te,pe);else if(d.isBuffer(Te))Te.copy(re,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=Te.length}return re};function E(fe,ee){if(d.isBuffer(fe))return fe.length;if(ArrayBuffer.isView(fe)||oe(fe,ArrayBuffer))return fe.byteLength;if(typeof fe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof fe);var ae=fe.length,_e=arguments.length>2&&arguments[2]===!0;if(!_e&&ae===0)return 0;for(var re=!1;;)switch(ee){case"ascii":case"latin1":case"binary":return ae;case"utf8":case"utf-8":return ue(fe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae*2;case"hex":return ae>>>1;case"base64":return xe(fe).length;default:if(re)return _e?-1:ue(fe).length;ee=(""+ee).toLowerCase(),re=!0}}d.byteLength=E;function S(fe,ee,ae){var _e=!1;if((ee===void 0||ee<0)&&(ee=0),ee>this.length||((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)||(ae>>>=0,ee>>>=0,ae<=ee))return"";for(fe||(fe="utf8");;)switch(fe){case"hex":return q(this,ee,ae);case"utf8":case"utf-8":return O(this,ee,ae);case"ascii":return K(this,ee,ae);case"latin1":case"binary":return G(this,ee,ae);case"base64":return B(this,ee,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,ee,ae);default:if(_e)throw new TypeError("Unknown encoding: "+fe);fe=(fe+"").toLowerCase(),_e=!0}}d.prototype._isBuffer=!0;function C(fe,ee,ae){var _e=fe[ee];fe[ee]=fe[ae],fe[ae]=_e}d.prototype.swap16=function(){var ee=this.length;if(ee%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ae=0;aeae&&(ee+=" ... "),""},c&&(d.prototype[c]=d.prototype.inspect),d.prototype.compare=function(ee,ae,_e,re,pe){if(oe(ee,Uint8Array)&&(ee=d.from(ee,ee.offset,ee.byteLength)),!d.isBuffer(ee))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ee);if(ae===void 0&&(ae=0),_e===void 0&&(_e=ee?ee.length:0),re===void 0&&(re=0),pe===void 0&&(pe=this.length),ae<0||_e>ee.length||re<0||pe>this.length)throw new RangeError("out of range index");if(re>=pe&&ae>=_e)return 0;if(re>=pe)return-1;if(ae>=_e)return 1;if(ae>>>=0,_e>>>=0,re>>>=0,pe>>>=0,this===ee)return 0;for(var Te=pe-re,Ce=_e-ae,ze=Math.min(Te,Ce),we=this.slice(re,pe),me=ee.slice(ae,_e),Le=0;Le2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,Se(ae)&&(ae=re?0:fe.length-1),ae<0&&(ae=fe.length+ae),ae>=fe.length){if(re)return-1;ae=fe.length-1}else if(ae<0)if(re)ae=0;else return-1;if(typeof ee=="string"&&(ee=d.from(ee,_e)),d.isBuffer(ee))return ee.length===0?-1:D(fe,ee,ae,_e,re);if(typeof ee=="number")return ee=ee&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(fe,ee,ae):Uint8Array.prototype.lastIndexOf.call(fe,ee,ae):D(fe,[ee],ae,_e,re);throw new TypeError("val must be string, number or Buffer")}function D(fe,ee,ae,_e,re){var pe=1,Te=fe.length,Ce=ee.length;if(_e!==void 0&&(_e=String(_e).toLowerCase(),_e==="ucs2"||_e==="ucs-2"||_e==="utf16le"||_e==="utf-16le")){if(fe.length<2||ee.length<2)return-1;pe=2,Te/=2,Ce/=2,ae/=2}function ze(Je,rt){return pe===1?Je[rt]:Je.readUInt16BE(rt*pe)}var we;if(re){var me=-1;for(we=ae;weTe&&(ae=Te-Ce),we=ae;we>=0;we--){for(var Le=!0,Ne=0;Nere&&(_e=re)):_e=re;var pe=ee.length;_e>pe/2&&(_e=pe/2);for(var Te=0;Te<_e;++Te){var Ce=parseInt(ee.substr(Te*2,2),16);if(Se(Ce))return Te;fe[ae+Te]=Ce}return Te}function P(fe,ee,ae,_e){return ce(ue(ee,fe.length-ae),fe,ae,_e)}function R(fe,ee,ae,_e){return ce(ge(ee),fe,ae,_e)}function L(fe,ee,ae,_e){return ce(xe(ee),fe,ae,_e)}function I(fe,ee,ae,_e){return ce(Ee(ee,fe.length-ae),fe,ae,_e)}d.prototype.write=function(ee,ae,_e,re){if(ae===void 0)re="utf8",_e=this.length,ae=0;else if(_e===void 0&&typeof ae=="string")re=ae,_e=this.length,ae=0;else if(isFinite(ae))ae=ae>>>0,isFinite(_e)?(_e=_e>>>0,re===void 0&&(re="utf8")):(re=_e,_e=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-ae;if((_e===void 0||_e>pe)&&(_e=pe),ee.length>0&&(_e<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var Te=!1;;)switch(re){case"hex":return F(this,ee,ae,_e);case"utf8":case"utf-8":return P(this,ee,ae,_e);case"ascii":case"latin1":case"binary":return R(this,ee,ae,_e);case"base64":return L(this,ee,ae,_e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ee,ae,_e);default:if(Te)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),Te=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(fe,ee,ae){return ee===0&&ae===fe.length?l.fromByteArray(fe):l.fromByteArray(fe.slice(ee,ae))}function O(fe,ee,ae){ae=Math.min(fe.length,ae);for(var _e=[],re=ee;re239?4:pe>223?3:pe>191?2:1;if(re+Ce<=ae){var ze,we,me,Le;switch(Ce){case 1:pe<128&&(Te=pe);break;case 2:ze=fe[re+1],(ze&192)===128&&(Le=(pe&31)<<6|ze&63,Le>127&&(Te=Le));break;case 3:ze=fe[re+1],we=fe[re+2],(ze&192)===128&&(we&192)===128&&(Le=(pe&15)<<12|(ze&63)<<6|we&63,Le>2047&&(Le<55296||Le>57343)&&(Te=Le));break;case 4:ze=fe[re+1],we=fe[re+2],me=fe[re+3],(ze&192)===128&&(we&192)===128&&(me&192)===128&&(Le=(pe&15)<<18|(ze&63)<<12|(we&63)<<6|me&63,Le>65535&&Le<1114112&&(Te=Le))}}Te===null?(Te=65533,Ce=1):Te>65535&&(Te-=65536,_e.push(Te>>>10&1023|55296),Te=56320|Te&1023),_e.push(Te),re+=Ce}return X(_e)}var $=4096;function X(fe){var ee=fe.length;if(ee<=$)return String.fromCharCode.apply(String,fe);for(var ae="",_e=0;_e_e)&&(ae=_e);for(var re="",pe=ee;pe_e&&(ee=_e),ae<0?(ae+=_e,ae<0&&(ae=0)):ae>_e&&(ae=_e),aeae)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(ee,ae,_e){ee=ee>>>0,ae=ae>>>0,_e||N(ee,ae,this.length);for(var re=this[ee],pe=1,Te=0;++Te>>0,ae=ae>>>0,_e||N(ee,ae,this.length);for(var re=this[ee+--ae],pe=1;ae>0&&(pe*=256);)re+=this[ee+--ae]*pe;return re},d.prototype.readUint8=d.prototype.readUInt8=function(ee,ae){return ee=ee>>>0,ae||N(ee,1,this.length),this[ee]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(ee,ae){return ee=ee>>>0,ae||N(ee,2,this.length),this[ee]|this[ee+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(ee,ae){return ee=ee>>>0,ae||N(ee,2,this.length),this[ee]<<8|this[ee+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(ee,ae){return ee=ee>>>0,ae||N(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+this[ee+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(ee,ae){return ee=ee>>>0,ae||N(ee,4,this.length),this[ee]*16777216+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},d.prototype.readIntLE=function(ee,ae,_e){ee=ee>>>0,ae=ae>>>0,_e||N(ee,ae,this.length);for(var re=this[ee],pe=1,Te=0;++Te=pe&&(re-=Math.pow(2,8*ae)),re},d.prototype.readIntBE=function(ee,ae,_e){ee=ee>>>0,ae=ae>>>0,_e||N(ee,ae,this.length);for(var re=ae,pe=1,Te=this[ee+--re];re>0&&(pe*=256);)Te+=this[ee+--re]*pe;return pe*=128,Te>=pe&&(Te-=Math.pow(2,8*ae)),Te},d.prototype.readInt8=function(ee,ae){return ee=ee>>>0,ae||N(ee,1,this.length),this[ee]&128?(255-this[ee]+1)*-1:this[ee]},d.prototype.readInt16LE=function(ee,ae){ee=ee>>>0,ae||N(ee,2,this.length);var _e=this[ee]|this[ee+1]<<8;return _e&32768?_e|4294901760:_e},d.prototype.readInt16BE=function(ee,ae){ee=ee>>>0,ae||N(ee,2,this.length);var _e=this[ee+1]|this[ee]<<8;return _e&32768?_e|4294901760:_e},d.prototype.readInt32LE=function(ee,ae){return ee=ee>>>0,ae||N(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},d.prototype.readInt32BE=function(ee,ae){return ee=ee>>>0,ae||N(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},d.prototype.readFloatLE=function(ee,ae){return ee=ee>>>0,ae||N(ee,4,this.length),u.read(this,ee,!0,23,4)},d.prototype.readFloatBE=function(ee,ae){return ee=ee>>>0,ae||N(ee,4,this.length),u.read(this,ee,!1,23,4)},d.prototype.readDoubleLE=function(ee,ae){return ee=ee>>>0,ae||N(ee,8,this.length),u.read(this,ee,!0,52,8)},d.prototype.readDoubleBE=function(ee,ae){return ee=ee>>>0,ae||N(ee,8,this.length),u.read(this,ee,!1,52,8)};function V(fe,ee,ae,_e,re,pe){if(!d.isBuffer(fe))throw new TypeError('"buffer" argument must be a Buffer instance');if(ee>re||eefe.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(ee,ae,_e,re){if(ee=+ee,ae=ae>>>0,_e=_e>>>0,!re){var pe=Math.pow(2,8*_e)-1;V(this,ee,ae,_e,pe,0)}var Te=1,Ce=0;for(this[ae]=ee&255;++Ce<_e&&(Te*=256);)this[ae+Ce]=ee/Te&255;return ae+_e},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(ee,ae,_e,re){if(ee=+ee,ae=ae>>>0,_e=_e>>>0,!re){var pe=Math.pow(2,8*_e)-1;V(this,ee,ae,_e,pe,0)}var Te=_e-1,Ce=1;for(this[ae+Te]=ee&255;--Te>=0&&(Ce*=256);)this[ae+Te]=ee/Ce&255;return ae+_e},d.prototype.writeUint8=d.prototype.writeUInt8=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,1,255,0),this[ae]=ee&255,ae+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,2,65535,0),this[ae]=ee&255,this[ae+1]=ee>>>8,ae+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,2,65535,0),this[ae]=ee>>>8,this[ae+1]=ee&255,ae+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,4,4294967295,0),this[ae+3]=ee>>>24,this[ae+2]=ee>>>16,this[ae+1]=ee>>>8,this[ae]=ee&255,ae+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,4,4294967295,0),this[ae]=ee>>>24,this[ae+1]=ee>>>16,this[ae+2]=ee>>>8,this[ae+3]=ee&255,ae+4},d.prototype.writeIntLE=function(ee,ae,_e,re){if(ee=+ee,ae=ae>>>0,!re){var pe=Math.pow(2,8*_e-1);V(this,ee,ae,_e,pe-1,-pe)}var Te=0,Ce=1,ze=0;for(this[ae]=ee&255;++Te<_e&&(Ce*=256);)ee<0&&ze===0&&this[ae+Te-1]!==0&&(ze=1),this[ae+Te]=(ee/Ce>>0)-ze&255;return ae+_e},d.prototype.writeIntBE=function(ee,ae,_e,re){if(ee=+ee,ae=ae>>>0,!re){var pe=Math.pow(2,8*_e-1);V(this,ee,ae,_e,pe-1,-pe)}var Te=_e-1,Ce=1,ze=0;for(this[ae+Te]=ee&255;--Te>=0&&(Ce*=256);)ee<0&&ze===0&&this[ae+Te+1]!==0&&(ze=1),this[ae+Te]=(ee/Ce>>0)-ze&255;return ae+_e},d.prototype.writeInt8=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,1,127,-128),ee<0&&(ee=255+ee+1),this[ae]=ee&255,ae+1},d.prototype.writeInt16LE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,2,32767,-32768),this[ae]=ee&255,this[ae+1]=ee>>>8,ae+2},d.prototype.writeInt16BE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,2,32767,-32768),this[ae]=ee>>>8,this[ae+1]=ee&255,ae+2},d.prototype.writeInt32LE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,4,2147483647,-2147483648),this[ae]=ee&255,this[ae+1]=ee>>>8,this[ae+2]=ee>>>16,this[ae+3]=ee>>>24,ae+4},d.prototype.writeInt32BE=function(ee,ae,_e){return ee=+ee,ae=ae>>>0,_e||V(this,ee,ae,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),this[ae]=ee>>>24,this[ae+1]=ee>>>16,this[ae+2]=ee>>>8,this[ae+3]=ee&255,ae+4};function Y(fe,ee,ae,_e,re,pe){if(ae+_e>fe.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function H(fe,ee,ae,_e,re){return ee=+ee,ae=ae>>>0,re||Y(fe,ee,ae,4,34028234663852886e22,-34028234663852886e22),u.write(fe,ee,ae,_e,23,4),ae+4}d.prototype.writeFloatLE=function(ee,ae,_e){return H(this,ee,ae,!0,_e)},d.prototype.writeFloatBE=function(ee,ae,_e){return H(this,ee,ae,!1,_e)};function j(fe,ee,ae,_e,re){return ee=+ee,ae=ae>>>0,re||Y(fe,ee,ae,8,17976931348623157e292,-17976931348623157e292),u.write(fe,ee,ae,_e,52,8),ae+8}d.prototype.writeDoubleLE=function(ee,ae,_e){return j(this,ee,ae,!0,_e)},d.prototype.writeDoubleBE=function(ee,ae,_e){return j(this,ee,ae,!1,_e)},d.prototype.copy=function(ee,ae,_e,re){if(!d.isBuffer(ee))throw new TypeError("argument should be a Buffer");if(_e||(_e=0),!re&&re!==0&&(re=this.length),ae>=ee.length&&(ae=ee.length),ae||(ae=0),re>0&&re<_e&&(re=_e),re===_e||ee.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(_e<0||_e>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),ee.length-ae>>0,_e=_e===void 0?this.length:_e>>>0,ee||(ee=0);var Te;if(typeof ee=="number")for(Te=ae;Te<_e;++Te)this[Te]=ee;else{var Ce=d.isBuffer(ee)?ee:d.from(ee,re),ze=Ce.length;if(ze===0)throw new TypeError('The value "'+ee+'" is invalid for argument "value"');for(Te=0;Te<_e-ae;++Te)this[Te+ae]=Ce[Te%ze]}return this};var Q=/[^+/0-9A-Za-z-_]/g;function te(fe){if(fe=fe.split("=")[0],fe=fe.trim().replace(Q,""),fe.length<2)return"";for(;fe.length%4!==0;)fe=fe+"=";return fe}function ue(fe,ee){ee=ee||1/0;for(var ae,_e=fe.length,re=null,pe=[],Te=0;Te<_e;++Te){if(ae=fe.charCodeAt(Te),ae>55295&&ae<57344){if(!re){if(ae>56319){(ee-=3)>-1&&pe.push(239,191,189);continue}else if(Te+1===_e){(ee-=3)>-1&&pe.push(239,191,189);continue}re=ae;continue}if(ae<56320){(ee-=3)>-1&&pe.push(239,191,189),re=ae;continue}ae=(re-55296<<10|ae-56320)+65536}else re&&(ee-=3)>-1&&pe.push(239,191,189);if(re=null,ae<128){if((ee-=1)<0)break;pe.push(ae)}else if(ae<2048){if((ee-=2)<0)break;pe.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((ee-=3)<0)break;pe.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((ee-=4)<0)break;pe.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return pe}function ge(fe){for(var ee=[],ae=0;ae>8,re=ae%256,pe.push(re),pe.push(_e);return pe}function xe(fe){return l.toByteArray(te(fe))}function ce(fe,ee,ae,_e){for(var re=0;re<_e&&!(re+ae>=ee.length||re>=fe.length);++re)ee[re+ae]=fe[re];return re}function oe(fe,ee){return fe instanceof ee||fe!=null&&fe.constructor!=null&&fe.constructor.name!=null&&fe.constructor.name===ee.name}function Se(fe){return fe!==fe}var be=(function(){for(var fe="0123456789abcdef",ee=new Array(256),ae=0;ae<16;++ae)for(var _e=ae*16,re=0;re<16;++re)ee[_e+re]=fe[ae]+fe[re];return ee})()},2538(n,a,o){"use strict";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);n.exports=v;function f(m){return[Math.min(m[0],m[1]),Math.max(m[0],m[1])]}function h(m,g){return m[0]-g[0]||m[1]-g[1]}function p(m){return m.map(f).sort(h)}function d(m,g,w){return g in m?m[g]:w}function v(m,g,w){Array.isArray(g)?(w=w||{},g=g||[]):(w=g||{},g=[]);var _=!!d(w,"delaunay",!0),b=!!d(w,"interior",!0),M=!!d(w,"exterior",!0),x=!!d(w,"infinity",!1);if(!b&&!M||m.length===0)return[];var A=s(m,g);if(_||b!==M||x){for(var T=l(m.length,p(g)),y=0;y0;){for(var _=p.pop(),m=p.pop(),b=-1,M=-1,g=v[m],A=1;A=0||(h.flip(m,_),u(f,h,p,b,m,M),u(f,h,p,m,M,b),u(f,h,p,M,_,b),u(f,h,p,_,b,M))}}},5023(n,a,o){"use strict";var s=o(2478);n.exports=p;function l(d,v,m,g,w,_,b){this.cells=d,this.neighbor=v,this.flags=g,this.constraint=m,this.active=w,this.next=_,this.boundary=b}var u=l.prototype;function c(d,v){return d[0]-v[0]||d[1]-v[1]||d[2]-v[2]}u.locate=(function(){var d=[0,0,0];return function(v,m,g){var w=v,_=m,b=g;return m0||b.length>0;){for(;_.length>0;){var y=_.pop();if(M[y]!==-w){M[y]=w;for(var E=x[y],S=0;S<3;++S){var C=T[3*y+S];C>=0&&M[C]===0&&(A[3*y+S]?b.push(C):(_.push(C),M[C]=w))}}}var k=b;b=_,_=k,b.length=0,w=-w}var D=h(x,M,v);return m?D.concat(g.boundary):D}},8902(n,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;n.exports=b;function h(M,x,A,T,y){this.a=M,this.b=x,this.idx=A,this.lowerIds=T,this.upperIds=y}function p(M,x,A,T){this.a=M,this.b=x,this.type=A,this.idx=T}function d(M,x){var A=M.a[0]-x.a[0]||M.a[1]-x.a[1]||M.type-x.type;return A||M.type!==u&&(A=l(M.a,M.b,x.b),A)?A:M.idx-x.idx}function v(M,x){return l(M.a,M.b,x)}function m(M,x,A,T,y){for(var E=s.lt(x,T,v),S=s.gt(x,T,v),C=E;C1&&l(A[D[P-2]],A[D[P-1]],T)>0;)M.push([D[P-1],D[P-2],y]),P-=1;D.length=P,D.push(y);for(var F=k.upperIds,P=F.length;P>1&&l(A[F[P-2]],A[F[P-1]],T)<0;)M.push([F[P-2],F[P-1],y]),P-=1;F.length=P,F.push(y)}}function g(M,x){var A;return M.a[0]k[0]&&y.push(new p(k,C,f,E),new p(C,k,c,E))}y.sort(d);for(var D=y[0].a[0]-(1+Math.abs(y[0].a[0]))*Math.pow(2,-52),F=[new h([D,1],[D,0],-1,[],[],[],[])],P=[],E=0,R=y.length;E=0}})(),u.removeTriangle=function(h,p,d){var v=this.stars;c(v[h],p,d),c(v[p],d,h),c(v[d],h,p)},u.addTriangle=function(h,p,d){var v=this.stars;v[h].push(p,d),v[p].push(d,h),v[d].push(h,p)},u.opposite=function(h,p){for(var d=this.stars[p],v=1,m=d.length;v=0;--L){var J=P[L];I=J[0];var N=D[I],V=N[0],Y=N[1],H=k[V],j=k[Y];if((H[0]-j[0]||H[1]-j[1])<0){var Q=V;V=Y,Y=Q}N[0]=V;var te=N[1]=J[1],ue;for(R&&(ue=N[2]);L>0&&P[L-1][0]===I;){var J=P[--L],ge=J[1];R?D.push([te,ge,ue]):D.push([te,ge]),te=ge}R?D.push([te,Y,ue]):D.push([te,Y])}return B}function x(k,D,F){for(var P=D.length,R=new s(P),L=[],I=0;ID[2]?1:0)}function y(k,D,F){if(k.length!==0){if(D)for(var P=0;P0||I.length>0}function C(k,D,F){var P;if(F){P=D;for(var R=new Array(D.length),L=0;LM+1)throw new Error(_+" map requires nshades to be at least size "+w.length);Array.isArray(p.alpha)?p.alpha.length!==2?x=[1,1]:x=p.alpha.slice():typeof p.alpha=="number"?x=[p.alpha,p.alpha]:x=[1,1],d=w.map(function(C){return Math.round(C.index*M)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var T=w.map(function(C,k){var D=w[k].index,F=w[k].rgb.slice();return F.length===4&&F[3]>=0&&F[3]<=1||(F[3]=x[0]+(x[1]-x[0])*D),F}),y=[];for(A=0;A=0}function p(d,v,m,g){var w=s(v,m,g);if(w===0){var _=l(s(d,v,m)),b=l(s(d,v,g));if(_===b){if(_===0){var M=h(d,v,m),x=h(d,v,g);return M===x?0:M?1:-1}return 0}else{if(b===0)return _>0||h(d,v,g)?-1:1;if(_===0)return b>0||h(d,v,m)?1:-1}return l(b-_)}var A=s(d,v,m);if(A>0)return w>0&&s(d,v,g)>0?1:-1;if(A<0)return w>0||s(d,v,g)>0?1:-1;var T=s(d,v,g);return T>0||h(d,v,m)?1:-1}},8572(n){"use strict";n.exports=function(o){return o<0?-1:o>0?1:0}},8507(n){n.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],p=u[0]+u[1];if(f=h+l[2]-(p+u[2]),f)return f;var d=a(l[0],l[1]),v=a(u[0],u[1]);return a(d,l[2])-a(v,u[2])||a(d+l[2],h)-a(v+u[2],p);case 4:var m=l[0],g=l[1],w=l[2],_=l[3],b=u[0],M=u[1],x=u[2],A=u[3];return m+g+w+_-(b+M+x+A)||a(m,g,w,_)-a(b,M,x,A,b)||a(m+g,m+w,m+_,g+w,g+_,w+_)-a(b+M,b+x,b+A,M+x,M+A,x+A)||a(m+g+w,m+g+_,m+w+_,g+w+_)-a(b+M+x,b+M+A,b+x+A,M+x+A);default:for(var T=l.slice().sort(o),y=u.slice().sort(o),E=0;Eo[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},4750(n,a,o){"use strict";n.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),p=c[f-1],d=0;d=p[b]&&(_+=1);g[w]=_}}return h}function f(h,p){try{return s(h,!0)}catch(g){var d=l(h);if(d.length<=p)return[];var v=u(h,d),m=s(v,!0);return c(m,d)}}},4769(n){"use strict";function a(s,l,u,c,f,h){var p=6*f*f-6*f,d=3*f*f-4*f+1,v=-6*f*f+6*f,m=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var g=s.length-1;g>=0;--g)h[g]=p*s[g]+d*l[g]+v*u[g]+m*c[g];return h}return p*s+d*l+v*u[g]+m*c}function o(s,l,u,c,f,h){var p=f-1,d=f*f,v=p*p,m=(1+2*f)*v,g=f*v,w=d*(3-2*f),_=d*p;if(s.length){h||(h=new Array(s.length));for(var b=s.length-1;b>=0;--b)h[b]=m*s[b]+g*l[b]+w*u[b]+_*c[b];return h}return m*s+g*l+w*u+_*c}n.exports=o,n.exports.derivative=a},7642(n,a,o){"use strict";var s=o(8954),l=o(1682);n.exports=h;function u(p,d){this.point=p,this.index=d}function c(p,d){for(var v=p.point,m=d.point,g=v.length,w=0;w=2)return!1;F[R]=L}return!0}):D=D.filter(function(F){for(var P=0;P<=m;++P){var R=E[F[P]];if(R<0)return!1;F[P]=R}return!0}),m&1)for(var _=0;_>>31},n.exports.exponent=function(w){var _=n.exports.hi(w);return(_<<1>>>21)-1023},n.exports.fraction=function(w){var _=n.exports.lo(w),b=n.exports.hi(w),M=b&(1<<20)-1;return b&2146435072&&(M+=1048576),[_,M]},n.exports.denormalized=function(w){var _=n.exports.hi(w);return!(_&2146435072)}},1338(n){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),p;if(c===l.length-1)for(p=0;p0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}n.exports=s},3134(n,a,o){"use strict";n.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=m-1)for(var A=_.length-1,y=d-v[m-1],T=0;T=m-1)for(var x=_.length-1,A=d-v[m-1],T=0;T=0;--m)if(d[--v])return!1;return!0},f.jump=function(d){var v=this.lastT(),m=this.dimension;if(!(d0;--T)g.push(u(M[T-1],x[T-1],arguments[T])),w.push(0)}},f.push=function(d){var v=this.lastT(),m=this.dimension;if(!(d1e-6?1/b:0;this._time.push(d);for(var y=m;y>0;--y){var E=u(x[y-1],A[y-1],arguments[y]);g.push(E),w.push((E-g[_++])*T)}}},f.set=function(d){var v=this.dimension;if(!(d0;--M)m.push(u(_[M-1],b[M-1],arguments[M])),g.push(0)}},f.move=function(d){var v=this.lastT(),m=this.dimension;if(!(d<=v||arguments.length!==m+1)){var g=this._state,w=this._velocity,_=g.length-this.dimension,b=this.bounds,M=b[0],x=b[1],A=d-v,T=A>1e-6?1/A:0;this._time.push(d);for(var y=m;y>0;--y){var E=arguments[y];g.push(u(M[y-1],x[y-1],g[_++]+E)),w.push(E*T)}}},f.idle=function(d){var v=this.lastT();if(!(d=0;--T)g.push(u(M[T],x[T],g[_]+A*w[_])),w.push(0),_+=1}};function h(d){for(var v=new Array(d),m=0;m=0;--k){var y=E[k];S[k]<=0?E[k]=new s(y._color,y.key,y.value,E[k+1],y.right,y._count+1):E[k]=new s(y._color,y.key,y.value,y.left,E[k+1],y._count+1)}for(var k=E.length-1;k>1;--k){var D=E[k-1],y=E[k];if(D._color===o||y._color===o)break;var F=E[k-2];if(F.left===D)if(D.left===y){var P=F.right;if(P&&P._color===a)D._color=o,F.right=u(o,P),F._color=a,k-=1;else{if(F._color=a,F.left=D.right,D._color=o,D.right=F,E[k-2]=D,E[k-1]=y,c(F),c(D),k>=3){var R=E[k-3];R.left===F?R.left=D:R.right=D}break}}else{var P=F.right;if(P&&P._color===a)D._color=o,F.right=u(o,P),F._color=a,k-=1;else{if(D.right=y.left,F._color=a,F.left=y.right,y._color=o,y.left=D,y.right=F,E[k-2]=y,E[k-1]=D,c(F),c(D),c(y),k>=3){var R=E[k-3];R.left===F?R.left=y:R.right=y}break}}else if(D.right===y){var P=F.left;if(P&&P._color===a)D._color=o,F.left=u(o,P),F._color=a,k-=1;else{if(F._color=a,F.right=D.left,D._color=o,D.left=F,E[k-2]=D,E[k-1]=y,c(F),c(D),k>=3){var R=E[k-3];R.right===F?R.right=D:R.left=D}break}}else{var P=F.left;if(P&&P._color===a)D._color=o,F.left=u(o,P),F._color=a,k-=1;else{if(D.left=y.right,F._color=a,F.right=y.left,y._color=o,y.right=D,y.left=F,E[k-2]=y,E[k-1]=D,c(F),c(D),c(y),k>=3){var R=E[k-3];R.right===F?R.right=y:R.left=y}break}}}return E[0]._color=o,new f(T,E[0])};function p(x,A){if(A.left){var T=p(x,A.left);if(T)return T}var T=x(A.key,A.value);if(T)return T;if(A.right)return p(x,A.right)}function d(x,A,T,y){var E=A(x,y.key);if(E<=0){if(y.left){var S=d(x,A,T,y.left);if(S)return S}var S=T(y.key,y.value);if(S)return S}if(y.right)return d(x,A,T,y.right)}function v(x,A,T,y,E){var S=T(x,E.key),C=T(A,E.key),k;if(S<=0&&(E.left&&(k=v(x,A,T,y,E.left),k)||C>0&&(k=y(E.key,E.value),k)))return k;if(C>0&&E.right)return v(x,A,T,y,E.right)}h.forEach=function(A,T,y){if(this.root)switch(arguments.length){case 1:return p(A,this.root);case 2:return d(T,this._compare,A,this.root);case 3:return this._compare(T,y)>=0?void 0:v(T,y,this._compare,A,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],A=this.root;A;)x.push(A),A=A.left;return new m(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],A=this.root;A;)x.push(A),A=A.right;return new m(this,x)}}),h.at=function(x){if(x<0)return new m(this,[]);for(var A=this.root,T=[];;){if(T.push(A),A.left){if(x=A.right._count)break;A=A.right}else break}return new m(this,[])},h.ge=function(x){for(var A=this._compare,T=this.root,y=[],E=0;T;){var S=A(x,T.key);y.push(T),S<=0&&(E=y.length),S<=0?T=T.left:T=T.right}return y.length=E,new m(this,y)},h.gt=function(x){for(var A=this._compare,T=this.root,y=[],E=0;T;){var S=A(x,T.key);y.push(T),S<0&&(E=y.length),S<0?T=T.left:T=T.right}return y.length=E,new m(this,y)},h.lt=function(x){for(var A=this._compare,T=this.root,y=[],E=0;T;){var S=A(x,T.key);y.push(T),S>0&&(E=y.length),S<=0?T=T.left:T=T.right}return y.length=E,new m(this,y)},h.le=function(x){for(var A=this._compare,T=this.root,y=[],E=0;T;){var S=A(x,T.key);y.push(T),S>=0&&(E=y.length),S<0?T=T.left:T=T.right}return y.length=E,new m(this,y)},h.find=function(x){for(var A=this._compare,T=this.root,y=[];T;){var E=A(x,T.key);if(y.push(T),E===0)return new m(this,y);E<=0?T=T.left:T=T.right}return new m(this,[])},h.remove=function(x){var A=this.find(x);return A?A.remove():this},h.get=function(x){for(var A=this._compare,T=this.root;T;){var y=A(x,T.key);if(y===0)return T.value;y<=0?T=T.left:T=T.right}};function m(x,A){this.tree=x,this._stack=A}var g=m.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new m(this.tree,this._stack.slice())};function w(x,A){x.key=A.key,x.value=A.value,x.left=A.left,x.right=A.right,x._color=A._color,x._count=A._count}function _(x){for(var A,T,y,E,S=x.length-1;S>=0;--S){if(A=x[S],S===0){A._color=o;return}if(T=x[S-1],T.left===A){if(y=T.right,y.right&&y.right._color===a){if(y=T.right=l(y),E=y.right=l(y.right),T.right=y.left,y.left=T,y.right=E,y._color=T._color,A._color=o,T._color=o,E._color=o,c(T),c(y),S>1){var C=x[S-2];C.left===T?C.left=y:C.right=y}x[S-1]=y;return}else if(y.left&&y.left._color===a){if(y=T.right=l(y),E=y.left=l(y.left),T.right=E.left,y.left=E.right,E.left=T,E.right=y,E._color=T._color,T._color=o,y._color=o,A._color=o,c(T),c(y),c(E),S>1){var C=x[S-2];C.left===T?C.left=E:C.right=E}x[S-1]=E;return}if(y._color===o)if(T._color===a){T._color=o,T.right=u(a,y);return}else{T.right=u(a,y);continue}else{if(y=l(y),T.right=y.left,y.left=T,y._color=T._color,T._color=a,c(T),c(y),S>1){var C=x[S-2];C.left===T?C.left=y:C.right=y}x[S-1]=y,x[S]=T,S+11){var C=x[S-2];C.right===T?C.right=y:C.left=y}x[S-1]=y;return}else if(y.right&&y.right._color===a){if(y=T.left=l(y),E=y.right=l(y.right),T.left=E.right,y.right=E.left,E.right=T,E.left=y,E._color=T._color,T._color=o,y._color=o,A._color=o,c(T),c(y),c(E),S>1){var C=x[S-2];C.right===T?C.right=E:C.left=E}x[S-1]=E;return}if(y._color===o)if(T._color===a){T._color=o,T.left=u(a,y);return}else{T.left=u(a,y);continue}else{if(y=l(y),T.left=y.right,y.right=T,y._color=T._color,T._color=a,c(T),c(y),S>1){var C=x[S-2];C.right===T?C.right=y:C.left=y}x[S-1]=y,x[S]=T,S+1=0;--y){var T=x[y];T.left===x[y+1]?A[y]=new s(T._color,T.key,T.value,A[y+1],T.right,T._count):A[y]=new s(T._color,T.key,T.value,T.left,A[y+1],T._count)}if(T=A[A.length-1],T.left&&T.right){var E=A.length;for(T=T.left;T.right;)A.push(T),T=T.right;var S=A[E-1];A.push(new s(T._color,S.key,S.value,T.left,T.right,T._count)),A[E-1].key=T.key,A[E-1].value=T.value;for(var y=A.length-2;y>=E;--y)T=A[y],A[y]=new s(T._color,T.key,T.value,T.left,A[y+1],T._count);A[E-1].left=A[E]}if(T=A[A.length-1],T._color===a){var C=A[A.length-2];C.left===T?C.left=null:C.right===T&&(C.right=null),A.pop();for(var y=0;y0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var x=0,A=this._stack;if(A.length===0){var T=this.tree.root;return T?T._count:0}else A[A.length-1].left&&(x=A[A.length-1].left._count);for(var y=A.length-2;y>=0;--y)A[y+1]===A[y].right&&(++x,A[y].left&&(x+=A[y].left._count));return x},enumerable:!0}),g.next=function(){var x=this._stack;if(x.length!==0){var A=x[x.length-1];if(A.right)for(A=A.right;A;)x.push(A),A=A.left;else for(x.pop();x.length>0&&x[x.length-1].right===A;)A=x[x.length-1],x.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var A=x.length-1;A>0;--A)if(x[A-1].left===x[A])return!0;return!1}}),g.update=function(x){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var T=new Array(A.length),y=A[A.length-1];T[T.length-1]=new s(y._color,y.key,x,y.left,y.right,y._count);for(var E=A.length-2;E>=0;--E)y=A[E],y.left===A[E+1]?T[E]=new s(y._color,y.key,y.value,T[E+1],y.right,y._count):T[E]=new s(y._color,y.key,y.value,y.left,T[E+1],y._count);return new f(this.tree._compare,T[0])},g.prev=function(){var x=this._stack;if(x.length!==0){var A=x[x.length-1];if(A.left)for(A=A.left;A;)x.push(A),A=A.right;else for(x.pop();x.length>0&&x[x.length-1].left===A;)A=x[x.length-1],x.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var A=x.length-1;A>0;--A)if(x[A-1].right===x[A])return!0;return!1}});function b(x,A){return xA?1:0}function M(x){return new f(x||b,null)}},3837(n,a,o){"use strict";n.exports=k;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=ArrayBuffer,d=DataView;function v(D){return p.isView(D)&&!(D instanceof d)}function m(D){return Array.isArray(D)||v(D)}function g(D,F){return D[0]=F[0],D[1]=F[1],D[2]=F[2],D}function w(D){this.gl=D,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(D)}var _=w.prototype;_.update=function(D){D=D||{};function F(V,Y,H){if(H in D){var j=D[H],Q=this[H],te;(V?m(j)&&m(j[0]):m(j))?this[H]=te=[Y(j[0]),Y(j[1]),Y(j[2])]:this[H]=te=[Y(j),Y(j),Y(j)];for(var ue=0;ue<3;++ue)if(te[ue]!==Q[ue])return!0}return!1}var P=F.bind(this,!1,Number),R=F.bind(this,!1,Boolean),L=F.bind(this,!1,String),I=F.bind(this,!0,function(V){if(m(V)){if(V.length===3)return[+V[0],+V[1],+V[2],1];if(V.length===4)return[+V[0],+V[1],+V[2],+V[3]]}return[0,0,0,1]}),B,O=!1,$=!1;if("bounds"in D)for(var X=D.bounds,K=0;K<2;++K)for(var G=0;G<3;++G)X[K][G]!==this.bounds[K][G]&&($=!0),this.bounds[K][G]=X[K][G];if("ticks"in D){B=D.ticks,O=!0,this.autoTicks=!1;for(var K=0;K<3;++K)this.tickSpacing[K]=0}else P("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in D||"tickSpacing"in D||(this.autoTicks=!0),$=!0,O=!0,this._firstInit=!1),$&&this.autoTicks&&(B=f.create(this.bounds,this.tickSpacing),O=!0),O){for(var K=0;K<3;++K)B[K].sort(function(Y,H){return Y.x-H.x});f.equal(B,this.ticks)?O=!1:this.ticks=B}R("tickEnable"),L("tickFont")&&(O=!0),L("tickFontStyle")&&(O=!0),L("tickFontWeight")&&(O=!0),L("tickFontVariant")&&(O=!0),P("tickSize"),P("tickAngle"),P("tickPad"),I("tickColor");var q=L("labels");L("labelFont")&&(q=!0),L("labelFontStyle")&&(q=!0),L("labelFontWeight")&&(q=!0),L("labelFontVariant")&&(q=!0),R("labelEnable"),P("labelSize"),P("labelPad"),I("labelColor"),R("lineEnable"),R("lineMirror"),P("lineWidth"),I("lineColor"),R("lineTickEnable"),R("lineTickMirror"),P("lineTickLength"),P("lineTickWidth"),I("lineTickColor"),R("gridEnable"),P("gridWidth"),I("gridColor"),R("zeroEnable"),I("zeroLineColor"),P("zeroLineWidth"),R("backgroundEnable"),I("backgroundColor");var J=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],N=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(q||O)&&this._text.update(this.bounds,this.labels,J,this.ticks,N):this._text=s(this.gl,this.bounds,this.labels,J,this.ticks,N),this._lines&&O&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function b(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new b,new b,new b];function x(D,F,P,R,L){for(var I=D.primalOffset,B=D.primalMinor,O=D.mirrorOffset,$=D.mirrorMinor,X=R[F],K=0;K<3;++K)if(F!==K){var G=I,q=O,J=B,N=$;X&1<0?(J[K]=-1,N[K]=0):(J[K]=0,N[K]=1)}}var A=[0,0,0],T={model:h,view:h,projection:h,_ortho:!1};_.isOpaque=function(){return!0},_.isTransparent=function(){return!1},_.drawTransparent=function(D){};var y=0,E=[0,0,0],S=[0,0,0],C=[0,0,0];_.draw=function(D){D=D||T;for(var H=this.gl,F=D.model||h,P=D.view||h,R=D.projection||h,L=this.bounds,I=D._ortho||!1,B=c(F,P,R,L,I),O=B.cubeEdges,$=B.axis,X=P[12],K=P[13],G=P[14],q=P[15],J=I?2:1,N=J*this.pixelRatio*(R[3]*X+R[7]*K+R[11]*G+R[15]*q)/H.drawingBufferHeight,V=0;V<3;++V)this.lastCubeProps.cubeEdges[V]=O[V],this.lastCubeProps.axis[V]=$[V];for(var Y=M,V=0;V<3;++V)x(M[V],V,this.bounds,O,$);for(var H=this.gl,j=A,V=0;V<3;++V)this.backgroundEnable[V]?j[V]=$[V]:j[V]=0;this._background.draw(F,P,R,L,j,this.backgroundColor),this._lines.bind(F,P,R,this);for(var V=0;V<3;++V){var Q=[0,0,0];$[V]>0?Q[V]=L[1][V]:Q[V]=L[0][V];for(var te=0;te<2;++te){var ue=(V+1+te)%3,ge=(V+1+(te^1))%3;this.gridEnable[ue]&&this._lines.drawGrid(ue,ge,this.bounds,Q,this.gridColor[ue],this.gridWidth[ue]*this.pixelRatio)}for(var te=0;te<2;++te){var ue=(V+1+te)%3,ge=(V+1+(te^1))%3;this.zeroEnable[ge]&&Math.min(L[0][ge],L[1][ge])<=0&&Math.max(L[0][ge],L[1][ge])>=0&&this._lines.drawZero(ue,ge,this.bounds,Q,this.zeroLineColor[ge],this.zeroLineWidth[ge]*this.pixelRatio)}}for(var V=0;V<3;++V){this.lineEnable[V]&&this._lines.drawAxisLine(V,this.bounds,Y[V].primalOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio),this.lineMirror[V]&&this._lines.drawAxisLine(V,this.bounds,Y[V].mirrorOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio);for(var Ee=g(E,Y[V].primalMinor),xe=g(S,Y[V].mirrorMinor),ce=this.lineTickLength,te=0;te<3;++te){var oe=N/F[5*te];Ee[te]*=ce[te]*oe,xe[te]*=ce[te]*oe}this.lineTickEnable[V]&&this._lines.drawAxisTicks(V,Y[V].primalOffset,Ee,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio),this.lineTickMirror[V]&&this._lines.drawAxisTicks(V,Y[V].mirrorOffset,xe,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,P,R,this.pixelRatio);var Se,be=.5,fe,ee;function ae(ze){ee=[0,0,0],ee[ze]=1}function _e(ze,we,me){var Le=(ze+1)%3,Ne=(ze+2)%3,Je=we[Le],rt=we[Ne],mt=me[Le],dt=me[Ne];if(Je>0&&dt>0){ae(Le);return}else if(Je>0&&dt<0){ae(Le);return}else if(Je<0&&dt>0){ae(Le);return}else if(Je<0&&dt<0){ae(Le);return}else if(rt>0&&mt>0){ae(Ne);return}else if(rt>0&&mt<0){ae(Ne);return}else if(rt<0&&mt>0){ae(Ne);return}else if(rt<0&&mt<0){ae(Ne);return}}for(var V=0;V<3;++V){for(var re=Y[V].primalMinor,pe=Y[V].mirrorMinor,Te=g(C,Y[V].primalOffset),te=0;te<3;++te)this.lineTickEnable[V]&&(Te[te]+=N*re[te]*Math.max(this.lineTickLength[te],0)/F[5*te]);var Ce=[0,0,0];if(Ce[V]=1,this.tickEnable[V]){this.tickAngle[V]===-3600?(this.tickAngle[V]=0,this.tickAlign[V]="auto"):this.tickAlign[V]=-1,fe=1,Se=[this.tickAlign[V],be,fe],Se[0]==="auto"?Se[0]=y:Se[0]=parseInt(""+Se[0]),ee=[0,0,0],_e(V,re,pe);for(var te=0;te<3;++te)Te[te]+=N*re[te]*this.tickPad[te]/F[5*te];this._text.drawTicks(V,this.tickSize[V],this.tickAngle[V],Te,this.tickColor[V],Ce,ee,Se)}if(this.labelEnable[V]){fe=0,ee=[0,0,0],this.labels[V].length>4&&(ae(V),fe=1),Se=[this.labelAlign[V],be,fe],Se[0]==="auto"?Se[0]=y:Se[0]=parseInt(""+Se[0]);for(var te=0;te<3;++te)Te[te]+=N*re[te]*this.labelPad[te]/F[5*te];Te[V]+=.5*(L[0][V]+L[1][V]),this._text.drawLabel(V,this.labelSize[V],this.labelAngle[V],Te,this.labelColor[V],[0,0,0],ee,Se)}}this._text.unbind()},_.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function k(D,F){var P=new w(D);return P.update(F),P}},5304(n,a,o){"use strict";n.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(p,d,v,m){this.gl=p,this.buffer=d,this.vao=v,this.shader=m}var f=c.prototype;f.draw=function(p,d,v,m,g,w){for(var _=!1,b=0;b<3;++b)_=_||g[b];if(_){var M=this.gl;M.enable(M.POLYGON_OFFSET_FILL),M.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:p,view:d,projection:v,bounds:m,enable:g,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),M.disable(M.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(p){for(var d=[],v=[],m=0,g=0;g<3;++g)for(var w=(g+1)%3,_=(g+2)%3,b=[0,0,0],M=[0,0,0],x=-1;x<=1;x+=2){v.push(m,m+2,m+1,m+1,m+2,m+3),b[g]=x,M[g]=x;for(var A=-1;A<=1;A+=2){b[w]=A;for(var T=-1;T<=1;T+=2)b[_]=T,d.push(b[0],b[1],b[2],M[0],M[1],M[2]),m+=1}var y=w;w=_,_=y}var E=s(p,new Float32Array(d)),S=s(p,new Uint16Array(v),p.ELEMENT_ARRAY_BUFFER),C=l(p,[{buffer:E,type:p.FLOAT,size:3,offset:0,stride:24},{buffer:E,type:p.FLOAT,size:3,offset:12,stride:24}],S),k=u(p);return k.attributes.position.location=0,k.attributes.normal.location=1,new c(p,E,C,k)}},6429(n,a,o){"use strict";n.exports=x;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),p=new Array(8),d=new Array(3),v=[0,0,0];(function(){for(var A=0;A<8;++A)h[A]=[1,1,1,1],p[A]=[1,1,1]})();function m(A,T,y){for(var E=0;E<4;++E){A[E]=y[12+E];for(var S=0;S<3;++S)A[E]+=T[S]*y[4*S+E]}}var g=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(A){for(var T=0;T$&&(P|=1<$){P|=1<p[k][1])&&(Y=k);for(var H=-1,k=0;k<3;++k){var j=Y^1<p[Q][0]&&(Q=j)}}var te=_;te[0]=te[1]=te[2]=0,te[s.log2(H^Y)]=Y&H,te[s.log2(Y^Q)]=Y&Q;var ue=Q^7;ue===P||ue===V?(ue=H^7,te[s.log2(Q^ue)]=ue&Q):te[s.log2(H^ue)]=ue&H;for(var ge=b,Ee=P,I=0;I<3;++I)Ee&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? b - PI : b; } float look_horizontal_or_vertical(float a, float ratio) { // ratio controls the ratio between being horizontal to (vertical + horizontal) // if ratio is set to 0.5 then it is 50%, 50%. // when using a higher ratio e.g. 0.75 the result would // likely be more horizontal than vertical. float b = positive_angle(a); return (b < ( ratio) * HALF_PI) ? 0.0 : (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : (b < (2.0 + ratio) * HALF_PI) ? 0.0 : (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : 0.0; } float roundTo(float a, float b) { return float(b * floor((a + 0.5 * b) / b)); } float look_round_n_directions(float a, int n) { float b = positive_angle(a); float div = TWO_PI / float(n); float c = roundTo(b, div); return look_upwards(c); } float applyAlignOption(float rawAngle, float delta) { return (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal rawAngle; // otherwise return back raw input angle } bool isAxisTitle = (axis.x == 0.0) && (axis.y == 0.0) && (axis.z == 0.0); void main() { //Compute world offset float axisDistance = position.z; vec3 dataPosition = axisDistance * axis + offset; float beta = angle; // i.e. user defined attributes for each tick float axisAngle; float clipAngle; float flip; if (enableAlign) { axisAngle = (isAxisTitle) ? HALF_PI : computeViewAngle(dataPosition, dataPosition + axis); clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; beta += applyAlignOption(clipAngle, flip * PI); } //Compute plane offset vec2 planeCoord = position.xy * pixelScale; mat2 planeXform = scale * mat2( cos(beta), sin(beta), -sin(beta), cos(beta) ); vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; //Compute clip position vec3 clipPosition = project(dataPosition); //Apply text offset in clip coordinates clipPosition += vec3(viewOffset, 0.0); //Done gl_Position = vec4(clipPosition, 1.0); } `]),h=s([`precision highp float; #define GLSLIFY 1 uniform vec4 color; void main() { gl_FragColor = color; }`]);a.Q=function(v){return l(v,f,h,null,[{name:"position",type:"vec3"}])};var p=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec3 normal; uniform mat4 model, view, projection; uniform vec3 enable; uniform vec3 bounds[2]; varying vec3 colorChannel; void main() { vec3 signAxis = sign(bounds[1] - bounds[0]); vec3 realNormal = signAxis * normal; if(dot(realNormal, enable) > 0.0) { vec3 minRange = min(bounds[0], bounds[1]); vec3 maxRange = max(bounds[0], bounds[1]); vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); } else { gl_Position = vec4(0,0,0,0); } colorChannel = abs(realNormal); } `]),d=s([`precision highp float; #define GLSLIFY 1 uniform vec4 colors[3]; varying vec3 colorChannel; void main() { gl_FragColor = colorChannel.x * colors[0] + colorChannel.y * colors[1] + colorChannel.z * colors[2]; }`]);a.bg=function(v){return l(v,p,d,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(n,a,o){"use strict";n.exports=w;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var p=3;function d(_,b,M,x){this.gl=_,this.shader=b,this.buffer=M,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=d.prototype,m=[0,0];v.bind=function(_,b,M,x){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=_,A.view=b,A.projection=M,A.pixelScale=x,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=m},v.unbind=function(){this.vao.unbind()},v.update=function(_,b,M,x,A){var T=[];function y(I,B,O,$,X,K){var G=[O.style,O.weight,O.variant,O.family].join("_"),q=h[G];q||(q=h[G]={});var J=q[B];J||(J=q[B]=g(B,{triangles:!0,font:O.family,fontStyle:O.style,fontWeight:O.weight,fontVariant:O.variant,textAlign:"center",textBaseline:"middle",lineSpacing:X,styletags:K}));for(var N=($||12)/12,V=J.positions,Y=J.cells,H=0,j=Y.length;H=0;--te){var ue=V[Q[te]];T.push(N*ue[0],-N*ue[1],I)}}for(var E=[0,0,0],S=[0,0,0],C=[0,0,0],k=[0,0,0],D=1.25,F={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},P=0;P<3;++P){C[P]=T.length/p|0,y(.5*(_[0][P]+_[1][P]),b[P],M[P],12,D,F),k[P]=(T.length/p|0)-C[P],E[P]=T.length/p|0;for(var R=0;R=0&&(p=f.length-h-1);var d=Math.pow(10,p),v=Math.round(u*c*d),m=v+"";if(m.indexOf("e")>=0)return m;var g=v/d,w=v%d;v<0?(g=-Math.ceil(g)|0,w=-w|0):(g=Math.floor(g)|0,w=w|0);var _=""+g;if(v<0&&(_="-"+_),p){for(var b=""+w;b.length=u[0][h];--v)p.push({x:v*c[h],text:o(c[h],v)});f.push(p)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;h_)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(w,x,M),_}function d(g,w){for(var _=s.malloc(g.length,w),b=g.length,M=0;M=0;--b){if(w[b]!==_)return!1;_*=g[b]}return!0}h.update=function(g,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof g=="object"&&typeof g.shape!="undefined"){var _=g.dtype;if(c.indexOf(_)<0&&(_="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var b=gl.getExtension("OES_element_index_uint");b&&_!=="uint16"?_="uint32":_="uint16"}if(_===g.dtype&&v(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=p(this.gl,this.type,this.length,this.usage,g.data,w):this.length=p(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),w);else{var M=s.malloc(g.size,_),x=u(M,g.shape);l.assign(x,g),w<0?this.length=p(this.gl,this.type,this.length,this.usage,M,w):this.length=p(this.gl,this.type,this.length,this.usage,M.subarray(0,g.size),w),s.free(M)}}else if(Array.isArray(g)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=d(g,"uint16"):A=d(g,"float32"),w<0?this.length=p(this.gl,this.type,this.length,this.usage,A,w):this.length=p(this.gl,this.type,this.length,this.usage,A.subarray(0,g.length),w),s.free(A)}else if(typeof g=="object"&&typeof g.length=="number")this.length=p(this.gl,this.type,this.length,this.usage,g,w);else if(typeof g=="number"||g===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function m(g,w,_,b){if(_=_||g.ARRAY_BUFFER,b=b||g.DYNAMIC_DRAW,_!==g.ARRAY_BUFFER&&_!==g.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(b!==g.DYNAMIC_DRAW&&b!==g.STATIC_DRAW&&b!==g.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=g.createBuffer(),x=new f(g,_,M,0,b);return x.update(w),x}n.exports=m},6405(n,a,o){"use strict";var s=o(2931);n.exports=function(u,c){var f=u.positions,h=u.vectors,p={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),p;for(var d=0,v=1/0,m=-1/0,g=1/0,w=-1/0,_=1/0,b=-1/0,M=null,x=null,A=[],T=1/0,y=!1,E=u.coneSizemode==="raw",S=0;Sd&&(d=s.length(k)),S&&!E){var D=2*s.distance(M,C)/(s.length(x)+s.length(k));D?(T=Math.min(T,D),y=!1):y=!0}y||(M=C,x=k),A.push(k)}var F=[v,g,_],P=[m,w,b];c&&(c[0]=F,c[1]=P),d===0&&(d=1);var R=1/d;isFinite(T)||(T=1),p.vectorScale=T;var L=u.coneSize||(E?1:.5);u.absoluteConeSize&&(L=u.absoluteConeSize*R),p.coneScale=L;for(var S=0,I=0;S=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(A){this.pickId=A};function w(A){for(var T=d({colormap:A,nshades:256,format:"rgba"}),y=new Uint8Array(256*4),E=0;E<256;++E){for(var S=T[E],C=0;C<3;++C)y[4*E+C]=S[C];y[4*E+3]=S[3]*255}return p(y,[256,256,4],[4,0,1])}function _(A){for(var T=A.length,y=new Array(T),E=0;E0){var I=this.triShader;I.bind(),I.uniforms=D,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(A){A=A||{};for(var T=this.gl,y=A.model||v,E=A.view||v,S=A.projection||v,C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)C[0][k]=Math.max(C[0][k],this.clipBounds[0][k]),C[1][k]=Math.min(C[1][k],this.clipBounds[1][k]);this._model=[].slice.call(y),this._view=[].slice.call(E),this._projection=[].slice.call(S),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var D={model:y,view:E,projection:S,clipBounds:C,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},F=this.pickShader;F.bind(),F.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(A){if(!A||A.id!==this.pickId)return null;var T=A.value[0]+256*A.value[1]+65536*A.value[2],y=this.cells[T],E=this.positions[y[1]].slice(0,3),S={position:E,dataCoordinate:E,index:Math.floor(y[1]/48)};return this.traceType==="cone"?S.index=Math.floor(y[1]/48):this.traceType==="streamtube"&&(S.intensity=this.intensity[y[1]],S.velocity=this.vectors[y[1]].slice(0,3),S.divergence=this.vectors[y[1]][3],S.index=T),S},g.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function b(A,T){var y=s(A,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return y.attributes.position.location=0,y.attributes.color.location=2,y.attributes.uv.location=3,y.attributes.vector.location=4,y}function M(A,T){var y=s(A,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return y.attributes.position.location=0,y.attributes.id.location=1,y.attributes.vector.location=4,y}function x(A,T,y){var E=y.shaders;arguments.length===1&&(T=A,A=T.gl);var S=b(A,E),C=M(A,E),k=c(A,p(new Uint8Array([255,255,255,255]),[1,1,4]));k.generateMipmap(),k.minFilter=A.LINEAR_MIPMAP_LINEAR,k.magFilter=A.LINEAR;var D=l(A),F=l(A),P=l(A),R=l(A),L=l(A),I=u(A,[{buffer:D,type:A.FLOAT,size:4},{buffer:L,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:P,type:A.FLOAT,size:4},{buffer:R,type:A.FLOAT,size:2},{buffer:F,type:A.FLOAT,size:4}]),B=new m(A,k,S,C,D,F,L,P,R,I,y.traceType||"cone");return B.update(T),B}n.exports=x},614(n,a,o){var s=o(3236),l=s([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec3 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, coneScale, coneOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * conePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(conePosition, 1.0); vec4 t_position = view * conePosition; gl_Position = projection * t_position; f_color = color; f_data = conePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),u=s([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),c=s([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float vectorScale, coneScale, coneOffset; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * conePosition); f_id = id; f_position = position.xyz; } `]),f=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(n){n.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(n,a,o){var s=o(737);n.exports=function(u){return s[u]}},9165(n,a,o){"use strict";n.exports=m;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(g,w,_,b){this.gl=g,this.shader=b,this.buffer=w,this.vao=_,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(g){var w=this.gl,_=this.shader.uniforms;this.shader.bind();var b=_.view=g.view||c,M=_.projection=g.projection||c;_.model=g.model||c,_.clipBounds=this.clipBounds,_.opacity=this.opacity;var x=b[12],A=b[13],T=b[14],y=b[15],E=g._ortho||!1,S=E?2:1,C=S*this.pixelRatio*(M[3]*x+M[7]*A+M[11]*T+M[15]*y)/w.drawingBufferHeight;this.vao.bind();for(var k=0;k<3;++k)w.lineWidth(this.lineWidth[k]*this.pixelRatio),_.capSize=this.capSize[k]*C,this.lineCount[k]&&w.drawArrays(w.LINES,this.lineOffset[k],this.lineCount[k]);this.vao.unbind()};function p(g,w){for(var _=0;_<3;++_)g[0][_]=Math.min(g[0][_],w[_]),g[1][_]=Math.max(g[1][_],w[_])}var d=(function(){for(var g=new Array(3),w=0;w<3;++w){for(var _=[],b=1;b<=2;++b)for(var M=-1;M<=1;M+=2){var x=(b+w)%3,A=[0,0,0];A[x]=M,_.push(A)}g[w]=_}return g})();function v(g,w,_,b){for(var M=d[b],x=0;x0){var D=E.slice();D[T]+=C[1][T],M.push(E[0],E[1],E[2],k[0],k[1],k[2],k[3],0,0,0,D[0],D[1],D[2],k[0],k[1],k[2],k[3],0,0,0),p(this.bounds,D),A+=2+v(M,D,k,T)}}}this.lineCount[T]=A-this.lineOffset[T]}this.buffer.update(M)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function m(g){var w=g.gl,_=s(w),b=l(w,[{buffer:_,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:_,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:_,type:w.FLOAT,size:3,offset:28,stride:40}]),M=u(w);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var x=new f(w,_,b,M);return x.update(g),x}},3436(n,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; attribute vec4 color; uniform mat4 model, view, projection; uniform float capSize; varying vec4 fragColor; varying vec3 fragPosition; void main() { vec4 worldPosition = model * vec4(position, 1.0); worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; }`]),c=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float opacity; varying vec3 fragPosition; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], fragPosition) || fragColor.a * opacity == 0. ) discard; gl_FragColor = opacity * fragColor; }`]);n.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260(n,a,o){"use strict";var s=o(7766);n.exports=A;var l=null,u,c,f,h;function p(T){var y=T.getParameter(T.FRAMEBUFFER_BINDING),E=T.getParameter(T.RENDERBUFFER_BINDING),S=T.getParameter(T.TEXTURE_BINDING_2D);return[y,E,S]}function d(T,y){T.bindFramebuffer(T.FRAMEBUFFER,y[0]),T.bindRenderbuffer(T.RENDERBUFFER,y[1]),T.bindTexture(T.TEXTURE_2D,y[2])}function v(T,y){var E=T.getParameter(y.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(E+1);for(var S=0;S<=E;++S){for(var C=new Array(E),k=0;k1&&F.drawBuffersWEBGL(l[D]);var B=E.getExtension("WEBGL_depth_texture");B?P?T.depth=g(E,C,k,B.UNSIGNED_INT_24_8_WEBGL,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):R&&(T.depth=g(E,C,k,E.UNSIGNED_SHORT,E.DEPTH_COMPONENT,E.DEPTH_ATTACHMENT)):R&&P?T._depth_rb=w(E,C,k,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):R?T._depth_rb=w(E,C,k,E.DEPTH_COMPONENT16,E.DEPTH_ATTACHMENT):P&&(T._depth_rb=w(E,C,k,E.STENCIL_INDEX,E.STENCIL_ATTACHMENT));var O=E.checkFramebufferStatus(E.FRAMEBUFFER);if(O!==E.FRAMEBUFFER_COMPLETE){T._destroyed=!0,E.bindFramebuffer(E.FRAMEBUFFER,null),E.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(E.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var I=0;IC||E<0||E>C)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=y,T._shape[1]=E;for(var k=p(S),D=0;Dk||E<0||E>k)throw new Error("gl-fbo: Parameters are too large for FBO");S=S||{};var D=1;if("color"in S){if(D=Math.max(S.color|0,0),D<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1)if(C){if(D>T.getParameter(C.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var F=T.UNSIGNED_BYTE,P=T.getExtension("OES_texture_float");if(S.float&&D>0){if(!P)throw new Error("gl-fbo: Context does not support floating point textures");F=T.FLOAT}else S.preferFloat&&D>0&&P&&(F=T.FLOAT);var R=!0;"depth"in S&&(R=!!S.depth);var L=!1;return"stencil"in S&&(L=!!S.stencil),new b(T,y,E,F,D,R,L,C)}},2992(n,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);n.exports=f;function f(h,p,d){"use strict";var v=u(p)||"of unknown name (see npm glsl-shader-name)",m="unknown type";d!==void 0&&(m=d===l.FRAGMENT_SHADER?"fragment":"vertex");for(var g=s(`Error compiling %s shader %s: `,m,v),w=s("%s%s",g,h),_=h.split(` `),b={},M=0;M<_.length;M++){var x=_[M];if(!(x===""||x==="\0")){var A=parseInt(x.split(":")[2]);if(isNaN(A))throw new Error(s("Could not parse error: %s",x));b[A]=x}}for(var T=c(p).split(` `),M=0;M max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D dashTexture; uniform float dashScale; uniform float opacity; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], worldPosition) || fragColor.a * opacity == 0. ) discard; float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; if(dashWeight < 0.5) { discard; } gl_FragColor = fragColor * opacity; } `]),f=s([`precision highp float; #define GLSLIFY 1 #define FLOAT_MAX 1.70141184e38 #define FLOAT_MIN 1.17549435e-38 // https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl vec4 packFloat(float v) { float av = abs(v); //Handle special cases if(av < FLOAT_MIN) { return vec4(0.0, 0.0, 0.0, 0.0); } else if(v > FLOAT_MAX) { return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; } else if(v < -FLOAT_MAX) { return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; } vec4 c = vec4(0,0,0,0); //Compute exponent and mantissa float e = floor(log2(av)); float m = av * pow(2.0, -e) - 1.0; //Unpack mantissa c[1] = floor(128.0 * m); m -= c[1] / 128.0; c[2] = floor(32768.0 * m); m -= c[2] / 32768.0; c[3] = floor(8388608.0 * m); //Unpack exponent float ebias = e + 127.0; c[0] = floor(ebias / 2.0); ebias -= c[0] * 2.0; c[1] += floor(ebias) * 128.0; //Unpack sign bit c[0] += 128.0 * step(0.0, -v); //Scale back to range return c / 255.0; } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform float pickId; uniform vec3 clipBounds[2]; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); }`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(p){return l(p,u,c,null,h)},a.createPickShader=function(p){return l(p,u,f,null,h)}},5714(n,a,o){"use strict";n.exports=T;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(y,E,S,C){return c[0]=C,c[1]=S,c[2]=E,c[3]=y,f[0]}var p=o(2478),d=o(9618),v=o(7319),m=v.createShader,g=v.createPickShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function _(y,E){for(var S=0,C=0;C<3;++C){var k=y[C]-E[C];S+=k*k}return Math.sqrt(S)}function b(y){for(var E=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],S=0;S<3;++S)E[0][S]=Math.max(y[0][S],E[0][S]),E[1][S]=Math.min(y[1][S],E[1][S]);return E}function M(y,E,S,C){this.arcLength=y,this.position=E,this.index=S,this.dataCoordinate=C}function x(y,E,S,C,k,D){this.gl=y,this.shader=E,this.pickShader=S,this.buffer=C,this.vao=k,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=D,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var A=x.prototype;A.isTransparent=function(){return this.hasAlpha},A.isOpaque=function(){return!this.hasAlpha},A.pickSlots=1,A.setPickBase=function(y){this.pickId=y},A.drawTransparent=A.draw=function(y){if(this.vertexCount){var E=this.gl,S=this.shader,C=this.vao;S.bind(),S.uniforms={model:y.model||w,view:y.view||w,projection:y.projection||w,clipBounds:b(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},C.bind(),C.draw(E.TRIANGLE_STRIP,this.vertexCount),C.unbind()}},A.drawPick=function(y){if(this.vertexCount){var E=this.gl,S=this.pickShader,C=this.vao;S.bind(),S.uniforms={model:y.model||w,view:y.view||w,projection:y.projection||w,pickId:this.pickId,clipBounds:b(this.clipBounds),screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},C.bind(),C.draw(E.TRIANGLE_STRIP,this.vertexCount),C.unbind()}},A.update=function(y){var E,S;this.dirty=!0;var C=!!y.connectGaps;"dashScale"in y&&(this.dashScale=y.dashScale),this.hasAlpha=!1,"opacity"in y&&(this.opacity=+y.opacity,this.opacity<1&&(this.hasAlpha=!0));var k=[],D=[],F=[],P=0,R=0,L=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],I=y.position||y.positions;if(I){var B=y.color||y.colors||[0,0,0,1],O=y.lineWidth||1,$=!1;e:for(E=1;E0){for(var G=0;G<24;++G)k.push(k[k.length-12]);R+=2,$=!0}continue e}L[0][S]=Math.min(L[0][S],X[S],K[S]),L[1][S]=Math.max(L[1][S],X[S],K[S])}var q,J;Array.isArray(B[0])?(q=B.length>E-1?B[E-1]:B.length>0?B[B.length-1]:[0,0,0,1],J=B.length>E?B[E]:B.length>0?B[B.length-1]:[0,0,0,1]):q=J=B,q.length===3&&(q=[q[0],q[1],q[2],1]),J.length===3&&(J=[J[0],J[1],J[2],1]),!this.hasAlpha&&q[3]<1&&(this.hasAlpha=!0);var N;Array.isArray(O)?N=O.length>E-1?O[E-1]:O.length>0?O[O.length-1]:[0,0,0,1]:N=O;var V=P;if(P+=_(X,K),$){for(S=0;S<2;++S)k.push(X[0],X[1],X[2],K[0],K[1],K[2],V,N,q[0],q[1],q[2],q[3]);R+=2,$=!1}k.push(X[0],X[1],X[2],K[0],K[1],K[2],V,N,q[0],q[1],q[2],q[3],X[0],X[1],X[2],K[0],K[1],K[2],V,-N,q[0],q[1],q[2],q[3],K[0],K[1],K[2],X[0],X[1],X[2],P,-N,J[0],J[1],J[2],J[3],K[0],K[1],K[2],X[0],X[1],X[2],P,N,J[0],J[1],J[2],J[3]),R+=4}}if(this.buffer.update(k),D.push(P),F.push(I[I.length-1].slice()),this.bounds=L,this.vertexCount=R,this.points=F,this.arcLength=D,"dashes"in y){var Y=y.dashes,H=Y.slice();for(H.unshift(0),E=1;E1.0001)return null;S+=E[M]}return Math.abs(S-1)>.001?null:[x,h(d,E),E]}},840(n,a,o){var s=o(3236),l=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; attribute vec4 color; attribute vec2 uv; uniform mat4 model , view , projection , inverseModel; uniform vec3 eyePosition , lightPosition; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; vec4 project(vec3 p) { return projection * (view * (model * vec4(p, 1.0))); } void main() { gl_Position = project(position); //Lighting geometry parameters vec4 cameraCoordinate = view * vec4(position , 1.0); cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); f_color = color; f_data = position; f_uv = uv; } `]),u=s([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } //#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness , fresnel , kambient , kdiffuse , kspecular; uniform sampler2D texture; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; void main() { if (f_color.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], f_data) ) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * f_color.a; } `]),c=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 color; attribute vec2 uv; uniform mat4 model, view, projection; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_color = color; f_data = position; f_uv = uv; }`]),f=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),h=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 uv; attribute float pointSize; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); } gl_PointSize = pointSize; f_color = color; f_uv = uv; }`]),p=s([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec2 f_uv; void main() { vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); if(dot(pointR, pointR) > 0.25) { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),d=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 id; uniform mat4 model, view, projection; varying vec3 f_position; varying vec4 f_id; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; }`]),v=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]),m=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute float pointSize; attribute vec4 id; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0, 0.0, 0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); gl_PointSize = pointSize; } f_id = id; f_position = position; }`]),g=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); }`]),w=s([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.pointShader={vertex:h,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},a.pickShader={vertex:d,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:m,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:g,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201(n,a,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),p=o(8406),d=o(6760),v=o(7608),m=o(9618),g=o(6729),w=o(7765),_=o(1888),b=o(840),M=o(7626),x=b.meshShader,A=b.wireShader,T=b.pointShader,y=b.pickShader,E=b.pointPickShader,S=b.contourShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(G,q,J,N,V,Y,H,j,Q,te,ue,ge,Ee,xe,ce,oe,Se,be,fe,ee,ae,_e,re,pe,Te,Ce,ze){this.gl=G,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=q,this.dirty=!0,this.triShader=J,this.lineShader=N,this.pointShader=V,this.pickShader=Y,this.pointPickShader=H,this.contourShader=j,this.trianglePositions=Q,this.triangleColors=ue,this.triangleNormals=Ee,this.triangleUVs=ge,this.triangleIds=te,this.triangleVAO=xe,this.triangleCount=0,this.lineWidth=1,this.edgePositions=ce,this.edgeColors=Se,this.edgeUVs=be,this.edgeIds=oe,this.edgeVAO=fe,this.edgeCount=0,this.pointPositions=ee,this.pointColors=_e,this.pointUVs=re,this.pointSizes=pe,this.pointIds=ae,this.pointVAO=Te,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ce,this.contourVAO=ze,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=C,this._view=C,this._projection=C,this._resolution=[1,1]}var D=k.prototype;D.isOpaque=function(){return!this.hasAlpha},D.isTransparent=function(){return this.hasAlpha},D.pickSlots=1,D.setPickBase=function(G){this.pickId=G};function F(G,q){if(!q||!q.length)return 1;for(var J=0;JG&&J>0){var N=(q[J][0]-G)/(q[J][0]-q[J-1][0]);return q[J][1]*(1-N)+N*q[J-1][1]}}return 1}function P(G,q){for(var J=g({colormap:G,nshades:256,format:"rgba"}),N=new Uint8Array(256*4),V=0;V<256;++V){for(var Y=J[V],H=0;H<3;++H)N[4*V+H]=Y[H];q?N[4*V+3]=255*F(V/255,q):N[4*V+3]=255*Y[3]}return m(N,[256,256,4],[4,0,1])}function R(G){for(var q=G.length,J=new Array(q),N=0;N0){var Ee=this.triShader;Ee.bind(),Ee.uniforms=j,this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Ee=this.lineShader;Ee.bind(),Ee.uniforms=j,this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Ee=this.pointShader;Ee.bind(),Ee.uniforms=j,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Ee=this.contourShader;Ee.bind(),Ee.uniforms=j,this.contourVAO.bind(),q.drawArrays(q.LINES,0,this.contourCount),this.contourVAO.unbind()}},D.drawPick=function(G){G=G||{};for(var q=this.gl,J=G.model||C,N=G.view||C,V=G.projection||C,Y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],H=0;H<3;++H)Y[0][H]=Math.max(Y[0][H],this.clipBounds[0][H]),Y[1][H]=Math.min(Y[1][H],this.clipBounds[1][H]);this._model=[].slice.call(J),this._view=[].slice.call(N),this._projection=[].slice.call(V),this._resolution=[q.drawingBufferWidth,q.drawingBufferHeight];var j={model:J,view:N,projection:V,clipBounds:Y,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=j,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}},D.pick=function(G){if(!G||G.id!==this.pickId)return null;for(var q=G.value[0]+256*G.value[1]+65536*G.value[2],J=this.cells[q],N=this.positions,V=new Array(J.length),Y=0;YMath.abs(y))g.rotate(C,0,0,-T*E*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var k=-x.zoomSpeed*S*y/window.innerHeight*(C-g.lastT())/20;g.pan(C,0,0,_*(Math.exp(k)-1))}}},!0)},x.enableMouseListeners(),x}},799(n,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),c=s([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); }`]);n.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},4100(n,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),p=o(7169),d=o(351),v=o(4772),m=o(4040),g=o(799),w=o(2431)({tablet:!0,featureDetect:!0});n.exports={createScene:A,createCamera:s};function _(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function b(y,E){var S=null;try{S=y.getContext("webgl",E),S||(S=y.getContext("experimental-webgl",E))}catch(C){return null}return S}function M(y){var E=Math.round(Math.log(Math.abs(y))/Math.log(10));if(E<0){var S=Math.round(Math.pow(10,-E));return Math.ceil(y*S)/S}else if(E>0){var S=Math.round(Math.pow(10,E));return Math.ceil(y/S)*S}return Math.ceil(y)}function x(y){return typeof y=="boolean"?y:!0}function A(y){y=y||{},y.camera=y.camera||{};var E=y.canvas;if(!E)if(E=document.createElement("canvas"),y.container){var S=y.container;S.appendChild(E)}else document.body.appendChild(E);var C=y.gl;if(C||(y.glOptions&&(w=!!y.glOptions.preserveDrawingBuffer),C=b(E,y.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!C)throw new Error("webgl not supported");var k=y.bounds||[[-10,-10,-10],[10,10,10]],D=new _,F=h(C,C.drawingBufferWidth,C.drawingBufferHeight,{preferFloat:!w}),P=g(C),R=y.cameraObject&&y.cameraObject._ortho===!0||y.camera.projection&&y.camera.projection.type==="orthographic"||!1,L={eye:y.camera.eye||[2,0,0],center:y.camera.center||[0,0,0],up:y.camera.up||[0,1,0],zoomMin:y.camera.zoomMax||.1,zoomMax:y.camera.zoomMin||100,mode:y.camera.mode||"turntable",_ortho:R},I=y.axes||{},B=l(C,I);B.enable=!I.disable;var O=y.spikes||{},$=c(C,O),X=[],K=[],G=[],q=[],J=!0,H=!0,N=new Array(16),V=new Array(16),Y={view:null,projection:N,model:V,_ortho:!1},H=!0,j=[C.drawingBufferWidth,C.drawingBufferHeight],Q=y.cameraObject||s(E,L),te={gl:C,contextLost:!1,pixelRatio:y.pixelRatio||1,canvas:E,selection:D,camera:Q,axes:B,axesPixels:null,spikes:$,bounds:k,objects:X,shape:j,aspect:y.aspectRatio||[1,1,1],pickRadius:y.pickRadius||10,zNear:y.zNear||.01,zFar:y.zFar||1e3,fovy:y.fovy||Math.PI/4,clearColor:y.clearColor||[0,0,0,0],autoResize:x(y.autoResize),autoBounds:x(y.autoBounds),autoScale:!!y.autoScale,autoCenter:x(y.autoCenter),clipToBounds:x(y.clipToBounds),snapToData:!!y.snapToData,onselect:y.onselect||null,onrender:y.onrender||null,onclick:y.onclick||null,cameraParams:Y,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ee){this.aspect[0]=ee.x,this.aspect[1]=ee.y,this.aspect[2]=ee.z,H=!0},setBounds:function(ee,ae){this.bounds[0][ee]=ae.min,this.bounds[1][ee]=ae.max},setClearColor:function(ee){this.clearColor=ee},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ue=[C.drawingBufferWidth/te.pixelRatio|0,C.drawingBufferHeight/te.pixelRatio|0];function ge(){if(!te._stopped&&te.autoResize){var ee=E.parentNode,ae=1,_e=1;ee&&ee!==document.body?(ae=ee.clientWidth,_e=ee.clientHeight):(ae=window.innerWidth,_e=window.innerHeight);var re=Math.ceil(ae*te.pixelRatio)|0,pe=Math.ceil(_e*te.pixelRatio)|0;if(re!==E.width||pe!==E.height){E.width=re,E.height=pe;var Te=E.style;Te.position=Te.position||"absolute",Te.left="0px",Te.top="0px",Te.width=ae+"px",Te.height=_e+"px",J=!0}}}te.autoResize&&ge(),window.addEventListener("resize",ge);function Ee(){for(var ee=X.length,ae=q.length,_e=0;_e0&&G[ae-1]===0;)G.pop(),q.pop().dispose()}te.update=function(ee){te._stopped||(ee=ee||{},J=!0,H=!0)},te.add=function(ee){te._stopped||(ee.axes=B,X.push(ee),K.push(-1),J=!0,H=!0,Ee())},te.remove=function(ee){if(!te._stopped){var ae=X.indexOf(ee);ae<0||(X.splice(ae,1),K.pop(),J=!0,H=!0,Ee())}},te.dispose=function(){if(!te._stopped&&(te._stopped=!0,window.removeEventListener("resize",ge),E.removeEventListener("webglcontextlost",xe),te.mouseListener.enabled=!1,!te.contextLost)){B.dispose(),$.dispose();for(var ee=0;eeD.distance)continue;for(var me=0;me1e-6?(w=Math.acos(_),b=Math.sin(w),M=Math.sin((1-u)*w)/b,x=Math.sin(u*w)/b):(M=1-u,x=u),o[0]=M*c+x*d,o[1]=M*f+x*v,o[2]=M*h+x*m,o[3]=M*p+x*g,o}},5964(n){"use strict";n.exports=function(a){return!a&&a!==0?"":a.toString()}},9366(n,a,o){"use strict";var s=o(4359);n.exports=u;var l={};function u(c,f,h){var p=[f.style,f.weight,f.variant,f.family].join("_"),d=l[p];if(d||(d=l[p]={}),c in d)return d[c];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var m=s(c,v);v.triangles=!1;var g=s(c,v),w,_;if(h&&h!==1){for(w=0;w max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform vec4 highlightId; uniform float highlightScale; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = 1.0; if(distance(highlightId, id) < 0.0001) { scale = highlightScale; } vec4 worldPosition = model * vec4(position, 1); vec4 viewPosition = view * worldPosition; viewPosition = viewPosition / viewPosition.w; vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = position; } }`]),c=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float highlightScale, pixelRatio; uniform vec4 highlightId; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = pixelRatio; if(distance(highlightId.bgr, id.bgr) < 0.001) { scale *= highlightScale; } vec4 worldPosition = model * vec4(position, 1.0); vec4 viewPosition = view * worldPosition; vec4 clipPosition = projection * viewPosition; clipPosition /= clipPosition.w; gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); interpColor = color; pickId = id; dataCoordinate = position; } }`]),f=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform float highlightScale; uniform vec4 highlightId; uniform vec3 axes[2]; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float scale, pixelRatio; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float lscale = pixelRatio * scale; if(distance(highlightId, id) < 0.0001) { lscale *= highlightScale; } vec4 clipCenter = projection * (view * (model * vec4(position, 1))); vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = dataPosition; } } `]),h=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float opacity; varying vec4 interpColor; varying vec3 dataCoordinate; void main() { if ( outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || interpColor.a * opacity == 0. ) discard; gl_FragColor = interpColor * opacity; } `]),p=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float pickGroup; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); }`]),d=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:u,fragment:h,attributes:d},m={vertex:c,fragment:h,attributes:d},g={vertex:f,fragment:h,attributes:d},w={vertex:u,fragment:p,attributes:d},_={vertex:c,fragment:p,attributes:d},b={vertex:f,fragment:p,attributes:d};function M(x,A){var T=s(x,A),y=T.attributes;return y.position.location=0,y.color.location=1,y.glyph.location=2,y.id.location=3,T}a.createPerspective=function(x){return M(x,v)},a.createOrtho=function(x){return M(x,m)},a.createProject=function(x){return M(x,g)},a.createPickPerspective=function(x){return M(x,w)},a.createPickOrtho=function(x){return M(x,_)},a.createPickProject=function(x){return M(x,b)}},8418(n,a,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),p=o(9366),d=o(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],m=ArrayBuffer,g=DataView;function w(V){return m.isView(V)&&!(V instanceof g)}function _(V){return Array.isArray(V)||w(V)}n.exports=N;function b(V,Y){var H=V[0],j=V[1],Q=V[2],te=V[3];return V[0]=Y[0]*H+Y[4]*j+Y[8]*Q+Y[12]*te,V[1]=Y[1]*H+Y[5]*j+Y[9]*Q+Y[13]*te,V[2]=Y[2]*H+Y[6]*j+Y[10]*Q+Y[14]*te,V[3]=Y[3]*H+Y[7]*j+Y[11]*Q+Y[15]*te,V}function M(V,Y,H,j){return b(j,j,H),b(j,j,Y),b(j,j,V)}function x(V,Y){this.index=V,this.dataCoordinate=this.position=Y}function A(V){return V===!0||V>1?1:V}function T(V,Y,H,j,Q,te,ue,ge,Ee,xe,ce,oe){this.gl=V,this.pixelRatio=1,this.shader=Y,this.orthoShader=H,this.projectShader=j,this.pointBuffer=Q,this.colorBuffer=te,this.glyphBuffer=ue,this.idBuffer=ge,this.vao=Ee,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=xe,this.pickOrthoShader=ce,this.pickProjectShader=oe,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var y=T.prototype;y.pickSlots=1,y.setPickBase=function(V){this.pickId=V},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&this.projectHasAlpha)return!0;return!1},y.isOpaque=function(){if(!this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&!this.projectHasAlpha)return!0;return!1};var E=[0,0],S=[0,0,0],C=[0,0,0],k=[0,0,0,1],D=[0,0,0,1],F=v.slice(),P=[0,0,0],R=[[0,0,0],[0,0,0]];function L(V){return V[0]=V[1]=V[2]=0,V}function I(V,Y){return V[0]=Y[0],V[1]=Y[1],V[2]=Y[2],V[3]=1,V}function B(V,Y,H,j){return V[0]=Y[0],V[1]=Y[1],V[2]=Y[2],V[H]=j,V}function O(V){for(var Y=R,H=0;H<2;++H)for(var j=0;j<3;++j)Y[H][j]=Math.max(Math.min(V[H][j],1e8),-1e8);return Y}function $(V,Y,H,j){var Q=Y.axesProject,te=Y.gl,ue=V.uniforms,ge=H.model||v,Ee=H.view||v,xe=H.projection||v,ce=Y.axesBounds,oe=O(Y.clipBounds),Se;Y.axes&&Y.axes.lastCubeProps?Se=Y.axes.lastCubeProps.axis:Se=[1,1,1],E[0]=2/te.drawingBufferWidth,E[1]=2/te.drawingBufferHeight,V.bind(),ue.view=Ee,ue.projection=xe,ue.screenSize=E,ue.highlightId=Y.highlightId,ue.highlightScale=Y.highlightScale,ue.clipBounds=oe,ue.pickGroup=Y.pickId/255,ue.pixelRatio=j;for(var be=0;be<3;++be)if(Q[be]){ue.scale=Y.projectScale[be],ue.opacity=Y.projectOpacity[be];for(var fe=F,ee=0;ee<16;++ee)fe[ee]=0;for(var ee=0;ee<4;++ee)fe[5*ee]=1;fe[5*be]=0,Se[be]<0?fe[12+be]=ce[0][be]:fe[12+be]=ce[1][be],f(fe,ge,fe),ue.model=fe;var ae=(be+1)%3,_e=(be+2)%3,re=L(S),pe=L(C);re[ae]=1,pe[_e]=1;var Te=M(xe,Ee,ge,I(k,re)),Ce=M(xe,Ee,ge,I(D,pe));if(Math.abs(Te[1])>Math.abs(Ce[1])){var ze=Te;Te=Ce,Ce=ze,ze=re,re=pe,pe=ze;var we=ae;ae=_e,_e=we}Te[0]<0&&(re[ae]=-1),Ce[1]>0&&(pe[_e]=-1);for(var me=0,Le=0,ee=0;ee<4;++ee)me+=Math.pow(ge[4*ae+ee],2),Le+=Math.pow(ge[4*_e+ee],2);re[ae]/=Math.sqrt(me),pe[_e]/=Math.sqrt(Le),ue.axes[0]=re,ue.axes[1]=pe,ue.fragClipBounds[0]=B(P,oe[0],be,-1e8),ue.fragClipBounds[1]=B(P,oe[1],be,1e8),Y.vao.bind(),Y.vao.draw(te.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&(te.lineWidth(Y.lineWidth*j),Y.vao.draw(te.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}var X=[-1e8,-1e8,-1e8],K=[1e8,1e8,1e8],G=[X,K];function q(V,Y,H,j,Q,te,ue){var ge=H.gl;if((te===H.projectHasAlpha||ue)&&$(Y,H,j,Q),te===H.hasAlpha||ue){V.bind();var Ee=V.uniforms;Ee.model=j.model||v,Ee.view=j.view||v,Ee.projection=j.projection||v,E[0]=2/ge.drawingBufferWidth,E[1]=2/ge.drawingBufferHeight,Ee.screenSize=E,Ee.highlightId=H.highlightId,Ee.highlightScale=H.highlightScale,Ee.fragClipBounds=G,Ee.clipBounds=H.axes.bounds,Ee.opacity=H.opacity,Ee.pickGroup=H.pickId/255,Ee.pixelRatio=Q,H.vao.bind(),H.vao.draw(ge.TRIANGLES,H.vertexCount),H.lineWidth>0&&(ge.lineWidth(H.lineWidth*Q),H.vao.draw(ge.LINES,H.lineVertexCount,H.vertexCount)),H.vao.unbind()}}y.draw=function(V){var Y=this.useOrtho?this.orthoShader:this.shader;q(Y,this.projectShader,this,V,this.pixelRatio,!1,!1)},y.drawTransparent=function(V){var Y=this.useOrtho?this.orthoShader:this.shader;q(Y,this.projectShader,this,V,this.pixelRatio,!0,!1)},y.drawPick=function(V){var Y=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;q(Y,this.pickProjectShader,this,V,1,!0,!0)},y.pick=function(V){if(!V||V.id!==this.pickId)return null;var Y=V.value[2]+(V.value[1]<<8)+(V.value[0]<<16);if(Y>=this.pointCount||Y<0)return null;var H=this.points[Y],j=this._selectResult;j.index=Y;for(var Q=0;Q<3;++Q)j.position[Q]=j.dataCoordinate[Q]=H[Q];return j},y.highlight=function(V){if(!V)this.highlightId=[1,1,1,1];else{var Y=V.index,H=Y&255,j=Y>>8&255,Q=Y>>16&255;this.highlightId=[H/255,j/255,Q/255,0]}};function J(V,Y,H,j){var Q;_(V)?Y0){var St=0,Ke=_e,bt=[0,0,0,1],pt=[0,0,0,1],Oe=_(Se)&&_(Se[0]),Ue=_(ee)&&_(ee[0]);e:for(var j=0;j0?1-Le[0][0]:Wt<0?1+Le[1][0]:1,Ht*=Ht>0?1-Le[0][1]:Ht<0?1+Le[1][1]:1;for(var fr=[Wt,Ht],Ge=we.cells||[],Qe=we.positions||[],Ce=0;Cethis.buffer.length){l.free(this.buffer);for(var _=this.buffer=l.mallocUint8(c(w*g*4)),b=0;b_)for(g=_;gw)for(g=w;g<_;g++)this.gl.disableVertexAttribArray(g);this.gl.lastAttribCount=w,this.gl.useProgram(this.program)},d.dispose=function(){for(var g=this.gl.lastAttribCount,w=0;w=0){for(var R=P.type.charAt(P.type.length-1)|0,L=new Array(R),I=0;I=0;)B+=1;D[F]=B}var O=new Array(_.length);function $(){x.program=c.program(A,x._vref,x._fref,k,D);for(var X=0;X<_.length;++X)O[X]=A.getUniformLocation(x.program,_[X].name)}$(),x._relink=$,x.types={uniforms:u(_),attributes:u(b)},x.attributes=l(A,x,C,D),Object.defineProperty(x,"uniforms",s(A,x,_,O))};function m(g,w,_,b,M){var x=new p(g);return x.update(w,_,b,M),x}n.exports=m},8866(n){function a(o,s,l){this.shortMessage=s||"",this.longMessage=l||"",this.rawError=o||"",this.message="gl-shader: "+(s||o||"")+(l?` `+l:""),this.stack=new Error().stack}a.prototype=new Error,a.prototype.name="GLError",a.prototype.constructor=a,n.exports=a},8731(n,a,o){"use strict";n.exports=p;var s=o(8866);function l(d,v,m,g,w,_){this._gl=d,this._wrapper=v,this._index=m,this._locations=g,this._dimension=w,this._constFunc=_}var u=l.prototype;u.pointer=function(v,m,g,w){var _=this,b=_._gl,M=_._locations[_._index];b.vertexAttribPointer(M,_._dimension,v||b.FLOAT,!!m,g||0,w||0),b.enableVertexAttribArray(M)},u.set=function(d,v,m,g){return this._constFunc(this._locations[this._index],d,v,m,g)},Object.defineProperty(u,"location",{get:function(){return this._locations[this._index]},set:function(d){return d!==this._locations[this._index]&&(this._locations[this._index]=d|0,this._wrapper.program=null),d|0}});var c=[function(d,v,m){return m.length===void 0?d.vertexAttrib1f(v,m):d.vertexAttrib1fv(v,m)},function(d,v,m,g){return m.length===void 0?d.vertexAttrib2f(v,m,g):d.vertexAttrib2fv(v,m)},function(d,v,m,g,w){return m.length===void 0?d.vertexAttrib3f(v,m,g,w):d.vertexAttrib3fv(v,m)},function(d,v,m,g,w,_){return m.length===void 0?d.vertexAttrib4f(v,m,g,w,_):d.vertexAttrib4fv(v,m)}];function f(d,v,m,g,w,_,b){var M=c[w],x=new l(d,v,m,g,w,M);Object.defineProperty(_,b,{set:function(A){return d.disableVertexAttribArray(g[m]),M(d,g[m],A),A},get:function(){return x},enumerable:!0})}function h(d,v,m,g,w,_,b){for(var M=new Array(w),x=new Array(w),A=0;A=0){var y=A.charCodeAt(A.length-1)-48;if(y<2||y>4)throw new s("","Invalid data type for attribute "+x+": "+A);f(d,v,T[0],g,y,w,x)}else if(A.indexOf("mat")>=0){var y=A.charCodeAt(A.length-1)-48;if(y<2||y>4)throw new s("","Invalid data type for attribute "+x+": "+A);h(d,v,T,g,y,w,x)}else throw new s("","Unknown data type for attribute "+x+": "+A);break}}return w}},3327(n,a,o){"use strict";var s=o(216),l=o(8866);n.exports=f;function u(h){return function(){return h}}function c(h,p){for(var d=new Array(h),v=0;v4)throw new l("","Invalid data type");switch(B.charAt(0)){case"b":case"i":h["uniform"+O+"iv"](v[D],F);break;case"v":h["uniform"+O+"fv"](v[D],F);break;default:throw new l("","Unrecognized data type for vector "+name+": "+B)}}else if(B.indexOf("mat")===0&&B.length===4){if(O=B.charCodeAt(B.length-1)-48,O<2||O>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+B);h["uniformMatrix"+O+"fv"](v[D],!1,F);break}else throw new l("","Unknown uniform data type for "+name+": "+B)}}}}}function w(A,T){if(typeof T!="object")return[[A,T]];var y=[];for(var E in T){var S=T[E],C=A;parseInt(E)+""===E?C+="["+E+"]":C+="."+E,typeof S=="object"?y.push.apply(y,w(C,S)):y.push([C,S])}return y}function _(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=A.indexOf("vec");if(0<=T&&T<=1&&A.length===4+T){var y=A.charCodeAt(A.length-1)-48;if(y<2||y>4)throw new l("","Invalid data type");return A.charAt(0)==="b"?c(y,!1):c(y,0)}else if(A.indexOf("mat")===0&&A.length===4){var y=A.charCodeAt(A.length-1)-48;if(y<2||y>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+A);return c(y*y,0)}else throw new l("","Unknown uniform data type for "+name+": "+A)}}function b(A,T,y){if(typeof y=="object"){var E=M(y);Object.defineProperty(A,T,{get:u(E),set:g(y),enumerable:!0,configurable:!1})}else v[y]?Object.defineProperty(A,T,{get:m(y),set:g(y),enumerable:!0,configurable:!1}):A[T]=_(d[y].type)}function M(A){var T;if(Array.isArray(A)){T=new Array(A.length);for(var y=0;y1){d[0]in h||(h[d[0]]=[]),h=h[d[0]];for(var v=1;v1)for(var w=0;w 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, tubeScale; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * tubePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(tubePosition, 1.0); vec4 t_position = view * tubePosition; gl_Position = projection * t_position; f_color = color; f_data = tubePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),u=s([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),c=s([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float tubeScale; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * (view * tubePosition); f_id = id; f_position = position.xyz; } `]),f=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(n,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(b,M,x,A){for(var T=b.points,y=b.velocities,E=b.divergences,S=[],C=[],k=[],D=[],F=[],P=[],R=0,L=0,I=l.create(),B=l.create(),O=8,$=0;$0)for(var q=0;qM)return A-1}return A},p=function(b,M,x){return bx?x:b},d=function(b,M,x){var A=M.vectors,T=M.meshgrid,y=b[0],E=b[1],S=b[2],C=T[0].length,k=T[1].length,D=T[2].length,F=h(T[0],y),P=h(T[1],E),R=h(T[2],S),L=F+1,I=P+1,B=R+1;if(F=p(F,0,C-1),L=p(L,0,C-1),P=p(P,0,k-1),I=p(I,0,k-1),R=p(R,0,D-1),B=p(B,0,D-1),F<0||P<0||R<0||L>C-1||I>k-1||B>D-1)return s.create();var O=T[0][F],$=T[0][L],X=T[1][P],K=T[1][I],G=T[2][R],q=T[2][B],J=(y-O)/($-O),N=(E-X)/(K-X),V=(S-G)/(q-G);isFinite(J)||(J=.5),isFinite(N)||(N=.5),isFinite(V)||(V=.5);var Y,H,j,Q,te,ue;switch(x.reversedX&&(F=C-1-F,L=C-1-L),x.reversedY&&(P=k-1-P,I=k-1-I),x.reversedZ&&(R=D-1-R,B=D-1-B),x.filled){case 5:te=R,ue=B,j=P*D,Q=I*D,Y=F*D*k,H=L*D*k;break;case 4:te=R,ue=B,Y=F*D,H=L*D,j=P*D*C,Q=I*D*C;break;case 3:j=P,Q=I,te=R*k,ue=B*k,Y=F*k*D,H=L*k*D;break;case 2:j=P,Q=I,Y=F*k,H=L*k,te=R*k*C,ue=B*k*C;break;case 1:Y=F,H=L,te=R*C,ue=B*C,j=P*C*D,Q=I*C*D;break;default:Y=F,H=L,j=P*C,Q=I*C,te=R*C*k,ue=B*C*k;break}var ge=A[Y+j+te],Ee=A[Y+j+ue],xe=A[Y+Q+te],ce=A[Y+Q+ue],oe=A[H+j+te],Se=A[H+j+ue],be=A[H+Q+te],fe=A[H+Q+ue],ee=s.create(),ae=s.create(),_e=s.create(),re=s.create();s.lerp(ee,ge,oe,J),s.lerp(ae,Ee,Se,J),s.lerp(_e,xe,be,J),s.lerp(re,ce,fe,J);var pe=s.create(),Te=s.create();s.lerp(pe,ee,_e,N),s.lerp(Te,ae,re,N);var Ce=s.create();return s.lerp(Ce,pe,Te,V),Ce},v=function(b,M){var x=M[0],A=M[1],T=M[2];return b[0]=x<0?-x:x,b[1]=A<0?-A:A,b[2]=T<0?-T:T,b},m=function(b){var M=1/0;b.sort(function(y,E){return y-E});for(var x=b.length,A=1;AL||feI||eeB)},$=s.distance(M[0],M[1]),X=10*$/A,K=X*X,G=1,q=0,J=x.length;J>1&&(G=g(x));for(var N=0;Nq&&(q=ge),te.push(ge),D.push({points:Y,velocities:H,divergences:te});for(var Ee=0;EeK&&s.scale(xe,xe,X/Math.sqrt(ce)),s.add(xe,xe,V),j=C(xe),s.squaredDistance(Q,xe)-K>-1e-4*K){Y.push(xe),Q=xe,H.push(j);var ue=k(xe,j),ge=s.length(ue);isFinite(ge)&&ge>q&&(q=ge),te.push(ge)}V=xe}}var oe=f(D,b.colormap,q,G);return y?oe.tubeScale=y:(q===0&&(q=1),oe.tubeScale=T*.5*G/q),oe};var w=o(6740),_=o(6405).createMesh;n.exports.createTubeMesh=function(b,M){return _(b,M,{shaders:w,traceType:"streamtube"})}},990(n,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute vec3 f; attribute vec3 normal; uniform vec3 objectOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 lightPosition, eyePosition; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 localCoordinate = vec3(uv.zw, f.x); worldCoordinate = objectOffset + localCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); gl_Position = clipPosition; kill = f.y; value = f.z; planeCoordinate = uv.xy; vColor = texture2D(colormap, vec2(value, value)); //Lighting geometry parameters vec4 cameraCoordinate = view * worldPosition; cameraCoordinate.xyz /= cameraCoordinate.w; lightDirection = lightPosition - cameraCoordinate.xyz; eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } `]),c=l([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float beckmannSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness) { return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 lowerBound, upperBound; uniform float contourTint; uniform vec4 contourColor; uniform sampler2D colormap; uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform float vertexColor; varying float value, kill; varying vec3 worldCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { if ( kill > 0.0 || vColor.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; vec3 N = normalize(surfaceNormal); vec3 V = normalize(eyeDirection); vec3 L = normalize(lightDirection); if(gl_FrontFacing) { N = -N; } float specular = max(beckmannSpecular(L, V, N, roughness), 0.); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); //decide how to interpolate color \u2014 in vertex or in fragment vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor; vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } `]),f=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute float f; uniform vec3 objectOffset; uniform mat3 permutation; uniform mat4 model, view, projection; uniform float height, zOffset; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 dataCoordinate = permutation * vec3(uv.xy, height); worldCoordinate = objectOffset + dataCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); clipPosition.z += zOffset; gl_Position = clipPosition; value = f + objectOffset.z; kill = -1.0; planeCoordinate = uv.zw; vColor = texture2D(colormap, vec2(value, value)); //Don't do lighting for contours surfaceNormal = vec3(1,0,0); eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } `]),h=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec2 shape; uniform vec3 clipBounds[2]; uniform float pickId; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 surfaceNormal; vec2 splitFloat(float v) { float vh = 255.0 * v; float upper = floor(vh); float lower = fract(vh); return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); } void main() { if ((kill > 0.0) || (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; vec2 ux = splitFloat(planeCoordinate.x / shape.x); vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } `]);a.createShader=function(p){var d=s(p,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d.attributes.normal.location=2,d},a.createPickShader=function(p){var d=s(p,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d.attributes.normal.location=2,d},a.createContourShader=function(p){var d=s(p,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d},a.createPickContourShader=function(p){var d=s(p,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d}},9499(n,a,o){"use strict";n.exports=Y;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),p=o(5298),d=o(9994),v=o(9618),m=o(3711),g=o(6760),w=o(7608),_=o(2478),b=o(6199),M=o(990),x=M.createShader,A=M.createContourShader,T=M.createPickShader,y=M.createPickContourShader,E=40,S=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],C=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var H=0;H<3;++H){var j=k[H],Q=(H+1)%3,te=(H+2)%3;j[Q+0]=1,j[te+3]=1,j[H+6]=1}})();function D(H,j,Q,te,ue){this.position=H,this.index=j,this.uv=Q,this.level=te,this.dataCoordinate=ue}var F=256;function P(H,j,Q,te,ue,ge,Ee,xe,ce,oe,Se,be,fe,ee,ae){this.gl=H,this.shape=j,this.bounds=Q,this.objectOffset=ae,this.intensityBounds=[],this._shader=te,this._pickShader=ue,this._coordinateBuffer=ge,this._vao=Ee,this._colorMap=xe,this._contourShader=ce,this._contourPickShader=oe,this._contourBuffer=Se,this._contourVAO=be,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new D([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=fe,this._dynamicVAO=ee,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(f.mallocFloat(1024),[0,0]),v(f.mallocFloat(1024),[0,0]),v(f.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var R=P.prototype;R.genColormap=function(H,j){var Q=!1,te=d([h({colormap:H,nshades:F,format:"rgba"}).map(function(ue,ge){var Ee=j?L(ge/255,j):ue[3];return Ee<1&&(Q=!0),[ue[0],ue[1],ue[2],255*Ee]})]);return p.divseq(te,255),this.hasAlphaScale=Q,te},R.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},R.isOpaque=function(){return!this.isTransparent()},R.pickSlots=1,R.setPickBase=function(H){this.pickId=H};function L(H,j){if(!j||!j.length)return 1;for(var Q=0;QH&&Q>0){var te=(j[Q][0]-H)/(j[Q][0]-j[Q-1][0]);return j[Q][1]*(1-te)+te*j[Q-1][1]}}return 1}var I=[0,0,0],B={showSurface:!1,showContour:!1,projections:[S.slice(),S.slice(),S.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(H,j){var Q,te,ue,ge=j.axes&&j.axes.lastCubeProps.axis||I,Ee=j.showSurface,xe=j.showContour;for(Q=0;Q<3;++Q)for(Ee=Ee||j.surfaceProject[Q],te=0;te<3;++te)xe=xe||j.contourProject[Q][te];for(Q=0;Q<3;++Q){var ce=B.projections[Q];for(te=0;te<16;++te)ce[te]=0;for(te=0;te<4;++te)ce[5*te]=1;ce[5*Q]=0,ce[12+Q]=j.axesBounds[+(ge[Q]>0)][Q],g(ce,H.model,ce);var oe=B.clipBounds[Q];for(ue=0;ue<2;++ue)for(te=0;te<3;++te)oe[ue][te]=H.clipBounds[ue][te];oe[0][Q]=-1e8,oe[1][Q]=1e8}return B.showSurface=Ee,B.showContour=xe,B}var $={model:S,view:S,projection:S,inverseModel:S.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},X=S.slice(),K=[1,0,0,0,1,0,0,0,1];function G(H,j){H=H||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var te=$;te.model=H.model||S,te.view=H.view||S,te.projection=H.projection||S,te.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],te.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],te.objectOffset=this.objectOffset,te.contourColor=this.contourColor[0],te.inverseModel=w(te.inverseModel,te.model);for(var ue=0;ue<2;++ue)for(var ge=te.clipBounds[ue],Ee=0;Ee<3;++Ee)ge[Ee]=Math.min(Math.max(this.clipBounds[ue][Ee],-1e8),1e8);te.kambient=this.ambientLight,te.kdiffuse=this.diffuseLight,te.kspecular=this.specularLight,te.roughness=this.roughness,te.fresnel=this.fresnel,te.opacity=this.opacity,te.height=0,te.permutation=K,te.vertexColor=this.vertexColor;var xe=X;for(g(xe,te.view,te.model),g(xe,te.projection,xe),w(xe,xe),ue=0;ue<3;++ue)te.eyePosition[ue]=xe[12+ue]/xe[15];var ce=xe[15];for(ue=0;ue<3;++ue)ce+=this.lightPosition[ue]*xe[4*ue+3];for(ue=0;ue<3;++ue){var oe=xe[12+ue];for(Ee=0;Ee<3;++Ee)oe+=xe[4*Ee+ue]*this.lightPosition[Ee];te.lightPosition[ue]=oe/ce}var Se=O(te,this);if(Se.showSurface){for(this._shader.bind(),this._shader.uniforms=te,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),ue=0;ue<3;++ue)!this.surfaceProject[ue]||!this.vertexCount||(this._shader.uniforms.model=Se.projections[ue],this._shader.uniforms.clipBounds=Se.clipBounds[ue],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Se.showContour){var be=this._contourShader;te.kambient=1,te.kdiffuse=0,te.kspecular=0,te.opacity=1,be.bind(),be.uniforms=te;var fe=this._contourVAO;for(fe.bind(),ue=0;ue<3;++ue)for(be.uniforms.permutation=k[ue],Q.lineWidth(this.contourWidth[ue]*this.pixelRatio),Ee=0;Ee>4)/16)/255,ue=Math.floor(te),ge=te-ue,Ee=j[1]*(H.value[1]+(H.value[2]&15)/16)/255,xe=Math.floor(Ee),ce=Ee-xe;ue+=1,xe+=1;var oe=Q.position;oe[0]=oe[1]=oe[2]=0;for(var Se=0;Se<2;++Se)for(var be=Se?ge:1-ge,fe=0;fe<2;++fe)for(var ee=fe?ce:1-ce,ae=ue+Se,_e=xe+fe,re=be*ee,pe=0;pe<3;++pe)oe[pe]+=this._field[pe].get(ae,_e)*re;for(var Te=this._pickResult.level,Ce=0;Ce<3;++Ce)if(Te[Ce]=_.le(this.contourLevels[Ce],oe[Ce]),Te[Ce]<0)this.contourLevels[Ce].length>0&&(Te[Ce]=0);else if(Te[Ce]Math.abs(we-oe[Ce])&&(Te[Ce]+=1)}for(Q.index[0]=ge<.5?ue:ue+1,Q.index[1]=ce<.5?xe:xe+1,Q.uv[0]=te/j[0],Q.uv[1]=Ee/j[1],pe=0;pe<3;++pe)Q.dataCoordinate[pe]=this._field[pe].get(Q.index[0],Q.index[1]);return Q},R.padField=function(H,j){var Q=j.shape.slice(),te=H.shape.slice();p.assign(H.lo(1,1).hi(Q[0],Q[1]),j),p.assign(H.lo(1).hi(Q[0],1),j.hi(Q[0],1)),p.assign(H.lo(1,te[1]-1).hi(Q[0],1),j.lo(0,Q[1]-1).hi(Q[0],1)),p.assign(H.lo(0,1).hi(1,Q[1]),j.hi(1)),p.assign(H.lo(te[0]-1,1).hi(1,Q[1]),j.lo(Q[0]-1)),H.set(0,0,j.get(0,0)),H.set(0,te[1]-1,j.get(0,Q[1]-1)),H.set(te[0]-1,0,j.get(Q[0]-1,0)),H.set(te[0]-1,te[1]-1,j.get(Q[0]-1,Q[1]-1))};function J(H,j){return Array.isArray(H)?[j(H[0]),j(H[1]),j(H[2])]:[j(H),j(H),j(H)]}function N(H){return Array.isArray(H)?H.length===3?[H[0],H[1],H[2],1]:[H[0],H[1],H[2],H[3]]:[0,0,0,1]}function V(H){if(Array.isArray(H)){if(Array.isArray(H))return[N(H[0]),N(H[1]),N(H[2])];var j=N(H);return[j.slice(),j.slice(),j.slice()]}}R.update=function(H){H=H||{},this.objectOffset=H.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in H&&(this.contourWidth=J(H.contourWidth,Number)),"showContour"in H&&(this.showContour=J(H.showContour,Boolean)),"showSurface"in H&&(this.showSurface=!!H.showSurface),"contourTint"in H&&(this.contourTint=J(H.contourTint,Boolean)),"contourColor"in H&&(this.contourColor=V(H.contourColor)),"contourProject"in H&&(this.contourProject=J(H.contourProject,function(gn){return J(gn,Boolean)})),"surfaceProject"in H&&(this.surfaceProject=H.surfaceProject),"dynamicColor"in H&&(this.dynamicColor=V(H.dynamicColor)),"dynamicTint"in H&&(this.dynamicTint=J(H.dynamicTint,Number)),"dynamicWidth"in H&&(this.dynamicWidth=J(H.dynamicWidth,Number)),"opacity"in H&&(this.opacity=H.opacity),"opacityscale"in H&&(this.opacityscale=H.opacityscale),"colorBounds"in H&&(this.colorBounds=H.colorBounds),"vertexColor"in H&&(this.vertexColor=H.vertexColor?1:0),"colormap"in H&&this._colorMap.setPixels(this.genColormap(H.colormap,this.opacityscale));var j=H.field||H.coords&&H.coords[2]||null,Q=!1;if(j||(this._field[2].shape[0]||this._field[2].shape[2]?j=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):j=this._field[2].hi(0,0)),"field"in H||"coords"in H){var te=(j.shape[0]+2)*(j.shape[1]+2);te>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(te))),this._field[2]=v(this._field[2].data,[j.shape[0]+2,j.shape[1]+2]),this.padField(this._field[2],j),this.shape=j.shape.slice();for(var ue=this.shape,ge=0;ge<2;++ge)this._field[2].size>this._field[ge].data.length&&(f.freeFloat(this._field[ge].data),this._field[ge].data=f.mallocFloat(this._field[2].size)),this._field[ge]=v(this._field[ge].data,[ue[0]+2,ue[1]+2]);if(H.coords){var Ee=H.coords;if(!Array.isArray(Ee)||Ee.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ge=0;ge<2;++ge){var xe=Ee[ge];for(fe=0;fe<2;++fe)if(xe.shape[fe]!==ue[fe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ge],xe)}}else if(H.ticks){var ce=H.ticks;if(!Array.isArray(ce)||ce.length!==2)throw new Error("gl-surface: invalid ticks");for(ge=0;ge<2;++ge){var oe=ce[ge];if((Array.isArray(oe)||oe.length)&&(oe=v(oe)),oe.shape[0]!==ue[ge])throw new Error("gl-surface: invalid tick length");var Se=v(oe.data,ue);Se.stride[ge]=oe.stride[0],Se.stride[ge^1]=0,this.padField(this._field[ge],Se)}}else{for(ge=0;ge<2;++ge){var be=[0,0];be[ge]=1,this._field[ge]=v(this._field[ge].data,[ue[0]+2,ue[1]+2],be,0)}this._field[0].set(0,0,0);for(var fe=0;fe0){for(var pn=0;pn<5;++pn)lr.pop();Oe-=1}continue e}}}Ge.push(Oe)}this._contourOffsets[Ot]=Cr,this._contourCounts[Ot]=Ge}var zn=f.mallocFloat(lr.length);for(ge=0;geD||C<0||C>D)throw new Error("gl-texture2d: Invalid texture size");return E._shape=[S,C],E.bind(),k.texImage2D(k.TEXTURE_2D,0,E.format,S,C,0,E.format,E.type,null),E._mipLevels=[0],E}function g(E,S,C,k,D,F){this.gl=E,this.handle=S,this.format=D,this.type=F,this._shape=[C,k],this._mipLevels=[0],this._magFilter=E.NEAREST,this._minFilter=E.NEAREST,this._wrapS=E.CLAMP_TO_EDGE,this._wrapT=E.CLAMP_TO_EDGE,this._anisoSamples=1;var P=this,R=[this._wrapS,this._wrapT];Object.defineProperties(R,[{get:function(){return P._wrapS},set:function(I){return P.wrapS=I}},{get:function(){return P._wrapT},set:function(I){return P.wrapT=I}}]),this._wrapVector=R;var L=[this._shape[0],this._shape[1]];Object.defineProperties(L,[{get:function(){return P._shape[0]},set:function(I){return P.width=I}},{get:function(){return P._shape[1]},set:function(I){return P.height=I}}]),this._shapeVector=L}var w=g.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(E){this.bind();var S=this.gl;if(this.type===S.FLOAT&&c.indexOf(E)>=0&&(S.getExtension("OES_texture_float_linear")||(E=S.NEAREST)),f.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,E),this._minFilter=E}},magFilter:{get:function(){return this._magFilter},set:function(E){this.bind();var S=this.gl;if(this.type===S.FLOAT&&c.indexOf(E)>=0&&(S.getExtension("OES_texture_float_linear")||(E=S.NEAREST)),f.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,E),this._magFilter=E}},mipSamples:{get:function(){return this._anisoSamples},set:function(E){var S=this._anisoSamples;if(this._anisoSamples=Math.max(E,1)|0,S!==this._anisoSamples){var C=this.gl.getExtension("EXT_texture_filter_anisotropic");C&&this.gl.texParameterf(this.gl.TEXTURE_2D,C.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(E){if(this.bind(),h.indexOf(E)<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,E),this._wrapS=E}},wrapT:{get:function(){return this._wrapT},set:function(E){if(this.bind(),h.indexOf(E)<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,E),this._wrapT=E}},wrap:{get:function(){return this._wrapVector},set:function(E){if(Array.isArray(E)||(E=[E,E]),E.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var S=0;S<2;++S)if(h.indexOf(E[S])<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);this._wrapS=E[0],this._wrapT=E[1];var C=this.gl;return this.bind(),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,this._wrapS),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,this._wrapT),E}},shape:{get:function(){return this._shapeVector},set:function(E){if(!Array.isArray(E))E=[E|0,E|0];else if(E.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return m(this,E[0]|0,E[1]|0),[E[0]|0,E[1]|0]}},width:{get:function(){return this._shape[0]},set:function(E){return E=E|0,m(this,E,this._shape[1]),E}},height:{get:function(){return this._shape[1]},set:function(E){return E=E|0,m(this,this._shape[0],E),E}}}),w.bind=function(E){var S=this.gl;return E!==void 0&&S.activeTexture(S.TEXTURE0+(E|0)),S.bindTexture(S.TEXTURE_2D,this.handle),E!==void 0?E|0:S.getParameter(S.ACTIVE_TEXTURE)-S.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var E=Math.min(this._shape[0],this._shape[1]),S=0;E>0;++S,E>>>=1)this._mipLevels.indexOf(S)<0&&this._mipLevels.push(S)},w.setPixels=function(E,S,C,k){var D=this.gl;this.bind(),Array.isArray(S)?(k=C,C=S[1]|0,S=S[0]|0):(S=S||0,C=C||0),k=k||0;var F=d(E)?E:E.raw;if(F){var P=this._mipLevels.indexOf(k)<0;P?(D.texImage2D(D.TEXTURE_2D,0,this.format,this.format,this.type,F),this._mipLevels.push(k)):D.texSubImage2D(D.TEXTURE_2D,k,S,C,this.format,this.type,F)}else if(E.shape&&E.stride&&E.data){if(E.shape.length<2||S+E.shape[1]>this._shape[1]>>>k||C+E.shape[0]>this._shape[0]>>>k||S<0||C<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");b(D,S,C,k,this.format,this.type,this._mipLevels,E)}else throw new Error("gl-texture2d: Unsupported data type")};function _(E,S){return E.length===3?S[2]===1&&S[1]===E[0]*E[2]&&S[0]===E[2]:S[0]===1&&S[1]===E[0]}function b(E,S,C,k,D,F,P,R){var L=R.dtype,I=R.shape.slice();if(I.length<2||I.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var B=0,O=0,$=_(I,R.stride.slice());L==="float32"?B=E.FLOAT:L==="float64"?(B=E.FLOAT,$=!1,L="float32"):L==="uint8"?B=E.UNSIGNED_BYTE:(B=E.UNSIGNED_BYTE,$=!1,L="uint8");var X=1;if(I.length===2)O=E.LUMINANCE,I=[I[0],I[1],1],R=s(R.data,I,[R.stride[0],R.stride[1],1],R.offset);else if(I.length===3){if(I[2]===1)O=E.ALPHA;else if(I[2]===2)O=E.LUMINANCE_ALPHA;else if(I[2]===3)O=E.RGB;else if(I[2]===4)O=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");X=I[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((O===E.LUMINANCE||O===E.ALPHA)&&(D===E.LUMINANCE||D===E.ALPHA)&&(O=D),O!==D)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var K=R.size,G=P.indexOf(k)<0;if(G&&P.push(k),B===F&&$)R.offset===0&&R.data.length===K?G?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,R.data):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,R.data):G?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,R.data.subarray(R.offset,R.offset+K)):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,R.data.subarray(R.offset,R.offset+K));else{var q;F===E.FLOAT?q=u.mallocFloat32(K):q=u.mallocUint8(K);var J=s(q,I,[I[2],I[2]*I[0],1]);B===E.FLOAT&&F===E.UNSIGNED_BYTE?v(J,R):l.assign(J,R),G?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,q.subarray(0,K)):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,q.subarray(0,K)),F===E.FLOAT?u.freeFloat32(q):u.freeUint8(q)}}function M(E){var S=E.createTexture();return E.bindTexture(E.TEXTURE_2D,S),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,E.NEAREST),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,E.NEAREST),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),S}function x(E,S,C,k,D){var F=E.getParameter(E.MAX_TEXTURE_SIZE);if(S<0||S>F||C<0||C>F)throw new Error("gl-texture2d: Invalid texture shape");if(D===E.FLOAT&&!E.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var P=M(E);return E.texImage2D(E.TEXTURE_2D,0,k,S,C,0,k,D,null),new g(E,P,S,C,k,D)}function A(E,S,C,k,D,F){var P=M(E);return E.texImage2D(E.TEXTURE_2D,0,D,D,F,S),new g(E,P,C,k,D,F)}function T(E,S){var C=S.dtype,k=S.shape.slice(),D=E.getParameter(E.MAX_TEXTURE_SIZE);if(k[0]<0||k[0]>D||k[1]<0||k[1]>D)throw new Error("gl-texture2d: Invalid texture size");var F=_(k,S.stride.slice()),P=0;C==="float32"?P=E.FLOAT:C==="float64"?(P=E.FLOAT,F=!1,C="float32"):C==="uint8"?P=E.UNSIGNED_BYTE:(P=E.UNSIGNED_BYTE,F=!1,C="uint8");var R=0;if(k.length===2)R=E.LUMINANCE,k=[k[0],k[1],1],S=s(S.data,k,[S.stride[0],S.stride[1],1],S.offset);else if(k.length===3)if(k[2]===1)R=E.ALPHA;else if(k[2]===2)R=E.LUMINANCE_ALPHA;else if(k[2]===3)R=E.RGB;else if(k[2]===4)R=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");P===E.FLOAT&&!E.getExtension("OES_texture_float")&&(P=E.UNSIGNED_BYTE,F=!1);var L,I,B=S.size;if(F)S.offset===0&&S.data.length===B?L=S.data:L=S.data.subarray(S.offset,S.offset+B);else{var O=[k[2],k[2]*k[0],1];I=u.malloc(B,C);var $=s(I,k,O,0);(C==="float32"||C==="float64")&&P===E.UNSIGNED_BYTE?v($,S):l.assign($,S),L=I.subarray(0,B)}var X=M(E);return E.texImage2D(E.TEXTURE_2D,0,R,k[0],k[1],0,R,P,L),F||u.free(I),new g(E,X,k[0],k[1],R,P)}function y(E){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||p(E),typeof arguments[1]=="number")return x(E,arguments[1],arguments[2],arguments[3]||E.RGBA,arguments[4]||E.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(E,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var S=arguments[1],C=d(S)?S:S.raw;if(C)return A(E,C,S.width|0,S.height|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(S.shape&&S.data&&S.stride)return T(E,S)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(n){"use strict";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(v)}},9226(n){n.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126(n){n.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990(n){n.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091(n){n.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],p=l[1],d=l[2];return o[0]=c*d-f*p,o[1]=f*h-u*d,o[2]=u*p-c*h,o}},5455(n,a,o){n.exports=o(7056)},7056(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008(n,a,o){n.exports=o(6690)},6690(n){n.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244(n){n.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613(n){n.exports=1e-6},9922(n,a,o){n.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],p=u[2],d=c[0],v=c[1],m=c[2];return Math.abs(f-d)<=s*Math.max(1,Math.abs(f),Math.abs(d))&&Math.abs(h-v)<=s*Math.max(1,Math.abs(h),Math.abs(v))&&Math.abs(p-m)<=s*Math.max(1,Math.abs(p),Math.abs(m))}},9265(n){n.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681(n){n.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137(n,a,o){n.exports=l;var s=o(1091)();function l(u,c,f,h,p,d){var v,m;for(c||(c=3),f||(f=0),h?m=Math.min(h*c+f,u.length):m=u.length,v=f;v0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636(n){n.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894(n){n.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,p=s[2]-f,d=Math.sin(u),v=Math.cos(u);return o[0]=s[0],o[1]=c+h*v-p*d,o[2]=f+h*d+p*v,o}},109(n){n.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,p=s[2]-f,d=Math.sin(u),v=Math.cos(u);return o[0]=c+p*d+h*v,o[1]=s[1],o[2]=f+p*v-h*d,o}},8692(n){n.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,p=s[1]-f,d=Math.sin(u),v=Math.cos(u);return o[0]=c+h*v-p*d,o[1]=f+h*d+p*v,o[2]=s[2],o}},2447(n){n.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489(n){n.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463(n){n.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141(n,a,o){n.exports=o(2953)},5486(n,a,o){n.exports=o(3066)},2953(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229(n,a,o){n.exports=o(6843)},6843(n){n.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],p=l[1],d=l[2],v=l[3],m=p*f-d*c,g=d*u-h*f,w=h*c-p*u;return m*=2,g*=2,w*=2,o[0]=u+v*m+p*w-d*g,o[1]=c+v*g+d*m-h*w,o[2]=f+v*w+h*g-p*m,o}},4361(n){n.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335(n){n.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933(n){n.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536(n){n.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373(n){n.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750(n){n.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390(n){n.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970(n,a,o){n.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494(n){n.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573(n){n.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],p=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=p+u*(l[3]-p),o}},160(n){n.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334(n){n.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498(n){n.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177(n){n.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131(n,a,o){var s=o(5177),l=o(9288);n.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844(n){n.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578(n){n.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860(n){n.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],p=l[1],d=l[2],v=l[3],m=v*u+p*f-d*c,g=v*c+d*u-h*f,w=v*f+h*c-p*u,_=-h*u-p*c-d*f;return o[0]=m*v+_*-h+g*-d-w*-p,o[1]=g*v+_*-p+w*-h-m*-d,o[2]=w*v+_*-d+m*-p-g*-h,o[3]=s[3],o}},1848(n,a,o){var s=o(4905),l=o(6468);n.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h0)continue;Ce=re.slice(0,1).join("")}return Q(Ce),K+=Ce.length,L=L.slice(Ce.length),L.length}while(!0)}function fe(){return/[^a-fA-F0-9]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function ee(){return P==="."||/[eE]/.test(P)?(L.push(P),F=_,R=P,k+1):P==="x"&&L.length===1&&L[0]==="0"?(F=y,L.push(P),R=P,k+1):/[^\d]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function ae(){return P==="f"&&(L.push(P),R=P,k+=1),/[eE]/.test(P)||(P==="-"||P==="+")&&/[eE]/.test(R)?(L.push(P),R=P,k+1):/[^\d]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function _e(){if(/[^\d\w_]/.test(P)){var re=L.join("");return j[re]?F=x:H[re]?F=M:F=b,Q(L.join("")),F=h,k}return L.push(P),R=P,k+1}}},3508(n,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),n.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852(n){n.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(n,a,o){var s=o(620);n.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620(n){n.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(n){n.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(n,a,o){var s=o(5874);n.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236(n){n.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,m=-7,g=l?c-1:0,w=l?-1:1,_=o[s+g];for(g+=w,f=_&(1<<-m)-1,_>>=-m,m+=p;m>0;f=f*256+o[s+g],g+=w,m-=8);for(h=f&(1<<-m)-1,f>>=-m,m+=u;m>0;h=h*256+o[s+g],g+=w,m-=8);if(f===0)f=1-v;else{if(f===d)return h?NaN:(_?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-v}return(_?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,p,d,v=f*8-c-1,m=(1<>1,w=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=u?0:f-1,b=u?1:-1,M=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(p=isNaN(s)?1:0,h=m):(h=Math.floor(Math.log(s)/Math.LN2),s*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+g>=1?s+=w/d:s+=w*Math.pow(2,1-g),s*d>=2&&(h++,d/=2),h+g>=m?(p=0,h=m):h+g>=1?(p=(s*d-1)*Math.pow(2,c),h=h+g):(p=s*Math.pow(2,g-1)*Math.pow(2,c),h=0));c>=8;o[l+_]=p&255,_+=b,p/=256,c-=8);for(h=h<0;o[l+_]=h&255,_+=b,h/=256,v-=8);o[l+_-b]|=M*128}},8954(n,a,o){"use strict";n.exports=g;var s=o(3250),l=o(6803).Fw;function u(w,_,b){this.vertices=w,this.adjacent=_,this.boundary=b,this.lastVisited=-1}u.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var _=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=_};function c(w,_,b){this.vertices=w,this.cell=_,this.index=b}function f(w,_){return l(w.vertices,_.vertices)}function h(w){return function(){var _=this.tuple;return w.apply(this,_)}}function p(w){var _=s[w+1];return _||(_=s),h(_)}var d=[];function v(w,_,b){this.dimension=w,this.vertices=_,this.simplices=b,this.interior=b.filter(function(A){return!A.boundary}),this.tuple=new Array(w+1);for(var M=0;M<=w;++M)this.tuple[M]=this.vertices[M];var x=d[w];x||(x=d[w]=p(w)),this.orient=x}var m=v.prototype;m.handleBoundaryDegeneracy=function(w,_){var b=this.dimension,M=this.vertices.length-1,x=this.tuple,A=this.vertices,T=[w];for(w.lastVisited=-M;T.length>0;){w=T.pop();for(var y=w.adjacent,E=0;E<=b;++E){var S=y[E];if(!(!S.boundary||S.lastVisited<=-M)){for(var C=S.vertices,k=0;k<=b;++k){var D=C[k];D<0?x[k]=_:x[k]=A[D]}var F=this.orient();if(F>0)return S;S.lastVisited=-M,F===0&&T.push(S)}}}return null},m.walk=function(w,_){var b=this.vertices.length-1,M=this.dimension,x=this.vertices,A=this.tuple,T=_?this.interior.length*Math.random()|0:this.interior.length-1,y=this.interior[T];e:for(;!y.boundary;){for(var E=y.vertices,S=y.adjacent,C=0;C<=M;++C)A[C]=x[E[C]];y.lastVisited=b;for(var C=0;C<=M;++C){var k=S[C];if(!(k.lastVisited>=b)){var D=A[C];A[C]=w;var F=this.orient();if(A[C]=D,F<0){y=k;continue e}else k.boundary?k.lastVisited=-b:k.lastVisited=b}}return}return y},m.addPeaks=function(w,_){var b=this.vertices.length-1,M=this.dimension,x=this.vertices,A=this.tuple,T=this.interior,y=this.simplices,E=[_];_.lastVisited=b,_.vertices[_.vertices.indexOf(-1)]=b,_.boundary=!1,T.push(_);for(var S=[];E.length>0;){var _=E.pop(),C=_.vertices,k=_.adjacent,D=C.indexOf(b);if(!(D<0)){for(var F=0;F<=M;++F)if(F!==D){var P=k[F];if(!(!P.boundary||P.lastVisited>=b)){var R=P.vertices;if(P.lastVisited!==-b){for(var L=0,I=0;I<=M;++I)R[I]<0?(L=I,A[I]=w):A[I]=x[R[I]];var B=this.orient();if(B>0){R[L]=b,P.boundary=!1,T.push(P),E.push(P),P.lastVisited=b;continue}else P.lastVisited=-b}var O=P.adjacent,$=C.slice(),X=k.slice(),K=new u($,X,!0);y.push(K);var G=O.indexOf(_);if(!(G<0)){O[G]=K,X[D]=P,$[F]=-1,X[F]=_,k[F]=K,K.flip();for(var I=0;I<=M;++I){var q=$[I];if(!(q<0||q===b)){for(var J=new Array(M-1),N=0,V=0;V<=M;++V){var Y=$[V];Y<0||V===I||(J[N++]=Y)}S.push(new c(J,K,I))}}}}}}}S.sort(f);for(var F=0;F+1=0?T[E++]=y[C]:S=C&1;if(S===(w&1)){var k=T[0];T[0]=T[1],T[1]=k}_.push(T)}}return _};function g(w,_){var b=w.length;if(b===0)throw new Error("Must have at least d+1 points");var M=w[0].length;if(b<=M)throw new Error("Must input at least d+1 points");var x=w.slice(0,M+1),A=s.apply(void 0,x);if(A===0)throw new Error("Input not in general position");for(var T=new Array(M+1),y=0;y<=M;++y)T[y]=y;A<0&&(T[0]=1,T[1]=0);for(var E=new u(T,new Array(M+1),!1),S=E.adjacent,C=new Array(M+2),y=0;y<=M;++y){for(var k=T.slice(),D=0;D<=M;++D)D===y&&(k[D]=-1);var F=k[0];k[0]=k[1],k[1]=F;var P=new u(k,new Array(M+1),!0);S[y]=P,C[y]=P}C[M+1]=E;for(var y=0;y<=M;++y)for(var k=S[y].vertices,R=S[y].adjacent,D=0;D<=M;++D){var L=k[D];if(L<0){R[D]=E;continue}for(var I=0;I<=M;++I)S[I].vertices.indexOf(L)<0&&(R[D]=S[I])}for(var B=new v(M,x,C),O=!!_,y=M+1;y3*(C+1)?v(this,S):this.left.insert(S):this.left=A([S]);else if(S[0]>this.mid)this.right?4*(this.right.count+1)>3*(C+1)?v(this,S):this.right.insert(S):this.right=A([S]);else{var k=s.ge(this.leftPoints,S,M),D=s.ge(this.rightPoints,S,x);this.leftPoints.splice(k,0,S),this.rightPoints.splice(D,0,S)}},h.remove=function(S){var C=this.count-this.leftPoints;if(S[1]3*(C-1))return m(this,S);var D=this.left.remove(S);return D===c?(this.left=null,this.count-=1,u):(D===u&&(this.count-=1),D)}else if(S[0]>this.mid){if(!this.right)return l;var F=this.left?this.left.count:0;if(4*F>3*(C-1))return m(this,S);var D=this.right.remove(S);return D===c?(this.right=null,this.count-=1,u):(D===u&&(this.count-=1),D)}else{if(this.count===1)return this.leftPoints[0]===S?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===S){if(this.left&&this.right){for(var P=this,R=this.left;R.right;)P=R,R=R.right;if(P===this)R.right=this.right;else{var L=this.left,D=this.right;P.count-=R.count,P.right=R.left,R.left=L,R.right=D}p(this,R),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?p(this,this.left):p(this,this.right);return u}for(var L=s.ge(this.leftPoints,S,M);L=0&&S[D][1]>=C;--D){var F=k(S[D]);if(F)return F}}function _(S,C){for(var k=0;kthis.mid){if(this.right){var k=this.right.queryPoint(S,C);if(k)return k}return w(this.rightPoints,S,C)}else return _(this.leftPoints,C)},h.queryInterval=function(S,C,k){if(Sthis.mid&&this.right){var D=this.right.queryInterval(S,C,k);if(D)return D}return Cthis.mid?w(this.rightPoints,S,k):_(this.leftPoints,k)};function b(S,C){return S-C}function M(S,C){var k=S[0]-C[0];return k||S[1]-C[1]}function x(S,C){var k=S[1]-C[1];return k||S[0]-C[0]}function A(S){if(S.length===0)return null;for(var C=[],k=0;k>1],F=[],P=[],R=[],k=0;k1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},5219(n){"use strict";n.exports=function(a){for(var o=a.length,s,l=0;l13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395(n){function a(o,s,l){return o*(1-l)+s*l}n.exports=a},2652(n,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),p={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},d=l(),v=l(),m=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];n.exports=function(A,T,y,E,S,C){if(T||(T=[0,0,0]),y||(y=[0,0,0]),E||(E=[0,0,0]),S||(S=[0,0,0,1]),C||(C=[0,0,0,1]),!s(d,A)||(u(v,d),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(c(v)<1e-8)))return!1;var k=d[3],D=d[7],F=d[11],P=d[12],R=d[13],L=d[14],I=d[15];if(k!==0||D!==0||F!==0){m[0]=k,m[1]=D,m[2]=F,m[3]=I;var B=f(v,v);if(!B)return!1;h(v,v),_(S,m,v)}else S[0]=S[1]=S[2]=0,S[3]=1;if(T[0]=P,T[1]=R,T[2]=L,b(g,d),y[0]=p.length(g[0]),p.normalize(g[0],g[0]),E[0]=p.dot(g[0],g[1]),M(g[1],g[1],g[0],1,-E[0]),y[1]=p.length(g[1]),p.normalize(g[1],g[1]),E[0]/=y[1],E[1]=p.dot(g[0],g[2]),M(g[2],g[2],g[0],1,-E[1]),E[2]=p.dot(g[1],g[2]),M(g[2],g[2],g[1],1,-E[2]),y[2]=p.length(g[2]),p.normalize(g[2],g[2]),E[1]/=y[2],E[2]/=y[2],p.cross(w,g[1],g[2]),p.dot(g[0],w)<0)for(var O=0;O<3;O++)y[O]*=-1,g[O][0]*=-1,g[O][1]*=-1,g[O][2]*=-1;return C[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),C[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),C[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),C[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(C[0]=-C[0]),g[0][2]>g[2][0]&&(C[1]=-C[1]),g[1][0]>g[0][1]&&(C[2]=-C[2]),!0};function _(x,A,T){var y=A[0],E=A[1],S=A[2],C=A[3];return x[0]=T[0]*y+T[4]*E+T[8]*S+T[12]*C,x[1]=T[1]*y+T[5]*E+T[9]*S+T[13]*C,x[2]=T[2]*y+T[6]*E+T[10]*S+T[14]*C,x[3]=T[3]*y+T[7]*E+T[11]*S+T[15]*C,x}function b(x,A){x[0][0]=A[0],x[0][1]=A[1],x[0][2]=A[2],x[1][0]=A[4],x[1][1]=A[5],x[1][2]=A[6],x[2][0]=A[8],x[2][1]=A[9],x[2][2]=A[10]}function M(x,A,T,y,E){x[0]=A[0]*y+T[0]*E,x[1]=A[1]*y+T[1]*E,x[2]=A[2]*y+T[2]*E}},4335(n){n.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442(n,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=m(),p=m(),d=m();n.exports=v;function v(_,b,M,x){if(c(b)===0||c(M)===0)return!1;var A=u(b,h.translate,h.scale,h.skew,h.perspective,h.quaternion),T=u(M,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!A||!T?!1:(s(d.translate,h.translate,p.translate,x),s(d.skew,h.skew,p.skew,x),s(d.scale,h.scale,p.scale,x),s(d.perspective,h.perspective,p.perspective,x),f(d.quaternion,h.quaternion,p.quaternion,x),l(_,d.translate,d.scale,d.skew,d.perspective,d.quaternion),!0)}function m(){return{translate:g(),scale:g(1),skew:g(),perspective:w(),quaternion:w()}}function g(_){return[_||0,_||0,_||0]}function w(){return[0,0,0,1]}},7182(n,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();n.exports=function(f,h,p,d,v,m){return s.identity(f),s.fromRotationTranslation(f,m,h),f[3]=v[0],f[7]=v[1],f[11]=v[2],f[15]=v[3],s.identity(u),d[2]!==0&&(u[9]=d[2],s.multiply(f,f,u)),d[1]!==0&&(u[9]=0,u[8]=d[1],s.multiply(f,f,u)),d[0]!==0&&(u[8]=0,u[4]=d[0],s.multiply(f,f,u)),s.scale(f,f,p),f}},1811(n,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),p=o(6582),d=o(7656),v=o(2504),m=o(3536),g=[0,0,0];n.exports=M;function w(x){this._components=x.slice(),this._time=[0],this.prevMatrix=x.slice(),this.nextMatrix=x.slice(),this.computedMatrix=x.slice(),this.computedInverse=x.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var _=w.prototype;_.recalcMatrix=function(x){var A=this._time,T=s.le(A,x),y=this.computedMatrix;if(!(T<0)){var E=this._components;if(T===A.length-1)for(var S=16*T,C=0;C<16;++C)y[C]=E[S++];else{for(var k=A[T+1]-A[T],S=16*T,D=this.prevMatrix,F=!0,C=0;C<16;++C)D[C]=E[S++];for(var P=this.nextMatrix,C=0;C<16;++C)P[C]=E[S++],F=F&&D[C]===P[C];if(k<1e-6||F)for(var C=0;C<16;++C)y[C]=D[C];else l(y,D,P,(x-A[T])/k)}var R=this.computedUp;R[0]=y[1],R[1]=y[5],R[2]=y[9],m(R,R);var L=this.computedInverse;u(L,y);var I=this.computedEye,B=L[15];I[0]=L[12]/B,I[1]=L[13]/B,I[2]=L[14]/B;for(var O=this.computedCenter,$=Math.exp(this.computedRadius[0]),C=0;C<3;++C)O[C]=I[C]-y[2+4*C]*$}},_.idle=function(x){if(!(x1&&s(u[p[g-2]],u[p[g-1]],m)<=0;)g-=1,p.pop();for(p.push(v),g=d.length;g>1&&s(u[d[g-2]],u[d[g-1]],m)>=0;)g-=1,d.pop();d.push(v)}for(var w=new Array(d.length+p.length-2),_=0,f=0,b=p.length;f0;--M)w[_++]=d[M];return w}},351(n,a,o){"use strict";n.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,p=0,d={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function m(S){var C=!1;return"altKey"in S&&(C=C||S.altKey!==d.alt,d.alt=!!S.altKey),"shiftKey"in S&&(C=C||S.shiftKey!==d.shift,d.shift=!!S.shiftKey),"ctrlKey"in S&&(C=C||S.ctrlKey!==d.control,d.control=!!S.ctrlKey),"metaKey"in S&&(C=C||S.metaKey!==d.meta,d.meta=!!S.metaKey),C}function g(S,C){var k=s.x(C),D=s.y(C);"buttons"in C&&(S=C.buttons|0),(S!==f||k!==h||D!==p||m(C))&&(f=S|0,h=k||0,p=D||0,c&&c(f,h,p,d))}function w(S){g(0,S)}function _(){(f||h||p||d.shift||d.alt||d.meta||d.control)&&(h=p=0,f=0,d.shift=d.alt=d.control=d.meta=!1,c&&c(0,0,0,d))}function b(S){m(S)&&c&&c(f,h,p,d)}function M(S){s.buttons(S)===0?g(0,S):g(f,S)}function x(S){g(f|s.buttons(S),S)}function A(S){g(f&~s.buttons(S),S)}function T(){v||(v=!0,u.addEventListener("mousemove",M),u.addEventListener("mousedown",x),u.addEventListener("mouseup",A),u.addEventListener("mouseleave",w),u.addEventListener("mouseenter",w),u.addEventListener("mouseout",w),u.addEventListener("mouseover",w),u.addEventListener("blur",_),u.addEventListener("keyup",b),u.addEventListener("keydown",b),u.addEventListener("keypress",b),u!==window&&(window.addEventListener("blur",_),window.addEventListener("keyup",b),window.addEventListener("keydown",b),window.addEventListener("keypress",b)))}function y(){v&&(v=!1,u.removeEventListener("mousemove",M),u.removeEventListener("mousedown",x),u.removeEventListener("mouseup",A),u.removeEventListener("mouseleave",w),u.removeEventListener("mouseenter",w),u.removeEventListener("mouseout",w),u.removeEventListener("mouseover",w),u.removeEventListener("blur",_),u.removeEventListener("keyup",b),u.removeEventListener("keydown",b),u.removeEventListener("keypress",b),u!==window&&(window.removeEventListener("blur",_),window.removeEventListener("keyup",b),window.removeEventListener("keydown",b),window.removeEventListener("keypress",b)))}T();var E={element:u};return Object.defineProperties(E,{enabled:{get:function(){return v},set:function(S){S?T():y()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return d},enumerable:!0}}),E}},24(n){var a={left:0,top:0};n.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,p=s(u);return c[0]=f-p.left,c[1]=h-p.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687(n,a){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(X=1,q[N++]=d(T[C],_,b,M),C+=B,x>0)for($=1,k=T[C],V=q[N]=d(k,_,b,M),j=q[N+Y],ue=q[N+Q],xe=q[N+ge],(V!==j||V!==ue||V!==xe)&&(F=T[C+D],R=T[C+P],I=T[C+L],h($,X,k,F,R,I,V,j,ue,xe,_,b,M),ce=J[N]=K++),N+=1,C+=B,$=2;$0)for($=1,k=T[C],V=q[N]=d(k,_,b,M),j=q[N+Y],ue=q[N+Q],xe=q[N+ge],(V!==j||V!==ue||V!==xe)&&(F=T[C+D],R=T[C+P],I=T[C+L],h($,X,k,F,R,I,V,j,ue,xe,_,b,M),ce=J[N]=K++,xe!==ue&&p(J[N+Q],ce,R,I,ue,xe,_,b,M)),N+=1,C+=B,$=2;$0){if($=1,q[N++]=d(T[C],_,b,M),C+=B,A>0)for(X=1,k=T[C],V=q[N]=d(k,_,b,M),ue=q[N+Q],j=q[N+Y],xe=q[N+ge],(V!==ue||V!==j||V!==xe)&&(F=T[C+D],R=T[C+P],I=T[C+L],h($,X,k,F,R,I,V,ue,j,xe,_,b,M),ce=J[N]=K++),N+=1,C+=B,X=2;X0)for(X=1,k=T[C],V=q[N]=d(k,_,b,M),ue=q[N+Q],j=q[N+Y],xe=q[N+ge],(V!==ue||V!==j||V!==xe)&&(F=T[C+D],R=T[C+P],I=T[C+L],h($,X,k,F,R,I,V,ue,j,xe,_,b,M),ce=J[N]=K++,xe!==ue&&p(J[N+Q],ce,I,F,xe,ue,_,b,M)),N+=1,C+=B,X=2;X 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var m=f.getters||[],g=new Array(d),w=0;w=0?g[w]=!0:g[w]=!1;return u(f.vertex,f.cell,f.phase,v,p,g)}},6199(n,a,o){"use strict";var s=o(1338),l={zero:function(M,x,A,T){var y=M[0],E=A[0];T|=0;var S=0,C=E;for(S=0;S2&&S[1]>2&&T(E.pick(-1,-1).lo(1,1).hi(S[0]-2,S[1]-2),y.pick(-1,-1,0).lo(1,1).hi(S[0]-2,S[1]-2),y.pick(-1,-1,1).lo(1,1).hi(S[0]-2,S[1]-2)),S[1]>2&&(A(E.pick(0,-1).lo(1).hi(S[1]-2),y.pick(0,-1,1).lo(1).hi(S[1]-2)),x(y.pick(0,-1,0).lo(1).hi(S[1]-2))),S[1]>2&&(A(E.pick(S[0]-1,-1).lo(1).hi(S[1]-2),y.pick(S[0]-1,-1,1).lo(1).hi(S[1]-2)),x(y.pick(S[0]-1,-1,0).lo(1).hi(S[1]-2))),S[0]>2&&(A(E.pick(-1,0).lo(1).hi(S[0]-2),y.pick(-1,0,0).lo(1).hi(S[0]-2)),x(y.pick(-1,0,1).lo(1).hi(S[0]-2))),S[0]>2&&(A(E.pick(-1,S[1]-1).lo(1).hi(S[0]-2),y.pick(-1,S[1]-1,0).lo(1).hi(S[0]-2)),x(y.pick(-1,S[1]-1,1).lo(1).hi(S[0]-2))),y.set(0,0,0,0),y.set(0,0,1,0),y.set(S[0]-1,0,0,0),y.set(S[0]-1,0,1,0),y.set(0,S[1]-1,0,0),y.set(0,S[1]-1,1,0),y.set(S[0]-1,S[1]-1,0,0),y.set(S[0]-1,S[1]-1,1,0),y}}function b(M){var x=M.join(),S=d[x];if(S)return S;for(var A=M.length,T=[m,g],y=1;y<=A;++y)T.push(w(y));var E=_,S=E.apply(void 0,T);return d[x]=S,S}n.exports=function(x,A,T){if(Array.isArray(T)||(typeof T=="string"?T=s(A.dimension,T):T=s(A.dimension,"clamp")),A.size===0)return x;if(A.dimension===0)return x.set(0),x;var y=b(T);return y(x,A)}},4317(n){"use strict";function a(c,f){var h=Math.floor(f),p=f-h,d=0<=h&&h0;){R<64?(x=R,R=0):(x=64,R-=64);for(var L=d[1]|0;L>0;){L<64?(A=L,L=0):(A=64,L-=64),g=F+R*y+L*E,b=P+R*C+L*k;var I=0,B=0,O=0,$=S,X=y-T*S,K=E-x*y,G=D,q=C-T*D,J=k-x*C;for(O=0;O0;){k<64?(x=k,k=0):(x=64,k-=64);for(var D=d[0]|0;D>0;){D<64?(M=D,D=0):(M=64,D-=64),g=S+k*T+D*A,b=C+k*E+D*y;var F=0,P=0,R=T,L=A-x*T,I=E,B=y-x*E;for(P=0;P0;){P<64?(A=P,P=0):(A=64,P-=64);for(var R=d[0]|0;R>0;){R<64?(M=R,R=0):(M=64,R-=64);for(var L=d[1]|0;L>0;){L<64?(x=L,L=0):(x=64,L-=64),g=D+P*E+R*T+L*y,b=F+P*k+R*S+L*C;var I=0,B=0,O=0,$=E,X=T-A*E,K=y-M*T,G=k,q=S-A*k,J=C-M*S;for(O=0;Ow;){I=0,B=F-x;t:for(R=0;R$)break t;B+=S,I+=C}for(I=F,B=F-x,R=0;R>1,L=R-D,I=R+D,B=F,O=L,$=R,X=I,K=P,G=_+1,q=b-1,J=!0,N,V,Y,H,j,Q,te,ue,ge,Ee=0,xe=0,ce=0,oe,Se,be,fe,ee,ae,_e,re,pe,Te,Ce,ze,we,me,Le,Ne,Je=E,rt=m(Je),mt=m(Je);Se=A*B,be=A*O,Ne=x;e:for(oe=0;oe0){V=B,B=O,O=V;break e}if(ce<0)break e;Ne+=C}Se=A*X,be=A*K,Ne=x;e:for(oe=0;oe0){V=X,X=K,K=V;break e}if(ce<0)break e;Ne+=C}Se=A*B,be=A*$,Ne=x;e:for(oe=0;oe0){V=B,B=$,$=V;break e}if(ce<0)break e;Ne+=C}Se=A*O,be=A*$,Ne=x;e:for(oe=0;oe0){V=O,O=$,$=V;break e}if(ce<0)break e;Ne+=C}Se=A*B,be=A*X,Ne=x;e:for(oe=0;oe0){V=B,B=X,X=V;break e}if(ce<0)break e;Ne+=C}Se=A*$,be=A*X,Ne=x;e:for(oe=0;oe0){V=$,$=X,X=V;break e}if(ce<0)break e;Ne+=C}Se=A*O,be=A*K,Ne=x;e:for(oe=0;oe0){V=O,O=K,K=V;break e}if(ce<0)break e;Ne+=C}Se=A*O,be=A*$,Ne=x;e:for(oe=0;oe0){V=O,O=$,$=V;break e}if(ce<0)break e;Ne+=C}Se=A*X,be=A*K,Ne=x;e:for(oe=0;oe0){V=X,X=K,K=V;break e}if(ce<0)break e;Ne+=C}for(Se=A*B,be=A*O,fe=A*$,ee=A*X,ae=A*K,_e=A*F,re=A*R,pe=A*P,Le=0,Ne=x,oe=0;oe0)q--;else if(ce<0){for(Se=A*Q,be=A*G,fe=A*q,Ne=x,oe=0;oe0)for(;;){te=x+q*A,Le=0;e:for(oe=0;oe0){if(--qP){e:for(;;){for(te=x+G*A,Le=0,Ne=x,oe=0;oe1&&w?b(g,w[0],w[1]):b(g)}var p={"uint32,1,0":function(v,m){return function(g){var w=g.data,_=g.offset|0,b=g.shape,M=g.stride,x=M[0]|0,A=b[0]|0,T=M[1]|0,y=b[1]|0,E=T,S=T,C=1;A<=32?v(0,A-1,w,_,x,T,A,y,E,S,C):m(0,A-1,w,_,x,T,A,y,E,S,C)}}};function d(v,m){var g=[m,v].join(","),w=p[g],_=c(v,m),b=h(v,m,_);return w(_,b)}n.exports=d},446(n,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,p=[f,h],d=p.join(":"),v=l[d];return v||(l[d]=v=s(f,h)),v(c),c}n.exports=u},9618(n,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(m,g){return m[0]-g[0]}function c(){var m=this.stride,g=new Array(m.length),w;for(w=0;w=0&&(T=x|0,A+=E*T,y-=T),new _(this.data,y,E,A)},b.step=function(x){var A=this.shape[0],T=this.stride[0],y=this.offset,E=0,S=Math.ceil;return typeof x=="number"&&(E=x|0,E<0?(y+=T*(A-1),A=S(-A/E)):A=S(A/E),T*=E),new _(this.data,A,T,y)},b.transpose=function(x){x=x===void 0?0:x|0;var A=this.shape,T=this.stride;return new _(this.data,A[x],T[x],this.offset)},b.pick=function(x){var A=[],T=[],y=this.offset;typeof x=="number"&&x>=0?y=y+this.stride[0]*x|0:(A.push(this.shape[0]),T.push(this.stride[0]));var E=g[A.length+1];return E(this.data,A,T,y)},function(x,A,T,y){return new _(x,A[0],T[0],y)}},2:function(m,g,w){function _(M,x,A,T,y,E){this.data=M,this.shape=[x,A],this.stride=[T,y],this.offset=E|0}var b=_.prototype;return b.dtype=m,b.dimension=2,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(b,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),b.set=function(x,A,T){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*A,T):this.data[this.offset+this.stride[0]*x+this.stride[1]*A]=T},b.get=function(x,A){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*A):this.data[this.offset+this.stride[0]*x+this.stride[1]*A]},b.index=function(x,A){return this.offset+this.stride[0]*x+this.stride[1]*A},b.hi=function(x,A){return new _(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof A!="number"||A<0?this.shape[1]:A|0,this.stride[0],this.stride[1],this.offset)},b.lo=function(x,A){var T=this.offset,y=0,E=this.shape[0],S=this.shape[1],C=this.stride[0],k=this.stride[1];return typeof x=="number"&&x>=0&&(y=x|0,T+=C*y,E-=y),typeof A=="number"&&A>=0&&(y=A|0,T+=k*y,S-=y),new _(this.data,E,S,C,k,T)},b.step=function(x,A){var T=this.shape[0],y=this.shape[1],E=this.stride[0],S=this.stride[1],C=this.offset,k=0,D=Math.ceil;return typeof x=="number"&&(k=x|0,k<0?(C+=E*(T-1),T=D(-T/k)):T=D(T/k),E*=k),typeof A=="number"&&(k=A|0,k<0?(C+=S*(y-1),y=D(-y/k)):y=D(y/k),S*=k),new _(this.data,T,y,E,S,C)},b.transpose=function(x,A){x=x===void 0?0:x|0,A=A===void 0?1:A|0;var T=this.shape,y=this.stride;return new _(this.data,T[x],T[A],y[x],y[A],this.offset)},b.pick=function(x,A){var T=[],y=[],E=this.offset;typeof x=="number"&&x>=0?E=E+this.stride[0]*x|0:(T.push(this.shape[0]),y.push(this.stride[0])),typeof A=="number"&&A>=0?E=E+this.stride[1]*A|0:(T.push(this.shape[1]),y.push(this.stride[1]));var S=g[T.length+1];return S(this.data,T,y,E)},function(x,A,T,y){return new _(x,A[0],A[1],T[0],T[1],y)}},3:function(m,g,w){function _(M,x,A,T,y,E,S,C){this.data=M,this.shape=[x,A,T],this.stride=[y,E,S],this.offset=C|0}var b=_.prototype;return b.dtype=m,b.dimension=3,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(b,"order",{get:function(){var x=Math.abs(this.stride[0]),A=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return x>A?A>T?[2,1,0]:x>T?[1,2,0]:[1,0,2]:x>T?[2,0,1]:T>A?[0,1,2]:[0,2,1]}}),b.set=function(x,A,T,y){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T,y):this.data[this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T]=y},b.get=function(x,A,T){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T):this.data[this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T]},b.index=function(x,A,T){return this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T},b.hi=function(x,A,T){return new _(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},b.lo=function(x,A,T){var y=this.offset,E=0,S=this.shape[0],C=this.shape[1],k=this.shape[2],D=this.stride[0],F=this.stride[1],P=this.stride[2];return typeof x=="number"&&x>=0&&(E=x|0,y+=D*E,S-=E),typeof A=="number"&&A>=0&&(E=A|0,y+=F*E,C-=E),typeof T=="number"&&T>=0&&(E=T|0,y+=P*E,k-=E),new _(this.data,S,C,k,D,F,P,y)},b.step=function(x,A,T){var y=this.shape[0],E=this.shape[1],S=this.shape[2],C=this.stride[0],k=this.stride[1],D=this.stride[2],F=this.offset,P=0,R=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(F+=C*(y-1),y=R(-y/P)):y=R(y/P),C*=P),typeof A=="number"&&(P=A|0,P<0?(F+=k*(E-1),E=R(-E/P)):E=R(E/P),k*=P),typeof T=="number"&&(P=T|0,P<0?(F+=D*(S-1),S=R(-S/P)):S=R(S/P),D*=P),new _(this.data,y,E,S,C,k,D,F)},b.transpose=function(x,A,T){x=x===void 0?0:x|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0;var y=this.shape,E=this.stride;return new _(this.data,y[x],y[A],y[T],E[x],E[A],E[T],this.offset)},b.pick=function(x,A,T){var y=[],E=[],S=this.offset;typeof x=="number"&&x>=0?S=S+this.stride[0]*x|0:(y.push(this.shape[0]),E.push(this.stride[0])),typeof A=="number"&&A>=0?S=S+this.stride[1]*A|0:(y.push(this.shape[1]),E.push(this.stride[1])),typeof T=="number"&&T>=0?S=S+this.stride[2]*T|0:(y.push(this.shape[2]),E.push(this.stride[2]));var C=g[y.length+1];return C(this.data,y,E,S)},function(x,A,T,y){return new _(x,A[0],A[1],A[2],T[0],T[1],T[2],y)}},4:function(m,g,w){function _(M,x,A,T,y,E,S,C,k,D){this.data=M,this.shape=[x,A,T,y],this.stride=[E,S,C,k],this.offset=D|0}var b=_.prototype;return b.dtype=m,b.dimension=4,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(b,"order",{get:w}),b.set=function(x,A,T,y,E){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T+this.stride[3]*y,E):this.data[this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T+this.stride[3]*y]=E},b.get=function(x,A,T,y){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T+this.stride[3]*y):this.data[this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T+this.stride[3]*y]},b.index=function(x,A,T,y){return this.offset+this.stride[0]*x+this.stride[1]*A+this.stride[2]*T+this.stride[3]*y},b.hi=function(x,A,T,y){return new _(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof y!="number"||y<0?this.shape[3]:y|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},b.lo=function(x,A,T,y){var E=this.offset,S=0,C=this.shape[0],k=this.shape[1],D=this.shape[2],F=this.shape[3],P=this.stride[0],R=this.stride[1],L=this.stride[2],I=this.stride[3];return typeof x=="number"&&x>=0&&(S=x|0,E+=P*S,C-=S),typeof A=="number"&&A>=0&&(S=A|0,E+=R*S,k-=S),typeof T=="number"&&T>=0&&(S=T|0,E+=L*S,D-=S),typeof y=="number"&&y>=0&&(S=y|0,E+=I*S,F-=S),new _(this.data,C,k,D,F,P,R,L,I,E)},b.step=function(x,A,T,y){var E=this.shape[0],S=this.shape[1],C=this.shape[2],k=this.shape[3],D=this.stride[0],F=this.stride[1],P=this.stride[2],R=this.stride[3],L=this.offset,I=0,B=Math.ceil;return typeof x=="number"&&(I=x|0,I<0?(L+=D*(E-1),E=B(-E/I)):E=B(E/I),D*=I),typeof A=="number"&&(I=A|0,I<0?(L+=F*(S-1),S=B(-S/I)):S=B(S/I),F*=I),typeof T=="number"&&(I=T|0,I<0?(L+=P*(C-1),C=B(-C/I)):C=B(C/I),P*=I),typeof y=="number"&&(I=y|0,I<0?(L+=R*(k-1),k=B(-k/I)):k=B(k/I),R*=I),new _(this.data,E,S,C,k,D,F,P,R,L)},b.transpose=function(x,A,T,y){x=x===void 0?0:x|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0,y=y===void 0?3:y|0;var E=this.shape,S=this.stride;return new _(this.data,E[x],E[A],E[T],E[y],S[x],S[A],S[T],S[y],this.offset)},b.pick=function(x,A,T,y){var E=[],S=[],C=this.offset;typeof x=="number"&&x>=0?C=C+this.stride[0]*x|0:(E.push(this.shape[0]),S.push(this.stride[0])),typeof A=="number"&&A>=0?C=C+this.stride[1]*A|0:(E.push(this.shape[1]),S.push(this.stride[1])),typeof T=="number"&&T>=0?C=C+this.stride[2]*T|0:(E.push(this.shape[2]),S.push(this.stride[2])),typeof y=="number"&&y>=0?C=C+this.stride[3]*y|0:(E.push(this.shape[3]),S.push(this.stride[3]));var k=g[E.length+1];return k(this.data,E,S,C)},function(x,A,T,y){return new _(x,A[0],A[1],A[2],A[3],T[0],T[1],T[2],T[3],y)}},5:function(g,w,_){function b(x,A,T,y,E,S,C,k,D,F,P,R){this.data=x,this.shape=[A,T,y,E,S],this.stride=[C,k,D,F,P],this.offset=R|0}var M=b.prototype;return M.dtype=g,M.dimension=5,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(M,"order",{get:_}),M.set=function(A,T,y,E,S,C){return g==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S,C):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S]=C},M.get=function(A,T,y,E,S){return g==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S]},M.index=function(A,T,y,E,S){return this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S},M.hi=function(A,T,y,E,S){return new b(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof y!="number"||y<0?this.shape[2]:y|0,typeof E!="number"||E<0?this.shape[3]:E|0,typeof S!="number"||S<0?this.shape[4]:S|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(A,T,y,E,S){var C=this.offset,k=0,D=this.shape[0],F=this.shape[1],P=this.shape[2],R=this.shape[3],L=this.shape[4],I=this.stride[0],B=this.stride[1],O=this.stride[2],$=this.stride[3],X=this.stride[4];return typeof A=="number"&&A>=0&&(k=A|0,C+=I*k,D-=k),typeof T=="number"&&T>=0&&(k=T|0,C+=B*k,F-=k),typeof y=="number"&&y>=0&&(k=y|0,C+=O*k,P-=k),typeof E=="number"&&E>=0&&(k=E|0,C+=$*k,R-=k),typeof S=="number"&&S>=0&&(k=S|0,C+=X*k,L-=k),new b(this.data,D,F,P,R,L,I,B,O,$,X,C)},M.step=function(A,T,y,E,S){var C=this.shape[0],k=this.shape[1],D=this.shape[2],F=this.shape[3],P=this.shape[4],R=this.stride[0],L=this.stride[1],I=this.stride[2],B=this.stride[3],O=this.stride[4],$=this.offset,X=0,K=Math.ceil;return typeof A=="number"&&(X=A|0,X<0?($+=R*(C-1),C=K(-C/X)):C=K(C/X),R*=X),typeof T=="number"&&(X=T|0,X<0?($+=L*(k-1),k=K(-k/X)):k=K(k/X),L*=X),typeof y=="number"&&(X=y|0,X<0?($+=I*(D-1),D=K(-D/X)):D=K(D/X),I*=X),typeof E=="number"&&(X=E|0,X<0?($+=B*(F-1),F=K(-F/X)):F=K(F/X),B*=X),typeof S=="number"&&(X=S|0,X<0?($+=O*(P-1),P=K(-P/X)):P=K(P/X),O*=X),new b(this.data,C,k,D,F,P,R,L,I,B,O,$)},M.transpose=function(A,T,y,E,S){A=A===void 0?0:A|0,T=T===void 0?1:T|0,y=y===void 0?2:y|0,E=E===void 0?3:E|0,S=S===void 0?4:S|0;var C=this.shape,k=this.stride;return new b(this.data,C[A],C[T],C[y],C[E],C[S],k[A],k[T],k[y],k[E],k[S],this.offset)},M.pick=function(A,T,y,E,S){var C=[],k=[],D=this.offset;typeof A=="number"&&A>=0?D=D+this.stride[0]*A|0:(C.push(this.shape[0]),k.push(this.stride[0])),typeof T=="number"&&T>=0?D=D+this.stride[1]*T|0:(C.push(this.shape[1]),k.push(this.stride[1])),typeof y=="number"&&y>=0?D=D+this.stride[2]*y|0:(C.push(this.shape[2]),k.push(this.stride[2])),typeof E=="number"&&E>=0?D=D+this.stride[3]*E|0:(C.push(this.shape[3]),k.push(this.stride[3])),typeof S=="number"&&S>=0?D=D+this.stride[4]*S|0:(C.push(this.shape[4]),k.push(this.stride[4]));var F=w[C.length+1];return F(this.data,C,k,D)},function(A,T,y,E){return new b(A,T[0],T[1],T[2],T[3],T[4],y[0],y[1],y[2],y[3],y[4],E)}}};function h(m,g){var w=g===-1?"T":String(g),_=f[w];return g===-1?_(m):g===0?_(m,d[m][0]):_(m,d[m],c)}function p(m){if(s(m))return"buffer";if(l)switch(Object.prototype.toString.call(m)){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(m)?"array":"generic"}var d={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(m,g,w,_){if(m===void 0){var y=d.array[0];return y([])}else typeof m=="number"&&(m=[m]);g===void 0&&(g=[m.length]);var b=g.length;if(w===void 0){w=new Array(b);for(var M=b-1,x=1;M>=0;--M)w[M]=x,x*=g[M]}if(_===void 0){_=0;for(var M=0;M>>0;n.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var p=s.hi(f),d=s.lo(f);return h>f==f>0?d===u?(p+=1,d=0):d+=1:d===0?(d=u,p-=1):d-=1,s.pack(d,p)}},8406(n,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),p=c===void 0?o:c,d=0;dp)for(var C=h[g],k=1/Math.sqrt(T*E),S=0;S<3;++S){var D=(S+1)%3,F=(S+2)%3;C[S]+=k*(y[D]*A[F]-y[F]*A[D])}}for(var d=0;dp)for(var k=1/Math.sqrt(P),S=0;S<3;++S)C[S]*=k;else for(var S=0;S<3;++S)C[S]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),p=c===void 0?s:c,d=0;dp?M=1/Math.sqrt(M):M=0;for(var g=0;g<3;++g)b[g]*=M;h[d]=b}return h}},4081(n){"use strict";n.exports=a;function a(o,s,l,u,c,f,h,p,d,v){var m=s+f+v;if(g>0){var g=Math.sqrt(m+1);o[0]=.5*(h-d)/g,o[1]=.5*(p-u)/g,o[2]=.5*(l-f)/g,o[3]=.5*g}else{var w=Math.max(s,f,v),g=Math.sqrt(2*w-m+1);s>=w?(o[0]=.5*g,o[1]=.5*(c+l)/g,o[2]=.5*(p+u)/g,o[3]=.5*(h-d)/g):f>=w?(o[0]=.5*(l+c)/g,o[1]=.5*g,o[2]=.5*(d+h)/g,o[3]=.5*(p-u)/g):(o[0]=.5*(u+p)/g,o[1]=.5*(h+d)/g,o[2]=.5*g,o[3]=.5*(l-c)/g)}return o}},9977(n,a,o){"use strict";n.exports=g;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(w,_,b){return Math.sqrt(Math.pow(w,2)+Math.pow(_,2)+Math.pow(b,2))}function p(w,_,b,M){return Math.sqrt(Math.pow(w,2)+Math.pow(_,2)+Math.pow(b,2)+Math.pow(M,2))}function d(w,_){var b=_[0],M=_[1],x=_[2],A=_[3],T=p(b,M,x,A);T>1e-6?(w[0]=b/T,w[1]=M/T,w[2]=x/T,w[3]=A/T):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,_,b){this.radius=s([b]),this.center=s(_),this.rotation=s(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 m=v.prototype;m.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},m.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var _=this.computedRotation;d(_,_);var b=this.computedMatrix;u(b,_);var M=this.computedCenter,x=this.computedEye,A=this.computedUp,T=Math.exp(this.computedRadius[0]);x[0]=M[0]+T*b[2],x[1]=M[1]+T*b[6],x[2]=M[2]+T*b[10],A[0]=b[1],A[1]=b[5],A[2]=b[9];for(var y=0;y<3;++y){for(var E=0,S=0;S<3;++S)E+=b[y+4*S]*x[S];b[12+y]=-E}},m.getMatrix=function(w,_){this.recalcMatrix(w);var b=this.computedMatrix;if(_){for(var M=0;M<16;++M)_[M]=b[M];return _}return b},m.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},m.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},m.pan=function(w,_,b,M){_=_||0,b=b||0,M=M||0,this.recalcMatrix(w);var x=this.computedMatrix,A=x[1],T=x[5],y=x[9],E=h(A,T,y);A/=E,T/=E,y/=E;var S=x[0],C=x[4],k=x[8],D=S*A+C*T+k*y;S-=A*D,C-=T*D,k-=y*D;var F=h(S,C,k);S/=F,C/=F,k/=F;var P=x[2],R=x[6],L=x[10],I=P*A+R*T+L*y,B=P*S+R*C+L*k;P-=I*A+B*S,R-=I*T+B*C,L-=I*y+B*k;var O=h(P,R,L);P/=O,R/=O,L/=O;var $=S*_+A*b,X=C*_+T*b,K=k*_+y*b;this.center.move(w,$,X,K);var G=Math.exp(this.computedRadius[0]);G=Math.max(1e-4,G+M),this.radius.set(w,Math.log(G))},m.rotate=function(w,_,b,M){this.recalcMatrix(w),_=_||0,b=b||0;var x=this.computedMatrix,A=x[0],T=x[4],y=x[8],E=x[1],S=x[5],C=x[9],k=x[2],D=x[6],F=x[10],P=_*A+b*E,R=_*T+b*S,L=_*y+b*C,I=-(D*L-F*R),B=-(F*P-k*L),O=-(k*R-D*P),$=Math.sqrt(Math.max(0,1-Math.pow(I,2)-Math.pow(B,2)-Math.pow(O,2))),X=p(I,B,O,$);X>1e-6?(I/=X,B/=X,O/=X,$/=X):(I=B=O=0,$=1);var K=this.computedRotation,G=K[0],q=K[1],J=K[2],N=K[3],V=G*$+N*I+q*O-J*B,Y=q*$+N*B+J*I-G*O,H=J*$+N*O+G*B-q*I,j=N*$-G*I-q*B-J*O;if(M){I=k,B=D,O=F;var Q=Math.sin(M)/h(I,B,O);I*=Q,B*=Q,O*=Q,$=Math.cos(_),V=V*$+j*I+Y*O-H*B,Y=Y*$+j*B+H*I-V*O,H=H*$+j*O+V*B-Y*I,j=j*$-V*I-Y*B-H*O}var te=p(V,Y,H,j);te>1e-6?(V/=te,Y/=te,H/=te,j/=te):(V=Y=H=0,j=1),this.rotation.set(w,V,Y,H,j)},m.lookAt=function(w,_,b,M){this.recalcMatrix(w),b=b||this.computedCenter,_=_||this.computedEye,M=M||this.computedUp;var x=this.computedMatrix;l(x,_,b,M);var A=this.computedRotation;f(A,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),d(A,A),this.rotation.set(w,A[0],A[1],A[2],A[3]);for(var T=0,y=0;y<3;++y)T+=Math.pow(b[y]-_[y],2);this.radius.set(w,.5*Math.log(Math.max(T,1e-6))),this.center.set(w,b[0],b[1],b[2])},m.translate=function(w,_,b,M){this.center.move(w,_||0,b||0,M||0)},m.setMatrix=function(w,_){var b=this.computedRotation;f(b,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),d(b,b),this.rotation.set(w,b[0],b[1],b[2],b[3]);var M=this.computedMatrix;c(M,_);var x=M[15];if(Math.abs(x)>1e-6){var A=M[12]/x,T=M[13]/x,y=M[14]/x;this.recalcMatrix(w);var E=Math.exp(this.computedRadius[0]);this.center.set(w,A-M[2]*E,T-M[6]*E,y-M[10]*E),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},m.setDistance=function(w,_){_>0&&this.radius.set(w,Math.log(_))},m.setDistanceLimits=function(w,_){w>0?w=Math.log(w):w=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=_},m.getDistanceLimits=function(w){var _=this.radius.bounds;return w?(w[0]=Math.exp(_[0][0]),w[1]=Math.exp(_[1][0]),w):[Math.exp(_[0][0]),Math.exp(_[1][0])]},m.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]}},m.fromJSON=function(w){var _=this.lastT(),b=w.center;b&&this.center.set(_,b[0],b[1],b[2]);var M=w.rotation;M&&this.rotation.set(_,M[0],M[1],M[2],M[3]);var x=w.distance;x&&x>0&&this.radius.set(_,Math.log(x)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function g(w){w=w||{};var _=w.center||[0,0,0],b=w.rotation||[0,0,0,1],M=w.radius||1;_=[].slice.call(_,0,3),b=[].slice.call(b,0,4),d(b,b);var x=new v(b,_,Math.log(M));return x.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&x.lookAt(0,w.eye,w.center,w.up),x}},1371(n,a,o){"use strict";var s=o(3233);n.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202(n){n.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088(n,a,o){"use strict";n.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,p=[new Array(f),new Array(f)],d=0;d0){C=p[F][E][0],D=F;break}k=C[D^1];for(var P=0;P<2;++P)for(var R=p[P][E],L=0;L0&&(C=I,k=B,D=P)}return S||C&&g(C,D),k}function _(y,E){var S=p[E][y][0],C=[y];g(S,E);for(var k=S[E^1],D=E;;){for(;k!==y;)C.push(k),k=w(C[C.length-2],k,!1);if(p[0][y].length+p[1][y].length===0)break;var F=C[C.length-1],P=y,R=C[1],L=w(F,P,!0);if(s(c[F],c[P],c[R],c[L])<0)break;C.push(y),k=w(F,P)}return C}function b(y,E){return E[1]===E[E.length-1]}for(var d=0;d0;){var A=p[0][d].length,T=_(d,M);b(x,T)?x.push.apply(x,T):(x.length>0&&m.push(x),x=T)}x.length>0&&m.push(x)}return m}},5609(n,a,o){"use strict";n.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),p=new Array(c.length),d=[],v=0;v0;){var g=d.pop();h[g]=!1;for(var w=f[g],v=0;v0}A=A.filter(T);for(var y=A.length,E=new Array(y),S=new Array(y),x=0;x0;){var te=H.pop(),ue=X[te];h(ue,function(oe,Se){return oe-Se});var ge=ue.length,Ee=j[te],xe;if(Ee===0){var R=A[te];xe=[R]}for(var x=0;x=0)&&(j[ce]=Ee^1,H.push(ce),Ee===0)){var R=A[ce];Y(R)||(R.reverse(),xe.push(R))}}Ee===0&&Q.push(xe)}return Q}},5085(n,a,o){n.exports=w;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(_){return function(b,M){var x=_[b];return x?!!x.queryPoint(M,f):!1}}function p(_){for(var b={},M=0;M<_.length;++M){var x=_[M],A=x[0][0],T=x[0][1],y=x[1][1],E=[Math.min(T,y),Math.max(T,y)];A in b?b[A].push(E):b[A]=[E]}for(var S={},C=Object.keys(b),M=0;M0&&b[x]===M[0])A=_[x-1];else return 1;for(var T=1;A;){var y=A.key,E=s(M,y[0],y[1]);if(y[0][0]0)T=-1,A=A.right;else return 0;else if(E>0)A=A.left;else if(E<0)T=1,A=A.right;else return 0}return T}}function v(_){return 1}function m(_){return function(M){return _(M[0],M[1])?0:1}}function g(_,b){return function(x){return _(x[0],x[1])?0:b(x)}}function w(_){for(var b=_.length,M=[],x=[],A=0,T=0;T=v?(y=1,S=v+2*w+b):(y=-w/v,S=w*y+b)):(y=0,_>=0?(E=0,S=b):-_>=g?(E=1,S=g+2*_+b):(E=-_/g,S=_*E+b));else if(E<0)E=0,w>=0?(y=0,S=b):-w>=v?(y=1,S=v+2*w+b):(y=-w/v,S=w*y+b);else{var C=1/T;y*=C,E*=C,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*_)+b}else{var k,D,F,P;y<0?(k=m+w,D=g+_,D>k?(F=D-k,P=v-2*m+g,F>=P?(y=1,E=0,S=v+2*w+b):(y=F/P,E=1-y,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*_)+b)):(y=0,D<=0?(E=1,S=g+2*_+b):_>=0?(E=0,S=b):(E=-_/g,S=_*E+b))):E<0?(k=m+_,D=v+w,D>k?(F=D-k,P=v-2*m+g,F>=P?(E=1,y=0,S=g+2*_+b):(E=F/P,y=1-E,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*_)+b)):(E=0,D<=0?(y=1,S=v+2*w+b):w>=0?(y=0,S=b):(y=-w/v,S=w*y+b))):(F=g+_-m-w,F<=0?(y=0,E=1,S=g+2*_+b):(P=v-2*m+g,F>=P?(y=1,E=0,S=v+2*w+b):(y=F/P,E=1-y,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*_)+b)))}for(var R=1-y-E,d=0;d0){var g=f[p-1];if(s(v,g)===0&&u(g)!==m){p-=1;continue}}f[p++]=v}}return f.length=p,f}},3233(n){"use strict";var a="",o;n.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025(n,a,o){n.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(n){"use strict";n.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var p=l-f,d=h-p;d&&(o[--u]=l,l=d)}for(var v=0,c=u;c0){if(D<=0)return F;P=k+D}else if(k<0){if(D>=0)return F;P=-(k+D)}else return F;var R=p*P;return F>=R||F<=-R?F:_(E,S,C)},function(E,S,C,k){var D=E[0]-k[0],F=S[0]-k[0],P=C[0]-k[0],R=E[1]-k[1],L=S[1]-k[1],I=C[1]-k[1],B=E[2]-k[2],O=S[2]-k[2],$=C[2]-k[2],X=F*I,K=P*L,G=P*R,q=D*I,J=D*L,N=F*R,V=B*(X-K)+O*(G-q)+$*(J-N),Y=(Math.abs(X)+Math.abs(K))*Math.abs(B)+(Math.abs(G)+Math.abs(q))*Math.abs(O)+(Math.abs(J)+Math.abs(N))*Math.abs($),H=d*Y;return V>H||-V>H?V:b(E,S,C,k)}];function x(y){var E=M[y.length];return E||(E=M[y.length]=w(y.length)),E.apply(void 0,y)}function A(y,E,S,C,k,D,F){return function(R,L,I,B,O){switch(arguments.length){case 0:case 1:return 0;case 2:return C(R,L);case 3:return k(R,L,I);case 4:return D(R,L,I,B);case 5:return F(R,L,I,B,O)}for(var $=new Array(arguments.length),X=0;X0&&v>0||d<0&&v<0)return!1;var m=s(h,c,f),g=s(p,c,f);return m>0&&g>0||m<0&&g<0?!1:d===0&&v===0&&m===0&&g===0?l(c,f,h,p):!0}},8545(n){"use strict";n.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,p=s-f,d=p+h;return d?[d,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),p=0,d=0,v=0,m=Math.abs,g=s[d],w=m(g),_=-l[v],b=m(_),M,x;w=c?(M=g,d+=1,d=c?(M=g,d+=1,d>1,_=f[2*w+1];if(_===v)return w;v<_?g=w:m=w+1}return m}function u(c,f,h,p){for(var d=c.length,v=[],m=0;m>1,_=f[2*w+1];if(_===v)return w;v<_?g=w:m=w+1}return m}function u(c,f,h,p){for(var d=c.length,v=[],m=0;m>1,_=f[2*w+1];if(_===v)return w;v<_?g=w:m=w+1}return m}function u(c,f,h,p){for(var d=c.length,v=[],m=0;m>1,_=f[2*w+1];if(_===v)return w;v<_?g=w:m=w+1}return m}function u(c,f,h,p){for(var d=c.length,v=[],m=0;m>1,P=p(E[F],S);P<=0?(P===0&&(D=F),C=F+1):P>0&&(k=F-1)}return D}s=g;function w(E,S){for(var C=new Array(E.length),k=0,D=C.length;k=E.length||p(E[X],F)!==0););}return C}s=w;function _(E,S){if(!S)return w(m(M(E,0)),E,0);for(var C=new Array(S),k=0;k>>I&1&&L.push(D[I]);S.push(L)}return v(S)}s=b;function M(E,S){if(S<0)return[];for(var C=[],k=(1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,p=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--p;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014(n,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(y){for(var E=0,S=Math.max,C=0,k=y.length;C>1,F=h(y[D],E);F<=0?(F===0&&(k=D),S=D+1):F>0&&(C=D-1)}return k}a.findCell=m;function g(y,E){for(var S=new Array(y.length),C=0,k=S.length;C=y.length||h(y[$],D)!==0););}return S}a.incidence=g;function w(y,E){if(!E)return g(v(b(y,0)),y,0);for(var S=new Array(E),C=0;C>>L&1&&R.push(k[L]);E.push(R)}return d(E)}a.explode=_;function b(y,E){if(E<0)return[];for(var S=[],C=(1<>1:(q>>1)-1}function C(q){for(var J=E(q);;){var N=J,V=2*q+1,Y=2*(q+1),H=q;if(V0;){var N=S(q);if(N>=0){var V=E(N);if(J0){var q=R[0];return y(0,B-1),B-=1,C(0),q}return-1}function F(q,J){var N=R[q];return w[N]===J?q:(w[N]=-1/0,k(q),D(),w[N]=J,B+=1,k(B-1))}function P(q){if(!_[q]){_[q]=!0;var J=m[q],N=g[q];m[N]>=0&&(m[N]=J),g[J]>=0&&(g[J]=N),L[J]>=0&&F(L[J],T(J)),L[N]>=0&&F(L[N],T(N))}}for(var R=[],L=new Array(d),b=0;b>1;b>=0;--b)C(b);for(;;){var O=D();if(O<0||w[O]>p)break;P(O)}for(var $=[],b=0;b=0&&N>=0&&J!==N){var V=L[J],Y=L[N];V!==Y&&G.push([V,Y])}}),l.unique(l.normalize(G)),{positions:$,edges:G}}},1303(n,a,o){"use strict";n.exports=u;var s=o(3250);function l(c,f){var h,p;if(f[0][0]f[1][0])h=f[1],p=f[0];else{var d=Math.min(c[0][1],c[1][1]),v=Math.max(c[0][1],c[1][1]),m=Math.min(f[0][1],f[1][1]),g=Math.max(f[0][1],f[1][1]);return vg?d-g:v-g}var w,_;c[0][1]f[1][0])h=f[1],p=f[0];else return l(f,c);var d,v;if(c[0][0]c[1][0])d=c[1],v=c[0];else return-l(c,f);var m=s(h,p,v),g=s(h,p,d);if(m<0){if(g<=0)return m}else if(m>0){if(g>=0)return m}else if(g)return g;if(m=s(v,d,p),g=s(v,d,h),m<0){if(g<=0)return m}else if(m>0){if(g>=0)return m}else if(g)return g;return p[0]-v[0]}},4209(n,a,o){"use strict";n.exports=g;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(w,_,b){this.slabs=w,this.coordinates=_,this.horizontal=b}var h=f.prototype;function p(w,_){return w.y-_}function d(w,_){for(var b=null;w;){var M=w.key,x,A;M[0][0]0)if(_[0]!==M[1][0])b=w,w=w.right;else{var y=d(w.right,_);if(y)return y;w=w.left}else{if(_[0]!==M[1][0])return w;var y=d(w.right,_);if(y)return y;w=w.left}}return b}h.castUp=function(w){var _=s.le(this.coordinates,w[0]);if(_<0)return-1;var b=this.slabs[_],M=d(this.slabs[_],w),x=-1;if(M&&(x=M.value),this.coordinates[_]===w[0]){var A=null;if(M&&(A=M.key),_>0){var T=d(this.slabs[_-1],w);T&&(A?c(T.key,A)>0&&(A=T.key,x=T.value):(x=T.value,A=T.key))}var y=this.horizontal[_];if(y.length>0){var E=s.ge(y,w[1],p);if(E=y.length)return x;S=y[E]}}if(S.start)if(A){var C=u(A[0],A[1],[w[0],S.y]);A[0][0]>A[1][0]&&(C=-C),C>0&&(x=S.index)}else x=S.index;else S.y!==w[1]&&(x=S.index)}}}return x};function v(w,_,b,M){this.y=w,this.index=_,this.start=b,this.closed=M}function m(w,_,b,M){this.x=w,this.segment=_,this.create=b,this.index=M}function g(w){for(var _=w.length,b=2*_,M=new Array(b),x=0;x<_;++x){var A=w[x],T=A[0][0]1&&(_=1);for(var b=1-_,M=d.length,x=new Array(M),A=0;A0||w>0&&x<0){var A=c(_,x,b,w);m.push(A),g.push(A.slice())}x<0?g.push(b.slice()):x>0?m.push(b.slice()):(m.push(b.slice()),g.push(b.slice())),w=x}return{positive:m,negative:g}}function h(d,v){for(var m=[],g=u(d[d.length-1],v),w=d[d.length-1],_=d[0],b=0;b0||g>0&&M<0)&&m.push(c(w,M,_,g)),M>=0&&m.push(_.slice()),g=M}return m}function p(d,v){for(var m=[],g=u(d[d.length-1],v),w=d[d.length-1],_=d[0],b=0;b0||g>0&&M<0)&&m.push(c(w,M,_,g)),M<=0&&m.push(_.slice()),g=M}return m}},3387(n,a,o){var s;(function(){"use strict";var l={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(d){return f(p(d),arguments)}function c(d,v){return u.apply(null,[d].concat(v||[]))}function f(d,v){var m=1,g=d.length,w,_="",b,M,x,A,T,y,E,S;for(b=0;b=0),x.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,x.width?parseInt(x.width):0);break;case"e":w=x.precision?parseFloat(w).toExponential(x.precision):parseFloat(w).toExponential();break;case"f":w=x.precision?parseFloat(w).toFixed(x.precision):parseFloat(w);break;case"g":w=x.precision?String(Number(w.toPrecision(x.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=x.precision?w.substring(0,x.precision):w;break;case"t":w=String(!!w),w=x.precision?w.substring(0,x.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=x.precision?w.substring(0,x.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=x.precision?w.substring(0,x.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?_+=w:(l.number.test(x.type)&&(!E||x.sign)?(S=E?"+":"-",w=w.toString().replace(l.sign,"")):S="",T=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",y=x.width-(S+w).length,A=x.width&&y>0?T.repeat(y):"",_+=x.align?S+w+A:T==="0"?S+A+w:A+S+w)}return _}var h=Object.create(null);function p(d){if(h[d])return h[d];for(var v=d,m,g=[],w=0;v;){if((m=l.text.exec(v))!==null)g.push(m[0]);else if((m=l.modulo.exec(v))!==null)g.push("%");else if((m=l.placeholder.exec(v))!==null){if(m[2]){w|=1;var _=[],b=m[2],M=[];if((M=l.key.exec(b))!==null)for(_.push(M[1]);(b=b.substring(M[0].length))!=="";)if((M=l.key_access.exec(b))!==null)_.push(M[1]);else if((M=l.index_access.exec(b))!==null)_.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");m[2]=_}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.push({placeholder:m[0],param_no:m[1],keys:m[2],sign:m[3],pad_char:m[4],align:m[5],width:m[6],precision:m[7],type:m[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(m[0].length)}return h[d]=g}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(a,o,a,n),s!==void 0&&(n.exports=s))})()},3711(n,a,o){"use strict";n.exports=p;var s=o(2640),l=o(781),u={"2d":function(d,v,m){var g=d({order:v,scalarArguments:3,getters:m==="generic"?[0]:void 0,phase:function(_,b,M,x){return _>x|0},vertex:function(_,b,M,x,A,T,y,E,S,C,k,D,F){var P=(y<<0)+(E<<1)+(S<<2)+(C<<3)|0;if(!(P===0||P===15))switch(P){case 0:k.push([_-.5,b-.5]);break;case 1:k.push([_-.25-.25*(x+M-2*F)/(M-x),b-.25-.25*(A+M-2*F)/(M-A)]);break;case 2:k.push([_-.75-.25*(-x-M+2*F)/(x-M),b-.25-.25*(T+x-2*F)/(x-T)]);break;case 3:k.push([_-.5,b-.5-.5*(A+M+T+x-4*F)/(M-A+x-T)]);break;case 4:k.push([_-.25-.25*(T+A-2*F)/(A-T),b-.75-.25*(-A-M+2*F)/(A-M)]);break;case 5:k.push([_-.5-.5*(x+M+T+A-4*F)/(M-x+A-T),b-.5]);break;case 6:k.push([_-.5-.25*(-x-M+T+A)/(x-M+A-T),b-.5-.25*(-A-M+T+x)/(A-M+x-T)]);break;case 7:k.push([_-.75-.25*(T+A-2*F)/(A-T),b-.75-.25*(T+x-2*F)/(x-T)]);break;case 8:k.push([_-.75-.25*(-T-A+2*F)/(T-A),b-.75-.25*(-T-x+2*F)/(T-x)]);break;case 9:k.push([_-.5-.25*(x+M+-T-A)/(M-x+T-A),b-.5-.25*(A+M+-T-x)/(M-A+T-x)]);break;case 10:k.push([_-.5-.5*(-x-M+-T-A+4*F)/(x-M+T-A),b-.5]);break;case 11:k.push([_-.25-.25*(-T-A+2*F)/(T-A),b-.75-.25*(A+M-2*F)/(M-A)]);break;case 12:k.push([_-.5,b-.5-.5*(-A-M+-T-x+4*F)/(A-M+T-x)]);break;case 13:k.push([_-.75-.25*(x+M-2*F)/(M-x),b-.25-.25*(-T-x+2*F)/(T-x)]);break;case 14:k.push([_-.25-.25*(-x-M+2*F)/(x-M),b-.25-.25*(-A-M+2*F)/(A-M)]);break;case 15:k.push([_-.5,b-.5]);break}},cell:function(_,b,M,x,A,T,y,E,S){A?E.push([_,b]):E.push([b,_])}});return function(w,_){var b=[],M=[];return g(w,b,M,_),{positions:b,cells:M}}}};function c(d,v){var m=d.length+"d",g=u[m];if(g)return g(s,d,v)}function f(d,v){for(var m=l(d,v),g=m.length,w=new Array(g),_=new Array(g),b=0;bMath.max(x,A)?T[2]=1:x>Math.max(M,A)?T[0]=1:T[1]=1;for(var y=0,E=0,S=0;S<3;++S)y+=b[S]*b[S],E+=T[S]*b[S];for(var S=0;S<3;++S)T[S]-=E/y*b[S];return f(T,T),T}function m(b,M,x,A,T,y,E,S){this.center=s(x),this.up=s(A),this.right=s(T),this.radius=s([y]),this.angle=s([E,S]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(b,M),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 C=0;C<16;++C)this.computedMatrix[C]=.5;this.recalcMatrix(0)}var g=m.prototype;g.setDistanceLimits=function(b,M){b>0?b=Math.log(b):b=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=M},g.getDistanceLimits=function(b){var M=this.radius.bounds[0];return b?(b[0]=Math.exp(M[0][0]),b[1]=Math.exp(M[1][0]),b):[Math.exp(M[0][0]),Math.exp(M[1][0])]},g.recalcMatrix=function(b){this.center.curve(b),this.up.curve(b),this.right.curve(b),this.radius.curve(b),this.angle.curve(b);for(var M=this.computedUp,x=this.computedRight,A=0,T=0,y=0;y<3;++y)T+=M[y]*x[y],A+=M[y]*M[y];for(var E=Math.sqrt(A),S=0,y=0;y<3;++y)x[y]-=M[y]*T/A,S+=x[y]*x[y],M[y]/=E;for(var C=Math.sqrt(S),y=0;y<3;++y)x[y]/=C;var k=this.computedToward;c(k,M,x),f(k,k);for(var D=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],P=this.computedAngle[1],R=Math.cos(F),L=Math.sin(F),I=Math.cos(P),B=Math.sin(P),O=this.computedCenter,$=R*I,X=L*I,K=B,G=-R*B,q=-L*B,J=I,N=this.computedEye,V=this.computedMatrix,y=0;y<3;++y){var Y=$*x[y]+X*k[y]+K*M[y];V[4*y+1]=G*x[y]+q*k[y]+J*M[y],V[4*y+2]=Y,V[4*y+3]=0}var H=V[1],j=V[5],Q=V[9],te=V[2],ue=V[6],ge=V[10],Ee=j*ge-Q*ue,xe=Q*te-H*ge,ce=H*ue-j*te,oe=p(Ee,xe,ce);Ee/=oe,xe/=oe,ce/=oe,V[0]=Ee,V[4]=xe,V[8]=ce;for(var y=0;y<3;++y)N[y]=O[y]+V[2+4*y]*D;for(var y=0;y<3;++y){for(var S=0,Se=0;Se<3;++Se)S+=V[y+4*Se]*N[Se];V[12+y]=-S}V[15]=1},g.getMatrix=function(b,M){this.recalcMatrix(b);var x=this.computedMatrix;if(M){for(var A=0;A<16;++A)M[A]=x[A];return M}return x};var w=[0,0,0];g.rotate=function(b,M,x,A){if(this.angle.move(b,M,x),A){this.recalcMatrix(b);var T=this.computedMatrix;w[0]=T[2],w[1]=T[6],w[2]=T[10];for(var y=this.computedUp,E=this.computedRight,S=this.computedToward,C=0;C<3;++C)T[4*C]=y[C],T[4*C+1]=E[C],T[4*C+2]=S[C];u(T,T,A,w);for(var C=0;C<3;++C)y[C]=T[4*C],E[C]=T[4*C+1];this.up.set(b,y[0],y[1],y[2]),this.right.set(b,E[0],E[1],E[2])}},g.pan=function(b,M,x,A){M=M||0,x=x||0,A=A||0,this.recalcMatrix(b);var T=this.computedMatrix,y=Math.exp(this.computedRadius[0]),E=T[1],S=T[5],C=T[9],k=p(E,S,C);E/=k,S/=k,C/=k;var D=T[0],F=T[4],P=T[8],R=D*E+F*S+P*C;D-=E*R,F-=S*R,P-=C*R;var L=p(D,F,P);D/=L,F/=L,P/=L;var I=D*M+E*x,B=F*M+S*x,O=P*M+C*x;this.center.move(b,I,B,O);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+A),this.radius.set(b,Math.log($))},g.translate=function(b,M,x,A){this.center.move(b,M||0,x||0,A||0)},g.setMatrix=function(b,M,x,A){var T=1;typeof x=="number"&&(T=x|0),(T<0||T>3)&&(T=1);var y=(T+2)%3,E=(T+1)%3;M||(this.recalcMatrix(b),M=this.computedMatrix);var S=M[T],C=M[T+4],k=M[T+8];if(A){var F=Math.abs(S),P=Math.abs(C),R=Math.abs(k),L=Math.max(F,P,R);F===L?(S=S<0?-1:1,C=k=0):R===L?(k=k<0?-1:1,S=C=0):(C=C<0?-1:1,S=k=0)}else{var D=p(S,C,k);S/=D,C/=D,k/=D}var I=M[y],B=M[y+4],O=M[y+8],$=I*S+B*C+O*k;I-=S*$,B-=C*$,O-=k*$;var X=p(I,B,O);I/=X,B/=X,O/=X;var K=C*O-k*B,G=k*I-S*O,q=S*B-C*I,J=p(K,G,q);K/=J,G/=J,q/=J,this.center.jump(b,_e,re,pe),this.radius.idle(b),this.up.jump(b,S,C,k),this.right.jump(b,I,B,O);var N,V;if(T===2){var Y=M[1],H=M[5],j=M[9],Q=Y*I+H*B+j*O,te=Y*K+H*G+j*q;xe<0?N=-Math.PI/2:N=Math.PI/2,V=Math.atan2(te,Q)}else{var ue=M[2],ge=M[6],Ee=M[10],xe=ue*S+ge*C+Ee*k,ce=ue*I+ge*B+Ee*O,oe=ue*K+ge*G+Ee*q;N=Math.asin(d(xe)),V=Math.atan2(oe,ce)}this.angle.jump(b,V,N),this.recalcMatrix(b);var Se=M[2],be=M[6],fe=M[10],ee=this.computedMatrix;l(ee,M);var ae=ee[15],_e=ee[12]/ae,re=ee[13]/ae,pe=ee[14]/ae,Te=Math.exp(this.computedRadius[0]);this.center.jump(b,_e-Se*Te,re-be*Te,pe-fe*Te)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(b){this.center.idle(b),this.up.idle(b),this.right.idle(b),this.radius.idle(b),this.angle.idle(b)},g.flush=function(b){this.center.flush(b),this.up.flush(b),this.right.flush(b),this.radius.flush(b),this.angle.flush(b)},g.setDistance=function(b,M){M>0&&this.radius.set(b,Math.log(M))},g.lookAt=function(b,M,x,A){this.recalcMatrix(b),M=M||this.computedEye,x=x||this.computedCenter,A=A||this.computedUp;var T=A[0],y=A[1],E=A[2],S=p(T,y,E);if(!(S<1e-6)){T/=S,y/=S,E/=S;var C=M[0]-x[0],k=M[1]-x[1],D=M[2]-x[2],F=p(C,k,D);if(!(F<1e-6)){C/=F,k/=F,D/=F;var P=this.computedRight,R=P[0],L=P[1],I=P[2],B=T*R+y*L+E*I;R-=B*T,L-=B*y,I-=B*E;var O=p(R,L,I);if(!(O<.01&&(R=y*D-E*k,L=E*C-T*D,I=T*k-y*C,O=p(R,L,I),O<1e-6))){R/=O,L/=O,I/=O,this.up.set(b,T,y,E),this.right.set(b,R,L,I),this.center.set(b,x[0],x[1],x[2]),this.radius.set(b,Math.log(F));var $=y*I-E*L,X=E*R-T*I,K=T*L-y*R,G=p($,X,K);$/=G,X/=G,K/=G;var q=T*C+y*k+E*D,J=R*C+L*k+I*D,N=$*C+X*k+K*D,V=Math.asin(d(q)),Y=Math.atan2(N,J),H=this.angle._state,j=H[H.length-1],Q=H[H.length-2];j=j%(2*Math.PI);var te=Math.abs(j+2*Math.PI-Y),ue=Math.abs(j-Y),ge=Math.abs(j-2*Math.PI-Y);te0?I.pop():new ArrayBuffer(R)}a.mallocArrayBuffer=w;function _(P){return new Uint8Array(w(P),0,P)}a.mallocUint8=_;function b(P){return new Uint16Array(w(2*P),0,P)}a.mallocUint16=b;function M(P){return new Uint32Array(w(4*P),0,P)}a.mallocUint32=M;function x(P){return new Int8Array(w(P),0,P)}a.mallocInt8=x;function A(P){return new Int16Array(w(2*P),0,P)}a.mallocInt16=A;function T(P){return new Int32Array(w(4*P),0,P)}a.mallocInt32=T;function y(P){return new Float32Array(w(4*P),0,P)}a.mallocFloat32=a.mallocFloat=y;function E(P){return new Float64Array(w(8*P),0,P)}a.mallocFloat64=a.mallocDouble=E;function S(P){return c?new Uint8ClampedArray(w(P),0,P):_(P)}a.mallocUint8Clamped=S;function C(P){return f?new BigUint64Array(w(8*P),0,P):null}a.mallocBigUint64=C;function k(P){return h?new BigInt64Array(w(8*P),0,P):null}a.mallocBigInt64=k;function D(P){return new DataView(w(P),0,P)}a.mallocDataView=D;function F(P){P=s.nextPow2(P);var R=s.log2(P),L=v[R];return L.length>0?L.pop():new u(P)}a.mallocBuffer=F,a.clearCache=function(){for(var R=0;R<32;++R)p.UINT8[R].length=0,p.UINT16[R].length=0,p.UINT32[R].length=0,p.INT8[R].length=0,p.INT16[R].length=0,p.INT32[R].length=0,p.FLOAT[R].length=0,p.DOUBLE[R].length=0,p.BIGUINT64[R].length=0,p.BIGINT64[R].length=0,p.UINT8C[R].length=0,d[R].length=0,v[R].length=0}},1755(n){"use strict";"use restrict";n.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",I="",B=L.length,O=I.length,$=F[0]===w||F[0]===M,X=0,K=-O;X>-1&&(X=P.indexOf(L,X),!(X===-1||(K=P.indexOf(I,X+B),K===-1)||K<=X));){for(var G=X;G=K)R[G]=null,P=P.substr(0,G)+" "+P.substr(G+1);else if(R[G]!==null){var q=R[G].indexOf(F[0]);q===-1?R[G]+=F:$&&(R[G]=R[G].substr(0,q+1)+(1+parseInt(R[G][q+1]))+R[G].substr(q+2))}var J=X+B,N=P.substr(J,K-J),V=N.indexOf(L);V!==-1?X=V:X=K+O}return R}function T(D,F,P){for(var R=F.textAlign||"start",L=F.textBaseline||"alphabetic",I=[1<<30,1<<30],B=[0,0],O=D.length,$=0;$/g,` `):P=P.replace(/\/g," ");var B="",O=[];for(j=0;j-1?parseInt(re[1+Ce]):0,me=ze>-1?parseInt(pe[1+ze]):0;we!==me&&(Te=Te.replace(ce(),"?px "),ue*=Math.pow(.75,me-we),Te=Te.replace("?px ",ce())),te+=.25*q*(me-we)}if(I.superscripts===!0){var Le=re.indexOf(w),Ne=pe.indexOf(w),Je=Le>-1?parseInt(re[1+Le]):0,rt=Ne>-1?parseInt(pe[1+Ne]):0;Je!==rt&&(Te=Te.replace(ce(),"?px "),ue*=Math.pow(.75,rt-Je),Te=Te.replace("?px ",ce())),te-=.25*q*(rt-Je)}if(I.bolds===!0){var mt=re.indexOf(d)>-1,dt=pe.indexOf(d)>-1;!mt&&dt&&(St?Te=Te.replace("italic ","italic bold "):Te="bold "+Te),mt&&!dt&&(Te=Te.replace("bold ",""))}if(I.italics===!0){var St=re.indexOf(m)>-1,Ke=pe.indexOf(m)>-1;!St&&Ke&&(Te="italic "+Te),St&&!Ke&&(Te=Te.replace("italic ",""))}F.font=Te}for(H=0;H0&&(L=R.size),R.lineSpacing&&R.lineSpacing>0&&(I=R.lineSpacing),R.styletags&&R.styletags.breaklines&&(B.breaklines=!!R.styletags.breaklines),R.styletags&&R.styletags.bolds&&(B.bolds=!!R.styletags.bolds),R.styletags&&R.styletags.italics&&(B.italics=!!R.styletags.italics),R.styletags&&R.styletags.subscripts&&(B.subscripts=!!R.styletags.subscripts),R.styletags&&R.styletags.superscripts&&(B.superscripts=!!R.styletags.superscripts)),P.font=[R.fontStyle,R.fontVariant,R.fontWeight,L+"px",R.font].filter(function($){return $}).join(" "),P.textAlign="start",P.textBaseline="alphabetic",P.direction="ltr";var O=y(F,P,D,L,I,B);return C(O,R,L)}},1538(n){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(S){S.permitHostObjects___&&S.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{n.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,p=Object.defineProperty,d=Object.isExtensible,v="weakmap:",m=v+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var g=new ArrayBuffer(25),w=new Uint8Array(g);crypto.getRandomValues(w),m=v+"rand:"+Array.prototype.map.call(w,function(S){return(S%36).toString(36)}).join("")+"___"}function _(S){return!(S.substr(0,v.length)==v&&S.substr(S.length-3)==="___")}if(p(Object,"getOwnPropertyNames",{value:function(C){return h(C).filter(_)}}),"getPropertyNames"in Object){var b=Object.getPropertyNames;p(Object,"getPropertyNames",{value:function(C){return b(C).filter(_)}})}function M(S){if(S!==Object(S))throw new TypeError("Not an object: "+S);var C=S[m];if(C&&C.key===S)return C;if(d(S)){C={key:S};try{return p(S,m,{value:C,writable:!1,enumerable:!1,configurable:!1}),C}catch(k){return}}}(function(){var S=Object.freeze;p(Object,"freeze",{value:function(F){return M(F),S(F)}});var C=Object.seal;p(Object,"seal",{value:function(F){return M(F),C(F)}});var k=Object.preventExtensions;p(Object,"preventExtensions",{value:function(F){return M(F),k(F)}})})();function x(S){return S.prototype=null,Object.freeze(S)}var A=!1;function T(){!A&&typeof console!="undefined"&&(A=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var y=0,E=function(){this instanceof E||T();var S=[],C=[],k=y++;function D(L,I){var B,O=M(L);return O?k in O?O[k]:I:(B=S.indexOf(L),B>=0?C[B]:I)}function F(L){var I=M(L);return I?k in I:S.indexOf(L)>=0}function P(L,I){var B,O=M(L);return O?O[k]=I:(B=S.indexOf(L),B>=0?C[B]=I:(B=S.length,C[B]=I,S[B]=L)),this}function R(L){var I=M(L),B,O;return I?k in I&&delete I[k]:(B=S.indexOf(L),B<0?!1:(O=S.length-1,S[B]=void 0,C[B]=C[O],S[B]=S[O],S.length=O,C.length=O,!0))}return Object.create(E.prototype,{get___:{value:x(D)},has___:{value:x(F)},set___:{value:x(P)},delete___:{value:x(R)}})};E.prototype=Object.create(Object.prototype,{get:{value:function(C,k){return this.get___(C,k)},writable:!0,configurable:!0},has:{value:function(C){return this.has___(C)},writable:!0,configurable:!0},set:{value:function(C,k){return this.set___(C,k)},writable:!0,configurable:!0},delete:{value:function(C){return this.delete___(C)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function S(){this instanceof E||T();var C=new l,k=void 0,D=!1;function F(I,B){return k?C.has(I)?C.get(I):k.get___(I,B):C.get(I,B)}function P(I){return C.has(I)||(k?k.has___(I):!1)}var R;s?R=function(I,B){return C.set(I,B),C.has(I)||(k||(k=new E),k.set(I,B)),this}:R=function(I,B){if(D)try{C.set(I,B)}catch(O){k||(k=new E),k.set___(I,B)}else C.set(I,B);return this};function L(I){var B=!!C.delete(I);return k&&k.delete___(I)||B}return Object.create(E.prototype,{get___:{value:x(F)},has___:{value:x(P)},set___:{value:x(R)},delete___:{value:x(L)},permitHostObjects___:{value:x(function(I){if(I===o)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}S.prototype=E.prototype,n.exports=S,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),n.exports=E)})()},236(n,a,o){var s=o(8284);n.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284(n){n.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606(n,a,o){var s=o(236);n.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349(n){"use strict";function a(){return function(f,h,p,d,v,m){var g=f[0],w=p[0],_=[0],b=w;d|=0;var M=0,x=w;for(M=0;M=0!=T>=0&&v.push(_[0]+.5+.5*(A+T)/(A-T))}d+=x,++_[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(d,v,m){var g=d.dtype,w=d.order,_=[g,w.join()].join(),b=h[_];return b||(h[_]=b=f([g,w])),b(d.shape.slice(0),d.data,d.stride,d.offset|0,v,m)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}n.exports=c({funcName:"zeroCrossings"})},781(n,a,o){"use strict";n.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790(){}};let t={};function r(n){let a=t[n];if(a!==void 0)return a.exports;let o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(n){if(typeof window=="object")return window}})(),r.nmd=n=>(n.paths=[],n.children||(n.children=[]),n);let i=r(3065);eOe.exports=i})()});var bm=W((iKr,tOe)=>{"use strict";var{normalize:Urr}=ti();function Vrr(e){return e?Urr(e):[0,0,0,1]}tOe.exports=Vrr});var _m=W((nKr,sOe)=>{"use strict";var aOe=hn(),tR=es(),q4=ti(),Grr=Yl().defaultLine,rOe=Tc().isArrayOrTypedArray,zJ=q4.normalize(Grr),oOe=1;function iOe(e,t){return[e[0],e[1],e[2],e[3]*t]}function RJ(e){return aOe(e)||!q4.isChannelArray(e)&&!q4.isValid(e)?zJ:q4.normalize(e)}function nOe(e){return aOe(e)?e:oOe}function Hrr(e,t,r){var i=e.color;i&&i._inputArray&&(i=i._inputArray);var n=rOe(i),a=rOe(t),o=tR.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=tR.makeColorScaleFuncFromTrace(e):l=RJ,n?u=(d,v)=>d[v]===void 0?zJ:o.colorscale===void 0?l(d[v]):q4.normalize(l(d[v])):u=RJ,a?c=function(d,v){return d[v]===void 0?oOe:nOe(d[v])}:c=nOe,n||a)for(var p=0;pWrr});var $rr,Wrr,qJ=Ci(()=>{"use strict";$rr={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]},Wrr=$rr});var rR={};Jn(rR,{default:()=>Xrr});var Yrr,Xrr,iR=Ci(()=>{"use strict";Yrr={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"},Xrr=Yrr});var uOe=W((aKr,lOe)=>{"use strict";var Zrr=xi();function OJ(e,t,r,i){if(!t||!t.visible)return null;for(var n=Zrr.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function Krr(e){for(var t=0;t{"use strict";var Qrr=uc().gl_line3d,cOe=uc().gl_scatter3d,eir=uc().gl_error3d,tir=uc().gl_mesh3d,rir=uc().delaunay_triangulate,wm=tt(),vOe=bm(),nR=_m().formatColor,iir=MA(),NJ=(qJ(),Pt(BJ)).default,nir=(iR(),Pt(rR)).default,air=Yi(),oir=ah().appendArrayPointValue,sir=uOe();function gOe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var VJ=gOe.prototype;VJ.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(wm.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function lir(e,t,r){var i=(r+1)%3,n=(r+2)%3,a=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function hOe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function cir(e){var t=0,r=0,i=[t,r];if(Array.isArray(e))for(var n=0;n=0){var u=lir(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=tir(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};VJ.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 pir(e,t){var r=new gOe(e,t.uid);return r.update(t),r}mOe.exports=pir});var WJ=W((sKr,wOe)=>{"use strict";var Tm=Ws(),vir=jo(),$J=Fo(),GJ=Ts().axisHoverFormat,{hovertemplateAttrs:gir,texttemplateAttrs:mir,templatefallbackAttrs:xOe}=Wa(),bOe=Ja(),yir=(qJ(),Pt(BJ)).default,xir=(iR(),Pt(rR)).default,_v=an().extendFlat,bir=hs().overrideAll,_Oe=(Qx(),Pt(Jx)).default,_ir=Tm.line,I_=Tm.marker,wir=I_.line,Tir=_v({width:_ir.width,dash:{valType:"enumerated",values:_Oe(yir),dflt:"solid"}},$J("line"));function HJ(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var jJ=wOe.exports=bir({x:Tm.x,y:Tm.y,z:{valType:"data_array"},text:_v({},Tm.text,{}),texttemplate:mir(),texttemplatefallback:xOe({editType:"calc"}),hovertext:_v({},Tm.hovertext,{}),hovertemplate:gir(),hovertemplatefallback:xOe(),xhoverformat:GJ("x"),yhoverformat:GJ("y"),zhoverformat:GJ("z"),mode:_v({},Tm.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:HJ("x"),y:HJ("y"),z:HJ("z")},connectgaps:Tm.connectgaps,line:Tir,marker:_v({symbol:{valType:"enumerated",values:_Oe(xir),dflt:"circle",arrayOk:!0},size:_v({},I_.size,{dflt:8}),sizeref:I_.sizeref,sizemin:I_.sizemin,sizemode:I_.sizemode,opacity:_v({},I_.opacity,{arrayOk:!1}),colorbar:I_.colorbar,line:_v({width:_v({},wir.width,{arrayOk:!1})},$J("marker.line"))},$J("marker")),textposition:_v({},Tm.textposition,{dflt:"top center"}),textfont:vir({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:bOe.opacity,hoverinfo:_v({},bOe.hoverinfo)},"calc","nested");jJ.x.editType=jJ.y.editType=jJ.z.editType="calc+clearAxisTypes"});var MOe=W((lKr,AOe)=>{"use strict";var TOe=xi(),Air=tt(),YJ=Wo(),Mir=Dd(),Sir=tv(),Eir=rv(),kir=WJ();AOe.exports=function(t,r,i,n){function a(p,d){return Air.coerce(t,r,kir,p,d)}var o=Cir(t,r,a,n);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),YJ.hasMarkers(r)&&Mir(t,r,i,n,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),YJ.hasLines(r)&&(a("connectgaps"),Sir(t,r,i,n,a)),YJ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),Eir(t,r,n,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=TOe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||i,{axis:"z"}),h(t,r,s||l||i,{axis:"y",inherit:"z"}),h(t,r,s||l||i,{axis:"x",inherit:"z"})};function Cir(e,t,r,i){var n=0,a=r("x"),o=r("y"),s=r("z"),l=TOe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],i),a&&o&&s&&(n=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=n),n}});var EOe=W((uKr,SOe)=>{"use strict";var Dir=L1(),Fir=Fd();SOe.exports=function(t,r){var i=[{x:!1,y:!1,trace:r,t:{}}];return Dir(i,r),Fir(t,r),i}});var COe=W((cKr,kOe)=>{kOe.exports=Lir;function Lir(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var i=t,n;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o{var Pir=COe();DOe.exports=function(t){return Pir("webgl",t)}});var XJ=W((hKr,POe)=>{"use strict";var LOe=ti(),Iir=function(){};POe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=Iir);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var i=document.createElement("div");i.className="no-webgl",i.style.cursor="pointer",i.style.fontSize="24px",i.style.color=LOe.defaults[0],i.style.position="absolute",i.style.left=i.style.top="0px",i.style.width=i.style.height="100%",i.style["background-color"]=LOe.lightLine,i.style["z-index"]=30;var n=document.createElement("p");return n.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",n.style.position="relative",n.style.top="50%",n.style.left="50%",n.style.height="30%",n.style.width="50%",n.style.margin="-15% 0 0 -25%",i.appendChild(n),t.container.appendChild(i),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var zOe=W((dKr,ROe)=>{"use strict";var R_=bm(),Rir=tt(),zir=["xaxis","yaxis","zaxis"];function IOe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var Bir=IOe.prototype;Bir.merge=function(e,t){for(var r=this,i=0;i<3;++i){var n=t[zir[i]];if(!n.visible){r.tickEnable[i]=!1,r.labelEnable[i]=!1,r.lineEnable[i]=!1,r.lineTickEnable[i]=!1,r.gridEnable[i]=!1,r.zeroEnable[i]=!1,r.backgroundEnable[i]=!1;continue}r.labels[i]=e._meta?Rir.templateString(n.title.text,e._meta):n.title.text,"font"in n.title&&(n.title.font.color&&(r.labelColor[i]=R_(n.title.font.color)),n.title.font.family&&(r.labelFont[i]=n.title.font.family),n.title.font.size&&(r.labelSize[i]=n.title.font.size),n.title.font.weight&&(r.labelFontWeight[i]=n.title.font.weight),n.title.font.style&&(r.labelFontStyle[i]=n.title.font.style),n.title.font.variant&&(r.labelFontVariant[i]=n.title.font.variant)),"showline"in n&&(r.lineEnable[i]=n.showline),"linecolor"in n&&(r.lineColor[i]=R_(n.linecolor)),"linewidth"in n&&(r.lineWidth[i]=n.linewidth),"showgrid"in n&&(r.gridEnable[i]=n.showgrid),"gridcolor"in n&&(r.gridColor[i]=R_(n.gridcolor)),"gridwidth"in n&&(r.gridWidth[i]=n.gridwidth),n.type==="log"?r.zeroEnable[i]=!1:"zeroline"in n&&(r.zeroEnable[i]=n.zeroline),"zerolinecolor"in n&&(r.zeroLineColor[i]=R_(n.zerolinecolor)),"zerolinewidth"in n&&(r.zeroLineWidth[i]=n.zerolinewidth),"ticks"in n&&n.ticks?r.lineTickEnable[i]=!0:r.lineTickEnable[i]=!1,"ticklen"in n&&(r.lineTickLength[i]=r._defaultLineTickLength[i]=n.ticklen),"tickcolor"in n&&(r.lineTickColor[i]=R_(n.tickcolor)),"tickwidth"in n&&(r.lineTickWidth[i]=n.tickwidth),"tickangle"in n&&(r.tickAngle[i]=n.tickangle==="auto"?-3600:Math.PI*-n.tickangle/180),"showticklabels"in n&&(r.tickEnable[i]=n.showticklabels),"tickfont"in n&&(n.tickfont.color&&(r.tickColor[i]=R_(n.tickfont.color)),n.tickfont.family&&(r.tickFont[i]=n.tickfont.family),n.tickfont.size&&(r.tickSize[i]=n.tickfont.size),n.tickfont.weight&&(r.tickFontWeight[i]=n.tickfont.weight),n.tickfont.style&&(r.tickFontStyle[i]=n.tickfont.style),n.tickfont.variant&&(r.tickFontVariant[i]=n.tickfont.variant)),"mirror"in n?["ticks","all","allticks"].indexOf(n.mirror)!==-1?(r.lineTickMirror[i]=!0,r.lineMirror[i]=!0):n.mirror===!0?(r.lineTickMirror[i]=!1,r.lineMirror[i]=!0):(r.lineTickMirror[i]=!1,r.lineMirror[i]=!1):r.lineMirror[i]=!1,"showbackground"in n&&n.showbackground!==!1?(r.backgroundEnable[i]=!0,r.backgroundColor[i]=R_(n.backgroundcolor)):r.backgroundEnable[i]=!1}};function qir(e,t){var r=new IOe;return r.merge(e,t),r}ROe.exports=qir});var OOe=W((pKr,qOe)=>{"use strict";var Oir=bm(),Nir=["xaxis","yaxis","zaxis"];function BOe(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var Uir=BOe.prototype;Uir.merge=function(e){for(var t=0;t<3;++t){var r=e[Nir[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=Oir(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function Vir(e){var t=new BOe;return t.merge(e),t}qOe.exports=Vir});var VOe=W((vKr,UOe)=>{"use strict";UOe.exports=Wir;var NOe=Yi(),Gir=tt(),Hir=["xaxis","yaxis","zaxis"],jir=[0,0,0];function $ir(e){for(var t=new Array(3),r=0;r<3;++r){for(var i=e[r],n=new Array(i.length),a=0;a/g," "));n[a]=u,o.tickmode=s}}t.ticks=n;for(var a=0;a<3;++a){jir[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=$ir(n)}});var XOe=W((gKr,YOe)=>{"use strict";var jOe=uc().gl_plot3d,Yir=jOe.createCamera,GOe=jOe.createScene,Xir=FOe(),Zir=M7(),sR=xi(),hh=tt(),oR=hh.preserveDrawingBuffer(),lR=Yi(),wv=Is(),Kir=bm(),Jir=XJ(),Qir=nW(),enr=zOe(),tnr=OOe(),rnr=VOe(),inr=Yp().applyAutorangeOptions,ME,aR,$Oe=!1;function WOe(e,t){var r=document.createElement("div"),i=e.container;this.graphDiv=e.graphDiv;var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.style.position="absolute",n.style.top=n.style.left="0px",n.style.width=n.style.height="100%",n.style["z-index"]=20,n.style["pointer-events"]="none",r.appendChild(n),this.svgContainer=n,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",i.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=enr(t,t[this.id]),this.spikeOptions=tnr(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=sR.getComponentMethod("annotations3d","convert"),this.drawAnnotations=sR.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var cf=WOe.prototype;cf.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:oR,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!aR&&(ME=document.createElement("canvas"),aR=Xir({canvas:ME,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!aR))throw new Error("error creating static canvas/context for image server");t.gl=aR,t.canvas=ME}return t};var HOe=!0;cf.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=GOe(t)}catch(i){if(e.staticMode||!HOe||oR)r=!1;else{hh.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{oR=t.glOptions.preserveDrawingBuffer=!0,e.glplot=GOe(t)}catch(n){oR=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return HOe=!1,r};cf.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=Yir(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};cf.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return Jir(e);e.traces={},e.make4thDimension();var r=e.graphDiv,i=r.layout,n=function(){var o={};return e.isCameraChanged(i)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(i)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),i[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=i[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=n();o.saveLayout(i),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){$Oe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},Zir?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=n();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};cf.render=function(){var e=this,t=e.graphDiv,r,i=e.svgContainer,n=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=n.width*a,l=n.height*o;i.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),i.setAttributeNS(null,"width",s),i.setAttributeNS(null,"height",l),rnr(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(g.valueLabel=lR.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+g.valueLabel),f.textLabel&&x.push(f.textLabel),M=x.join("
")):M=f.textLabel;var A={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:v._input,fullData:v,curveNumber:v.index,pointNumber:m};wv.appendArrayPointValue(A,v,m),r._module.eventData&&(A=v._module.eventData(A,f,v,{},m));var T={points:[A]};if(e.fullSceneLayout.hovermode){var y=[];wv.loneHover({trace:v,x:(.5+.5*d[0]/d[3])*s,y:(.5-.5*d[1]/d[3])*l,xLabel:g.xLabel,yLabel:g.yLabel,zLabel:g.zLabel,text:M,name:c.name,color:wv.castHoverOption(v,m,"bgcolor")||c.color,borderColor:wv.castHoverOption(v,m,"bordercolor"),fontFamily:wv.castHoverOption(v,m,"font.family"),fontSize:wv.castHoverOption(v,m,"font.size"),fontColor:wv.castHoverOption(v,m,"font.color"),nameLength:wv.castHoverOption(v,m,"namelength"),textAlign:wv.castHoverOption(v,m,"align"),hovertemplate:hh.castOption(v,m,"hovertemplate"),hovertemplateLabels:hh.extendFlat({},A,g),eventData:[A]},{container:i,gd:t,inOut_bbox:y}),A.bbox=y[0]}f.distance<5&&(f.buttons||$Oe)?t.emit("plotly_click",T):t.emit("plotly_hover",T),this.oldEventData=T}else wv.loneUnhover(i),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};cf.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){hh.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var SE=["xaxis","yaxis","zaxis"];function nnr(e,t,r){for(var i=e.fullSceneLayout,n=0;n<3;n++){var a=SE[n],o=a.charAt(0),s=i[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!hh.isArrayOrTypedArray(l))r[0][n]=Math.min(r[0][n],0),r[1][n]=Math.max(r[1][n],c-1);else for(var f,h=0;h<(c||l.length);h++)if(hh.isArrayOrTypedArray(l[h]))for(var p=0;pv[1][o])v[0][o]=-1,v[1][o]=1;else{var S=v[1][o]-v[0][o];v[0][o]-=S/32,v[1][o]+=S/32}if(w=[v[0][o],v[1][o]],w=inr(w,l),v[0][o]=w[0],v[1][o]=w[1],l.isReversed()){var C=v[0][o];v[0][o]=v[1][o],v[1][o]=C}}else w=l.range,v[0][o]=l.r2l(w[0]),v[1][o]=l.r2l(w[1]);v[0][o]===v[1][o]&&(v[0][o]-=1,v[1][o]+=1),m[o]=v[1][o]-v[0][o],l.range=[v[0][o],v[1][o]],l.limitRange(),i.glplot.setBounds(o,{min:l.range[0]*p[o],max:l.range[1]*p[o]})}var k,D=c.aspectmode;if(D==="cube")k=[1,1,1];else if(D==="manual"){var F=c.aspectratio;k=[F.x,F.y,F.z]}else if(D==="auto"||D==="data"){var P=[1,1,1];for(o=0;o<3;++o){l=c[SE[o]],u=l.type;var R=g[u];P[o]=Math.pow(R.acc,1/R.count)/p[o]}D==="data"||Math.max.apply(null,P)/Math.min.apply(null,P)<=4?k=P:k=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=k[0],c.aspectratio.y=f.aspectratio.y=k[1],c.aspectratio.z=f.aspectratio.z=k[2],i.glplot.setAspectratio(c.aspectratio),i.viewInitial.aspectratio||(i.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),i.viewInitial.aspectmode||(i.viewInitial.aspectmode=c.aspectmode);var L=c.domain||null,I=t._size||null;if(L&&I){var B=i.container.style;B.position="absolute",B.left=I.l+L.x[0]*I.w+"px",B.top=I.t+(1-L.y[1])*I.h+"px",B.width=I.w*(L.x[1]-L.x[0])+"px",B.height=I.h*(L.y[1]-L.y[0])+"px"}i.glplot.redraw()}};cf.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function onr(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function snr(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}cf.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),snr(e.camera)};cf.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,onr(r)),t.glplot.setAspectratio(e.aspectratio);var i=r.projection.type==="orthographic",n=t.camera._ortho;i!==n&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};cf.isCameraChanged=function(e){var t=this,r=t.getCamera(),i=hh.nestedProperty(e,t.id+".camera"),n=i.get();function a(u,c,f,h){var p=["up","center","eye"],d=["x","y","z"];return c[p[f]]&&u[p[f]][d[h]]===c[p[f]][d[h]]}var o=!1;if(n===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,n,s,l)){o=!0;break}(!n.projection||r.projection&&r.projection.type!==n.projection.type)&&(o=!0)}return o};cf.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),i=hh.nestedProperty(e,t.id+".aspectratio"),n=i.get();return n===void 0||n.x!==r.x||n.y!==r.y||n.z!==r.z};cf.saveLayout=function(e){var t=this,r=t.fullLayout,i,n,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(i=t.getCamera(),n=hh.nestedProperty(e,t.id+".camera"),a=n.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=hh.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),sR.call("_storeDirectGUIEdit",e,r._preGUI,h),u){n.set(i);var p=hh.nestedProperty(r,t.id+".camera");p.set(i)}if(c){s.set(o);var d=hh.nestedProperty(r,t.id+".aspectratio");d.set(o),t.glplot.redraw()}}return f};cf.updateFx=function(e,t){var r=this,i=r.camera;if(i)if(e==="orbit")i.mode="orbit",i.keyBindingMode="rotate";else if(e==="turntable"){i.up=[0,0,1],i.mode="turntable",i.keyBindingMode="rotate";var n=r.graphDiv,a=n._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var p=n.layout;sR.call("_storeDirectGUIEdit",p,a._preGUI,h),o.up=f,hh.nestedProperty(p,c).set(f)}}else i.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function lnr(e,t,r){for(var i=0,n=r-1;i0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}cf.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(ME),t.glplot.redraw();var r=t.glplot.gl,i=r.drawingBufferWidth,n=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*n*4);r.readPixels(0,0,i,n,r.RGBA,r.UNSIGNED_BYTE,a),lnr(a,i,n),unr(a,i,n);var o=document.createElement("canvas");o.width=i,o.height=n;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(i,n);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(ME),u};cf.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[SE[t]];lR.setConvert(r,e.fullLayout),r.setScale=hh.noop}};cf.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},lR.setConvert(e._mockAxis,r)};YOe.exports=WOe});var KOe=W((mKr,ZOe)=>{"use strict";ZOe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var KJ=W((yKr,JOe)=>{"use strict";var cnr=ti(),Qn=ac(),ZJ=an().extendFlat,fnr=hs().overrideAll;JOe.exports=fnr({visible:Qn.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:cnr.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Qn.color,categoryorder:Qn.categoryorder,categoryarray:Qn.categoryarray,title:{text:Qn.title.text,font:Qn.title.font},type:ZJ({},Qn.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Qn.autotypenumbers,autorange:Qn.autorange,autorangeoptions:{minallowed:Qn.autorangeoptions.minallowed,maxallowed:Qn.autorangeoptions.maxallowed,clipmin:Qn.autorangeoptions.clipmin,clipmax:Qn.autorangeoptions.clipmax,include:Qn.autorangeoptions.include,editType:"plot"},rangemode:Qn.rangemode,minallowed:Qn.minallowed,maxallowed:Qn.maxallowed,range:ZJ({},Qn.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Qn.minor.tickmode,nticks:Qn.nticks,tick0:Qn.tick0,dtick:Qn.dtick,tickvals:Qn.tickvals,ticktext:Qn.ticktext,ticks:Qn.ticks,mirror:Qn.mirror,ticklen:Qn.ticklen,tickwidth:Qn.tickwidth,tickcolor:Qn.tickcolor,showticklabels:Qn.showticklabels,labelalias:Qn.labelalias,tickfont:Qn.tickfont,tickangle:Qn.tickangle,tickprefix:Qn.tickprefix,showtickprefix:Qn.showtickprefix,ticksuffix:Qn.ticksuffix,showticksuffix:Qn.showticksuffix,showexponent:Qn.showexponent,exponentformat:Qn.exponentformat,minexponent:Qn.minexponent,separatethousands:Qn.separatethousands,tickformat:Qn.tickformat,tickformatstops:Qn.tickformatstops,hoverformat:Qn.hoverformat,showline:Qn.showline,linecolor:Qn.linecolor,linewidth:Qn.linewidth,showgrid:Qn.showgrid,gridcolor:ZJ({},Qn.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Qn.gridwidth,zeroline:Qn.zeroline,zerolinecolor:Qn.zerolinecolor,zerolinewidth:Qn.zerolinewidth},"plot","from-root")});var tQ=W((xKr,QOe)=>{"use strict";var JJ=KJ(),hnr=ds().attributes,QJ=an().extendFlat,dnr=tt().counterRegex;function eQ(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}QOe.exports={_arrayAttrRegexps:[dnr("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:QJ(eQ(0,0,1),{}),center:QJ(eQ(0,0,0),{}),eye:QJ(eQ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:hnr({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:JJ,yaxis:JJ,zaxis:JJ,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}});var iNe=W((bKr,rNe)=>{"use strict";var pnr=ti(),eNe=tt(),vnr=Ra(),gnr=KJ(),mnr=V$(),ynr=PM(),tNe=["xaxis","yaxis","zaxis"],xnr=13600/187;rNe.exports=function(t,r,i){var n,a;function o(u,c){return eNe.coerce(n,a,gnr,u,c)}for(var s=0;s{"use strict";var bnr=tt(),_nr=ti(),wnr=xi(),Tnr=Kb(),Anr=iNe(),nNe=tQ(),Mnr=Mc().getSubplotData,aNe="gl3d";oNe.exports=function(t,r,i){var n=r._basePlotModules.length>1;function a(o){if(!n){var s=bnr.validate(t[o],nNe[o]);if(s)return t[o]}}Tnr(t,r,i,{type:aNe,attributes:nNe,handleDefaults:Snr,fullLayout:r,font:r.font,fullData:i,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function Snr(e,t,r,i){for(var n=r("bgcolor"),a=_nr.combine(n,i.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",i.getDfltFromLayout("hovermode"))}});var I2=W(dh=>{"use strict";var Enr=hs().overrideAll,knr=yy(),Cnr=XOe(),Dnr=Mc().getSubplotData,Fnr=tt(),Lnr=(md(),Pt(gd)),O4="gl3d",rQ="scene";dh.name=O4;dh.attr=rQ;dh.idRoot=rQ;dh.idRegex=dh.attrRegex=Fnr.counterRegex("scene");dh.attributes=KOe();dh.layoutAttributes=tQ();dh.baseLayoutAttrOverrides=Enr({hoverlabel:knr.hoverlabel},"plot","nested");dh.supplyLayoutDefaults=sNe();dh.plot=function(t){for(var r=t._fullLayout,i=t._fullData,n=r._subplots[O4],a=0;a{"use strict";lNe.exports={plot:yOe(),attributes:WJ(),markerSymbols:(iR(),Pt(rR)).default,supplyDefaults:MOe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:EOe(),moduleType:"trace",name:"scatter3d",basePlotModule:I2(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var fNe=W((AKr,cNe)=>{"use strict";cNe.exports=uNe()});var EE=W((MKr,pNe)=>{"use strict";var hNe=ti(),Pnr=Fo(),iQ=Ts().axisHoverFormat,{hovertemplateAttrs:Inr,templatefallbackAttrs:Rnr}=Wa(),dNe=Ja(),nQ=an().extendFlat,znr=hs().overrideAll;function aQ(e){return{valType:"boolean",dflt:!1}}function oQ(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:aQ("x"),y:aQ("y"),z:aQ("z")},color:{valType:"color",dflt:hNe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:hNe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var sQ=pNe.exports=znr(nQ({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:Inr(),hovertemplatefallback:Rnr(),xhoverformat:iQ("x"),yhoverformat:iQ("y"),zhoverformat:iQ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},Pnr("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:oQ("x"),y:oQ("y"),z:oQ("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:nQ({},dNe.hoverinfo),showlegend:nQ({},dNe.showlegend,{dflt:!1})}),"calc","nested");sQ.x.editType=sQ.y.editType=sQ.z.editType="calc+clearAxisTypes"});var uQ=W((SKr,mNe)=>{"use strict";var Bnr=xi(),vNe=tt(),qnr=Bu(),Onr=EE(),lQ=.1;function Nnr(e,t){for(var r=[],i=32,n=0;n{"use strict";var yNe=rf();xNe.exports=function(t,r){r.surfacecolor?yNe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):yNe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var SNe=W((kKr,MNe)=>{"use strict";var Gnr=uc().gl_surface3d,N4=uc().ndarray,Hnr=uc().ndarray_linear_interpolate.d2,jnr=nP(),$nr=aP(),kE=tt().isArrayOrTypedArray,Wnr=_m().parseColorScale,_Ne=bm(),Ynr=es().extractOpts;function TNe(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var Tv=TNe.prototype;Tv.getXat=function(e,t,r,i){var n=kE(this.data.x)?kE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?n:i.d2l(n,0,r)};Tv.getYat=function(e,t,r,i){var n=kE(this.data.y)?kE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?n:i.d2l(n,0,r)};Tv.getZat=function(e,t,r,i){var n=this.data.z[t][e];return n===null&&this.data.connectgaps&&this.data._interpolatedZ&&(n=this.data._interpolatedZ[t][e]),r===void 0?n:i.d2l(n,0,r)};Tv.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,i=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),n=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[i,n],e.traceCoordinate=[this.getXat(i,n),this.getYat(i,n),this.getZat(i,n)],e.dataCoordinate=[this.getXat(i,n,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(i,n,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(i,n,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return kE(s)&&s[n]&&s[n][i]!==void 0?e.textLabel=s[n][i]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function Xnr(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var U4=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function Znr(e,t){if(e0){r=U4[i];break}return r}function Jnr(e,t){if(!(e<1||t<1)){for(var r=cQ(e),i=cQ(t),n=1,a=0;auR;)i--,i/=Knr(i),i++,i1?n:1};function ear(e,t,r){var i=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/i,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/i,e}function tar(e,t,r){return rar(e,t,ear,r),e}function rar(e,t,r,i){for(var n=[0,0],a=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[i]!==null&&this.contourEnd[i]!==null&&this.contourEnd[i]>this.contourStart[i]))for(t[i]=!0,n=this.contourStart[i];nh&&(this.minValues[u]=h),this.maxValues[u]{"use strict";ENe.exports={attributes:EE(),supplyDefaults:uQ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:bNe(),plot:SNe(),moduleType:"trace",name:"surface",basePlotModule:I2(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var DNe=W((DKr,CNe)=>{"use strict";CNe.exports=kNe()});var V4=W((FKr,LNe)=>{"use strict";var aar=Fo(),fQ=Ts().axisHoverFormat,{hovertemplateAttrs:oar,templatefallbackAttrs:sar}=Wa(),R2=EE(),FNe=Ja(),z2=an().extendFlat;LNe.exports=z2({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:oar({editType:"calc"}),hovertemplatefallback:sar({editType:"calc"}),xhoverformat:fQ("x"),yhoverformat:fQ("y"),zhoverformat:fQ("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},aar("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:R2.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:z2({},R2.contours.x.show,{}),color:R2.contours.x.color,width:R2.contours.x.width,editType:"calc"},lightposition:{x:z2({},R2.lightposition.x,{dflt:1e5}),y:z2({},R2.lightposition.y,{dflt:1e5}),z:z2({},R2.lightposition.z,{dflt:0}),editType:"calc"},lighting:z2({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},R2.lighting),hoverinfo:z2({},FNe.hoverinfo,{editType:"calc"}),showlegend:z2({},FNe.showlegend,{dflt:!1})})});var fR=W((LKr,INe)=>{"use strict";var lar=Fo(),cR=Ts().axisHoverFormat,{hovertemplateAttrs:uar,templatefallbackAttrs:car}=Wa(),CE=V4(),PNe=Ja(),hQ=an().extendFlat,far=hs().overrideAll;function dQ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function pQ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var G4=INe.exports=far(hQ({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:dQ("x"),y:dQ("y"),z:dQ("z")},caps:{x:pQ("x"),y:pQ("y"),z:pQ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:uar(),hovertemplatefallback:car(),xhoverformat:cR("x"),yhoverformat:cR("y"),zhoverformat:cR("z"),valuehoverformat:cR("value",1),showlegend:hQ({},PNe.showlegend,{dflt:!1})},lar("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:CE.opacity,lightposition:CE.lightposition,lighting:CE.lighting,flatshading:CE.flatshading,contour:CE.contour,hoverinfo:hQ({},PNe.hoverinfo)}),"calc","nested");G4.flatshading.dflt=!0;G4.lighting.facenormalsepsilon.dflt=0;G4.x.editType=G4.y.editType=G4.z.editType=G4.value.editType="calc+clearAxisTypes"});var vQ=W((PKr,zNe)=>{"use strict";var har=tt(),dar=xi(),par=fR(),gar=Bu();function mar(e,t,r,i){function n(a,o){return har.coerce(e,t,par,a,o)}RNe(e,t,r,i,n)}function RNe(e,t,r,i,n){var a=n("isomin"),o=n("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=n("x"),l=n("y"),u=n("z"),c=n("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=dar.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(v){n(v+"hoverformat");var m="caps."+v,g=n(m+".show");g&&n(m+".fill");var w="slices."+v,_=n(w+".show");_&&(n(w+".fill"),n(w+".locations"))});var h=n("spaceframe.show");h&&n("spaceframe.fill");var p=n("surface.show");p&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var d=n("contour.show");d&&(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(v){n(v)}),gar(e,t,i,n,{prefix:"",cLetter:"c"}),t._length=null}zNe.exports={supplyDefaults:mar,supplyIsoDefaults:RNe}});var hR=W((IKr,qNe)=>{"use strict";var mQ=tt(),yar=rf();function xar(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=W1(t.u,t._len),t._v=W1(t.v,t._len),t._w=W1(t.w,t._len),t._x=W1(t.x,t._len),t._y=W1(t.y,t._len),t._z=W1(t.z,t._len);var r=BNe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var i=0,n,a,o;t.starts&&(n=W1(t.starts.x||[]),a=W1(t.starts.y||[]),o=W1(t.starts.z||[]),i=Math.min(n.length,a.length,o.length)),t._startsX=n||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(_=t[n-1],M=r[n-1],A=i[n-1]),a=0;a_?"-":"+")+"x"),d=d.replace("y",(b>M?"-":"+")+"y"),d=d.replace("z",(x>A?"-":"+")+"z");var S=function(){n=0,T=[],y=[],E=[]};(!n||n{"use strict";var bar=rf(),_ar=hR().processGrid,dR=hR().filter;ONe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=dR(r.x,r._len),r._y=dR(r.y,r._len),r._z=dR(r.z,r._len),r._value=dR(r.value,r._len);var i=_ar(r);r._gridFill=i.fill,r._Xs=i.Xs,r._Ys=i.Ys,r._Zs=i.Zs,r._len=i.len;for(var n=1/0,a=-1/0,o=0;o{"use strict";NNe.exports=function(t,r,i,n){n=n||t.length;for(var a=new Array(n),o=0;o{"use strict";var war=uc().gl_mesh3d,Tar=_m().parseColorScale,Aar=tt().isArrayOrTypedArray,Mar=bm(),Sar=es().extractOpts,UNe=H4(),DE=function(e,t){for(var r=t.length-1;r>0;r--){var i=Math.min(t[r],t[r-1]),n=Math.max(t[r],t[r-1]);if(n>i&&i-1}function O(Te,Ce){return Te===null?Ce:Te}function $(Te,Ce,ze){S();var we=[Ce],me=[ze];if(R>=1)we=[Ce],me=[ze];else if(R>0){var Le=I(Ce,ze);we=Le.xyzv,me=Le.abc}for(var Ne=0;Ne-1?ze[rt]:E(mt,dt,St);bt>-1?Je[rt]=bt:Je[rt]=k(mt,dt,St,O(Te,Ke))}D(Je[0],Je[1],Je[2])}}function X(Te,Ce,ze){var we=function(me,Le,Ne){$(Te,[Ce[me],Ce[Le],Ce[Ne]],[ze[me],ze[Le],ze[Ne]])};we(0,1,2),we(2,3,0)}function K(Te,Ce,ze){var we=function(me,Le,Ne){$(Te,[Ce[me],Ce[Le],Ce[Ne]],[ze[me],ze[Le],ze[Ne]])};we(0,1,2),we(3,0,1),we(2,3,0),we(1,2,3)}function G(Te,Ce,ze,we){var me=Te[3];mewe&&(me=we);for(var Le=(Te[3]-me)/(Te[3]-Ce[3]+1e-9),Ne=[],Je=0;Je<4;Je++)Ne[Je]=(1-Le)*Te[Je]+Le*Ce[Je];return Ne}function q(Te,Ce,ze){return Te>=Ce&&Te<=ze}function J(Te){var Ce=.001*(M-b);return Te>=b-Ce&&Te<=M+Ce}function N(Te){for(var Ce=[],ze=0;ze<4;ze++){var we=Te[ze];Ce.push([e._x[we],e._y[we],e._z[we],e._value[we]])}return Ce}var V=3;function Y(Te,Ce,ze,we,me,Le){Le||(Le=1),ze=[-1,-1,-1];var Ne=!1,Je=[q(Ce[0][3],we,me),q(Ce[1][3],we,me),q(Ce[2][3],we,me)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var rt=function(dt,St,Ke){return J(St[0][3])&&J(St[1][3])&&J(St[2][3])?($(dt,St,Ke),!0):LeJe?[w,Le]:[Le,_];be(Ce,rt[0],rt[1])}}var mt=[[Math.min(b,_),Math.max(b,_)],[Math.min(w,M),Math.max(w,M)]];["x","y","z"].forEach(function(dt){for(var St=[],Ke=0;Ke0&&($e.push(st.id),dt==="x"?Ie.push([st.distRatio,0,0]):dt==="y"?Ie.push([0,st.distRatio,0]):Ie.push([0,0,st.distRatio]))}else dt==="x"?je=_e(1,p-1):dt==="y"?je=_e(1,d-1):je=_e(1,v-1);$e.length>0&&(dt==="x"?St[bt]=fe(Te,$e,pt,Oe,Ie,St[bt]):dt==="y"?St[bt]=ee(Te,$e,pt,Oe,Ie,St[bt]):St[bt]=ae(Te,$e,pt,Oe,Ie,St[bt]),bt++),je.length>0&&(dt==="x"?St[bt]=Ee(Te,je,pt,Oe,St[bt]):dt==="y"?St[bt]=xe(Te,je,pt,Oe,St[bt]):St[bt]=ce(Te,je,pt,Oe,St[bt]),bt++)}var _t=e.caps[dt];_t.show&&_t.fill&&(L(_t.fill),dt==="x"?St[bt]=Ee(Te,[0,p-1],pt,Oe,St[bt]):dt==="y"?St[bt]=xe(Te,[0,d-1],pt,Oe,St[bt]):St[bt]=ce(Te,[0,v-1],pt,Oe,St[bt]),bt++)}}),s===0&&C(),e._meshX=x,e._meshY=A,e._meshZ=T,e._meshIntensity=y,e._Xs=c,e._Ys=f,e._Zs=h}return pe(),e}function kar(e,t){var r=e.glplot.gl,i=war({gl:r}),n=new VNe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}HNe.exports={findNearestOnAxis:DE,generateIsoMeshes:GNe,createIsosurfaceTrace:kar}});var $Ne=W((qKr,jNe)=>{"use strict";jNe.exports={attributes:fR(),supplyDefaults:vQ().supplyDefaults,calc:yQ(),colorbar:{min:"cmin",max:"cmax"},plot:pR().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:I2(),categories:["gl3d","showLegend"],meta:{}}});var YNe=W((OKr,WNe)=>{"use strict";WNe.exports=$Ne()});var _Q=W((NKr,ZNe)=>{"use strict";var Car=Fo(),Ol=fR(),Dar=EE(),XNe=Ja(),bQ=an().extendFlat,Far=hs().overrideAll,vR=ZNe.exports=Far(bQ({x:Ol.x,y:Ol.y,z:Ol.z,value:Ol.value,isomin:Ol.isomin,isomax:Ol.isomax,surface:Ol.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Ol.slices,caps:Ol.caps,text:Ol.text,hovertext:Ol.hovertext,xhoverformat:Ol.xhoverformat,yhoverformat:Ol.yhoverformat,zhoverformat:Ol.zhoverformat,valuehoverformat:Ol.valuehoverformat,hovertemplate:Ol.hovertemplate,hovertemplatefallback:Ol.hovertemplatefallback},Car("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Ol.colorbar,opacity:Ol.opacity,opacityscale:Dar.opacityscale,lightposition:Ol.lightposition,lighting:Ol.lighting,flatshading:Ol.flatshading,contour:Ol.contour,hoverinfo:bQ({},XNe.hoverinfo),showlegend:bQ({},XNe.showlegend,{dflt:!1})}),"calc","nested");vR.x.editType=vR.y.editType=vR.z.editType=vR.value.editType="calc+clearAxisTypes"});var JNe=W((UKr,KNe)=>{"use strict";var Lar=tt(),Par=_Q(),Iar=vQ().supplyIsoDefaults,Rar=uQ().opacityscaleDefaults;KNe.exports=function(t,r,i,n){function a(o,s){return Lar.coerce(t,r,Par,o,s)}Iar(t,r,i,n,a),Rar(t,r,n,a)}});var rUe=W((VKr,tUe)=>{"use strict";var zar=uc().gl_mesh3d,Bar=_m().parseColorScale,qar=tt().isArrayOrTypedArray,Oar=bm(),Nar=es().extractOpts,QNe=H4(),wQ=pR().findNearestOnAxis,Uar=pR().generateIsoMeshes;function eUe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var TQ=eUe.prototype;TQ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],i=this.data._meshY[t],n=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=wQ(r,this.data._Xs).id,l=wQ(i,this.data._Ys).id,u=wQ(n,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return qar(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};TQ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=Uar(e);function i(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var n=QNe(i(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),i(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),i(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=QNe(e._meshI,e._meshJ,e._meshK),o={positions:n,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:Oar(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=Nar(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=Bar(e),this.mesh.update(o)};TQ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Var(e,t){var r=e.glplot.gl,i=zar({gl:r}),n=new eUe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}tUe.exports=Var});var nUe=W((GKr,iUe)=>{"use strict";iUe.exports={attributes:_Q(),supplyDefaults:JNe(),calc:yQ(),colorbar:{min:"cmin",max:"cmax"},plot:rUe(),moduleType:"trace",name:"volume",basePlotModule:I2(),categories:["gl3d","showLegend"],meta:{}}});var oUe=W((HKr,aUe)=>{"use strict";aUe.exports=nUe()});var uUe=W((jKr,lUe)=>{"use strict";var Gar=xi(),sUe=tt(),Har=Bu(),jar=V4();lUe.exports=function(t,r,i,n){function a(c,f){return sUe.coerce(t,r,jar,c,f)}function o(c){var f=c.map(function(h){var p=a(h);return p&&sUe.isArrayOrTypedArray(p)?p:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=Gar.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],n),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),Har(t,r,n,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",i)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var fUe=W(($Kr,cUe)=>{"use strict";var $ar=rf();cUe.exports=function(t,r){r.intensity&&$ar(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var gUe=W((WKr,vUe)=>{"use strict";var War=uc().gl_mesh3d,Yar=uc().delaunay_triangulate,Xar=uc().alpha_shape,Zar=uc().convex_hull,Kar=_m().parseColorScale,Jar=tt().isArrayOrTypedArray,EQ=bm(),Qar=es().extractOpts,hUe=H4();function pUe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var kQ=pUe.prototype;kQ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return Jar(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function dUe(e){for(var t=[],r=e.length,i=0;i=t-.5)return!1;return!0}kQ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var i=e.x.length,n=hUe(AQ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),AQ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),AQ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!SQ(e.i,i)||!SQ(e.j,i)||!SQ(e.k,i))return;a=hUe(MQ(e.i),MQ(e.j),MQ(e.k))}else e.alphahull===0?a=Zar(n):e.alphahull>0?a=Xar(e.alphahull,n):a=eor(e.delaunayaxis,n);var o={positions:n,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:EQ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=Qar(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=Kar(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=dUe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=dUe(e.facecolor)):(this.color=e.color,o.meshColor=EQ(e.color));this.mesh.update(o)};kQ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function tor(e,t){var r=e.glplot.gl,i=War({gl:r}),n=new pUe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}vUe.exports=tor});var yUe=W((YKr,mUe)=>{"use strict";mUe.exports={attributes:V4(),supplyDefaults:uUe(),calc:fUe(),colorbar:{min:"cmin",max:"cmax"},plot:gUe(),moduleType:"trace",name:"mesh3d",basePlotModule:I2(),categories:["gl3d","showLegend"],meta:{}}});var bUe=W((XKr,xUe)=>{"use strict";xUe.exports=yUe()});var DQ=W((ZKr,wUe)=>{"use strict";var ror=Fo(),j4=Ts().axisHoverFormat,{hovertemplateAttrs:ior,templatefallbackAttrs:nor}=Wa(),aor=V4(),_Ue=Ja(),CQ=an().extendFlat,gR={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:ior({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:nor({editType:"calc"}),uhoverformat:j4("u",1),vhoverformat:j4("v",1),whoverformat:j4("w",1),xhoverformat:j4("x"),yhoverformat:j4("y"),zhoverformat:j4("z"),showlegend:CQ({},_Ue.showlegend,{dflt:!1})};CQ(gR,ror("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var oor=["opacity","lightposition","lighting"];oor.forEach(function(e){gR[e]=aor[e]});gR.hoverinfo=CQ({},_Ue.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});wUe.exports=gR});var AUe=W((KKr,TUe)=>{"use strict";var sor=tt(),lor=Bu(),uor=DQ();TUe.exports=function(t,r,i,n){function a(p,d){return sor.coerce(t,r,uor,p,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a("sizemode");a("sizeref",h==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),lor(t,r,n,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var SUe=W((JKr,MUe)=>{"use strict";var cor=rf();MUe.exports=function(t,r){for(var i=r.u,n=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,i.length,n.length,a.length),s=-1/0,l=1/0,u=0;u{"use strict";var hor=uc().gl_cone3d,dor=uc().gl_cone3d.createConeMesh,por=tt().simpleMap,vor=_m().parseColorScale,gor=es().extractOpts,mor=tt().isArrayOrTypedArray,EUe=H4();function kUe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var FQ=kUe.prototype;FQ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],i=this.data.y[t],n=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,i,n,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return mor(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var yor={xaxis:0,yaxis:1,zaxis:2},xor={tip:1,tail:0,cm:.25,center:.5},bor={tip:1,tail:1,cm:.75,center:.5};function CUe(e,t){var r=e.fullSceneLayout,i=e.dataScale,n={};function a(c,f){var h=r[f],p=i[yor[f]];return por(c,function(d){return h.d2l(d)*p})}n.vectors=EUe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),n.positions=EUe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=gor(t);n.colormap=vor(t),n.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],n.coneOffset=xor[t.anchor];var s=t.sizemode;s==="scaled"?n.coneSize=t.sizeref||.5:s==="absolute"?n.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(n.coneSize=t.sizeref),n.coneSizemode=s;var l=hor(n),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=bor[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}FQ.update=function(e){this.data=e;var t=CUe(this.scene,e);this.mesh.update(t)};FQ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function _or(e,t){var r=e.glplot.gl,i=CUe(e,t),n=dor(r,i),a=new kUe(e,t.uid);return a.mesh=n,a.data=t,n._trace=a,e.glplot.add(n),a}DUe.exports=_or});var PUe=W((eJr,LUe)=>{"use strict";LUe.exports={moduleType:"trace",name:"cone",basePlotModule:I2(),categories:["gl3d","showLegend"],attributes:DQ(),supplyDefaults:AUe(),colorbar:{min:"cmin",max:"cmax"},calc:SUe(),plot:FUe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var RUe=W((tJr,IUe)=>{"use strict";IUe.exports=PUe()});var PQ=W((rJr,BUe)=>{"use strict";var wor=Fo(),$4=Ts().axisHoverFormat,{hovertemplateAttrs:Tor,templatefallbackAttrs:Aor}=Wa(),Mor=V4(),zUe=Ja(),LQ=an().extendFlat,mR={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:Tor({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:Aor({editType:"calc"}),uhoverformat:$4("u",1),vhoverformat:$4("v",1),whoverformat:$4("w",1),xhoverformat:$4("x"),yhoverformat:$4("y"),zhoverformat:$4("z"),showlegend:LQ({},zUe.showlegend,{dflt:!1})};LQ(mR,wor("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var Sor=["opacity","lightposition","lighting"];Sor.forEach(function(e){mR[e]=Mor[e]});mR.hoverinfo=LQ({},zUe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});BUe.exports=mR});var OUe=W((iJr,qUe)=>{"use strict";var Eor=tt(),kor=Bu(),Cor=PQ();qUe.exports=function(t,r,i,n){function a(h,p){return Eor.coerce(t,r,Cor,h,p)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),kor(t,r,n,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var WUe=W((nJr,$Ue)=>{"use strict";var VUe=uc().gl_streamtube3d,Dor=VUe.createTubeMesh,For=tt(),Lor=_m().parseColorScale,Por=es().extractOpts,NUe=H4(),GUe={xaxis:0,yaxis:1,zaxis:2};function HUe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var RQ=HUe.prototype;RQ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function i(o,s){var l=t[s],u=r[GUe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var n=e.data.position,a=e.data.velocity;return e.traceCoordinate=[i(n[0],"xaxis"),i(n[1],"yaxis"),i(n[2],"zaxis"),i(a[0],"xaxis"),i(a[1],"yaxis"),i(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function UUe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function IQ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function jUe(e,t){var r=e.fullSceneLayout,i=e.dataScale,n=t._len,a={};function o(C,k){var D=r[k],F=i[GUe[k]];return For.simpleMap(C,function(P){return D.d2l(P)*F})}if(a.vectors=NUe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),n),!n)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=NUe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=UUe(s),p=UUe(u),d=new Array(h.length*p.length),v=0,m=0;m{"use strict";YUe.exports={moduleType:"trace",name:"streamtube",basePlotModule:I2(),categories:["gl3d","showLegend"],attributes:PQ(),supplyDefaults:OUe(),colorbar:{min:"cmin",max:"cmax"},calc:hR().calc,plot:WUe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var KUe=W((oJr,ZUe)=>{"use strict";ZUe.exports=XUe()});var W4=W((sJr,rVe)=>{"use strict";var{hovertemplateAttrs:Ror,texttemplateAttrs:zor,templatefallbackAttrs:JUe}=Wa(),Bor=C1(),Y1=Ws(),qor=Ja(),QUe=Fo(),Oor=zu().dash,z_=an().extendFlat,Nor=hs().overrideAll,Jd=Y1.marker,eVe=Y1.line,tVe=Jd.line;rVe.exports=Nor({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:z_({},Y1.mode,{dflt:"markers"}),text:z_({},Y1.text,{}),texttemplate:zor({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:JUe({editType:"plot"}),hovertext:z_({},Y1.hovertext,{}),textfont:Y1.textfont,textposition:Y1.textposition,line:{color:eVe.color,width:eVe.width,dash:Oor},connectgaps:Y1.connectgaps,marker:z_({symbol:Jd.symbol,opacity:Jd.opacity,angle:Jd.angle,angleref:z_({},Jd.angleref,{values:["previous","up","north"]}),standoff:Jd.standoff,size:Jd.size,sizeref:Jd.sizeref,sizemin:Jd.sizemin,sizemode:Jd.sizemode,colorbar:Jd.colorbar,line:z_({width:tVe.width,dash:tVe.dash},QUe("marker.line")),gradient:Jd.gradient},QUe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:Bor(),selected:Y1.selected,unselected:Y1.unselected,hoverinfo:z_({},qor.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:Ror(),hovertemplatefallback:JUe()},"calc","nested")});var nVe=W((lJr,iVe)=>{"use strict";var zQ=tt(),BQ=Wo(),Uor=Dd(),Vor=tv(),Gor=rv(),Hor=F1(),jor=W4();iVe.exports=function(t,r,i,n){function a(p,d){return zQ.coerce(t,r,jor,p,d)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||zQ.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),BQ.hasMarkers(r)&&Uor(t,r,i,n,a,{gradient:!0}),BQ.hasLines(r)&&(Vor(t,r,i,n,a),a("connectgaps")),BQ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),Gor(t,r,n,a)),a("fill"),r.fill!=="none"&&Hor(t,r,i,a),zQ.coerceSelectionMarkerOpacity(r,a)}});var sVe=W((uJr,oVe)=>{"use strict";var aVe=Yi();oVe.exports=function(t,r,i){var n={},a=i[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return n.lonLabel=aVe.tickText(o,o.c2l(s[0]),!0).text,n.latLabel=aVe.tickText(o,o.c2l(s[1]),!0).text,n}});var OQ=W((cJr,fVe)=>{"use strict";var qQ=hn(),lVe=(ra(),Pt(ia)).BADNUM,$or=Fd(),Wor=L1(),Yor=C0(),Xor=tt().isArrayOrTypedArray,uVe=tt()._;function cVe(e){return e&&typeof e=="string"}fVe.exports=function(t,r){var i=Xor(r.locations),n=i?r.locations.length:r._length,a=new Array(n),o;r.geojson?o=function(h){return cVe(h)||qQ(h)}:o=cVe;for(var s=0;sKor,clipPad:()=>rsr,fillLayers:()=>lsr,fitboundsIncompatible:()=>esr,landColor:()=>nsr,lataxisSpan:()=>Qor,layerNameToAdjective:()=>hsr,layers:()=>csr,layersForChoropleth:()=>fsr,lineLayers:()=>usr,locationmodeToLayer:()=>osr,lonaxisSpan:()=>Jor,precision:()=>isr,projNames:()=>Zor,scopeDefaults:()=>tsr,sphereSVG:()=>ssr,waterColor:()=>asr});var Zor,Kor,Jor,Qor,esr,tsr,rsr,isr,nsr,asr,osr,ssr,lsr,usr,csr,fsr,hsr,LE=Ci(()=>{"use strict";Zor={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},Kor=["lonaxis","lataxis"],Jor={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Qor={"conic conformal":150,stereographic:179.5,"*":180},esr=new Set(["albers usa","craig","peirce quincuncial","satellite"]),tsr={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}},rsr=.001,isr=.1,nsr="#F0DC82",asr="#3399FF",osr={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},ssr={type:"Sphere"},lsr={ocean:1,land:1,lakes:1},usr={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},csr=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],fsr=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","lakes","rivers","frontplot"],hsr={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var NQ=W((yR,hVe)=>{(function(e,t){typeof yR=="object"&&typeof hVe!="undefined"?t(yR):(e=e||self,t(e.topojson=e.topojson||{}))})(yR,function(e){"use strict";function t(_){return _}function r(_){if(_==null)return t;var b,M,x=_.scale[0],A=_.scale[1],T=_.translate[0],y=_.translate[1];return function(E,S){S||(b=M=0);var C=2,k=E.length,D=new Array(k);for(D[0]=(b+=E[0])*x+T,D[1]=(M+=E[1])*A+y;CT&&(T=C[0]),C[1]y&&(y=C[1])}function S(C){switch(C.type){case"GeometryCollection":C.geometries.forEach(S);break;case"Point":E(C.coordinates);break;case"MultiPoint":C.coordinates.forEach(E);break}}_.arcs.forEach(function(C){for(var k=-1,D=C.length,F;++kT&&(T=F[0]),F[1]y&&(y=F[1])});for(M in _.objects)S(_.objects[M]);return[x,A,T,y]}function n(_,b){for(var M,x=_.length,A=x-b;A<--x;)M=_[A],_[A++]=_[x],_[x]=M}function a(_,b){return typeof b=="string"&&(b=_.objects[b]),b.type==="GeometryCollection"?{type:"FeatureCollection",features:b.geometries.map(function(M){return o(_,M)})}:o(_,b)}function o(_,b){var M=b.id,x=b.bbox,A=b.properties==null?{}:b.properties,T=s(_,b);return M==null&&x==null?{type:"Feature",properties:A,geometry:T}:x==null?{type:"Feature",id:M,properties:A,geometry:T}:{type:"Feature",id:M,bbox:x,properties:A,geometry:T}}function s(_,b){var M=r(_.transform),x=_.arcs;function A(k,D){D.length&&D.pop();for(var F=x[k<0?~k:k],P=0,R=F.length;P1)x=f(_,b,M);else for(A=0,x=new Array(T=_.arcs.length);A1)for(var D=1,F=E(C[0]),P,R;DF&&(R=C[0],C[0]=C[D],C[D]=R,F=P);return C}).filter(function(S){return S.length>0})}}function v(_,b){for(var M=0,x=_.length;M>>1;_[A]=2))throw new Error("n must be \u22652");S=_.bbox||i(_);var M=S[0],x=S[1],A=S[2],T=S[3],y;b={scale:[A-M?(A-M)/(y-1):1,T-x?(T-x)/(y-1):1],translate:[M,x]}}else S=_.bbox;var E=g(b),S,C,k=_.objects,D={};function F(L){return E(L)}function P(L){var I;switch(L.type){case"GeometryCollection":I={type:"GeometryCollection",geometries:L.geometries.map(P)};break;case"Point":I={type:"Point",coordinates:F(L.coordinates)};break;case"MultiPoint":I={type:"MultiPoint",coordinates:L.coordinates.map(F)};break;default:return L}return L.id!=null&&(I.id=L.id),L.bbox!=null&&(I.bbox=L.bbox),L.properties!=null&&(I.properties=L.properties),I}function R(L){var I=0,B=1,O=L.length,$,X=new Array(O);for(X[0]=E(L[0],0);++I{"use strict";var UQ=dVe.exports={},dsr=(LE(),Pt(FE)).locationmodeToLayer,psr=NQ().feature;UQ.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};UQ.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};UQ.getTopojsonFeatures=function(e,t){var r=dsr[e.locationmode],i=t.objects[r];return psr(t,i).features}});var IE=W(PE=>{"use strict";var vsr=(ra(),Pt(ia)).BADNUM;PE.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,i=[],n=[],a=0;a0&&(i.push(n),n=[])}return n.length>0&&i.push(n),i};PE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};PE.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var GQ=Object.defineProperty,gsr=Object.getOwnPropertyDescriptor,msr=Object.getOwnPropertyNames,ysr=Object.prototype.hasOwnProperty,xsr=(e,t)=>{for(var r in t)GQ(e,r,{get:t[r],enumerable:!0})},bsr=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of msr(t))!ysr.call(e,n)&&n!==r&&GQ(e,n,{get:()=>t[n],enumerable:!(i=gsr(t,n))||i.enumerable});return e},_sr=e=>bsr(GQ({},"__esModule",{value:!0}),e),pVe={};xsr(pVe,{COUNTRIES:()=>vVe,byAlpha2:()=>Msr,byAlpha3:()=>Asr,byM49:()=>Ssr,createLookup:()=>gVe,lookup:()=>wsr,lookupAlpha3:()=>Tsr,sanitize:()=>VQ});mVe.exports=_sr(pVe);var vVe=[{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","east pakistan","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","drc","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","macedonia former yugoslav republic of","macedonia fyr","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:"Naoero",aliases:["\u{1F1F3}\u{1F1F7}","nauru","pleasant island","republic of naoero","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 VQ(e){return e.normalize("NFD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").toLowerCase().replace(/[\u064B-\u065F]/g,"").replace(/['\u2018\u2019\u02BB\u02BC\u02BD\u02C8\u2032`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-\u2013\u2014]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function gVe(e){let t=new Map,r=new Map,i=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&i.set(s.m49,s);let n=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=VQ(l),c=n.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);n.set(u,s.iso3)}function a(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=i.get(String(parseInt(l,10)).padStart(3,"0"));if(c)return c}if(/^[A-Za-z]{2}$/.test(l)){let c=r.get(l.toUpperCase());if(c)return c}if(/^[A-Za-z]{3}$/.test(l)){let c=t.get(l.toUpperCase());if(c)return c}let u=n.get(VQ(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=a(s))==null?void 0:l.iso3}return{lookup:a,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:i}}var RE=gVe(vVe),wsr=RE.lookup,Tsr=RE.lookupAlpha3,Asr=RE.byAlpha3,Msr=RE.byAlpha2,Ssr=RE.byM49});var TR=W(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var Nl=63710088e-1,jQ={centimeters:Nl*100,centimetres:Nl*100,cm:Nl*100,degrees:360/(2*Math.PI),deg:360/(2*Math.PI),feet:Nl*3.28084,ft:Nl*3.28084,inches:Nl*39.37,in:Nl*39.37,kilometers:Nl/1e3,kilometres:Nl/1e3,km:Nl/1e3,meters:Nl,metres:Nl,m:Nl,miles:Nl/1609.344,mi:Nl/1609.344,millimeters:Nl*1e3,millimetres:Nl*1e3,mm:Nl*1e3,nauticalmiles:Nl/1852,nmi:Nl/1852,radians:1,rad:1,yards:Nl*1.0936,yd:Nl*1.0936},HQ={acres:247105e-9,ac:247105e-9,centimeters:1e4,centimetres:1e4,cm:1e4,feet:10.763910417,ft:10.763910417,hectares:1e-4,ha:1e-4,inches:1550.003100006,in:1550.003100006,kilometers:1e-6,kilometres:1e-6,km:1e-6,meters:1,metres:1,m:1,miles:386e-9,mi:386e-9,nauticalmiles:29155334959812285e-23,nmi:29155334959812285e-23,millimeters:1e6,millimetres:1e6,mm:1e6,yards:1.195990046,yd:1.195990046};function B2(e,t,r={}){let i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}function Esr(e,t,r={}){switch(e){case"Point":return $Q(t).geometry;case"LineString":return YQ(t).geometry;case"Polygon":return WQ(t).geometry;case"MultiPoint":return bVe(t).geometry;case"MultiLineString":return xVe(t).geometry;case"MultiPolygon":return _Ve(t).geometry;default:throw new Error(e+" is invalid")}}function $Q(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!_R(e[0])||!_R(e[1]))throw new Error("coordinates must contain numbers");return B2({type:"Point",coordinates:e},t,r)}function ksr(e,t,r={}){return wR(e.map(i=>$Q(i,t)),r)}function WQ(e,t,r={}){for(let n of e){if(n.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(n[n.length-1].length!==n[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;aWQ(i,t)),r)}function YQ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return B2({type:"LineString",coordinates:e},t,r)}function Dsr(e,t,r={}){return wR(e.map(i=>YQ(i,t)),r)}function wR(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function xVe(e,t,r={}){return B2({type:"MultiLineString",coordinates:e},t,r)}function bVe(e,t,r={}){return B2({type:"MultiPoint",coordinates:e},t,r)}function _Ve(e,t,r={}){return B2({type:"MultiPolygon",coordinates:e},t,r)}function Fsr(e,t,r={}){return B2({type:"GeometryCollection",geometries:e},t,r)}function Lsr(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function wVe(e,t="kilometers"){let r=jQ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function XQ(e,t="kilometers"){let r=jQ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function Psr(e,t){return TVe(XQ(e,t))}function Isr(e){let t=e%360;return t<0&&(t+=360),t}function Rsr(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function TVe(e){return e%(2*Math.PI)*180/Math.PI}function zsr(e){return e%360*Math.PI/180}function Bsr(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return wVe(XQ(e,t),r)}function qsr(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=HQ[t];if(!i)throw new Error("invalid original units");let n=HQ[r];if(!n)throw new Error("invalid final units");return e/i*n}function _R(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Osr(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function bR(e){delete e.bbox,e.type==="Feature"?e.geometry&&bR(e.geometry):e.type==="FeatureCollection"?e.features.forEach(bR):e.type==="GeometryCollection"&&e.geometries.forEach(bR)}function Nsr(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!_R(t))throw new Error("bbox must only contain numbers")})}function Usr(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}Po.areaFactors=HQ;Po.azimuthToBearing=Rsr;Po.bearingToAzimuth=Isr;Po.convertArea=qsr;Po.convertLength=Bsr;Po.degreesToRadians=zsr;Po.earthRadius=Nl;Po.factors=jQ;Po.feature=B2;Po.featureCollection=wR;Po.geometry=Esr;Po.geometryCollection=Fsr;Po.isNumber=_R;Po.isObject=Osr;Po.lengthToDegrees=Psr;Po.lengthToRadians=XQ;Po.lineString=YQ;Po.lineStrings=Dsr;Po.multiLineString=xVe;Po.multiPoint=bVe;Po.multiPolygon=_Ve;Po.point=$Q;Po.points=ksr;Po.polygon=WQ;Po.polygons=Csr;Po.radiansToDegrees=TVe;Po.radiansToLength=wVe;Po.removeBbox=bR;Po.round=Lsr;Po.validateBBox=Nsr;Po.validateId=Usr});var MR=W(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var Bf=TR();function zE(e,t,r){if(e!==null)for(var i,n,a,o,s,l,u,c=0,f=0,h,p=e.type,d=p==="FeatureCollection",v=p==="Feature",m=d?e.features.length:1,g=0;gl||d>u||v>c){s=f,l=i,u=d,c=v,a=0;return}var m=Bf.lineString.call(void 0,[s,f],r.properties);if(t(m,i,n,v,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function Ysr(e,t,r){var i=r,n=!1;return SVe(e,function(a,o,s,l,u){n===!1&&r===void 0?i=a:i=t(i,a,o,s,l,u),n=!0}),i}function EVe(e,t){if(!e)throw new Error("geojson is required");AR(e,function(r,i,n){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(SR,"__esModule",{value:!0});var kVe=TR(),Jsr=MR();function FVe(e){return Jsr.geomReduce.call(void 0,e,(t,r)=>t+Qsr(r),0)}function Qsr(e){let t=0,r;switch(e.type){case"Polygon":return CVe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(DVe(e[0]));for(let r=1;r=t?(i+2)%t:i+2],s=n[0]*KQ,l=a[1]*KQ,u=o[0]*KQ;r+=(u-s)*Math.sin(l),i++}return r*elr}var tlr=FVe;SR.area=FVe;SR.default=tlr});var IVe=W(ER=>{"use strict";Object.defineProperty(ER,"__esModule",{value:!0});var rlr=TR(),ilr=MR();function PVe(e,t={}){let r=0,i=0,n=0;return ilr.coordEach.call(void 0,e,function(a){r+=a[0],i+=a[1],n++},!0),rlr.point.call(void 0,[r/n,i/n],t.properties)}var nlr=PVe;ER.centroid=PVe;ER.default=nlr});var zVe=W((kR,RVe)=>{(function(e,t){t(typeof kR=="object"&&typeof RVe!="undefined"?kR:e.d3=e.d3||{})})(kR,(function(e){"use strict";function t(N,V){return NV?1:N>=V?0:NaN}function r(N){return N.length===1&&(N=i(N)),{left:function(V,Y,H,j){for(H==null&&(H=0),j==null&&(j=V.length);H>>1;N(V[Q],Y)<0?H=Q+1:j=Q}return H},right:function(V,Y,H,j){for(H==null&&(H=0),j==null&&(j=V.length);H>>1;N(V[Q],Y)>0?j=Q:H=Q+1}return H}}}function i(N){return function(V,Y){return t(N(V),Y)}}var n=r(t),a=n.right,o=n.left;function s(N,V){V==null&&(V=l);for(var Y=0,H=N.length-1,j=N[0],Q=new Array(H<0?0:H);YN?1:V>=N?0:NaN}function f(N){return N===null?NaN:+N}function h(N,V){var Y=N.length,H=0,j=-1,Q=0,te,ue,ge=0;if(V==null)for(;++j1)return ge/(H-1)}function p(N,V){var Y=h(N,V);return Y&&Math.sqrt(Y)}function d(N,V){var Y=N.length,H=-1,j,Q,te;if(V==null){for(;++H=j)for(Q=te=j;++Hj&&(Q=j),te=j)for(Q=te=j;++Hj&&(Q=j),te0)return[N];if((H=V0)for(N=Math.ceil(N/ue),V=Math.floor(V/ue),te=new Array(Q=Math.ceil(V-N+1));++j=0?(Q>=M?10:Q>=x?5:Q>=A?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(Q>=M?10:Q>=x?5:Q>=A?2:1)}function E(N,V,Y){var H=Math.abs(V-N)/Math.max(0,Y),j=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/j;return Q>=M?j*=10:Q>=x?j*=5:Q>=A&&(j*=2),Vce;)oe.pop(),--Se;var be=new Array(Se+1),fe;for(Q=0;Q<=Se;++Q)fe=be[Q]=[],fe.x0=Q>0?oe[Q-1]:xe,fe.x1=Q=1)return+Y(N[H-1],H-1,N);var H,j=(H-1)*V,Q=Math.floor(j),te=+Y(N[Q],Q,N),ue=+Y(N[Q+1],Q+1,N);return te+(ue-te)*(j-Q)}}function D(N,V,Y){return N=g.call(N,f).sort(t),Math.ceil((Y-V)/(2*(k(N,.75)-k(N,.25))*Math.pow(N.length,-1/3)))}function F(N,V,Y){return Math.ceil((Y-V)/(3.5*p(N)*Math.pow(N.length,-1/3)))}function P(N,V){var Y=N.length,H=-1,j,Q;if(V==null){for(;++H=j)for(Q=j;++HQ&&(Q=j)}else for(;++H=j)for(Q=j;++HQ&&(Q=j);return Q}function R(N,V){var Y=N.length,H=Y,j=-1,Q,te=0;if(V==null)for(;++j=0;)for(te=N[V],Y=te.length;--Y>=0;)Q[--j]=te[Y];return Q}function B(N,V){var Y=N.length,H=-1,j,Q;if(V==null){for(;++H=j)for(Q=j;++Hj&&(Q=j)}else for(;++H=j)for(Q=j;++Hj&&(Q=j);return Q}function O(N,V){for(var Y=V.length,H=new Array(Y);Y--;)H[Y]=N[V[Y]];return H}function $(N,V){if(Y=N.length){var Y,H=0,j=0,Q,te=N[j];for(V==null&&(V=t);++H{(function(e,t){typeof CR=="object"&&typeof BVe!="undefined"?t(CR,zVe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(CR,(function(e,t){"use strict";function r(){return new i}function i(){this.reset()}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(Ae){a(n,Ae,this.t),a(this,n.s,this.s),this.s?this.t+=n.t:this.s=n.t},valueOf:function(){return this.s}};var n=new i;function a(Ae,qe,et){var Ye=Ae.s=qe+et,Tt=Ye-qe,jt=Ye-Tt;Ae.t=qe-jt+(et-Tt)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,p=l/180,d=Math.abs,v=Math.atan,m=Math.atan2,g=Math.cos,w=Math.ceil,_=Math.exp,b=Math.log,M=Math.pow,x=Math.sin,A=Math.sign||function(Ae){return Ae>0?1:Ae<0?-1:0},T=Math.sqrt,y=Math.tan;function E(Ae){return Ae>1?0:Ae<-1?l:Math.acos(Ae)}function S(Ae){return Ae>1?u:Ae<-1?-u:Math.asin(Ae)}function C(Ae){return(Ae=x(Ae/2))*Ae}function k(){}function D(Ae,qe){Ae&&P.hasOwnProperty(Ae.type)&&P[Ae.type](Ae,qe)}var F={Feature:function(Ae,qe){D(Ae.geometry,qe)},FeatureCollection:function(Ae,qe){for(var et=Ae.features,Ye=-1,Tt=et.length;++Ye=0?1:-1,Tt=Ye*et,jt=g(qe),Qt=x(qe),cr=q*Qt,yr=G*jt+cr*g(Tt),Rr=cr*Ye*x(Tt);B.add(m(Rr,yr)),K=Ae,G=jt,q=Qt}function j(Ae){return O.reset(),I(Ae,J),O*2}function Q(Ae){return[m(Ae[1],Ae[0]),S(Ae[2])]}function te(Ae){var qe=Ae[0],et=Ae[1],Ye=g(et);return[Ye*g(qe),Ye*x(qe),x(et)]}function ue(Ae,qe){return Ae[0]*qe[0]+Ae[1]*qe[1]+Ae[2]*qe[2]}function ge(Ae,qe){return[Ae[1]*qe[2]-Ae[2]*qe[1],Ae[2]*qe[0]-Ae[0]*qe[2],Ae[0]*qe[1]-Ae[1]*qe[0]]}function Ee(Ae,qe){Ae[0]+=qe[0],Ae[1]+=qe[1],Ae[2]+=qe[2]}function xe(Ae,qe){return[Ae[0]*qe,Ae[1]*qe,Ae[2]*qe]}function ce(Ae){var qe=T(Ae[0]*Ae[0]+Ae[1]*Ae[1]+Ae[2]*Ae[2]);Ae[0]/=qe,Ae[1]/=qe,Ae[2]/=qe}var oe,Se,be,fe,ee,ae,_e,re,pe=r(),Te,Ce,ze={point:we,lineStart:Le,lineEnd:Ne,polygonStart:function(){ze.point=Je,ze.lineStart=rt,ze.lineEnd=mt,pe.reset(),J.polygonStart()},polygonEnd:function(){J.polygonEnd(),ze.point=we,ze.lineStart=Le,ze.lineEnd=Ne,B<0?(oe=-(be=180),Se=-(fe=90)):pe>o?fe=90:pe<-o&&(Se=-90),Ce[0]=oe,Ce[1]=be},sphere:function(){oe=-(be=180),Se=-(fe=90)}};function we(Ae,qe){Te.push(Ce=[oe=Ae,be=Ae]),qefe&&(fe=qe)}function me(Ae,qe){var et=te([Ae*p,qe*p]);if(re){var Ye=ge(re,et),Tt=[Ye[1],-Ye[0],0],jt=ge(Tt,Ye);ce(jt),jt=Q(jt);var Qt=Ae-ee,cr=Qt>0?1:-1,yr=jt[0]*h*cr,Rr,nr=d(Qt)>180;nr^(cr*eefe&&(fe=Rr)):(yr=(yr+360)%360-180,nr^(cr*eefe&&(fe=qe))),nr?Aedt(oe,be)&&(be=Ae):dt(Ae,be)>dt(oe,be)&&(oe=Ae):be>=oe?(Aebe&&(be=Ae)):Ae>ee?dt(oe,Ae)>dt(oe,be)&&(be=Ae):dt(Ae,be)>dt(oe,be)&&(oe=Ae)}else Te.push(Ce=[oe=Ae,be=Ae]);qefe&&(fe=qe),re=et,ee=Ae}function Le(){ze.point=me}function Ne(){Ce[0]=oe,Ce[1]=be,ze.point=we,re=null}function Je(Ae,qe){if(re){var et=Ae-ee;pe.add(d(et)>180?et+(et>0?360:-360):et)}else ae=Ae,_e=qe;J.point(Ae,qe),me(Ae,qe)}function rt(){J.lineStart()}function mt(){Je(ae,_e),J.lineEnd(),d(pe)>o&&(oe=-(be=180)),Ce[0]=oe,Ce[1]=be,re=null}function dt(Ae,qe){return(qe-=Ae)<0?qe+360:qe}function St(Ae,qe){return Ae[0]-qe[0]}function Ke(Ae,qe){return Ae[0]<=Ae[1]?Ae[0]<=qe&&qe<=Ae[1]:qedt(Ye[0],Ye[1])&&(Ye[1]=Tt[1]),dt(Tt[0],Ye[1])>dt(Ye[0],Ye[1])&&(Ye[0]=Tt[0])):jt.push(Ye=Tt);for(Qt=-1/0,et=jt.length-1,qe=0,Ye=jt[et];qe<=et;Ye=Tt,++qe)Tt=jt[qe],(cr=dt(Ye[1],Tt[0]))>Qt&&(Qt=cr,oe=Tt[0],be=Ye[1])}return Te=Ce=null,oe===1/0||Se===1/0?[[NaN,NaN],[NaN,NaN]]:[[oe,Se],[be,fe]]}var pt,Oe,Ue,je,$e,Ie,Ve,st,_t,Wt,Ht,fr,lr,Ot,Jt,Cr,Ge={sphere:k,point:Qe,lineStart:gt,lineEnd:hr,polygonStart:function(){Ge.lineStart=Ut,Ge.lineEnd=Lr},polygonEnd:function(){Ge.lineStart=gt,Ge.lineEnd=hr}};function Qe(Ae,qe){Ae*=p,qe*=p;var et=g(qe);nt(et*g(Ae),et*x(Ae),x(qe))}function nt(Ae,qe,et){++pt,Ue+=(Ae-Ue)/pt,je+=(qe-je)/pt,$e+=(et-$e)/pt}function gt(){Ge.point=ht}function ht(Ae,qe){Ae*=p,qe*=p;var et=g(qe);Ot=et*g(Ae),Jt=et*x(Ae),Cr=x(qe),Ge.point=Ft,nt(Ot,Jt,Cr)}function Ft(Ae,qe){Ae*=p,qe*=p;var et=g(qe),Ye=et*g(Ae),Tt=et*x(Ae),jt=x(qe),Qt=m(T((Qt=Jt*jt-Cr*Tt)*Qt+(Qt=Cr*Ye-Ot*jt)*Qt+(Qt=Ot*Tt-Jt*Ye)*Qt),Ot*Ye+Jt*Tt+Cr*jt);Oe+=Qt,Ie+=Qt*(Ot+(Ot=Ye)),Ve+=Qt*(Jt+(Jt=Tt)),st+=Qt*(Cr+(Cr=jt)),nt(Ot,Jt,Cr)}function hr(){Ge.point=Qe}function Ut(){Ge.point=jr}function Lr(){ii(fr,lr),Ge.point=Qe}function jr(Ae,qe){fr=Ae,lr=qe,Ae*=p,qe*=p,Ge.point=ii;var et=g(qe);Ot=et*g(Ae),Jt=et*x(Ae),Cr=x(qe),nt(Ot,Jt,Cr)}function ii(Ae,qe){Ae*=p,qe*=p;var et=g(qe),Ye=et*g(Ae),Tt=et*x(Ae),jt=x(qe),Qt=Jt*jt-Cr*Tt,cr=Cr*Ye-Ot*jt,yr=Ot*Tt-Jt*Ye,Rr=T(Qt*Qt+cr*cr+yr*yr),nr=S(Rr),dr=Rr&&-nr/Rr;_t+=dr*Qt,Wt+=dr*cr,Ht+=dr*yr,Oe+=nr,Ie+=nr*(Ot+(Ot=Ye)),Ve+=nr*(Jt+(Jt=Tt)),st+=nr*(Cr+(Cr=jt)),nt(Ot,Jt,Cr)}function Fr(Ae){pt=Oe=Ue=je=$e=Ie=Ve=st=_t=Wt=Ht=0,I(Ae,Ge);var qe=_t,et=Wt,Ye=Ht,Tt=qe*qe+et*et+Ye*Ye;return Ttl?Ae+Math.round(-Ae/f)*f:Ae,qe]}ln.invert=ln;function la(Ae,qe,et){return(Ae%=f)?qe||et?Xi(pn(Ae),zn(qe,et)):pn(Ae):qe||et?zn(qe,et):ln}function mo(Ae){return function(qe,et){return qe+=Ae,[qe>l?qe-f:qe<-l?qe+f:qe,et]}}function pn(Ae){var qe=mo(Ae);return qe.invert=mo(-Ae),qe}function zn(Ae,qe){var et=g(Ae),Ye=x(Ae),Tt=g(qe),jt=x(qe);function Qt(cr,yr){var Rr=g(yr),nr=g(cr)*Rr,dr=x(cr)*Rr,vr=x(yr),Pr=vr*et+nr*Ye;return[m(dr*Tt-Pr*jt,nr*et-vr*Ye),S(Pr*Tt+dr*jt)]}return Qt.invert=function(cr,yr){var Rr=g(yr),nr=g(cr)*Rr,dr=x(cr)*Rr,vr=x(yr),Pr=vr*Tt-dr*jt;return[m(dr*Tt+vr*jt,nr*et+Pr*Ye),S(Pr*et-nr*Ye)]},Qt}function gn(Ae){Ae=la(Ae[0]*p,Ae[1]*p,Ae.length>2?Ae[2]*p:0);function qe(et){return et=Ae(et[0]*p,et[1]*p),et[0]*=h,et[1]*=h,et}return qe.invert=function(et){return et=Ae.invert(et[0]*p,et[1]*p),et[0]*=h,et[1]*=h,et},qe}function ns(Ae,qe,et,Ye,Tt,jt){if(et){var Qt=g(qe),cr=x(qe),yr=Ye*et;Tt==null?(Tt=qe+Ye*f,jt=qe-yr/2):(Tt=ua(Qt,Tt),jt=ua(Qt,jt),(Ye>0?Ttjt)&&(Tt+=Ye*f));for(var Rr,nr=Tt;Ye>0?nr>jt:nr1&&Ae.push(Ae.pop().concat(Ae.shift()))},result:function(){var et=Ae;return Ae=[],qe=null,et}}}function ba(Ae,qe){return d(Ae[0]-qe[0])=0;--cr)Tt.point((dr=nr[cr])[0],dr[1]);else Ye(vr.x,vr.p.x,-1,Tt);vr=vr.p}vr=vr.o,nr=vr.z,Pr=!Pr}while(!vr.v);Tt.lineEnd()}}}function Ma(Ae){if(qe=Ae.length){for(var qe,et=0,Ye=Ae[0],Tt;++et=0?1:-1,Ia=Ka*wa,_o=Ia>l,ca=Oi*cn;if(el.add(m(ca*Ka*x(Ia),Di*Dn+ca*g(Ia))),Qt+=_o?wa+Ka*f:wa,_o^Pr>=et^Zr>=et){var vl=ge(te(vr),te(en));ce(vl);var ls=ge(jt,vl);ce(ls);var yo=(_o^wa>=0?-1:1)*S(ls[2]);(Ye>yo||Ye===yo&&(vl[0]||vl[1]))&&(cr+=_o^wa>=0?1:-1)}}return(Qt<-o||Qt0){for(yr||(Tt.polygonStart(),yr=!0),Tt.lineStart(),Dn=0;Dn1&&si&2&&cn.push(cn.pop().concat(cn.shift())),nr.push(cn.filter(Fe))}}return vr}}function Fe(Ae){return Ae.length>1}function ot(Ae,qe){return((Ae=Ae.x)[0]<0?Ae[1]-u-o:u-Ae[1])-((qe=qe.x)[0]<0?qe[1]-u-o:u-qe[1])}var lt=dl(function(){return!0},kt,zt,[-l,-u]);function kt(Ae){var qe=NaN,et=NaN,Ye=NaN,Tt;return{lineStart:function(){Ae.lineStart(),Tt=1},point:function(jt,Qt){var cr=jt>0?l:-l,yr=d(jt-qe);d(yr-l)0?u:-u),Ae.point(Ye,et),Ae.lineEnd(),Ae.lineStart(),Ae.point(cr,et),Ae.point(jt,et),Tt=0):Ye!==cr&&yr>=l&&(d(qe-Ye)o?v((x(qe)*(jt=g(Ye))*x(et)-x(Ye)*(Tt=g(qe))*x(Ae))/(Tt*jt*Qt)):(qe+Ye)/2}function zt(Ae,qe,et,Ye){var Tt;if(Ae==null)Tt=et*u,Ye.point(-l,Tt),Ye.point(0,Tt),Ye.point(l,Tt),Ye.point(l,0),Ye.point(l,-Tt),Ye.point(0,-Tt),Ye.point(-l,-Tt),Ye.point(-l,0),Ye.point(-l,Tt);else if(d(Ae[0]-qe[0])>o){var jt=Ae[0]0,Tt=d(qe)>o;function jt(nr,dr,vr,Pr){ns(Pr,Ae,et,vr,nr,dr)}function Qt(nr,dr){return g(nr)*g(dr)>qe}function cr(nr){var dr,vr,Pr,$r,Oi;return{lineStart:function(){$r=Pr=!1,Oi=1},point:function(Di,ji){var en=[Di,ji],Zr,si=Qt(Di,ji),cn=Ye?si?0:Rr(Di,ji):si?Rr(Di+(Di<0?l:-l),ji):0;if(!dr&&($r=Pr=si)&&nr.lineStart(),si!==Pr&&(Zr=yr(dr,en),(!Zr||ba(dr,Zr)||ba(en,Zr))&&(en[2]=1)),si!==Pr)Oi=0,si?(nr.lineStart(),Zr=yr(en,dr),nr.point(Zr[0],Zr[1])):(Zr=yr(dr,en),nr.point(Zr[0],Zr[1],2),nr.lineEnd()),dr=Zr;else if(Tt&&dr&&Ye^si){var Dn;!(cn&vr)&&(Dn=yr(en,dr,!0))&&(Oi=0,Ye?(nr.lineStart(),nr.point(Dn[0][0],Dn[0][1]),nr.point(Dn[1][0],Dn[1][1]),nr.lineEnd()):(nr.point(Dn[1][0],Dn[1][1]),nr.lineEnd(),nr.lineStart(),nr.point(Dn[0][0],Dn[0][1],3)))}si&&(!dr||!ba(dr,en))&&nr.point(en[0],en[1]),dr=en,Pr=si,vr=cn},lineEnd:function(){Pr&&nr.lineEnd(),dr=null},clean:function(){return Oi|($r&&Pr)<<1}}}function yr(nr,dr,vr){var Pr=te(nr),$r=te(dr),Oi=[1,0,0],Di=ge(Pr,$r),ji=ue(Di,Di),en=Di[0],Zr=ji-en*en;if(!Zr)return!vr&&nr;var si=qe*ji/Zr,cn=-qe*en/Zr,Dn=ge(Oi,Di),wa=xe(Oi,si),Ka=xe(Di,cn);Ee(wa,Ka);var Ia=Dn,_o=ue(wa,Ia),ca=ue(Ia,Ia),vl=_o*_o-ca*(ue(wa,wa)-1);if(!(vl<0)){var ls=T(vl),yo=xe(Ia,(-_o-ls)/ca);if(Ee(yo,wa),yo=Q(yo),!vr)return yo;var pi=nr[0],Da=dr[0],Fs=nr[1],Sl=dr[1],Du;Da0^yo[1]<(d(yo[0]-pi)l^(pi<=yo[0]&&yo[0]<=Da)){var Qu=xe(Ia,(-_o+ls)/ca);return Ee(Qu,wa),[yo,Q(Qu)]}}}function Rr(nr,dr){var vr=Ye?Ae:l-Ae,Pr=0;return nr<-vr?Pr|=1:nr>vr&&(Pr|=2),dr<-vr?Pr|=4:dr>vr&&(Pr|=8),Pr}return dl(Qt,cr,jt,Ye?[0,-Ae]:[-l,Ae-l])}function Zt(Ae,qe,et,Ye,Tt,jt){var Qt=Ae[0],cr=Ae[1],yr=qe[0],Rr=qe[1],nr=0,dr=1,vr=yr-Qt,Pr=Rr-cr,$r;if($r=et-Qt,!(!vr&&$r>0)){if($r/=vr,vr<0){if($r0){if($r>dr)return;$r>nr&&(nr=$r)}if($r=Tt-Qt,!(!vr&&$r<0)){if($r/=vr,vr<0){if($r>dr)return;$r>nr&&(nr=$r)}else if(vr>0){if($r0)){if($r/=Pr,Pr<0){if($r0){if($r>dr)return;$r>nr&&(nr=$r)}if($r=jt-cr,!(!Pr&&$r<0)){if($r/=Pr,Pr<0){if($r>dr)return;$r>nr&&(nr=$r)}else if(Pr>0){if($r0&&(Ae[0]=Qt+nr*vr,Ae[1]=cr+nr*Pr),dr<1&&(qe[0]=Qt+dr*vr,qe[1]=cr+dr*Pr),!0}}}}}var wr=1e9,Kr=-wr;function ni(Ae,qe,et,Ye){function Tt(Rr,nr){return Ae<=Rr&&Rr<=et&&qe<=nr&&nr<=Ye}function jt(Rr,nr,dr,vr){var Pr=0,$r=0;if(Rr==null||(Pr=Qt(Rr,dr))!==($r=Qt(nr,dr))||yr(Rr,nr)<0^dr>0)do vr.point(Pr===0||Pr===3?Ae:et,Pr>1?Ye:qe);while((Pr=(Pr+dr+4)%4)!==$r);else vr.point(nr[0],nr[1])}function Qt(Rr,nr){return d(Rr[0]-Ae)0?0:3:d(Rr[0]-et)0?2:1:d(Rr[1]-qe)0?1:0:nr>0?3:2}function cr(Rr,nr){return yr(Rr.x,nr.x)}function yr(Rr,nr){var dr=Qt(Rr,1),vr=Qt(nr,1);return dr!==vr?dr-vr:dr===0?nr[1]-Rr[1]:dr===1?Rr[0]-nr[0]:dr===2?Rr[1]-nr[1]:nr[0]-Rr[0]}return function(Rr){var nr=Rr,dr=ro(),vr,Pr,$r,Oi,Di,ji,en,Zr,si,cn,Dn,wa={point:Ka,lineStart:vl,lineEnd:ls,polygonStart:_o,polygonEnd:ca};function Ka(pi,Da){Tt(pi,Da)&&nr.point(pi,Da)}function Ia(){for(var pi=0,Da=0,Fs=Pr.length;DaYe&&(Dh-Jf)*(Ye-Qu)>(Fh-Qu)*(Ae-Jf)&&++pi:Fh<=Ye&&(Dh-Jf)*(Ye-Qu)<(Fh-Qu)*(Ae-Jf)&&--pi;return pi}function _o(){nr=dr,vr=[],Pr=[],Dn=!0}function ca(){var pi=Ia(),Da=Dn&&pi,Fs=(vr=t.merge(vr)).length;(Da||Fs)&&(Rr.polygonStart(),Da&&(Rr.lineStart(),jt(null,null,1,Rr),Rr.lineEnd()),Fs&&Us(vr,cr,pi,jt,Rr),Rr.polygonEnd()),nr=Rr,vr=Pr=$r=null}function vl(){wa.point=yo,Pr&&Pr.push($r=[]),cn=!0,si=!1,en=Zr=NaN}function ls(){vr&&(yo(Oi,Di),ji&&si&&dr.rejoin(),vr.push(dr.result())),wa.point=Ka,si&&nr.lineEnd()}function yo(pi,Da){var Fs=Tt(pi,Da);if(Pr&&$r.push([pi,Da]),cn)Oi=pi,Di=Da,ji=Fs,cn=!1,Fs&&(nr.lineStart(),nr.point(pi,Da));else if(Fs&&si)nr.point(pi,Da);else{var Sl=[en=Math.max(Kr,Math.min(wr,en)),Zr=Math.max(Kr,Math.min(wr,Zr))],Du=[pi=Math.max(Kr,Math.min(wr,pi)),Da=Math.max(Kr,Math.min(wr,Da))];Zt(Sl,Du,Ae,qe,et,Ye)?(si||(nr.lineStart(),nr.point(Sl[0],Sl[1])),nr.point(Du[0],Du[1]),Fs||nr.lineEnd(),Dn=!1):Fs&&(nr.lineStart(),nr.point(pi,Da),Dn=!1)}en=pi,Zr=Da,si=Fs}return wa}}function Si(){var Ae=0,qe=0,et=960,Ye=500,Tt,jt,Qt;return Qt={stream:function(cr){return Tt&&jt===cr?Tt:Tt=ni(Ae,qe,et,Ye)(jt=cr)},extent:function(cr){return arguments.length?(Ae=+cr[0][0],qe=+cr[0][1],et=+cr[1][0],Ye=+cr[1][1],Tt=jt=null,Qt):[[Ae,qe],[et,Ye]]}}}var un=r(),$n,wn,ma,Zn={sphere:k,point:k,lineStart:io,lineEnd:k,polygonStart:k,polygonEnd:k};function io(){Zn.point=ko,Zn.lineEnd=fo}function fo(){Zn.point=Zn.lineEnd=k}function ko(Ae,qe){Ae*=p,qe*=p,$n=Ae,wn=x(qe),ma=g(qe),Zn.point=Oo}function Oo(Ae,qe){Ae*=p,qe*=p;var et=x(qe),Ye=g(qe),Tt=d(Ae-$n),jt=g(Tt),Qt=x(Tt),cr=Ye*Qt,yr=ma*et-wn*Ye*jt,Rr=wn*et+ma*Ye*jt;un.add(m(T(cr*cr+yr*yr),Rr)),$n=Ae,wn=et,ma=Ye}function ms(Ae){return un.reset(),I(Ae,Zn),+un}var os=[null,null],Co={type:"LineString",coordinates:os};function ss(Ae,qe){return os[0]=Ae,os[1]=qe,ms(Co)}var No={Feature:function(Ae,qe){return ho(Ae.geometry,qe)},FeatureCollection:function(Ae,qe){for(var et=Ae.features,Ye=-1,Tt=et.length;++Ye0&&(Tt=ss(Ae[jt],Ae[jt-1]),Tt>0&&et<=Tt&&Ye<=Tt&&(et+Ye-Tt)*(1-Math.pow((et-Ye)/Tt,2))o}).map(vr)).concat(t.range(w(jt/Rr)*Rr,Tt,Rr).filter(function(Zr){return d(Zr%dr)>o}).map(Pr))}return ji.lines=function(){return en().map(function(Zr){return{type:"LineString",coordinates:Zr}})},ji.outline=function(){return{type:"Polygon",coordinates:[$r(Ye).concat(Oi(Qt).slice(1),$r(et).reverse().slice(1),Oi(cr).reverse().slice(1))]}},ji.extent=function(Zr){return arguments.length?ji.extentMajor(Zr).extentMinor(Zr):ji.extentMinor()},ji.extentMajor=function(Zr){return arguments.length?(Ye=+Zr[0][0],et=+Zr[1][0],cr=+Zr[0][1],Qt=+Zr[1][1],Ye>et&&(Zr=Ye,Ye=et,et=Zr),cr>Qt&&(Zr=cr,cr=Qt,Qt=Zr),ji.precision(Di)):[[Ye,cr],[et,Qt]]},ji.extentMinor=function(Zr){return arguments.length?(qe=+Zr[0][0],Ae=+Zr[1][0],jt=+Zr[0][1],Tt=+Zr[1][1],qe>Ae&&(Zr=qe,qe=Ae,Ae=Zr),jt>Tt&&(Zr=jt,jt=Tt,Tt=Zr),ji.precision(Di)):[[qe,jt],[Ae,Tt]]},ji.step=function(Zr){return arguments.length?ji.stepMajor(Zr).stepMinor(Zr):ji.stepMinor()},ji.stepMajor=function(Zr){return arguments.length?(nr=+Zr[0],dr=+Zr[1],ji):[nr,dr]},ji.stepMinor=function(Zr){return arguments.length?(yr=+Zr[0],Rr=+Zr[1],ji):[yr,Rr]},ji.precision=function(Zr){return arguments.length?(Di=+Zr,vr=il(jt,Tt,90),Pr=hu(qe,Ae,Di),$r=il(cr,Qt,90),Oi=hu(Ye,et,Di),ji):Di},ji.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Su(){return Mu()()}function yc(Ae,qe){var et=Ae[0]*p,Ye=Ae[1]*p,Tt=qe[0]*p,jt=qe[1]*p,Qt=g(Ye),cr=x(Ye),yr=g(jt),Rr=x(jt),nr=Qt*g(et),dr=Qt*x(et),vr=yr*g(Tt),Pr=yr*x(Tt),$r=2*S(T(C(jt-Ye)+Qt*yr*C(Tt-et))),Oi=x($r),Di=$r?function(ji){var en=x(ji*=$r)/Oi,Zr=x($r-ji)/Oi,si=Zr*nr+en*vr,cn=Zr*dr+en*Pr,Dn=Zr*cr+en*Rr;return[m(cn,si)*h,m(Dn,T(si*si+cn*cn))*h]}:function(){return[et*h,Ye*h]};return Di.distance=$r,Di}function $l(Ae){return Ae}var Za=r(),Eu=r(),Xu,Cs,du,_h,bo={point:k,lineStart:k,lineEnd:k,polygonStart:function(){bo.lineStart=pu,bo.lineEnd=Uv},polygonEnd:function(){bo.lineStart=bo.lineEnd=bo.point=k,Za.add(d(Eu)),Eu.reset()},result:function(){var Ae=Za/2;return Za.reset(),Ae}};function pu(){bo.point=Jo}function Jo(Ae,qe){bo.point=vu,Xu=du=Ae,Cs=_h=qe}function vu(Ae,qe){Eu.add(_h*Ae-du*qe),du=Ae,_h=qe}function Uv(){vu(Xu,Cs)}var $c=1/0,c0=$c,Wf=-$c,wh=Wf,Yf={point:f0,lineStart:k,lineEnd:k,polygonStart:k,polygonEnd:k,result:function(){var Ae=[[$c,c0],[Wf,wh]];return Wf=wh=-(c0=$c=1/0),Ae}};function f0(Ae,qe){Ae<$c&&($c=Ae),Ae>Wf&&(Wf=Ae),qewh&&(wh=qe)}var Vv=0,Th=0,xp=0,h0=0,td=0,rd=0,Gv=0,Hv=0,Wc=0,bp,Ah,Zu,Ds,Ho={point:ku,lineStart:id,lineEnd:jv,polygonStart:function(){Ho.lineStart=bg,Ho.lineEnd=ny},polygonEnd:function(){Ho.point=ku,Ho.lineStart=id,Ho.lineEnd=jv},result:function(){var Ae=Wc?[Gv/Wc,Hv/Wc]:rd?[h0/rd,td/rd]:xp?[Vv/xp,Th/xp]:[NaN,NaN];return Vv=Th=xp=h0=td=rd=Gv=Hv=Wc=0,Ae}};function ku(Ae,qe){Vv+=Ae,Th+=qe,++xp}function id(){Ho.point=Mh}function Mh(Ae,qe){Ho.point=d0,ku(Zu=Ae,Ds=qe)}function d0(Ae,qe){var et=Ae-Zu,Ye=qe-Ds,Tt=T(et*et+Ye*Ye);h0+=Tt*(Zu+Ae)/2,td+=Tt*(Ds+qe)/2,rd+=Tt,ku(Zu=Ae,Ds=qe)}function jv(){Ho.point=ku}function bg(){Ho.point=Bx}function ny(){Sh(bp,Ah)}function Bx(Ae,qe){Ho.point=Sh,ku(bp=Zu=Ae,Ah=Ds=qe)}function Sh(Ae,qe){var et=Ae-Zu,Ye=qe-Ds,Tt=T(et*et+Ye*Ye);h0+=Tt*(Zu+Ae)/2,td+=Tt*(Ds+qe)/2,rd+=Tt,Tt=Ds*Ae-Zu*qe,Gv+=Tt*(Zu+Ae),Hv+=Tt*(Ds+qe),Wc+=Tt*3,ku(Zu=Ae,Ds=qe)}function Vs(Ae){this._context=Ae}Vs.prototype={_radius:4.5,pointRadius:function(Ae){return this._radius=Ae,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(Ae,qe){switch(this._point){case 0:{this._context.moveTo(Ae,qe),this._point=1;break}case 1:{this._context.lineTo(Ae,qe);break}default:{this._context.moveTo(Ae+this._radius,qe),this._context.arc(Ae,qe,this._radius,0,f);break}}},result:k};var $v=r(),Wv,Eh,_g,nd,_p,mf={point:k,lineStart:function(){mf.point=Yv},lineEnd:function(){Wv&&wp(Eh,_g),mf.point=k},polygonStart:function(){Wv=!0},polygonEnd:function(){Wv=null},result:function(){var Ae=+$v;return $v.reset(),Ae}};function Yv(Ae,qe){mf.point=wp,Eh=nd=Ae,_g=_p=qe}function wp(Ae,qe){nd-=Ae,_p-=qe,$v.add(T(nd*nd+_p*_p)),nd=Ae,_p=qe}function ad(){this._string=[]}ad.prototype={_radius:4.5,_circle:wg(4.5),pointRadius:function(Ae){return(Ae=+Ae)!==this._radius&&(this._radius=Ae,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(Ae,qe){switch(this._point){case 0:{this._string.push("M",Ae,",",qe),this._point=1;break}case 1:{this._string.push("L",Ae,",",qe);break}default:{this._circle==null&&(this._circle=wg(this._radius)),this._string.push("M",Ae,",",qe,this._circle);break}}},result:function(){if(this._string.length){var Ae=this._string.join("");return this._string=[],Ae}else return null}};function wg(Ae){return"m0,"+Ae+"a"+Ae+","+Ae+" 0 1,1 0,"+-2*Ae+"a"+Ae+","+Ae+" 0 1,1 0,"+2*Ae+"z"}function Tg(Ae,qe){var et=4.5,Ye,Tt;function jt(Qt){return Qt&&(typeof et=="function"&&Tt.pointRadius(+et.apply(this,arguments)),I(Qt,Ye(Tt))),Tt.result()}return jt.area=function(Qt){return I(Qt,Ye(bo)),bo.result()},jt.measure=function(Qt){return I(Qt,Ye(mf)),mf.result()},jt.bounds=function(Qt){return I(Qt,Ye(Yf)),Yf.result()},jt.centroid=function(Qt){return I(Qt,Ye(Ho)),Ho.result()},jt.projection=function(Qt){return arguments.length?(Ye=Qt==null?(Ae=null,$l):(Ae=Qt).stream,jt):Ae},jt.context=function(Qt){return arguments.length?(Tt=Qt==null?(qe=null,new ad):new Vs(qe=Qt),typeof et!="function"&&Tt.pointRadius(et),jt):qe},jt.pointRadius=function(Qt){return arguments.length?(et=typeof Qt=="function"?Qt:(Tt.pointRadius(+Qt),+Qt),jt):et},jt.projection(Ae).context(qe)}function ay(Ae){return{stream:Xf(Ae)}}function Xf(Ae){return function(qe){var et=new Xv;for(var Ye in Ae)et[Ye]=Ae[Ye];return et.stream=qe,et}}function Xv(){}Xv.prototype={constructor:Xv,point:function(Ae,qe){this.stream.point(Ae,qe)},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 Zf(Ae,qe,et){var Ye=Ae.clipExtent&&Ae.clipExtent();return Ae.scale(150).translate([0,0]),Ye!=null&&Ae.clipExtent(null),I(et,Ae.stream(Yf)),qe(Yf.result()),Ye!=null&&Ae.clipExtent(Ye),Ae}function Tp(Ae,qe,et){return Zf(Ae,function(Ye){var Tt=qe[1][0]-qe[0][0],jt=qe[1][1]-qe[0][1],Qt=Math.min(Tt/(Ye[1][0]-Ye[0][0]),jt/(Ye[1][1]-Ye[0][1])),cr=+qe[0][0]+(Tt-Qt*(Ye[1][0]+Ye[0][0]))/2,yr=+qe[0][1]+(jt-Qt*(Ye[1][1]+Ye[0][1]))/2;Ae.scale(150*Qt).translate([cr,yr])},et)}function xc(Ae,qe,et){return Tp(Ae,[[0,0],qe],et)}function od(Ae,qe,et){return Zf(Ae,function(Ye){var Tt=+qe,jt=Tt/(Ye[1][0]-Ye[0][0]),Qt=(Tt-jt*(Ye[1][0]+Ye[0][0]))/2,cr=-jt*Ye[0][1];Ae.scale(150*jt).translate([Qt,cr])},et)}function Kf(Ae,qe,et){return Zf(Ae,function(Ye){var Tt=+qe,jt=Tt/(Ye[1][1]-Ye[0][1]),Qt=-jt*Ye[0][0],cr=(Tt-jt*(Ye[1][1]+Ye[0][1]))/2;Ae.scale(150*jt).translate([Qt,cr])},et)}var Ag=16,Zv=g(30*p);function Mg(Ae,qe){return+qe?Ap(Ae,qe):Kv(Ae)}function Kv(Ae){return Xf({point:function(qe,et){qe=Ae(qe,et),this.stream.point(qe[0],qe[1])}})}function Ap(Ae,qe){function et(Ye,Tt,jt,Qt,cr,yr,Rr,nr,dr,vr,Pr,$r,Oi,Di){var ji=Rr-Ye,en=nr-Tt,Zr=ji*ji+en*en;if(Zr>4*qe&&Oi--){var si=Qt+vr,cn=cr+Pr,Dn=yr+$r,wa=T(si*si+cn*cn+Dn*Dn),Ka=S(Dn/=wa),Ia=d(d(Dn)-1)qe||d((ji*ls+en*yo)/Zr-.5)>.3||Qt*vr+cr*Pr+yr*$r2?pi[2]%360*p:0,ls()):[cr*h,yr*h,Rr*h]},ca.angle=function(pi){return arguments.length?(dr=pi%360*p,ls()):dr*h},ca.reflectX=function(pi){return arguments.length?(vr=pi?-1:1,ls()):vr<0},ca.reflectY=function(pi){return arguments.length?(Pr=pi?-1:1,ls()):Pr<0},ca.precision=function(pi){return arguments.length?(Dn=Mg(wa,cn=pi*pi),yo()):T(cn)},ca.fitExtent=function(pi,Da){return Tp(ca,pi,Da)},ca.fitSize=function(pi,Da){return xc(ca,pi,Da)},ca.fitWidth=function(pi,Da){return od(ca,pi,Da)},ca.fitHeight=function(pi,Da){return Kf(ca,pi,Da)};function ls(){var pi=Ku(et,0,0,vr,Pr,dr).apply(null,qe(jt,Qt)),Da=(dr?Ku:oy)(et,Ye-pi[0],Tt-pi[1],vr,Pr,dr);return nr=la(cr,yr,Rr),wa=Xi(qe,Da),Ka=Xi(nr,wa),Dn=Mg(wa,cn),yo()}function yo(){return Ia=_o=null,ca}return function(){return qe=Ae.apply(this,arguments),ca.invert=qe.invert&&vl,ls()}}function Cu(Ae){var qe=0,et=l/3,Ye=Sg(Ae),Tt=Ye(qe,et);return Tt.parallels=function(jt){return arguments.length?Ye(qe=jt[0]*p,et=jt[1]*p):[qe*h,et*h]},Tt}function Mp(Ae){var qe=g(Ae);function et(Ye,Tt){return[Ye*qe,x(Tt)/qe]}return et.invert=function(Ye,Tt){return[Ye/qe,S(Tt*qe)]},et}function p0(Ae,qe){var et=x(Ae),Ye=(et+x(qe))/2;if(d(Ye)=.12&&Di<.234&&Oi>=-.425&&Oi<-.214?Tt:Di>=.166&&Di<.234&&Oi>=-.214&&Oi<-.115?Qt:et).invert(vr)},nr.stream=function(vr){return Ae&&qe===vr?Ae:Ae=sy([et.stream(qe=vr),Tt.stream(vr),Qt.stream(vr)])},nr.precision=function(vr){return arguments.length?(et.precision(vr),Tt.precision(vr),Qt.precision(vr),dr()):et.precision()},nr.scale=function(vr){return arguments.length?(et.scale(vr),Tt.scale(vr*.35),Qt.scale(vr),nr.translate(et.translate())):et.scale()},nr.translate=function(vr){if(!arguments.length)return et.translate();var Pr=et.scale(),$r=+vr[0],Oi=+vr[1];return Ye=et.translate(vr).clipExtent([[$r-.455*Pr,Oi-.238*Pr],[$r+.455*Pr,Oi+.238*Pr]]).stream(Rr),jt=Tt.translate([$r-.307*Pr,Oi+.201*Pr]).clipExtent([[$r-.425*Pr+o,Oi+.12*Pr+o],[$r-.214*Pr-o,Oi+.234*Pr-o]]).stream(Rr),cr=Qt.translate([$r-.205*Pr,Oi+.212*Pr]).clipExtent([[$r-.214*Pr+o,Oi+.166*Pr+o],[$r-.115*Pr-o,Oi+.234*Pr-o]]).stream(Rr),dr()},nr.fitExtent=function(vr,Pr){return Tp(nr,vr,Pr)},nr.fitSize=function(vr,Pr){return xc(nr,vr,Pr)},nr.fitWidth=function(vr,Pr){return od(nr,vr,Pr)},nr.fitHeight=function(vr,Pr){return Kf(nr,vr,Pr)};function dr(){return Ae=qe=null,nr}return nr.scale(1070)}function yf(Ae){return function(qe,et){var Ye=g(qe),Tt=g(et),jt=Ae(Ye*Tt);return[jt*Tt*x(qe),jt*x(et)]}}function xf(Ae){return function(qe,et){var Ye=T(qe*qe+et*et),Tt=Ae(Ye),jt=x(Tt),Qt=g(Tt);return[m(qe*jt,Ye*Qt),S(Ye&&et*jt/Ye)]}}var Ju=yf(function(Ae){return T(2/(1+Ae))});Ju.invert=xf(function(Ae){return 2*S(Ae/2)});function qx(){return Yc(Ju).scale(124.75).clipAngle(180-.001)}var sd=yf(function(Ae){return(Ae=E(Ae))&&Ae/x(Ae)});sd.invert=xf(function(Ae){return Ae});function uy(){return Yc(sd).scale(79.4188).clipAngle(180-.001)}function bc(Ae,qe){return[Ae,b(y((u+qe)/2))]}bc.invert=function(Ae,qe){return[Ae,2*v(_(qe))-u]};function e1(){return Sp(bc).scale(961/f)}function Sp(Ae){var qe=Yc(Ae),et=qe.center,Ye=qe.scale,Tt=qe.translate,jt=qe.clipExtent,Qt=null,cr,yr,Rr;qe.scale=function(dr){return arguments.length?(Ye(dr),nr()):Ye()},qe.translate=function(dr){return arguments.length?(Tt(dr),nr()):Tt()},qe.center=function(dr){return arguments.length?(et(dr),nr()):et()},qe.clipExtent=function(dr){return arguments.length?(dr==null?Qt=cr=yr=Rr=null:(Qt=+dr[0][0],cr=+dr[0][1],yr=+dr[1][0],Rr=+dr[1][1]),nr()):Qt==null?null:[[Qt,cr],[yr,Rr]]};function nr(){var dr=l*Ye(),vr=qe(gn(qe.rotate()).invert([0,0]));return jt(Qt==null?[[vr[0]-dr,vr[1]-dr],[vr[0]+dr,vr[1]+dr]]:Ae===bc?[[Math.max(vr[0]-dr,Qt),cr],[Math.min(vr[0]+dr,yr),Rr]]:[[Qt,Math.max(vr[1]-dr,cr)],[yr,Math.min(vr[1]+dr,Rr)]])}return nr()}function Ep(Ae){return y((u+Ae)/2)}function cy(Ae,qe){var et=g(Ae),Ye=Ae===qe?x(Ae):b(et/g(qe))/b(Ep(qe)/Ep(Ae)),Tt=et*M(Ep(Ae),Ye)/Ye;if(!Ye)return bc;function jt(Qt,cr){Tt>0?cr<-u+o&&(cr=-u+o):cr>u-o&&(cr=u-o);var yr=Tt/M(Ep(cr),Ye);return[yr*x(Ye*Qt),Tt-yr*g(Ye*Qt)]}return jt.invert=function(Qt,cr){var yr=Tt-cr,Rr=A(Ye)*T(Qt*Qt+yr*yr),nr=m(Qt,d(yr))*A(yr);return yr*Ye<0&&(nr-=l*A(Qt)*A(yr)),[nr/Ye,2*v(M(Tt/Rr,1/Ye))-u]},jt}function kp(){return Cu(cy).scale(109.5).parallels([30,30])}function Ch(Ae,qe){return[Ae,qe]}Ch.invert=Ch;function ld(){return Yc(Ch).scale(152.63)}function Cp(Ae,qe){var et=g(Ae),Ye=Ae===qe?x(Ae):(et-g(qe))/(qe-Ae),Tt=et/Ye+Ae;if(d(Ye)o&&--Ye>0);return[Ae/(.8707+(jt=et*et)*(-.131979+jt*(-.013791+jt*jt*jt*(.003971-.001529*jt)))),et]};function r1(){return Yc(Cg).scale(175.295)}function pl(Ae,qe){return[g(qe)*x(Ae),x(qe)]}pl.invert=xf(S);function Xc(){return Yc(pl).scale(249.5).clipAngle(90+o)}function Pp(Ae,qe){var et=g(qe),Ye=1+g(Ae)*et;return[et*x(Ae)/Ye,x(qe)/Ye]}Pp.invert=xf(function(Ae){return 2*v(Ae)});function Dg(){return Yc(Pp).scale(250).clipAngle(142)}function Ip(Ae,qe){return[b(y((u+qe)/2)),-Ae]}Ip.invert=function(Ae,qe){return[-qe,2*v(_(Ae))-u]};function Rp(){var Ae=Sp(Ip),qe=Ae.center,et=Ae.rotate;return Ae.center=function(Ye){return arguments.length?qe([-Ye[1],Ye[0]]):(Ye=qe(),[Ye[1],-Ye[0]])},Ae.rotate=function(Ye){return arguments.length?et([Ye[0],Ye[1],Ye.length>2?Ye[2]+90:90]):(Ye=et(),[Ye[0],Ye[1],Ye[2]-90])},et([0,0,90]).scale(159.155)}e.geoAlbers=Eg,e.geoAlbersUsa=ly,e.geoArea=j,e.geoAzimuthalEqualArea=qx,e.geoAzimuthalEqualAreaRaw=Ju,e.geoAzimuthalEquidistant=uy,e.geoAzimuthalEquidistantRaw=sd,e.geoBounds=bt,e.geoCentroid=Fr,e.geoCircle=as,e.geoClipAntimeridian=lt,e.geoClipCircle=Ar,e.geoClipExtent=Si,e.geoClipRectangle=ni,e.geoConicConformal=kp,e.geoConicConformalRaw=cy,e.geoConicEqualArea=kh,e.geoConicEqualAreaRaw=p0,e.geoConicEquidistant=fy,e.geoConicEquidistantRaw=Cp,e.geoContains=jl,e.geoDistance=ss,e.geoEqualEarth=kg,e.geoEqualEarthRaw=Lp,e.geoEquirectangular=ld,e.geoEquirectangularRaw=Ch,e.geoGnomonic=hy,e.geoGnomonicRaw=t1,e.geoGraticule=Mu,e.geoGraticule10=Su,e.geoIdentity=dy,e.geoInterpolate=yc,e.geoLength=ms,e.geoMercator=e1,e.geoMercatorRaw=bc,e.geoNaturalEarth1=r1,e.geoNaturalEarth1Raw=Cg,e.geoOrthographic=Xc,e.geoOrthographicRaw=pl,e.geoPath=Tg,e.geoProjection=Yc,e.geoProjectionMutator=Sg,e.geoRotation=gn,e.geoStereographic=Dg,e.geoStereographicRaw=Pp,e.geoStream=I,e.geoTransform=ay,e.geoTransverseMercator=Rp,e.geoTransverseMercatorRaw=Ip,Object.defineProperty(e,"__esModule",{value:!0})}))});var NVe=W((yJr,OVe)=>{"use strict";var qVe={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"},alr=new Set(Object.values(qVe));OVe.exports={usaLocationAbbreviations:alr,usaLocationList:qVe}});var UVe={};Jn(UVe,{COUNTRIES_X:()=>olr});var olr,VVe=Ci(()=>{"use strict";olr=[{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:[]}]});var Am=W((xJr,jVe)=>{"use strict";var slr=gi(),{COUNTRIES:llr,createLookup:ulr}=yVe(),{area:clr}=LVe(),{centroid:flr}=IVe(),{coordAll:hlr}=MR(),{geoBounds:dlr}=DR(),plr=gA(),q2=qg(),vlr=my(),glr=U6(),FR=nM(),{usaLocationAbbreviations:mlr,usaLocationList:ylr}=NVe(),{COUNTRIES_X:xlr}=(VVe(),Pt(UVe)),{lookupAlpha3:blr}=ulr([...llr,...xlr]),_lr={"ISO-3":plr,"USA-states":Tlr,"country names":wlr};function wlr(e){let t=blr(e);return t||(q2.log("Unrecognized country name: "+e+"."),!1)}function Tlr(e){e=e.trim();let t=mlr.has(e.toUpperCase())?e.toUpperCase():ylr[e.toLowerCase()];return t||(q2.log("Unrecognized US location: "+e+"."),!1)}function Alr(e,t,r){var n;if(!t||typeof t!="string")return!1;let i=_lr[e](t);if(i){let a;if(e==="USA-states"){a=[];for(let o of r)((n=o==null?void 0:o.properties)==null?void 0:n.gu)==="USA"&&a.push(o)}else a=r;for(let o of a)if(o.id===i)return o;q2.log(`Location with id ${i} does not have a matching topojson feature at this resolution.`)}return!1}var LR=360;function JQ(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function Mlr(e){var t=e.geometry,r=t.coordinates,i=e.id,n=[],a,o,s,l;switch(i==="RUS"||i==="FJI"?a=function(u){var c;if(JQ(u)===null)c=u;else for(c=new Array(u.length),l=0;lc?f[h++]=[u[l][0]+LR,u[l][1]]:l===c?(f[h++]=u[l],f[h++]=[u[l][0],-90]):f[h++]=u[l];var p=FR.tester(f);p.pts.pop(),n.push(p)}:a=function(u){n.push(FR.tester(u))},t.type){case"MultiPolygon":for(o=0;on&&(n=s,r=o)}else r=t;return!r||!r.coordinates.some(l=>l.length>0)?[NaN,NaN]:flr(r).geometry.coordinates}function klr(e){var t=window.PlotlyGeoAssets||{},r=[];function i(l){return new Promise(function(u,c){slr.json(l,function(f,h){if(f){delete t[l];var p=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(p))}return t[l]=h,u(h)})})}function n(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;atee(eee(e));function eee(e){try{return hlr(e)}catch(t){return[]}}function tee(e){if(e.length===0)return null;if(e.length===1){let[a,o]=e[0];return[a,o,a,o]}let[[t,r],[i,n]]=dlr({type:"MultiPoint",coordinates:e});return[t,r,HVe([t,i])[1],n]}var Dlr=(e,t)=>t.fitbounds==="geojson"&&e.locationmode==="geojson-id",GVe=(e,t)=>Dlr(e,t)?eee(QQ(e)):[],Flr=(e,t)=>tee(GVe(e,t));function HVe([e,t]){return[e,e>t?t+LR:t]}jVe.exports={locationToFeature:Alr,feature2polygons:Mlr,getTraceGeojson:QQ,extractTraceFeature:Slr,fetchTraceGeoData:klr,boundsOfCoords:tee,computeBbox:Clr,coordsOf:eee,doesCrossAntiMeridian:JQ,fitGeojsonBbox:Flr,fitGeojsonCoords:GVe,unwrapLonRange:HVe,ANTIMERIDIAN_LON_SHIFT:LR}});var ree=W((bJr,YVe)=>{"use strict";var Llr=gi(),Plr=Qi(),$Ve=ti(),WVe=lh(),Ilr=WVe.stylePoints,Rlr=WVe.styleText;YVe.exports=function(t,r){r&&zlr(t,r)};function zlr(e,t){var r=t[0].trace,i=t[0].node3;i.style("opacity",t[0].trace.opacity),Ilr(i,r,e),Rlr(i,r,e),i.selectAll("path.js-line").style("fill","none").each(function(n){var a=Llr.select(this),o=n.trace,s=o.line||{};a.call($Ve.stroke,s.color).call(Plr.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call($Ve.fill,o.fillcolor)})}});var RR=W((_Jr,KVe)=>{"use strict";var XVe=gi(),PR=tt(),Blr=xR().getTopojsonFeatures,iee=IE(),IR=Am(),ZVe=Yp().findExtremes,aee=(ra(),Pt(ia)).BADNUM,qlr=Ld().calcMarkerSize,nee=Wo(),Olr=ree();function Nlr(e,t,r){var i=t.layers.frontplot.select(".scatterlayer"),n=PR.makeTraceGroups(i,r,"trace scattergeo");function a(o,s){o.lonlat[0]===aee&&XVe.select(s).remove()}n.selectAll("*").remove(),n.each(function(o){var s=XVe.select(this),l=o[0].trace;if(nee.hasLines(l)||l.fill!=="none"){var u=iee.calcTraceToLineCoords(o),c=l.fill!=="none"?iee.makePolygon(u):iee.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}nee.hasMarkers(l)&&s.selectAll("path.point").data(PR.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),nee.hasText(l)&&s.selectAll("g").data(PR.identity).enter().append("g").append("text").each(function(f){a(f,this)}),Olr(e,o)})}function Ulr(e,t){var r=e[0].trace,i=t[r.geo],n=i._subplot,a=r._length,o,s;if(PR.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?IR.extractTraceFeature(e):Blr(r,n.topojson);for(o=0;o{"use strict";var Glr=Is(),Hlr=(ra(),Pt(ia)).BADNUM,jlr=s5(),$lr=tt().fillText,Wlr=W4();JVe.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(w){var _=w.lonlat;if(_[0]===Hlr||u(_))return 1/0;var b=c(_),M=c([r,i]),x=Math.abs(b[0]-M[0]),A=Math.abs(b[1]-M[1]),T=Math.max(3,w.mrc||0);return Math.max(Math.sqrt(x*x+A*A)-T,1-3/T)}if(Glr.getClosest(n,f,t),t.index!==!1){var h=n[t.index],p=h.lonlat,d=[o.c2p(p),s.c2p(p)],v=h.mrc||1;t.x0=d[0]-v,t.x1=d[0]+v,t.y0=d[1]-v,t.y1=d[1]+v,t.loc=h.loc,t.lon=p[0],t.lat=p[1];var m={};m[a.geo]={_subplot:l};var g=a._module.formatLabels(h,a,m);return t.lonLabel=g.lonLabel,t.latLabel=g.latLabel,t.color=jlr(a,h),t.extraText=Ylr(a,h,t,n[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Ylr(e,t,r,i){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n==="all"?Wlr.hoverinfo.flags:n.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(i.lon+f(r.lonLabel)):l&&c.push(i.lat+f(r.latLabel)),u&&$lr(t,e,c),c.join("
")}});var tGe=W((TJr,eGe)=>{"use strict";eGe.exports=function(t,r,i,n,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=n[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var nGe=W((AJr,iGe)=>{"use strict";var rGe=Wo(),Xlr=(ra(),Pt(ia)).BADNUM;iGe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l,u,c,f,h,p=!rGe.hasMarkers(s)&&!rGe.hasText(s);if(p)return[];if(r===!1)for(h=0;h{(function(e,t){t(typeof zR=="object"&&typeof aGe!="undefined"?zR:e.d3=e.d3||{})})(zR,(function(e){"use strict";function t(N,V){return NV?1:N>=V?0:NaN}function r(N){return N.length===1&&(N=i(N)),{left:function(V,Y,H,j){for(H==null&&(H=0),j==null&&(j=V.length);H>>1;N(V[Q],Y)<0?H=Q+1:j=Q}return H},right:function(V,Y,H,j){for(H==null&&(H=0),j==null&&(j=V.length);H>>1;N(V[Q],Y)>0?j=Q:H=Q+1}return H}}}function i(N){return function(V,Y){return t(N(V),Y)}}var n=r(t),a=n.right,o=n.left;function s(N,V){V==null&&(V=l);for(var Y=0,H=N.length-1,j=N[0],Q=new Array(H<0?0:H);YN?1:V>=N?0:NaN}function f(N){return N===null?NaN:+N}function h(N,V){var Y=N.length,H=0,j=-1,Q=0,te,ue,ge=0;if(V==null)for(;++j1)return ge/(H-1)}function p(N,V){var Y=h(N,V);return Y&&Math.sqrt(Y)}function d(N,V){var Y=N.length,H=-1,j,Q,te;if(V==null){for(;++H=j)for(Q=te=j;++Hj&&(Q=j),te=j)for(Q=te=j;++Hj&&(Q=j),te0)return[N];if((H=V0)for(N=Math.ceil(N/ue),V=Math.floor(V/ue),te=new Array(Q=Math.ceil(V-N+1));++j=0?(Q>=M?10:Q>=x?5:Q>=A?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(Q>=M?10:Q>=x?5:Q>=A?2:1)}function E(N,V,Y){var H=Math.abs(V-N)/Math.max(0,Y),j=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/j;return Q>=M?j*=10:Q>=x?j*=5:Q>=A&&(j*=2),Vce;)oe.pop(),--Se;var be=new Array(Se+1),fe;for(Q=0;Q<=Se;++Q)fe=be[Q]=[],fe.x0=Q>0?oe[Q-1]:xe,fe.x1=Q=1)return+Y(N[H-1],H-1,N);var H,j=(H-1)*V,Q=Math.floor(j),te=+Y(N[Q],Q,N),ue=+Y(N[Q+1],Q+1,N);return te+(ue-te)*(j-Q)}}function D(N,V,Y){return N=g.call(N,f).sort(t),Math.ceil((Y-V)/(2*(k(N,.75)-k(N,.25))*Math.pow(N.length,-1/3)))}function F(N,V,Y){return Math.ceil((Y-V)/(3.5*p(N)*Math.pow(N.length,-1/3)))}function P(N,V){var Y=N.length,H=-1,j,Q;if(V==null){for(;++H=j)for(Q=j;++HQ&&(Q=j)}else for(;++H=j)for(Q=j;++HQ&&(Q=j);return Q}function R(N,V){var Y=N.length,H=Y,j=-1,Q,te=0;if(V==null)for(;++j=0;)for(te=N[V],Y=te.length;--Y>=0;)Q[--j]=te[Y];return Q}function B(N,V){var Y=N.length,H=-1,j,Q;if(V==null){for(;++H=j)for(Q=j;++Hj&&(Q=j)}else for(;++H=j)for(Q=j;++Hj&&(Q=j);return Q}function O(N,V){for(var Y=V.length,H=new Array(Y);Y--;)H[Y]=N[V[Y]];return H}function $(N,V){if(Y=N.length){var Y,H=0,j=0,Q,te=N[j];for(V==null&&(V=t);++H{(function(e,t){typeof BR=="object"&&typeof sGe!="undefined"?t(BR,DR(),oGe()):t(e.d3=e.d3||{},e.d3,e.d3)})(BR,(function(e,t,r){"use strict";var i=Math.abs,n=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(ie){return ie>0?1:ie<0?-1:0},v=Math.sin,m=Math.tan,g=1e-6,w=1e-12,_=Math.PI,b=_/2,M=_/4,x=Math.SQRT1_2,A=F(2),T=F(_),y=_*2,E=180/_,S=_/180;function C(ie){return ie?ie/Math.sin(ie):1}function k(ie){return ie>1?b:ie<-1?-b:Math.asin(ie)}function D(ie){return ie>1?0:ie<-1?_:Math.acos(ie)}function F(ie){return ie>0?Math.sqrt(ie):0}function P(ie){return ie=s(2*ie),(ie-1)/(ie+1)}function R(ie){return(s(ie)-s(-ie))/2}function L(ie){return(s(ie)+s(-ie))/2}function I(ie){return u(ie+F(ie*ie+1))}function B(ie){return u(ie+F(ie*ie-1))}function O(ie){var se=m(ie/2),de=2*u(o(ie/2))/(se*se);function ve(ke,Me){var Pe=o(ke),Ze=o(Me),it=v(Me),Xe=Ze*Pe,at=-((1-Xe?u((1+Xe)/2)/(1-Xe):-.5)+de/(1+Xe));return[at*Ze*v(ke),at*it]}return ve.invert=function(ke,Me){var Pe=F(ke*ke+Me*Me),Ze=-ie/2,it=50,Xe;if(!Pe)return[0,0];do{var at=Ze/2,xt=o(at),It=v(at),Gt=It/xt,or=-u(i(xt));Ze-=Xe=(2/Gt*or-de*Gt-Pe)/(-or/(It*It)+1-de/(2*xt*xt))*(xt<0?.7:1)}while(i(Xe)>g&&--it>0);var Mr=v(Ze);return[a(ke*Mr,Pe*o(Ze)),k(Me*Mr/Pe)]},ve}function $(){var ie=b,se=t.geoProjectionMutator(O),de=se(ie);return de.radius=function(ve){return arguments.length?se(ie=ve*S):ie*E},de.scale(179.976).clipAngle(147)}function X(ie,se){var de=o(se),ve=C(D(de*o(ie/=2)));return[2*de*v(ie)*ve,v(se)*ve]}X.invert=function(ie,se){if(!(ie*ie+4*se*se>_*_+g)){var de=ie,ve=se,ke=25;do{var Me=v(de),Pe=v(de/2),Ze=o(de/2),it=v(ve),Xe=o(ve),at=v(2*ve),xt=it*it,It=Xe*Xe,Gt=Pe*Pe,or=1-It*Ze*Ze,Mr=or?D(Xe*Ze)*F(Gr=1/or):Gr=0,Gr,_i=2*Mr*Xe*Pe-ie,on=Mr*it-se,mn=Gr*(It*Gt+Mr*Xe*Ze*xt),Tn=Gr*(.5*Me*at-Mr*2*it*Pe),Pn=Gr*.25*(at*Pe-Mr*it*It*Me),no=Gr*(xt*Ze+Mr*Gt*Xe),Do=Tn*Pn-no*mn;if(!Do)break;var fa=(on*Tn-_i*no)/Do,us=(_i*Pn-on*mn)/Do;de-=fa,ve-=us}while((i(fa)>g||i(us)>g)&&--ke>0);return[de,ve]}};function K(){return t.geoProjection(X).scale(152.63)}function G(ie){var se=v(ie),de=o(ie),ve=ie>=0?1:-1,ke=m(ve*ie),Me=(1+se-de)/2;function Pe(Ze,it){var Xe=o(it),at=o(Ze/=2);return[(1+Xe)*v(Ze),(ve*it>-a(at,ke)-.001?0:-ve*10)+Me+v(it)*de-(1+Xe)*se*at]}return Pe.invert=function(Ze,it){var Xe=0,at=0,xt=50;do{var It=o(Xe),Gt=v(Xe),or=o(at),Mr=v(at),Gr=1+or,_i=Gr*Gt-Ze,on=Me+Mr*de-Gr*se*It-it,mn=Gr*It/2,Tn=-Gt*Mr,Pn=se*Gr*Gt/2,no=de*or+se*It*Mr,Do=Tn*Pn-no*mn,fa=(on*Tn-_i*no)/Do/2,us=(_i*Pn-on*mn)/Do;i(us)>2&&(us/=2),Xe-=fa,at-=us}while((i(fa)>g||i(us)>g)&&--xt>0);return ve*at>-a(o(Xe),ke)-.001?[Xe*2,at]:null},Pe}function q(){var ie=20*S,se=ie>=0?1:-1,de=m(se*ie),ve=t.geoProjectionMutator(G),ke=ve(ie),Me=ke.stream;return ke.parallel=function(Pe){return arguments.length?(de=m((se=(ie=Pe*S)>=0?1:-1)*ie),ve(ie)):ie*E},ke.stream=function(Pe){var Ze=ke.rotate(),it=Me(Pe),Xe=(ke.rotate([0,0]),Me(Pe)),at=ke.precision();return ke.rotate(Ze),it.sphere=function(){Xe.polygonStart(),Xe.lineStart();for(var xt=se*-180;se*xt<180;xt+=se*90)Xe.point(xt,se*90);if(ie)for(;se*(xt-=3*se*at)>=-180;)Xe.point(xt,se*-a(o(xt*S/2),de)*E);Xe.lineEnd(),Xe.polygonEnd()},it},ke.scale(218.695).center([0,28.0974])}function J(ie,se){var de=m(se/2),ve=F(1-de*de),ke=1+ve*o(ie/=2),Me=v(ie)*ve/ke,Pe=de/ke,Ze=Me*Me,it=Pe*Pe;return[4/3*Me*(3+Ze-3*it),4/3*Pe*(3+3*Ze-it)]}J.invert=function(ie,se){if(ie*=3/8,se*=3/8,!ie&&i(se)>1)return null;var de=ie*ie,ve=se*se,ke=1+de+ve,Me=F((ke-F(ke*ke-4*se*se))/2),Pe=k(Me)/3,Ze=Me?B(i(se/Me))/3:I(i(ie))/3,it=o(Pe),Xe=L(Ze),at=Xe*Xe-it*it;return[d(ie)*2*a(R(Ze)*it,.25-at),d(se)*2*a(Xe*v(Pe),.25+at)]};function N(){return t.geoProjection(J).scale(66.1603)}var V=F(8),Y=u(1+A);function H(ie,se){var de=i(se);return dew&&--ve>0);return[ie/(o(de)*(V-1/v(de))),d(se)*de]};function j(){return t.geoProjection(H).scale(112.314)}function Q(ie){var se=2*_/ie;function de(ve,ke){var Me=t.geoAzimuthalEquidistantRaw(ve,ke);if(i(ve)>b){var Pe=a(Me[1],Me[0]),Ze=F(Me[0]*Me[0]+Me[1]*Me[1]),it=se*p((Pe-b)/se)+b,Xe=a(v(Pe-=it),2-o(Pe));Pe=it+k(_/Ze*v(Xe))-Xe,Me[0]=Ze*o(Pe),Me[1]=Ze*v(Pe)}return Me}return de.invert=function(ve,ke){var Me=F(ve*ve+ke*ke);if(Me>b){var Pe=a(ke,ve),Ze=se*p((Pe-b)/se)+b,it=Pe>Ze?-1:1,Xe=Me*o(Ze-Pe),at=1/m(it*D((Xe-_)/F(_*(_-2*Xe)+Me*Me)));Pe=Ze+2*n((at+it*F(at*at-3))/3),ve=Me*o(Pe),ke=Me*v(Pe)}return t.geoAzimuthalEquidistantRaw.invert(ve,ke)},de}function te(){var ie=5,se=t.geoProjectionMutator(Q),de=se(ie),ve=de.stream,ke=.01,Me=-o(ke*S),Pe=v(ke*S);return de.lobes=function(Ze){return arguments.length?se(ie=+Ze):ie},de.stream=function(Ze){var it=de.rotate(),Xe=ve(Ze),at=(de.rotate([0,0]),ve(Ze));return de.rotate(it),Xe.sphere=function(){at.polygonStart(),at.lineStart();for(var xt=0,It=360/ie,Gt=2*_/ie,or=90-180/ie,Mr=b;xt0&&i(ke)>g);return ve<0?NaN:de}function ce(ie,se,de){return se===void 0&&(se=40),de===void 0&&(de=w),function(ve,ke,Me,Pe){var Ze,it,Xe;Me=Me===void 0?0:+Me,Pe=Pe===void 0?0:+Pe;for(var at=0;atZe){Me-=it/=2,Pe-=Xe/=2;continue}Ze=or;var Mr=(Me>0?-1:1)*de,Gr=(Pe>0?-1:1)*de,_i=ie(Me+Mr,Pe),on=ie(Me,Pe+Gr),mn=(_i[0]-xt[0])/Mr,Tn=(_i[1]-xt[1])/Mr,Pn=(on[0]-xt[0])/Gr,no=(on[1]-xt[1])/Gr,Do=no*mn-Tn*Pn,fa=(i(Do)<.5?.5:1)/Do;if(it=(Gt*Pn-It*no)*fa,Xe=(It*Tn-Gt*mn)*fa,Me+=it,Pe+=Xe,i(it)0&&(Ze[1]*=1+it/1.5*Ze[0]*Ze[0]),Ze}return ve.invert=ce(ve),ve}function Se(){return t.geoProjection(oe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function be(ie,se){var de=ie*v(se),ve=30,ke;do se-=ke=(se+v(se)-de)/(1+o(se));while(i(ke)>g&&--ve>0);return se/2}function fe(ie,se,de){function ve(ke,Me){return[ie*ke*o(Me=be(de,Me)),se*v(Me)]}return ve.invert=function(ke,Me){return Me=k(Me/se),[ke/(ie*o(Me)),k((2*Me+v(2*Me))/de)]},ve}var ee=fe(A/b,A,_);function ae(){return t.geoProjection(ee).scale(169.529)}var _e=2.00276,re=1.11072;function pe(ie,se){var de=be(_,se);return[_e*ie/(1/o(se)+re/o(de)),(se+A*v(de))/_e]}pe.invert=function(ie,se){var de=_e*se,ve=se<0?-M:M,ke=25,Me,Pe;do Pe=de-A*v(ve),ve-=Me=(v(2*ve)+2*ve-_*v(Pe))/(2*o(2*ve)+2+_*o(Pe)*A*o(ve));while(i(Me)>g&&--ke>0);return Pe=de-A*v(ve),[ie*(1/o(Pe)+re/o(ve))/_e,Pe]};function Te(){return t.geoProjection(pe).scale(160.857)}function Ce(ie){var se=0,de=t.geoProjectionMutator(ie),ve=de(se);return ve.parallel=function(ke){return arguments.length?de(se=ke*S):se*E},ve}function ze(ie,se){return[ie*o(se),se]}ze.invert=function(ie,se){return[ie/o(se),se]};function we(){return t.geoProjection(ze).scale(152.63)}function me(ie){if(!ie)return ze;var se=1/m(ie);function de(ve,ke){var Me=se+ie-ke,Pe=Me&&ve*o(ke)/Me;return[Me*v(Pe),se-Me*o(Pe)]}return de.invert=function(ve,ke){var Me=F(ve*ve+(ke=se-ke)*ke),Pe=se+ie-Me;return[Me/o(Pe)*a(ve,ke),Pe]},de}function Le(){return Ce(me).scale(123.082).center([0,26.1441]).parallel(45)}function Ne(ie){function se(de,ve){var ke=b-ve,Me=ke&&de*ie*v(ke)/ke;return[ke*v(Me)/ie,b-ke*o(Me)]}return se.invert=function(de,ve){var ke=de*ie,Me=b-ve,Pe=F(ke*ke+Me*Me),Ze=a(ke,Me);return[(Pe?Pe/v(Pe):1)*Ze/ie,b-Pe]},se}function Je(){var ie=.5,se=t.geoProjectionMutator(Ne),de=se(ie);return de.fraction=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(158.837)}var rt=fe(1,4/_,_);function mt(){return t.geoProjection(rt).scale(152.63)}function dt(ie,se,de,ve,ke,Me){var Pe=o(Me),Ze;if(i(ie)>1||i(Me)>1)Ze=D(de*ke+se*ve*Pe);else{var it=v(ie/2),Xe=v(Me/2);Ze=2*k(F(it*it+se*ve*Xe*Xe))}return i(Ze)>g?[Ze,a(ve*v(Me),se*ke-de*ve*Pe)]:[0,0]}function St(ie,se,de){return D((ie*ie+se*se-de*de)/(2*ie*se))}function Ke(ie){return ie-2*_*l((ie+_)/(2*_))}function bt(ie,se,de){for(var ve=[[ie[0],ie[1],v(ie[1]),o(ie[1])],[se[0],se[1],v(se[1]),o(se[1])],[de[0],de[1],v(de[1]),o(de[1])]],ke=ve[2],Me,Pe=0;Pe<3;++Pe,ke=Me)Me=ve[Pe],ke.v=dt(Me[1]-ke[1],ke[3],ke[2],Me[3],Me[2],Me[0]-ke[0]),ke.point=[0,0];var Ze=St(ve[0].v[0],ve[2].v[0],ve[1].v[0]),it=St(ve[0].v[0],ve[1].v[0],ve[2].v[0]),Xe=_-Ze;ve[2].point[1]=0,ve[0].point[0]=-(ve[1].point[0]=ve[0].v[0]/2);var at=[ve[2].point[0]=ve[0].point[0]+ve[2].v[0]*o(Ze),2*(ve[0].point[1]=ve[1].point[1]=ve[2].v[0]*v(Ze))];function xt(It,Gt){var or=v(Gt),Mr=o(Gt),Gr=new Array(3),_i;for(_i=0;_i<3;++_i){var on=ve[_i];if(Gr[_i]=dt(Gt-on[1],on[3],on[2],Mr,or,It-on[0]),!Gr[_i][0])return on.point;Gr[_i][1]=Ke(Gr[_i][1]-on.v[1])}var mn=at.slice();for(_i=0;_i<3;++_i){var Tn=_i==2?0:_i+1,Pn=St(ve[_i].v[0],Gr[_i][0],Gr[Tn][0]);Gr[_i][1]<0&&(Pn=-Pn),_i?_i==1?(Pn=it-Pn,mn[0]-=Gr[_i][0]*o(Pn),mn[1]-=Gr[_i][0]*v(Pn)):(Pn=Xe-Pn,mn[0]+=Gr[_i][0]*o(Pn),mn[1]+=Gr[_i][0]*v(Pn)):(mn[0]+=Gr[_i][0]*o(Pn),mn[1]-=Gr[_i][0]*v(Pn))}return mn[0]/=3,mn[1]/=3,mn}return xt}function pt(ie){return ie[0]*=S,ie[1]*=S,ie}function Oe(){return Ue([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ue(ie,se,de){var ve=t.geoCentroid({type:"MultiPoint",coordinates:[ie,se,de]}),ke=[-ve[0],-ve[1]],Me=t.geoRotation(ke),Pe=bt(pt(Me(ie)),pt(Me(se)),pt(Me(de)));Pe.invert=ce(Pe);var Ze=t.geoProjection(Pe).rotate(ke),it=Ze.center;return delete Ze.rotate,Ze.center=function(Xe){return arguments.length?it(Me(Xe)):Me.invert(it())},Ze.clipAngle(90)}function je(ie,se){var de=F(1-v(se));return[2/T*ie*de,T*(1-de)]}je.invert=function(ie,se){var de=(de=se/T-1)*de;return[de>0?ie*F(_/de)/2:0,k(1-de)]};function $e(){return t.geoProjection(je).scale(95.6464).center([0,30])}function Ie(ie){var se=m(ie);function de(ve,ke){return[ve,(ve?ve/v(ve):1)*(v(ke)*o(ve)-se*o(ke))]}return de.invert=se?function(ve,ke){ve&&(ke*=v(ve)/ve);var Me=o(ve);return[ve,2*a(F(Me*Me+se*se-ke*ke)-Me,se-ke)]}:function(ve,ke){return[ve,k(ve?ke*m(ve)/ve:ke)]},de}function Ve(){return Ce(Ie).scale(249.828).clipAngle(90)}var st=F(3);function _t(ie,se){return[st*ie*(2*o(2*se/3)-1)/T,st*T*v(se/3)]}_t.invert=function(ie,se){var de=3*k(se/(st*T));return[T*ie/(st*(2*o(2*de/3)-1)),de]};function Wt(){return t.geoProjection(_t).scale(156.19)}function Ht(ie){var se=o(ie);function de(ve,ke){return[ve*se,v(ke)/se]}return de.invert=function(ve,ke){return[ve/se,k(ke*se)]},de}function fr(){return Ce(Ht).parallel(38.58).scale(195.044)}function lr(ie){var se=o(ie);function de(ve,ke){return[ve*se,(1+se)*m(ke/2)]}return de.invert=function(ve,ke){return[ve/se,n(ke/(1+se))*2]},de}function Ot(){return Ce(lr).scale(124.75)}function Jt(ie,se){var de=F(8/(3*_));return[de*ie*(1-i(se)/_),de*se]}Jt.invert=function(ie,se){var de=F(8/(3*_)),ve=se/de;return[ie/(de*(1-i(ve)/_)),ve]};function Cr(){return t.geoProjection(Jt).scale(165.664)}function Ge(ie,se){var de=F(4-3*v(i(se)));return[2/F(6*_)*ie*de,d(se)*F(2*_/3)*(2-de)]}Ge.invert=function(ie,se){var de=2-i(se)/F(2*_/3);return[ie*F(6*_)/(2*de),d(se)*k((4-de*de)/3)]};function Qe(){return t.geoProjection(Ge).scale(165.664)}function nt(ie,se){var de=F(_*(4+_));return[2/de*ie*(1+F(1-4*se*se/(_*_))),4/de*se]}nt.invert=function(ie,se){var de=F(_*(4+_))/2;return[ie*de/(1+F(1-se*se*(4+_)/(4*_))),se*de/2]};function gt(){return t.geoProjection(nt).scale(180.739)}function ht(ie,se){var de=(2+b)*v(se);se/=2;for(var ve=0,ke=1/0;ve<10&&i(ke)>g;ve++){var Me=o(se);se-=ke=(se+v(se)*(Me+2)-de)/(2*Me*(1+Me))}return[2/F(_*(4+_))*ie*(1+o(se)),2*F(_/(4+_))*v(se)]}ht.invert=function(ie,se){var de=se*F((4+_)/_)/2,ve=k(de),ke=o(ve);return[ie/(2/F(_*(4+_))*(1+ke)),k((ve+de*(ke+2))/(2+b))]};function Ft(){return t.geoProjection(ht).scale(180.739)}function hr(ie,se){return[ie*(1+o(se))/F(2+_),2*se/F(2+_)]}hr.invert=function(ie,se){var de=F(2+_),ve=se*de/2;return[de*ie/(1+o(ve)),ve]};function Ut(){return t.geoProjection(hr).scale(173.044)}function Lr(ie,se){for(var de=(1+b)*v(se),ve=0,ke=1/0;ve<10&&i(ke)>g;ve++)se-=ke=(se+v(se)-de)/(1+o(se));return de=F(2+_),[ie*(1+o(se))/de,2*se/de]}Lr.invert=function(ie,se){var de=1+b,ve=F(de/2);return[ie*2*ve/(1+o(se*=ve)),k((se+v(se))/de)]};function jr(){return t.geoProjection(Lr).scale(173.044)}var ii=3+2*A;function Fr(ie,se){var de=v(ie/=2),ve=o(ie),ke=F(o(se)),Me=o(se/=2),Pe=v(se)/(Me+A*ve*ke),Ze=F(2/(1+Pe*Pe)),it=F((A*Me+(ve+de)*ke)/(A*Me+(ve-de)*ke));return[ii*(Ze*(it-1/it)-2*u(it)),ii*(Ze*Pe*(it+1/it)-2*n(Pe))]}Fr.invert=function(ie,se){if(!(Me=J.invert(ie/1.2,se*1.065)))return null;var de=Me[0],ve=Me[1],ke=20,Me;ie/=ii,se/=ii;do{var Pe=de/2,Ze=ve/2,it=v(Pe),Xe=o(Pe),at=v(Ze),xt=o(Ze),It=o(ve),Gt=F(It),or=at/(xt+A*Xe*Gt),Mr=or*or,Gr=F(2/(1+Mr)),_i=A*xt+(Xe+it)*Gt,on=A*xt+(Xe-it)*Gt,mn=_i/on,Tn=F(mn),Pn=Tn-1/Tn,no=Tn+1/Tn,Do=Gr*Pn-2*u(Tn)-ie,fa=Gr*or*no-2*n(or)-se,us=at&&x*Gt*it*Mr/at,El=(A*Xe*xt+Gt)/(2*(xt+A*Xe*Gt)*(xt+A*Xe*Gt)*Gt),ec=-.5*or*Gr*Gr*Gr,Qf=ec*us,m0=ec*El,gu=(gu=2*xt+A*Gt*(Xe-it))*gu*Tn,Wl=(A*Xe*xt*Gt+It)/gu,Jc=-(A*it*at)/(Gt*gu),eh=Pn*Qf-2*Wl/Tn+Gr*(Wl+Wl/mn),th=Pn*m0-2*Jc/Tn+Gr*(Jc+Jc/mn),rh=or*no*Qf-2*us/(1+Mr)+Gr*no*us+Gr*or*(Wl-Wl/mn),Ph=or*no*m0-2*El/(1+Mr)+Gr*no*El+Gr*or*(Jc-Jc/mn),_f=th*rh-Ph*eh;if(!_f)break;var y0=(fa*th-Do*Ph)/_f,Np=(Do*rh-fa*eh)/_f;de-=y0,ve=c(-b,f(b,ve-Np))}while((i(y0)>g||i(Np)>g)&&--ke>0);return i(i(ve)-b)ve){var xt=F(at),It=a(Xe,it),Gt=de*p(It/de),or=It-Gt,Mr=ie*o(or),Gr=(ie*v(or)-or*v(Mr))/(b-Mr),_i=ba(or,Gr),on=(_-ie)/co(_i,Mr,_);it=xt;var mn=50,Tn;do it-=Tn=(ie+co(_i,Mr,it)*on-xt)/(_i(it)*on);while(i(Tn)>g&&--mn>0);Xe=or*v(it),itve){var it=F(Ze),Xe=a(Pe,Me),at=de*p(Xe/de),xt=Xe-at;Me=it*o(xt),Pe=it*v(xt);for(var It=Me-b,Gt=v(Me),or=Pe/Gt,Mr=Meg||i(or)>g)&&--Mr>0);return[xt,It]},it}var el=Ma(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ml(){return t.geoProjection(el).scale(149.995)}var Au=Ma(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function dl(){return t.geoProjection(Au).scale(153.93)}var Fe=Ma(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045);function ot(){return t.geoProjection(Fe).scale(130.945)}function lt(ie,se){var de=ie*ie,ve=se*se;return[ie*(1-.162388*ve)*(.87-952426e-9*de*de),se*(1+ve/12)]}lt.invert=function(ie,se){var de=ie,ve=se,ke=50,Me;do{var Pe=ve*ve;ve-=Me=(ve*(1+Pe/12)-se)/(1+Pe/4)}while(i(Me)>g&&--ke>0);ke=50,ie/=1-.162388*Pe;do{var Ze=(Ze=de*de)*Ze;de-=Me=(de*(.87-952426e-9*Ze)-ie)/(.87-.00476213*Ze)}while(i(Me)>g&&--ke>0);return[de,ve]};function kt(){return t.geoProjection(lt).scale(131.747)}var er=Ma(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function zt(){return t.geoProjection(er).scale(131.087)}function Ar(ie){var se=ie(b,0)[0]-ie(-b,0)[0];function de(ve,ke){var Me=ve>0?-.5:.5,Pe=ie(ve+Me*_,ke);return Pe[0]-=Me*se,Pe}return ie.invert&&(de.invert=function(ve,ke){var Me=ve>0?-.5:.5,Pe=ie.invert(ve+Me*se,ke),Ze=Pe[0]-Me*_;return Ze<-_?Ze+=2*_:Ze>_&&(Ze-=2*_),Pe[0]=Ze,Pe}),de}function Zt(ie,se){var de=d(ie),ve=d(se),ke=o(se),Me=o(ie)*ke,Pe=v(ie)*ke,Ze=v(ve*se);ie=i(a(Pe,Ze)),se=k(Me),i(ie-b)>g&&(ie%=b);var it=wr(ie>_/4?b-ie:ie,se);return ie>_/4&&(Ze=it[0],it[0]=-it[1],it[1]=-Ze),it[0]*=de,it[1]*=-ve,it}Zt.invert=function(ie,se){i(ie)>1&&(ie=d(ie)*2-ie),i(se)>1&&(se=d(se)*2-se);var de=d(ie),ve=d(se),ke=-de*ie,Me=-ve*se,Pe=Me/ke<1,Ze=Kr(Pe?Me:ke,Pe?ke:Me),it=Ze[0],Xe=Ze[1],at=o(Xe);return Pe&&(it=-b-it),[de*(a(v(it)*at,-v(Xe))+_),ve*k(o(it)*at)]};function wr(ie,se){if(se===b)return[0,0];var de=v(se),ve=de*de,ke=ve*ve,Me=1+ke,Pe=1+3*ke,Ze=1-ke,it=k(1/F(Me)),Xe=Ze+ve*Me*it,at=(1-de)/Xe,xt=F(at),It=at*Me,Gt=F(It),or=xt*Ze,Mr,Gr;if(ie===0)return[0,-(or+ve*Gt)];var _i=o(se),on=1/_i,mn=2*de*_i,Tn=(-3*ve+it*Pe)*mn,Pn=(-Xe*_i-(1-de)*Tn)/(Xe*Xe),no=.5*Pn/xt,Do=Ze*no-2*ve*xt*mn,fa=ve*Me*Pn+at*Pe*mn,us=-on*mn,El=-on*fa,ec=-2*on*Do,Qf=4*ie/_,m0;if(ie>.222*_||se<_/4&&ie>.175*_){if(Mr=(or+ve*F(It*(1+ke)-or*or))/(1+ke),ie>_/4)return[Mr,Mr];var gu=Mr,Wl=.5*Mr;Mr=.5*(Wl+gu),Gr=50;do{var Jc=F(It-Mr*Mr),eh=Mr*(ec+us*Jc)+El*k(Mr/Gt)-Qf;if(!eh)break;eh<0?Wl=Mr:gu=Mr,Mr=.5*(Wl+gu)}while(i(gu-Wl)>g&&--Gr>0)}else{Mr=g,Gr=25;do{var th=Mr*Mr,rh=F(It-th),Ph=ec+us*rh,_f=Mr*Ph+El*k(Mr/Gt)-Qf,y0=Ph+(El-us*th)/rh;Mr-=m0=rh?_f/y0:0}while(i(m0)>g&&--Gr>0)}return[Mr,-or-ve*F(It-Mr*Mr)]}function Kr(ie,se){for(var de=0,ve=1,ke=.5,Me=50;;){var Pe=ke*ke,Ze=F(ke),it=k(1/F(1+Pe)),Xe=1-Pe+ke*(1+Pe)*it,at=(1-Ze)/Xe,xt=F(at),It=at*(1+Pe),Gt=xt*(1-Pe),or=It-ie*ie,Mr=F(or),Gr=se+Gt+ke*Mr;if(i(ve-de)0?de=ke:ve=ke,ke=.5*(de+ve)}if(!Me)return null;var _i=k(Ze),on=o(_i),mn=1/on,Tn=2*Ze*on,Pn=(-3*ke+it*(1+3*Pe))*Tn,no=(-Xe*on-(1-Ze)*Pn)/(Xe*Xe),Do=.5*no/xt,fa=(1-Pe)*Do-2*ke*xt*Tn,us=-2*mn*fa,El=-mn*Tn,ec=-mn*(ke*(1+Pe)*no+at*(1+3*Pe)*Tn);return[_/4*(ie*(us+El*Mr)+ec*k(ie/F(It))),_i]}function ni(){return t.geoProjection(Ar(Zt)).scale(239.75)}function Si(ie,se,de){var ve,ke,Me;return ie?(ve=un(ie,de),se?(ke=un(se,1-de),Me=ke[1]*ke[1]+de*ve[0]*ve[0]*ke[0]*ke[0],[[ve[0]*ke[2]/Me,ve[1]*ve[2]*ke[0]*ke[1]/Me],[ve[1]*ke[1]/Me,-ve[0]*ve[2]*ke[0]*ke[2]/Me],[ve[2]*ke[1]*ke[2]/Me,-de*ve[0]*ve[1]*ke[0]/Me]]):[[ve[0],0],[ve[1],0],[ve[2],0]]):(ke=un(se,1-de),[[0,ke[0]/ke[1]],[1/ke[1],0],[ke[2]/ke[1],0]])}function un(ie,se){var de,ve,ke,Me,Pe;if(se=1-g)return de=(1-se)/4,ve=L(ie),Me=P(ie),ke=1/ve,Pe=ve*R(ie),[Me+de*(Pe-ie)/(ve*ve),ke-de*Me*ke*(Pe-ie),ke+de*Me*ke*(Pe+ie),2*n(s(ie))-b+de*(Pe-ie)/ve];var Ze=[1,0,0,0,0,0,0,0,0],it=[F(se),0,0,0,0,0,0,0,0],Xe=0;for(ve=F(1-se),Pe=1;i(it[Xe]/Ze[Xe])>g&&Xe<8;)de=Ze[Xe++],it[Xe]=(de-ve)/2,Ze[Xe]=(de+ve)/2,ve=F(de*ve),Pe*=2;ke=Pe*Ze[Xe]*ie;do Me=it[Xe]*v(ve=ke)/Ze[Xe],ke=(k(Me)+ke)/2;while(--Xe);return[v(ke),Me=o(ke),Me/o(ke-ve),ke]}function $n(ie,se,de){var ve=i(ie),ke=i(se),Me=R(ke);if(ve){var Pe=1/v(ve),Ze=1/(m(ve)*m(ve)),it=-(Ze+de*(Me*Me*Pe*Pe)-1+de),Xe=(de-1)*Ze,at=(-it+F(it*it-4*Xe))/2;return[wn(n(1/F(at)),de)*d(ie),wn(n(F((at/Ze-1)/de)),1-de)*d(se)]}return[0,wn(n(Me),1-de)*d(se)]}function wn(ie,se){if(!se)return ie;if(se===1)return u(m(ie/2+M));for(var de=1,ve=F(1-se),ke=F(se),Me=0;i(ke)>g;Me++){if(ie%_){var Pe=n(ve*m(ie)/de);Pe<0&&(Pe+=_),ie+=Pe+~~(ie/_)*_}else ie+=ie;ke=(de+ve)/2,ve=F(de*ve),ke=((de=ke)-ve)/2}return ie/(h(2,Me)*de)}function ma(ie,se){var de=(A-1)/(A+1),ve=F(1-de*de),ke=wn(b,ve*ve),Me=-1,Pe=u(m(_/4+i(se)/2)),Ze=s(Me*Pe)/F(de),it=Zn(Ze*o(Me*ie),Ze*v(Me*ie)),Xe=$n(it[0],it[1],ve*ve);return[-Xe[1],(se>=0?1:-1)*(.5*ke-Xe[0])]}function Zn(ie,se){var de=ie*ie,ve=se+1,ke=1-de-se*se;return[.5*((ie>=0?b:-b)-a(ke,2*ie)),-.25*u(ke*ke+4*de)+.5*u(ve*ve+de)]}function io(ie,se){var de=se[0]*se[0]+se[1]*se[1];return[(ie[0]*se[0]+ie[1]*se[1])/de,(ie[1]*se[0]-ie[0]*se[1])/de]}ma.invert=function(ie,se){var de=(A-1)/(A+1),ve=F(1-de*de),ke=wn(b,ve*ve),Me=-1,Pe=Si(.5*ke-se,-ie,ve*ve),Ze=io(Pe[0],Pe[1]),it=a(Ze[1],Ze[0])/Me;return[it,2*n(s(.5/Me*u(de*Ze[0]*Ze[0]+de*Ze[1]*Ze[1])))-b]};function fo(){return t.geoProjection(Ar(ma)).scale(151.496)}function ko(ie){var se=v(ie),de=o(ie),ve=Oo(ie);ve.invert=Oo(-ie);function ke(Me,Pe){var Ze=ve(Me,Pe);Me=Ze[0],Pe=Ze[1];var it=v(Pe),Xe=o(Pe),at=o(Me),xt=D(se*it+de*Xe*at),It=v(xt),Gt=i(It)>g?xt/It:1;return[Gt*de*v(Me),(i(Me)>b?Gt:-Gt)*(se*Xe-de*it*at)]}return ke.invert=function(Me,Pe){var Ze=F(Me*Me+Pe*Pe),it=-v(Ze),Xe=o(Ze),at=Ze*Xe,xt=-Pe*it,It=Ze*se,Gt=F(at*at+xt*xt-It*It),or=a(at*It+xt*Gt,xt*It-at*Gt),Mr=(Ze>b?-1:1)*a(Me*it,Ze*o(or)*Xe+Pe*v(or)*it);return ve.invert(Mr,or)},ke}function Oo(ie){var se=v(ie),de=o(ie);return function(ve,ke){var Me=o(ke),Pe=o(ve)*Me,Ze=v(ve)*Me,it=v(ke);return[a(Ze,Pe*de-it*se),k(it*de+Pe*se)]}}function ms(){var ie=0,se=t.geoProjectionMutator(ko),de=se(ie),ve=de.rotate,ke=de.stream,Me=t.geoCircle();return de.parallel=function(Pe){if(!arguments.length)return ie*E;var Ze=de.rotate();return se(ie=Pe*S).rotate(Ze)},de.rotate=function(Pe){return arguments.length?(ve.call(de,[Pe[0],Pe[1]-ie*E]),Me.center([-Pe[0],-Pe[1]]),de):(Pe=ve.call(de),Pe[1]+=ie*E,Pe)},de.stream=function(Pe){return Pe=ke(Pe),Pe.sphere=function(){Pe.polygonStart();var Ze=.01,it=Me.radius(90-Ze)().coordinates[0],Xe=it.length-1,at=-1,xt;for(Pe.lineStart();++at=0;)Pe.point((xt=it[at])[0],xt[1]);Pe.lineEnd(),Pe.polygonEnd()},Pe},de.scale(79.4187).parallel(45).clipAngle(180-.001)}var os=3,Co=k(1-1/os)*E,ss=Ht(0);function No(ie){var se=Co*S,de=je(_,se)[0]-je(-_,se)[0],ve=ss(0,se)[1],ke=je(0,se)[1],Me=T-ke,Pe=y/ie,Ze=4/y,it=ve+Me*Me*4/y;function Xe(at,xt){var It,Gt=i(xt);if(Gt>se){var or=f(ie-1,c(0,l((at+_)/Pe)));at+=_*(ie-1)/ie-or*Pe,It=je(at,Gt),It[0]=It[0]*y/de-y*(ie-1)/(2*ie)+or*y/ie,It[1]=ve+(It[1]-ke)*4*Me/y,xt<0&&(It[1]=-It[1])}else It=ss(at,xt);return It[0]*=Ze,It[1]/=it,It}return Xe.invert=function(at,xt){at/=Ze,xt*=it;var It=i(xt);if(It>ve){var Gt=f(ie-1,c(0,l((at+_)/Pe)));at=(at+_*(ie-1)/ie-Gt*Pe)*de/y;var or=je.invert(at,.25*(It-ve)*y/Me+ke);return or[0]-=_*(ie-1)/ie-Gt*Pe,xt<0&&(or[1]=-or[1]),or}return ss.invert(at,xt)},Xe}function Go(ie,se){return[ie,se&1?90-g:Co]}function ho(ie,se){return[ie,se&1?-90+g:-Co]}function qn(ie){return[ie[0]*(1-g),ie[1]]}function _a(ie){var se=[].concat(r.range(-180,180+ie/2,ie).map(Go),r.range(180,-180-ie/2,-ie).map(ho));return{type:"Polygon",coordinates:[ie===180?se.map(qn):se]}}function ys(){var ie=4,se=t.geoProjectionMutator(No),de=se(ie),ve=de.stream;return de.lobes=function(ke){return arguments.length?se(ie=+ke):ie},de.stream=function(ke){var Me=de.rotate(),Pe=ve(ke),Ze=(de.rotate([0,0]),ve(ke));return de.rotate(Me),Pe.sphere=function(){t.geoStream(_a(180/ie),Ze)},Pe},de.scale(239.75)}function tl(ie){var se=1+ie,de=v(1/se),ve=k(de),ke=2*F(_/(Me=_+4*ve*se)),Me,Pe=.5*ke*(se+F(ie*(2+ie))),Ze=ie*ie,it=se*se;function Xe(at,xt){var It=1-v(xt),Gt,or;if(It&&It<2){var Mr=b-xt,Gr=25,_i;do{var on=v(Mr),mn=o(Mr),Tn=ve+a(on,se-mn),Pn=1+it-2*se*mn;Mr-=_i=(Mr-Ze*ve-se*on+Pn*Tn-.5*It*Me)/(2*se*on*Tn)}while(i(_i)>w&&--Gr>0);Gt=ke*F(Pn),or=at*Tn/_}else Gt=ke*(ie+It),or=at*ve/_;return[Gt*v(or),Pe-Gt*o(or)]}return Xe.invert=function(at,xt){var It=at*at+(xt-=Pe)*xt,Gt=(1+it-It/(ke*ke))/(2*se),or=D(Gt),Mr=v(or),Gr=ve+a(Mr,se-Gt);return[k(at/F(It))*_/Gr,k(1-2*(or-Ze*ve-se*Mr+(1+it-2*se*Gt)*Gr)/Me)]},Xe}function rl(){var ie=1,se=t.geoProjectionMutator(tl),de=se(ie);return de.ratio=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(167.774).center([0,18.67])}var jl=.7109889596207567,il=.0528035274542;function hu(ie,se){return se>-jl?(ie=ee(ie,se),ie[1]+=il,ie):ze(ie,se)}hu.invert=function(ie,se){return se>-jl?ee.invert(ie,se-il):ze.invert(ie,se)};function Mu(){return t.geoProjection(hu).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Su(ie,se){return i(se)>jl?(ie=ee(ie,se),ie[1]-=se>0?il:-il,ie):ze(ie,se)}Su.invert=function(ie,se){return i(se)>jl?ee.invert(ie,se+(se>0?il:-il)):ze.invert(ie,se)};function yc(){return t.geoProjection(Su).scale(152.63)}function $l(ie,se,de,ve){var ke=F(4*_/(2*de+(1+ie-se/2)*v(2*de)+(ie+se)/2*v(4*de)+se/2*v(6*de))),Me=F(ve*v(de)*F((1+ie*o(2*de)+se*o(4*de))/(1+ie+se))),Pe=de*it(1);function Ze(xt){return F(1+ie*o(2*xt)+se*o(4*xt))}function it(xt){var It=xt*de;return(2*It+(1+ie-se/2)*v(2*It)+(ie+se)/2*v(4*It)+se/2*v(6*It))/de}function Xe(xt){return Ze(xt)*v(xt)}var at=function(xt,It){var Gt=de*xe(it,Pe*v(It)/de,It/_);isNaN(Gt)&&(Gt=de*d(It));var or=ke*Ze(Gt);return[or*Me*xt/_*o(Gt),or/Me*v(Gt)]};return at.invert=function(xt,It){var Gt=xe(Xe,It*Me/ke);return[xt*_/(o(Gt)*ke*Me*Ze(Gt)),k(de*it(Gt/de)/Pe)]},de===0&&(ke=F(ve/_),at=function(xt,It){return[xt*ke,v(It)/ke]},at.invert=function(xt,It){return[xt/ke,k(It*ke)]}),at}function Za(){var ie=1,se=0,de=45*S,ve=2,ke=t.geoProjectionMutator($l),Me=ke(ie,se,de,ve);return Me.a=function(Pe){return arguments.length?ke(ie=+Pe,se,de,ve):ie},Me.b=function(Pe){return arguments.length?ke(ie,se=+Pe,de,ve):se},Me.psiMax=function(Pe){return arguments.length?ke(ie,se,de=+Pe*S,ve):de*E},Me.ratio=function(Pe){return arguments.length?ke(ie,se,de,ve=+Pe):ve},Me.scale(180.739)}function Eu(ie,se,de,ve,ke,Me,Pe,Ze,it,Xe,at){if(at.nanEncountered)return NaN;var xt,It,Gt,or,Mr,Gr,_i,on,mn,Tn;if(xt=de-se,It=ie(se+xt*.25),Gt=ie(de-xt*.25),isNaN(It)){at.nanEncountered=!0;return}if(isNaN(Gt)){at.nanEncountered=!0;return}return or=xt*(ve+4*It+ke)/12,Mr=xt*(ke+4*Gt+Me)/12,Gr=or+Mr,Tn=(Gr-Pe)/15,Xe>it?(at.maxDepthCount++,Gr+Tn):Math.abs(Tn)>1;do it[Gr]>Gt?Mr=Gr:or=Gr,Gr=or+Mr>>1;while(Gr>or);var _i=it[Gr+1]-it[Gr];return _i&&(_i=(Gt-it[Gr+1])/_i),(Gr+1+_i)/Pe}var xt=2*at(1)/_*Me/de,It=function(Gt,or){var Mr=at(i(v(or))),Gr=ve(Mr)*Gt;return Mr/=xt,[Gr,or>=0?Mr:-Mr]};return It.invert=function(Gt,or){var Mr;return or*=xt,i(or)<1&&(Mr=d(or)*k(ke(i(or))*Me)),[Gt/ve(i(or)),Mr]},It}function du(){var ie=0,se=2.5,de=1.183136,ve=t.geoProjectionMutator(Cs),ke=ve(ie,se,de);return ke.alpha=function(Me){return arguments.length?ve(ie=+Me,se,de):ie},ke.k=function(Me){return arguments.length?ve(ie,se=+Me,de):se},ke.gamma=function(Me){return arguments.length?ve(ie,se,de=+Me):de},ke.scale(152.63)}function _h(ie,se){return i(ie[0]-se[0])=0;--it)de=ie[1][it],ve=de[0][0],ke=de[0][1],Me=de[1][1],Pe=de[2][0],Ze=de[2][1],se.push(bo([[Pe-g,Ze-g],[Pe-g,Me+g],[ve+g,Me+g],[ve+g,ke-g]],30));return{type:"Polygon",coordinates:[r.merge(se)]}}function Jo(ie,se,de){var ve,ke;function Me(it,Xe){for(var at=Xe<0?-1:1,xt=se[+(Xe<0)],It=0,Gt=xt.length-1;Itxt[It][2][0];++It);var or=ie(it-xt[It][1][0],Xe);return or[0]+=ie(xt[It][1][0],at*Xe>at*xt[It][0][1]?xt[It][0][1]:Xe)[0],or}de?Me.invert=de(Me):ie.invert&&(Me.invert=function(it,Xe){for(var at=ke[+(Xe<0)],xt=se[+(Xe<0)],It=0,Gt=at.length;Itor&&(Mr=Gt,Gt=or,or=Mr),[[xt,Gt],[It,or]]})}),Pe):se.map(function(Xe){return Xe.map(function(at){return[[at[0][0]*E,at[0][1]*E],[at[1][0]*E,at[1][1]*E],[at[2][0]*E,at[2][1]*E]]})})},se!=null&&Pe.lobes(se),Pe}var vu=[[[[-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 Uv(){return Jo(pe,vu).scale(160.857)}var $c=[[[[-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 c0(){return Jo(Su,$c).scale(152.63)}var Wf=[[[[-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 wh(){return Jo(ee,Wf).scale(169.529)}var Yf=[[[[-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 f0(){return Jo(ee,Yf).scale(169.529).rotate([20,0])}var Vv=[[[[-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 Th(){return Jo(hu,Vv,ce).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var xp=[[[[-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 h0(){return Jo(ze,xp).scale(152.63).rotate([-20,0])}function td(ie,se){return[3/y*ie*F(_*_/3-se*se),se]}td.invert=function(ie,se){return[y/3*ie/F(_*_/3-se*se),se]};function rd(){return t.geoProjection(td).scale(158.837)}function Gv(ie){function se(de,ve){if(i(i(ve)-b)2)return null;de/=2,ve/=2;var Me=de*de,Pe=ve*ve,Ze=2*ve/(1+Me+Pe);return Ze=h((1+Ze)/(1-Ze),1/ie),[a(2*de,1-Me-Pe)/ie,k((Ze-1)/(Ze+1))]},se}function Hv(){var ie=.5,se=t.geoProjectionMutator(Gv),de=se(ie);return de.spacing=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(124.75)}var Wc=_/A;function bp(ie,se){return[ie*(1+F(o(se)))/2,se/(o(se/2)*o(ie/6))]}bp.invert=function(ie,se){var de=i(ie),ve=i(se),ke=g,Me=b;veg||i(Gr)>g)&&--ke>0);return ke&&[de,ve]};function Ds(){return t.geoProjection(Zu).scale(139.98)}function Ho(ie,se){return[v(ie)/o(se),m(se)*o(ie)]}Ho.invert=function(ie,se){var de=ie*ie,ve=se*se,ke=ve+1,Me=de+ke,Pe=ie?x*F((Me-F(Me*Me-4*de))/de):1/F(ke);return[k(ie*Pe),d(se)*D(Pe)]};function ku(){return t.geoProjection(Ho).scale(144.049).clipAngle(90-.001)}function id(ie){var se=o(ie),de=m(M+ie/2);function ve(ke,Me){var Pe=Me-ie,Ze=i(Pe)=0;)at=ie[Xe],xt=at[0]+Ze*(Gt=xt)-it*It,It=at[1]+Ze*It+it*Gt;return xt=Ze*(Gt=xt)-it*It,It=Ze*It+it*Gt,[xt,It]}return de.invert=function(ve,ke){var Me=20,Pe=ve,Ze=ke;do{for(var it=se,Xe=ie[it],at=Xe[0],xt=Xe[1],It=0,Gt=0,or;--it>=0;)Xe=ie[it],It=at+Pe*(or=It)-Ze*Gt,Gt=xt+Pe*Gt+Ze*or,at=Xe[0]+Pe*(or=at)-Ze*xt,xt=Xe[1]+Pe*xt+Ze*or;It=at+Pe*(or=It)-Ze*Gt,Gt=xt+Pe*Gt+Ze*or,at=Pe*(or=at)-Ze*xt-ve,xt=Pe*xt+Ze*or-ke;var Mr=It*It+Gt*Gt,Gr,_i;Pe-=Gr=(at*It+xt*Gt)/Mr,Ze-=_i=(xt*It-at*Gt)/Mr}while(i(Gr)+i(_i)>g*g&&--Me>0);if(Me){var on=F(Pe*Pe+Ze*Ze),mn=2*n(on*.5),Tn=v(mn);return[a(Pe*Tn,on*o(mn)),on?k(Ze*Tn/on):0]}},de}var ny=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Bx=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Sh=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Vs=[[.9245,0],[0,0],[.01943,0]],$v=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Wv(){return mf(ny,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Eh(){return mf(Bx,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function _g(){return mf(Sh,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function nd(){return mf(Vs,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function _p(){return mf($v,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function mf(ie,se){var de=t.geoProjection(bg(ie)).rotate(se).clipAngle(90),ve=t.geoRotation(se),ke=de.center;return delete de.rotate,de.center=function(Me){return arguments.length?ke(ve(Me)):ve.invert(ke())},de}var Yv=F(6),wp=F(7);function ad(ie,se){var de=k(7*v(se)/(3*Yv));return[Yv*ie*(2*o(2*de/3)-1)/wp,9*v(de/3)/wp]}ad.invert=function(ie,se){var de=3*k(se*wp/9);return[ie*wp/(Yv*(2*o(2*de/3)-1)),k(v(de)*3*Yv/7)]};function wg(){return t.geoProjection(ad).scale(164.859)}function Tg(ie,se){for(var de=(1+x)*v(se),ve=se,ke=0,Me;ke<25&&(ve-=Me=(v(ve/2)+v(ve)-de)/(.5*o(ve/2)+o(ve)),!(i(Me)w&&--ve>0);return Me=de*de,Pe=Me*Me,Ze=Me*Pe,[ie/(.84719-.13063*Me+Ze*Ze*(-.04515+.05494*Me-.02326*Pe+.00331*Ze)),de]};function Tp(){return t.geoProjection(Zf).scale(175.295)}function xc(ie,se){return[ie*(1+o(se))/2,2*(se-m(se/2))]}xc.invert=function(ie,se){for(var de=se/2,ve=0,ke=1/0;ve<10&&i(ke)>g;++ve){var Me=o(se/2);se-=ke=(se-m(se/2)-de)/(1-.5/(Me*Me))}return[2*ie/(1+o(se)),se]};function od(){return t.geoProjection(xc).scale(152.63)}var Kf=[[[[-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 Ag(){return Jo(ue(1/0),Kf).rotate([20,0]).scale(152.63)}function Zv(ie,se){var de=v(se),ve=o(se),ke=d(ie);if(ie===0||i(se)===b)return[0,se];if(se===0)return[ie,0];if(i(ie)===b)return[ie*ve,b*de];var Me=_/(2*ie)-2*ie/_,Pe=2*se/_,Ze=(1-Pe*Pe)/(de-Pe),it=Me*Me,Xe=Ze*Ze,at=1+it/Xe,xt=1+Xe/it,It=(Me*de/Ze-Me/2)/at,Gt=(Xe*de/it+Ze/2)/xt,or=It*It+ve*ve/at,Mr=Gt*Gt-(Xe*de*de/it+Ze*de-1)/xt;return[b*(It+F(or)*ke),b*(Gt+F(Mr<0?0:Mr)*d(-se*Me)*ke)]}Zv.invert=function(ie,se){ie/=b,se/=b;var de=ie*ie,ve=se*se,ke=de+ve,Me=_*_;return[ie?(ke-1+F((1-ke)*(1-ke)+4*de))/(2*ie)*b:0,xe(function(Pe){return ke*(_*v(Pe)-2*Pe)*_+4*Pe*Pe*(se-v(Pe))+2*_*Pe-Me*se},0)]};function Mg(){return t.geoProjection(Zv).scale(127.267)}var Kv=1.0148,Ap=.23185,Jv=-.14499,Qv=.02406,oy=Kv,Ku=5*Ap,Yc=7*Jv,Sg=9*Qv,Cu=1.790857183;function Mp(ie,se){var de=se*se;return[ie,se*(Kv+de*de*(Ap+de*(Jv+Qv*de)))]}Mp.invert=function(ie,se){se>Cu?se=Cu:se<-Cu&&(se=-Cu);var de=se,ve;do{var ke=de*de;de-=ve=(de*(Kv+ke*ke*(Ap+ke*(Jv+Qv*ke)))-se)/(oy+ke*ke*(Ku+ke*(Yc+Sg*ke)))}while(i(ve)>g);return[ie,de]};function p0(){return t.geoProjection(Mp).scale(139.319)}function kh(ie,se){if(i(se)g&&--ke>0);return Pe=m(ve),[(i(se)=0;)if(ve=se[Ze],de[0]===ve[0]&&de[1]===ve[1]){if(Me)return[Me,de];Me=de}}}function Sp(ie){for(var se=ie.length,de=[],ve=ie[se-1],ke=0;ke0?[-ve[0],0]:[180-ve[0],180])};var se=kp.map(function(de){return{face:de,project:ie(de)}});return[-1,0,0,1,0,1,4,5].forEach(function(de,ve){var ke=se[de];ke&&(ke.children||(ke.children=[])).push(se[ve])}),sd(se[0],function(de,ve){return se[de<-_/2?ve<0?6:4:de<0?ve<0?2:0:de<_/2?ve<0?3:1:ve<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Dp(ie){ie=ie||function(Pe){var Ze=Pe.length===6?t.geoCentroid({type:"MultiPoint",coordinates:Pe}):Pe[0];return t.geoGnomonic().scale(1).translate([0,0]).rotate([-Ze[0],-Ze[1]])};var se=kp.map(function(Pe){for(var Ze=Pe.map(ud),it=Ze.length,Xe=Ze[it-1],at,xt=[],It=0;Itve^Gt>ve&&de<(It-Xe)*(ve-at)/(Gt-at)+Xe&&(ke=!ke)}return ke}function t1(ie,se){var de=se.stream,ve;if(!de)throw new Error("invalid projection");switch(ie&&ie.type){case"Feature":ve=dy;break;case"FeatureCollection":ve=hy;break;default:ve=r1;break}return ve(ie,de)}function hy(ie,se){return{type:"FeatureCollection",features:ie.features.map(function(de){return dy(de,se)})}}function dy(ie,se){return{type:"Feature",id:ie.id,properties:ie.properties,geometry:r1(ie.geometry,se)}}function Cg(ie,se){return{type:"GeometryCollection",geometries:ie.geometries.map(function(de){return r1(de,se)})}}function r1(ie,se){if(!ie)return null;if(ie.type==="GeometryCollection")return Cg(ie,se);var de;switch(ie.type){case"Point":de=Pp;break;case"MultiPoint":de=Pp;break;case"LineString":de=Dg;break;case"MultiLineString":de=Dg;break;case"Polygon":de=Ip;break;case"MultiPolygon":de=Ip;break;case"Sphere":de=Ip;break;default:return null}return t.geoStream(ie,se(de)),de.result()}var pl=[],Xc=[],Pp={point:function(ie,se){pl.push([ie,se])},result:function(){var ie=pl.length?pl.length<2?{type:"Point",coordinates:pl[0]}:{type:"MultiPoint",coordinates:pl}:null;return pl=[],ie}},Dg={lineStart:cd,point:function(ie,se){pl.push([ie,se])},lineEnd:function(){pl.length&&(Xc.push(pl),pl=[])},result:function(){var ie=Xc.length?Xc.length<2?{type:"LineString",coordinates:Xc[0]}:{type:"MultiLineString",coordinates:Xc}:null;return Xc=[],ie}},Ip={polygonStart:cd,lineStart:cd,point:function(ie,se){pl.push([ie,se])},lineEnd:function(){var ie=pl.length;if(ie){do pl.push(pl[0].slice());while(++ie<4);Xc.push(pl),pl=[]}},polygonEnd:cd,result:function(){if(!Xc.length)return null;var ie=[],se=[];return Xc.forEach(function(de){Lp(de)?ie.push([de]):se.push(de)}),se.forEach(function(de){var ve=de[0];ie.some(function(ke){if(kg(ke[0],ve))return ke.push(de),!0})||ie.push([de])}),Xc=[],ie.length?ie.length>1?{type:"MultiPolygon",coordinates:ie}:{type:"Polygon",coordinates:ie[0]}:null}};function Rp(ie){var se=ie(b,0)[0]-ie(-b,0)[0];function de(ve,ke){var Me=i(ve)0?ve-_:ve+_,ke),Ze=(Pe[0]-Pe[1])*x,it=(Pe[0]+Pe[1])*x;if(Me)return[Ze,it];var Xe=se*x,at=Ze>0^it>0?-1:1;return[at*Ze-d(it)*Xe,at*it-d(Ze)*Xe]}return ie.invert&&(de.invert=function(ve,ke){var Me=(ve+ke)*x,Pe=(ke-ve)*x,Ze=i(Me)<.5*se&&i(Pe)<.5*se;if(!Ze){var it=se*x,Xe=Me>0^Pe>0?-1:1,at=-Xe*ve+(Pe>0?1:-1)*it,xt=-Xe*ke+(Me>0?1:-1)*it;Me=(-at-xt)*x,Pe=(at-xt)*x}var It=ie.invert(Me,Pe);return Ze||(It[0]+=Me>0?_:-_),It}),t.geoProjection(de).rotate([-90,-90,45]).clipAngle(180-.001)}function Ae(){return Rp(Zt).scale(176.423)}function qe(){return Rp(ma).scale(111.48)}function et(ie,se){if(!(0<=(se=+se)&&se<=20))throw new Error("invalid digits");function de(Xe){var at=Xe.length,xt=2,It=new Array(at);for(It[0]=+Xe[0].toFixed(se),It[1]=+Xe[1].toFixed(se);xt2||Gt[0]!=at[0]||Gt[1]!=at[1])&&(xt.push(Gt),at=Gt)}return xt.length===1&&Xe.length>1&&xt.push(de(Xe[Xe.length-1])),xt}function Me(Xe){return Xe.map(ke)}function Pe(Xe){if(Xe==null)return Xe;var at;switch(Xe.type){case"GeometryCollection":at={type:"GeometryCollection",geometries:Xe.geometries.map(Pe)};break;case"Point":at={type:"Point",coordinates:de(Xe.coordinates)};break;case"MultiPoint":at={type:Xe.type,coordinates:ve(Xe.coordinates)};break;case"LineString":at={type:Xe.type,coordinates:ke(Xe.coordinates)};break;case"MultiLineString":case"Polygon":at={type:Xe.type,coordinates:Me(Xe.coordinates)};break;case"MultiPolygon":at={type:"MultiPolygon",coordinates:Xe.coordinates.map(Me)};break;default:return Xe}return Xe.bbox!=null&&(at.bbox=Xe.bbox),at}function Ze(Xe){var at={type:"Feature",properties:Xe.properties,geometry:Pe(Xe.geometry)};return Xe.id!=null&&(at.id=Xe.id),Xe.bbox!=null&&(at.bbox=Xe.bbox),at}if(ie!=null)switch(ie.type){case"Feature":return Ze(ie);case"FeatureCollection":{var it={type:"FeatureCollection",features:ie.features.map(Ze)};return ie.bbox!=null&&(it.bbox=ie.bbox),it}default:return Pe(ie)}return ie}function Ye(ie){var se=v(ie);function de(ve,ke){var Me=se?m(ve*se/2)/se:ve/2;if(!ke)return[2*Me,-ie];var Pe=2*n(Me*v(ke)),Ze=1/m(ke);return[v(Pe)*Ze,ke+(1-o(Pe))*Ze-ie]}return de.invert=function(ve,ke){if(i(ke+=ie)g&&--Ze>0);var It=ve*(Xe=m(Pe)),Gt=m(i(ke)0?b:-b)*(it+ke*(at-Pe)/2+ke*ke*(at-2*it+Pe)/2)]}Qt.invert=function(ie,se){var de=se/b,ve=de*90,ke=f(18,i(ve/5)),Me=c(0,l(ke));do{var Pe=jt[Me][1],Ze=jt[Me+1][1],it=jt[f(19,Me+2)][1],Xe=it-Pe,at=it-2*Ze+Pe,xt=2*(i(de)-Ze)/Xe,It=at/Xe,Gt=xt*(1-It*xt*(1-2*It*xt));if(Gt>=0||Me===1){ve=(se>=0?5:-5)*(Gt+ke);var or=50,Mr;do ke=f(18,i(ve)/5),Me=l(ke),Gt=ke-Me,Pe=jt[Me][1],Ze=jt[Me+1][1],it=jt[f(19,Me+2)][1],ve-=(Mr=(se>=0?b:-b)*(Ze+Gt*(it-Pe)/2+Gt*Gt*(it-2*Ze+Pe)/2)-se)*E;while(i(Mr)>w&&--or>0);break}}while(--Me>=0);var Gr=jt[Me][0],_i=jt[Me+1][0],on=jt[f(19,Me+2)][0];return[ie/(_i+Gt*(on-Gr)/2+Gt*Gt*(on-2*_i+Gr)/2),ve*S]};function cr(){return t.geoProjection(Qt).scale(152.63)}function yr(ie){function se(de,ve){var ke=o(ve),Me=(ie-1)/(ie-ke*o(de));return[Me*ke*v(de),Me*v(ve)]}return se.invert=function(de,ve){var ke=de*de+ve*ve,Me=F(ke),Pe=(ie-F(1-ke*(ie+1)/(ie-1)))/((ie-1)/Me+Me/(ie-1));return[a(de*Pe,Me*F(1-Pe*Pe)),Me?k(ve*Pe/Me):0]},se}function Rr(ie,se){var de=yr(ie);if(!se)return de;var ve=o(se),ke=v(se);function Me(Pe,Ze){var it=de(Pe,Ze),Xe=it[1],at=Xe*ke/(ie-1)+ve;return[it[0]*ve/at,Xe/at]}return Me.invert=function(Pe,Ze){var it=(ie-1)/(ie-1-Ze*ke);return de.invert(it*Pe,it*Ze*ve)},Me}function nr(){var ie=2,se=0,de=t.geoProjectionMutator(Rr),ve=de(ie,se);return ve.distance=function(ke){return arguments.length?de(ie=+ke,se):ie},ve.tilt=function(ke){return arguments.length?de(ie,se=ke*S):se*E},ve.scale(432.147).clipAngle(D(1/ie)*E-1e-6)}var dr=1e-4,vr=1e4,Pr=-180,$r=Pr+dr,Oi=180,Di=Oi-dr,ji=-90,en=ji+dr,Zr=90,si=Zr-dr;function cn(ie){return ie.length>0}function Dn(ie){return Math.floor(ie*vr)/vr}function wa(ie){return ie===ji||ie===Zr?[0,ie]:[Pr,Dn(ie)]}function Ka(ie){var se=ie[0],de=ie[1],ve=!1;return se<=$r?(se=Pr,ve=!0):se>=Di&&(se=Oi,ve=!0),de<=en?(de=ji,ve=!0):de>=si&&(de=Zr,ve=!0),ve?[se,de]:ie}function Ia(ie){return ie.map(Ka)}function _o(ie,se,de){for(var ve=0,ke=ie.length;ve=Di||at<=en||at>=si){Me[Pe]=Ka(it);for(var xt=Pe+1;xt$r&&Gten&&or=Ze)break;de.push({index:-1,polygon:se,ring:Me=Me.slice(xt-1)}),Me[0]=wa(Me[0][1]),Pe=-1,Ze=Me.length}}}}function ca(ie){var se,de=ie.length,ve={},ke={},Me,Pe,Ze,it,Xe;for(se=0;se0?_-Ze:Ze)*E],Xe=t.geoProjection(ie(Pe)).rotate(it),at=t.geoRotation(it),xt=Xe.center;return delete Xe.rotate,Xe.center=function(It){return arguments.length?xt(at(It)):at.invert(xt())},Xe.clipAngle(90)}function Sl(ie){var se=o(ie);function de(ve,ke){var Me=t.geoGnomonicRaw(ve,ke);return Me[0]*=se,Me}return de.invert=function(ve,ke){return t.geoGnomonicRaw.invert(ve/se,ke)},de}function Du(){return bf([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function bf(ie,se){return Fs(Sl,ie,se)}function Zc(ie){if(!(ie*=2))return t.geoAzimuthalEquidistantRaw;var se=-ie/2,de=-se,ve=ie*ie,ke=m(de),Me=.5/v(de);function Pe(Ze,it){var Xe=D(o(it)*o(Ze-se)),at=D(o(it)*o(Ze-de)),xt=it<0?-1:1;return Xe*=Xe,at*=at,[(Xe-at)/(2*ie),xt*F(4*ve*at-(ve-Xe+at)*(ve-Xe+at))/(2*ie)]}return Pe.invert=function(Ze,it){var Xe=it*it,at=o(F(Xe+(It=Ze+se)*It)),xt=o(F(Xe+(It=Ze+de)*It)),It,Gt;return[a(Gt=at-xt,It=(at+xt)*ke),(it<0?-1:1)*D(F(It*It+Gt*Gt)*Me)]},Pe}function Jf(){return Qu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Qu(ie,se){return Fs(Zc,ie,se)}function Dh(ie,se){if(i(se)g&&--Ze>0);return[d(ie)*(F(ke*ke+4)+ke)*_/4,b*Pe]};function Kc(){return t.geoProjection(n1).scale(127.16)}function py(ie,se,de,ve,ke){function Me(Pe,Ze){var it=de*v(ve*Ze),Xe=F(1-it*it),at=F(2/(1+Xe*o(Pe*=ke)));return[ie*Xe*at*v(Pe),se*it*at]}return Me.invert=function(Pe,Ze){var it=Pe/ie,Xe=Ze/se,at=F(it*it+Xe*Xe),xt=2*k(at/2);return[a(Pe*m(xt),ie*at)/ke,at&&k(Ze*v(xt)/(se*de*at))/ve]},Me}function a1(ie,se,de,ve){var ke=_/3;ie=c(ie,g),se=c(se,g),ie=f(ie,b),se=f(se,_-g),de=c(de,0),de=f(de,100-g),ve=c(ve,g);var Me=de/100+1,Pe=ve/100,Ze=D(Me*o(ke))/ke,it=v(ie)/v(Ze*b),Xe=se/_,at=F(Pe*v(ie/2)/v(se/2)),xt=at/F(Xe*it*Ze),It=1/(at*F(Xe*it*Ze));return py(xt,It,it,Ze,Xe)}function Lg(){var ie=65*S,se=60*S,de=20,ve=200,ke=t.geoProjectionMutator(a1),Me=ke(ie,se,de,ve);return Me.poleline=function(Pe){return arguments.length?ke(ie=+Pe*S,se,de,ve):ie*E},Me.parallels=function(Pe){return arguments.length?ke(ie,se=+Pe*S,de,ve):se*E},Me.inflation=function(Pe){return arguments.length?ke(ie,se,de=+Pe,ve):de},Me.ratio=function(Pe){return arguments.length?ke(ie,se,de,ve=+Pe):ve},Me.scale(163.775)}function o1(){return Lg().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Lh=4*_+3*F(3),Pg=2*F(2*_*F(3)/Lh),Bp=fe(Pg*F(3)/_,Pg,Lh/6);function qp(){return t.geoProjection(Bp).scale(176.84)}function fd(ie,se){return[ie*F(1-3*se*se/(_*_)),se]}fd.invert=function(ie,se){return[ie/F(1-3*se*se/(_*_)),se]};function Op(){return t.geoProjection(fd).scale(152.63)}function hd(ie,se){var de=o(se),ve=o(ie)*de,ke=1-ve,Me=o(ie=a(v(ie)*de,-v(se))),Pe=v(ie);return de=F(1-ve*ve),[Pe*de-Me*ke,-Me*de-Pe*ke]}hd.invert=function(ie,se){var de=(ie*ie+se*se)/-2,ve=F(-de*(2+de)),ke=se*de+ie*ve,Me=ie*de-se*ve,Pe=F(Me*Me+ke*ke);return[a(ve*ke,Pe*(1+de)),Pe?-k(ve*Me/Pe):0]};function s1(){return t.geoProjection(hd).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Ig(ie,se){var de=X(ie,se);return[(de[0]+ie/b)/2,(de[1]+se)/2]}Ig.invert=function(ie,se){var de=ie,ve=se,ke=25;do{var Me=o(ve),Pe=v(ve),Ze=v(2*ve),it=Pe*Pe,Xe=Me*Me,at=v(de),xt=o(de/2),It=v(de/2),Gt=It*It,or=1-Xe*xt*xt,Mr=or?D(Me*xt)*F(Gr=1/or):Gr=0,Gr,_i=.5*(2*Mr*Me*It+de/b)-ie,on=.5*(Mr*Pe+ve)-se,mn=.5*Gr*(Xe*Gt+Mr*Me*xt*it)+.5/b,Tn=Gr*(at*Ze/4-Mr*Pe*It),Pn=.125*Gr*(Ze*It-Mr*Pe*Xe*at),no=.5*Gr*(it*xt+Mr*Gt*Me)+.5,Do=Tn*Pn-no*mn,fa=(on*Tn-_i*no)/Do,us=(_i*Pn-on*mn)/Do;de-=fa,ve-=us}while((i(fa)>g||i(us)>g)&&--ke>0);return[de,ve]};function _c(){return t.geoProjection(Ig).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=$,e.geoAiryRaw=O,e.geoAitoff=K,e.geoAitoffRaw=X,e.geoArmadillo=q,e.geoArmadilloRaw=G,e.geoAugust=N,e.geoAugustRaw=J,e.geoBaker=j,e.geoBakerRaw=H,e.geoBerghaus=te,e.geoBerghausRaw=Q,e.geoBertin1953=Se,e.geoBertin1953Raw=oe,e.geoBoggs=Te,e.geoBoggsRaw=pe,e.geoBonne=Le,e.geoBonneRaw=me,e.geoBottomley=Je,e.geoBottomleyRaw=Ne,e.geoBromley=mt,e.geoBromleyRaw=rt,e.geoChamberlin=Ue,e.geoChamberlinRaw=bt,e.geoChamberlinAfrica=Oe,e.geoCollignon=$e,e.geoCollignonRaw=je,e.geoCraig=Ve,e.geoCraigRaw=Ie,e.geoCraster=Wt,e.geoCrasterRaw=_t,e.geoCylindricalEqualArea=fr,e.geoCylindricalEqualAreaRaw=Ht,e.geoCylindricalStereographic=Ot,e.geoCylindricalStereographicRaw=lr,e.geoEckert1=Cr,e.geoEckert1Raw=Jt,e.geoEckert2=Qe,e.geoEckert2Raw=Ge,e.geoEckert3=gt,e.geoEckert3Raw=nt,e.geoEckert4=Ft,e.geoEckert4Raw=ht,e.geoEckert5=Ut,e.geoEckert5Raw=hr,e.geoEckert6=jr,e.geoEckert6Raw=Lr,e.geoEisenlohr=Ii,e.geoEisenlohrRaw=Fr,e.geoFahey=la,e.geoFaheyRaw=ln,e.geoFoucaut=pn,e.geoFoucautRaw=mo,e.geoFoucautSinusoidal=gn,e.geoFoucautSinusoidalRaw=zn,e.geoGilbert=as,e.geoGingery=Us,e.geoGingeryRaw=ro,e.geoGinzburg4=Ml,e.geoGinzburg4Raw=el,e.geoGinzburg5=dl,e.geoGinzburg5Raw=Au,e.geoGinzburg6=ot,e.geoGinzburg6Raw=Fe,e.geoGinzburg8=kt,e.geoGinzburg8Raw=lt,e.geoGinzburg9=zt,e.geoGinzburg9Raw=er,e.geoGringorten=ni,e.geoGringortenRaw=Zt,e.geoGuyou=fo,e.geoGuyouRaw=ma,e.geoHammer=Ee,e.geoHammerRaw=ue,e.geoHammerRetroazimuthal=ms,e.geoHammerRetroazimuthalRaw=ko,e.geoHealpix=ys,e.geoHealpixRaw=No,e.geoHill=rl,e.geoHillRaw=tl,e.geoHomolosine=yc,e.geoHomolosineRaw=Su,e.geoHufnagel=Za,e.geoHufnagelRaw=$l,e.geoHyperelliptical=du,e.geoHyperellipticalRaw=Cs,e.geoInterrupt=Jo,e.geoInterruptedBoggs=Uv,e.geoInterruptedHomolosine=c0,e.geoInterruptedMollweide=wh,e.geoInterruptedMollweideHemispheres=f0,e.geoInterruptedSinuMollweide=Th,e.geoInterruptedSinusoidal=h0,e.geoKavrayskiy7=rd,e.geoKavrayskiy7Raw=td,e.geoLagrange=Hv,e.geoLagrangeRaw=Gv,e.geoLarrivee=Ah,e.geoLarriveeRaw=bp,e.geoLaskowski=Ds,e.geoLaskowskiRaw=Zu,e.geoLittrow=ku,e.geoLittrowRaw=Ho,e.geoLoximuthal=Mh,e.geoLoximuthalRaw=id,e.geoMiller=jv,e.geoMillerRaw=d0,e.geoModifiedStereographic=mf,e.geoModifiedStereographicRaw=bg,e.geoModifiedStereographicAlaska=Wv,e.geoModifiedStereographicGs48=Eh,e.geoModifiedStereographicGs50=_g,e.geoModifiedStereographicMiller=nd,e.geoModifiedStereographicLee=_p,e.geoMollweide=ae,e.geoMollweideRaw=ee,e.geoMtFlatPolarParabolic=wg,e.geoMtFlatPolarParabolicRaw=ad,e.geoMtFlatPolarQuartic=ay,e.geoMtFlatPolarQuarticRaw=Tg,e.geoMtFlatPolarSinusoidal=Xv,e.geoMtFlatPolarSinusoidalRaw=Xf,e.geoNaturalEarth2=Tp,e.geoNaturalEarth2Raw=Zf,e.geoNellHammer=od,e.geoNellHammerRaw=xc,e.geoInterruptedQuarticAuthalic=Ag,e.geoNicolosi=Mg,e.geoNicolosiRaw=Zv,e.geoPatterson=p0,e.geoPattersonRaw=Mp,e.geoPolyconic=Eg,e.geoPolyconicRaw=kh,e.geoPolyhedral=sd,e.geoPolyhedralButterfly=Ch,e.geoPolyhedralCollignon=fy,e.geoPolyhedralWaterman=Dp,e.geoProject=t1,e.geoGringortenQuincuncial=Ae,e.geoPeirceQuincuncial=qe,e.geoPierceQuincuncial=qe,e.geoQuantize=et,e.geoQuincuncial=Rp,e.geoRectangularPolyconic=Tt,e.geoRectangularPolyconicRaw=Ye,e.geoRobinson=cr,e.geoRobinsonRaw=Qt,e.geoSatellite=nr,e.geoSatelliteRaw=Rr,e.geoSinuMollweide=Mu,e.geoSinuMollweideRaw=hu,e.geoSinusoidal=we,e.geoSinusoidalRaw=ze,e.geoStitch=yo,e.geoTimes=Da,e.geoTimesRaw=pi,e.geoTwoPointAzimuthal=bf,e.geoTwoPointAzimuthalRaw=Sl,e.geoTwoPointAzimuthalUsa=Du,e.geoTwoPointEquidistant=Qu,e.geoTwoPointEquidistantRaw=Zc,e.geoTwoPointEquidistantUsa=Jf,e.geoVanDerGrinten=Fh,e.geoVanDerGrintenRaw=Dh,e.geoVanDerGrinten2=Fg,e.geoVanDerGrinten2Raw=zp,e.geoVanDerGrinten3=Ox,e.geoVanDerGrinten3Raw=i1,e.geoVanDerGrinten4=Kc,e.geoVanDerGrinten4Raw=n1,e.geoWagner=Lg,e.geoWagner7=o1,e.geoWagnerRaw=a1,e.geoWagner4=qp,e.geoWagner4Raw=Bp,e.geoWagner6=Op,e.geoWagner6Raw=fd,e.geoWiechel=s1,e.geoWiechelRaw=hd,e.geoWinkel3=_c,e.geoWinkel3Raw=Ig,Object.defineProperty(e,"__esModule",{value:!0})}))});var dGe=W((MJr,hGe)=>{"use strict";var ll=gi(),oee=tt(),Zlr=xi(),Y4=Math.PI/180,B_=180/Math.PI,lee={cursor:"pointer"},uee={cursor:"auto"};function Klr(e,t){var r=e.projection,i;return t._isScoped?i=Jlr:t._isClipped?i=eur:i=Qlr,i(e,r)}hGe.exports=Klr;function cee(e,t){return ll.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function fee(e,t,r){var i=e.id,n=e.graphDiv,a=n.layout,o=a[i],s=n._fullLayout,l=s[i],u={},c={};function f(h,p){u[i+"."+h]=oee.nestedProperty(o,h).get(),Zlr.call("_storeDirectGUIEdit",a,s._preGUI,u);var d=oee.nestedProperty(l,h);d.get()!==p&&(d.set(p),oee.nestedProperty(o,h).set(p),c[i+"."+h]=p)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),n.emit("plotly_relayout",c)}function Jlr(e,t){var r=cee(e,t);function i(){ll.select(this).style(lee)}function n(){t.scale(ll.event.scale).translate(ll.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function a(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){ll.select(this).style(uee),fee(e,t,a)}return r.on("zoomstart",i).on("zoom",n).on("zoomend",o),r}function Qlr(e,t){var r=cee(e,t),i=2,n,a,o,s,l,u,c,f,h;function p(_){return t.invert(_)}function d(_){var b=p(_);if(!b)return!0;var M=t(b);return Math.abs(M[0]-_[0])>i||Math.abs(M[1]-_[1])>i}function v(){ll.select(this).style(lee);let{x:_,y:b,width:M,height:x}=this.getBBox();n=ll.event.sourceEvent?ll.mouse(this):[_+M/2,b+x/2],a=t.rotate(),o=t.translate(),s=a,l=p(n)}function m(){let{x:_,y:b,width:M,height:x}=this.getBBox();if(u=ll.event.sourceEvent?ll.mouse(this):[_+M/2,b+x/2],d(n)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(ll.event.scale),t.translate([o[0],ll.event.translate[1]]),l?p(u)&&(f=p(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(n=u,l=p(n)),h=!0,e.render(!0);var A=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-A[0]})}function g(){ll.select(this).style(uee),h&&fee(e,t,w)}function w(_){var b=t.rotate(),M=t.invert(e.midPt);_("projection.rotation.lon",-b[0]),_("center.lon",M[0]),_("center.lat",M[1])}return r.on("zoomstart",v).on("zoom",m).on("zoomend",g),r}function eur(e,t){var r={r:t.rotate(),k:t.scale()},i=cee(e,t),n=lur(i,"zoomstart","zoom","zoomend"),a=0,o=i.on,s;i.on("zoomstart",function(){ll.select(this).style(lee);let{x:h,y:p,width:d,height:v}=this.getBBox(),m=ll.event.sourceEvent?ll.mouse(this):[h+d/2,p+v/2],g=t.rotate(),w=g,_=t.translate(),b=tur(g);s=qR(t,m),o.call(i,"zoom",function(){let{x:M,y:x,width:A,height:T}=this.getBBox(),y=ll.event.sourceEvent?ll.mouse(this):[M+A/2,x+T/2];if(t.scale(r.k=ll.event.scale),!s)m=y,s=qR(t,m);else if(qR(t,y)){t.rotate(g).translate(_);var E=qR(t,y),S=iur(s,E),C=aur(rur(b,S)),k=r.r=nur(C,s,w);(!isFinite(k[0])||!isFinite(k[1])||!isFinite(k[2]))&&(k=w),t.rotate(k),w=k}u(n.of(this,arguments))}),l(n.of(this,arguments))}).on("zoomend",function(){ll.select(this).style(uee),o.call(i,"zoom",null),c(n.of(this,arguments)),fee(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var p=t.rotate();h("projection.rotation.lon",-p[0]),h("projection.rotation.lat",-p[1])}return ll.rebind(i,n,"on")}function qR(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&our(r)}function tur(e){var t=.5*e[0]*Y4,r=.5*e[1]*Y4,i=.5*e[2]*Y4,n=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i);return[a*s*u+n*o*l,n*s*u-a*o*l,a*o*u+n*s*l,a*s*l-n*o*u]}function rur(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-i*s-n*l-a*u,r*s+i*o+n*u-a*l,r*l-i*u+n*o+a*s,r*u+i*l-n*s+a*o]}function iur(e,t){if(!(!e||!t)){var r=sur(e,t),i=Math.sqrt(fGe(r,r)),n=.5*Math.acos(Math.max(-1,Math.min(1,fGe(e,t)))),a=Math.sin(n)/i;return i&&[Math.cos(n),r[2]*a,-r[1]*a,r[0]*a]}}function nur(e,t,r){var i=see(t,2,e[0]);i=see(i,1,e[1]),i=see(i,0,e[2]-r[2]);var n=t[0],a=t[1],o=t[2],s=i[0],l=i[1],u=i[2],c=Math.atan2(a,n)*B_,f=Math.sqrt(n*n+a*a),h,p;Math.abs(l)>f?(p=(l>0?90:-90)-c,h=0):(p=Math.asin(l/f)*B_-c,h=Math.sqrt(f*f-l*l));var d=180-p-2*c,v=(Math.atan2(u,s)-Math.atan2(o,h))*B_,m=(Math.atan2(u,s)-Math.atan2(o,-h))*B_,g=uGe(r[0],r[1],p,v),w=uGe(r[0],r[1],d,m);return g<=w?[p,v,r[2]]:[d,m,r[2]]}function uGe(e,t,r,i){var n=cGe(r-e),a=cGe(i-t);return Math.sqrt(n*n+a*a)}function cGe(e){return(e%360+540)%360-180}function see(e,t,r){var i=r*Y4,n=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(i),l=Math.sin(i);return n[a]=e[a]*s-e[o]*l,n[o]=e[o]*s+e[a]*l,n}function aur(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*B_,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*B_,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*B_]}function our(e){var t=e[0]*Y4,r=e[1]*Y4,i=Math.cos(r);return[i*Math.cos(t),i*Math.sin(t),Math.sin(r)]}function fGe(e,t){for(var r=0,i=0,n=e.length;i{"use strict";var X1=gi(),pee=DR(),uur=pee.geoPath,cur=pee.geoDistance,fur=lGe(),hur=xi(),qE=tt(),dur=qE.strTranslate,OR=ti(),BE=Qi(),pGe=Is(),pur=Qo(),dee=Yi(),{concatExtremes:vur,getAutoRange:vGe,makePadFn:gGe}=Yp(),hee=Ef(),gur=xu().prepSelect,mur=xu().clearOutline,yur=xu().selectOnClick,xur=dGe(),ph=(LE(),Pt(FE)),vee=Am(),{unwrapLonRange:bur}=vee,yGe=xR(),_ur=NQ().feature;function xGe(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var Av=xGe.prototype;bGe.exports=function(t){return new xGe(t)};Av.plot=function(e,t,r,i){var n=this;if(i)return n.update(e,t,!0);n._geoCalcData=e,n._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in ph.layerNameToAdjective)if(l!=="frame"&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==i.scope)&&this.saveViewInitial(i)}this.scope=i.scope,this.updateBaseLayers(t,i),this.updateDims(t,i),this.updateFx(t,i),pur.generalUpdatePerTraceModule(this.graphDiv,this,e,i);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Av.updateProjection=function(e,t){var r=this.graphDiv,i=t[this.id],n=t._size,a=i.domain,o=i.projection,s=i.lonaxis,l=i.lataxis,u=s._ax,c=l._ax,f=this.projection=wur(i),h=[[n.l+n.w*a.x[0],n.t+n.h*(1-a.y[1])],[n.l+n.w*a.x[1],n.t+n.h*(1-a.y[0])]],p=i.center||{},d=o.rotation||{},v=s.range||[],m=l.range||[];if(i.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=vGe(r,u),c.range=vGe(r,c);let F=[];for(let G of e){let q=G[0].trace;q.visible===!0&&q._module.fitCoords&&F.push(q._module.fitCoords(G,i))}let P=vur(r,u),R=P.min.reduce((G,{val:q})=>Math.min(G,q),1/0),I=P.max.reduce((G,{val:q})=>Math.max(G,q),-1/0)-R,B=vee.boundsOfCoords(F.flat()),[O,,$]=B||[],X=$-O;if(!!B&&(I>360||I<360&&XMath.max(j,G(Q)),0),N=P.max.reduce((j,Q)=>Math.max(j,q(Q)),0),V=u._length-J-N,Y=V>u._length/10?X*u._length/V:X,H=(O+$)/2;u.range=[H-Y/2,H+Y/2]}var g=(u.range[0]+u.range[1])/2,w=(c.range[0]+c.range[1])/2;if(i._isScoped)p={lon:g,lat:w};else if(i._isClipped){p={lon:g,lat:w},d={lon:g,lat:w,roll:d.roll};var _=o.type,b=ph.lonaxisSpan[_]/2||180,M=ph.lataxisSpan[_]/2||90;v=[g-b,g+b],m=[w-M,w+M]}else p={lon:g,lat:w},d={lon:g,lat:d.lat,roll:d.roll}}f.center([p.lon-d.lon,p.lat-d.lat]).rotate([-d.lon,-d.lat,d.roll]).parallels(o.parallels);var x=mGe(v,m);f.fitExtent(h,x);var A=this.bounds=f.getBounds(x),T=this.fitScale=f.scale(),y=f.translate();if(f.scaleExtent=()=>{var R;let{minscale:F}=o,P=(R=o.maxscale)!=null?R:1/0;return[T*Math.min(F,P),T*Math.max(F,P)]},i.fitbounds){var E=f.getBounds(mGe(u.range,c.range)),S=Math.min((A[1][0]-A[0][0])/(E[1][0]-E[0][0]),(A[1][1]-A[0][1])/(E[1][1]-E[0][1]));isFinite(S)?f.scale(S*T):qE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*T);var C=this.midPt=[(A[0][0]+A[1][0])/2,(A[0][1]+A[1][1])/2];if(f.translate([y[0]+(C[0]-y[0]),y[1]+(C[1]-y[1])]).clipExtent(A),i._isAlbersUsa){var k=f([p.lon,p.lat]);if(k){var D=f.translate();f.translate([D[0]-(k[0]-D[0]),D[1]-(k[1]-D[1])])}}};Av.updateBaseLayers=function(e,t){var r=this,i=r.topojson,n=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!ph.lineLayers[h]}function l(h){return!!ph.fillLayers[h]}var u=this.hasChoropleth?ph.layersForChoropleth:ph.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete n[h],delete a[h],X1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var p=n[h]=X1.select(this);h==="bg"?r.bgRect=p.append("rect").style("pointer-events","all"):o(h)?a[h]=p.append("path").style("fill","none"):h==="backplot"?p.append("g").classed("choroplethlayer",!0):h==="frontplot"?p.append("g").classed("scatterlayer",!0):s(h)?a[h]=p.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=p.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var p=a[h],d=ph.layerNameToAdjective[h];h==="frame"?p.datum(ph.sphereSVG):s(h)||l(h)?p.datum(_ur(i,i.objects[h])):o(h)&&p.datum(Tur(h,t,e)).call(OR.stroke,t[h].gridcolor).call(BE.dashLine,t[h].griddash,t[h].gridwidth),s(h)?p.call(OR.stroke,t[d+"color"]).call(BE.dashLine,"",t[d+"width"]):l(h)&&p.call(OR.fill,t[d+"color"])})};Av.updateDims=function(e,t){var r=this.bounds,i=(t.framewidth||0)/2,n=r[0][0]-i,a=r[0][1]-i,o=r[1][0]-n+i,s=r[1][1]-a+i;BE.setRect(this.clipRect,n,a,o,s),this.bgRect.call(BE.setRect,n,a,o,s).call(OR.fill,t.bgcolor),this.xaxis._offset=n,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};Av.updateFx=function(e,t){var r=this,i=r.graphDiv,n=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var p in f)h[r.id+"."+p]=f[p];hur.call("_guiRelayout",i,h),i.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var p=f.range={};p[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var d=f.lassoPoints={};d[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:i,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&mur(i)}};if(a==="pan"){n.node().onmousedown=null;let f=xur(r,t);if(n.call(f),!X1.event){let h=r.projection.scale(),[p,d]=r.projection.scaleExtent();(hd)&&f.event(n)}n.on("dblclick.zoom",s),i._context._scrollZoom.geo||n.on("wheel.zoom",null)}else(a==="select"||a==="lasso")&&(n.on(".zoom",null),c.prepFn=function(f,h,p){gur(f,h,p,c,a)},hee.init(c));n.on("mousemove",function(){var f=r.projection.invert(qE.getPositionFromD3Event());if(!f)return hee.unhover(i,X1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},pGe.hover(i,X1.event,r.id)}),n.on("mouseout",function(){i._dragging||hee.unhover(i,X1.event)}),n.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&yur(X1.event,i,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&pGe.click(i,X1.event))})};Av.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,i="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=X1.select(e.container).append("g").attr("class","geo "+e.id).call(BE.setClipUrl,i,t),e.project=function(n){var a=e.projection(n);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(n){return e.project(n)[0]}},e.yaxis={_id:"y",c2p:function(n){return e.project(n)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},dee.setConvert(e.mockAxis,r)};Av.saveViewInitial=function(e){var t=e.center||{},r=e.projection,i=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var n;e._isScoped?n={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?n={"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat,"center.lon":t.lon,"center.lat":t.lat}:n={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":i.lon},qE.extendFlat(this.viewInitial,n)};Av.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Av._render=function(){var e=this.projection,t=e.getPath(),r;function i(a){var o=e(a.lonlat);return o?dur(o[0],o[1]):null}function n(a){return e.isLonLatOverEdges(a.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",n).attr("transform",i)};function wur(e){var t=e.projection,r=t.type,i=ph.projNames[r];i="geo"+qE.titleCase(i);for(var n=pee[i]||fur[i],a=n(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?ph.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;ud}else return!1},a.getPath=function(){return uur().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(ph.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-ph.clipPad),a}function Tur(e,t,r){var i=1e-6,n=2.5,a=t[e],o=ph.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(w,_){return[w,_]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(w,_){return[_,w]});var c={type:"linear",range:[s[0],s[1]-i],tick0:a.tick0,dtick:a.dtick};dee.setConvert(c,r);var f=dee.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,p=new Array(h),d=0;d{"use strict";var Z4=Yl(),Aur=ds().attributes,Mur=zu().dash,X4=(LE(),Pt(FE)),Sur=hs().overrideAll,wGe=(Qx(),Pt(Jx)).default,TGe={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:Z4.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:Mur},Eur=AGe.exports=Sur({domain:Aur({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:wGe(X4.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:wGe(X4.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:Z4.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:X4.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:X4.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:X4.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:X4.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:Z4.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:Z4.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:Z4.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:Z4.background},lonaxis:TGe,lataxis:TGe},"plot","from-root");Eur.uirevision={valType:"any",editType:"none"}});var EGe=W((kJr,SGe)=>{"use strict";var NR=tt(),kur=Kb(),Cur=Mc().getSubplotData,{unwrapLonRange:Dur}=Am(),OE=(LE(),Pt(FE)),Fur=gee(),MGe=OE.axesNames;SGe.exports=function(t,r,i){kur(t,r,i,{type:"geo",attributes:Fur,handleDefaults:Lur,fullData:i,partition:"y"})};function Lur(e,t,r,i){var n=Cur(i.fullData,"geo",i.id),a=n.map(function(B){return B.index}),o=r("resolution"),s=r("scope"),l=OE.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",p=t._isConic=u.indexOf("conic")!==-1||u==="albers",d=t._isClipped=!!OE.lonaxisSpan[u];if(e.visible===!1){var v=NR.extendDeep({},t._template);v.showcoastlines=!1,v.showcountries=!1,v.showframe=!1,v.showlakes=!1,v.showland=!1,v.showocean=!1,v.showrivers=!1,v.showsubunits=!1,v.lonaxis&&(v.lonaxis.showgrid=!1),v.lataxis&&(v.lataxis.showgrid=!1),t._template=v}for(var m=r("visible"),g,w=0;wJ[N]!=null)||OE.fitboundsIncompatible.has(u)?t.fitbounds=!1:G.forEach(({dst:J,key:N})=>J&&(J[N]=null))}}});var mee=W((CJr,DGe)=>{"use strict";var Pur=Mc().getSubplotCalcData,Iur=tt().counterRegex,Rur=_Ge(),Z1="geo",kGe=Iur(Z1),CGe={};CGe[Z1]={valType:"subplotid",dflt:Z1,editType:"calc"};function zur(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[Z1],n=0;n{"use strict";FGe.exports={attributes:W4(),supplyDefaults:nVe(),colorbar:Cc(),formatLabels:sVe(),calc:OQ(),calcGeoJSON:RR().calcGeoJSON,fitCoords:RR().fitCoords,plot:RR().plot,style:ree(),styleOnSelect:lh().styleOnSelect,hoverPoints:QVe(),eventData:tGe(),selectPoints:nGe(),moduleType:"trace",name:"scattergeo",basePlotModule:mee(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var IGe=W((FJr,PGe)=>{"use strict";PGe.exports=LGe()});var NE=W((LJr,BGe)=>{"use strict";var{hovertemplateAttrs:Our,templatefallbackAttrs:Nur}=Wa(),N2=W4(),Uur=Fo(),RGe=Ja(),Vur=Yl().defaultLine,O2=an().extendFlat,zGe=N2.marker.line;BGe.exports=O2({locations:{valType:"data_array",editType:"calc"},locationmode:N2.locationmode,z:{valType:"data_array",editType:"calc"},geojson:O2({},N2.geojson,{}),featureidkey:N2.featureidkey,text:O2({},N2.text,{}),hovertext:O2({},N2.hovertext,{}),marker:{line:{color:O2({},zGe.color,{dflt:Vur}),width:O2({},zGe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:N2.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:N2.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:O2({},RGe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:Our(),hovertemplatefallback:Nur(),showlegend:O2({},RGe.showlegend,{dflt:!1})},Uur("",{cLetter:"z",editTypeOverride:"calc"}))});var OGe=W((PJr,qGe)=>{"use strict";var UR=tt(),Gur=Bu(),Hur=NE();qGe.exports=function(t,r,i,n){function a(h,p){return UR.coerce(t,r,Hur,h,p)}var o=a("locations"),s=a("z");if(!(o&&o.length&&UR.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a("geojson"),u;(typeof l=="string"&&l!==""||UR.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),Gur(t,r,n,a,{prefix:"",cLetter:"z"}),UR.coerceSelectionMarkerOpacity(r,a)}});var yee=W((IJr,VGe)=>{"use strict";var NGe=hn(),jur=(ra(),Pt(ia)).BADNUM,$ur=rf(),Wur=L1(),Yur=C0();function UGe(e){return e&&typeof e=="string"}VGe.exports=function(t,r){var i=r._length,n=new Array(i),a;r.geojson?a=function(c){return UGe(c)||NGe(c)}:a=UGe;for(var o=0;o{"use strict";var Xur=gi(),Zur=ti(),xee=Qi(),Kur=es();function Jur(e,t){t&&GGe(e,t)}function GGe(e,t){var r=t[0].trace,i=t[0].node3,n=i.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=Kur.makeColorScaleFuncFromTrace(r);n.each(function(l){Xur.select(this).attr("fill",s(l.z)).call(Zur.stroke,l.mlc||o.color).call(xee.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),xee.selectedPointStyle(n,r)}function Qur(e,t){var r=t[0].node3,i=t[0].trace;i.selectedpoints?xee.selectedPointStyle(r.selectAll(".choroplethlocation"),i):GGe(e,t)}HGe.exports={style:Jur,styleOnSelect:Qur}});var GR=W((zJr,WGe)=>{"use strict";var ecr=gi(),jGe=tt(),q_=Am(),tcr=xR().getTopojsonFeatures,$Ge=Yp().findExtremes,rcr=VR().style;function icr(e,t,r){var i=t.layers.backplot.select(".choroplethlayer");jGe.makeTraceGroups(i,r,"trace choropleth").each(function(n){var a=ecr.select(this),o=a.selectAll("path.choroplethlocation").data(jGe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),rcr(e,n)})}function ncr(e,t){var r=e[0].trace,i=t[r.geo],n=i._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?q_.extractTraceFeature(e):tcr(r,n.topojson);let l=q_.fitGeojsonBbox(r,i);for(var u=[],c=[],f=0;f{"use strict";var ocr=Yi(),scr=NE(),lcr=tt().fillText,{ANTIMERIDIAN_LON_SHIFT:ucr}=Am();YGe.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.subplot,s,l,u,c,f=[r,i];let h=[r+ucr,i];for(l=0;l")}}});var _ee=W((qJr,XGe)=>{"use strict";XGe.exports=function(t,r,i,n,a){t.location=r.location,t.z=r.z;var o=n[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var wee=W((OJr,ZGe)=>{"use strict";ZGe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";KGe.exports={attributes:NE(),supplyDefaults:OGe(),colorbar:F5(),calc:yee(),calcGeoJSON:GR().calcGeoJSON,fitCoords:GR().fitCoords,plot:GR().plot,style:VR().style,styleOnSelect:VR().styleOnSelect,hoverPoints:bee(),eventData:_ee(),selectPoints:wee(),moduleType:"trace",name:"choropleth",basePlotModule:mee(),categories:["geo","noOpacity","showLegend"],meta:{}}});var eHe=W((UJr,QGe)=>{"use strict";QGe.exports=JGe()});var HR=W((VJr,rHe)=>{"use strict";var fcr=xi(),U0=tt(),hcr=s5(),dcr=Qi();function pcr(e,t,r,i){var n=e.cd,a=n[0].t,o=n[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),p=e.distance,d;if(a.tree){var v=s.p2c(f-p),m=s.p2c(f+p),g=l.p2c(h-p),w=l.p2c(h+p);i==="x"?d=a.tree.range(Math.min(v,m),Math.min(l._rl[0],l._rl[1]),Math.max(v,m),Math.max(l._rl[0],l._rl[1])):d=a.tree.range(Math.min(v,m),Math.min(g,w),Math.max(v,m),Math.max(g,w))}else d=a.ids;var _,b,M,x,A,T,y,E,S,C=p;if(i==="x"){var k=!!o.xperiodalignment,D=!!o.yperiodalignment;for(A=0;A=Math.min(F,P)&&f<=Math.max(F,P)?0:1/0}if(T<=C){if(C=T,x=c[_],y=l.c2p(x)-h,D){var R=l.c2p(o._yStarts[_]),L=l.c2p(o._yEnds[_]);y=h>=Math.min(R,L)&&h<=Math.max(R,L)?0:1/0}S=Math.sqrt(T*T+y*y),b=d[A]}}}else for(A=0;Axcr,SYMBOL_SDF_SIZE:()=>gcr,SYMBOL_SIZE:()=>mcr,SYMBOL_STROKE:()=>ycr,TOO_MANY_POINTS:()=>vcr});var vcr,gcr,mcr,ycr,xcr,N_=Ci(()=>{"use strict";vcr=1e5,gcr=200,mcr=20,ycr=1,xcr={solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}});var UE=W((GJr,oHe)=>{"use strict";var bcr=Ja(),_cr=jo(),wcr=C1(),zs=Ws(),iHe=Ts().axisHoverFormat,nHe=Fo(),Tcr=(Qx(),Pt(Jx)).default,Tee=an().extendFlat,Acr=hs().overrideAll,Mcr=(N_(),Pt(O_)).DASHES,aHe=zs.line,Mm=zs.marker,Scr=Mm.line,U2=oHe.exports=Acr({x:zs.x,x0:zs.x0,dx:zs.dx,y:zs.y,y0:zs.y0,dy:zs.dy,xperiod:zs.xperiod,yperiod:zs.yperiod,xperiod0:zs.xperiod0,yperiod0:zs.yperiod0,xperiodalignment:zs.xperiodalignment,yperiodalignment:zs.yperiodalignment,xhoverformat:iHe("x"),yhoverformat:iHe("y"),text:zs.text,hovertext:zs.hovertext,textposition:zs.textposition,textfont:_cr({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:aHe.color,width:aHe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:Tcr(Mcr),dflt:"solid"}},marker:Tee({},nHe("marker"),{symbol:Mm.symbol,angle:Mm.angle,size:Mm.size,sizeref:Mm.sizeref,sizemin:Mm.sizemin,sizemode:Mm.sizemode,opacity:Mm.opacity,colorbar:Mm.colorbar,line:Tee({},nHe("marker.line"),{width:Scr.width})}),connectgaps:zs.connectgaps,fill:Tee({},zs.fill,{dflt:"none"}),fillcolor:wcr(),selected:{marker:zs.selected.marker,textfont:zs.selected.textfont},unselected:{marker:zs.unselected.marker,textfont:zs.unselected.textfont},opacity:bcr.opacity},"calc","nested");U2.x.editType=U2.y.editType=U2.x0.editType=U2.y0.editType="calc+clearAxisTypes";U2.hovertemplate=zs.hovertemplate;U2.hovertemplatefallback=zs.hovertemplatefallback;U2.texttemplate=zs.texttemplate;U2.texttemplatefallback=zs.texttemplatefallback});var jR=W(Aee=>{"use strict";var{symbolNumber:sHe}=Qi();Aee.isOpenSymbol=e=>sHe(e)%200>=100;Aee.isDotSymbol=e=>sHe(e)>=200});var cHe=W((jJr,uHe)=>{"use strict";var lHe=tt(),Ecr=xi(),kcr=jR(),Ccr=UE(),Dcr=(k1(),Pt(E1)),$R=Wo(),Fcr=Lb(),Lcr=ev(),Pcr=Dd(),Icr=tv(),Rcr=F1(),zcr=rv();uHe.exports=function(t,r,i,n){function a(p,d){return lHe.coerce(t,r,Ccr,p,d)}var o=t.marker?kcr.isOpenSymbol(t.marker.symbol):!1,s=$R.isBubble(t),l=Fcr(t,r,n,a);if(!l){r.visible=!1;return}Lcr(t,r,n,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var Bcr=QF();fHe.exports=function(t,r,i){var n=t.i;return"x"in t||(t.x=r._x[n]),"y"in t||(t.y=r._y[n]),Bcr(t,r,i)}});var pHe=W((WJr,dHe)=>{"use strict";function qcr(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,n=o-1):i=o+1}return a}function Ocr(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,n=o-1):i=o+1}return a}function Ncr(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,i=o+1):n=o-1}return a}function Ucr(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,i=o+1):n=o-1}return a}function Vcr(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?i=a+1:n=a-1}return-1}function VE(e,t,r,i,n,a){return typeof r=="function"?a(e,t,r,i===void 0?0:i|0,n===void 0?e.length-1:n|0):a(e,t,void 0,r===void 0?0:r|0,i===void 0?e.length-1:i|0)}dHe.exports={ge:function(e,t,r,i,n){return VE(e,t,r,i,n,qcr)},gt:function(e,t,r,i,n){return VE(e,t,r,i,n,Ocr)},lt:function(e,t,r,i,n){return VE(e,t,r,i,n,Ncr)},le:function(e,t,r,i,n){return VE(e,t,r,i,n,Ucr)},eq:function(e,t,r,i,n){return VE(e,t,r,i,n,Vcr)}}});var Mee=W((YJr,vHe)=>{vHe.exports=Gcr;function Gcr(e,t,r){return tr?r:e:et?t:e}});var K1=W((XJr,mHe)=>{"use strict";mHe.exports=function(t,r,i){var n={},a,o;if(typeof r=="string"&&(r=gHe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var Hcr=K1();yHe.exports=jcr;function jcr(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=Hcr(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var U_=W((KJr,xHe)=>{"use strict";xHe.exports=$cr;function $cr(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),i=0;in&&(n=e[o]),e[o]{"use strict";bHe.exports=function(){for(var t=0;t{wHe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var V_=W((eQr,AHe)=>{var THe=WR();AHe.exports=Wcr;function Wcr(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var i=e[0].length,n=e.length*i,a,o,s,l;(!t||typeof t=="string")&&(t=new(THe(t||"float32"))(n+r));var u=t.length-r;if(n!==u)throw new Error("source length "+n+" ("+i+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a{"use strict";MHe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var kHe=W((rQr,EHe)=>{"use strict";EHe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var RHe=W((iQr,IHe)=>{"use strict";var CHe=pHe(),DHe=Mee(),Ycr=K4(),Xcr=U_(),FHe=K1(),Eee=_He(),Zcr=V_(),Kcr=SHe(),Jcr=WR(),LHe=kHe(),Qcr=1073741824;IHe.exports=function(t,r){r||(r={}),t=Zcr(t,"float64"),r=FHe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let i=Eee(r.maxDepth,255),n=Eee(r.bounds,Xcr(t,2));n[0]===n[2]&&n[2]++,n[1]===n[3]&&n[3]++;let a=PHe(t,n),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(Jcr(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let g=0;gi||x>Qcr){for(let L=0;L$||y>X||E=C||B===O)return;let K=l[I];O===void 0&&(O=K.length);for(let Q=B;Q=b&&ue<=x&&ge>=M&&ge<=A&&k.push(te)}let G=u[I],q=G[B*4+0],J=G[B*4+1],N=G[B*4+2],V=G[B*4+3],Y=F(G,B+1),H=L*.5,j=I+1;D(P,R,H,j,q,J||N||V||Y),D(P,R+H,H,j,J,N||V||Y),D(P+H,R,H,j,N,V||Y),D(P+H,R+H,H,j,V,Y)}function F(P,R){let L=null,I=0;for(;L===null;)if(L=P[R*4+I],I++,I>P.length)return null;return L}return k}function v(g,w,_,b,M){let x=[];for(let A=0;A{"use strict";zHe.exports=RHe()});var qHe=W((aQr,BHe)=>{BHe.exports=tfr;var kee={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},efr=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function tfr(e){var t=[];return e.replace(efr,function(r,i,n){var a=i.toLowerCase();for(n=ifr(n),a=="m"&&n.length>2&&(t.push([i].concat(n.splice(0,2))),a="l",i=i=="m"?"l":"L");;){if(n.length==kee[a])return n.unshift(i),t.push(n);if(n.length{OHe.exports=nfr;function nfr(e){var t=0,r=0,i=0,n=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=i,a[7]+=n;break;case"v":a[1]+=n;break;case"h":a[1]+=i;break;default:for(var l=1;l{"use strict";Object.defineProperty(XR,"__esModule",{value:!0});var afr=(function(){function e(t,r){var i=[],n=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(i.push(l.value),!(r&&i.length===r));n=!0);}catch(u){a=!0,o=u}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}return i}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),GE=Math.PI*2,Cee=function(t,r,i,n,a,o,s){var l=t.x,u=t.y;l*=r,u*=i;var c=n*l-a*u,f=a*l+n*u;return{x:c+o,y:f+s}},ofr=function(t,r){var i=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),n=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:n-a*i,y:a+n*i},{x:o+s*i,y:s-o*i},{x:o,y:s}]},UHe=function(t,r,i,n){var a=t*n-r*i<0?-1:1,o=t*i+r*n;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},sfr=function(t,r,i,n,a,o,s,l,u,c,f,h){var p=Math.pow(a,2),d=Math.pow(o,2),v=Math.pow(f,2),m=Math.pow(h,2),g=p*d-p*m-d*v;g<0&&(g=0),g/=p*m+d*v,g=Math.sqrt(g)*(s===l?-1:1);var w=g*a/o*h,_=g*-o/a*f,b=c*w-u*_+(t+i)/2,M=u*w+c*_+(r+n)/2,x=(f-w)/a,A=(h-_)/o,T=(-f-w)/a,y=(-h-_)/o,E=UHe(1,0,x,A),S=UHe(x,A,T,y);return l===0&&S>0&&(S-=GE),l===1&&S<0&&(S+=GE),[b,M,E,S]},lfr=function(t){var r=t.px,i=t.py,n=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,p=h===void 0?0:h,d=[];if(o===0||s===0)return[];var v=Math.sin(u*GE/360),m=Math.cos(u*GE/360),g=m*(r-n)/2+v*(i-a)/2,w=-v*(r-n)/2+m*(i-a)/2;if(g===0&&w===0)return[];o=Math.abs(o),s=Math.abs(s);var _=Math.pow(g,2)/Math.pow(o,2)+Math.pow(w,2)/Math.pow(s,2);_>1&&(o*=Math.sqrt(_),s*=Math.sqrt(_));var b=sfr(r,i,n,a,o,s,f,p,v,m,g,w),M=afr(b,4),x=M[0],A=M[1],T=M[2],y=M[3],E=Math.abs(y)/(GE/4);Math.abs(1-E)<1e-7&&(E=1);var S=Math.max(Math.ceil(E),1);y/=S;for(var C=0;C{"use strict";jHe.exports=cfr;var ufr=GHe();function cfr(e){for(var t,r=[],i=0,n=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f4?(i=p[p.length-4],n=p[p.length-3]):(i=u,n=c),r.push(p)}return r}function ZR(e,t,r,i){return["C",e,t,r,i,r,i]}function HHe(e,t,r,i,n,a){return["C",e/3+2/3*r,t/3+2/3*i,n/3+2/3*r,a/3+2/3*i,n,a]}});var Dee=W((lQr,WHe)=>{"use strict";WHe.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var XHe=W((uQr,YHe)=>{"use strict";var ffr=qHe(),hfr=NHe(),dfr=$He(),pfr=Dee();YHe.exports=vfr;function vfr(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!pfr(e))throw Error("String is not an SVG path.");e=ffr(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=hfr(e),e=dfr(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,i=e.length;rt[2]&&(t[2]=n[a+0]),n[a+1]>t[3]&&(t[3]=n[a+1]);return t}});var QHe=W((cQr,JHe)=>{"use strict";JHe.exports=gfr;var HE=1e20;function gfr(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,n=t.channel||0,a,o,s,l,u,c,f,h,p,d,v;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,p=f.getImageData(0,0,a,o),l=p.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,p=f.getImageData(0,0,a,o),l=p.data,c=4):window.ImageData&&e instanceof window.ImageData&&(p=e,a=e.width,o=e.height,l=p.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),d=0,v=Math.floor(u.length/c);dije});function ije(e,t={}){if(!(0,tje.default)(e))throw Error("Invalid SVG path");let r,i;t.shape||Array.isArray(t)?[r,i]=t.shape||t:(r=Fee.width=t.width||t.w||200,i=Fee.height=t.height||t.h||200);let n=Math.min(r,i),a=t.stroke||0,o=t.viewbox||t.viewBox||(0,eje.default)(e),s=[r/(o[2]-o[0]),i/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;Mv.fillStyle="black",Mv.fillRect(0,0,r,i),Mv.fillStyle="white",a&&(typeof a!="number"&&(a=1),Mv.strokeStyle=a>0?"white":"black",Mv.lineWidth=Math.abs(a)),Mv.translate(r*.5,i*.5),Mv.scale(l,l);let u=new Path2D(e);return Mv.fill(u),a&&Mv.stroke(u),Mv.setTransform(1,0,0,1,0,0),(0,rje.default)(Mv,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:n*.5})}var eje,tje,rje,Fee,Mv,aje=Ci(()=>{eje=l1(XHe()),tje=l1(Dee()),rje=l1(QHe()),Fee=document.createElement("canvas"),Mv=Fee.getContext("2d",{willReadFrequently:!0})});var j_=W((fQr,gje)=>{"use strict";var JR=hn(),mfr=(aje(),Pt(nje)).default,{normalize:KR,rgbaString:H_}=ti(),yfr=xi(),eT=tt(),Ul=eT.isArrayOrTypedArray,J4=Qi(),oje=Ls(),sje=_m().formatColor,Q4=Wo(),xfr=MA(),Pee=jR(),jE=(N_(),Pt(O_)),bfr=(Ng(),Pt(Og)).DESELECTDIM,lje={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},_fr=ah().appendArrayPointValue;function wfr(e,t){var r,i={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},n=e._context.plotGlPixelRatio;if(t.visible!==!0)return i;if(Q4.hasText(t)&&(i.text=vje(e,t),i.textSel=cje(e,t,t.selected),i.textUnsel=cje(e,t,t.unselected)),Q4.hasMarkers(t)&&(i.marker=Ree(e,t),i.markerSel=Iee(e,t,t.selected),i.markerUnsel=Iee(e,t,t.unselected),!t.unselected&&Ul(t.marker.opacity))){var a=t.marker.opacity;for(i.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function Ree(e,t){var r=t._length,i=t.marker,n={},a,o=Ul(i.symbol),s=Ul(i.angle),l=Ul(i.color),u=Ul(i.line.color),c=Ul(i.opacity),f=Ul(i.size),h=Ul(i.line.width),p;if(o||(p=Pee.isOpenSymbol(i.symbol)),o||l||u||c||s){n.symbols=new Array(r),n.angles=new Array(r),n.colors=new Array(r),n.borderColors=new Array(r);var d=i.symbol,v=i.angle,m=sje(i,i.opacity,r),g=sje(i.line,i.opacity,r);if(!Ul(g[0])){var w=g;for(g=Array(r),a=0;ajE.TOO_MANY_POINTS||Q4.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o1?l[o]:l[0]:l,p=Ul(u)?u.length>1?u[o]:u[0]:u,d=lje[h],v=lje[p],m=c?c/.8+1:0,g=-v*m-v*.5;a.offset[o]=[d*m/f,g/f]}}return a}gje.exports={style:wfr,markerStyle:Ree,markerSelection:Iee,linePositions:Afr,errorBarPositions:Mfr,textPosition:Sfr}});var zee=W((dQr,mje)=>{"use strict";var QR=tt();mje.exports=function(t,r){var i=r._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(i=r._scene={},i.init=function(){QR.extendFlat(i,a,n)},i.init(),i.update=function(s){var l=QR.repeat(s,i.count);if(i.fill2d&&i.fill2d.update(l),i.scatter2d&&i.scatter2d.update(l),i.line2d&&i.line2d.update(l),i.error2d&&i.error2d.update(l.concat(l)),i.select2d&&i.select2d.update(l),i.glText)for(var u=0;u{"use strict";var Efr=YR(),tT=tt(),yje=Ls(),kfr=Yp().findExtremes,xje=iv(),Bee=Ld(),Cfr=Bee.calcMarkerSize,Dfr=Bee.calcAxisExpansion,Ffr=Bee.setFirstScatter,Lfr=Fd(),rT=j_(),Pfr=zee(),bje=(ra(),Pt(ia)).BADNUM,Ifr=(N_(),Pt(O_)).TOO_MANY_POINTS;wje.exports=function(t,r){var i=t._fullLayout,n=r._xA=yje.getFromId(t,r.xaxis,"x"),a=r._yA=yje.getFromId(t,r.yaxis,"y"),o=i._plots[r.xaxis+r.yaxis],s=r._length,l=s>=Ifr,u=s*2,c={},f,h=n.makeCalcdata(r,"x"),p=a.makeCalcdata(r,"y"),d=xje(r,n,"x",h),v=xje(r,a,"y",p),m=d.vals,g=v.vals;r._x=m,r._y=g,r.xperiodalignment&&(r._origX=h,r._xStarts=d.starts,r._xEnds=d.ends),r.yperiodalignment&&(r._origY=p,r._yStarts=v.starts,r._yEnds=v.ends);var w=new Array(u),_=new Array(s);for(f=0;f1&&tT.extendFlat(o.line,rT.linePositions(e,r,i)),o.errorX||o.errorY){var s=rT.errorBarPositions(e,r,i,n,a);o.errorX&&tT.extendFlat(o.errorX,s.x),o.errorY&&tT.extendFlat(o.errorY,s.y)}return o.text&&(tT.extendFlat(o.text,{positions:i},rT.textPosition(e,r,o.text,o.marker)),tT.extendFlat(o.textSel,{positions:i},rT.textPosition(e,r,o.text,o.markerSel)),tT.extendFlat(o.textUnsel,{positions:i},rT.textPosition(e,r,o.text,o.markerUnsel))),o}});var qee=W((vQr,Mje)=>{"use strict";var Aje=tt(),zfr=ti(),Bfr=(Ng(),Pt(Og)).DESELECTDIM;function qfr(e){var t=e[0],r=t.trace,i=t.t,n=i._scene,a=i.index,o=n.selectBatch[a],s=n.unselectBatch[a],l=n.textOptions[a],u=n.textSelectedOptions[a]||{},c=n.textUnselectedOptions[a]||{},f=Aje.extendFlat({},l),h,p;if(o.length||s.length){var d=u.color,v=c.color,m=l.color,g=Aje.isArrayOrTypedArray(m);for(f.color=new Array(r._length),h=0;h{"use strict";var Sje=Wo(),Ofr=qee().styleTextSelection;Eje.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l=i[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,p=l.index;if(!h)return o;var d=Sje.hasText(s),v=Sje.hasMarkers(s),m=!v&&!d;if(s.visible!==!0||m)return o;var g=[],w=[];if(r!==!1&&!r.degenerate)for(var _=0;_{"use strict";var Nfr=HR();kje.exports={moduleType:"trace",name:"scattergl",basePlotModule:xl(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:UE(),supplyDefaults:cHe(),crossTraceDefaults:_$(),colorbar:Cc(),formatLabels:hHe(),calc:Tje(),hoverPoints:Nfr.hoverPoints,selectPoints:Oee(),meta:{}}});var Fje=W((yQr,Dje)=>{"use strict";Dje.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Rje=W((xQr,Ije)=>{"use strict";var Lje=Fje();Ije.exports=Ufr;var Pje={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Ufr(e){var t,r=[],i=1,n;if(typeof e=="string")if(e=e.toLowerCase(),Lje[e])r=Lje[e].slice(),n="rgb";else if(e==="transparent")i=0,n="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;i=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(i=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(i=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),n="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",a=l.replace(/a$/,"");n=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,p){if(/%$/.test(h))return p===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[p]==="h"){if(/deg$/.test(h))return parseFloat(h);if(Pje[h]!==void 0)return Pje[h]}return parseFloat(h)}),l===a&&r.push(1),i=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],n="rgb",i=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(n="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),i=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(i/=100)):(n="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:n,values:r,alpha:i}}});var Bje=W((bQr,zje)=>{"use strict";var Vfr=Rje();zje.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,i,n,a=Vfr(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]==="h"&&(r=Gfr(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function Gfr(e){var t=e[0]/360,r=e[1]/100,i=e[2]/100,n,a,o,s,l,u=0;if(r===0)return l=i*255,[l,l,l];for(a=i<.5?i*(1+r):i+r-i*r,n=2*i-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?n+(a-n)*6*o:2*o<1?a:3*o<2?n+(a-n)*(2/3-o)*6:n,s[u++]=l*255;return s}});var $E=W((_Qr,qje)=>{"use strict";var Hfr=Bje(),jfr=WR();qje.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var i=jfr(r),n=new i(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=Hfr(t),t[0]/=255,t[1]/=255,t[2]/=255),$fr(t)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]!=null?t[3]:255,a&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(a?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]!=null?t[3]:1):(n[0]=Math.min(Math.max(Math.floor(t[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(t[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(t[2]*255),0),255),n[3]=t[3]==null?255:Math.min(Math.max(Math.floor(t[3]*255),0),255)),n)};function $fr(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var Nje=W((wQr,tz)=>{"use strict";var ez=Mee();tz.exports=Oje;tz.exports.to=Oje;tz.exports.from=Wfr;function Oje(e,t){t==null&&(t=!0);var r=e[0],i=e[1],n=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,i*=255,n*=255,a*=255),r=ez(r,0,255)&255,i=ez(i,0,255)&255,n=ez(n,0,255)&255,a=ez(a,0,255)&255;var o=r*16777216+(i<<16)+(n<<8)+a;return o}function Wfr(e,t){e=+e;var r=e>>>24,i=(e&16711680)>>>16,n=(e&65280)>>>8,a=e&255;return t===!1?[r,i,n,a]:[r/255,i/255,n/255,a/255]}});var Vje=W((TQr,Uje)=>{Uje.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i{"use strict";Gje.exports=function(t,r,i){Array.isArray(i)||(i=[].slice.call(arguments,2));for(var n=0,a=i.length;n{"use strict";iT.exports=WE;iT.exports.float32=iT.exports.float=WE;iT.exports.fract32=iT.exports.fract=Yfr;var Hje=new Float32Array(1);function Yfr(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=WE(e));for(var r=0,i=t.length;r{"use strict";var Xfr=$E(),Zfr=U_(),Kfr=Nje(),Jfr=YR(),iz=Vje(),Qfr=K1(),ehr=Nee(),thr=V_(),nz=rz(),rhr=K4(),ihr=Rc;function Rc(e,t){if(!(this instanceof Rc))return new Rc(e,t);typeof e=="function"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;let r=e._gl,i,n=[],a={},o=[],s=[null],l=[null],u=255,c=100;this.tooManyColors=!1,i=e.texture({data:new Uint8Array(u*4),width:u,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),Object.assign(this,{regl:e,gl:r,groups:o,markerCache:l,markerTextures:s,palette:n,paletteIds:a,paletteTexture:i,maxColors:u,maxSize:c,canvas:r.canvas}),this.update(t);let f={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:(d,v)=>[this.tooManyColors?0:u,i.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:i},attributes:{x:(d,v)=>v.xAttr||{buffer:v.positionBuffer,stride:8,offset:0},y:(d,v)=>v.yAttr||{buffer:v.positionBuffer,stride:8,offset:4},xFract:(d,v)=>v.xAttr?{constant:[0,0]}:{buffer:v.positionFractBuffer,stride:8,offset:0},yFract:(d,v)=>v.yAttr?{constant:[0,0]}:{buffer:v.positionFractBuffer,stride:8,offset:4},size:(d,v)=>v.size.length?{buffer:v.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(v.size*255/this.maxSize)]},borderSize:(d,v)=>v.borderSize.length?{buffer:v.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(v.borderSize*255/this.maxSize)]},colorId:(d,v)=>v.color.length?{buffer:v.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?n.slice(v.color*4,v.color*4+4):[v.color]},borderColorId:(d,v)=>v.borderColor.length?{buffer:v.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?n.slice(v.borderColor*4,v.borderColor*4+4):[v.borderColor]},isActive:(d,v)=>v.activation===!0?{constant:[1]}:v.activation?v.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},h=Object.assign({},f);h.frag=iz([`precision highp float; #define GLSLIFY 1 uniform float opacity; uniform sampler2D markerTexture; varying vec4 fragColor, fragBorderColor; varying float fragWidth, fragBorderColorLevel, fragColorLevel; float smoothStep(float x, float y) { return 1.0 / (1.0 + exp(50.0*(x - y))); } void main() { float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth; // max-distance alpha if (dist < 0.003) discard; // null-border case if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) { float colorAmt = smoothstep(.5 - delta, .5 + delta, dist); gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity); } else { float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist); float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist); vec4 color = fragBorderColor; color.a *= borderColorAmt; color = mix(color, fragColor, colorAmt); color.a *= opacity; gl_FragColor = color; } } `]),h.vert=iz([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; // \`invariant\` effectively turns off optimizations for the position. // We need this because -fast-math on M1 Macs is re-ordering // floating point operations in a way that causes floating point // precision limits to put points in the wrong locations. invariant gl_Position; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 scale, scaleFract, translate, translateFract, paletteSize; uniform sampler2D paletteTexture; const float maxSize = 100.; const float borderLevel = .5; varying vec4 fragColor, fragBorderColor; varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = 2. * size * pointSizeScale; fragPointSize = size * pixelRatio; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragColor = color; fragBorderColor = borderColor; fragWidth = 1. / gl_PointSize; fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } `]),this.drawMarker=e(h);let p=Object.assign({},f);p.frag=iz([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; uniform float opacity; float smoothStep(float edge0, float edge1, float x) { float t; t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); return t * t * (3.0 - 2.0 * t); } void main() { float radius, alpha = 1.0, delta = fragWidth; radius = length(2.0 * gl_PointCoord.xy - 1.0); if (radius > 1.0 + delta) { discard; } alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); float borderRadius = fragBorderRadius; float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); vec4 color = mix(fragColor, fragBorderColor, ratio); color.a *= alpha * opacity; gl_FragColor = color; } `]),p.vert=iz([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; // \`invariant\` effectively turns off optimizations for the position. // We need this because -fast-math on M1 Macs is re-ordering // floating point operations in a way that causes floating point // precision limits to put points in the wrong locations. invariant gl_Position; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; uniform sampler2D paletteTexture; const float maxSize = 100.; varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = (size + borderSize) * pointSizeScale; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); fragColor = color; fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } `]),this.drawCircle=e(p)}Rc.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};Rc.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this};Rc.prototype.draw=function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.drawItem(a)});return this};Rc.prototype.drawItem=function(e,t){let{groups:r}=this,i=r[e];if(typeof t=="number"&&(e=t,i=r[t],t=null),!(i&&i.count&&i.opacity))return;i.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,i,t));let n=[];for(let a=1;a{let f=i[c];if(u===void 0)return f;u===null?u={positions:null}:typeof u=="function"?u={ondraw:u}:typeof u[0]=="number"&&(u={positions:u}),u=Qfr(u,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),u.positions===null&&(u.positions=[]),u.tooManyColors!=null&&(this.tooManyColors=u.tooManyColors),f||(i[c]=f={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:a.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},u=Object.assign({},Rc.defaults,u)),u.positions&&!("marker"in u)&&(u.marker=f.marker,delete f.marker),u.marker&&!("positions"in u)&&(u.positions=f.positions,delete f.positions);let h=0,p=0;if(ehr(f,u,[{snap:!0,size:(d,v)=>(d==null&&(d=Rc.defaults.size),h+=d&&d.length?1:0,d),borderSize:(d,v)=>(d==null&&(d=Rc.defaults.borderSize),h+=d&&d.length?1:0,d),opacity:parseFloat,color:(d,v)=>(d==null&&(d=Rc.defaults.color),d=this.updateColor(d),p++,d),borderColor:(d,v)=>(d==null&&(d=Rc.defaults.borderColor),d=this.updateColor(d),p++,d),bounds:(d,v,m)=>("range"in m||(m.range=null),d),positions:(d,v,m)=>{let{snap:g}=v,{positionBuffer:w,positionFractBuffer:_,selectionBuffer:b}=v;if(d.x||d.y)return d.x.length?v.xAttr={buffer:a.buffer(d.x),offset:0,stride:4,count:d.x.length}:v.xAttr={buffer:d.x.buffer,offset:d.x.offset*4||0,stride:(d.x.stride||1)*4,count:d.x.count},d.y.length?v.yAttr={buffer:a.buffer(d.y),offset:0,stride:4,count:d.y.length}:v.yAttr={buffer:d.y.buffer,offset:d.y.offset*4||0,stride:(d.y.stride||1)*4,count:d.y.count},v.count=Math.max(v.xAttr.count,v.yAttr.count),d;d=thr(d,"float64");let M=v.count=Math.floor(d.length/2),x=v.bounds=M?Zfr(d,2):null;if(!m.range&&!v.range&&(delete v.range,m.range=x),!m.marker&&!v.marker&&(delete v.marker,m.marker=null),g&&(g===!0||M>g)?v.tree=Jfr(d,{bounds:x}):g&&g.length&&(v.tree=g),v.tree){let y={primitive:"points",usage:"static",data:v.tree,type:"uint32"};v.elements?v.elements(y):v.elements=a.elements(y)}var A=nz.float32(d);w({data:A,usage:"dynamic"});var T=nz.fract32(d,A);return _({data:T,usage:"dynamic"}),b({data:new Uint8Array(M),type:"uint8",usage:"stream"}),d}},{marker:(d,v,m)=>{let{activation:g}=v;if(g.forEach(w=>w&&w.destroy&&w.destroy()),g.length=0,!d||typeof d[0]=="number"){let w=this.addMarker(d);g[w]=!0}else{let w=[];for(let _=0,b=Math.min(d.length,v.count);_{let g=v.bounds;if(g)return d||(d=g),v.scale=[1/(d[2]-d[0]),1/(d[3]-d[1])],v.translate=[-d[0],-d[1]],v.scaleFract=nz.fract(v.scale),v.translateFract=nz.fract(v.translate),d},viewport:d=>rhr(d||[n.drawingBufferWidth,n.drawingBufferHeight])}]),h){let{count:d,size:v,borderSize:m,sizeBuffer:g}=f,w=new Uint8Array(d*2);if(v.length||m.length)for(let _=0;_=0)return n;let a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(let s=0,l=e.length;si*4&&(this.tooManyColors=!0),this.updatePalette(r),n.length===1?n[0]:n};Rc.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,i=Math.ceil(e.length*.25/t);if(i>1){e=e.slice();for(let n=e.length*.25%t;n{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(t=>t&&t.destroy&&t.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this};var nhr=function(e,t){var r=new ihr(e,t),i=r.render.bind(r);return Object.assign(i,{render:i,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),i};jje.exports=nhr});var Hu=W((EQr,Wje)=>{"use strict";var $je=Object.getOwnPropertySymbols,ahr=Object.prototype.hasOwnProperty,ohr=Object.prototype.propertyIsEnumerable;function shr(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function lhr(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(a){n[a]=a}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}Wje.exports=lhr()?Object.assign:function(e,t){for(var r,i=shr(e),n,a=1;a{"use strict";jee.exports=sz;jee.exports.default=sz;function sz(e,t,r){r=r||2;var i=t&&t.length,n=i?t[0]*r:e.length,a=Xje(e,0,n,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,p;if(i&&(a=dhr(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var d=r;du&&(u=f),h>c&&(c=h);p=Math.max(u-s,c-l),p=p!==0?32767/p:0}return YE(a,o,r,s,l,p,0),o}function Xje(e,t,r,i,n){var a,o;if(n===Hee(e,t,r,i)>0)for(a=t;a=t;a-=i)o=Yje(a,e[a],e[a+1],o);return o&&lz(o,o.next)&&(ZE(o),o=o.next),o}function $_(e,t){if(!e)return e;t||(t=e);var r=e,i;do if(i=!1,!r.steiner&&(lz(r,r.next)||Vl(r.prev,r,r.next)===0)){if(ZE(r),r=t=r.prev,r===r.next)break;i=!0}else r=r.next;while(i||r!==t);return t}function YE(e,t,r,i,n,a,o){if(e){!o&&a&&yhr(e,i,n,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?chr(e,i,n,a):uhr(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),ZE(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=fhr($_(e),t,r),YE(e,t,r,i,n,a,2)):o===2&&hhr(e,t,r,i,n,a):YE($_(e),t,r,i,n,a,1);break}}}}function uhr(e){var t=e.prev,r=e,i=e.next;if(Vl(t,r,i)>=0)return!1;for(var n=t.x,a=r.x,o=i.x,s=t.y,l=r.y,u=i.y,c=na?n>o?n:o:a>o?a:o,p=s>l?s>u?s:u:l>u?l:u,d=i.next;d!==t;){if(d.x>=c&&d.x<=h&&d.y>=f&&d.y<=p&&nT(n,s,a,l,o,u,d.x,d.y)&&Vl(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function chr(e,t,r,i){var n=e.prev,a=e,o=e.next;if(Vl(n,a,o)>=0)return!1;for(var s=n.x,l=a.x,u=o.x,c=n.y,f=a.y,h=o.y,p=sl?s>u?s:u:l>u?l:u,m=c>f?c>h?c:h:f>h?f:h,g=Vee(p,d,t,r,i),w=Vee(v,m,t,r,i),_=e.prevZ,b=e.nextZ;_&&_.z>=g&&b&&b.z<=w;){if(_.x>=p&&_.x<=v&&_.y>=d&&_.y<=m&&_!==n&&_!==o&&nT(s,c,l,f,u,h,_.x,_.y)&&Vl(_.prev,_,_.next)>=0||(_=_.prevZ,b.x>=p&&b.x<=v&&b.y>=d&&b.y<=m&&b!==n&&b!==o&&nT(s,c,l,f,u,h,b.x,b.y)&&Vl(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;_&&_.z>=g;){if(_.x>=p&&_.x<=v&&_.y>=d&&_.y<=m&&_!==n&&_!==o&&nT(s,c,l,f,u,h,_.x,_.y)&&Vl(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;b&&b.z<=w;){if(b.x>=p&&b.x<=v&&b.y>=d&&b.y<=m&&b!==n&&b!==o&&nT(s,c,l,f,u,h,b.x,b.y)&&Vl(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function fhr(e,t,r){var i=e;do{var n=i.prev,a=i.next.next;!lz(n,a)&&Zje(n,i,i.next,a)&&XE(n,a)&&XE(a,n)&&(t.push(n.i/r|0),t.push(i.i/r|0),t.push(a.i/r|0),ZE(i),ZE(i.next),i=e=a),i=i.next}while(i!==e);return $_(i)}function hhr(e,t,r,i,n,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&_hr(o,s)){var l=Kje(o,s);o=$_(o,o.next),l=$_(l,l.next),YE(o,t,r,i,n,a,0),YE(l,t,r,i,n,a,0);return}s=s.next}o=o.next}while(o!==e)}function dhr(e,t,r,i){var n=[],a,o,s,l,u;for(a=0,o=t.length;a=r.next.y&&r.next.y!==r.y){var s=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,o=r.x=r.x&&r.x>=u&&i!==r.x&&nT(no.x||r.x===o.x&&mhr(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function mhr(e,t){return Vl(e.prev,e,t.prev)<0&&Vl(t.next,e,e.next)<0}function yhr(e,t,r,i){var n=e;do n.z===0&&(n.z=Vee(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,xhr(n)}function xhr(e){var t,r,i,n,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,i=r,s=0,t=0;t0||l>0&&i;)s!==0&&(l===0||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;r=i}a.nextZ=null,u*=2}while(o>1);return e}function Vee(e,t,r,i,n){return e=(e-r)*n|0,t=(t-i)*n|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function bhr(e){var t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function _hr(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!whr(e,t)&&(XE(e,t)&&XE(t,e)&&Thr(e,t)&&(Vl(e.prev,e,t.prev)||Vl(e,t.prev,t))||lz(e,t)&&Vl(e.prev,e,e.next)>0&&Vl(t.prev,t,t.next)>0)}function Vl(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function lz(e,t){return e.x===t.x&&e.y===t.y}function Zje(e,t,r,i){var n=oz(Vl(e,t,r)),a=oz(Vl(e,t,i)),o=oz(Vl(r,i,e)),s=oz(Vl(r,i,t));return!!(n!==a&&o!==s||n===0&&az(e,r,t)||a===0&&az(e,i,t)||o===0&&az(r,e,i)||s===0&&az(r,t,i))}function az(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function oz(e){return e>0?1:e<0?-1:0}function whr(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Zje(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function XE(e,t){return Vl(e.prev,e,e.next)<0?Vl(e,t,e.next)>=0&&Vl(e,e.prev,t)>=0:Vl(e,t,e.prev)<0||Vl(e,e.next,t)<0}function Thr(e,t){var r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}function Kje(e,t){var r=new Gee(e.i,e.x,e.y),i=new Gee(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function Yje(e,t,r,i){var n=new Gee(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function ZE(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Gee(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}sz.deviation=function(e,t,r,i){var n=t&&t.length,a=n?t[0]*r:e.length,o=Math.abs(Hee(e,0,a,r));if(n)for(var s=0,l=t.length;s0&&(i+=e[n-1].length,r.holes.push(i))}return r}});var e$e=W((CQr,Qje)=>{"use strict";var Ahr=U_();Qje.exports=Mhr;function Mhr(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=Ahr(e,t));for(var i=0;i{"use strict";t$e.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var n$e=W((FQr,i$e)=>{"use strict";i$e.exports=function(){}});var V2=W((LQr,a$e)=>{"use strict";var Shr=n$e()();a$e.exports=function(e){return e!==Shr&&e!==null}});var $ee=W((PQr,s$e)=>{"use strict";var Ehr=Object.create,khr=Object.getPrototypeOf,o$e={};s$e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||Ehr;return typeof e!="function"?!1:khr(e(t(null),o$e))===o$e}});var Wee=W((IQr,l$e)=>{"use strict";var Chr=V2(),Dhr={function:!0,object:!0};l$e.exports=function(e){return Chr(e)&&Dhr[typeof e]||!1}});var Sm=W((RQr,u$e)=>{"use strict";var Fhr=V2();u$e.exports=function(e){if(!Fhr(e))throw new TypeError("Cannot use null or undefined");return e}});var f$e=W((zQr,c$e)=>{"use strict";var Yee=Object.create,uz;$ee()()||(uz=Xee());c$e.exports=(function(){var e,t,r;return!uz||uz.level!==1?Yee:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(i){if(i==="__proto__"){t[i]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[i]=r}),Object.defineProperties(e,t),Object.defineProperty(uz,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(i,n){return Yee(i===null?e:i,n)})})()});var Xee=W((BQr,h$e)=>{"use strict";var Lhr=Wee(),Phr=Sm(),Ihr=Object.prototype.isPrototypeOf,Rhr=Object.defineProperty,zhr={configurable:!0,enumerable:!1,writable:!0,value:void 0},cz;cz=function(e,t){if(Phr(e),t===null||Lhr(t))return e;throw new TypeError("Prototype must be null or an object")};h$e.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(i,n){return r.call(cz(i,n),n),i}):t=function(i,n){return cz(i,n).__proto__=n,i}:t=function i(n,a){var o;return cz(n,a),o=Ihr.call(i.nullPolyfill,n),o&&delete i.nullPolyfill.__proto__,a===null&&(a=i.nullPolyfill),n.__proto__=a,o&&Rhr(i.nullPolyfill,"__proto__",zhr),n},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(i){try{r=i.set,r.call(e,t)}catch(n){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)})());f$e()});var fz=W((qQr,d$e)=>{"use strict";d$e.exports=$ee()()?Object.setPrototypeOf:Xee()});var v$e=W((OQr,p$e)=>{"use strict";var Bhr=Wee();p$e.exports=function(e){if(!Bhr(e))throw new TypeError(e+" is not an Object");return e}});var m$e=W((NQr,g$e)=>{"use strict";var qhr=Object.create(null),Ohr=Math.random;g$e.exports=function(){var e;do e=Ohr().toString(36).slice(2);while(qhr[e]);return e}});var W_=W((UQr,y$e)=>{"use strict";var Nhr=void 0;y$e.exports=function(e){return e!==Nhr&&e!==null}});var Zee=W((VQr,x$e)=>{"use strict";var Uhr=W_(),Vhr={object:!0,function:!0,undefined:!0};x$e.exports=function(e){return Uhr(e)?hasOwnProperty.call(Vhr,typeof e):!1}});var _$e=W((GQr,b$e)=>{"use strict";var Ghr=Zee();b$e.exports=function(e){if(!Ghr(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var T$e=W((HQr,w$e)=>{"use strict";var Hhr=_$e();w$e.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!Hhr(e)}});var Kee=W((jQr,A$e)=>{"use strict";var jhr=T$e(),$hr=/^\s*class[\s{/}]/,Whr=Function.prototype.toString;A$e.exports=function(e){return!(!jhr(e)||$hr.test(Whr.call(e)))}});var S$e=W(($Qr,M$e)=>{"use strict";M$e.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var k$e=W((WQr,E$e)=>{"use strict";E$e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var D$e=W((YQr,C$e)=>{"use strict";var Yhr=V2(),Xhr=Object.keys;C$e.exports=function(e){return Xhr(Yhr(e)?Object(e):e)}});var L$e=W((XQr,F$e)=>{"use strict";F$e.exports=k$e()()?Object.keys:D$e()});var I$e=W((ZQr,P$e)=>{"use strict";var Zhr=L$e(),Khr=Sm(),Jhr=Math.max;P$e.exports=function(e,t){var r,i,n=Jhr(arguments.length,2),a;for(e=Object(Khr(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},i=1;i{"use strict";R$e.exports=S$e()()?Object.assign:I$e()});var Jee=W((JQr,z$e)=>{"use strict";var Qhr=V2(),e0r=Array.prototype.forEach,t0r=Object.create,r0r=function(e,t){var r;for(r in e)t[r]=e[r]};z$e.exports=function(e){var t=t0r(null);return e0r.call(arguments,function(r){Qhr(r)&&r0r(Object(r),t)}),t}});var q$e=W((QQr,B$e)=>{"use strict";var Qee="razdwatrzy";B$e.exports=function(){return typeof Qee.contains!="function"?!1:Qee.contains("dwa")===!0&&Qee.contains("foo")===!1}});var N$e=W((eei,O$e)=>{"use strict";var i0r=String.prototype.indexOf;O$e.exports=function(e){return i0r.call(this,e,arguments[1])>-1}});var ete=W((tei,U$e)=>{"use strict";U$e.exports=q$e()()?String.prototype.contains:N$e()});var Em=W((rei,j$e)=>{"use strict";var dz=W_(),V$e=Kee(),G$e=hz(),H$e=Jee(),KE=ete(),n0r=j$e.exports=function(e,t){var r,i,n,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],dz(e)?(r=KE.call(e,"c"),i=KE.call(e,"e"),n=KE.call(e,"w")):(r=n=!0,i=!1),o={value:t,configurable:r,enumerable:i,writable:n},a?G$e(H$e(a),o):o};n0r.gs=function(e,t,r){var i,n,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],dz(t)?V$e(t)?dz(r)?V$e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,dz(e)?(i=KE.call(e,"c"),n=KE.call(e,"e")):(i=!0,n=!1),o={get:t,set:r,configurable:i,enumerable:n},a?G$e(H$e(a),o):o}});var JE=W((iei,W$e)=>{"use strict";var $$e=Object.prototype.toString,a0r=$$e.call((function(){return arguments})());W$e.exports=function(e){return $$e.call(e)===a0r}});var QE=W((nei,X$e)=>{"use strict";var Y$e=Object.prototype.toString,o0r=Y$e.call("");X$e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||Y$e.call(e)===o0r)||!1}});var K$e=W((aei,Z$e)=>{"use strict";Z$e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var eWe=W((oei,Q$e)=>{var J$e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};Q$e.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return J$e()}try{return __global__||J$e()}finally{delete Object.prototype.__global__}})()});var ek=W((sei,tWe)=>{"use strict";tWe.exports=K$e()()?globalThis:eWe()});var iWe=W((lei,rWe)=>{"use strict";var s0r=ek(),tte={object:!0,symbol:!0};rWe.exports=function(){var e=s0r.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!tte[typeof e.iterator]||!tte[typeof e.toPrimitive]||!tte[typeof e.toStringTag])}});var aWe=W((uei,nWe)=>{"use strict";nWe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var rte=W((cei,oWe)=>{"use strict";var l0r=aWe();oWe.exports=function(e){if(!l0r(e))throw new TypeError(e+" is not a symbol");return e}});var fWe=W((fei,cWe)=>{"use strict";var sWe=Em(),u0r=Object.create,lWe=Object.defineProperty,c0r=Object.prototype,uWe=u0r(null);cWe.exports=function(e){for(var t=0,r,i;uWe[e+(t||"")];)++t;return e+=t||"",uWe[e]=!0,r="@@"+e,lWe(c0r,r,sWe.gs(null,function(n){i||(i=!0,lWe(this,r,sWe(n)),i=!1)})),r}});var dWe=W((hei,hWe)=>{"use strict";var Sv=Em(),ru=ek().Symbol;hWe.exports=function(e){return Object.defineProperties(e,{hasInstance:Sv("",ru&&ru.hasInstance||e("hasInstance")),isConcatSpreadable:Sv("",ru&&ru.isConcatSpreadable||e("isConcatSpreadable")),iterator:Sv("",ru&&ru.iterator||e("iterator")),match:Sv("",ru&&ru.match||e("match")),replace:Sv("",ru&&ru.replace||e("replace")),search:Sv("",ru&&ru.search||e("search")),species:Sv("",ru&&ru.species||e("species")),split:Sv("",ru&&ru.split||e("split")),toPrimitive:Sv("",ru&&ru.toPrimitive||e("toPrimitive")),toStringTag:Sv("",ru&&ru.toStringTag||e("toStringTag")),unscopables:Sv("",ru&&ru.unscopables||e("unscopables"))})}});var gWe=W((dei,vWe)=>{"use strict";var pWe=Em(),f0r=rte(),tk=Object.create(null);vWe.exports=function(e){return Object.defineProperties(e,{for:pWe(function(t){return tk[t]?tk[t]:tk[t]=e(String(t))}),keyFor:pWe(function(t){var r;f0r(t);for(r in tk)if(tk[r]===t)return r})})}});var xWe=W((pei,yWe)=>{"use strict";var J1=Em(),ite=rte(),pz=ek().Symbol,h0r=fWe(),d0r=dWe(),p0r=gWe(),v0r=Object.create,nte=Object.defineProperties,vz=Object.defineProperty,qf,aT,mWe;if(typeof pz=="function")try{String(pz()),mWe=!0}catch(e){}else pz=null;aT=function(t){if(this instanceof aT)throw new TypeError("Symbol is not a constructor");return qf(t)};yWe.exports=qf=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return mWe?pz(t):(r=v0r(aT.prototype),t=t===void 0?"":String(t),nte(r,{__description__:J1("",t),__name__:J1("",h0r(t))}))};d0r(qf);p0r(qf);nte(aT.prototype,{constructor:J1(qf),toString:J1("",function(){return this.__name__})});nte(qf.prototype,{toString:J1(function(){return"Symbol ("+ite(this).__description__+")"}),valueOf:J1(function(){return ite(this)})});vz(qf.prototype,qf.toPrimitive,J1("",function(){var e=ite(this);return typeof e=="symbol"?e:e.toString()}));vz(qf.prototype,qf.toStringTag,J1("c","Symbol"));vz(aT.prototype,qf.toStringTag,J1("c",qf.prototype[qf.toStringTag]));vz(aT.prototype,qf.toPrimitive,J1("c",qf.prototype[qf.toPrimitive]))});var G2=W((vei,bWe)=>{"use strict";bWe.exports=iWe()()?ek().Symbol:xWe()});var wWe=W((gei,_We)=>{"use strict";var g0r=Sm();_We.exports=function(){return g0r(this).length=0,this}});var oT=W((mei,TWe)=>{"use strict";TWe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var MWe=W((yei,AWe)=>{"use strict";var m0r=W_(),y0r=Zee(),x0r=Object.prototype.toString;AWe.exports=function(e){if(!m0r(e))return null;if(y0r(e)){var t=e.toString;if(typeof t!="function"||t===x0r)return null}try{return""+e}catch(r){return null}}});var EWe=W((xei,SWe)=>{"use strict";SWe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var CWe=W((bei,kWe)=>{"use strict";var b0r=EWe(),_0r=/[\n\r\u2028\u2029]/g;kWe.exports=function(e){var t=b0r(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(_0r,function(r){switch(r){case` `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var FWe=W((_ei,DWe)=>{"use strict";var w0r=MWe(),T0r=CWe();DWe.exports=function(e,t,r){r&&r.errorMessage&&(e=w0r(r.errorMessage));var i=e.indexOf("%v"),n=i>-1?T0r(t):null;if(r&&r.name){var a=e.indexOf("%n");if(a>-1){if(i>-1){var o,s,l,u;return a>i?(o=n,l=i,s=r.name,u=a):(o=r.name,l=a,s=n,u=i),e.slice(0,l)+o+e.slice(l+2,u)+s+e.slice(u+2)}return e.slice(0,a)+r.name+e.slice(a+2)}}return i>-1?e.slice(0,i)+n+e.slice(i+2):e}});var ate=W((wei,LWe)=>{"use strict";var A0r=W_(),M0r=FWe();LWe.exports=function(e,t,r){if(r&&!A0r(e)){if("default"in r)return r.default;if(r.isOptional)return null}var i=r&&r.Error||TypeError,n=new i(M0r(t,e,r));throw r&&r.errorCode&&(n.code=r.errorCode),n}});var IWe=W((Tei,PWe)=>{"use strict";var S0r=ate(),E0r=W_();PWe.exports=function(e){if(E0r(e))return e;var t=arguments[1],r=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return S0r(e,r,t)}});var zWe=W((Aei,RWe)=>{"use strict";var k0r=ate(),C0r=Kee();RWe.exports=function(e){if(C0r(e))return e;var t=arguments[1],r=t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return k0r(e,r,t)}});var qWe=W((Mei,BWe)=>{"use strict";BWe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var NWe=W((Sei,OWe)=>{"use strict";var D0r=Object.prototype.toString,F0r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);OWe.exports=function(e){return typeof e=="function"&&F0r(D0r.call(e))}});var VWe=W((Eei,UWe)=>{"use strict";UWe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var HWe=W((kei,GWe)=>{"use strict";GWe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var $We=W((Cei,jWe)=>{"use strict";jWe.exports=VWe()()?Math.sign:HWe()});var YWe=W((Dei,WWe)=>{"use strict";var L0r=$We(),P0r=Math.abs,I0r=Math.floor;WWe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:L0r(e)*I0r(P0r(e)))}});var ZWe=W((Fei,XWe)=>{"use strict";var R0r=YWe(),z0r=Math.max;XWe.exports=function(e){return z0r(0,R0r(e))}});var eYe=W((Lei,QWe)=>{"use strict";var B0r=G2().iterator,q0r=JE(),O0r=NWe(),N0r=ZWe(),KWe=oT(),U0r=Sm(),V0r=V2(),G0r=QE(),JWe=Array.isArray,ote=Function.prototype.call,Y_={configurable:!0,enumerable:!0,writable:!0,value:null},ste=Object.defineProperty;QWe.exports=function(e){var t=arguments[1],r=arguments[2],i,n,a,o,s,l,u,c,f,h;if(e=Object(U0r(e)),V0r(t)&&KWe(t),!this||this===Array||!O0r(this)){if(!t){if(q0r(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(JWe(e)){for(o=new Array(s=e.length),n=0;n=55296&&l<=56319&&(h+=e[++n])),h=t?ote.call(t,r,h,a):h,i?(Y_.value=h,ste(o,a,Y_)):o[a]=h,++a;s=a}}if(s===void 0)for(s=N0r(e.length),i&&(o=new i(s)),n=0;n{"use strict";tYe.exports=qWe()()?Array.from:eYe()});var nYe=W((Iei,iYe)=>{"use strict";var H0r=rYe(),j0r=hz(),$0r=Sm();iYe.exports=function(e){var t=Object($0r(e)),r=arguments[1],i=Object(arguments[2]);if(t!==e&&!r)return t;var n={};return r?H0r(r,function(a){(i.ensure||a in e)&&(n[a]=e[a])}):j0r(n,e),n}});var sYe=W((Rei,oYe)=>{"use strict";var W0r=oT(),Y0r=Sm(),X0r=Function.prototype.bind,aYe=Function.prototype.call,Z0r=Object.keys,K0r=Object.prototype.propertyIsEnumerable;oYe.exports=function(e,t){return function(r,i){var n,a=arguments[2],o=arguments[3];return r=Object(Y0r(r)),W0r(i),n=Z0r(r),o&&n.sort(typeof o=="function"?X0r.call(o,r):void 0),typeof e!="function"&&(e=n[e]),aYe.call(e,n,function(s,l){return K0r.call(r,s)?aYe.call(i,a,r[s],s,r,l):t})}}});var uYe=W((zei,lYe)=>{"use strict";lYe.exports=sYe()("forEach")});var fYe=W((Bei,cYe)=>{"use strict";var J0r=oT(),Q0r=uYe(),edr=Function.prototype.call;cYe.exports=function(e,t){var r={},i=arguments[2];return J0r(t),Q0r(e,function(n,a,o,s){r[a]=edr.call(t,i,n,a,o,s)}),r}});var vYe=W((qei,pYe)=>{"use strict";var tdr=W_(),rdr=IWe(),hYe=zWe(),idr=nYe(),ndr=Jee(),adr=fYe(),odr=Function.prototype.bind,sdr=Object.defineProperty,ldr=Object.prototype.hasOwnProperty,dYe;dYe=function(e,t,r){var i=rdr(t)&&hYe(t.value),n;return n=idr(t),delete n.writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&ldr.call(this,e)?i:(t.value=odr.call(i,r.resolveContext?r.resolveContext(this):this),sdr(this,e,t),this[e])},n};pYe.exports=function(e){var t=ndr(arguments[1]);return tdr(t.resolveContext)&&hYe(t.resolveContext),adr(e,function(r,i){return dYe(i,r,t)})}});var lte=W((Oei,xYe)=>{"use strict";var udr=wWe(),cdr=hz(),fdr=oT(),hdr=Sm(),e0=Em(),ddr=vYe(),gYe=G2(),mYe=Object.defineProperty,yYe=Object.defineProperties,rk;xYe.exports=rk=function(e,t){if(!(this instanceof rk))throw new TypeError("Constructor requires 'new'");yYe(this,{__list__:e0("w",hdr(e)),__context__:e0("w",t),__nextIndex__:e0("w",0)}),t&&(fdr(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete rk.prototype.constructor;yYe(rk.prototype,cdr({_next:e0(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){mYe(this,"__redo__",e0("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:e0(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,i){r>e&&(this.__redo__[i]=--r)},this)))}),_onClear:e0(function(){this.__redo__&&udr.call(this.__redo__),this.__nextIndex__=0})})));mYe(rk.prototype,gYe.iterator,e0(function(){return this}))});var AYe=W((Nei,TYe)=>{"use strict";var bYe=fz(),_Ye=ete(),ute=Em(),pdr=G2(),cte=lte(),wYe=Object.defineProperty,sT;sT=TYe.exports=function(e,t){if(!(this instanceof sT))throw new TypeError("Constructor requires 'new'");cte.call(this,e),t?_Ye.call(t,"key+value")?t="key+value":_Ye.call(t,"key")?t="key":t="value":t="value",wYe(this,"__kind__",ute("",t))};bYe&&bYe(sT,cte);delete sT.prototype.constructor;sT.prototype=Object.create(cte.prototype,{_resolve:ute(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});wYe(sT.prototype,pdr.toStringTag,ute("c","Array Iterator"))});var kYe=W((Uei,EYe)=>{"use strict";var MYe=fz(),gz=Em(),vdr=G2(),fte=lte(),SYe=Object.defineProperty,lT;lT=EYe.exports=function(e){if(!(this instanceof lT))throw new TypeError("Constructor requires 'new'");e=String(e),fte.call(this,e),SYe(this,"__length__",gz("",e.length))};MYe&&MYe(lT,fte);delete lT.prototype.constructor;lT.prototype=Object.create(fte.prototype,{_next:gz(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});SYe(lT.prototype,vdr.toStringTag,gz("c","String Iterator"))});var DYe=W((Vei,CYe)=>{"use strict";var gdr=JE(),mdr=V2(),ydr=QE(),xdr=G2().iterator,bdr=Array.isArray;CYe.exports=function(e){return mdr(e)?bdr(e)||ydr(e)||gdr(e)?!0:typeof e[xdr]=="function":!1}});var LYe=W((Gei,FYe)=>{"use strict";var _dr=DYe();FYe.exports=function(e){if(!_dr(e))throw new TypeError(e+" is not iterable");return e}});var hte=W((Hei,RYe)=>{"use strict";var wdr=JE(),Tdr=QE(),PYe=AYe(),Adr=kYe(),Mdr=LYe(),IYe=G2().iterator;RYe.exports=function(e){return typeof Mdr(e)[IYe]=="function"?e[IYe]():wdr(e)?new PYe(e):Tdr(e)?new Adr(e):new PYe(e)}});var BYe=W((jei,zYe)=>{"use strict";var Sdr=JE(),Edr=oT(),kdr=QE(),Cdr=hte(),Ddr=Array.isArray,dte=Function.prototype.call,Fdr=Array.prototype.some;zYe.exports=function(e,t){var r,i=arguments[2],n,a,o,s,l,u,c;if(Ddr(e)||Sdr(e)?r="array":kdr(e)?r="string":e=Cdr(e),Edr(t),a=function(){o=!0},r==="array"){Fdr.call(e,function(f){return dte.call(t,i,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),dte.call(t,i,u,a),!o);++s);return}for(n=e.next();!n.done;){if(dte.call(t,i,n.value,a),o)return;n=e.next()}}});var OYe=W(($ei,qYe)=>{"use strict";qYe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var VYe=W((Wei,UYe)=>{"use strict";var Ldr=V2(),yz=fz(),mz=v$e(),Pdr=Sm(),Idr=m$e(),km=Em(),Rdr=hte(),zdr=BYe(),Bdr=G2().toStringTag,NYe=OYe(),qdr=Array.isArray,vte=Object.defineProperty,pte=Object.prototype.hasOwnProperty,Odr=Object.getPrototypeOf,H2;UYe.exports=H2=function(){var e=arguments[0],t;if(!(this instanceof H2))throw new TypeError("Constructor requires 'new'");return t=NYe&&yz&&WeakMap!==H2?yz(new WeakMap,Odr(this)):this,Ldr(e)&&(qdr(e)||(e=Rdr(e))),vte(t,"__weakMapData__",km("c","$weakMap$"+Idr())),e&&zdr(e,function(r){Pdr(r),t.set(r[0],r[1])}),t};NYe&&(yz&&yz(H2,WeakMap),H2.prototype=Object.create(WeakMap.prototype,{constructor:km(H2)}));Object.defineProperties(H2.prototype,{delete:km(function(e){return pte.call(mz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:km(function(e){if(pte.call(mz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:km(function(e){return pte.call(mz(e),this.__weakMapData__)}),set:km(function(e,t){return vte(mz(e),this.__weakMapData__,km("c",t)),this}),toString:km(function(){return"[object WeakMap]"})});vte(H2.prototype,Bdr,km("c","WeakMap"))});var gte=W((Yei,GYe)=>{"use strict";GYe.exports=r$e()()?WeakMap:VYe()});var jYe=W((Xei,HYe)=>{"use strict";HYe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var i=Object(e),n=i.length;if(n===0)return-1;for(var a=0;a{"use strict";var xz=$E(),Ndr=U_(),yte=Hu(),Udr=K1(),Vdr=V_(),$Ye=Jje(),Gdr=e$e(),{float32:Hdr,fract32:mte}=rz(),jdr=gte(),WYe=K4(),$dr=jYe(),Wdr=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; attribute vec4 color; attribute float lineEnd, lineTop; uniform vec2 scale, scaleFract, translate, translateFract; uniform float thickness, pixelRatio, id, depth; uniform vec4 viewport; varying vec4 fragColor; varying vec2 tangent; vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) { // the order is important return position * scale + translate + positionFract * scale + translateFract + position * scaleFract + positionFract * scaleFract; } void main() { float lineStart = 1. - lineEnd; float lineOffset = lineTop * 2. - 1.; vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract); tangent = normalize(diff * scale * viewport.zw); vec2 normal = vec2(-tangent.y, tangent.x); vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart + project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd + thickness * normal * .5 * lineOffset / viewport.zw; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); fragColor = color / 255.; } `,Ydr=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; void main() { float alpha = 1.; float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `,Xdr=` precision highp float; attribute vec2 position, positionFract; uniform vec4 color; uniform vec2 scale, scaleFract, translate, translateFract; uniform float pixelRatio, id; uniform vec4 viewport; uniform float opacity; varying vec4 fragColor; const float MAX_LINES = 256.; void main() { float depth = (MAX_LINES - 4. - id) / (MAX_LINES); vec2 position = position * scale + translate + positionFract * scale + translateFract + position * scaleFract + positionFract * scaleFract; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); fragColor = color / 255.; fragColor.a *= opacity; } `,Zdr=` precision highp float; varying vec4 fragColor; void main() { gl_FragColor = fragColor; } `,Kdr=` precision highp float; attribute vec2 aCoord, bCoord, nextCoord, prevCoord; attribute vec4 aColor, bColor; attribute float lineEnd, lineTop; uniform vec2 scale, translate; uniform float thickness, pixelRatio, id, depth; uniform vec4 viewport; uniform float miterLimit, miterMode; varying vec4 fragColor; varying vec4 startCutoff, endCutoff; varying vec2 tangent; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; const float REVERSE_THRESHOLD = -.875; const float MIN_DIFF = 1e-6; // TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead // TODO: precalculate dot products, normalize things beforehead etc. // TODO: refactor to rectangular algorithm float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } bool isNaN( float val ){ return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true; } void main() { vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord; vec2 adjustedScale; adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x; adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y; vec2 scaleRatio = adjustedScale * viewport.zw; vec2 normalWidth = thickness / scaleRatio; float lineStart = 1. - lineEnd; float lineBot = 1. - lineTop; fragColor = (lineStart * aColor + lineEnd * bColor) / 255.; if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return; if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord); if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord); vec2 prevDiff = aCoord - prevCoord; vec2 currDiff = bCoord - aCoord; vec2 nextDiff = nextCoord - bCoord; vec2 prevTangent = normalize(prevDiff * scaleRatio); vec2 currTangent = normalize(currDiff * scaleRatio); vec2 nextTangent = normalize(nextDiff * scaleRatio); vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x); vec2 currNormal = vec2(-currTangent.y, currTangent.x); vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x); vec2 startJoinDirection = normalize(prevTangent - currTangent); vec2 endJoinDirection = normalize(currTangent - nextTangent); // collapsed/unidirectional segment cases // FIXME: there should be more elegant solution vec2 prevTanDiff = abs(prevTangent - currTangent); vec2 nextTanDiff = abs(nextTangent - currTangent); if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) { startJoinDirection = currNormal; } if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) { endJoinDirection = currNormal; } if (aCoord == bCoord) { endJoinDirection = startJoinDirection; currNormal = prevNormal; currTangent = prevTangent; } tangent = currTangent; //calculate join shifts relative to normals float startJoinShift = dot(currNormal, startJoinDirection); float endJoinShift = dot(currNormal, endJoinDirection); float startMiterRatio = abs(1. / startJoinShift); float endMiterRatio = abs(1. / endJoinShift); vec2 startJoin = startJoinDirection * startMiterRatio; vec2 endJoin = endJoinDirection * endMiterRatio; vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin; startTopJoin = sign(startJoinShift) * startJoin * .5; startBotJoin = -startTopJoin; endTopJoin = sign(endJoinShift) * endJoin * .5; endBotJoin = -endTopJoin; vec2 aTopCoord = aCoord + normalWidth * startTopJoin; vec2 bTopCoord = bCoord + normalWidth * endTopJoin; vec2 aBotCoord = aCoord + normalWidth * startBotJoin; vec2 bBotCoord = bCoord + normalWidth * endBotJoin; //miter anti-clipping float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x))); float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x))); //prevent close to reverse direction switch bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal); bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal); if (prevReverse) { //make join rectangular vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.); aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) { //handle miter clipping bTopCoord -= normalWidth * endTopJoin; bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; } if (nextReverse) { //make join rectangular vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { //handle miter clipping aBotCoord -= normalWidth * startBotJoin; aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; } vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; //position is normalized 0..1 coord on the screen vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); enableStartMiter = step(dot(currTangent, prevTangent), .5); enableEndMiter = step(dot(currTangent, nextTangent), .5); //bevel miter cutoffs if (miterMode == 1.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } //round miter cutoffs else if (miterMode == 2.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } } `,Jdr=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; varying vec4 startCutoff, endCutoff; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } void main() { float alpha = 1., distToStart, distToEnd; float cutoff = thickness * .5; //bevel miter if (miterMode == 1.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < -1.) { discard; return; } alpha *= min(max(distToStart + 1., 0.), 1.); } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < -1.) { discard; return; } alpha *= min(max(distToEnd + 1., 0.), 1.); } } // round miter else if (miterMode == 2.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < 0.) { float radius = length(gl_FragCoord.xy - startCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < 0.) { float radius = length(gl_FragCoord.xy - endCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } } float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `;YYe.exports=vs;function vs(e,t){if(!(this instanceof vs))return new vs(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=vs.shaders.has(e)?vs.shaders.get(e):vs.shaders.set(e,vs.createShaders(e)).get(e),this.update(t)}vs.dashMult=2;vs.maxPatternLength=256;vs.precisionThreshold=3e6;vs.maxPoints=1e4;vs.maxLines=2048;vs.shaders=new jdr;vs.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},i=e(yte({vert:Wdr,frag:Ydr,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),n;try{n=e(yte({cull:{enable:!0,face:"back"},vert:Kdr,frag:Jdr,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){n=i}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:Xdr,frag:Zdr,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:i,miter:n}};vs.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};vs.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};vs.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>vs.precisionThreshold||t.scale[1]*t.viewport.height>vs.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=vs.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};vs.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((n,a)=>{let o=this.passes[a];if(n!==void 0){if(n===null){this.passes[a]=null;return}if(typeof n[0]=="number"&&(n={positions:n}),n=Udr(n,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},n=yte({},vs.defaults,n)),n.thickness!=null&&(o.thickness=parseFloat(n.thickness)),n.opacity!=null&&(o.opacity=parseFloat(n.opacity)),n.miterLimit!=null&&(o.miterLimit=parseFloat(n.miterLimit)),n.overlay!=null&&(o.overlay=!!n.overlay,ah[0]||(h[2]=h[0]+1e-155),h[3]>h[1]||(h[3]=h[1]+1e-155)),o.normBounds=h,o.fill){let m=[],g={},w=0;for(let _=0,b=0,M=o.count;_A-T),b=[],M=0,x=o.hole!=null?o.hole[0]:null;if(x!=null){let A=$dr(_,T=>T>=x);_=_.slice(0,A),_.push(x)}for(let A=0;A<_.length;A++){let T=m.slice(M*2,_[A]*2).concat(x?m.slice(x*2):[]),y=(o.hole||[]).map(S=>S-x+(_[A]-M)),E=$Ye(T,y);E=E.map(S=>S+M+(S+M<_[A]?0:x-_[A])),b.push(...E),M=_[A]+1}for(let A=0,T=b.length;A{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var QYe=W((Kei,JYe)=>{"use strict";var Qdr=U_(),epr=$E(),tpr=Nee(),rpr=K1(),XYe=Hu(),ZYe=V_(),{float32:ipr,fract32:bte}=rz();JYe.exports=npr;var KYe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function npr(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,i,n,a,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),n=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:KYe}),d(t),i=e({vert:` precision highp float; attribute vec2 position, positionFract; attribute vec4 error; attribute vec4 color; attribute vec2 direction, lineOffset, capOffset; uniform vec4 viewport; uniform float lineWidth, capSize; uniform vec2 scale, scaleFract, translate, translateFract; varying vec4 fragColor; void main() { fragColor = color / 255.; vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; vec2 position = position + dxy; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; pos += pixelOffset / viewport.zw; gl_Position = vec4(pos * 2. - 1., 0, 1); } `,frag:` precision highp float; varying vec4 fragColor; uniform float opacity; void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(m,g)=>[g.viewport.x,g.viewport.y,m.viewportWidth,m.viewportHeight]},attributes:{color:{buffer:o,offset:(m,g)=>g.offset*4,divisor:1},position:{buffer:n,offset:(m,g)=>g.offset*8,divisor:1},positionFract:{buffer:a,offset:(m,g)=>g.offset*8,divisor:1},error:{buffer:s,offset:(m,g)=>g.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:KYe.length}),XYe(f,{update:d,draw:h,destroy:v,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(m){m?d(m):m===null&&v(),h()}function h(m){if(typeof m=="number")return p(m);m&&!Array.isArray(m)&&(m=[m]),e._refresh(),c.forEach((g,w)=>{if(g){if(m&&(m[w]?g.draw=!0:g.draw=!1),!g.draw){g.draw=!0;return}p(w)}})}function p(m){typeof m=="number"&&(m=c[m]),m!=null&&m&&m.count&&m.color&&m.opacity&&m.positions&&m.positions.length>1&&(m.scaleRatio=[m.scale[0]*m.viewport.width,m.scale[1]*m.viewport.height],i(m),m.after&&m.after(m))}function d(m){if(!m)return;m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);let g=0,w=0;if(f.groups=c=m.map((M,x)=>{let A=c[x];if(M)typeof M=="function"?M={after:M}:typeof M[0]=="number"&&(M={positions:M});else return A;return M=rpr(M,{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"}),A||(c[x]=A={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},M=XYe({},u,M)),tpr(A,M,[{lineWidth:T=>+T*.5,capSize:T=>+T*.5,opacity:parseFloat,errors:T=>(T=ZYe(T),w+=T.length,T),positions:(T,y)=>(T=ZYe(T,"float64"),y.count=Math.floor(T.length/2),y.bounds=Qdr(T,2),y.offset=g,g+=y.count,T)},{color:(T,y)=>{let E=y.count;if(T||(T="transparent"),!Array.isArray(T)||typeof T[0]=="number"){let C=T;T=Array(E);for(let k=0;k{let S=y.bounds;return T||(T=S),y.scale=[1/(T[2]-T[0]),1/(T[3]-T[1])],y.translate=[-T[0],-T[1]],y.scaleFract=bte(y.scale),y.translateFract=bte(y.translate),T},viewport:T=>{let y;return Array.isArray(T)?y={x:T[0],y:T[1],width:T[2]-T[0],height:T[3]-T[1]}:T?(y={x:T.x||T.left||0,y:T.y||T.top||0},T.right?y.width=T.right-y.x:y.width=T.w||T.width||0,T.bottom?y.height=T.bottom-y.y:y.height=T.h||T.height||0):y={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},y}}]),A}),g||w){let M=c.reduce((y,E,S)=>y+(E?E.count:0),0),x=new Float64Array(M*2),A=new Uint8Array(M*4),T=new Float32Array(M*4);c.forEach((y,E)=>{if(!y)return;let{positions:S,count:C,offset:k,color:D,errors:F}=y;C&&(A.set(D,k*4),T.set(F,k*4),x.set(S,k*2))});var _=ipr(x);n(_);var b=bte(x,_);a(b),o(A),s(T)}}function v(){n.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var rXe=W((Jei,tXe)=>{var eXe=/[\'\"]/;tXe.exports=function(t){return t?(eXe.test(t.charAt(0))&&(t=t.substr(1)),eXe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var _te=W((Qei,apr)=>{apr.exports=["inherit","initial","unset"]});var wte=W((eti,opr)=>{opr.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var Tte=W((tti,spr)=>{spr.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var Ate=W((rti,lpr)=>{lpr.exports=["normal","italic","oblique"]});var Mte=W((iti,upr)=>{upr.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var oXe=W((nti,aXe)=>{"use strict";function iXe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var i=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],n=t.escape||"___",a=!!t.flat;i.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,p,d){var v=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(v),n+v+n}r.forEach(function(h,p){for(var d,v=0;h!=d;)if(d=h,h=h.replace(u,f),v++>1e4)throw Error("References have circular dependency. Please, check them.");r[p]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(p){h=h.replace(new RegExp("(\\"+n+p+"\\"+n+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+n+"([0-9]+)\\"+n);function s(l,u,c){for(var f=[],h,p=0;h=o.exec(l);){if(p++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function nXe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",i=e[0],n;if(!i)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;i!=n;){if(o++>1e4)throw Error("Circular references in "+e);n=i,i=i.replace(a,s)}return i}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function Ste(e,t){return Array.isArray(e)?nXe(e,t):iXe(e,t)}Ste.parse=iXe;Ste.stringify=nXe;aXe.exports=Ste});var uXe=W((ati,lXe)=>{"use strict";var sXe=oXe();lXe.exports=function(t,r,i){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");i?(typeof i=="string"||Array.isArray(i))&&(i={ignore:i}):i={},i.escape==null&&(i.escape=!0),i.ignore==null?i.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof i.ignore=="string"&&(i.ignore=[i.ignore]),i.ignore=i.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var n=sXe.parse(t,{flat:!0,brackets:i.ignore}),a=n[0],o=a.split(r);if(i.escape){for(var s=[],l=0;l{cpr.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var Ete=W((sti,fXe)=>{"use strict";var fpr=cXe();fXe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||fpr.indexOf(t)!==-1}}});var vXe=W((lti,pXe)=>{"use strict";var hpr=rXe(),dpr=_te(),ppr=wte(),vpr=Tte(),gpr=Ate(),mpr=Mte(),kte=uXe(),ypr=Ete().isSize;pXe.exports=dXe;var ik=dXe.cache={};function dXe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(ik[e])return ik[e];if(e==="")throw new Error("Cannot parse an empty string.");if(ppr.indexOf(e)!==-1)return ik[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=kte(e,/\s+/),i;i=r.shift();){if(dpr.indexOf(i)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=i}),ik[e]=t;if(gpr.indexOf(i)!==-1){t.style=i;continue}if(i==="normal"||i==="small-caps"){t.variant=i;continue}if(mpr.indexOf(i)!==-1){t.stretch=i;continue}if(vpr.indexOf(i)!==-1){t.weight=i;continue}if(ypr(i)){var n=kte(i,"/");if(t.size=n[0],n[1]!=null?t.lineHeight=hXe(n[1]):r[0]==="/"&&(r.shift(),t.lineHeight=hXe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=kte(r.join(" "),/\s*,\s*/).map(hpr),ik[e]=t}throw new Error("Unknown or unsupported font token: "+i)}throw new Error("Missing required font-size.")}function hXe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var Dte=W((uti,gXe)=>{"use strict";var xpr=K1(),bpr=Ete().isSize,_pr=ak(_te()),wpr=ak(wte()),Tpr=ak(Tte()),Apr=ak(Ate()),Mpr=ak(Mte()),Spr={normal:1,"small-caps":1},Epr={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},Cte={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};gXe.exports=function(t){if(t=xpr(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&nk(t.system,wpr),t.system;if(nk(t.style,Apr),nk(t.variant,Spr),nk(t.weight,Tpr),nk(t.stretch,Mpr),t.size==null&&(t.size=Cte.size),typeof t.size=="number"&&(t.size+="px"),!bpr)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=Cte.family),Array.isArray(t.family)&&(t.family.length||(t.family=[Cte.family]),t.family=t.family.map(function(i){return Epr[i]?i:'"'+i+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function nk(e,t){if(e&&!t[e]&&!_pr[e])throw Error("Unknown keyword `"+e+"`");return e}function ak(e){for(var t={},r=0;r{"use strict";mXe.exports={parse:vXe(),stringify:Dte()}});var Pte=W((Fte,Lte)=>{(function(e,t){typeof Fte=="object"&&typeof Lte!="undefined"?Lte.exports=t():e.createREGL=t()})(Fte,(function(){"use strict";var e=function(Be,yt){for(var At=Object.keys(yt),sr=0;sr1&&yt===At&&(yt==='"'||yt==="'"))return['"'+o(Be.substr(1,Be.length-2))+'"'];var sr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Be);if(sr)return s(Be.substr(0,sr.index)).concat(s(sr[1])).concat(s(Be.substr(sr.index+sr[0].length)));var gr=Be.split(".");if(gr.length===1)return['"'+o(Be)+'"'];for(var Tr=[],pr=0;pr65535)<<4,Be>>>=yt,At=(Be>255)<<3,Be>>>=At,yt|=At,At=(Be>15)<<2,Be>>>=At,yt|=At,At=(Be>3)<<1,Be>>>=At,yt|=At,yt|Be>>1}function L(){var Be=T(8,function(){return[]});function yt(Tr){var pr=P(Tr),Or=Be[R(pr)>>2];return Or.length>0?Or.pop():new ArrayBuffer(pr)}function At(Tr){Be[R(Tr.byteLength)>>2].push(Tr)}function sr(Tr,pr){var Or=null;switch(Tr){case y:Or=new Int8Array(yt(pr),0,pr);break;case E:Or=new Uint8Array(yt(pr),0,pr);break;case S:Or=new Int16Array(yt(2*pr),0,pr);break;case C:Or=new Uint16Array(yt(2*pr),0,pr);break;case k:Or=new Int32Array(yt(4*pr),0,pr);break;case D:Or=new Uint32Array(yt(4*pr),0,pr);break;case F:Or=new Float32Array(yt(4*pr),0,pr);break;default:return null}return Or.length!==pr?Or.subarray(0,pr):Or}function gr(Tr){At(Tr.buffer)}return{alloc:yt,free:At,allocType:sr,freeType:gr}}var I=L();I.zero=L();var B=3408,O=3410,$=3411,X=3412,K=3413,G=3414,q=3415,J=33901,N=33902,V=3379,Y=3386,H=34921,j=36347,Q=36348,te=35661,ue=35660,ge=34930,Ee=36349,xe=34076,ce=34024,oe=7936,Se=7937,be=7938,fe=35724,ee=34047,ae=36063,_e=34852,re=3553,pe=34067,Te=34069,Ce=33984,ze=6408,we=5126,me=5121,Le=36160,Ne=36053,Je=36064,rt=16384,mt=function(Be,yt){var At=1;yt.ext_texture_filter_anisotropic&&(At=Be.getParameter(ee));var sr=1,gr=1;yt.webgl_draw_buffers&&(sr=Be.getParameter(_e),gr=Be.getParameter(ae));var Tr=!!yt.oes_texture_float;if(Tr){var pr=Be.createTexture();Be.bindTexture(re,pr),Be.texImage2D(re,0,ze,1,1,0,ze,we,null);var Or=Be.createFramebuffer();if(Be.bindFramebuffer(Le,Or),Be.framebufferTexture2D(Le,Je,re,pr,0),Be.bindTexture(re,null),Be.checkFramebufferStatus(Le)!==Ne)Tr=!1;else{Be.viewport(0,0,1,1),Be.clearColor(1,0,0,1),Be.clear(rt);var Jr=I.allocType(we,4);Be.readPixels(0,0,1,1,ze,we,Jr),Be.getError()?Tr=!1:(Be.deleteFramebuffer(Or),Be.deleteTexture(pr),Tr=Jr[0]===1),I.freeType(Jr)}}var Qr=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ei=!0;if(!Qr){var vn=Be.createTexture(),Vi=I.allocType(me,36);Be.activeTexture(Ce),Be.bindTexture(pe,vn),Be.texImage2D(Te,0,ze,3,3,0,ze,me,Vi),I.freeType(Vi),Be.bindTexture(pe,null),Be.deleteTexture(vn),ei=!Be.getError()}return{colorBits:[Be.getParameter(O),Be.getParameter($),Be.getParameter(X),Be.getParameter(K)],depthBits:Be.getParameter(G),stencilBits:Be.getParameter(q),subpixelBits:Be.getParameter(B),extensions:Object.keys(yt).filter(function(yi){return!!yt[yi]}),maxAnisotropic:At,maxDrawbuffers:sr,maxColorAttachments:gr,pointSizeDims:Be.getParameter(J),lineWidthDims:Be.getParameter(N),maxViewportDims:Be.getParameter(Y),maxCombinedTextureUnits:Be.getParameter(te),maxCubeMapSize:Be.getParameter(xe),maxRenderbufferSize:Be.getParameter(ce),maxTextureUnits:Be.getParameter(ge),maxTextureSize:Be.getParameter(V),maxAttributes:Be.getParameter(H),maxVertexUniforms:Be.getParameter(j),maxVertexTextureUnits:Be.getParameter(ue),maxVaryingVectors:Be.getParameter(Q),maxFragmentUniforms:Be.getParameter(Ee),glsl:Be.getParameter(fe),renderer:Be.getParameter(Se),vendor:Be.getParameter(oe),version:Be.getParameter(be),readFloat:Tr,npotTextureCube:ei}},dt=function(Be){return Be instanceof Uint8Array||Be instanceof Uint16Array||Be instanceof Uint32Array||Be instanceof Int8Array||Be instanceof Int16Array||Be instanceof Int32Array||Be instanceof Float32Array||Be instanceof Float64Array||Be instanceof Uint8ClampedArray};function St(Be){return!!Be&&typeof Be=="object"&&Array.isArray(Be.shape)&&Array.isArray(Be.stride)&&typeof Be.offset=="number"&&Be.shape.length===Be.stride.length&&(Array.isArray(Be.data)||dt(Be.data))}var Ke=function(Be){return Object.keys(Be).map(function(yt){return Be[yt]})},bt={shape:Ie,flatten:$e};function pt(Be,yt,At){for(var sr=0;sr0){var xn;if(Array.isArray(Er[0])){bi=ht(Er);for(var Nr=1,zr=1;zr0){if(typeof Nr[0]=="number"){var ci=I.allocType(Vr.dtype,Nr.length);Fr(ci,Nr),bi(ci,Bi),I.freeType(ci)}else if(Array.isArray(Nr[0])||dt(Nr[0])){mi=ht(Nr);var hi=gt(Nr,mi,Vr.dtype);bi(hi,Bi),I.freeType(hi)}}}else if(St(Nr)){mi=Nr.shape;var qi=Nr.stride,bn=0,Wn=0,Ti=0,Wi=0;mi.length===1?(bn=mi[0],Wn=1,Ti=qi[0],Wi=0):mi.length===2&&(bn=mi[0],Wn=mi[1],Ti=qi[0],Wi=qi[1]);var Un=Array.isArray(Nr.data)?Vr.dtype:ii(Nr.data),Vn=I.allocType(Un,bn*Wn);Ii(Vn,Nr.data,bn,Wn,Ti,Wi,Nr.offset),bi(Vn,Bi),I.freeType(Vn)}return Mi}return Wr||Mi(tr),Mi._reglType="buffer",Mi._buffer=Vr,Mi.subdata=xn,At.profile&&(Mi.stats=Vr.stats),Mi.destroy=function(){Vi(Vr)},Mi}function Ir(){Ke(Tr).forEach(function(tr){tr.buffer=Be.createBuffer(),Be.bindBuffer(tr.type,tr.buffer),Be.bufferData(tr.type,tr.persistentData||tr.byteLength,tr.usage)})}return At.profile&&(yt.getTotalBufferSize=function(){var tr=0;return Object.keys(Tr).forEach(function(Er){tr+=Tr[Er].stats.size}),tr}),{create:yi,createStream:Jr,destroyStream:Qr,clear:function(){Ke(Tr).forEach(Vi),Or.forEach(Vi)},getBuffer:function(tr){return tr&&tr._buffer instanceof pr?tr._buffer:null},restore:Ir,_initBuffer:vn}}var ln=0,la=0,mo=1,pn=1,zn=4,gn=4,ns={points:ln,point:la,lines:mo,line:pn,triangles:zn,triangle:gn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ua=0,as=1,ro=4,ba=5120,co=5121,Us=5122,Ma=5123,el=5124,Ml=5125,Au=34963,dl=35040,Fe=35044;function ot(Be,yt,At,sr){var gr={},Tr=0,pr={uint8:co,uint16:Ma};yt.oes_element_index_uint&&(pr.uint32=Ml);function Or(Ir){this.id=Tr++,gr[this.id]=this,this.buffer=Ir,this.primType=ro,this.vertCount=0,this.type=0}Or.prototype.bind=function(){this.buffer.bind()};var Jr=[];function Qr(Ir){var tr=Jr.pop();return tr||(tr=new Or(At.create(null,Au,!0,!1)._buffer)),vn(tr,Ir,dl,-1,-1,0,0),tr}function ei(Ir){Jr.push(Ir)}function vn(Ir,tr,Er,Wr,oi,Vr,Mi){Ir.buffer.bind();var bi;if(tr){var xn=Mi;!Mi&&(!dt(tr)||St(tr)&&!dt(tr.data))&&(xn=yt.oes_element_index_uint?Ml:Ma),At._initBuffer(Ir.buffer,tr,Er,xn,3)}else Be.bufferData(Au,Vr,Er),Ir.buffer.dtype=bi||co,Ir.buffer.usage=Er,Ir.buffer.dimension=3,Ir.buffer.byteLength=Vr;if(bi=Mi,!Mi){switch(Ir.buffer.dtype){case co:case ba:bi=co;break;case Ma:case Us:bi=Ma;break;case Ml:case el:bi=Ml;break;default:}Ir.buffer.dtype=bi}Ir.type=bi;var Nr=oi;Nr<0&&(Nr=Ir.buffer.byteLength,bi===Ma?Nr>>=1:bi===Ml&&(Nr>>=2)),Ir.vertCount=Nr;var zr=Wr;if(Wr<0){zr=ro;var Bi=Ir.buffer.dimension;Bi===1&&(zr=ua),Bi===2&&(zr=as),Bi===3&&(zr=ro)}Ir.primType=zr}function Vi(Ir){sr.elementsCount--,delete gr[Ir.id],Ir.buffer.destroy(),Ir.buffer=null}function yi(Ir,tr){var Er=At.create(null,Au,!0),Wr=new Or(Er._buffer);sr.elementsCount++;function oi(Vr){if(!Vr)Er(),Wr.primType=ro,Wr.vertCount=0,Wr.type=co;else if(typeof Vr=="number")Er(Vr),Wr.primType=ro,Wr.vertCount=Vr|0,Wr.type=co;else{var Mi=null,bi=Fe,xn=-1,Nr=-1,zr=0,Bi=0;Array.isArray(Vr)||dt(Vr)||St(Vr)?Mi=Vr:("data"in Vr&&(Mi=Vr.data),"usage"in Vr&&(bi=nt[Vr.usage]),"primitive"in Vr&&(xn=ns[Vr.primitive]),"count"in Vr&&(Nr=Vr.count|0),"type"in Vr&&(Bi=pr[Vr.type]),"length"in Vr?zr=Vr.length|0:(zr=Nr,Bi===Ma||Bi===Us?zr*=2:(Bi===Ml||Bi===el)&&(zr*=4))),vn(Wr,Mi,bi,xn,Nr,zr,Bi)}return oi}return oi(Ir),oi._reglType="elements",oi._elements=Wr,oi.subdata=function(Vr,Mi){return Er.subdata(Vr,Mi),oi},oi.destroy=function(){Vi(Wr)},oi}return{create:yi,createStream:Qr,destroyStream:ei,getElements:function(Ir){return typeof Ir=="function"&&Ir._elements instanceof Or?Ir._elements:null},clear:function(){Ke(gr).forEach(Vi)}}}var lt=new Float32Array(1),kt=new Uint32Array(lt.buffer),er=5123;function zt(Be){for(var yt=I.allocType(er,Be.length),At=0;At>>31<<15,Tr=(sr<<1>>>24)-127,pr=sr>>13&1023;if(Tr<-24)yt[At]=gr;else if(Tr<-14){var Or=-14-Tr;yt[At]=gr+(pr+1024>>Or)}else Tr>15?yt[At]=gr+31744:yt[At]=gr+(Tr+15<<10)+pr}return yt}function Ar(Be){return Array.isArray(Be)||dt(Be)}var Zt=34467,wr=3553,Kr=34067,ni=34069,Si=6408,un=6406,$n=6407,wn=6409,ma=6410,Zn=32854,io=32855,fo=36194,ko=32819,Oo=32820,ms=33635,os=34042,Co=6402,ss=34041,No=35904,Go=35906,ho=36193,qn=33776,_a=33777,ys=33778,tl=33779,rl=35986,jl=35987,il=34798,hu=35840,Mu=35841,Su=35842,yc=35843,$l=36196,Za=5121,Eu=5123,Xu=5125,Cs=5126,du=10242,_h=10243,bo=10497,pu=33071,Jo=33648,vu=10240,Uv=10241,$c=9728,c0=9729,Wf=9984,wh=9985,Yf=9986,f0=9987,Vv=33170,Th=4352,xp=4353,h0=4354,td=34046,rd=3317,Gv=37440,Hv=37441,Wc=37443,bp=37444,Ah=33984,Zu=[Wf,Yf,wh,f0],Ds=[0,wn,ma,$n,Si],Ho={};Ho[wn]=Ho[un]=Ho[Co]=1,Ho[ss]=Ho[ma]=2,Ho[$n]=Ho[No]=3,Ho[Si]=Ho[Go]=4;function ku(Be){return"[object "+Be+"]"}var id=ku("HTMLCanvasElement"),Mh=ku("OffscreenCanvas"),d0=ku("CanvasRenderingContext2D"),jv=ku("ImageBitmap"),bg=ku("HTMLImageElement"),ny=ku("HTMLVideoElement"),Bx=Object.keys(Ve).concat([id,Mh,d0,jv,bg,ny]),Sh=[];Sh[Za]=1,Sh[Cs]=4,Sh[ho]=2,Sh[Eu]=2,Sh[Xu]=4;var Vs=[];Vs[Zn]=2,Vs[io]=2,Vs[fo]=2,Vs[ss]=4,Vs[qn]=.5,Vs[_a]=.5,Vs[ys]=1,Vs[tl]=1,Vs[rl]=.5,Vs[jl]=1,Vs[il]=1,Vs[hu]=.5,Vs[Mu]=.25,Vs[Su]=.5,Vs[yc]=.25,Vs[$l]=.5;function $v(Be){return Array.isArray(Be)&&(Be.length===0||typeof Be[0]=="number")}function Wv(Be){if(!Array.isArray(Be))return!1;var yt=Be.length;return!(yt===0||!Ar(Be[0]))}function Eh(Be){return Object.prototype.toString.call(Be)}function _g(Be){return Eh(Be)===id}function nd(Be){return Eh(Be)===Mh}function _p(Be){return Eh(Be)===d0}function mf(Be){return Eh(Be)===jv}function Yv(Be){return Eh(Be)===bg}function wp(Be){return Eh(Be)===ny}function ad(Be){if(!Be)return!1;var yt=Eh(Be);return Bx.indexOf(yt)>=0?!0:$v(Be)||Wv(Be)||St(Be)}function wg(Be){return Ve[Object.prototype.toString.call(Be)]|0}function Tg(Be,yt){var At=yt.length;switch(Be.type){case Za:case Eu:case Xu:case Cs:var sr=I.allocType(Be.type,At);sr.set(yt),Be.data=sr;break;case ho:Be.data=zt(yt);break;default:}}function ay(Be,yt){return I.allocType(Be.type===ho?Cs:Be.type,yt)}function Xf(Be,yt){Be.type===ho?(Be.data=zt(yt),I.freeType(yt)):Be.data=yt}function Xv(Be,yt,At,sr,gr,Tr){for(var pr=Be.width,Or=Be.height,Jr=Be.channels,Qr=pr*Or*Jr,ei=ay(Be,Qr),vn=0,Vi=0;Vi=1;)Or+=pr*Jr*Jr,Jr/=2;return Or}else return pr*At*sr}function Tp(Be,yt,At,sr,gr,Tr,pr){var Or={"don't care":Th,"dont care":Th,nice:h0,fast:xp},Jr={repeat:bo,clamp:pu,mirror:Jo},Qr={nearest:$c,linear:c0},ei=e({mipmap:f0,"nearest mipmap nearest":Wf,"linear mipmap nearest":wh,"nearest mipmap linear":Yf,"linear mipmap linear":f0},Qr),vn={none:0,browser:bp},Vi={uint8:Za,rgba4:ko,rgb565:ms,"rgb5 a1":Oo},yi={alpha:un,luminance:wn,"luminance alpha":ma,rgb:$n,rgba:Si,rgba4:Zn,"rgb5 a1":io,rgb565:fo},Ir={};yt.ext_srgb&&(yi.srgb=No,yi.srgba=Go),yt.oes_texture_float&&(Vi.float32=Vi.float=Cs),yt.oes_texture_half_float&&(Vi.float16=Vi["half float"]=ho),yt.webgl_depth_texture&&(e(yi,{depth:Co,"depth stencil":ss}),e(Vi,{uint16:Eu,uint32:Xu,"depth stencil":os})),yt.webgl_compressed_texture_s3tc&&e(Ir,{"rgb s3tc dxt1":qn,"rgba s3tc dxt1":_a,"rgba s3tc dxt3":ys,"rgba s3tc dxt5":tl}),yt.webgl_compressed_texture_atc&&e(Ir,{"rgb atc":rl,"rgba atc explicit alpha":jl,"rgba atc interpolated alpha":il}),yt.webgl_compressed_texture_pvrtc&&e(Ir,{"rgb pvrtc 4bppv1":hu,"rgb pvrtc 2bppv1":Mu,"rgba pvrtc 4bppv1":Su,"rgba pvrtc 2bppv1":yc}),yt.webgl_compressed_texture_etc1&&(Ir["rgb etc1"]=$l);var tr=Array.prototype.slice.call(Be.getParameter(Zt));Object.keys(Ir).forEach(function(wt){var xr=Ir[wt];tr.indexOf(xr)>=0&&(yi[wt]=xr)});var Er=Object.keys(yi);At.textureFormats=Er;var Wr=[];Object.keys(yi).forEach(function(wt){var xr=yi[wt];Wr[xr]=wt});var oi=[];Object.keys(Vi).forEach(function(wt){var xr=Vi[wt];oi[xr]=wt});var Vr=[];Object.keys(Qr).forEach(function(wt){var xr=Qr[wt];Vr[xr]=wt});var Mi=[];Object.keys(ei).forEach(function(wt){var xr=ei[wt];Mi[xr]=wt});var bi=[];Object.keys(Jr).forEach(function(wt){var xr=Jr[wt];bi[xr]=wt});var xn=Er.reduce(function(wt,xr){var br=yi[xr];return br===wn||br===un||br===wn||br===ma||br===Co||br===ss||yt.ext_srgb&&(br===No||br===Go)?wt[br]=br:br===io||xr.indexOf("rgba")>=0?wt[br]=Si:wt[br]=$n,wt},{});function Nr(){this.internalformat=Si,this.format=Si,this.type=Za,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=bp,this.width=0,this.height=0,this.channels=0}function zr(wt,xr){wt.internalformat=xr.internalformat,wt.format=xr.format,wt.type=xr.type,wt.compressed=xr.compressed,wt.premultiplyAlpha=xr.premultiplyAlpha,wt.flipY=xr.flipY,wt.unpackAlignment=xr.unpackAlignment,wt.colorSpace=xr.colorSpace,wt.width=xr.width,wt.height=xr.height,wt.channels=xr.channels}function Bi(wt,xr){if(!(typeof xr!="object"||!xr)){if("premultiplyAlpha"in xr&&(wt.premultiplyAlpha=xr.premultiplyAlpha),"flipY"in xr&&(wt.flipY=xr.flipY),"alignment"in xr&&(wt.unpackAlignment=xr.alignment),"colorSpace"in xr&&(wt.colorSpace=vn[xr.colorSpace]),"type"in xr){var br=xr.type;wt.type=Vi[br]}var tn=wt.width,Ga=wt.height,fs=wt.channels,Ki=!1;"shape"in xr?(tn=xr.shape[0],Ga=xr.shape[1],xr.shape.length===3&&(fs=xr.shape[2],Ki=!0)):("radius"in xr&&(tn=Ga=xr.radius),"width"in xr&&(tn=xr.width),"height"in xr&&(Ga=xr.height),"channels"in xr&&(fs=xr.channels,Ki=!0)),wt.width=tn|0,wt.height=Ga|0,wt.channels=fs|0;var ft=!1;if("format"in xr){var Mt=xr.format,Rt=wt.internalformat=yi[Mt];wt.format=xn[Rt],Mt in Vi&&("type"in xr||(wt.type=Vi[Mt])),Mt in Ir&&(wt.compressed=!0),ft=!0}!Ki&&ft?wt.channels=Ho[wt.format]:Ki&&!ft&&wt.channels!==Ds[wt.format]&&(wt.format=wt.internalformat=Ds[wt.channels])}}function mi(wt){Be.pixelStorei(Gv,wt.flipY),Be.pixelStorei(Hv,wt.premultiplyAlpha),Be.pixelStorei(Wc,wt.colorSpace),Be.pixelStorei(rd,wt.unpackAlignment)}function ci(){Nr.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function hi(wt,xr){var br=null;if(ad(xr)?br=xr:xr&&(Bi(wt,xr),"x"in xr&&(wt.xOffset=xr.x|0),"y"in xr&&(wt.yOffset=xr.y|0),ad(xr.data)&&(br=xr.data)),xr.copy){var tn=gr.viewportWidth,Ga=gr.viewportHeight;wt.width=wt.width||tn-wt.xOffset,wt.height=wt.height||Ga-wt.yOffset,wt.needsCopy=!0}else if(!br)wt.width=wt.width||1,wt.height=wt.height||1,wt.channels=wt.channels||4;else if(dt(br))wt.channels=wt.channels||4,wt.data=br,!("type"in xr)&&wt.type===Za&&(wt.type=wg(br));else if($v(br))wt.channels=wt.channels||4,Tg(wt,br),wt.alignment=1,wt.needsFree=!0;else if(St(br)){var fs=br.data;!Array.isArray(fs)&&wt.type===Za&&(wt.type=wg(fs));var Ki=br.shape,ft=br.stride,Mt,Rt,mr,Sr,ar,ir;Ki.length===3?(mr=Ki[2],ir=ft[2]):(mr=1,ir=1),Mt=Ki[0],Rt=Ki[1],Sr=ft[0],ar=ft[1],wt.alignment=1,wt.width=Mt,wt.height=Rt,wt.channels=mr,wt.format=wt.internalformat=Ds[mr],wt.needsFree=!0,Xv(wt,fs,Sr,ar,ir,br.offset)}else if(_g(br)||nd(br)||_p(br))_g(br)||nd(br)?wt.element=br:wt.element=br.canvas,wt.width=wt.element.width,wt.height=wt.element.height,wt.channels=4;else if(mf(br))wt.element=br,wt.width=br.width,wt.height=br.height,wt.channels=4;else if(Yv(br))wt.element=br,wt.width=br.naturalWidth,wt.height=br.naturalHeight,wt.channels=4;else if(wp(br))wt.element=br,wt.width=br.videoWidth,wt.height=br.videoHeight,wt.channels=4;else if(Wv(br)){var $t=wt.width||br[0].length,Dt=wt.height||br.length,Vt=wt.channels;Ar(br[0][0])?Vt=Vt||br[0][0].length:Vt=Vt||1;for(var Et=bt.shape(br),ur=1,kr=0;kr>=Ga,br.height>>=Ga,hi(br,tn[Ga]),wt.mipmask|=1<=0&&!("faces"in xr)&&(wt.genMipmaps=!0)}if("mag"in xr){var tn=xr.mag;wt.magFilter=Qr[tn]}var Ga=wt.wrapS,fs=wt.wrapT;if("wrap"in xr){var Ki=xr.wrap;typeof Ki=="string"?Ga=fs=Jr[Ki]:Array.isArray(Ki)&&(Ga=Jr[Ki[0]],fs=Jr[Ki[1]])}else{if("wrapS"in xr){var ft=xr.wrapS;Ga=Jr[ft]}if("wrapT"in xr){var Mt=xr.wrapT;fs=Jr[Mt]}}if(wt.wrapS=Ga,wt.wrapT=fs,"anisotropic"in xr){var Rt=xr.anisotropic;wt.anisotropic=xr.anisotropic}if("mipmap"in xr){var mr=!1;switch(typeof xr.mipmap){case"string":wt.mipmapHint=Or[xr.mipmap],wt.genMipmaps=!0,mr=!0;break;case"boolean":mr=wt.genMipmaps=xr.mipmap;break;case"object":wt.genMipmaps=!1,mr=!0;break;default:}mr&&!("min"in xr)&&(wt.minFilter=Wf)}}function ih(wt,xr){Be.texParameteri(xr,Uv,wt.minFilter),Be.texParameteri(xr,vu,wt.magFilter),Be.texParameteri(xr,du,wt.wrapS),Be.texParameteri(xr,_h,wt.wrapT),yt.ext_texture_filter_anisotropic&&Be.texParameteri(xr,td,wt.anisotropic),wt.genMipmaps&&(Be.hint(Vv,wt.mipmapHint),Be.generateMipmap(xr))}var Rh=0,Lu={},Pu=At.maxTextureUnits,ic=Array(Pu).map(function(){return null});function ha(wt){Nr.call(this),this.mipmask=0,this.internalformat=Si,this.id=Rh++,this.refCount=1,this.target=wt,this.texture=Be.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new cs,pr.profile&&(this.stats={size:0})}function wc(wt){Be.activeTexture(Ah),Be.bindTexture(wt.target,wt.texture)}function bs(){var wt=ic[0];wt?Be.bindTexture(wt.target,wt.texture):Be.bindTexture(wr,null)}function nh(wt){var xr=wt.texture,br=wt.unit,tn=wt.target;br>=0&&(Be.activeTexture(Ah+br),Be.bindTexture(tn,null),ic[br]=null),Be.deleteTexture(xr),wt.texture=null,wt.params=null,wt.pixels=null,wt.refCount=0,delete Lu[wt.id],Tr.textureCount--}e(ha.prototype,{bind:function(){var wt=this;wt.bindCount+=1;var xr=wt.unit;if(xr<0){for(var br=0;br0)continue;tn.unit=-1}ic[br]=wt,xr=br;break}xr>=Pu,pr.profile&&Tr.maxTextureUnits>ar)-mr,ir.height=ir.height||(br.height>>ar)-Sr,wc(br),bn(ir,wr,mr,Sr,ar),bs(),Wi(ir),tn}function fs(Ki,ft){var Mt=Ki|0,Rt=ft|0||Mt;if(Mt===br.width&&Rt===br.height)return tn;tn.width=br.width=Mt,tn.height=br.height=Rt,wc(br);for(var mr=0;br.mipmask>>mr;++mr){var Sr=Mt>>mr,ar=Rt>>mr;if(!Sr||!ar)break;Be.texImage2D(wr,mr,br.format,Sr,ar,0,br.format,br.type,null)}return bs(),pr.profile&&(br.stats.size=Zf(br.internalformat,br.type,Mt,Rt,!1,!1)),tn}return tn(wt,xr),tn.subimage=Ga,tn.resize=fs,tn._reglType="texture2d",tn._texture=br,pr.profile&&(tn.stats=br.stats),tn.destroy=function(){br.decRef()},tn}function Bh(wt,xr,br,tn,Ga,fs){var Ki=new ha(Kr);Lu[Ki.id]=Ki,Tr.cubeCount++;var ft=new Array(6);function Mt(Sr,ar,ir,$t,Dt,Vt){var Et,ur=Ki.texInfo;for(cs.call(ur),Et=0;Et<6;++Et)ft[Et]=Ba();if(typeof Sr=="number"||!Sr){var kr=Sr|0||1;for(Et=0;Et<6;++Et)Vn(ft[Et],kr,kr)}else if(typeof Sr=="object")if(ar)Sa(ft[0],Sr),Sa(ft[1],ar),Sa(ft[2],ir),Sa(ft[3],$t),Sa(ft[4],Dt),Sa(ft[5],Vt);else if(wf(ur,Sr),Bi(Ki,Sr),"faces"in Sr){var Xr=Sr.faces;for(Et=0;Et<6;++Et)zr(ft[Et],Ki),Sa(ft[Et],Xr[Et])}else for(Et=0;Et<6;++Et)Sa(ft[Et],Sr);for(zr(Ki,ft[0]),ur.genMipmaps?Ki.mipmask=(ft[0].width<<1)-1:Ki.mipmask=ft[0].mipmask,Ki.internalformat=ft[0].internalformat,Mt.width=ft[0].width,Mt.height=ft[0].height,wc(Ki),Et=0;Et<6;++Et)Cl(ft[Et],ni+Et);for(ih(ur,Kr),bs(),pr.profile&&(Ki.stats.size=Zf(Ki.internalformat,Ki.type,Mt.width,Mt.height,ur.genMipmaps,!0)),Mt.format=Wr[Ki.internalformat],Mt.type=oi[Ki.type],Mt.mag=Vr[ur.magFilter],Mt.min=Mi[ur.minFilter],Mt.wrapS=bi[ur.wrapS],Mt.wrapT=bi[ur.wrapT],Et=0;Et<6;++Et)Ih(ft[Et]);return Mt}function Rt(Sr,ar,ir,$t,Dt){var Vt=ir|0,Et=$t|0,ur=Dt|0,kr=Ti();return zr(kr,Ki),kr.width=0,kr.height=0,hi(kr,ar),kr.width=kr.width||(Ki.width>>ur)-Vt,kr.height=kr.height||(Ki.height>>ur)-Et,wc(Ki),bn(kr,ni+Sr,Vt,Et,ur),bs(),Wi(kr),Mt}function mr(Sr){var ar=Sr|0;if(ar!==Ki.width){Mt.width=Ki.width=ar,Mt.height=Ki.height=ar,wc(Ki);for(var ir=0;ir<6;++ir)for(var $t=0;Ki.mipmask>>$t;++$t)Be.texImage2D(ni+ir,$t,Ki.format,ar>>$t,ar>>$t,0,Ki.format,Ki.type,null);return bs(),pr.profile&&(Ki.stats.size=Zf(Ki.internalformat,Ki.type,Mt.width,Mt.height,!1,!0)),Mt}}return Mt(wt,xr,br,tn,Ga,fs),Mt.subimage=Rt,Mt.resize=mr,Mt._reglType="textureCube",Mt._texture=Ki,pr.profile&&(Mt.stats=Ki.stats),Mt.destroy=function(){Ki.decRef()},Mt}function ta(){for(var wt=0;wt>tn,br.height>>tn,0,br.internalformat,br.type,null);else for(var Ga=0;Ga<6;++Ga)Be.texImage2D(ni+Ga,tn,br.internalformat,br.width>>tn,br.height>>tn,0,br.internalformat,br.type,null);ih(br.texInfo,br.target)})}function Gs(){for(var wt=0;wt=0?Ih=!0:Jr.indexOf(cs)>=0&&(Ih=!1))),("depthTexture"in ha||"depthStencilTexture"in ha)&&(ic=!!(ha.depthTexture||ha.depthStencilTexture)),"depth"in ha&&(typeof ha.depth=="boolean"?Cl=ha.depth:(Rh=ha.depth,rc=!1)),"stencil"in ha&&(typeof ha.stencil=="boolean"?rc=ha.stencil:(Lu=ha.stencil,Cl=!1)),"depthStencil"in ha&&(typeof ha.depthStencil=="boolean"?Cl=rc=ha.depthStencil:(Pu=ha.depthStencil,Cl=!1,rc=!1))}var bs=null,nh=null,zh=null,Bh=null;if(Array.isArray(Ba))bs=Ba.map(Ir);else if(Ba)bs=[Ir(Ba)];else for(bs=new Array(ih),Un=0;Un0&&(Wi.depth=hi[0].depth,Wi.stencil=hi[0].stencil,Wi.depthStencil=hi[0].depthStencil),hi[Ti]?hi[Ti](Wi):hi[Ti]=zr(Wi)}return e(qi,{width:Un,height:Un,color:cs})}function bn(Wn){var Ti,Wi=Wn|0;if(Wi===qi.width)return qi;var Un=qi.color;for(Ti=0;Ti=Un.byteLength?Vn.subdata(Un):(Vn.destroy(),zr.buffers[Wn]=null)),zr.buffers[Wn]||(Vn=zr.buffers[Wn]=gr.create(Ti,kp,!1,!0)),Wi.buffer=gr.getBuffer(Vn),Wi.size=Wi.buffer.dimension|0,Wi.normalized=!1,Wi.type=Wi.buffer.dtype,Wi.offset=0,Wi.stride=0,Wi.divisor=0,Wi.state=1,qi[Wn]=1}else gr.getBuffer(Ti)?(Wi.buffer=gr.getBuffer(Ti),Wi.size=Wi.buffer.dimension|0,Wi.normalized=!1,Wi.type=Wi.buffer.dtype,Wi.offset=0,Wi.stride=0,Wi.divisor=0,Wi.state=1):gr.getBuffer(Ti.buffer)?(Wi.buffer=gr.getBuffer(Ti.buffer),Wi.size=(+Ti.size||Wi.buffer.dimension)|0,Wi.normalized=!!Ti.normalized||!1,"type"in Ti?Wi.type=Cr[Ti.type]:Wi.type=Wi.buffer.dtype,Wi.offset=(Ti.offset||0)|0,Wi.stride=(Ti.stride||0)|0,Wi.divisor=(Ti.divisor||0)|0,Wi.state=1):"x"in Ti&&(Wi.x=+Ti.x||0,Wi.y=+Ti.y||0,Wi.z=+Ti.z||0,Wi.w=+Ti.w||0,Wi.state=2)}for(var Sa=0;Sa1)for(var mi=0;mitr&&(tr=Er.stats.uniformsCount)}),tr},At.getMaxAttributesCount=function(){var tr=0;return ei.forEach(function(Er){Er.stats.attributesCount>tr&&(tr=Er.stats.attributesCount)}),tr});function Ir(){gr={},Tr={};for(var tr=0;tr16&&(At=nr(At,Be.length*8));for(var sr=Array(16),gr=Array(16),Tr=0;Tr<16;Tr++)sr[Tr]=At[Tr]^909522486,gr[Tr]=At[Tr]^1549556828;var pr=nr(sr.concat(Rp(yt)),512+yt.length*8);return Ae(nr(gr.concat(pr),768))}function Xc(Be){for(var yt=hy?"0123456789ABCDEF":"0123456789abcdef",At="",sr,gr=0;gr>>4&15)+yt.charAt(sr&15);return At}function Pp(Be){for(var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",At="",sr=Be.length,gr=0;grBe.length*8?At+=dy:At+=yt.charAt(Tr>>>6*(3-pr)&63);return At}function Dg(Be,yt){var At=yt.length,sr=Array(),gr,Tr,pr,Or,Jr=Array(Math.ceil(Be.length/2));for(gr=0;gr0;){for(Or=Array(),pr=0,gr=0;gr0||Tr>0)&&(Or[Or.length]=Tr);sr[sr.length]=pr,Jr=Or}var Qr="";for(gr=sr.length-1;gr>=0;gr--)Qr+=yt.charAt(sr[gr]);var ei=Math.ceil(Be.length*8/(Math.log(yt.length)/Math.log(2)));for(gr=Qr.length;gr>>6&31,128|sr&63):sr<=65535?yt+=String.fromCharCode(224|sr>>>12&15,128|sr>>>6&63,128|sr&63):sr<=2097151&&(yt+=String.fromCharCode(240|sr>>>18&7,128|sr>>>12&63,128|sr>>>6&63,128|sr&63));return yt}function Rp(Be){for(var yt=Array(Be.length>>2),At=0;At>5]|=(Be.charCodeAt(At/8)&255)<<24-At%32;return yt}function Ae(Be){for(var yt="",At=0;At>5]>>>24-At%32&255);return yt}function qe(Be,yt){return Be>>>yt|Be<<32-yt}function et(Be,yt){return Be>>>yt}function Ye(Be,yt,At){return Be&yt^~Be&At}function Tt(Be,yt,At){return Be&yt^Be&At^yt&At}function jt(Be){return qe(Be,2)^qe(Be,13)^qe(Be,22)}function Qt(Be){return qe(Be,6)^qe(Be,11)^qe(Be,25)}function cr(Be){return qe(Be,7)^qe(Be,18)^et(Be,3)}function yr(Be){return qe(Be,17)^qe(Be,19)^et(Be,10)}var Rr=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 nr(Be,yt){var At=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),sr=new Array(64),gr,Tr,pr,Or,Jr,Qr,ei,vn,Vi,yi,Ir,tr;for(Be[yt>>5]|=128<<24-yt%32,Be[(yt+64>>9<<4)+15]=yt,Vi=0;Vi>16)+(yt>>16)+(At>>16);return sr<<16|At&65535}function vr(Be){return Array.prototype.slice.call(Be)}function Pr(Be){return vr(Be).join("")}function $r(Be){var yt=Be&&Be.cache,At=0,sr=[],gr=[],Tr=[];function pr(Ir,tr){var Er=tr&&tr.stable;if(!Er){for(var Wr=0;Wr0&&(Ir.push(oi,"="),Ir.push.apply(Ir,vr(arguments)),Ir.push(";")),oi}return e(tr,{def:Wr,toString:function(){return Pr([Er.length>0?"var "+Er.join(",")+";":"",Pr(Ir)])}})}function Jr(){var Ir=Or(),tr=Or(),Er=Ir.toString,Wr=tr.toString;function oi(Vr,Mi){tr(Vr,Mi,"=",Ir.def(Vr,Mi),";")}return e(function(){Ir.apply(Ir,vr(arguments))},{def:Ir.def,entry:Ir,exit:tr,save:oi,set:function(Vr,Mi,bi){oi(Vr,Mi),Ir(Vr,Mi,"=",bi,";")},toString:function(){return Er()+Wr()}})}function Qr(){var Ir=Pr(arguments),tr=Jr(),Er=Jr(),Wr=tr.toString,oi=Er.toString;return e(tr,{then:function(){return tr.apply(tr,vr(arguments)),this},else:function(){return Er.apply(Er,vr(arguments)),this},toString:function(){var Vr=oi();return Vr&&(Vr="else{"+Vr+"}"),Pr(["if(",Ir,"){",Wr(),"}",Vr])}})}var ei=Or(),vn={};function Vi(Ir,tr){var Er=[];function Wr(){var xn="a"+Er.length;return Er.push(xn),xn}tr=tr||0;for(var oi=0;oi":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ct={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Bt={cw:Z,ccw:ne};function Xt(Be){return Array.isArray(Be)||dt(Be)||St(Be)}function Kt(Be){return Be.sort(function(yt,At){return yt===Lh?-1:At===Lh?1:yt=1,sr>=2,yt)}else if(At===wa){var gr=Be.data;return new Lt(gr.thisDep,gr.contextDep,gr.propDep,yt)}else{if(At===Ka)return new Lt(!1,!1,!1,yt);if(At===Ia){for(var Tr=!1,pr=!1,Or=!1,Jr=0;Jr=1&&(pr=!0),ei>=2&&(Or=!0)}else Qr.type===wa&&(Tr=Tr||Qr.data.thisDep,pr=pr||Qr.data.contextDep,Or=Or||Qr.data.propDep)}return new Lt(Tr,pr,Or,yt)}else return new Lt(At===Dn,At===cn,At===si,yt)}}var vi=new Lt(!1,!1,!1,function(){});function Ri(Be,yt,At,sr,gr,Tr,pr,Or,Jr,Qr,ei,vn,Vi,yi,Ir,tr){var Er=Qr.Record,Wr={add:32774,subtract:32778,"reverse subtract":32779};At.ext_blend_minmax&&(Wr.min=le,Wr.max=he);var oi=At.angle_instanced_arrays,Vr=At.webgl_draw_buffers,Mi=At.oes_vertex_array_object,bi={dirty:!0,profile:tr.profile},xn={},Nr=[],zr={},Bi={};function mi(ft){return ft.replace(".","_")}function ci(ft,Mt,Rt){var mr=mi(ft);Nr.push(ft),xn[mr]=bi[mr]=!!Rt,zr[mr]=Mt}function hi(ft,Mt,Rt){var mr=mi(ft);Nr.push(ft),Array.isArray(Rt)?(bi[mr]=Rt.slice(),xn[mr]=Rt.slice()):bi[mr]=xn[mr]=Rt,Bi[mr]=Mt}function qi(ft){return!!isNaN(ft)}ci(_o,Mr),ci(ca,or),hi(vl,"blendColor",[0,0,0,0]),hi(ls,"blendEquationSeparate",[We,We]),hi(yo,"blendFuncSeparate",[He,Re,He,Re]),ci(pi,_i,!0),hi(Da,"depthFunc",ut),hi(Fs,"depthRange",[0,1]),hi(Sl,"depthMask",!0),hi(Du,Du,[!0,!0,!0,!0]),ci(bf,Gt),hi(Zc,"cullFace",U),hi(Jf,Jf,ne),hi(Qu,Qu,1),ci(Dh,mn),hi(Fh,"polygonOffset",[0,0]),ci(zp,Tn),ci(Fg,Pn),hi(i1,"sampleCoverage",[1,!1]),ci(Ox,Gr),hi(n1,"stencilMask",-1),hi(Kc,"stencilFunc",[De,0,-1]),hi(py,"stencilOpSeparate",[z,ye,ye,ye]),hi(a1,"stencilOpSeparate",[U,ye,ye,ye]),ci(Lg,on),hi(o1,"scissor",[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]),hi(Lh,Lh,[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]);var bn={gl:Be,context:Vi,strings:yt,next:xn,current:bi,draw:vn,elements:Tr,buffer:gr,shader:ei,attributes:Qr.state,vao:Qr,uniforms:Jr,framebuffer:Or,extensions:At,timer:yi,isBufferArgs:Xt},Wn={primTypes:ns,compareFuncs:vt,blendFuncs:Yt,blendEquations:Wr,stencilOps:Ct,glTypes:Cr,orientationType:Bt};Vr&&(Wn.backBuffer=[U],Wn.drawBuffer=T(sr.maxDrawbuffers,function(ft){return ft===0?[0]:T(ft,function(Mt){return Nt+Mt})}));var Ti=0;function Wi(){var ft=$r({cache:Ir}),Mt=ft.link,Rt=ft.global;ft.id=Ti++,ft.batchId="0";var mr=Mt(bn),Sr=ft.shared={props:"a0"};Object.keys(bn).forEach(function(Vt){Sr[Vt]=Rt.def(mr,".",Vt)});var ar=ft.next={},ir=ft.current={};Object.keys(Bi).forEach(function(Vt){Array.isArray(bi[Vt])&&(ar[Vt]=Rt.def(Sr.next,".",Vt),ir[Vt]=Rt.def(Sr.current,".",Vt))});var $t=ft.constants={};Object.keys(Wn).forEach(function(Vt){$t[Vt]=Rt.def(JSON.stringify(Wn[Vt]))}),ft.invoke=function(Vt,Et){switch(Et.type){case Zr:var ur=["this",Sr.context,Sr.props,ft.batchId];return Vt.def(Mt(Et.data),".call(",ur.slice(0,Math.max(Et.data.length+1,4)),")");case si:return Vt.def(Sr.props,Et.data);case cn:return Vt.def(Sr.context,Et.data);case Dn:return Vt.def("this",Et.data);case wa:return Et.data.append(ft,Vt),Et.data.ref;case Ka:return Et.data.toString();case Ia:return Et.data.map(function(kr){return ft.invoke(Vt,kr)})}},ft.attribCache={};var Dt={};return ft.scopeAttrib=function(Vt){var Et=yt.id(Vt);if(Et in Dt)return Dt[Et];var ur=Qr.scope[Et];ur||(ur=Qr.scope[Et]=new Er);var kr=Dt[Et]=Mt(ur);return kr},ft}function Un(ft){var Mt=ft.static,Rt=ft.dynamic,mr;if(Pg in Mt){var Sr=!!Mt[Pg];mr=Hr(function(ir,$t){return Sr}),mr.enable=Sr}else if(Pg in Rt){var ar=Rt[Pg];mr=ai(ar,function(ir,$t){return ir.invoke($t,ar)})}return mr}function Vn(ft,Mt){var Rt=ft.static,mr=ft.dynamic;if(Bp in Rt){var Sr=Rt[Bp];return Sr?(Sr=Or.getFramebuffer(Sr),Hr(function(ir,$t){var Dt=ir.link(Sr),Vt=ir.shared;$t.set(Vt.framebuffer,".next",Dt);var Et=Vt.context;return $t.set(Et,"."+ve,Dt+".width"),$t.set(Et,"."+ke,Dt+".height"),Dt})):Hr(function(ir,$t){var Dt=ir.shared;$t.set(Dt.framebuffer,".next","null");var Vt=Dt.context;return $t.set(Vt,"."+ve,Vt+"."+it),$t.set(Vt,"."+ke,Vt+"."+Xe),"null"})}else if(Bp in mr){var ar=mr[Bp];return ai(ar,function(ir,$t){var Dt=ir.invoke($t,ar),Vt=ir.shared,Et=Vt.framebuffer,ur=$t.def(Et,".getFramebuffer(",Dt,")");$t.set(Et,".next",ur);var kr=Vt.context;return $t.set(kr,"."+ve,ur+"?"+ur+".width:"+kr+"."+it),$t.set(kr,"."+ke,ur+"?"+ur+".height:"+kr+"."+Xe),ur})}else return null}function Sa(ft,Mt,Rt){var mr=ft.static,Sr=ft.dynamic;function ar(Dt){if(Dt in mr){var Vt=mr[Dt],Et=!0,ur=Vt.x|0,kr=Vt.y|0,Xr,An;return"width"in Vt?Xr=Vt.width|0:Et=!1,"height"in Vt?An=Vt.height|0:Et=!1,new Lt(!Et&&Mt&&Mt.thisDep,!Et&&Mt&&Mt.contextDep,!Et&&Mt&&Mt.propDep,function(_n,sn){var nn=_n.shared.context,Li=Xr;"width"in Vt||(Li=sn.def(nn,".",ve,"-",ur));var Ji=An;return"height"in Vt||(Ji=sn.def(nn,".",ke,"-",kr)),[ur,kr,Li,Ji]})}else if(Dt in Sr){var Ui=Sr[Dt],Fi=ai(Ui,function(_n,sn){var nn=_n.invoke(sn,Ui),Li=_n.shared.context,Ji=sn.def(nn,".x|0"),rn=sn.def(nn,".y|0"),Yn=sn.def('"width" in ',nn,"?",nn,".width|0:","(",Li,".",ve,"-",Ji,")"),Hs=sn.def('"height" in ',nn,"?",nn,".height|0:","(",Li,".",ke,"-",rn,")");return[Ji,rn,Yn,Hs]});return Mt&&(Fi.thisDep=Fi.thisDep||Mt.thisDep,Fi.contextDep=Fi.contextDep||Mt.contextDep,Fi.propDep=Fi.propDep||Mt.propDep),Fi}else return Mt?new Lt(Mt.thisDep,Mt.contextDep,Mt.propDep,function(_n,sn){var nn=_n.shared.context;return[0,0,sn.def(nn,".",ve),sn.def(nn,".",ke)]}):null}var ir=ar(Lh);if(ir){var $t=ir;ir=new Lt(ir.thisDep,ir.contextDep,ir.propDep,function(Dt,Vt){var Et=$t.append(Dt,Vt),ur=Dt.shared.context;return Vt.set(ur,"."+Me,Et[2]),Vt.set(ur,"."+Pe,Et[3]),Et})}return{viewport:ir,scissor_box:ar(o1)}}function Cl(ft,Mt){var Rt=ft.static,mr=typeof Rt[fd]=="string"&&typeof Rt[qp]=="string";if(mr){if(Object.keys(Mt.dynamic).length>0)return null;var Sr=Mt.static,ar=Object.keys(Sr);if(ar.length>0&&typeof Sr[ar[0]]=="number"){for(var ir=[],$t=0;$t"+Ji+"?"+Et+".constant["+Ji+"]:0;"}).join(""),"}}else{","if(",Xr,"(",Et,".buffer)){",_n,"=",An,".createStream(",xt,",",Et,".buffer);","}else{",_n,"=",An,".getBuffer(",Et,".buffer);","}",sn,'="type" in ',Et,"?",kr.glTypes,"[",Et,".type]:",_n,".dtype;",Ui.normalized,"=!!",Et,".normalized;");function nn(Li){Vt(Ui[Li],"=",Et,".",Li,"|0;")}return nn("size"),nn("offset"),nn("stride"),nn("divisor"),Vt("}}"),Vt.exit("if(",Ui.isStream,"){",An,".destroyStream(",_n,");","}"),Ui}Sr[ar]=ai(ir,$t)}),Sr}function ih(ft){var Mt=ft.static,Rt=ft.dynamic,mr={};return Object.keys(Mt).forEach(function(Sr){var ar=Mt[Sr];mr[Sr]=Hr(function(ir,$t){return typeof ar=="number"||typeof ar=="boolean"?""+ar:ir.link(ar)})}),Object.keys(Rt).forEach(function(Sr){var ar=Rt[Sr];mr[Sr]=ai(ar,function(ir,$t){return ir.invoke($t,ar)})}),mr}function Rh(ft,Mt,Rt,mr,Sr){var ar=ft.static,ir=ft.dynamic,$t=Cl(ft,Mt),Dt=Vn(ft,Sr),Vt=Sa(ft,Dt,Sr),Et=Ba(ft,Sr),ur=Ih(ft,Sr),kr=rc(ft,Sr,$t);function Xr(nn){var Li=Vt[nn];Li&&(ur[nn]=Li)}Xr(Lh),Xr(mi(o1));var An=Object.keys(ur).length>0,Ui={framebuffer:Dt,draw:Et,shader:kr,state:ur,dirty:An,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ui.profile=Un(ft,Sr),Ui.uniforms=cs(Rt,Sr),Ui.drawVAO=Ui.scopeVAO=Et.vao,!Ui.drawVAO&&kr.program&&!$t&&At.angle_instanced_arrays&&Et.static.elements){var Fi=!0,_n=kr.program.attributes.map(function(nn){var Li=Mt.static[nn];return Fi=Fi&&!!Li,Li});if(Fi&&_n.length>0){var sn=Qr.getVAO(Qr.createVAO({attributes:_n,elements:Et.static.elements}));Ui.drawVAO=new Lt(null,null,null,function(nn,Li){return nn.link(sn)}),Ui.useVAO=!0}}return $t?Ui.useVAO=!0:Ui.attributes=wf(Mt,Sr),Ui.context=ih(mr,Sr),Ui}function Lu(ft,Mt,Rt){var mr=ft.shared,Sr=mr.context,ar=ft.scope();Object.keys(Rt).forEach(function(ir){Mt.save(Sr,"."+ir);var $t=Rt[ir],Dt=$t.append(ft,Mt);Array.isArray(Dt)?ar(Sr,".",ir,"=[",Dt.join(),"];"):ar(Sr,".",ir,"=",Dt,";")}),Mt(ar)}function Pu(ft,Mt,Rt,mr){var Sr=ft.shared,ar=Sr.gl,ir=Sr.framebuffer,$t;Vr&&($t=Mt.def(Sr.extensions,".webgl_draw_buffers"));var Dt=ft.constants,Vt=Dt.drawBuffer,Et=Dt.backBuffer,ur;Rt?ur=Rt.append(ft,Mt):ur=Mt.def(ir,".next"),mr||Mt("if(",ur,"!==",ir,".cur){"),Mt("if(",ur,"){",ar,".bindFramebuffer(",ct,",",ur,".framebuffer);"),Vr&&Mt($t,".drawBuffersWEBGL(",Vt,"[",ur,".colorAttachments.length]);"),Mt("}else{",ar,".bindFramebuffer(",ct,",null);"),Vr&&Mt($t,".drawBuffersWEBGL(",Et,");"),Mt("}",ir,".cur=",ur,";"),mr||Mt("}")}function ic(ft,Mt,Rt){var mr=ft.shared,Sr=mr.gl,ar=ft.current,ir=ft.next,$t=mr.current,Dt=mr.next,Vt=ft.cond($t,".dirty");Nr.forEach(function(Et){var ur=mi(Et);if(!(ur in Rt.state)){var kr,Xr;if(ur in ir){kr=ir[ur],Xr=ar[ur];var An=T(bi[ur].length,function(Fi){return Vt.def(kr,"[",Fi,"]")});Vt(ft.cond(An.map(function(Fi,_n){return Fi+"!=="+Xr+"["+_n+"]"}).join("||")).then(Sr,".",Bi[ur],"(",An,");",An.map(function(Fi,_n){return Xr+"["+_n+"]="+Fi}).join(";"),";"))}else{kr=Vt.def(Dt,".",ur);var Ui=ft.cond(kr,"!==",$t,".",ur);Vt(Ui),ur in zr?Ui(ft.cond(kr).then(Sr,".enable(",zr[ur],");").else(Sr,".disable(",zr[ur],");"),$t,".",ur,"=",kr,";"):Ui(Sr,".",Bi[ur],"(",kr,");",$t,".",ur,"=",kr,";")}}}),Object.keys(Rt.state).length===0&&Vt($t,".dirty=false;"),Mt(Vt)}function ha(ft,Mt,Rt,mr){var Sr=ft.shared,ar=ft.current,ir=Sr.current,$t=Sr.gl,Dt;Kt(Object.keys(Rt)).forEach(function(Vt){var Et=Rt[Vt];if(!(mr&&!mr(Et))){var ur=Et.append(ft,Mt);if(zr[Vt]){var kr=zr[Vt];Dr(Et)?(Dt=ft.link(ur,{stable:!0}),Mt(ft.cond(Dt).then($t,".enable(",kr,");").else($t,".disable(",kr,");")),Mt(ir,".",Vt,"=",Dt,";")):(Mt(ft.cond(ur).then($t,".enable(",kr,");").else($t,".disable(",kr,");")),Mt(ir,".",Vt,"=",ur,";"))}else if(Ar(ur)){var Xr=ar[Vt];Mt($t,".",Bi[Vt],"(",ur,");",ur.map(function(An,Ui){return Xr+"["+Ui+"]="+An}).join(";"),";")}else Dr(Et)?(Dt=ft.link(ur,{stable:!0}),Mt($t,".",Bi[Vt],"(",Dt,");",ir,".",Vt,"=",Dt,";")):Mt($t,".",Bi[Vt],"(",ur,");",ir,".",Vt,"=",ur,";")}})}function wc(ft,Mt){oi&&(ft.instancing=Mt.def(ft.shared.extensions,".angle_instanced_arrays"))}function bs(ft,Mt,Rt,mr,Sr){var ar=ft.shared,ir=ft.stats,$t=ar.current,Dt=ar.timer,Vt=Rt.profile;function Et(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var ur,kr;function Xr(nn){ur=Mt.def(),nn(ur,"=",Et(),";"),typeof Sr=="string"?nn(ir,".count+=",Sr,";"):nn(ir,".count++;"),yi&&(mr?(kr=Mt.def(),nn(kr,"=",Dt,".getNumPendingQueries();")):nn(Dt,".beginQuery(",ir,");"))}function An(nn){nn(ir,".cpuTime+=",Et(),"-",ur,";"),yi&&(mr?nn(Dt,".pushScopeStats(",kr,",",Dt,".getNumPendingQueries(),",ir,");"):nn(Dt,".endQuery();"))}function Ui(nn){var Li=Mt.def($t,".profile");Mt($t,".profile=",nn,";"),Mt.exit($t,".profile=",Li,";")}var Fi;if(Vt){if(Dr(Vt)){Vt.enable?(Xr(Mt),An(Mt.exit),Ui("true")):Ui("false");return}Fi=Vt.append(ft,Mt),Ui(Fi)}else Fi=Mt.def($t,".profile");var _n=ft.block();Xr(_n),Mt("if(",Fi,"){",_n,"}");var sn=ft.block();An(sn),Mt.exit("if(",Fi,"){",sn,"}")}function nh(ft,Mt,Rt,mr,Sr){var ar=ft.shared;function ir(Dt){switch(Dt){case Do:case ec:case Wl:return 2;case fa:case Qf:case Jc:return 3;case us:case m0:case eh:return 4;default:return 1}}function $t(Dt,Vt,Et){var ur=ar.gl,kr=Mt.def(Dt,".location"),Xr=Mt.def(ar.attributes,"[",kr,"]"),An=Et.state,Ui=Et.buffer,Fi=[Et.x,Et.y,Et.z,Et.w],_n=["buffer","normalized","offset","stride"];function sn(){Mt("if(!",Xr,".buffer){",ur,".enableVertexAttribArray(",kr,");}");var Li=Et.type,Ji;if(Et.size?Ji=Mt.def(Et.size,"||",Vt):Ji=Vt,Mt("if(",Xr,".type!==",Li,"||",Xr,".size!==",Ji,"||",_n.map(function(Yn){return Xr+"."+Yn+"!=="+Et[Yn]}).join("||"),"){",ur,".bindBuffer(",xt,",",Ui,".buffer);",ur,".vertexAttribPointer(",[kr,Ji,Li,Et.normalized,Et.stride,Et.offset],");",Xr,".type=",Li,";",Xr,".size=",Ji,";",_n.map(function(Yn){return Xr+"."+Yn+"="+Et[Yn]+";"}).join(""),"}"),oi){var rn=Et.divisor;Mt("if(",Xr,".divisor!==",rn,"){",ft.instancing,".vertexAttribDivisorANGLE(",[kr,rn],");",Xr,".divisor=",rn,";}")}}function nn(){Mt("if(",Xr,".buffer){",ur,".disableVertexAttribArray(",kr,");",Xr,".buffer=null;","}if(",Oi.map(function(Li,Ji){return Xr+"."+Li+"!=="+Fi[Ji]}).join("||"),"){",ur,".vertexAttrib4f(",kr,",",Fi,");",Oi.map(function(Li,Ji){return Xr+"."+Li+"="+Fi[Ji]+";"}).join(""),"}")}An===ji?sn():An===en?nn():(Mt("if(",An,"===",ji,"){"),sn(),Mt("}else{"),nn(),Mt("}"))}mr.forEach(function(Dt){var Vt=Dt.name,Et=Rt.attributes[Vt],ur;if(Et){if(!Sr(Et))return;ur=Et.append(ft,Mt)}else{if(!Sr(vi))return;var kr=ft.scopeAttrib(Vt);ur={},Object.keys(new Er).forEach(function(Xr){ur[Xr]=Mt.def(kr,".",Xr)})}$t(ft.link(Dt),ir(Dt.info.type),ur)})}function zh(ft,Mt,Rt,mr,Sr,ar){for(var ir=ft.shared,$t=ir.gl,Dt,Vt=0;Vt1){for(var qh=[],Rg=[],vy=0;vy>1)",Ui],");")}function rn(){Rt(Fi,".drawArraysInstancedANGLE(",[kr,Xr,An,Ui],");")}Et&&Et!=="null"?sn?Ji():(Rt("if(",Et,"){"),Ji(),Rt("}else{"),rn(),Rt("}")):rn()}function Li(){function Ji(){Rt(ar+".drawElements("+[kr,An,_n,Xr+"<<(("+_n+"-"+Di+")>>1)"]+");")}function rn(){Rt(ar+".drawArrays("+[kr,Xr,An]+");")}Et&&Et!=="null"?sn?Ji():(Rt("if(",Et,"){"),Ji(),Rt("}else{"),rn(),Rt("}")):rn()}oi&&(typeof Ui!="number"||Ui>=0)?typeof Ui=="string"?(Rt("if(",Ui,">0){"),nn(),Rt("}else if(",Ui,"<0){"),Li(),Rt("}")):nn():Li()}function ta(ft,Mt,Rt,mr,Sr){var ar=Wi(),ir=ar.proc("body",Sr);return oi&&(ar.instancing=ir.def(ar.shared.extensions,".angle_instanced_arrays")),ft(ar,ir,Rt,mr),ar.compile().body}function $a(ft,Mt,Rt,mr){wc(ft,Mt),Rt.useVAO?Rt.drawVAO?Mt(ft.shared.vao,".setVAO(",Rt.drawVAO.append(ft,Mt),");"):Mt(ft.shared.vao,".setVAO(",ft.shared.vao,".targetVAO);"):(Mt(ft.shared.vao,".setVAO(null);"),nh(ft,Mt,Rt,mr.attributes,function(){return!0})),zh(ft,Mt,Rt,mr.uniforms,function(){return!0},!1),Bh(ft,Mt,Mt,Rt)}function Gs(ft,Mt){var Rt=ft.proc("draw",1);wc(ft,Rt),Lu(ft,Rt,Mt.context),Pu(ft,Rt,Mt.framebuffer),ic(ft,Rt,Mt),ha(ft,Rt,Mt.state),bs(ft,Rt,Mt,!1,!0);var mr=Mt.shader.progVar.append(ft,Rt);if(Rt(ft.shared.gl,".useProgram(",mr,".program);"),Mt.shader.program)$a(ft,Rt,Mt,Mt.shader.program);else{Rt(ft.shared.vao,".setVAO(null);");var Sr=ft.global.def("{}"),ar=Rt.def(mr,".id"),ir=Rt.def(Sr,"[",ar,"]");Rt(ft.cond(ir).then(ir,".call(this,a0);").else(ir,"=",Sr,"[",ar,"]=",ft.link(function($t){return ta($a,ft,Mt,$t,1)}),"(",mr,");",ir,".call(this,a0);"))}Object.keys(Mt.state).length>0&&Rt(ft.shared.current,".dirty=true;"),ft.shared.vao&&Rt(ft.shared.vao,".setVAO(null);")}function wt(ft,Mt,Rt,mr){ft.batchId="a1",wc(ft,Mt);function Sr(){return!0}nh(ft,Mt,Rt,mr.attributes,Sr),zh(ft,Mt,Rt,mr.uniforms,Sr,!1),Bh(ft,Mt,Mt,Rt)}function xr(ft,Mt,Rt,mr){wc(ft,Mt);var Sr=Rt.contextDep,ar=Mt.def(),ir="a0",$t="a1",Dt=Mt.def();ft.shared.props=Dt,ft.batchId=ar;var Vt=ft.scope(),Et=ft.scope();Mt(Vt.entry,"for(",ar,"=0;",ar,"<",$t,";++",ar,"){",Dt,"=",ir,"[",ar,"];",Et,"}",Vt.exit);function ur(_n){return _n.contextDep&&Sr||_n.propDep}function kr(_n){return!ur(_n)}if(Rt.needsContext&&Lu(ft,Et,Rt.context),Rt.needsFramebuffer&&Pu(ft,Et,Rt.framebuffer),ha(ft,Et,Rt.state,ur),Rt.profile&&ur(Rt.profile)&&bs(ft,Et,Rt,!1,!0),mr)Rt.useVAO?Rt.drawVAO?ur(Rt.drawVAO)?Et(ft.shared.vao,".setVAO(",Rt.drawVAO.append(ft,Et),");"):Vt(ft.shared.vao,".setVAO(",Rt.drawVAO.append(ft,Vt),");"):Vt(ft.shared.vao,".setVAO(",ft.shared.vao,".targetVAO);"):(Vt(ft.shared.vao,".setVAO(null);"),nh(ft,Vt,Rt,mr.attributes,kr),nh(ft,Et,Rt,mr.attributes,ur)),zh(ft,Vt,Rt,mr.uniforms,kr,!1),zh(ft,Et,Rt,mr.uniforms,ur,!0),Bh(ft,Vt,Et,Rt);else{var Xr=ft.global.def("{}"),An=Rt.shader.progVar.append(ft,Et),Ui=Et.def(An,".id"),Fi=Et.def(Xr,"[",Ui,"]");Et(ft.shared.gl,".useProgram(",An,".program);","if(!",Fi,"){",Fi,"=",Xr,"[",Ui,"]=",ft.link(function(_n){return ta(wt,ft,Rt,_n,2)}),"(",An,");}",Fi,".call(this,a0[",ar,"],",ar,");")}}function br(ft,Mt){var Rt=ft.proc("batch",2);ft.batchId="0",wc(ft,Rt);var mr=!1,Sr=!0;Object.keys(Mt.context).forEach(function(Xr){mr=mr||Mt.context[Xr].propDep}),mr||(Lu(ft,Rt,Mt.context),Sr=!1);var ar=Mt.framebuffer,ir=!1;ar?(ar.propDep?mr=ir=!0:ar.contextDep&&mr&&(ir=!0),ir||Pu(ft,Rt,ar)):Pu(ft,Rt,null),Mt.state.viewport&&Mt.state.viewport.propDep&&(mr=!0);function $t(Xr){return Xr.contextDep&&mr||Xr.propDep}ic(ft,Rt,Mt),ha(ft,Rt,Mt.state,function(Xr){return!$t(Xr)}),(!Mt.profile||!$t(Mt.profile))&&bs(ft,Rt,Mt,!1,"a1"),Mt.contextDep=mr,Mt.needsContext=Sr,Mt.needsFramebuffer=ir;var Dt=Mt.shader.progVar;if(Dt.contextDep&&mr||Dt.propDep)xr(ft,Rt,Mt,null);else{var Vt=Dt.append(ft,Rt);if(Rt(ft.shared.gl,".useProgram(",Vt,".program);"),Mt.shader.program)xr(ft,Rt,Mt,Mt.shader.program);else{Rt(ft.shared.vao,".setVAO(null);");var Et=ft.global.def("{}"),ur=Rt.def(Vt,".id"),kr=Rt.def(Et,"[",ur,"]");Rt(ft.cond(kr).then(kr,".call(this,a0,a1);").else(kr,"=",Et,"[",ur,"]=",ft.link(function(Xr){return ta(xr,ft,Mt,Xr,2)}),"(",Vt,");",kr,".call(this,a0,a1);"))}}Object.keys(Mt.state).length>0&&Rt(ft.shared.current,".dirty=true;"),ft.shared.vao&&Rt(ft.shared.vao,".setVAO(null);")}function tn(ft,Mt){var Rt=ft.proc("scope",3);ft.batchId="a2";var mr=ft.shared,Sr=mr.current;if(Lu(ft,Rt,Mt.context),Mt.framebuffer&&Mt.framebuffer.append(ft,Rt),Kt(Object.keys(Mt.state)).forEach(function($t){var Dt=Mt.state[$t],Vt=Dt.append(ft,Rt);Ar(Vt)?Vt.forEach(function(Et,ur){qi(Et)?Rt.set(ft.next[$t],"["+ur+"]",Et):Rt.set(ft.next[$t],"["+ur+"]",ft.link(Et,{stable:!0}))}):Dr(Dt)?Rt.set(mr.next,"."+$t,ft.link(Vt,{stable:!0})):Rt.set(mr.next,"."+$t,Vt)}),bs(ft,Rt,Mt,!0,!0),[Op,Ig,s1,_c,hd].forEach(function($t){var Dt=Mt.draw[$t];if(Dt){var Vt=Dt.append(ft,Rt);qi(Vt)?Rt.set(mr.draw,"."+$t,Vt):Rt.set(mr.draw,"."+$t,ft.link(Vt),{stable:!0})}}),Object.keys(Mt.uniforms).forEach(function($t){var Dt=Mt.uniforms[$t].append(ft,Rt);Array.isArray(Dt)&&(Dt="["+Dt.map(function(Vt){return qi(Vt)?Vt:ft.link(Vt,{stable:!0})})+"]"),Rt.set(mr.uniforms,"["+ft.link(yt.id($t),{stable:!0})+"]",Dt)}),Object.keys(Mt.attributes).forEach(function($t){var Dt=Mt.attributes[$t].append(ft,Rt),Vt=ft.scopeAttrib($t);Object.keys(new Er).forEach(function(Et){Rt.set(Vt,"."+Et,Dt[Et])})}),Mt.scopeVAO){var ar=Mt.scopeVAO.append(ft,Rt);qi(ar)?Rt.set(mr.vao,".targetVAO",ar):Rt.set(mr.vao,".targetVAO",ft.link(ar,{stable:!0}))}function ir($t){var Dt=Mt.shader[$t];if(Dt){var Vt=Dt.append(ft,Rt);qi(Vt)?Rt.set(mr.shader,"."+$t,Vt):Rt.set(mr.shader,"."+$t,ft.link(Vt,{stable:!0}))}}ir(qp),ir(fd),Object.keys(Mt.state).length>0&&(Rt(Sr,".dirty=true;"),Rt.exit(Sr,".dirty=true;")),Rt("a1(",ft.shared.context,",a0,",ft.batchId,");")}function Ga(ft){if(!(typeof ft!="object"||Ar(ft))){for(var Mt=Object.keys(ft),Rt=0;Rt=0;--ta){var $a=bn[ta];$a&&$a(Ir,null,0)}At.flush(),ei&&ei.update()}function Sa(){!Un&&bn.length>0&&(Un=p.next(Vn))}function Cl(){Un&&(p.cancel(Vn),Un=null)}function rc(ta){ta.preventDefault(),gr=!0,Cl(),Wn.forEach(function($a){$a()})}function Ba(ta){At.getError(),gr=!1,Tr.restore(),xn.restore(),oi.restore(),Nr.restore(),zr.restore(),Bi.restore(),Mi.restore(),ei&&ei.restore(),mi.procs.refresh(),Sa(),Ti.forEach(function($a){$a()})}qi&&(qi.addEventListener(Kn,rc,!1),qi.addEventListener(Va,Ba,!1));function Ih(){bn.length=0,Cl(),qi&&(qi.removeEventListener(Kn,rc),qi.removeEventListener(Va,Ba)),xn.clear(),Bi.clear(),zr.clear(),Mi.clear(),Nr.clear(),Vr.clear(),oi.clear(),ei&&ei.clear(),Wi.forEach(function(ta){ta()})}function cs(ta){function $a(ar){var ir=e({},ar);delete ir.uniforms,delete ir.attributes,delete ir.context,delete ir.vao,"stencil"in ir&&ir.stencil.op&&(ir.stencil.opBack=ir.stencil.opFront=ir.stencil.op,delete ir.stencil.op);function $t(Dt){if(Dt in ir){var Vt=ir[Dt];delete ir[Dt],Object.keys(Vt).forEach(function(Et){ir[Dt+"."+Et]=Vt[Et]})}}return $t("blend"),$t("depth"),$t("cull"),$t("stencil"),$t("polygonOffset"),$t("scissor"),$t("sample"),"vao"in ar&&(ir.vao=ar.vao),ir}function Gs(ar,ir){var $t={},Dt={};return Object.keys(ar).forEach(function(Vt){var Et=ar[Vt];if(h.isDynamic(Et)){Dt[Vt]=h.unbox(Et,Vt);return}else if(ir&&Array.isArray(Et)){for(var ur=0;ur0)return ft.call(this,mr(ar|0),ar|0)}else if(Array.isArray(ar)){if(ar.length)return ft.call(this,ar,ar.length)}else return Ki.call(this,ar)}return e(Sr,{stats:Ga,destroy:function(){fs.destroy()}})}var wf=Bi.setFBO=cs({framebuffer:h.define.call(null,xs,"framebuffer")});function ih(ta,$a){var Gs=0;mi.procs.poll();var wt=$a.color;wt&&(At.clearColor(+wt[0]||0,+wt[1]||0,+wt[2]||0,+wt[3]||0),Gs|=nl),"depth"in $a&&(At.clearDepth(+$a.depth),Gs|=po),"stencil"in $a&&(At.clearStencil($a.stencil|0),Gs|=li),At.clear(Gs)}function Rh(ta){if("framebuffer"in ta)if(ta.framebuffer&&ta.framebuffer_reglType==="framebufferCube")for(var $a=0;$a<6;++$a)wf(e({framebuffer:ta.framebuffer.faces[$a]},ta),ih);else wf(ta,ih);else ih(null,ta)}function Lu(ta){bn.push(ta);function $a(){var Gs=tc(bn,ta);function wt(){var xr=tc(bn,wt);bn[xr]=bn[bn.length-1],bn.length-=1,bn.length<=0&&Cl()}bn[Gs]=wt}return Sa(),{cancel:$a}}function Pu(){var ta=hi.viewport,$a=hi.scissor_box;ta[0]=ta[1]=$a[0]=$a[1]=0,Ir.viewportWidth=Ir.framebufferWidth=Ir.drawingBufferWidth=ta[2]=$a[2]=At.drawingBufferWidth,Ir.viewportHeight=Ir.framebufferHeight=Ir.drawingBufferHeight=ta[3]=$a[3]=At.drawingBufferHeight}function ic(){Ir.tick+=1,Ir.time=wc(),Pu(),mi.procs.poll()}function ha(){Nr.refresh(),Pu(),mi.procs.refresh(),ei&&ei.update()}function wc(){return(d()-vn)/1e3}ha();function bs(ta,$a){var Gs;switch(ta){case"frame":return Lu($a);case"lost":Gs=Wn;break;case"restore":Gs=Ti;break;case"destroy":Gs=Wi;break;default:}return Gs.push($a),{cancel:function(){for(var wt=0;wt=0},read:ci,destroy:Ih,_gl:At,_refresh:ha,poll:function(){ic(),ei&&ei.update()},now:wc,stats:Or,getCachedCode:nh,preloadCachedCode:zh});return yt.onDone(null,Bh),Bh}return Qc}))});var TXe=W((fti,wXe)=>{"use strict";var kpr=K1();wXe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},bXe(t)?t={container:t}:Cpr(t)?t={container:t}:Dpr(t)?t={gl:t}:t=kpr(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}bXe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=_Xe(),t.container.appendChild(t.canvas),xXe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=_Xe(),t.container.appendChild(t.canvas),xXe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(i){try{t.gl=t.canvas.getContext(i,t.attrs)}catch(n){}return t.gl}),t.gl};function xXe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function bXe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function Cpr(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function Dpr(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function _Xe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var MXe=W((hti,AXe)=>{"use strict";var Fpr=Dte(),Lpr=[32,126];AXe.exports=Ppr;function Ppr(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),i=e.font,n=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],a=e.chars||Lpr;if(i&&typeof i!="string"&&(i=Fpr(i)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=i,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=n[0]/2,f=n[1]/2,s=0;st[0]-n[0]/2&&(c=n[0]/2,f+=n[1]);return r}});var Rte=W(iu=>{"use strict";"use restrict";var Ite=32;iu.INT_BITS=Ite;iu.INT_MAX=2147483647;iu.INT_MIN=-1<0)-(e<0)};iu.abs=function(e){var t=e>>Ite-1;return(e^t)-t};iu.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};iu.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};iu.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function SXe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}iu.countTrailingZeros=SXe;iu.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};iu.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};iu.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var ok=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=r&1,--n;e[t]=i<>>8&255]<<16|ok[e>>>16&255]<<8|ok[e>>>24&255]};iu.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};iu.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};iu.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};iu.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};iu.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>SXe(e)+1}});var CXe=W((pti,kXe)=>{"use strict";function EXe(e,t,r){var i=e[r]|0;if(i<=0)return[];var n=new Array(i),a;if(r===e.length-1)for(a=0;a0)return Ipr(e|0,t);break;case"object":if(typeof e.length=="number")return EXe(e,t,0);break}return[]}kXe.exports=Rpr});var HXe=W(vo=>{"use strict";var j2=Rte(),ff=CXe(),DXe=t_().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:ff([32,0]),UINT16:ff([32,0]),UINT32:ff([32,0]),BIGUINT64:ff([32,0]),INT8:ff([32,0]),INT16:ff([32,0]),INT32:ff([32,0]),BIGINT64:ff([32,0]),FLOAT:ff([32,0]),DOUBLE:ff([32,0]),DATA:ff([32,0]),UINT8C:ff([32,0]),BUFFER:ff([32,0])});var zpr=typeof Uint8ClampedArray!="undefined",Bpr=typeof BigUint64Array!="undefined",qpr=typeof BigInt64Array!="undefined",wu=window.__TYPEDARRAY_POOL;wu.UINT8C||(wu.UINT8C=ff([32,0]));wu.BIGUINT64||(wu.BIGUINT64=ff([32,0]));wu.BIGINT64||(wu.BIGINT64=ff([32,0]));wu.BUFFER||(wu.BUFFER=ff([32,0]));var bz=wu.DATA,_z=wu.BUFFER;vo.free=function(t){if(DXe.isBuffer(t))_z[j2.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,i=j2.log2(r)|0;bz[i].push(t)}};function FXe(e){if(e){var t=e.length||e.byteLength,r=j2.log2(t);bz[r].push(e)}}function Opr(e){FXe(e.buffer)}vo.freeUint8=vo.freeUint16=vo.freeUint32=vo.freeBigUint64=vo.freeInt8=vo.freeInt16=vo.freeInt32=vo.freeBigInt64=vo.freeFloat32=vo.freeFloat=vo.freeFloat64=vo.freeDouble=vo.freeUint8Clamped=vo.freeDataView=Opr;vo.freeArrayBuffer=FXe;vo.freeBuffer=function(t){_z[j2.log2(t.length)].push(t)};vo.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return t0(t);switch(r){case"uint8":return zte(t);case"uint16":return LXe(t);case"uint32":return PXe(t);case"int8":return IXe(t);case"int16":return RXe(t);case"int32":return zXe(t);case"float":case"float32":return BXe(t);case"double":case"float64":return qXe(t);case"uint8_clamped":return OXe(t);case"bigint64":return UXe(t);case"biguint64":return NXe(t);case"buffer":return GXe(t);case"data":case"dataview":return VXe(t);default:return null}return null};function t0(t){var t=j2.nextPow2(t),r=j2.log2(t),i=bz[r];return i.length>0?i.pop():new ArrayBuffer(t)}vo.mallocArrayBuffer=t0;function zte(e){return new Uint8Array(t0(e),0,e)}vo.mallocUint8=zte;function LXe(e){return new Uint16Array(t0(2*e),0,e)}vo.mallocUint16=LXe;function PXe(e){return new Uint32Array(t0(4*e),0,e)}vo.mallocUint32=PXe;function IXe(e){return new Int8Array(t0(e),0,e)}vo.mallocInt8=IXe;function RXe(e){return new Int16Array(t0(2*e),0,e)}vo.mallocInt16=RXe;function zXe(e){return new Int32Array(t0(4*e),0,e)}vo.mallocInt32=zXe;function BXe(e){return new Float32Array(t0(4*e),0,e)}vo.mallocFloat32=vo.mallocFloat=BXe;function qXe(e){return new Float64Array(t0(8*e),0,e)}vo.mallocFloat64=vo.mallocDouble=qXe;function OXe(e){return zpr?new Uint8ClampedArray(t0(e),0,e):zte(e)}vo.mallocUint8Clamped=OXe;function NXe(e){return Bpr?new BigUint64Array(t0(8*e),0,e):null}vo.mallocBigUint64=NXe;function UXe(e){return qpr?new BigInt64Array(t0(8*e),0,e):null}vo.mallocBigInt64=UXe;function VXe(e){return new DataView(t0(e),0,e)}vo.mallocDataView=VXe;function GXe(e){e=j2.nextPow2(e);var t=j2.log2(e),r=_z[t];return r.length>0?r.pop():new DXe(e)}vo.mallocBuffer=GXe;vo.clearCache=function(){for(var t=0;t<32;++t)wu.UINT8[t].length=0,wu.UINT16[t].length=0,wu.UINT32[t].length=0,wu.INT8[t].length=0,wu.INT16[t].length=0,wu.INT32[t].length=0,wu.FLOAT[t].length=0,wu.DOUBLE[t].length=0,wu.BIGUINT64[t].length=0,wu.BIGINT64[t].length=0,wu.UINT8C[t].length=0,bz[t].length=0,_z[t].length=0}});var $Xe=W((gti,jXe)=>{"use strict";var Npr=Object.prototype.toString;jXe.exports=function(e){var t;return Npr.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var Bte=W((mti,WXe)=>{WXe.exports=function(t,r){r||(r=[0,""]),t=String(t);var i=parseFloat(t,10);return r[0]=i,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var ZXe=W((yti,XXe)=>{"use strict";var Upr=Bte();XXe.exports=YXe;var sk=96;function qte(e,t){var r=Upr(getComputedStyle(e).getPropertyValue(t));return r[0]*YXe(r[1],e)}function Vpr(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var i=qte(r,"font-size")/128;return t.removeChild(r),i}function YXe(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 Vpr(e,t);case"em":return qte(t,"font-size");case"rem":return qte(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 sk;case"cm":return sk/2.54;case"mm":return sk/25.4;case"pt":return sk/72;case"pc":return sk/6}return 1}});var QXe=W((xti,JXe)=>{"use strict";JXe.exports=Az;var Gpr=Az.canvas=document.createElement("canvas"),wz=Gpr.getContext("2d"),KXe=Tz([32,126]);Az.createPairs=Tz;Az.ascii=KXe;function Az(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},i,n=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?i=Tz(t):Array.isArray(t)?i=t:(t.o?i=Tz(t.o):t.pairs&&(i=t.pairs),t.fontSize&&(n=t.fontSize),t.threshold!=null&&(a=t.threshold))),i||(i=KXe),wz.font=n+"px "+e;for(var o=0;on*a){var c=(u-l)/n;r[s]=c*1e3}}return r}function Tz(e){for(var t=[],r=e[0];r<=e[1];r++)for(var i=String.fromCharCode(r),n=e[0];n{"use strict";rZe.exports=$2;$2.canvas=document.createElement("canvas");$2.cache={};function $2(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var i=t.size||t.fontSize||t.em||48,n=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,n,i].join(" ")+"px "+r,s=t.origin||"top";if($2.cache[r]&&i<=$2.cache[r].em)return eZe($2.cache[r],s);var l=t.canvas||$2.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(i*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",p={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var d=Q1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var v=Q1(u.getImageData(0,0,f,f));p.lineHeight=p.bottom=f-v+d,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var m=Q1(u.getImageData(0,0,f,f)),g=f-m-1+d;p.baseline=p.alphabetic=g,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var w=Q1(u.getImageData(0,0,f,f));p.median=p.middle=f-w-1+d-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var _=Q1(u.getImageData(0,0,f,f));p.hanging=f-_-1+d-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var b=Q1(u.getImageData(0,0,f,f));if(p.ideographic=f-b-1+d,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),p.upper=Q1(u.getImageData(0,0,f,f)),p.capHeight=p.baseline-p.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),p.lower=Q1(u.getImageData(0,0,f,f)),p.xHeight=p.baseline-p.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),p.tittle=Q1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),p.ascent=Q1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),p.descent=tZe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var M=tZe(u.getImageData(0,0,f,f));p.overshoot=M-g}for(var x in p)p[x]/=i;return p.em=i,$2.cache[r]=p,eZe(p,s)}function eZe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var i in e)i!=="em"&&(r[i]=e[i]-t);return r}function Q1(e){for(var t=e.height,r=e.data,i=3;i0;i-=4)if(r[i]!==0)return Math.floor((i-3)*.25/t)}});var sZe=W((_ti,oZe)=>{"use strict";var uT=yXe(),Hpr=K1(),jpr=Pte(),$pr=TXe(),Wpr=gte(),Ote=$E(),Ypr=MXe(),W2=HXe(),Xpr=K4(),Zpr=$Xe(),Kpr=Bte(),Jpr=ZXe(),Qpr=QXe(),evr=Hu(),tvr=iZe(),rvr=V_(),ivr=Rte(),nZe=ivr.nextPow2,aZe=new Wpr,Sz=!1;document.body&&(Mz=document.body.appendChild(document.createElement("div")),Mz.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(Mz).fontStretch&&(Sz=!0),document.body.removeChild(Mz));var Mz,Zo=function(t){nvr(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=$pr(t),this.shader=aZe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||jpr({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(),aZe.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(Zpr(t)?t:{})};Zo.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(n,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(n,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(n,a){return a.atlas.texture},charStep:function(n,a){return a.atlas.step},em:function(n,a){return a.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; uniform float fontSize, charStep, em, align, baseline; uniform vec4 viewport; uniform vec4 color; uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; varying vec2 charCoord, charId; varying float charWidth; varying vec4 fontColor; void main () { vec2 offset = floor(em * (vec2(align + charOffset, baseline) + vec2(positionOffset.x, -positionOffset.y))) / (viewport.zw * scale.xy); vec2 position = (position + translate) * scale; position += offset * scale; charCoord = position * viewport.zw + viewport.xy; gl_Position = vec4(position * 2. - 1., 0, 1); gl_PointSize = charStep; charId.x = mod(char, atlasDim.x); charId.y = floor(char / atlasDim.x); charWidth = width * em; fontColor = color / 255.; }`,frag:` precision highp float; uniform float fontSize, charStep, opacity; uniform vec2 atlasSize; uniform vec4 viewport; uniform sampler2D atlas; varying vec4 fontColor; varying vec2 charCoord, charId; varying float charWidth; float lightness(vec4 color) { return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; } void main () { vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; float halfCharStep = floor(charStep * .5 + .5); // invert y and shift by 1px (FF expecially needs that) uv.y = charStep - uv.y; // ignore points outside of character bounding box float halfCharWidth = ceil(charWidth * .5); if (floor(uv.x) > halfCharStep + halfCharWidth || floor(uv.x) < halfCharStep - halfCharWidth) return; uv += charId * charStep; uv = uv / atlasSize; vec4 color = fontColor; vec4 mask = texture2D(atlas, uv); float maskY = lightness(mask); // float colorY = lightness(color); color.a *= maskY; color.a *= opacity; // color.a += .1; // antialiasing, see yiq color space y-channel formula // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; }`}),i={};return{regl:t,draw:r,atlas:i}};Zo.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=Hpr(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(K){return parseFloat(K)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=Xpr(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset=="number"&&(t.offset=[t.offset,0]),this.positionOffset=rvr(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=Zo.baseFontSize+"px sans-serif");var i=!1,n=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(K,G){if(typeof K=="string")try{K=uT.parse(K)}catch(ue){K=uT.parse(Zo.baseFontSize+"px "+K)}else{var q=K.style,J=K.weight,N=K.stretch,V=K.variant;K=uT.parse(uT.stringify(K)),q&&(K.style=q),J&&(K.weight=J),N&&(K.stretch=N),V&&(K.variant=V)}var Y=uT.stringify({size:Zo.baseFontSize,family:K.family,stretch:Sz?K.stretch:void 0,variant:K.variant,weight:K.weight,style:K.style}),H=Kpr(K.size),j=Math.round(H[0]*Jpr(H[1]));if(j!==r.fontSize[G]&&(n=!0,r.fontSize[G]=j),(!r.font[G]||Y!=r.font[G].baseString)&&(i=!0,r.font[G]=Zo.fonts[Y],!r.font[G])){var Q=K.family.join(", "),te=[K.style];K.style!=K.variant&&te.push(K.variant),K.variant!=K.weight&&te.push(K.weight),Sz&&K.weight!=K.stretch&&te.push(K.stretch),r.font[G]={baseString:Y,family:Q,weight:K.weight,stretch:K.stretch,style:K.style,variant:K.variant,width:{},kerning:{},metrics:tvr(Q,{origin:"top",fontSize:Zo.baseFontSize,fontStyle:te.join(" ")})},Zo.fonts[Y]=r.font[G]}}),(i||n)&&this.font.forEach(function(K,G){var q=uT.stringify({size:r.fontSize[G],family:K.family,stretch:Sz?K.stretch:void 0,variant:K.variant,weight:K.weight,style:K.style});if(r.fontAtlas[G]=r.shader.atlas[q],!r.fontAtlas[G]){var J=K.metrics;r.shader.atlas[q]=r.fontAtlas[G]={fontString:q,step:Math.ceil(r.fontSize[G]*J.bottom*.5)*2,em:r.fontSize[G],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=W2.mallocFloat(this.count*2),f=0,h=0;f1?r.align[G]:r.align[0]:r.align;if(typeof q=="number")return q;switch(q){case"right":case"end":return-K;case"center":case"centre":case"middle":return-K*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(K,G){var q=(r.font[G]||r.font[0]).metrics,J=0;return J+=q.bottom*.5,typeof K=="number"?J+=K-q.baseline:J+=-q[K],J*=-1,J})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=Ote(t.color,"uint8");else{var F;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var P=t.color.length;F=W2.mallocUint8(P);for(var R=(t.color.subarray||t.color.slice).bind(t.color),L=0;L4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(O){var $=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($);for(var X=0;X1?this.counts[X]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[X]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(X*4,X*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[X]:this.opacity,baseline:this.baselineOffset[X]!=null?this.baselineOffset[X]:this.baselineOffset[0],align:this.align?this.alignOffset[X]!=null?this.alignOffset[X]:this.alignOffset[0]:0,atlas:this.fontAtlas[X]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(X*2,X*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=[]}};Zo.prototype.destroy=function(){};Zo.prototype.kerning=!0;Zo.prototype.position={constant:new Float32Array(2)};Zo.prototype.translate=null;Zo.prototype.scale=null;Zo.prototype.font=null;Zo.prototype.text="";Zo.prototype.positionOffset=[0,0];Zo.prototype.opacity=1;Zo.prototype.color=new Uint8Array([0,0,0,255]);Zo.prototype.alignOffset=[0,0];Zo.maxAtlasSize=1024;Zo.atlasCanvas=document.createElement("canvas");Zo.atlasContext=Zo.atlasCanvas.getContext("2d",{alpha:!1});Zo.baseFontSize=64;Zo.fonts={};function nvr(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}oZe.exports=Zo});var Ez=W((wti,lZe)=>{"use strict";var avr=XJ(),ovr=Pte();lZe.exports=function(t,r,i){var n=t._fullLayout,a=!0;return n._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(i);return}if(!(o.pick&&!n._has("parcoords"))){try{o.regl=ovr({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:i||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),a||avr({container:n._glcontainer.node()}),a}});var Ute=W((Nte,pZe)=>{"use strict";var uZe=Uee(),cZe=xte(),svr=QYe(),fZe=sZe(),hZe=tt(),{rgbaString:lvr}=ti(),uvr=_1().selectMode,cvr=Ez(),fvr=Wo(),hvr=z$(),dvr=qee().styleTextSelection,dZe={};function pvr(e,t,r,i){var n=e._size,a=e.width*i,o=e.height*i,s=n.l*i,l=n.b*i,u=n.r*i,c=n.t*i,f=n.w*i,h=n.h*i;let p=(t._padStart||0)*i,d=(t._padEnd||0)*i,v=(r._padStart||0)*i,m=(r._padEnd||0)*i;return[s+t.domain[0]*f+p,l+r.domain[0]*h+m,a-u-(1-t.domain[1])*f-d,o-c-(1-r.domain[1])*h-v]}var Nte=pZe.exports=function(t,r,i){if(i.length){var n=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=cvr(t,["ANGLE_instanced_arrays","OES_element_index_uint"],dZe);if(!c){a.init();return}var f=a.count,h=n._glcanvas.data()[0].regl;if(hvr(t,r,i),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=svr(h)),a.line2d===!0&&(a.line2d=cZe(h)),a.scatter2d===!0&&(a.scatter2d=uZe(h)),a.fill2d===!0&&(a.fill2d=cZe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var p=f-a.glText.length;for(l=0;lB&&(isNaN(I[O])||isNaN(I[O+1]));)O-=2;L.positions=I.slice(B,O+2)}return L}),a.line2d.update(a.lineOptions)),a.error2d){var m=(a.errorXOptions||[]).concat(a.errorYOptions||[]).map(function(L){return L||{positions:[],errors:[]}});a.error2d.update(m)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=hZe.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(L,I){var B=i[I];if(!(!L||!B||!B[0]||!B[0].trace)){var O=B[0],$=O.trace,X=O.t,K=a.lineOptions[I],G,q,J=[];$._ownfill&&J.push(I),$._nexttrace&&J.push(I+1),J.length&&(a.fillOrder[I]=J);var N=[],V=K&&K.positions||X.positions,Y,H;if($.fill==="tozeroy"){for(Y=0;YY&&isNaN(V[H+1]);)H-=2;V[Y+1]!==0&&(N=[V[Y],0]),N=N.concat(V.slice(Y,H+2)),V[H+1]!==0&&(N=N.concat([V[H],0]))}else if($.fill==="tozerox"){for(Y=0;YY&&isNaN(V[H]);)H-=2;V[Y]!==0&&(N=[0,V[Y+1]]),N=N.concat(V.slice(Y,H+2)),V[H]!==0&&(N=N.concat([0,V[H+1]]))}else if($.fill==="toself"||$.fill==="tonext"){for(N=[],G=0,L.splitNull=!0,q=0;q-1;for(let[L]of i)if(L){var b=L.trace,M=L.t,x=M.index,A=b._length,T=M.x,y=M.y;if(b.selectedpoints||w||_){if(w||(w=!0),b.selectedpoints){var E=a.selectBatch[x]=b.selectedpoints,S={};for(u=0;u{"use strict";var vZe=Cje();vZe.plot=Ute();gZe.exports=vZe});var xZe=W((Ati,yZe)=>{"use strict";yZe.exports=mZe()});var Vte=W((Mti,TZe)=>{"use strict";var vvr=Ws(),wZe=Fo(),bZe=Ts().axisHoverFormat,{hovertemplateAttrs:gvr,templatefallbackAttrs:mvr}=Wa(),lk=UE(),yvr=(Zl(),Pt(Xl)).idRegex,xvr=Ra().templatedArray,cT=an().extendFlat,Cm=vvr.marker,bvr=Cm.line,_vr=cT(wZe("marker.line",{editTypeOverride:"calc"}),{width:cT({},bvr.width,{editType:"calc"}),editType:"calc"}),kz=cT(wZe("marker"),{symbol:Cm.symbol,angle:Cm.angle,size:cT({},Cm.size,{editType:"markerSize"}),sizeref:Cm.sizeref,sizemin:Cm.sizemin,sizemode:Cm.sizemode,opacity:Cm.opacity,colorbar:Cm.colorbar,line:_vr,editType:"calc"});kz.color.editType=kz.cmin.editType=kz.cmax.editType="style";function _Ze(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:yvr[e],editType:"plot"}}}TZe.exports={dimensions:xvr("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:cT({},lk.text,{}),hovertext:cT({},lk.hovertext,{}),hovertemplate:gvr(),hovertemplatefallback:mvr(),xhoverformat:bZe("x"),yhoverformat:bZe("y"),marker:kz,xaxes:_Ze("x"),yaxes:_Ze("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:lk.selected.marker,editType:"calc"},unselected:{marker:lk.unselected.marker,editType:"calc"},opacity:lk.opacity}});var Cz=W((Sti,AZe)=>{"use strict";AZe.exports=function(e,t,r,i){i||(i=1/0);var n,a;for(n=0;n{"use strict";var Gte=tt(),wvr=tf(),MZe=Vte(),Tvr=Wo(),Avr=Dd(),Mvr=Cz(),Svr=jR().isOpenSymbol;SZe.exports=function(t,r,i,n){function a(p,d){return Gte.coerce(t,r,MZe,p,d)}var o=wvr(t,r,{name:"dimensions",handleItemDefaults:Evr}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=Mvr(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),Avr(t,r,i,n,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=Svr(r.marker.symbol),h=Tvr.isBubble(r);a("marker.line.width",f||h?1:0),kvr(t,r,n,a),Gte.coerceSelectionMarkerOpacity(r,a)};function Evr(e,t){function r(n,a){return Gte.coerce(e,t,MZe.dimensions,n,a)}r("label");var i=r("values");i&&i.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function kvr(e,t,r,i){var n=t.dimensions,a=n.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;uc&&o||u{"use strict";var kZe=tt();CZe.exports=function(t,r){var i=t._fullLayout,n=r.uid,a=i._splomScenes;a||(a=i._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[n]=kZe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||kZe.extendFlat(l,o),l}});var PZe=W((Cti,LZe)=>{"use strict";var Hte=tt(),Dz=Ls(),Cvr=Ld().calcMarkerSize,Dvr=Ld().calcAxisExpansion,Fvr=Fd(),FZe=j_().markerSelection,Lvr=j_().markerStyle,Pvr=DZe(),Ivr=(ra(),Pt(ia)).BADNUM,Rvr=(N_(),Pt(O_)).TOO_MANY_POINTS;LZe.exports=function(t,r){var i=r.dimensions,n=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,p;function d(_,b){for(var M=_.makeCalcdata({v:b.values,vcalendar:r.calendar},"v"),x=0;xRvr,g;for(m?g=a.sizeAvg||Math.max(a.size,3):g=Cvr(r,n),c=0;c{(function(){var e,t,r,i,n,a;typeof performance!="undefined"&&performance!==null&&performance.now?uk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(uk.exports=function(){return(e()-n)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},i=e(),a=process.uptime()*1e9,n=i-a):Date.now?(uk.exports=function(){return Date.now()-r},r=Date.now()):(uk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(IZe)});var BZe=W((Dti,Pz)=>{var zvr=RZe(),Dm=window,Fz=["moz","webkit"],hT="AnimationFrame",dT=Dm["request"+hT],ck=Dm["cancel"+hT]||Dm["cancelRequest"+hT];for(fT=0;!dT&&fT{qZe.exports=function(t,r){var i=typeof t=="number",n=typeof r=="number";i&&!n?(r=t,t=0):!i&&!n&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s{"use strict";var Bvr=Uee(),qvr=K1(),Ovr=U_(),NZe=BZe(),Nvr=OZe(),$te=K4(),Uvr=V_();VZe.exports=X2;function X2(e,t){if(!(this instanceof X2))return new X2(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=Bvr(e),this.canvas=this.scatter.canvas}X2.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=NZe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,NZe(()=>{this.dirty=!1})),this)};X2.prototype.update=function(...e){if(!e.length)return;for(let i=0;im||!n.lower&&v{t[a+s]=i})}this.scatter.draw(...t)}return this};X2.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function Vvr(e,t,r){let i=e.id!=null?e.id:e,n=t,a=r;return i<<16|(n&255)<<8|a&255}function Iz(e,t,r){let i,n,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(i=f[0],a=f[2],n=f[1],o=f[3]):f.length?(i=n=f[0],a=o=f[1]):(i=f.x,n=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,n,u,o]}function UZe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=$te(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var jZe=W((Pti,HZe)=>{"use strict";var Gvr=GZe(),Wte=tt(),Rz=Ls(),Hvr=_1().selectMode;HZe.exports=function(t,r,i){if(i.length)for(var n=0;n(X||0)/K;for(v=0;v-1,C=Hvr(c)||!!n.selectedpoints||S,k=!0;if(C){var D=n._length;if(n.selectedpoints){o.selectBatch=n.selectedpoints;var F=n.selectedpoints,P={};for(p=0;p{"use strict";$Ze.getDimIndex=function(t,r){for(var i=r._id,n=i.charAt(0),a={x:0,y:1}[n],o=t._visibleDims,s=0;s{"use strict";var WZe=Yte(),$vr=HR().calcHover,YZe=Yi().getFromId,Wvr=an().extendFlat;function Yvr(e,t,r,i,n){n||(n={});var a=(i||"").charAt(0)==="x",o=(i||"").charAt(0)==="y",s=XZe(e,t,r);if((a||o)&&n.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=n.gd,c=Wvr({},e),f=0;f{"use strict";var tKe=tt(),JZe=tKe.pushUnique,QZe=Wo(),eKe=Yte();rKe.exports=function(t,r){var i=t.cd,n=i[0].trace,a=i[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!QZe.hasMarkers(n)&&!QZe.hasText(n);if(n.visible!==!0||f)return c;var h=eKe.getDimIndex(n,l),p=eKe.getDimIndex(n,u);if(h===!1||p===!1)return c;var d=a.xpx[h],v=a.ypx[p],m=s[h],g=s[p],w=(t.scene.selectBatch||[]).slice(),_=[];if(r!==!1&&!r.degenerate)for(var b=0;b{"use strict";var nKe=tt(),Xvr=Fd(),Zvr=j_().markerStyle;aKe.exports=function(t,r){var i=r.trace,n=t._fullLayout._splomScenes[i.uid];if(n){Xvr(t,i),nKe.extendFlat(n.matrixOptions,Zvr(t,i));var a=nKe.extendFlat({},n.matrixOptions,n.viewOpts);n.matrix.update(a,null)}}});var lKe=W((qti,sKe)=>{"use strict";var Kvr=xi(),Jvr=DW();sKe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:Vte(),supplyDefaults:EZe(),colorbar:Cc(),calc:PZe(),plot:jZe(),hoverPoints:KZe().hoverPoints,selectPoints:iKe(),editStyle:oKe(),meta:{}};Kvr.register(Jvr)});var pKe=W((Oti,dKe)=>{"use strict";var Qvr=xte(),e1r=xi(),{rgbaString:t1r}=ti(),r1r=Ez(),i1r=Mc().getModuleCalcData,Z2=xl(),uKe=Ls().getFromId,cKe=Yi().shouldShowZeroLine,fKe="splom",hKe={};function n1r(e){var t=e._fullLayout,r=e1r.getModule(fKe),i=i1r(e.calcdata,r)[0],n=r1r(e,["ANGLE_instanced_arrays","OES_element_index_uint"],hKe);n&&(t._hasOnlyLargeSploms&&Xte(e),r.plot(e,{},i))}function a1r(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&Xte(e);for(var i=0;i{"use strict";var vKe=lKe();vKe.basePlotModule=pKe(),gKe.exports=vKe});var xKe=W((Uti,yKe)=>{"use strict";yKe.exports=mKe()});var Jte=W((Vti,bKe)=>{"use strict";var u1r=Fo(),Zte=ac(),Kte=jo(),c1r=ds().attributes,zz=an().extendFlat,f1r=Ra().templatedArray;bKe.exports={domain:c1r({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:Kte({editType:"plot"}),tickfont:Kte({autoShadowDflt:!0,editType:"plot"}),rangefont:Kte({editType:"plot"}),dimensions:f1r("dimension",{label:{valType:"string",editType:"plot"},tickvals:zz({},Zte.tickvals,{editType:"plot"}),ticktext:zz({},Zte.ticktext,{editType:"plot"}),tickformat:zz({},Zte.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:zz({editType:"calc"},u1r("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var fk={};Jn(fk,{axisExtentOffset:()=>b1r,axisTitleOffset:()=>x1r,bar:()=>_1r,blockLineCount:()=>m1r,canvasPixelRatio:()=>g1r,cn:()=>w1r,id:()=>T1r,layers:()=>y1r,maxDimensionCount:()=>h1r,overdrag:()=>d1r,tickDistance:()=>v1r,verticalPadding:()=>p1r});var h1r,d1r,p1r,v1r,g1r,m1r,y1r,x1r,b1r,_1r,w1r,T1r,hk=Ci(()=>{"use strict";h1r=60,d1r=45,p1r=2,v1r=50,g1r=1,m1r=5e3,y1r=["contextLineLayer","focusLineLayer","pickLineLayer"],x1r=28,b1r=10,_1r={width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},w1r={axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},T1r={filterBarPattern:"filter-bar-pattern"}});var eg=W((Gti,wKe)=>{"use strict";var A1r=gA();function _Ke(e){return[e]}wKe.exports={keyFun:function(e){return e.key},repeat:_Ke,descend:A1r,wrap:_Ke,unwrap:function(e){return e[0]}}});var tre=W((Hti,PKe)=>{"use strict";var Gl=(hk(),Pt(fk)),Ev=gi(),M1r=eg().keyFun,Bz=eg().repeat,pT=tt().sorterAsc,S1r=tt().strTranslate,TKe=Gl.bar.snapRatio;function AKe(e,t){return e*(1-TKe)+t*TKe}var MKe=Gl.bar.snapClose;function E1r(e,t){return e*(1-MKe)+t*MKe}function Oz(e,t,r,i){if(k1r(r,i))return r;var n=e?-1:1,a=0,o=t.length-1;if(n<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;n*c=t[r][0]&&e<=t[r][1])return!0;return!1}function C1r(e){e.attr("x",-Gl.bar.captureWidth/2).attr("width",Gl.bar.captureWidth)}function D1r(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function F1r(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=SKe(e.brush.filter.getConsolidated(),e.height),r=[0],i,n,a,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function EKe(){Ev.select(document.body).style("cursor",null)}function ere(e){e.attr("stroke-dasharray",F1r)}function qz(e,t){var r=Ev.select(e).selectAll(".highlight, .highlight-shadow"),i=t?r.transition().duration(Gl.bar.snapDuration).each("end",t):r;ere(i)}function kKe(e,t){var r=e.brush,i=r.filterSpecified,n=NaN,a={},o;if(i){var s=e.height,l=r.filter.getConsolidated(),u=SKe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var p=u[o];if(p&&p[0]<=t&&t<=p[1]){c=o;break}else if(f=o?o-1:NaN,p&&p[0]>t){h=o;break}}if(n=c,isNaN(n)&&(isNaN(f)||isNaN(h)?n=isNaN(f)?h:f:n=t-u[f][1]=w[0]&&g<=w[1]){a.clickableOrdinalRange=w;break}}}return a}function P1r(e,t){Ev.event.sourceEvent.stopPropagation();var r=t.height-Ev.mouse(e)[1]-2*Gl.verticalPadding,i=t.unitToPaddedPx.invert(r),n=t.brush,a=kKe(t,r),o=a.interval,s=n.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Gl.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&n.filterSpecified?n.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:i,t.parent.inBrushDrag=!0,s.brushStartCallback()}function CKe(e,t){Ev.event.sourceEvent.stopPropagation();var r=t.height-Ev.mouse(e)[1]-2*Gl.verticalPadding,i=t.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(t.unitToPaddedPx.invert):i.newExtent=[i.startExtent,t.unitToPaddedPx.invert(r)].sort(pT),t.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(t),qz(e.parentNode)}function I1r(e,t){var r=t.brush,i=r.filter,n=r.svgBrush;n._dragging||(DKe(e,t),CKe(e,t),t.brush.svgBrush.wasDragged=!1),n._dragging=!1;var a=Ev.event;a.sourceEvent.stopPropagation();var o=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,t.parent.inBrushDrag=!1,EKe(),!n.wasDragged){n.wasDragged=void 0,n.clickableOrdinalRange?r.filterSpecified&&t.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],r.filterSpecified=!0):o?(n.extent=n.stayingIntervals,n.extent.length===0&&Qte(r)):Qte(r),n.brushCallback(t),qz(e.parentNode),n.brushEndCallback(r.filterSpecified?i.getConsolidated():[]);return}var s=function(){i.set(i.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]n.newExtent[0];n.extent=n.stayingIntervals.concat(u?[n.newExtent]:[]),n.extent.length||Qte(r),n.brushCallback(t),u?qz(e.parentNode,s):(s(),qz(e.parentNode))}else s();n.brushEndCallback(r.filterSpecified?i.getConsolidated():[])}function DKe(e,t){var r=t.height-Ev.mouse(e)[1]-2*Gl.verticalPadding,i=kKe(t,r),n="crosshair";i.clickableOrdinalRange?n="pointer":i.region&&(n=i.region+"-resize"),Ev.select(document.body).style("cursor",n)}function R1r(e){e.on("mousemove",function(t){Ev.event.preventDefault(),t.parent.inBrushDrag||DKe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||EKe()}).call(Ev.behavior.drag().on("dragstart",function(t){P1r(this,t)}).on("drag",function(t){CKe(this,t)}).on("dragend",function(t){I1r(this,t)}))}function FKe(e,t){return e[0]-t[0]}function z1r(e,t,r){var i=r._context.staticPlot,n=e.selectAll(".background").data(Bz);n.enter().append("rect").classed("background",!0).call(C1r).call(D1r).style("pointer-events",i?"none":"auto").attr("transform",S1r(0,Gl.verticalPadding)),n.call(R1r).attr("height",function(s){return s.height-Gl.verticalPadding});var a=e.selectAll(".highlight-shadow").data(Bz);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Gl.bar.width/2).attr("stroke-width",Gl.bar.width+Gl.bar.strokeWidth).attr("stroke",t).attr("opacity",Gl.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(ere);var o=e.selectAll(".highlight").data(Bz);o.enter().append("line").classed("highlight",!0).attr("x",-Gl.bar.width/2).attr("stroke-width",Gl.bar.width-Gl.bar.strokeWidth).attr("stroke",Gl.bar.fillColor).attr("opacity",Gl.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(ere)}function B1r(e,t,r){var i=e.selectAll("."+Gl.cn.axisBrush).data(Bz,M1r);i.enter().append("g").classed(Gl.cn.axisBrush,!0),z1r(i,t,r)}function q1r(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function Qte(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function O1r(e){return function(r){var i=r.brush,n=q1r(i),a=n.slice();i.filter.set(a),e()}}function LKe(e){for(var t=e.slice(),r=[],i,n=t.shift();n;){for(i=n.slice();(n=t.shift())&&n[0]<=i[1];)i[1]=Math.max(i[1],n[1]);r.push(i)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function N1r(){var e=[],t,r;return{set:function(i){e=i.map(function(n){return n.slice().sort(pT)}).sort(FKe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=LKe(e),r=e.reduce(function(n,a){return[Math.min(n[0],a[0]),Math.max(n[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function U1r(e,t,r,i,n,a){var o=N1r();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:i,brushCallback:O1r(n),brushEndCallback:a}}}function V1r(e,t){if(Array.isArray(e[0])?(e=e.map(function(i){return i.sort(pT)}),t.multiselect?e=LKe(e.sort(FKe)):e=[e[0]]):e=[e.sort(pT)],t.tickvals){var r=t.tickvals.slice().sort(pT);if(e=e.map(function(i){var n=[Oz(0,r,i[0],[]),Oz(1,r,i[1],[])];if(n[1]>n[0])return n}).filter(function(i){return i}),!e.length)return}return e.length>1?e:e[0]}PKe.exports={makeBrush:U1r,ensureAxisBrush:B1r,cleanRanges:V1r}});var zKe=W((jti,RKe)=>{"use strict";var K2=tt(),G1r=Sc().hasColorscale,H1r=Bu(),j1r=ds().defaults,$1r=tf(),W1r=Yi(),IKe=Jte(),Y1r=tre(),rre=(hk(),Pt(fk)).maxDimensionCount,X1r=Cz();function Z1r(e,t,r,i,n){var a=n("line.color",r);if(G1r(e,"line")&&K2.isArrayOrTypedArray(a)){if(a.length)return n("line.colorscale"),H1r(e,t,i,n,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function K1r(e,t,r,i){function n(u,c){return K2.coerce(e,t,IKe.dimensions,u,c)}var a=n("values"),o=n("visible");if(a&&a.length||(o=t.visible=!1),o){n("label"),n("tickvals"),n("ticktext"),n("tickformat");var s=n("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},W1r.setConvert(t._ax,i.layout),n("multiselect");var l=n("constraintrange");l&&(t.constraintrange=Y1r.cleanRanges(l,t))}}RKe.exports=function(t,r,i,n){function a(c,f){return K2.coerce(t,r,IKe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>rre&&(K2.log("parcoords traces support up to "+rre+" dimensions at the moment"),o.splice(rre));var s=$1r(t,r,{name:"dimensions",layout:n,handleItemDefaults:K1r}),l=Z1r(t,r,i,n,a);j1r(r,n,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),X1r(r,s,"values",l);var u=K2.extendFlat({},n.font,{size:Math.round(n.font.size/1.2)});K2.coerceFont(a,"labelfont",u),K2.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),K2.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var qKe=W(($ti,BKe)=>{"use strict";var J1r=tt().isArrayOrTypedArray,ire=es(),Q1r=eg().wrap;BKe.exports=function(t,r){var i,n;return ire.hasColorscale(r,"line")&&J1r(r.line.color)?(i=r.line.color,n=ire.extractOpts(r.line).colorscale,ire.calc(t,r,{vals:i,containerStr:"line",cLetter:"c"})):(i=egr(r._length),n=[[0,r.line.color],[1,r.line.color]]),Q1r({lineColor:i,cscale:n})};function egr(e){for(var t=new Array(e),r=0;r{"use strict";var tgr=tt().isTypedArray;Nz.convertTypedArray=function(e){return tgr(e)?Array.prototype.slice.call(e):e};Nz.isOrdinal=function(e){return!!e.tickvals};Nz.isVisible=function(e){return e.visible||!("visible"in e)}});var YKe=W((Yti,WKe)=>{"use strict";var rgr=["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(` `),igr=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),dk=(hk(),Pt(fk)).maxDimensionCount,HKe=tt(),OKe=1e-6,Uz=2048,ngr=new Uint8Array(4),NKe=new Uint8Array(4),UKe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function agr(e){e.read({x:0,y:0,width:1,height:1,data:ngr})}function jKe(e,t,r,i,n){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,i,n),e.clear({color:[0,0,0,0],depth:1})}function ogr(e,t,r,i,n,a){var o=a.key;function s(l){var u=Math.min(i,n-l*i);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],jKe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*i,t(a),l*i+u>>8*t)%256/255}function ugr(e,t,r){for(var i=new Array(e*(dk+4)),n=0,a=0;aP&&(P=T[C].dim1.canvasX,D=C);S===0&&jKe(n,0,0,u.canvasWidth,u.canvasHeight);var R=_(r);for(C=0;C{"use strict";var fc=gi(),Fm=tt(),ore=Fm.isArrayOrTypedArray,eJe=Fm.numberFormat,tJe=ti(),rJe=Yi(),pgr=Fm.strRotate,tg=Fm.strTranslate,vgr=ao(),Vz=Qi(),XKe=es(),ure=eg(),Qd=ure.keyFun,rg=ure.repeat,iJe=ure.unwrap,vT=nre(),Oa=(hk(),Pt(fk)),nJe=tre(),ggr=YKe();function ZKe(e,t,r){return Fm.aggNums(e,null,t,r)}function aJe(e,t){return cre(ZKe(Math.min,e,t),ZKe(Math.max,e,t))}function Gz(e){var t=e.range;return t?cre(t[0],t[1]):aJe(e.values,e._length)}function cre(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function mgr(e,t){return t?function(r,i){var n=t[i];return n==null?e(r):n}:e}function ygr(e,t,r,i,n){var a=Gz(r);return i?fc.scale.ordinal().domain(i.map(mgr(eJe(r.tickformat),n))).range(i.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):fc.scale.linear().domain(a).range([e-t,t])}function xgr(e,t){return fc.scale.linear().range([t,e-t])}function bgr(e,t){return fc.scale.linear().domain(Gz(e)).range([t,1-t])}function _gr(e){if(e.tickvals){var t=Gz(e);return fc.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function wgr(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){let[o,s,l]=tJe.rgbaArray(a[1]);return fc.rgb(o,s,l)}),i=function(a){return function(o){return o[a]}},n="rgb".split("").map(function(a){return fc.scale.linear().clamp(!0).domain(t).range(r.map(i(a)))});return function(a){return n.map(function(o){return o(a)})}}function lre(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function Tgr(e,t,r){var i=iJe(t),n=i.trace,a=vT.convertTypedArray(i.lineColor),o=n.line,s={color:tJe.normalize(n.unselected.line.color),opacity:n.unselected.line.opacity},l=XKe.extractOpts(o),u=l.reversescale?XKe.flipScale(i.cscale):i.cscale,c=n.domain,f=n.dimensions,h=e.width,p=n.labelangle,d=n.labelside,v=n.labelfont,m=n.tickfont,g=n.rangefont,w=Fm.extendDeepNoArrays({},o,{color:a.map(fc.scale.linear().domain(Gz({values:a,range:[l.min,l.max],_length:n._length}))),blockLineCount:Oa.blockLineCount,canvasOverdrag:Oa.overdrag*Oa.canvasPixelRatio}),_=Math.floor(h*(c.x[1]-c.x[0])),b=Math.floor(e.height*(c.y[1]-c.y[0])),M=e.margin||{l:80,r:80,t:100,b:80},x=_,A=b;return{key:r,colCount:f.filter(vT.isVisible).length,dimensions:f,tickDistance:Oa.tickDistance,unitToColor:wgr(u),lines:w,deselectedLines:s,labelAngle:p,labelSide:d,labelFont:v,tickFont:m,rangeFont:g,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:M,canvasWidth:x*Oa.canvasPixelRatio+2*w.canvasOverdrag,canvasHeight:A*Oa.canvasPixelRatio,width:x,height:A,canvasPixelRatio:Oa.canvasPixelRatio}}function Agr(e,t,r){var i=r.width,n=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return i*h/Math.max(1,r.colCount-1)},l=Oa.verticalPadding/n,u=xgr(n,Oa.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(vT.isVisible).map(function(h,p){var d=bgr(h,l),v=f[h.label];f[h.label]=(v||0)+1;var m=h.label+(v?"__"+v:""),g=h.constraintrange,w=g&&g.length;w&&!ore(g[0])&&(g=[g]);var _=w?g.map(function(k){return k.map(d)}):[[-1/0,1/0]],b=function(){var k=c;k.focusLayer&&k.focusLayer.render(k.panels,!0);var D=lre(k);!e.contextShown()&&D?(k.contextLayer&&k.contextLayer.render(k.panels,!0),e.contextShown(!0)):e.contextShown()&&!D&&(k.contextLayer&&k.contextLayer.render(k.panels,!0,!0),e.contextShown(!1))},M=h.values;M.length>h._length&&(M=M.slice(0,h._length));var x=h.tickvals,A;function T(k,D){return{val:k,text:A[D]}}function y(k,D){return k.val-D.val}if(ore(x)&&x.length){Fm.isTypedArray(x)&&(x=Array.from(x)),A=h.ticktext,!ore(A)||!A.length?A=x.map(eJe(h.tickformat)):A.length>x.length?A=A.slice(0,x.length):x.length>A.length&&(x=x.slice(0,A.length));for(var E=1;E=D||L>=F)return;var I=C.lineLayer.readPixel(R,F-1-L),B=I[3]!==0,O=B?I[2]+256*(I[1]+256*I[0]):null,$={x:R,y:L,clientX:k.clientX,clientY:k.clientY,dataIndex:C.model.key,curveNumber:O};O!==d&&(B?n.hover($):n.unhover&&n.unhover($),d=O)}}),p.style("opacity",function(C){return C.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var m=s.selectAll("."+Oa.cn.parcoords).data(h,Qd);m.exit().remove(),m.enter().append("g").classed(Oa.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),m.attr("transform",function(C){return tg(C.model.translateX,C.model.translateY)});var g=m.selectAll("."+Oa.cn.parcoordsControlView).data(rg,Qd);g.enter().append("g").classed(Oa.cn.parcoordsControlView,!0),g.attr("transform",function(C){return tg(C.model.pad.l,C.model.pad.t)});var w=g.selectAll("."+Oa.cn.yAxis).data(function(C){return C.dimensions},Qd);w.enter().append("g").classed(Oa.cn.yAxis,!0),g.each(function(C){sre(w,C,u)}),p.each(function(C){if(C.viewModel){!C.lineLayer||n?C.lineLayer=ggr(this,C):C.lineLayer.update(C),(C.key||C.key===0)&&(C.viewModel[C.key]=C.lineLayer);var k=!C.context||n;C.lineLayer.render(C.viewModel.panels,k)}}),w.attr("transform",function(C){return tg(C.xScale(C.xIndex),0)}),w.call(fc.behavior.drag().origin(function(C){return C}).on("drag",function(C){var k=C.parent;f.linePickActive(!1),C.x=Math.max(-Oa.overdrag,Math.min(C.model.width+Oa.overdrag,fc.event.x)),C.canvasX=C.x*C.model.canvasPixelRatio,w.sort(function(D,F){return D.x-F.x}).each(function(D,F){D.xIndex=F,D.x=C===D?D.x:D.xScale(D.xIndex),D.canvasX=D.x*D.model.canvasPixelRatio}),sre(w,k,u),w.filter(function(D){return Math.abs(C.xIndex-D.xIndex)!==0}).attr("transform",function(D){return tg(D.xScale(D.xIndex),0)}),fc.select(this).attr("transform",tg(C.x,0)),w.each(function(D,F,P){P===C.parent.key&&(k.dimensions[F]=D)}),k.contextLayer&&k.contextLayer.render(k.panels,!1,!lre(k)),k.focusLayer.render&&k.focusLayer.render(k.panels)}).on("dragend",function(C){var k=C.parent;C.x=C.xScale(C.xIndex),C.canvasX=C.x*C.model.canvasPixelRatio,sre(w,k,u),fc.select(this).attr("transform",function(D){return tg(D.x,0)}),k.contextLayer&&k.contextLayer.render(k.panels,!1,!lre(k)),k.focusLayer&&k.focusLayer.render(k.panels),k.pickLayer&&k.pickLayer.render(k.panels,!0),f.linePickActive(!0),n&&n.axesMoved&&n.axesMoved(k.key,k.dimensions.map(function(D){return D.crossfilterDimensionIndex}))})),w.exit().remove();var _=w.selectAll("."+Oa.cn.axisOverlays).data(rg,Qd);_.enter().append("g").classed(Oa.cn.axisOverlays,!0),_.selectAll("."+Oa.cn.axis).remove();var b=_.selectAll("."+Oa.cn.axis).data(rg,Qd);b.enter().append("g").classed(Oa.cn.axis,!0),b.each(function(C){var k=C.model.height/C.model.tickDistance,D=C.domainScale,F=D.domain();fc.select(this).call(fc.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(k,C.tickFormat).tickValues(C.ordinal?F:null).tickFormat(function(P){return vT.isOrdinal(C)?P:oJe(C.model.dimensions[C.visibleIndex],P)}).scale(D)),Vz.font(b.selectAll("text"),C.model.tickFont)}),b.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),b.selectAll("text").style("cursor","default");var M=_.selectAll("."+Oa.cn.axisHeading).data(rg,Qd);M.enter().append("g").classed(Oa.cn.axisHeading,!0);var x=M.selectAll("."+Oa.cn.axisTitle).data(rg,Qd);x.enter().append("text").classed(Oa.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(C){return C.label}).each(function(C){var k=fc.select(this);Vz.font(k,C.model.labelFont),vgr.convertToTspans(k,t)}).attr("transform",function(C){var k=JKe(C.model.labelAngle,C.model.labelSide),D=Oa.axisTitleOffset;return(k.dir>0?"":tg(0,2*D+C.model.height))+pgr(k.degrees)+tg(-D*k.dx,-D*k.dy)}).attr("text-anchor",function(C){var k=JKe(C.model.labelAngle,C.model.labelSide),D=Math.abs(k.dx),F=Math.abs(k.dy);return 2*D>F?k.dir*k.dx<0?"start":"end":"middle"});var A=_.selectAll("."+Oa.cn.axisExtent).data(rg,Qd);A.enter().append("g").classed(Oa.cn.axisExtent,!0);var T=A.selectAll("."+Oa.cn.axisExtentTop).data(rg,Qd);T.enter().append("g").classed(Oa.cn.axisExtentTop,!0),T.attr("transform",tg(0,-Oa.axisExtentOffset));var y=T.selectAll("."+Oa.cn.axisExtentTopText).data(rg,Qd);y.enter().append("text").classed(Oa.cn.axisExtentTopText,!0).call(KKe),y.text(function(C){return QKe(C,!0)}).each(function(C){Vz.font(fc.select(this),C.model.rangeFont)});var E=A.selectAll("."+Oa.cn.axisExtentBottom).data(rg,Qd);E.enter().append("g").classed(Oa.cn.axisExtentBottom,!0),E.attr("transform",function(C){return tg(0,C.model.height+Oa.axisExtentOffset)});var S=E.selectAll("."+Oa.cn.axisExtentBottomText).data(rg,Qd);S.enter().append("text").classed(Oa.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(KKe),S.text(function(C){return QKe(C,!1)}).each(function(C){Vz.font(fc.select(this),C.model.rangeFont)}),nJe.ensureAxisBrush(_,c,t)}});var hre=W((fre,hJe)=>{"use strict";var Egr=lJe(),kgr=Ez(),uJe=nre().isVisible,fJe={};function cJe(e,t,r){var i=t.indexOf(r),n=e.indexOf(i);return n===-1&&(n+=t.length),n}function Cgr(e,t){return function(i,n){return cJe(e,t,i)-cJe(e,t,n)}}var fre=hJe.exports=function(t,r){var i=t._fullLayout,n=kgr(t,[],fJe);if(n){var a={},o={},s={},l=i._size;r.forEach(function(p,d){var v=p[0].trace,m=s[d]=v.index;a[d]=t.data[m].dimensions,o[d]=t.data[m].dimensions.slice()});var u=function(p,d,v){var m=o[p][d],g=v.map(function(A){return A.slice()}),w="dimensions["+d+"].constraintrange",_=i._tracePreGUI[t._fullData[s[p]].uid];if(_[w]===void 0){var b=m.constraintrange;_[w]=b||null}var M=t._fullData[s[p]].dimensions[d];g.length?(g.length===1&&(g=g[0]),m.constraintrange=g,M.constraintrange=g.slice(),g=[g]):(delete m.constraintrange,delete M.constraintrange,g=null);var x={};x[w]=g,t.emit("plotly_restyle",[x,[s[p]]])},c=function(p){t.emit("plotly_hover",p)},f=function(p){t.emit("plotly_unhover",p)},h=function(p,d){var v=Cgr(d,o[p].filter(uJe));a[p].sort(v),o[p].filter(function(m){return!uJe(m)}).sort(function(m){return o[p].indexOf(m)}).forEach(function(m){a[p].splice(a[p].indexOf(m),1),a[p].splice(o[p].indexOf(m),0,m)}),t.emit("plotly_restyle",[{dimensions:[a[p]]},[s[p]]])};Egr(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:f,axesMoved:h})}};fre.reglPrecompiled=fJe});var pJe=W(pk=>{"use strict";var dJe=gi(),Dgr=Mc().getModuleCalcData,Fgr=hre(),Lgr=(md(),Pt(gd));pk.name="parcoords";pk.plot=function(e){var t=Dgr(e.calcdata,"parcoords")[0];t.length&&Fgr(e,t)};pk.clean=function(e,t,r,i){var n=i._has&&i._has("parcoords"),a=t._has&&t._has("parcoords");n&&!a&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())};pk.toSVG=function(e){var t=e._fullLayout._glimages,r=dJe.select(e).selectAll(".svg-container"),i=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:Lgr.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}i.each(n),window.setTimeout(function(){dJe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var gJe=W((Kti,vJe)=>{"use strict";vJe.exports={attributes:Jte(),supplyDefaults:zKe(),calc:qKe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:pJe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var xJe=W((Jti,yJe)=>{"use strict";var mJe=gJe();mJe.plot=hre();yJe.exports=mJe});var _Je=W((Qti,bJe)=>{"use strict";bJe.exports=xJe()});var dre=W((eri,SJe)=>{"use strict";var TJe=an().extendFlat,Pgr=Ja(),wJe=jo(),Igr=Fo(),{hovertemplateAttrs:AJe,templatefallbackAttrs:MJe}=Wa(),Rgr=ds().attributes,zgr=TJe({editType:"calc"},Igr("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:AJe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:MJe({editType:"plot"})});SJe.exports={domain:Rgr({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:TJe({},Pgr.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:AJe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:MJe({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:wJe({editType:"calc"}),tickfont:wJe({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:zgr,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var CJe=W((tri,kJe)=>{"use strict";var gT=tt(),Bgr=Sc().hasColorscale,qgr=Bu(),Ogr=ds().defaults,Ngr=tf(),EJe=dre(),Ugr=Cz(),Vgr=Tc().isTypedArraySpec;function Ggr(e,t,r,i,n){n("line.shape"),n("line.hovertemplate"),n("line.hovertemplatefallback");var a=n("line.color",i.colorway[0]);if(Bgr(e,"line")&&gT.isArrayOrTypedArray(a)){if(a.length)return n("line.colorscale"),qgr(e,t,i,n,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function Hgr(e,t){function r(u,c){return gT.coerce(e,t,EJe.dimensions,u,c)}var i=r("values"),n=r("visible");if(i&&i.length||(n=t.visible=!1),n){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=gT.isArrayOrTypedArray(a)&&a.length>0||Vgr(a),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}kJe.exports=function(t,r,i,n){function a(u,c){return gT.coerce(t,r,EJe,u,c)}var o=Ngr(t,r,{name:"dimensions",handleItemDefaults:Hgr}),s=Ggr(t,r,i,n,a);Ogr(r,n,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),Ugr(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=n.font;gT.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),gT.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var FJe=W((rri,DJe)=>{"use strict";var jgr=eg().wrap,$gr=Sc().hasColorscale,Wgr=rf(),Ygr=nG(),Xgr=Qi(),vk=tt(),Zgr=hn();DJe.exports=function(t,r){var i=vk.filterVisible(r.dimensions);if(i.length===0)return[];var n=i.map(function(y){var E;if(y.categoryorder==="trace")E=null;else if(y.categoryorder==="array")E=y.categoryarray;else{E=Ygr(y.values);for(var S=!0,C=0;C=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var NJe=W((iri,OJe)=>{"use strict";var Na=gi(),smr=(S_(),Pt(M_)).interpolateNumber,lmr=qF(),pre=ti(),yk=Is(),J2=tt(),gk=J2.strTranslate,LJe=Qi(),umr=ao();function cmr(e,t,r,i){var n=t._context.staticPlot,a=e.map(Smr.bind(0,t,r)),o=i.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",n?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,Lm),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(w){return gk(w.x,w.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(w){return w.paths},Lm);c.attr("fill",function(w){return w.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(w){return w.model.color}).attr("fill-opacity",0);mre(f),c.attr("d",function(w){return w.svgD}),f.empty()||c.sort(vre),c.exit().remove(),c.on("mouseover",hmr).on("mouseout",dmr).on("click",pmr),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),p=h.selectAll("g.dimension").data(function(w){return w.dimensions},Lm);p.enter().append("g").attr("class","dimension"),p.attr("transform",function(w){return gk(w.x,0)}),p.exit().remove();var d=p.selectAll("g.category").data(function(w){return w.categories},Lm),v=d.enter().append("g").attr("class","category");d.attr("transform",function(w){return gk(0,w.y)}),v.append("rect").attr("class","catrect").attr("pointer-events","none"),d.select("rect.catrect").attr("fill","none").attr("width",function(w){return w.width}).attr("height",function(w){return w.height}),IJe(v);var m=d.selectAll("rect.bandrect").data(function(w){return w.bands},Lm);m.each(function(){J2.raiseToTop(this)}),m.attr("fill",function(w){return w.color});var g=m.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(w){return w.color}).attr("fill-opacity",0);m.attr("fill",function(w){return w.color}).attr("width",function(w){return w.width}).attr("height",function(w){return w.height}).attr("y",function(w){return w.y}).attr("cursor",function(w){return w.parcatsViewModel.arrangement==="fixed"?"default":w.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),xre(g),m.exit().remove(),v.append("text").attr("class","catlabel").attr("pointer-events","none"),d.select("text.catlabel").attr("text-anchor",function(w){return mk(w)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(w){return mk(w)?w.width+5:-5}).attr("y",function(w){return w.height/2}).text(function(w){return w.model.categoryLabel}).each(function(w){LJe.font(Na.select(this),w.parcatsViewModel.categorylabelfont),umr.convertToTspans(Na.select(this),t)}),v.append("text").attr("class","dimlabel"),d.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(w){return w.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(w){return w.width/2}).attr("y",-5).text(function(w,_){return _===0?w.parcatsViewModel.model.dimensions[w.model.dimensionInd].dimensionLabel:null}).each(function(w){LJe.font(Na.select(this),w.parcatsViewModel.labelfont)}),d.selectAll("rect.bandrect").on("mouseover",_mr).on("mouseout",wmr),d.exit().remove(),p.call(Na.behavior.drag().origin(function(w){return{x:w.x,y:0}}).on("dragstart",Tmr).on("drag",Amr).on("dragend",Mmr)),s.each(function(w){w.traceSelection=Na.select(this),w.pathSelection=Na.select(this).selectAll("g.paths").selectAll("path.path"),w.dimensionSelection=Na.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}OJe.exports=function(e,t,r,i){cmr(r,e,i,t)};function Lm(e){return e.key}function mk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function vre(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColorn)return 1;if(i!==n){var a=isNaN(i),o=isNaN(n);if(a!==o)return a?1:-1}}return e.length-t.length}function hmr(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){J2.raiseToTop(this),yre(Na.select(this));var t=xk(e),r=gre(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:Na.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var i=Na.mouse(this)[0],n=e.parcatsViewModel.graphDiv,a=e.parcatsViewModel.trace,o=n._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f"),x=Na.mouse(n)[0];yk.loneHover({trace:a,x:d-s.left+l.left,y:v-s.top+l.top,text:M,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:m,idealAlign:xpre.mostReadable(t.model.color)).attr("stroke-width",.3)}function vmr(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function IJe(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function gmr(e){e.attr("stroke","black").attr("stroke-width",1.5)}function xre(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function Hz(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,i=e.categoryViewModel.model.categoryInd;return t.filter(function(n){return n.model.categoryInds[r]===i&&n.model.color===e.color})}function mmr(e){var t=Na.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var i=Hz(r);yre(i),i.each(function(){J2.raiseToTop(this)})}),vmr(Na.select(e.parentNode))}function ymr(e){var t=Na.select(e).datum(),r=Hz(t);yre(r),r.each(function(){J2.raiseToTop(this)}),Na.select(e.parentNode).selectAll("rect.bandrect").filter(function(i){return i.color===t.color}).each(function(){J2.raiseToTop(this),gmr(Na.select(this))})}function bre(e,t,r){var i=Na.select(e).datum(),n=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,o=Na.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=Hz(u);c.each(function(f){Array.prototype.push.apply(s,xk(f))})});var l={};l[n.dimensionInd]=n.categoryValue,a.emit(t,{points:s,event:r,constraints:l})}function _re(e,t,r){var i=Na.select(e).datum(),n=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,o=Hz(i),s=[];o.each(function(u){Array.prototype.push.apply(s,xk(u))});var l={};l[n.dimensionInd]=n.categoryValue,i.rawColor!==void 0&&(l.color=i.rawColor),a.emit(t,{points:s,event:r,constraints:l})}function RJe(e,t,r){e._fullLayout._calcInverseTransform(e);var i=e._fullLayout._invScaleX,n=e._fullLayout._invScaleY,a=Na.select(r.parentNode).select("rect.catrect"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,h,p;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=o.left,p="left"):(h=o.left+o.width,p="right");var d=s.model.count,v=s.model.categoryLabel,m=d/s.parcatsViewModel.model.count,g={countLabel:d,categoryLabel:v,probabilityLabel:m.toFixed(3)},w=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&w.push(["Count:",g.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&w.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var _=w.join("
");return{trace:c,x:i*(h-t.left),y:n*(f-t.top),text:_,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:p,hovertemplate:c.hovertemplate,hovertemplateLabels:g,eventData:[{data:c._input,fullData:c,count:d,category:v,probability:m}]}}function xmr(e,t,r){var i=[];return Na.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var n=this;i.push(RJe(e,t,n))}),i}function bmr(e,t,r){e._fullLayout._calcInverseTransform(e);var i=e._fullLayout._invScaleX,n=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Na.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,p;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,p="left"):(h=a.left+a.width,p="right");var d=s.model.categoryLabel,v=o.parcatsViewModel.model.count,m=0;o.categoryViewModel.bands.forEach(function(E){E.color===o.color&&(m+=E.count)});var g=s.model.count,w=0;l.pathSelection.each(function(E){E.model.color===o.color&&(w+=E.model.count)});var _=m/v,b=m/w,M=m/g,x={countLabel:m,categoryLabel:d,probabilityLabel:_.toFixed(3)},A=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&A.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(A.push("P(color \u2229 "+d+"): "+x.probabilityLabel),A.push("P("+d+" | color): "+b.toFixed(3)),A.push("P(color | "+d+"): "+M.toFixed(3)));var T=A.join("
"),y=pre.mostReadable(o.color);return{trace:c,x:i*(h-t.left),y:n*(f-t.top),text:T,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:y,fontSize:10,idealAlign:p,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:d,count:v,probability:_,categorycount:g,colorcount:w,bandcolorcount:m}]}}function _mr(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Na.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,i=r._fullLayout,n=i._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?(ymr(o),_re(o,"plotly_hover",Na.event)):(mmr(o),bre(o,"plotly_hover",Na.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=RJe(r,n,o):a==="color"?s=bmr(r,n,o):a==="dimension"&&(s=xmr(r,n,o)),s&&yk.loneHover(s,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}}function wmr(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(mre(t.pathSelection),IJe(t.dimensionSelection.selectAll("g.category")),xre(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),yk.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(vre),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,i=this;r==="color"?_re(i,"plotly_unhover",Na.event):bre(i,"plotly_unhover",Na.event)}}function Tmr(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Na.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Na.mouse(this)[0],i=Na.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(n){return n.displayInd}),t.model.dragY=t.y,J2.raiseToTop(this.parentNode),Na.select(this.parentNode).selectAll("rect.bandrect").each(function(n){n.yc.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){n.model.dragX=Na.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[i];f!==void 0&&n.model.dragXh.x&&(n.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=n.model.displayInd}Tre(e.parcatsViewModel),wre(e.parcatsViewModel),qJe(e.parcatsViewModel),BJe(e.parcatsViewModel)}}function Mmr(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Na.select(this).selectAll("text").attr("font-weight","normal");var t={},r=zJe(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),n=e.initialDragDimensionDisplayInds.some(function(h,p){return h!==i[p]});n&&i.forEach(function(h,p){var d=e.parcatsViewModel.model.dimensions[p].containerInd;t["dimensions["+d+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,p){return h!==o[p]}),a){var s=e.model.categories.slice().sort(function(h,p){return h.displayInd-p.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?_re(e.potentialClickBand,"plotly_click",Na.event.sourceEvent):bre(e.potentialClickBand,"plotly_click",Na.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,Tre(e.parcatsViewModel),wre(e.parcatsViewModel);var f=Na.transition().duration(300).ease("cubic-in-out");f.each(function(){qJe(e.parcatsViewModel,!0),BJe(e.parcatsViewModel,!0)}).each("end",function(){(n||a)&&lmr.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function zJe(e){for(var t,r=e.graphDiv._fullData,i=0;i=0;l--)u+="C"+o[l]+","+(t[l+1]+i)+" "+a[l]+","+(t[l]+i)+" "+(e[l]+r[l])+","+(t[l]+i),u+="l-"+r[l]+",0 ";return u+="Z",u}function wre(e){var t=e.dimensions,r=e.model,i=t.map(function(k){return k.categories.map(function(D){return D.y})}),n=e.model.dimensions.map(function(k){return k.categories.map(function(D){return D.displayInd})}),a=e.model.dimensions.map(function(k){return k.displayInd}),o=e.dimensions.map(function(k){return k.model.dimensionInd}),s=t.map(function(k){return k.x}),l=t.map(function(k){return k.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(k){var D=k.categoryInds.map(function(P,R){return n[R][P]}),F=o.map(function(P){return D[P]});return F}u.sort(function(k,D){var F=f(k),P=f(D);return e.sortpaths==="backward"&&(F.reverse(),P.reverse()),F.push(k.valueInds[0]),P.push(D.valueInds[0]),e.bundlecolors&&(F.unshift(k.rawColor),P.unshift(D.rawColor)),fmr(F,P)});for(var h=new Array(u.length),p=t[0].model.count,d=t[0].categories.map(function(k){return k.height}).reduce(function(k,D){return k+D}),v=0;v0?g=d*(m.count/p):g=0;for(var w=new Array(i.length),_=0;_1?o=(e.width-2*r-i)/(n-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,p=t.count,d=e.height-h*(c-1),v,m,g,w,_,b=(c-f)*h/2,M=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(M.sort(function(x,A){return x.displayInd-A.displayInd}),_=0;_0?v=m.count/p*d:v=0,g={key:m.valueInds[0],model:m,width:i,height:v,y:m.dragY!==null?m.dragY:b,bands:[],parcatsViewModel:e},b=b+v+h,u.push(g);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:i,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var Are=W((nri,UJe)=>{"use strict";var kmr=NJe();UJe.exports=function(t,r,i,n){var a=t._fullLayout,o=a._paper,s=a._size;kmr(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},i,n)}});var GJe=W(jz=>{"use strict";var Cmr=Mc().getModuleCalcData,Dmr=Are(),VJe="parcats";jz.name=VJe;jz.plot=function(e,t,r,i){var n=Cmr(e.calcdata,VJe);if(n.length){var a=n[0];Dmr(e,a,r,i)}};jz.clean=function(e,t,r,i){var n=i._has&&i._has("parcats"),a=t._has&&t._has("parcats");n&&!a&&i._paperdiv.selectAll(".parcats").remove()}});var jJe=W((ori,HJe)=>{"use strict";HJe.exports={attributes:dre(),supplyDefaults:CJe(),calc:FJe(),plot:Are(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:GJe(),categories:["noOpacity"],meta:{}}});var WJe=W((sri,$Je)=>{"use strict";$Je.exports=jJe()});var XJe=W((lri,YJe)=>{"use strict";YJe.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © 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"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} {name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var KJe=W((uri,ZJe)=>{"use strict";ZJe.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"}}]}});var Q2=W((cri,rQe)=>{"use strict";var Fmr=(Qx(),Pt(Jx)).default,Lmr=XJe(),Pmr=KJe(),Imr='\xA9 OpenStreetMap contributors',JJe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",QJe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",$z="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",Rmr="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",zmr="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",Bmr="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",tQe={basic:$z,streets:$z,outdoors:$z,light:JJe,dark:QJe,satellite:Pmr,"satellite-streets":Lmr,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:Imr,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":JJe,"carto-darkmatter":QJe,"carto-voyager":$z,"carto-positron-nolabels":Rmr,"carto-darkmatter-nolabels":zmr,"carto-voyager-nolabels":Bmr},eQe=Fmr(tQe);rQe.exports={styleValueDflt:"basic",stylesMap:tQe,styleValuesMap:eQe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",eQe.join(", "),"or use a tile service."].join(` `),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var bk=W((fri,sQe)=>{"use strict";var iQe=tt(),nQe=ti().defaultLine,qmr=ds().attributes,Omr=jo(),Nmr=Ws().textposition,Umr=hs().overrideAll,Vmr=Ra().templatedArray,aQe=Q2(),oQe=Omr({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});oQe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var Gmr=sQe.exports=Umr({_arrayAttrRegexps:[iQe.counterRegex("map",".layers",!0)],domain:qmr({name:"map"}),style:{valType:"any",values:aQe.styleValuesMap,dflt:aQe.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:Vmr("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:nQe},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:nQe}},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:oQe,textposition:iQe.extendFlat({},Nmr,{arrayOk:!1})}})},"plot","from-root");Gmr.uirevision={valType:"any",editType:"none"}});var Wz=W((hri,fQe)=>{"use strict";var{hovertemplateAttrs:Hmr,texttemplateAttrs:jmr,templatefallbackAttrs:lQe}=Wa(),$mr=C1(),_k=W4(),mT=Ws(),uQe=bk(),Wmr=Ja(),Ymr=Fo(),X_=an().extendFlat,Xmr=hs().overrideAll,Zmr=bk(),cQe=_k.line,yT=_k.marker;fQe.exports=Xmr({lon:_k.lon,lat:_k.lat,cluster:{enabled:{valType:"boolean"},maxzoom:X_({},Zmr.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:X_({},yT.opacity,{dflt:1})},mode:X_({},mT.mode,{dflt:"markers"}),text:X_({},mT.text,{}),texttemplate:jmr({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:lQe({editType:"plot"}),hovertext:X_({},mT.hovertext,{}),line:{color:cQe.color,width:cQe.width},connectgaps:mT.connectgaps,marker:X_({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:yT.opacity,size:yT.size,sizeref:yT.sizeref,sizemin:yT.sizemin,sizemode:yT.sizemode},Ymr("marker")),fill:_k.fill,fillcolor:$mr(),textfont:uQe.layers.symbol.textfont,textposition:uQe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:mT.selected.marker},unselected:{marker:mT.unselected.marker},hoverinfo:X_({},Wmr.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:Hmr(),hovertemplatefallback:lQe()},"calc","nested")});var Mre={};Jn(Mre,{isSupportedFont:()=>Jmr});function Jmr(e){return Kmr.indexOf(e)!==-1}var Kmr,Sre=Ci(()=>{"use strict";Kmr=["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"]});var pQe=W((dri,dQe)=>{"use strict";var wk=tt(),Ere=Wo(),Qmr=Dd(),eyr=tv(),tyr=rv(),ryr=F1(),hQe=Wz(),iyr=(Sre(),Pt(Mre)).isSupportedFont;dQe.exports=function(t,r,i,n){function a(g,w){return wk.coerce(t,r,hQe,g,w)}function o(g,w){return wk.coerce2(t,r,hQe,g,w)}var s=nyr(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),Ere.hasMarkers(r)){Qmr(t,r,i,n,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(wk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),wk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}Ere.hasLines(r)&&(eyr(t,r,i,n,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||i),h=o("cluster.size"),p=o("cluster.opacity"),d=u!==!1||c!==!1||f!==!1||h!==!1||p!==!1,v=a("cluster.enabled",d);if(v||Ere.hasText(r)){var m=n.font.family;tyr(t,r,n,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:iyr(m)?m:"Open Sans Regular",weight:n.font.weight,style:n.font.style,size:n.font.size,color:n.font.color}})}a("fill"),r.fill!=="none"&&ryr(t,r,i,a),wk.coerceSelectionMarkerOpacity(r,a)};function nyr(e,t,r){var i=r("lon")||[],n=r("lat")||[],a=Math.min(i.length,n.length);return t._length=a,a}});var kre=W((pri,gQe)=>{"use strict";var vQe=Yi();gQe.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return n.lonLabel=vQe.tickText(o,o.c2l(s[0]),!0).text,n.latLabel=vQe.tickText(o,o.c2l(s[1]),!0).text,n}});var Cre=W((vri,yQe)=>{"use strict";var mQe=tt();yQe.exports=function(t,r){var i=t.split(" "),n=i[0],a=i[1],o=mQe.isArrayOrTypedArray(r)?mQe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(n){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var AQe=W((gri,TQe)=>{"use strict";var _Qe=hn(),zc=tt(),ayr=(ra(),Pt(ia)).BADNUM,Xz=IE(),xQe=es(),oyr=Qi(),syr=MA(),Zz=Wo(),lyr=(Sre(),Pt(Mre)).isSupportedFont,uyr=Cre(),cyr=ah().appendArrayPointValue,fyr=ao().NEWLINES,hyr=ao().BR_TAG_ALL;TQe.exports=function(t,r){var i=r[0].trace,n=i.visible===!0&&i._length!==0,a=i.fill!=="none",o=Zz.hasLines(i),s=Zz.hasMarkers(i),l=Zz.hasText(i),u=s&&i.marker.symbol==="circle",c=s&&i.marker.symbol!=="circle",f=i.cluster&&i.cluster.enabled,h=Yz("fill"),p=Yz("line"),d=Yz("circle"),v=Yz("symbol"),m={fill:h,line:p,circle:d,symbol:v};if(!n)return m;var g;if((a||o)&&(g=Xz.calcTraceToLineCoords(r)),a&&(h.geojson=Xz.makePolygon(g),h.layout.visibility="visible",zc.extendFlat(h.paint,{"fill-color":i.fillcolor})),o&&(p.geojson=Xz.makeLine(g),p.layout.visibility="visible",zc.extendFlat(p.paint,{"line-width":i.line.width,"line-color":i.line.color,"line-opacity":i.opacity})),u){var w=dyr(r);d.geojson=w.geojson,d.layout.visibility="visible",f&&(d.filter=["!",["has","point_count"]],m.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":Fre(i.cluster.color,i.cluster.step),"circle-radius":Fre(i.cluster.size,i.cluster.step),"circle-opacity":Fre(i.cluster.opacity,i.cluster.step)}},m.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":bQe(i),"text-size":12}}),zc.extendFlat(d.paint,{"circle-color":w.mcc,"circle-radius":w.mrc,"circle-opacity":w.mo})}if(u&&f&&(d.filter=["!",["has","point_count"]]),(c||l)&&(v.geojson=pyr(r,t),zc.extendFlat(v.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(zc.extendFlat(v.layout,{"icon-size":i.marker.size/10}),"angle"in i.marker&&i.marker.angle!=="auto"&&zc.extendFlat(v.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),v.layout["icon-allow-overlap"]=i.marker.allowoverlap,zc.extendFlat(v.paint,{"icon-opacity":i.opacity*i.marker.opacity,"icon-color":i.marker.color,"icon-halo-color":i.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var _=(i.marker||{}).size,b=uyr(i.textposition,_);zc.extendFlat(v.layout,{"text-size":i.textfont.size,"text-anchor":b.anchor,"text-offset":b.offset,"text-font":bQe(i)}),zc.extendFlat(v.paint,{"text-color":i.textfont.color,"text-opacity":i.opacity})}return m};function Yz(e){return{type:e,geojson:Xz.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function dyr(e){var t=e[0].trace,r=t.marker,i=t.selectedpoints,n=zc.isArrayOrTypedArray(r.color),a=zc.isArrayOrTypedArray(r.size),o=zc.isArrayOrTypedArray(r.opacity),s;function l(_){return t.opacity*_}function u(_){return _/2}var c;n&&(xQe.hasColorscale(t,"marker")?c=xQe.makeColorScaleFuncFromTrace(r):c=zc.identity);var f;a&&(f=syr(t));var h;o&&(h=function(_){var b=_Qe(_)?+zc.constrain(_,0,1):0;return l(b)});var p=[];for(s=0;s850?s+=" Black":n>750?s+=" Extra Bold":n>650?s+=" Bold":n>550?s+=" Semi Bold":n>450?s+=" Medium":n>350?s+=" Regular":n>250?s+=" Light":n>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",n>750?s+=" Extrabold":n>650?s+=" Bold":n>550?s+=" Semibold":n>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=n>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),lyr(s)||(s=r);var l=s.split(", ");return l}});var kQe=W((mri,EQe)=>{"use strict";var vyr=tt(),MQe=AQe(),xT=Q2().traceLayerPrefix,ep={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function SQe(e,t,r,i){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=i,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:xT+t+"-fill",line:xT+t+"-line",circle:xT+t+"-circle",symbol:xT+t+"-symbol",cluster:xT+t+"-cluster",clusterCount:xT+t+"-cluster-count"},this.below=null}var Tk=SQe.prototype;Tk.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&vyr.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[e]);n?n.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)};Tk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Tk.addLayer=function(e,t,r){var i={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(i.filter=t.filter);for(var n=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;M--){var x=b[M];n.removeLayer(u.layerIds[x])}_||n.removeSource(u.sourceIds.circle)}function h(_){for(var b=ep.nonCluster,M=0;M=0;M--){var x=b[M];n.removeLayer(u.layerIds[x]),_||n.removeSource(u.sourceIds[x])}}function d(_){l?f(_):p(_)}function v(_){s?c(_):h(_)}function m(){for(var _=s?ep.cluster:ep.nonCluster,b=0;b<_.length;b++){var M=_[b],x=a[M];x&&(i.setOptions(u.layerIds[M],"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&(M!=="cluster"&&u.setSourceData(M,x),i.setOptions(u.layerIds[M],"setPaintProperty",x.paint)))}}var g=this.isHidden,w=r.visible!==!0;w?g||d():g?w||v():l!==s?(d(),v()):(this.below!==o&&(d(!0),v(!0)),m()),this.clusterEnabled=s,this.isHidden=w,this.below=o,t[0].trace._glTrace=this};Tk.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?ep.cluster:ep.nonCluster,i=r.length-1;i>=0;i--){var n=r[i];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}};EQe.exports=function(t,r){var i=r[0].trace,n=i.cluster&&i.cluster.enabled,a=i.visible!==!0,o=new SQe(t,i.uid,n,a),s=MQe(t.gd,r),l=o.below=t.belowLookup["trace-"+i.uid],u,c,f;if(n)for(o.addSource("circle",s.circle,i.cluster),u=0;u{"use strict";var gyr=Is(),Lre=tt(),myr=s5(),yyr=Lre.fillText,xyr=(ra(),Pt(ia)).BADNUM,byr=Q2().traceLayerPrefix;function _yr(e,t,r){var i=e.cd,n=i[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=byr+n.uid+"-circle",c=n.cluster&&n.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(T){return T.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),p=h*360,d=t-p;function v(T){var y=T.lonlat;if(y[0]===xyr||c&&l.indexOf(T.i+1)===-1)return 1/0;var E=Lre.modHalf(y[0],360),S=y[1],C=s.project([E,S]),k=C.x-a.c2p([d,S]),D=C.y-o.c2p([E,r]),F=Math.max(3,T.mrc||0);return Math.max(Math.sqrt(k*k+D*D)-F,1-3/F)}if(gyr.getClosest(i,v,e),e.index!==!1){var m=i[e.index],g=m.lonlat,w=[Lre.modHalf(g[0],360)+p,g[1]],_=a.c2p(w),b=o.c2p(w),M=m.mrc||1;e.x0=_-M,e.x1=_+M,e.y0=b-M,e.y1=b+M;var x={};x[n.subplot]={_subplot:s};var A=n._module.formatLabels(m,n,x);return e.lonLabel=A.lonLabel,e.latLabel=A.latLabel,e.color=myr(n,m),e.extraText=CQe(n,m,i[0].t.labels),e.hovertemplate=n.hovertemplate,[e]}}function CQe(e,t,r){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,n=i.split("+"),a=n.indexOf("all")!==-1,o=n.indexOf("lon")!==-1,s=n.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||n.indexOf("text")!==-1)&&yyr(t,e,u),u.join("
")}DQe.exports={hoverPoints:_yr,getExtraText:CQe}});var LQe=W((xri,FQe)=>{"use strict";FQe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var IQe=W((bri,PQe)=>{"use strict";var wyr=tt(),Tyr=Wo(),{BADNUM:Ayr}=(ra(),Pt(ia)),Qz=360,Pre=.001,eB=(e,t,r,i)=>[e.c2p([r,i]),t.c2p([r,i])];function Myr(e,t,r,i,n){let a=eB(e,t,r+Qz,i),o=eB(e,t,r-Qz,i),s=a[0]-n[0],l=a[1]-n[1],u=Math.abs(s-(n[0]-o[0])){if(Math.abs(o)n?null:[Math.floor(i)-1,Math.ceil(n)+1]}PQe.exports=function(t,r){var c;let{cd:i,xaxis:n,yaxis:a}=t,{trace:o}=i[0];if(!Tyr.hasMarkers(o))return[];if(r===!1){for(let f of i)f.selected=0;return[]}let s=(c=n._subplot)==null?void 0:c.map,l=!!(s!=null&&s.getRenderWorldCopies())&&r.xmax>r.xmin,u=[];for(let f=0;f=1)return 1;let h=c;for(let v=0;v<8;v++){let m=((o*h+a)*h+n)*h-c;if(Math.abs(m)m?p=h:d=h,h=(p+d)*.5}return((u*h+l)*h+s)*h}}function UB(){return Ak!=null||(Ak=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Ak}function cne(){if(tB==null&&(tB=!1,UB())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let r=0;r<25;r++){let i=r*4;e.fillStyle=`rgb(${i},${i+1},${i+2})`,e.fillRect(r%5,Math.floor(r/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&t[r]!==r){tB=!0;break}}}return tB||!1}function fne(){var e=new Wu(9);return Wu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Iyr(e){var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*(u*a-o*l)+r*(-u*n+o*s)+i*(l*n-a*s)}function ktt(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ryr(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,u=r*o,c=i*o,f=i*s,h=n*o,p=n*s,d=n*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-d,e[3]=c-g,e[6]=h+m,e[1]=c+g,e[4]=1-u-d,e[7]=p-v,e[2]=h-m,e[5]=p+v,e[8]=1-u-f,e}function Om(){var e=new Wu(16);return Wu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function VB(e){var t=new Wu(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Ctt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function up(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function cC(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],p=t[11],d=t[12],v=t[13],m=t[14],g=t[15],w=r*s-i*o,_=r*l-n*o,b=r*u-a*o,M=i*l-n*s,x=i*u-a*s,A=n*u-a*l,T=c*v-f*d,y=c*m-h*d,E=c*g-p*d,S=f*m-h*v,C=f*g-p*v,k=h*g-p*m,D=w*k-_*C+b*S+M*E-x*y+A*T;return D?(D=1/D,e[0]=(s*k-l*C+u*S)*D,e[1]=(n*C-i*k-a*S)*D,e[2]=(v*A-m*x+g*M)*D,e[3]=(h*x-f*A-p*M)*D,e[4]=(l*E-o*k-u*y)*D,e[5]=(r*k-n*E+a*y)*D,e[6]=(m*b-d*A-g*_)*D,e[7]=(c*A-h*b+p*_)*D,e[8]=(o*C-s*E+u*T)*D,e[9]=(i*E-r*C-a*T)*D,e[10]=(d*x-v*b+g*w)*D,e[11]=(f*b-c*x-p*w)*D,e[12]=(s*y-o*S-l*T)*D,e[13]=(r*S-i*y+n*T)*D,e[14]=(v*_-d*M-m*w)*D,e[15]=(c*M-f*_+h*w)*D,e):null}function c3(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],p=t[10],d=t[11],v=t[12],m=t[13],g=t[14],w=t[15],_=r[0],b=r[1],M=r[2],x=r[3];return e[0]=_*i+b*s+M*f+x*v,e[1]=_*n+b*l+M*h+x*m,e[2]=_*a+b*u+M*p+x*g,e[3]=_*o+b*c+M*d+x*w,_=r[4],b=r[5],M=r[6],x=r[7],e[4]=_*i+b*s+M*f+x*v,e[5]=_*n+b*l+M*h+x*m,e[6]=_*a+b*u+M*p+x*g,e[7]=_*o+b*c+M*d+x*w,_=r[8],b=r[9],M=r[10],x=r[11],e[8]=_*i+b*s+M*f+x*v,e[9]=_*n+b*l+M*h+x*m,e[10]=_*a+b*u+M*p+x*g,e[11]=_*o+b*c+M*d+x*w,_=r[12],b=r[13],M=r[14],x=r[15],e[12]=_*i+b*s+M*f+x*v,e[13]=_*n+b*l+M*h+x*m,e[14]=_*a+b*u+M*p+x*g,e[15]=_*o+b*c+M*d+x*w,e}function lu(e,t,r){var i=r[0],n=r[1],a=r[2],o,s,l,u,c,f,h,p,d,v,m,g;return t===e?(e[12]=t[0]*i+t[4]*n+t[8]*a+t[12],e[13]=t[1]*i+t[5]*n+t[9]*a+t[13],e[14]=t[2]*i+t[6]*n+t[10]*a+t[14],e[15]=t[3]*i+t[7]*n+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],p=t[7],d=t[8],v=t[9],m=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=p,e[8]=d,e[9]=v,e[10]=m,e[11]=g,e[12]=o*i+c*n+d*a+t[12],e[13]=s*i+f*n+v*a+t[13],e[14]=l*i+h*n+m*a+t[14],e[15]=u*i+p*n+g*a+t[15]),e}function Nc(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function f3(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+u*i,e[5]=o*n+c*i,e[6]=s*n+f*i,e[7]=l*n+h*i,e[8]=u*n-a*i,e[9]=c*n-o*i,e[10]=f*n-s*i,e[11]=h*n-l*i,e}function hne(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-u*i,e[1]=o*n-c*i,e[2]=s*n-f*i,e[3]=l*n-h*i,e[8]=a*i+u*n,e[9]=o*i+c*n,e[10]=s*i+f*n,e[11]=l*i+h*n,e}function Nm(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+u*i,e[1]=o*n+c*i,e[2]=s*n+f*i,e[3]=l*n+h*i,e[4]=u*n-a*i,e[5]=c*n-o*i,e[6]=f*n-s*i,e[7]=h*n-l*i,e}function Dtt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function zyr(e,t,r,i,n){var a=1/Math.tan(t/2);if(e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0){var o=1/(i-n);e[10]=(n+i)*o,e[14]=2*n*i*o}else e[10]=-1,e[14]=-2*i;return e}function Byr(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*u,e[15]=1,e}function Ftt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Ltt(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],v=e[13],m=e[14],g=e[15],w=t[0],_=t[1],b=t[2],M=t[3],x=t[4],A=t[5],T=t[6],y=t[7],E=t[8],S=t[9],C=t[10],k=t[11],D=t[12],F=t[13],P=t[14],R=t[15];return Math.abs(r-w)<=1e-6*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(i-_)<=1e-6*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-M)<=1e-6*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-x)<=1e-6*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(s-A)<=1e-6*Math.max(1,Math.abs(s),Math.abs(A))&&Math.abs(l-T)<=1e-6*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(u-y)<=1e-6*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-E)<=1e-6*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(f-S)<=1e-6*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-C)<=1e-6*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(p-k)<=1e-6*Math.max(1,Math.abs(p),Math.abs(k))&&Math.abs(d-D)<=1e-6*Math.max(1,Math.abs(d),Math.abs(D))&&Math.abs(v-F)<=1e-6*Math.max(1,Math.abs(v),Math.abs(F))&&Math.abs(m-P)<=1e-6*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(g-R)<=1e-6*Math.max(1,Math.abs(g),Math.abs(R))}function Ptt(){var e=new Wu(3);return Wu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function HB(e){var t=new Wu(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function cp(e){var t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function RQe(e,t,r){var i=new Wu(3);return i[0]=e,i[1]=t,i[2]=r,i}function j0(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function jB(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function qs(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function fC(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function Itt(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function Rtt(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function Uf(e,t){var r=t[0],i=t[1],n=t[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function uu(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function gh(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}function ztt(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return o||(o=1),e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/o,e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e}function Btt(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e}function $B(e,t,r){var i=r[0],n=r[1],a=r[2],o=r[3],s=t[0],l=t[1],u=t[2],c=n*u-a*l,f=a*s-i*u,h=i*l-n*s;return c+=c,f+=f,h+=h,e[0]=s+o*c+n*h-a*f,e[1]=l+o*f+a*c-i*h,e[2]=u+o*h+i*f-n*c,e}function $T(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function h3(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function WB(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function qtt(e){return e[0]=0,e[1]=0,e[2]=0,e}function qyr(){var e=new Wu(4);return Wu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Oyr(e,t,r,i){var n=new Wu(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function Nyr(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function Ott(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Uyr(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*r+i*i+n*n+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=r*o,e[1]=i*o,e[2]=n*o,e[3]=a*o,e}function Uc(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}function zQe(){var e=new Wu(4);return Wu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Vyr(e,t,r){r*=.5;var i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function Utt(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=r[0],l=r[1],u=r[2],c=r[3];return e[0]=i*c+o*s+n*u-a*l,e[1]=n*c+o*l+a*s-i*u,e[2]=a*c+o*u+i*l-n*s,e[3]=o*c-i*s-n*l-a*u,e}function Nk(e,t,r,i){var n=t[0],a=t[1],o=t[2],s=t[3],l=r[0],u=r[1],c=r[2],f=r[3],h,p=n*l+a*u+o*c+s*f,d,v,m;return p<0&&(p=-p,l=-l,u=-u,c=-c,f=-f),1-p>1e-6?(h=Math.acos(p),d=Math.sin(h),v=Math.sin((1-i)*h)/d,m=Math.sin(i*h)/d):(v=1-i,m=i),e[0]=v*n+m*l,e[1]=v*a+m*u,e[2]=v*o+m*c,e[3]=v*s+m*f,e}function Gyr(e,t){var r=t[0]+t[4]+t[8],i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var n=0;t[4]>t[0]&&(n=1),t[8]>t[n*3+n]&&(n=2);var a=(n+1)%3,o=(n+2)%3;i=Math.sqrt(t[n*3+n]-t[a*3+a]-t[o*3+o]+1),e[n]=.5*i,i=.5/i,e[3]=(t[a*3+o]-t[o*3+a])*i,e[a]=(t[a*3+n]+t[n*3+a])*i,e[o]=(t[o*3+n]+t[n*3+o])*i}return e}function YB(e,t,r,i){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",a=Math.PI/360;t*=a,i*=a,r*=a;var o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),u=Math.cos(r),c=Math.sin(i),f=Math.cos(i);switch(n){case"xyz":e[0]=o*u*f+s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f-o*l*c;break;case"xzy":e[0]=o*u*f-s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f+o*l*c;break;case"yxz":e[0]=o*u*f+s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f+o*l*c;break;case"yzx":e[0]=o*u*f+s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f-o*l*c;break;case"zxy":e[0]=o*u*f-s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f-o*l*c;break;case"zyx":e[0]=o*u*f-s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f+o*l*c;break;default:throw Error("Unknown angle order "+n)}return e}function XB(){var e=new Wu(2);return Wu!=Float32Array&&(e[0]=0,e[1]=0),e}function qQe(e,t){var r=new Wu(2);return r[0]=e,r[1]=t,r}function pne(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function vne(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function Hyr(e){var t=e[0],r=e[1];return t*t+r*r}function jyr(e,t){return e[0]*t[0]+e[1]*t[1]}function gne(e){return e[0]=0,e[1]=0,e}function r0(e,t,r){return t*(qr/(e.tileSize*2**(r-e.tileID.overscaledZ)))}function Oc(e){return e instanceof Error?e:Error(typeof e=="string"?e:String(e))}function hx(){return new Float64Array(4)}function So(){return new Float64Array(3)}function dx(){return new Float64Array(16)}function dC(){let e=new Float64Array(16);return up(e),e}function mne(){let e=new Float32Array(16);return up(e),e}function Um(e,t,r,i,n=!1){if(!r[0]&&!r[1])return[0,0];let a=n?i==="map"?-e.bearingInRadians:0:i==="viewport"?e.bearingInRadians:0;if(a){let o=Math.sin(a),s=Math.cos(a);r=[r[0]*s-r[1]*o,r[0]*o+r[1]*s]}return[n?r[0]:r0(t,r[0],e.zoom),n?r[1]:r0(t,r[1],e.zoom)]}function ZB(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]}function $0(e,t,r){let i=Iyr([e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]]);if(i===0)return null;let n=gh([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),a=gh([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),o=gh([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),s=qs([],n,-e[3]);return j0(s,s,qs([],a,-t[3])),j0(s,s,qs([],o,-r[3])),qs(s,s,1/i),s}function Gtt(e,t,r){let i=e[0]*r[0]+e[1]*r[1]+e[2]*r[2],n=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return n===0?null:(-i-r[3])/n}function pC(e,t,r,i){let n=Math.sqrt(e*e+t*t),a=Math.sqrt(r*r+i*i);e/=n,t/=n,r/=a,i/=a;let o=e*r+t*i,s=Math.acos(o);return-t*r+e*i>0?s:-s}function i0(e,t){let r=ux(e,360),i=ux(t,360),n=i-r,a=i>r?n-360:n+360;return Math.abs(n)l.canonical.z)),r=1/0,i=-1/0,n=1/0,a=-1/0,o=[];for(let l of e){let{x:u,y:c,z:f}=l.canonical,h=2**(t-f),p=u*h,d=c*h;o.push({id:l,x:p,y:d}),pi&&(i=p),da&&(a=d)}let s=new Set;for(let l of o)(l.x===r||l.x===i||l.y===n||l.y===a)&&s.add(l.id);return s}function $yr(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function KB(e,t,r,i){return Pyr(e,t,r,i)}function ea(e,t,r){return Math.min(r,Math.max(t,e))}function W0(e,t,r){let i=r-t,n=((e-t)%i+i)%i+t;return n===t?r:n}function dn(e,...t){for(let r of t)for(let i in r)e[i]=r[i];return e}function WT(e,t){let r={};for(let i of t)i in e&&(r[i]=e[i]);return r}function yne(){return Wyr++}function Yyr(e){return Math.log(e)/Math.LN2%1==0}function $tt(e){return e<=1?1:2**Math.ceil(Math.log(e)/Math.LN2)}function Vf(e){return 2**e}function Vc(e){return Math.log(e)/Math.LN2}function n0(e,t,r){if(t<=0)return e;let i=1/t;return r===void 0||Math.abs(r)<1e-10?Math.round(e*i)/i:(r>0?Math.ceil(e*i-1e-9):Math.floor(e*i+1e-10))/i}function QB(e,t,r){let i={};for(let n in e)i[n]=t.call(r||this,e[n],n,e);return i}function xne(e,t,r){let i={};for(let n in e)t.call(r||this,e[n],n,e)&&(i[n]=e[n]);return i}function Fv(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r(t.y-e.y)*(r.x-e.x)}function Wtt(e,t,r,i){let n=t.y-e.y,a=t.x-e.x,o=i.y-r.y,s=i.x-r.x,l=o*a-s*n;if(l===0)return null;let u=e.y-r.y,c=e.x-r.x,f=(s*u-o*c)/l;return new rr(e.x+f*a,e.y+f*n)}function Ytt([e,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,[e*Math.cos(t)*Math.sin(r),e*Math.sin(t)*Math.sin(r),e*Math.cos(r)]}function o3(e){return typeof WorkerGlobalScope<"u"&&e!==void 0&&e instanceof WorkerGlobalScope}function Xtt(e){let t=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(e.replace(t,(i,n,a,o)=>{let s=a||o;return r[n]=!s||s.toLowerCase(),""}),r["max-age"]){let i=parseInt(r["max-age"],10);isNaN(i)?delete r["max-age"]:r["max-age"]=i}return r}function Ztt(e){if(Ire==null){let t=e.navigator?e.navigator.userAgent:null;Ire=!!e.safari||!!(t&&(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return Ire}function px(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}function Xyr(e,t,r,i,n){let a=Math.max(-t,0)*4,o=(Math.max(0,r)-r)*i*4+a,s=i*4,l=Math.max(0,t),u=Math.max(0,r),c=Math.min(e.width,t+i),f=Math.min(e.height,r+n);return{rect:{x:l,y:u,width:c-l,height:f-u},layout:[{offset:o,stride:s}]}}function Qtt(e,t,r,i,n){return Zi(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o=a==null?void 0:a.format;if(!o||!(o.startsWith("BGR")||o.startsWith("RGB")))throw Error(`Unrecognized format ${o}`);let s=o.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,Xyr(e,t,r,i,n)),s)for(let u=0;u{e.removeEventListener(t,r,i)}}}function Os(e){return e*Math.PI/180}function Cv(e){return e/Math.PI*180}function bne(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing}function ert(e){let t=new Float64Array(9);Ryr(t,e);let r=Cv(-Math.asin(ea(t[2],-1,1))),i,n;return Math.hypot(t[5],t[8])<.001?(i=0,n=-Cv(Math.atan2(t[3],t[4]))):(i=Cv(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),n=Cv(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:i,pitch:r+90,bearing:n}}function _ne(e,t,r){let i=qQe(t.x-r.x,t.y-r.y),n=qQe(e.x-r.x,e.y-r.y),a=i[0]*n[1]-i[1]*n[0];return Cv(Math.atan2(a,jyr(i,n)))}function wne(e,t,r){let i=new Float64Array(4);return YB(i,e,t-90,r),i}function irt(e,t){return trt[t]&&"touches"in e}function nrt(e,t){var n,a;if(!rrt[t])return!1;let r=e,i=((a=(n=r==null?void 0:r.target)==null?void 0:n.ownerDocument)==null?void 0:a.defaultView)||window;return r instanceof i.MouseEvent||r instanceof i.WheelEvent}function art(e){return trt[e]||rrt[e]}function Vm(e){return e instanceof Error&&e.name==="AbortError"}function eq(e){if(e.aborted)throw new YT(e.reason)}function Tne(e){return a0.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}function ort(e,t){a0.REGISTERED_PROTOCOLS[e]=t}function srt(e){delete a0.REGISTERED_PROTOCOLS[e]}function tq(){var e;if(o3(self))return(e=self.worker)==null?void 0:e.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(t){}return window.location.href}function Kyr(e,t){return Zi(this,null,function*(){let r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:tq(),referrerPolicy:e.referrerPolicy,signal:t.signal});e.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(o){throw Vm(o)?o:new zT(0,Oc(o).message,e.url,new Blob)}if(!i.ok){let o=yield i.blob();throw new zT(i.status,i.statusText,e.url,o)}let n;n=e.type==="arrayBuffer"||e.type==="image"?i.arrayBuffer():e.type==="json"?i.json():i.text();let a=yield n;return eq(t.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function Jyr(e,t){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(e.method||"GET",e.url,!0),(e.type==="arrayBuffer"||e.type==="image")&&(n.responseType="arraybuffer");for(let o in e.headers)n.setRequestHeader(o,e.headers[o]);e.type==="json"&&(n.responseType="text",(a=e.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=e.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!t.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let o=n.response;if(e.type==="json")try{o=JSON.parse(n.response)}catch(s){i(s);return}r({data:o,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let o=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new zT(n.status,n.statusText,e.url,o))}},t.signal.addEventListener("abort",()=>{n.abort(),i(new YT(t.signal.reason))}),n.send(e.body)})}function Mne(e){if(!e||e.startsWith("data:image/"))return!0;if(e.startsWith("blob:")&&(e=e.slice(5),e.startsWith("null")))return!1;if(e.indexOf("://")<=0)return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function UQe(e,t,r){var i;(i=r[e])!=null&&i.includes(t)||(r[e]||(r[e]=[]),r[e].push(t))}function Rre(e,t,r){if(r!=null&&r[e]){let i=r[e].indexOf(t);i!==-1&&r[e].splice(i,1)}}function Of(e,t){return{kind:"array",itemType:e,N:t}}function wl(e){if(e.kind==="array"){let t=wl(e.itemType);return typeof e.N=="number"?`array<${t}, ${e.N}>`:e.itemType.kind==="value"?"array":`array<${t}>`}return e.kind}function Xk(e,t){if(t.kind==="error")return null;if(e.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Xk(e.itemType,t.itemType))&&(typeof e.N!="number"||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if(e.kind==="value"){for(let r of e2r)if(!Xk(r,t))return null}}return`Expected ${wl(e)} but found ${wl(t)} instead.`}function Sne(e,t){return t.some(r=>r.kind===e.kind)}function i3(e,t){return t.some(r=>r==="null"?e===null:r==="array"?Array.isArray(e):r==="object"?e&&!Array.isArray(e)&&typeof e=="object":r===typeof e)}function ex(e,t){return e.kind==="array"&&t.kind==="array"?e.itemType.kind===t.itemType.kind&&typeof e.N=="number":e.kind===t.kind}function vrt(e){return e%=360,e<0&&(e+=360),e}function grt([e,t,r,i]){e=zre(e),t=zre(t),r=zre(r);let n,a,o=Bre((.2225045*e+.7168786*t+.0606169*r)/1);e===t&&t===r?n=a=o:(n=Bre((.4360747*e+.3850649*t+.1430804*r)/frt),a=Bre((.0139322*e+.0971045*t+.7141733*r)/hrt));let s=116*o-16;return[s<0?0:s,500*(n-o),200*(o-a),i]}function zre(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Bre(e){return e>.008856451679035631?e**(1/3):e/prt+drt}function mrt([e,t,r,i]){let n=(e+16)/116,a=isNaN(t)?n:n+t/500,o=isNaN(r)?n:n-r/200;return n=1*Ore(n),a=frt*Ore(a),o=hrt*Ore(o),[qre(3.1338561*a-1.6168667*n-.4906146*o),qre(-.9787684*a+1.9161415*n+.033454*o),qre(.0719453*a-.2289914*n+1.4052427*o),i]}function qre(e){return e=e<=.00304?12.92*e:1.055*e**(1/2.4)-.055,e<0?0:e>1?1:e}function Ore(e){return e>Qre?e*e*e:prt*(e-drt)}function i2r(e){let[t,r,i,n]=grt(e),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?vrt(Math.atan2(i,r)*r2r):NaN,a,t,n]}function n2r([e,t,r,i]){return e=isNaN(e)?0:e*t2r,mrt([r,Math.cos(e)*t,Math.sin(e)*t,i])}function a2r([e,t,r,i]){e=vrt(e),t/=100,r/=100;function n(a){let o=(a+e/30)%12,s=t*Math.min(r,1-r);return r-s*Math.max(-1,Math.min(o-3,9-o,1))}return[n(0),n(8),n(4),i]}function Uk(e,t){return o2r(e,t)?e[t]:void 0}function s2r(e){if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t=Uk(l2r,e);if(t){let[i,n,a]=t;return[i/255,n/255,a/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let i=e.length<6?1:2,n=1;return[rB(e.slice(n,n+=i)),rB(e.slice(n,n+=i)),rB(e.slice(n,n+=i)),rB(e.slice(n,n+i)||"ff")]}if(e.startsWith("rgb")){let i=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(i){let[n,a,o,s,l,u,c,f,h,p,d,v]=i,m=[s||" ",c||" ",p].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[o,u,h].join(""),w=g==="%%%"?100:g===""?255:0;if(w){let _=[wT(+a/w,0,1),wT(+l/w,0,1),wT(+f/w,0,1),d?VQe(+d,v):1];if(GQe(_))return _}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[i,n,a,o,s,l,u,c,f]=r,h=[a||" ",s||" ",u].join("");if(h===" "||h===" /"||h===",,"||h===",,,"){let p=[+n,wT(+o,0,100),wT(+l,0,100),c?VQe(+c,f):1];if(GQe(p))return a2r(p)}}}function rB(e){return parseInt(e.padEnd(2,e),16)/255}function VQe(e,t){return wT(t?e/100:e,0,1)}function wT(e,t,r){return Math.min(Math.max(t,e),r)}function GQe(e){return!e.some(Number.isNaN)}function sx(e,t,r){return e+r*(t-e)}function BT(e,t,r){return e.map((i,n)=>sx(i,t[n],r))}function u2r(e){return e==="rgb"||e==="hcl"||e==="lab"}function xrt(e,t,r,i){return typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function qT(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof Gm||e instanceof aa||e instanceof Ene||e instanceof Bm||e instanceof fg||e instanceof hg||e instanceof op||e instanceof lg||e instanceof ug)return!0;if(Array.isArray(e)){for(let t of e)if(!qT(t))return!1;return!0}if(typeof e=="object"){for(let t in e)if(!qT(e[t]))return!1;return!0}return!1}function su(e){if(e===null)return xC;if(typeof e=="string")return pa;if(typeof e=="boolean")return za;if(typeof e=="number")return ki;if(e instanceof aa)return Dv;if(e instanceof Gm)return rq;if(e instanceof Ene)return iq;if(e instanceof Bm)return bC;if(e instanceof fg)return nq;if(e instanceof hg)return aq;if(e instanceof op)return Yk;if(e instanceof lg)return oq;if(e instanceof ug)return _C;if(Array.isArray(e)){let t=e.length,r;for(let i of e){let n=su(i);if(!r)r=n;else{if(r===n)continue;r=ya;break}}return Of(r||ya,t)}return r3}function Vk(e){let t=typeof e;return e===null?"":t==="string"||t==="number"||t==="boolean"?String(e):e instanceof aa||e instanceof Gm||e instanceof Bm||e instanceof fg||e instanceof hg||e instanceof op||e instanceof lg||e instanceof ug?e.toString():JSON.stringify(e)}function sq(e,t,r){let i=e.length-1,n=0,a=i,o=0,s,l;for(;n<=a;)if(o=Math.floor((n+a)/2),s=e[o],l=e[o+1],s<=t){if(o===i||tt)a=o-1;else throw new ul("Input is not a number.",r);return 0}function d2r(e,t,r,i){let n=3*e,a=3*(r-e)-n,o=1-n-a,s=3*t,l=3*(i-t)-s,u=1-s-l;return function(c,f=1e-6){if(c<=0)return 0;if(c>=1)return 1;let h=c;for(let v=0;v<8;v++){let m=((o*h+a)*h+n)*h-c;if(Math.abs(m)m?p=h:d=h,h=(p+d)*.5}return((u*h+l)*h+s)*h}}function Nre(e,t,r,i){let n=i-r,a=e-r;return n===0?0:t===1?a/n:(t**+a-1)/(t**+n-1)}function Mrt(e,t,r=0,i=e.length-1,n=p2r){for(;i>r;){if(i-r>600){let l=i-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1);Mrt(e,t,Math.max(r,Math.floor(t-u*f/l+h)),Math.min(i,Math.floor(t+(l-u)*f/l+h)),n)}let a=e[t],o=r,s=i;for(Mk(e,r,t),n(e[i],a)>0&&Mk(e,r,i);o0;)s--}n(e[r],a)===0?Mk(e,r,s):(s++,Mk(e,s,i)),s<=t&&(r=s+1),t<=s&&(i=s-1)}}function Mk(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function p2r(e,t){return et)}function lq(e,t){if(e.length<=1)return[e];let r=[],i,n;for(let a of e){let o=g2r(a);o!==0&&(a.area=Math.abs(o),n===void 0&&(n=o<0),n===o<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),t>1)for(let a=0;ar}function E2r(e,t,r){return t<=r}function k2r(e,t,r){return t>=r}function Brt(e,t,r,i){return i.compare(t,r)===0}function C2r(e,t,r,i){return!Brt(e,t,r,i)}function D2r(e,t,r,i){return i.compare(t,r)<0}function F2r(e,t,r,i){return i.compare(t,r)>0}function L2r(e,t,r,i){return i.compare(t,r)<=0}function P2r(e,t,r,i){return i.compare(t,r)>=0}function XT(e,t,r){let i=e!=="=="&&e!=="!=";return class qrt{constructor(a,o,s,l){this.lhs=a,this.rhs=o,this.key=s,this.collator=l,this.type=za,this.hasUntypedArgument=a.type.kind==="value"||o.type.kind==="value"}static parse(a,o){if(a.length!==3&&a.length!==4)return o.error("Expected two or three arguments.");let s=a[0],l=o.parse(a[1],1,ya);if(!l)return null;if(!jQe(s,l.type))return o.concat(1).error(`"${s}" comparisons are not supported for type '${wl(l.type)}'.`);let u=o.parse(a[2],2,ya);if(!u)return null;if(!jQe(s,u.type))return o.concat(2).error(`"${s}" comparisons are not supported for type '${wl(u.type)}'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return o.error(`Cannot compare types '${wl(l.type)}' and '${wl(u.type)}'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Im(u.type,[l],o.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Im(l.type,[u],o.key)));let c=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return o.error("Cannot use collator to compare non-string types.");if(c=o.parse(a[3],3,iq),!c)return null}return new qrt(l,u,o.key,c)}evaluate(a){let o=this.lhs.evaluate(a),s=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=su(o),u=su(s);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new ul(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=su(o),u=su(s);if(l.kind!=="string"||u.kind!=="string")return t(a,o,s)}return this.collator?r(a,o,s,this.collator.evaluate(a)):t(a,o,s)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}function G2r(e,t){let r=H2r(e[0]),i=$2r(e[1]),n=2**t.z;return[Math.round(r*n*sg),Math.round(i*n*sg)]}function Cne(e,t){let r=2**t.z,i=(e[0]/sg+t.x)/r,n=(e[1]/sg+t.y)/r;return[j2r(i),W2r(n)]}function H2r(e){return(180+e)/360}function j2r(e){return e*360-180}function $2r(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function W2r(e){return 360/Math.PI*Math.atan(Math.exp((180-e*360)*Math.PI/180))-90}function wC(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Zk(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Y2r(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function X2r(e,t,r){let i=e[0]-t[0],n=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return i*o-a*n===0&&i*a<=0&&n*o<=0}function uq(e,t,r,i){let n=[t[0]-e[0],t[1]-e[1]];return Q2r([i[0]-r[0],i[1]-r[1]],n)!==0&&!!($Qe(e,t,r,i)&&$Qe(r,i,e,t))}function Z2r(e,t,r){for(let i of r)for(let n=0;n0&&f<0||c<0&&f>0}function Dne(e,t,r){let i=[];for(let n=0;nr[2]){let n=i*.5,a=e[0]-r[0]>n?-i:r[0]-e[0]>n?i:0;a===0&&(a=e[0]-r[2]>n?-i:r[2]-e[0]>n?i:0),e[0]+=a}wC(t,e)}function exr(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function WQe(e,t,r,i){let n=2**i.z*sg,a=[i.x*sg,i.y*sg],o=[];for(let s of e)for(let l of s){let u=[l.x+a[0],l.y+a[1]];$rt(u,t,r,n),o.push(u)}return o}function YQe(e,t,r,i){let n=2**i.z*sg,a=[i.x*sg,i.y*sg],o=[];for(let s of e){let l=[];for(let u of s){let c=[u.x+a[0],u.y+a[1]];wC(t,c),l.push(c)}o.push(l)}if(t[2]-t[0]<=n/2){exr(t);for(let s of o)for(let l of s)$rt(l,t,r,n)}return o}function txr(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if(t.type==="Polygon"){let a=Dne(t.coordinates,i,n),o=WQe(e.geometry(),r,i,n);if(!Zk(r,i))return!1;for(let s of o)if(!ZT(s,a))return!1}if(t.type==="MultiPolygon"){let a=jrt(t.coordinates,i,n),o=WQe(e.geometry(),r,i,n);if(!Zk(r,i))return!1;for(let s of o)if(!K2r(s,a))return!1}return!0}function rxr(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if(t.type==="Polygon"){let a=Dne(t.coordinates,i,n),o=YQe(e.geometry(),r,i,n);if(!Zk(r,i))return!1;for(let s of o)if(!Hrt(s,a))return!1}if(t.type==="MultiPolygon"){let a=jrt(t.coordinates,i,n),o=YQe(e.geometry(),r,i,n);if(!Zk(r,i))return!1;for(let s of o)if(!J2r(s,a))return!1}return!0}function Yrt(e,t){return t[0]-e[0]}function AB(e){return e[1]-e[0]+1}function qm(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=AB(e);if(t){if(r===2)return[e,null];let n=Math.floor(r/2);return[[e[0],e[0]+n],[e[0]+n,e[1]]]}if(r===1)return[e,null];let i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function oie(e,t){if(!qm(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=t[0];i<=t[1];++i)wC(r,e[i]);return r}function sie(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let i of r)wC(t,i);return t}function ZQe(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function Pne(e,t,r){if(!ZQe(e)||!ZQe(t))return NaN;let i=0,n=0;return e[2]t[2]&&(i=e[0]-t[2]),e[1]>t[3]&&(n=e[1]-t[3]),e[3]=i)return i;if(Zk(n,a)){if(KQe(e,t))return 0}else if(KQe(t,e))return 0;let o=1/0;for(let s of e)for(let l=0,u=s.length,c=u-1;l0;){let l=o.pop();if(l[0]>=a)continue;let u=l[1],c=t?50:100;if(AB(u)<=c){if(!qm(u,e.length))return NaN;if(t){let f=oxr(e,u,r,i);if(isNaN(f)||f===0)return f;a=Math.min(a,f)}else for(let f=u[0];f<=u[1];++f){let h=axr(e[f],r,i);if(a=Math.min(a,h),a===0)return 0}}else{let f=aie(u,t);JQe(o,a,i,e,s,f[0]),JQe(o,a,i,e,s,f[1])}}return a}function SB(e,t,r,i,n,a=1/0){let o=Math.min(a,n.distance(e[0],r[0]));if(o===0)return o;let s=new Wrt([[0,[0,e.length-1],[0,r.length-1]]],Yrt);for(;s.length>0;){let l=s.pop();if(l[0]>=o)continue;let u=l[1],c=l[2],f=t?50:100,h=i?50:100;if(AB(u)<=f&&AB(c)<=h){if(!qm(u,e.length)&&qm(c,r.length))return NaN;let p;if(t&&i)p=ixr(e,u,r,c,n),o=Math.min(o,p);else if(t&&!i){let d=e.slice(u[0],u[1]+1);for(let v=c[0];v<=c[1];++v)if(p=e3(r[v],d,n),o=Math.min(o,p),o===0)return o}else if(!t&&i){let d=r.slice(c[0],c[1]+1);for(let v=u[0];v<=u[1];++v)if(p=e3(e[v],d,n),o=Math.min(o,p),o===0)return o}else p=nxr(e,u,r,c,n),o=Math.min(o,p)}else{let p=aie(u,t),d=aie(c,i);nB(s,o,n,e,r,p[0],d[0]),nB(s,o,n,e,r,p[0],d[1]),nB(s,o,n,e,r,p[1],d[0]),nB(s,o,n,e,r,p[1],d[1])}}return o}function lxr(e,t){let r=e.geometry(),i=r.flat().map(o=>Cne([o.x,o.y],e.canonical));if(r.length===0)return NaN;let n=new Lne(i[0][1]),a=1/0;for(let o of t){switch(o.type){case"Point":a=Math.min(a,SB(i,!1,[o.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,SB(i,!1,o.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,MB(i,!1,o.coordinates,n,a))}if(a===0)return a}return a}function uxr(e,t){let r=e.geometry(),i=r.flat().map(o=>Cne([o.x,o.y],e.canonical));if(r.length===0)return NaN;let n=new Lne(i[0][1]),a=1/0;for(let o of t){switch(o.type){case"Point":a=Math.min(a,SB(i,!0,[o.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,SB(i,!0,o.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,MB(i,!0,o.coordinates,n,a))}if(a===0)return a}return a}function cxr(e,t){let r=e.geometry();if(r.length===0||r[0].length===0)return NaN;let i=lq(r,0).map(o=>o.map(s=>s.map(l=>Cne([l.x,l.y],e.canonical)))),n=new Lne(i[0][0][0][1]),a=1/0;for(let o of t)for(let s of i){switch(o.type){case"Point":a=Math.min(a,MB([o.coordinates],!1,s,n,a));break;case"LineString":a=Math.min(a,MB(o.coordinates,!0,s,n,a));break;case"Polygon":a=Math.min(a,sxr(s,o.coordinates,n,a))}if(a===0)return a}return a}function Ure(e){return e.type==="MultiPolygon"?e.coordinates.map(t=>({type:"Polygon",coordinates:t})):e.type==="MultiLineString"?e.coordinates.map(t=>({type:"LineString",coordinates:t})):e.type==="MultiPoint"?e.coordinates.map(t=>({type:"Point",coordinates:t})):[e]}function QQe(e,[t,r,i,n],a){t=t.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);let o=n?n.evaluate(e):1,s=xrt(t,r,i,o);if(s)throw new ul(s,a);return new aa(t/255,r/255,i/255,o,!1)}function eet(e,t){return e in t&&t[e]!==void 0}function Vre(e,t){let r=t[e];return r===void 0?null:r}function dxr(e,t,r,i){for(;r<=i;){let n=r+i>>1;if(t[n]===e)return!0;t[n]>e?i=n-1:r=n+1}return!1}function Z_(e){return{type:e}}function pxr(e){return Array.isArray(e)?`(${e.map(wl).join(", ")})`:`(${wl(e.type)}...)`}function EB(e){if(e instanceof Drt)return EB(e.boundExpression);if(e instanceof p3&&e.name==="error"||e instanceof Ort||e instanceof Fne||e instanceof Rne||e instanceof zne)return!1;let t=e instanceof ET||e instanceof Im,r=!0;return e.eachChild(i=>{r&&(r=t?EB(i):i instanceof OT)}),r?cq(e)&&fq(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function cq(e){if(e instanceof p3&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof Fne||e instanceof Rne)return!1;let t=!0;return e.eachChild(r=>{t&&!cq(r)&&(t=!1)}),t}function Kk(e){if(e instanceof p3&&e.name==="feature-state")return!1;let t=!0;return e.eachChild(r=>{t&&!Kk(r)&&(t=!1)}),t}function fq(e,t){if(e instanceof p3&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(i=>{r&&!fq(i,t)&&(r=!1)}),r}function NT(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function eit(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Bne(e){return!!e.expression&&e.expression.interpolated}function Jk(e,...t){for(let r of t)for(let i in r)e[i]=r[i];return e}function Ca(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function hq(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&su(e)===r3}function vxr(e){return e}function gxr(e){switch(e.type){case"color":return aa.parse;case"padding":return fg.parse;case"numberArray":return hg.parse;case"colorArray":return op.parse;default:return null}}function mxr(e){switch(e){case"exponential":return rit;case"interval":return xxr;case"categorical":return yxr;case"identity":return bxr;default:throw Error(`Unknown function type "${e}"`)}}function tit(e,t){let r=e.stops&&typeof e.stops[0][0]=="object",i=r||e.property!==void 0,n=r||!i,a=e.type||(Bne(t)?"exponential":"interval"),o=gxr(t);if(o&&(e=Jk({},e),e.stops&&(e.stops=e.stops.map(c=>[c[0],o(c[1])])),e.default?e.default=o(e.default):e.default=o(t.default)),e.colorSpace&&!u2r(e.colorSpace))throw Error(`Unknown color space: "${e.colorSpace}"`);let s=mxr(a),l,u;if(a==="categorical"){l=Object.create(null);for(let c of e.stops)l[c[0]]=c[1];u=typeof e.stops[0][0]}if(r){let c={},f=[];for(let d=0;dd[0]),evaluate({zoom:d},v){return rit({stops:h,base:e.base},t,d).evaluate(d,v)}}}if(n){let c=a==="exponential"?{name:"exponential",base:e.base===void 0?1:e.base}:null;return{kind:"camera",interpolationType:c,interpolationFactor:sp.interpolationFactor.bind(void 0,c),zoomStops:e.stops.map(f=>f[0]),evaluate:({zoom:f})=>s(e,t,f,l,u)}}return{kind:"source",evaluate(c,f){let h=f&&f.properties?f.properties[e.property]:void 0;return h===void 0?TC(e.default,t.default):s(e,t,h,l,u)}}}function TC(e,t,r){if(e!==void 0)return e;if(t!==void 0)return t;if(r!==void 0)return r}function yxr(e,t,r,i,n){return TC(typeof r===n?i[r]:void 0,e.default,t.default)}function xxr(e,t,r){if(Ca(r)!=="number")return TC(e.default,t.default);let i=e.stops.length;if(i===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let n=sq(e.stops.map(a=>a[0]),r,"");return e.stops[n][1]}function rit(e,t,r){let i=e.base===void 0?1:e.base;if(Ca(r)!=="number")return TC(e.default,t.default);let n=e.stops.length;if(n===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let a=sq(e.stops.map(c=>c[0]),r,""),o=_xr(r,i,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],u=Ks[t.type]||vxr;return typeof s.evaluate=="function"?{evaluate(...c){let f=s.evaluate.apply(void 0,c),h=l.evaluate.apply(void 0,c);if(f!==void 0&&h!==void 0)return u(f,h,o,e.colorSpace)}}:u(s,l,o,e.colorSpace)}function bxr(e,t,r){switch(t.type){case"color":r=aa.parse(r);break;case"formatted":r=Bm.fromString(r.toString());break;case"resolvedImage":r=ug.fromString(r.toString());break;case"padding":r=fg.parse(r);break;case"colorArray":r=op.parse(r);break;case"numberArray":r=hg.parse(r);break;default:Ca(r)!==t.type&&(t.type!=="enum"||!t.values[r])&&(r=void 0)}return TC(r,e.default,t.default)}function _xr(e,t,r,i){let n=i-r,a=e-r;return n===0?0:t===1?a/n:(t**+a-1)/(t**+n-1)}function lie(e){return{result:"success",value:e}}function AT(e){return{result:"error",value:e}}function iit(e,t,r,i){return`${e}${t}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function nit(e){if(!e)throw Error('rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".')}function dq(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in DT}function pq(e,t,r,i){nit(t);let n=new Jrt(DT,EB,[],r?Axr(r):void 0),a=n.parse(e,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?lie(new One(a,t,r,i)):AT(n.errors)}function wxr(e){return e._styleExpression!==void 0}function ait(e,t,r,i){let n=pq(e,t,r,i);if(n.result==="error")return n;let a=n.value.expression,o=cq(a);if(!o&&!NT(r))return AT([new ig("","data expressions not supported")]);let s=fq(a,["zoom"]);if(!s&&!eit(r))return AT([new ig("","zoom expressions not supported")]);let l=_B(a);if(!l&&!s)return AT([new ig("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(l instanceof ig)return AT([l]);if(l instanceof sp&&!Bne(r))return AT([new ig("",'"interpolate" expressions cannot be used with this property')]);if(!l)return lie(o?new Qk("constant",n.value,i):new Qk("source",n.value,i));let u=l instanceof sp?l.interpolation:void 0;return lie(o?new kB("camera",n.value,l.labels,u,i):new kB("composite",n.value,l.labels,u,i))}function Txr(e,t,r,i){if(hq(e))return new oit(e,t,r);if(dq(e)){let n=ait(e,t,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=e;return r.type==="color"&&typeof e=="string"?n=aa.parse(e):r.type==="padding"&&(typeof e=="number"||Array.isArray(e))?n=fg.parse(e):r.type==="numberArray"&&(typeof e=="number"||Array.isArray(e))?n=hg.parse(e):r.type==="colorArray"&&(typeof e=="string"||Array.isArray(e))?n=op.parse(e):r.type==="variableAnchorOffsetCollection"&&Array.isArray(e)?n=lg.parse(e):r.type==="projectionDefinition"&&typeof e=="string"&&(n=Gm.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function _B(e){let t=null;if(e instanceof krt)t=_B(e.result);else if(e instanceof zrt){for(let r of e.args)if(t=_B(r),t)break}else(e instanceof kne||e instanceof sp)&&e.input instanceof p3&&e.input.name==="zoom"&&(t=e);return t instanceof ig||e.eachChild(r=>{let i=_B(r);i instanceof ig?t=i:!t&&i?t=new ig("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new ig("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function AC(e,t=new Set){return e instanceof zne&&t.add(e.key),e.eachChild(r=>{AC(r,t)}),t}function Axr(e){let t={color:Dv,string:pa,number:ki,enum:pa,boolean:za,formatted:bC,padding:nq,numberArray:aq,colorArray:Yk,projectionDefinition:rq,resolvedImage:_C,variableAnchorOffsetCollection:oq};return e.type==="array"?Of(t[e.value]||ya,e.length):t[e.type]}function lit(e){if(e.type==="color"&&hq(e.default))return new aa(0,0,0,0);switch(e.type){case"color":return aa.parse(e.default)||null;case"padding":return fg.parse(e.default)||null;case"numberArray":return hg.parse(e.default)||null;case"colorArray":return op.parse(e.default)||null;case"variableAnchorOffsetCollection":return lg.parse(e.default)||null;case"projectionDefinition":return Gm.parse(e.default)||null;default:return e.default===void 0?null:e.default}}function UT(e,t){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s}=e!=null?e:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s,globalState:t}}function Mxr(e){let t=!1;for(let r of e){let i=uit(r);if(i==="expression")return"expression";i==="legacy"&&(t=!0)}return t?"legacy":"neutral"}function uit(e){if(typeof e=="boolean")return"neutral";if(!Array.isArray(e)||e.length===0)return"legacy";switch(e[0]){case"has":return e.length<2||e[1]==="$id"||e[1]==="$type"?"legacy":e.length===2?"neutral":"expression";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return Mxr(e.slice(1));default:return"expression"}}function Nne(e){return uit(e)!=="legacy"}function tet(e){return e==="$type"?["geometry-type"]:e==="$id"?["id"]:["get",e]}function Sxr(e){switch(e[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return e.length!==3||typeof e[1]!="string"?null:[e[0],tet(e[1]),e[2]];case"in":case"!in":{if(e.length<2||typeof e[1]!="string")return null;let t=["in",tet(e[1]),["literal",e.slice(2)]];return e[0]==="!in"?["!",t]:t}case"has":case"!has":{if(e.length!==2||typeof e[1]!="string"||e[1]==="$type"||e[1]==="$id")return null;let t=["has",e[1]];return e[0]==="!has"?["!",t]:t}default:return null}}function cit(e){if((e[0]==="<"||e[0]==="<="||e[0]===">"||e[0]===">=")&&e[1]==="$type")return`"$type" cannot be use with operator "${e[0]}"`;let t=Sxr(e);return t?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(e)} with ${JSON.stringify(t)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(e)} to expression syntax.`}function Gre(e,t,r){let i=r[e];return Array.isArray(i)?Nne(i)?Une(i,t.concat(e)):{path:t.concat(e),legacyFilter:i}:null}function Une(e,t=[]){if(!Array.isArray(e)||e.length<1)return null;switch(e[0]){case"all":case"any":case"none":for(let r=1;r"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${t}${i}: ${cit(r.legacyFilter)}`)}function VT(e,t,r){if(e==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Nne(e)?Exr(e,t):e=CB(e);let i=pq(e,t,kxr,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,o)=>i.value.evaluate(n,a,{},o),needGeometry:fit(e),getGlobalStateRefs:()=>AC(i.value.expression)}}function Cxr(e,t){return et)}function fit(e){if(!Array.isArray(e))return!1;if(e[0]==="within"||e[0]==="distance")return!0;for(let t=1;t"||t==="<="||t===">="?Hre(e[1],e[2],t):t==="any"?Dxr(e.slice(1)):t==="all"?["all"].concat(e.slice(1).map(CB)):t==="none"?["all"].concat(e.slice(1).map(CB).map(aB)):t==="in"?ret(e[1],e.slice(2)):t==="!in"?aB(ret(e[1],e.slice(2))):t==="has"?iet(e[1]):t!=="!has"||aB(iet(e[1]))}function Hre(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function Dxr(e){return["any"].concat(e.map(CB))}function ret(e,t){if(t.length===0)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(r=>typeof r!=typeof t[0])?["filter-in-large",e,["literal",t.sort(Cxr)]]:["filter-in-small",e,["literal",t]]}}function iet(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function aB(e){return["!",e]}function hit(e){let t=e.key,r=e.value;return r?[new ri(t,r,"constants have been deprecated as of v8")]:[]}function au(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function s3(e){if(Array.isArray(e))return e.map(s3);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=s3(e[r]);return t}return au(e)}function G0(e){let t=e.key,r=e.value,i=e.valueSpec||{},n=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],u=Ca(r);if(u!=="object")return[new ri(t,r,`object expected, ${u} found`)];for(let c in r){let f=c.split(".")[0],h=Uk(i,f)||i["*"],p;if(Uk(n,f))p=n[f];else if(Uk(i,f)){if(r[c]===void 0)continue;p=s}else if(n["*"])p=n["*"];else if(i["*"])p=s;else{l.push(new ri(t,r[c],`unknown property "${c}"`));continue}l=l.concat(p({key:(t&&`${t}.`)+c,value:r[c],valueSpec:h,style:a,styleSpec:o,object:r,objectKey:c,validateSpec:s},r))}for(let c in i)n[c]||i[c].required&&i[c].default===void 0&&r[c]===void 0&&l.push(new ri(t,r,`missing required property "${c}"`));return l}function Vne(e){let t=e.value,r=e.valueSpec,i=e.validateSpec,n=e.style,a=e.styleSpec,o=e.key,s=e.arrayElementValidator||i;if(Ca(t)!=="array")return[new ri(o,t,`array expected, ${Ca(t)} found`)];if(r.length&&t.length!==r.length)return[new ri(o,t,`array length ${r.length} expected, length ${t.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),Ca(r.value)==="object"&&(l=r.value);let u=[];for(let c=0;ci.maximum?[new ri(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new ri(t,r,`number expected, ${n} found`)]}function dit(e){let t=e.valueSpec,r=au(e.value.type),i,n={},a,o,s=r!=="categorical"&&e.value.property===void 0,l=!s,u=Ca(e.value.stops)==="array"&&Ca(e.value.stops[0])==="array"&&Ca(e.value.stops[0][0])==="object",c=G0({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:f,default:d}});return r==="identity"&&s&&c.push(new ri(e.key,e.value,'missing required property "property"')),r!=="identity"&&!e.value.stops&&c.push(new ri(e.key,e.value,'missing required property "stops"')),r==="exponential"&&e.valueSpec.expression&&!Bne(e.valueSpec)&&c.push(new ri(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!NT(e.valueSpec)?c.push(new ri(e.key,e.value,"property functions not supported")):s&&!eit(e.valueSpec)&&c.push(new ri(e.key,e.value,"zoom functions not supported"))),(r==="categorical"||u)&&e.value.property===void 0&&c.push(new ri(e.key,e.value,'"property" property is required')),c;function f(v){if(r==="identity")return[new ri(v.key,v.value,'identity function may not have a "stops" property')];let m=[],g=v.value;return m=m.concat(Vne({key:v.key,value:g,valueSpec:v.valueSpec,validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec,arrayElementValidator:h})),Ca(g)==="array"&&g.length===0&&m.push(new ri(v.key,g,"array must have at least one stop")),m}function h(v){let m=[],g=v.value,w=v.key;if(Ca(g)!=="array")return[new ri(w,g,`array expected, ${Ca(g)} found`)];if(g.length!==2)return[new ri(w,g,`array length 2 expected, length ${g.length} found`)];if(u){if(Ca(g[0])!=="object")return[new ri(w,g,`object expected, ${Ca(g[0])} found`)];if(g[0].zoom===void 0)return[new ri(w,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new ri(w,g,"object stop key must have value")];if(o&&o>au(g[0].zoom))return[new ri(w,g[0].zoom,"stop zoom values must appear in ascending order")];au(g[0].zoom)!==o&&(o=au(g[0].zoom),a=void 0,n={}),m=m.concat(G0({key:`${w}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec,objectElementValidators:{zoom:vq,value:p}}))}else m=m.concat(p({key:`${w}[0]`,value:g[0],valueSpec:{},validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec},g));return dq(s3(g[1]))?m.concat([new ri(`${w}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(v.validateSpec({key:`${w}[1]`,value:g[1],valueSpec:t,validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec}))}function p(v,m){let g=Ca(v.value),w=au(v.value),_=v.value===null?m:v.value;if(!i)i=g;else if(g!==i)return[new ri(v.key,_,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new ri(v.key,_,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let b=`number expected, ${g} found`;return NT(t)&&r===void 0&&(b+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ri(v.key,_,b)]}return r==="categorical"&&g==="number"&&(!isFinite(w)||Math.floor(w)!==w)?[new ri(v.key,_,`integer expected, found ${w}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&wnew ri(`${e.key}${i.key}`,e.value,i.message));let r=t.value.expression||t.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!r.outputDefined())return[new ri(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!Kk(r))return[new ri(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Kk(r))return[new ri(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!fq(r,["zoom","feature-state"]))return[new ri(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!cq(r))return[new ri(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fxr(e){let t=e.value,r=e.key,i=Ca(t);return i==="boolean"?[]:[new ri(r,t,`boolean expected, ${i} found`)]}function uie(e){let t=e.key,r=e.value,i=Ca(r);return i==="string"?aa.parse(String(r))?[]:[new ri(t,r,`color expected, "${r}" found`)]:[new ri(t,r,`color expected, ${i} found`)]}function eC(e){let t=e.key,r=e.value,i=e.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(au(r))===-1&&n.push(new ri(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(au(r))===-1&&n.push(new ri(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function Lxr(e,t){let r=e;for(let i of t)r=r[i];return r}function Pxr(e,t){let r=Une(t);return r?[new ri(`${e.key}${r.path.map(i=>`[${i}]`).join("")}`,Lxr(e.value,r.path),cit(r.legacyFilter),null,"warning")]:[]}function Gne(e){let t=s3(e.value);return Nne(t)?[...Pxr(e,t),...GT(Jk({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:pit(e)}function pit(e){let t=e.value,r=e.key;if(Ca(t)!=="array")return[new ri(r,t,`array expected, ${Ca(t)} found`)];let i=e.styleSpec,n,a=[];if(t.length<1)return[new ri(r,t,"filter array must have at least 1 element")];switch(a=a.concat(eC({key:`${r}[0]`,value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),au(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&au(t[1])==="$type"&&a.push(new ri(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&a.push(new ri(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(n=Ca(t[1]),n!=="string"&&a.push(new ri(`${r}[1]`,t[1],`string expected, ${n} found`)));for(let o=2;o{f in r&&t.push(new ri(i,r[f],`"${f}" is prohibited for ref layers`))});let c;n.layers.forEach(f=>{au(f.id)===s&&(c=f)}),c?c.ref?t.push(new ri(i,r.ref,"ref cannot reference another ref layer")):o=au(c.type):t.push(new ri(i,r.ref,`ref layer "${s}" not found`))}else if(o!=="background")if(!r.source)t.push(new ri(i,r,'missing required property "source"'));else{let c=n.sources&&n.sources[r.source],f=c&&au(c.type);c?f==="vector"&&o==="raster"?t.push(new ri(i,r.source,`layer "${r.id}" requires a raster source`)):f!=="raster-dem"&&o==="hillshade"||f!=="raster-dem"&&o==="color-relief"?t.push(new ri(i,r.source,`layer "${r.id}" requires a raster-dem source`)):f==="raster"&&o!=="raster"?t.push(new ri(i,r.source,`layer "${r.id}" requires a vector source`)):f==="vector"&&!r["source-layer"]?t.push(new ri(i,r,`layer "${r.id}" must specify a "source-layer"`)):f==="raster-dem"&&o!=="hillshade"&&o!=="color-relief"?t.push(new ri(i,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):o==="line"&&r.paint&&r.paint["line-gradient"]&&(f!=="geojson"||!c.lineMetrics)&&t.push(new ri(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new ri(i,r.source,`source "${r.source}" not found`))}return o==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&t.push(new ri(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),t=t.concat(G0({key:i,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(){return[]},type(){return e.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"})},filter:Gne,layout(c){return G0({layer:r,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return mit(Jk({layerType:o},f))}}})},paint(c){return G0({layer:r,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return git(Jk({layerType:o},f))}}})}}})),t}function cx(e){let t=e.value,r=e.key,i=Ca(t);return i==="string"?[]:[new ri(r,t,`string expected, ${i} found`)]}function Ixr(e){var f;let t=(f=e.sourceName)!=null?f:"",r=e.value,i=e.styleSpec,n=i.source_raster_dem,a=e.style,o=[],s=Ca(r);if(r===void 0)return o;if(s!=="object")return o.push(new ri("source_raster_dem",r,`object expected, ${s} found`)),o;let l=au(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],c=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let h in r)!l&&u.includes(h)?o.push(new ri(h,r[h],`In "${t}": "${h}" is only valid when "encoding" is set to "custom". ${c} encoding found`)):n[h]?o=o.concat(e.validateSpec({key:h,value:r[h],valueSpec:n[h],validateSpec:e.validateSpec,style:a,styleSpec:i})):o.push(new ri(h,r[h],`unknown property "${h}"`));return o}function xit(e){let t=e.value,r=e.key,i=e.styleSpec,n=e.style,a=e.validateSpec;if(!t.type)return[new ri(r,t,'"type" is required')];let o=au(t.type),s;switch(o){case"vector":case"raster":return s=G0({key:r,value:t,valueSpec:i[`source_${o.replace("-","_")}`],style:e.style,styleSpec:i,objectElementValidators:net,validateSpec:a}),s;case"raster-dem":return s=Ixr({sourceName:r,value:t,style:e.style,styleSpec:i,validateSpec:a}),s;case"geojson":if(s=G0({key:r,value:t,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:net}),t.cluster)for(let l in t.clusterProperties){let[u,c]=t.clusterProperties[l],f=typeof u=="string"?[u,["accumulated"],["get",l]]:u;s.push(...GT({key:`${r}.${l}.map`,value:c,validateSpec:a,expressionContext:"cluster-map"})),s.push(...GT({key:`${r}.${l}.reduce`,value:f,validateSpec:a,expressionContext:"cluster-reduce"}))}return s;case"video":return G0({key:r,value:t,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return G0({key:r,value:t,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new ri(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return eC({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function Rxr({key:e,value:t}){if(Ca(t)==="string")return cx({key:e,value:t});{let r=[];for(let i in t)r.push(...cx({key:`${e}.${i}`,value:t[i]}));return r}}function bit(e){let t=e.value,r=e.styleSpec,i=r.light,n=e.style,a=[],o=Ca(t);if(t===void 0)return a;if(o!=="object")return a=a.concat([new ri("light",t,`object expected, ${o} found`)]),a;for(let s in t){let l=s.match(qne);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r})):i[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],validateSpec:e.validateSpec,style:n,styleSpec:r})):a.concat([new ri(s,t[s],`unknown property "${s}"`)])}return a}function _it(e){let t=e.value,r=e.styleSpec,i=r.sky,n=e.style,a=Ca(t);if(t===void 0)return[];if(a!=="object")return[new ri("sky",t,`object expected, ${a} found`)];let o=[];for(let s in t){let l=s.match(qne);o=l&&i[l[1]]&&i[l[1]].transition?o.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,style:n,styleSpec:r})):i[s]?o.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new ri(s,t[s],`unknown property "${s}"`)])}return o}function wit(e){let t=e.value,r=e.styleSpec,i=r.terrain,n=e.style,a=[],o=Ca(t);if(t===void 0)return a;if(o!=="object")return a=a.concat([new ri("terrain",t,`object expected, ${o} found`)]),a;for(let s in t)a=i[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],validateSpec:e.validateSpec,style:n,styleSpec:r})):a.concat([new ri(s,t[s],`unknown property "${s}"`)]);return a}function zxr(e){return cx(e).length===0?[]:GT(e)}function Bxr(e){return cx(e).length===0?[]:GT(e)}function qxr(e){let t=e.key,r=e.value;if(Ca(r)==="array"){if(r.length<1||r.length>4)return[new ri(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[new ri(e,t,'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"')],n=r.match($xr);if(!n)return i();let[,a,o,s]=n;if(s!==void 0)return s.length>6?i():[];let l=parseInt(a,16),u=o===void 0?l:parseInt(o,16);return l>aet||u>aet?[new ri(e,t,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new ri(e,t,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Mit(e){var s,l;let t=(s=e.key)!=null?s:"font-faces",r=e.value,i=e.validateSpec,n=(l=e.styleSpec)!=null?l:urt,a=e.style;if(!cie(r))return[new ri(t,r,`object expected, ${Ca(r)} found`)];let o=[];for(let u in r){let c=r[u],f=Ca(c);if(f==="string")o.push(...cx({key:`${t}.${u}`,value:c}));else if(f==="array"){let h={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[p,d]of c.entries()){let v=`${t}.${u}[${p}]`;o.push(...G0({key:v,value:d,valueSpec:h,styleSpec:n,style:a,validateSpec:i}));let m=cie(d)?d["unicode-range"]:void 0;if(Ca(m)==="array")for(let[g,w]of m.entries())o.push(...Wxr(`${v}.unicode-range[${g}]`,w))}}else o.push(new ri(`${t}.${u}`,c,`string or array expected, ${f} found`))}return o}function Gk(e){let t=e.value,r=e.valueSpec,i=e.styleSpec;return e.validateSpec=Gk,r.expression&&hq(au(t))?dit(e):r.expression&&dq(s3(t))?GT(e):r.type&&oet[r.type]?oet[r.type](e):G0(Jk({},e,{valueSpec:r.type?i[r.type]:r}))}function Sit(e){let t=e.value,r=e.key,i=cx(e);return i.length||(t.indexOf("{fontstack}")===-1&&i.push(new ri(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&i.push(new ri(r,t,'"glyphs" url must include a "{range}" token'))),i}function V0(e,t=_r){let r=[];return r=r.concat(Gk({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:Gk,objectElementValidators:{glyphs:Sit,"*"(){return[]}}})),e.constants&&(r=r.concat(hit({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:Gk}))),Eit(r)}function tp(e){return function(t){return e(Object.assign({},t,{validateSpec:Gk}))}}function Eit(e){return[].concat(e).sort((t,r)=>t.line-r.line)}function rp(e){return function(...t){return Eit(e.apply(this,t))}}function Zxr(e,t,r){return new Xxr(e,t,r)}function Kxr(e){var t;return Object.entries((t=e.sources)!=null?t:{}).filter(([,r])=>!Hne.has(r.type)).map(([r])=>`sources.${r}`)}function jne(e,t){let r=Kxr(t);return gq(e,mh(t).filter(({message:i})=>!r.some(n=>i.startsWith(`${n}:`)||i.startsWith(`${n}.`))))}function gq(e,t){let r=!1;for(let i of t){if(i.severity==="warning"){Pa(i.message);continue}e.fire(new Mn(Error(i.message))),r=!0}return r}function KT(e,t,r,i){return(i==null?void 0:i.validate)!==!1&&gq(e,t(fn({styleSpec:_r},r)))}function Hi(e,t,r={}){if(Rm[e])throw Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),Rm[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}function Cit(e){var t;return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||((t=e.constructor)==null?void 0:t.name)==="ArrayBuffer")}function $ne(e){let t=e.constructor;return e.$name||t._classRegistryKey}function Jxr(e){if(typeof e!="object"||!e)return!1;let t=$ne(e);return t&&t!=="Object"}function Dit(e){return!Jxr(e)&&(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||Cit(e)||px(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function Hk(e,t){if(Dit(e))return(Cit(e)||px(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let a=[];for(let o of e)a.push(Hk(o,t));return a}if(typeof e!="object")throw Error(`can't serialize object of type ${typeof e}`);let r=$ne(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!Rm[r])throw Error(`${r} is not registered.`);let{klass:i}=Rm[r],n=i.serialize?i.serialize(e,t):{};if(i.serialize){if(n===(t==null?void 0:t[t.length-1]))throw Error("statically serialized object won't survive transfer of $name property")}else{for(let a in e){if(!e.hasOwnProperty(a)||Rm[r].omit.includes(a))continue;let o=e[a];o!==void 0&&(n[a]=Rm[r].shallow.includes(a)?o:Hk(o,t))}e instanceof Error&&(n.message=e.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(n.$name=r),n}function jk(e){if(Dit(e))return e;if(Array.isArray(e))return e.map(jk);if(typeof e!="object")throw Error(`can't deserialize object of type ${typeof e}`);let t=$ne(e)||"Object";if(!Rm[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=Rm[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let i=Object.create(r.prototype);for(let n of Object.keys(e)){if(n==="$name")continue;let a=e[n];i[n]=Rm[t].shallow.includes(n)?a:jk(a)}return i}function cet(e){if(Array.isArray(e))return e.length;let t=e==null?void 0:e.values;return Array.isArray(t)?t.length:void 0}function Fit(e,t){let r=cet(e),i=cet(t);return r!==void 0&&i!==void 0&&r!==i}function cl(e,t=1){let r=0,i=0;return{members:e.map(n=>{let a=nbr(n.type),o=r=det(r,Math.max(t,a)),s=n.components||1;return i=Math.max(i,a),r+=a*s,{name:n.name,type:n.type,components:s,offset:o}}),size:det(r,Math.max(i,t)),alignment:t}}function nbr(e){return ibr[e].BYTES_PER_ELEMENT}function det(e,t){return Math.ceil(e/t)*t}function get(e,t){return e=ea(Math.floor(e),0,255),t=ea(Math.floor(t),0,255),256*e+t}function met(e){let t=+e;return!isNaN(t)&&t<=2**53-1?t:(0,IB.default)(String(e))}function Iie(e,t,r,i){for(;r>1],a=r-1,o=i+1;for(;;){do a++;while(e[a]n);if(a>=o)break;oB(e,a,o),oB(t,3*a,3*o),oB(t,3*a+1,3*o+1),oB(t,3*a+2,3*o+2)}o-rn.x+1||on.y+1)&&Pa("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function vx(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?v3(e):[]}}function wbr(e,t,r,i,n){e.emplaceBack(bet+t*8+i,bet+r*8+n)}function Kne(e,t){for(let r of e)if(HT(t,r))return!0;for(let r of t)if(HT(e,r))return!0;return Jne(e,t)}function bq(e,t,r){return HT(e,t)?!0:Bie(t,e,r)}function ent(e,t){if(e.length===1)return _et(t,e[0]);for(let r of t)for(let i of r)if(HT(e,i))return!0;for(let r of e)if(_et(t,r))return!0;for(let r of t)if(Jne(e,r))return!0;return!1}function Tbr(e,t,r){for(let i of t){if(e.length>=3){for(let n of i)if(HT(e,n))return!0}if(Abr(e,i,r))return!0}return!1}function Abr(e,t,r){if(e.length>1){if(Jne(e,t))return!0;for(let i of t)if(Bie(i,e,r))return!0}for(let i of e)if(Bie(i,t,r))return!0;return!1}function Jne(e,t){if(e.length===0||t.length===0)return!1;for(let r=0;r1?e.distSqr(r):e.distSqr(r.sub(t)._mult(n)._add(t))}function _et(e,t){let r=!1,i,n,a;for(let o of e){i=o;for(let s=0,l=i.length-1;st.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function HT(e,t){let r=!1;for(let i=0,n=e.length-1;it.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function Sbr(e,t,r,i,n){for(let o of e)if(t<=o.x&&r<=o.y&&i>=o.x&&n>=o.y)return!0;let a=[new rr(t,r),new rr(t,n),new rr(i,n),new rr(i,r)];if(e.length>2){for(let o of a)if(HT(e,o))return!0}for(let o=0;on.x&&t.x>n.x||e.yn.y&&t.y>n.y)return!1;let a=ax(e,t,r[0]);return a!==ax(e,t,r[1])||a!==ax(e,t,r[2])||a!==ax(e,t,r[3])}function FT(e,t,r){let i=t.paint.get(e).value;return i.kind==="constant"?i.value:r.programConfigurations.get(t.id).getMaxValue(e)}function _q(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function wq(e,t,r,i,n){if(!t[0]&&!t[1])return e;let a=rr.convert(t)._mult(n);r==="viewport"&&a._rotate(-i);let o=[];for(let s of e)o.push(s.sub(a));return o}function kbr(e){let t=[];for(let r=0;rQne(n,t,r,i))}function eae(e,{width:t,height:r},i,n){if(!n)n=new Uint8Array(t*r*i);else if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==t*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${t*r*i}`);return e.width=t,e.height=r,e.data=n,e}function ant(e,{width:t,height:r},i){if(t===e.width&&r===e.height)return;let n=eae({},{width:t,height:r},i);tae(e,n,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},i),e.width=t,e.height=r,e.data=n.data}function tae(e,t,r,i,n,a){if(n.width===0||n.height===0)return t;if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=l;let u=e.expression.evaluate(t);n.setPixel(o/4/r,s/4,u)};if(e.clips)for(let o=0,s=0;o80*r){s=e[0],l=e[1];let c=s,f=l;for(let h=r;hc&&(c=p),d>f&&(f=d)}u=Math.max(c-s,f-l),u=u===0?0:32767/u}return Nie(a,o,s,l,u),o}function hnt(e,t,r,i,n){let a=null;if(n===p_r(e,t,r,i)>0)for(let o=t;o=t;o-=i)a=Det(o/i|0,e[o],e[o+1],a);return a&&oC(a,a.next)&&(lC(a),a=a.next),a}function u3(e,t=e){let r=t===e,i=e,n;do n=!1,i!==i.next&&(aC.size===0||!aC.has(i))&&(oC(i,i.next)||$u(i.prev,i,i.next)===0)?((r||i===t)&&(t=i.prev),Oie=!0,lC(i),i=i.prev,n=!0):(r||i!==t)&&(i=i.next,n=!r);while(n||i!==t);return t}function Nie(e,t,r,i,n){n&&l_r(e,r,i,n);let a=e,o=!1;for(;e.prev!==e.next;){let s=e.prev,l=e.next;if($u(s,e,l)<0&&(n?Jbr(e,r,i,n):Kbr(e))){t.push(s.i,e.i,l.i),lC(e),e=l,a=l;continue}if(e=l,e===a){if(Oie=!1,e=u3(e),Oie){a=e;continue}if(!o){e=Qbr(e,t),a=e,o=!0;continue}e_r(e,t,r,i,n);break}}}function Kbr(e){let t=e.prev,r=e,i=e.next,n=t.x,a=r.x,o=i.x,s=t.y,l=r.y,u=i.y,c=Math.min(n,a,o),f=Math.min(s,l,u),h=Math.max(n,a,o),p=Math.max(s,l,u),d=i.next;for(;d!==t;){if(d.x>=c&&d.x<=h&&d.y>=f&&d.y<=p&&(n!==d.x||s!==d.y)&&BB(n,s,a,l,o,u,d.x,d.y)&&$u(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Jbr(e,t,r,i){let n=e.prev,a=e,o=e.next,s=n.x,l=a.x,u=o.x,c=n.y,f=a.y,h=o.y,p=Math.min(s,l,u),d=Math.min(c,f,h),v=Math.max(s,l,u),m=Math.max(c,f,h),g=Hie(p,d,t,r,i),w=Hie(v,m,t,r,i),_=e.prevZ;for(;_&&_.z>=g;){if(_.x>=p&&_.x<=v&&_.y>=d&&_.y<=m&&_!==o&&(s!==_.x||c!==_.y)&&BB(s,c,l,f,u,h,_.x,_.y)&&$u(_.prev,_,_.next)>=0)return!1;_=_.prevZ}let b=e.nextZ;for(;b&&b.z<=w;){if(b.x>=p&&b.x<=v&&b.y>=d&&b.y<=m&&b!==o&&(s!==b.x||c!==b.y)&&BB(s,c,l,f,u,h,b.x,b.y)&&$u(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Qbr(e,t){let r=e,i=!1;do{let n=r.prev,a=r.next.next;pnt(n,r,r.next,a,!1)&&sC(n,a)&&sC(a,n)&&(t.push(n.i,r.i,a.i),lC(r),lC(r.next),r=e=a,i=!0),r=r.next}while(r!==e);return i?u3(r):r}function e_r(e,t,r,i,n){let a=e;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&f_r(a,o)){let s=vnt(a,o);a=u3(a,a.next),s=u3(s,s.next),Nie(a,t,r,i,n),Nie(s,t,r,i,n);return}o=o.next}a=a.next}while(a!==e)}function t_r(e,t,r,i){let n=[];for(let a=0,o=t.length;ao&&(o=r.x),r.ys&&(s=r.y),c.xo&&(o=c.x),c.ys&&(s=c.y),r=c}while(++l<16&&r!==t);Gie[i]=r;let u=i*4;nu[u]=n,nu[u+1]=a,nu[u+2]=o,nu[u+3]=s}while(r!==t)}function a_r(e,t){let r=e.z*4;t.xnu[r+2]&&(nu[r+2]=t.x),t.y>nu[r+3]&&(nu[r+3]=t.y)}function ket(e){let t=Gie[e];for(;t.prev.next!==t;)t=t.next;return Gie[e]=t,t}function Cet(e){let t=Vie[e];for(;t.prev.next!==t;)t=t.next;return Vie[e]=t,t}function o_r(e,t){let r=t,i=e.x,n=e.y,a=-1/0,o;if(oC(e,r))return r;for(let h=0,p=0;hnu[p+3]||nu[p]>i||nu[p+2]<=a)continue;let d=ket(h);r=Cet(h);do{if(r.prev.next===r){if(oC(e,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let v=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=i&&v>a&&(a=v,o=r.xi||nu[p+3]c)continue;let d=ket(h);r=Cet(h);do{if(r.prev.next===r&&i>=r.x&&r.x>=s&&i!==r.x&&BB(ni)&&(vo.x||r.x===o.x&&s_r(o,r)))&&(o=r,f=v)}r=r.next}while(r!==d)}return o}function s_r(e,t){return $u(e.prev,e,t.prev)<0&&$u(t.next,e,e.next)<0}function l_r(e,t,r,i){let n=e,a=0;do n.z=Hie(n.x,n.y,t,r,i),np[a++]=n,n=n.next;while(n!==e);u_r(a);let o=null;for(let s=0;s=0&&np[n].z>i;)np[n+1]=np[n],n--;np[n+1]=r}return}K_.length>>a&255]++;let o=0;for(let s=0;s<256;s++){let l=kk[s];kk[s]=o,o+=l}for(let s=0;s>>a&255]++;i[u]=t[s],n[u]=l}}function Hie(e,t,r,i,n){return e=(e-r)*n|0,t=(t-i)*n|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function c_r(e){let t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function f_r(e,t){let r=oC(e,t)&&$u(e.prev,e,e.next)>0&&$u(t.prev,t,t.next)>0;return e.next.i!==t.i&&(r||sC(e,t)&&sC(t,e)&&($u(e.prev,e,t.prev)!==0||$u(e,t.prev,t)!==0))&&!h_r(e,t)&&(r||d_r(e,t))}function $u(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function oC(e,t){return e.x===t.x&&e.y===t.y}function pnt(e,t,r,i,n=!0){let a=$u(e,t,r),o=$u(e,t,i),s=$u(r,i,e),l=$u(r,i,t);return(a>0&&o<0||a<0&&o>0)&&(s>0&&l<0||s<0&&l>0)?!0:n?!!(a===0&&uB(e,r,t)||o===0&&uB(e,i,t)||s===0&&uB(r,e,i)||l===0&&uB(r,t,i)):!1}function uB(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function h_r(e,t){let r=Math.min(e.x,t.x),i=Math.max(e.x,t.x),n=Math.min(e.y,t.y),a=Math.max(e.y,t.y),o=e;do{let s=o.next;if(o.x>i&&s.x>i||o.xa&&s.y>a||o.y=0&&$u(e,e.prev,t)>=0:$u(e,t,e.prev)<0||$u(e,e.next,t)<0}function d_r(e,t){let r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do{let o=r.next;r.y>a!=o.y>a&&n<(o.x-r.x)*(a-r.y)/(o.y-r.y)+r.x&&(i=!i),r=o}while(r!==e);return i}function vnt(e,t){let r=jie(e.i,e.x,e.y),i=jie(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function Det(e,t,r,i){let n=jie(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function lC(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),Uie&&a_r(e.prev,e.next)}function jie(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function p_r(e,t,r,i){let n=0;for(let a=t,o=r-i;a0?(Math.floor(M/n)+1)*n:(Math.ceil(M/n)-1)*n,y=w>0?(Math.floor(x/n)+1)*n:(Math.ceil(x/n)-1)*n,E=Math.abs(M-T),S=Math.abs(x-y),C=Math.abs(M-p),k=Math.abs(x-d),D=v?E/_:1/0,F=m?S/b:1/0;if((C<=E||!v)&&(k<=S||!m))break;if(D0?(r.push(n),r.push(o),r.push(a)):(r.push(n),r.push(a),r.push(o))}return r}function x_r(e,t,r){if(t.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=e[t[0]*2];for(let l=1;l=0?o-1:a-1,u=(s+1)%a,c=e[t[l]*2],f=e[t[l]*2+1],h=e[t[u]*2],p=e[t[u]*2+1],d=e[t[o]*2],v=e[t[o]*2+1],m=e[t[s]*2],g=e[t[s]*2+1],w=!1;if(ch)w=!1;else{let _=g-v,b=-(m-d),M=v((h-d)*_+(p-v)*b)*M&&(w=!0)}if(w){let _=t[l],b=t[o],M=t[s];_!==b&&_!==M&&b!==M&&r.push(M,b,_),o--,o<0&&(o=a-1)}else{let _=t[u],b=t[o],M=t[s];_!==b&&_!==M&&b!==M&&r.push(M,b,_),s++,s>=a&&(s=0)}if(l===u)break}}function ynt(e,t,r,i,n,a,o,s,l){let u=n.length/2,c=o&&s&&l;if(uJs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,v=!0,m=!0,g=!0,c=0);let _=$k(o,i,a,s,h,v,u),b=$k(o,i,a,s,p,m,u),M=$k(o,i,a,s,d,g,u);r.emplaceBack(c+_-l,c+b-l,c+M-l),u.primitiveLength++}}function __r(e,t,r,i,n,a){let o=[];for(let f=0;fJs.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,v=!0,m=!0,c=0);let w=$k(o,i,a,s,p,v,u),_=$k(o,i,a,s,d,m,u);r.emplaceBack(c+w-l,c+_-l),u.primitiveLength++}}function Yie(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}function Pet(e){return e.every(t=>t.x<0)||e.every(t=>t.x>8192)||e.every(t=>t.y<0)||e.every(t=>t.y>8192)}function wnt(e){let t=e.length;if(t<=1)return[e];let r=[],i,n;for(let a=0;az_r(r,t))}function R_r(e,t){let r=P_r(qr/2,qr/2,t),i=Mo.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<1&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y;)t.pop();return t}function q_r(e,t,r,i,n){let a=t.sub(r),o=i.sub(r),s=a.mag(),l=o.mag();if(s<1e-6||l<1e-6){e.push(r.clone());return}a._div(s),o._div(l);let u=a.x*o.x+a.y*o.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){e.push(r.clone());return}let c=.2,f=Math.min(n,s*c,l*c),h=r.add(a.mult(f)),p=r.add(o.mult(f)),d=Math.sqrt((1+u)/2),v=r.add(a.add(o)._unit()._mult(f/d)),m=h.sub(v).angleWith(p.sub(v)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let w=0;w<=g;w++)e.push(h.rotateAround(w/g*m,v))}function Ck(e,t,r,i,n,a,o,s){e.emplaceBack(t,r,Math.floor(i*Wre)*2+o,n*Wre*2,a*Wre*2,Math.round(s))}function O_r(e,t){for(let r=0;r0?t+2*e:e}function a3r(e){return/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u077F\u07C0-\u07FA\u07FD-\u07FF\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\u1800\u1801\u1804\u1806-\u1819\u1820-\u1878\u1880-\u18AA\uA840-\uA877\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDD00-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDEFF\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB]|\uD805[\uDE60-\uDE6C]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]|\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function o3r(e){return/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC57-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD1F-\uDD39\uDD3F-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58\uDE60-\uDE9F\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF00-\uDF35\uDF39-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD85\uDD8E\uDD8F\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDF27\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function Pnt(e){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(e))}function s3r(e){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\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(e))}function kq(e){return/[\u02EA\u02EB\u1100-\u11FF\u1401-\u167F\u18B0-\u18FF\u2065\u20DD-\u20E0\u20E2-\u20E4\u2B97\u2BF0-\u2BFF\u2E50\u2E51\u2E80-\u3007\u3012\u3013\u3020-\u302F\u3031-\u30FB\u30FD-\uA4CF\uA960-\uA97F\uAC00-\uD7FF\uF900-\uFAFF\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7\uFFF0-\uFFF8]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|[\uD80C-\uD810\uD81C-\uD822\uD83C\uD83D\uD840-\uD87E\uD880-\uD8BE][\uDC00-\uDFFF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFFF]|\uD823[\uDC00-\uDDFF]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFF]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83E[\uDD00-\uDEFF]|[\uD87F\uD8BF][\uDC00-\uDFFD]/gim.test(String.fromCodePoint(e))}function l3r(e){return/[\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(e))}function u3r(e){return/[\r\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0600-\u0605\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DD\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0890\u0891\u0897-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E33-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB3-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1037\u1039-\u103E\u1056-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1084-\u1086\u108D\u109D\u1100-\u11FF\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60\u1A62\u1A65-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA960-\uA97C\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCBD\uDCC2\uDCCD\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC2\uDDC3\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF1F\uDF22-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE84-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00-\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDD63\uDD67-\uDD6A\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDDE6-\uDDFF\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]/.test(e)}function Get(e){return/[\u0E01-\u0E3A\u0E40-\u0E4E\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA\u1000-\u103F\u1050-\u108F\u109A-\u109F\u1780-\u17D3\u17D7\u17DC\u17DD\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19DE\u19DF\u1A20-\u1A5E\u1A60-\u1A7C\u1AA0-\u1AAD\u1B00-\u1B4C\u1B4E-\u1B7F\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE-\uA9EF\uA9FA-\uA9FE\uAA60-\uAAC2\uAADB-\uAADF]|\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF3A\uDF3B\uDF3F-\uDF46]/gim.test(String.fromCodePoint(e))}function c3r(e,t){return/(?:[\u1039\u17D2\u1A60\u1BAB\u200D\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807[\uDD45\uDD97\uDF42])$/.test(e)||new RegExp("^\\p{gc=Mc}","u").test(t)}function v3r(e,t,r){let i=0;for(let n of e.split(";")){let[a,o]=n.split(",").map(l=>parseInt(l,36)),s=i+a;for(let l=s;l{let r=t.codePointAt(0);return{codePoint:r,type:g3r(r),form:null}})}function _3r(e){let t=e.filter(r=>r.type!=="T");for(let r=0;r0&&m3r(t[r-1].type),a=r+1String.fromCodePoint(A3r(r))).join("")}function S3r(e,t,r){var n;let i=t.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?e=e.toLocaleUpperCase():i==="lowercase"&&(e=e.toLocaleLowerCase()),((n=qB.applyArabicShaping)!=null?n:M3r)(e)}function E3r(e,t,r){for(let i of e.sections)i.text=S3r(i.text,t,r);return e}function Yre(e,t,r){let i=r?t.last.points:t.first.points,n=r?i[i.length-1]:i[0];return`${e}:${n.x}:${n.y}`}function k3r(e){let t=e.first.points,r=t.length;for(let a=e.first.next;a;a=a.next)r+=a.points.length-1;let i=Array(r);for(let a=0;a=0&&c3r(t[i],r)?t[i]+=r:t.push(r)}return t}function D3r(e){let t=new Set;if(Rnt){Lk!=null||(Lk=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of Lk.segment(e))t.add(i);return t}let r=0;for(let i of e.split(new RegExp("\\b|(?=\\p{Ideo})","u")))t.add(r),r+=i.length;return t}function CC(e){let t=e.codePointAt(0);return e.length>(t>65535?2:1)}function sae(e){return/\s/u.test(String.fromCodePoint(e))}function Jie(e){for(let t of e)if(kq(t.codePointAt(0)))return!0;return!1}function F3r(e){for(let t of e)if(!L3r(t.codePointAt(0)))return!1;return!0}function L3r(e){return!a3r(e)}function Wet(e){return!(kq(e)||l3r(e))}function znt(e){return new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(e))}function Bnt(e){return o3r(e)}function qnt(e){for(let t of e)if(Bnt(t.codePointAt(0)))return!0;return!1}function P3r(e){let t="",r={premature:!0,value:void 0},i=e[Symbol.iterator](),n=i.next(),a=e[Symbol.iterator]();a.next();let o=a.next();for(;!n.done;)(o.done||!Wet(o.value.codePointAt(0))||kT[o.value])&&(r.premature||!Wet(r.value.codePointAt(0))||kT[r.value])&&kT[n.value]?t+=kT[n.value]:t+=n.value,r={value:n.value,premature:!1},n=i.next(),o=a.next();return t}function Yet(e,t,r,i,n,a){var o;if("fontStack"in t){let s=(o=r[t.fontStack])==null?void 0:o.default,l=s==null?void 0:s[e];if(l)return l.metrics.advance*t.scale+n;let u=0;for(let c of e){let f=s==null?void 0:s[c];f&&(u+=f.metrics.advance*t.scale+n)}return u}{let s=i[t.imageName];return s?s.displaySize[0]*t.scale*24/a+n:0}}function Xet(e,t,r,i){let n=(e-t)**2;return i?e1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function d(Ee,xe){var ce=0,oe=new Map,Se=xe&&new Map,be;return Ee.split(",").forEach(function fe(ee){if(ee.indexOf("+")!==-1)for(var ae=+ee;ae--;)fe(be);else{be=ee;var _e=ee.split(">"),re=_e[0],pe=_e[1];re=String.fromCodePoint(ce+=parseInt(re,36)),pe=String.fromCodePoint(ce+=parseInt(pe,36)),oe.set(re,pe),xe&&Se.set(pe,re)}}),{map:oe,reverseMap:Se}}var v,m,g;function w(){if(!v){var Ee=d(p.pairs,!0),xe=Ee.map,ce=Ee.reverseMap;v=xe,m=ce,g=d(p.canonical,!1).map}}function _(Ee){return w(),v.get(Ee)||null}function b(Ee){return w(),m.get(Ee)||null}function M(Ee){return w(),g.get(Ee)||null}var x=r.L,A=r.R,T=r.EN,y=r.ES,E=r.ET,S=r.AN,C=r.CS,k=r.B,D=r.S,F=r.ON,P=r.BN,R=r.NSM,L=r.AL,I=r.LRO,B=r.RLO,O=r.LRE,$=r.RLE,X=r.PDF,K=r.LRI,G=r.RLI,q=r.FSI,J=r.PDI;function N(Ee,xe){for(var ce=125,oe=new Uint32Array(Ee.length),Se=0;Se0)Ne--;else if(rt>0){for(Je=0;!me[me.length-1]._isolate;)me.pop();var pt=me[me.length-1]._isolInitIndex;pt!=null&&(ae.set(pt,mt),ae.set(mt,pt)),me.pop(),rt--}Le=me[me.length-1],ee[mt]=Le._level,Le._override&&fe(mt,Le._override)}else dt&X?(Ne===0&&(Je>0?Je--:!Le._isolate&&me.length>1&&(me.pop(),Le=me[me.length-1])),ee[mt]=Le._level):dt&k&&(ee[mt]=re.level);else ee[mt]=Le._level,Le._override&&dt!==P&&fe(mt,Le._override)}for(var Oe=[],Ue=null,je=re.start;je<=re.end;je++){var $e=oe[je];if(!($e&s)){var Ie=ee[je],Ve=$e&n,st=$e===J;Ue&&Ie===Ue._level?(Ue._end=je,Ue._endsWithIsolInit=Ve):Oe.push(Ue={_start:je,_end:je,_level:Ie,_startsWithPDI:st,_endsWithIsolInit:Ve})}}for(var _t=[],Wt=0;Wt=0;ht--)if(!(oe[ht]&s)){gt=ee[ht];break}var Ft=Jt[Jt.length-1],hr=ee[Ft],Ut=re.level;if(!(oe[Ft]&n)){for(var Lr=Ft+1;Lr<=re.end;Lr++)if(!(oe[Lr]&s)){Ut=ee[Lr];break}}_t.push({_seqIndices:Jt,_sosType:Math.max(gt,nt)%2?A:x,_eosType:Math.max(Ut,hr)%2?A:x})}}for(var jr=0;jr<_t.length;jr++){var ii=_t[jr],Fr=ii._seqIndices,Ii=ii._sosType,Xi=ii._eosType,ln=ee[Fr[0]]&1?A:x;if(be.get(R))for(var la=0;la=0;zn--)if(!(oe[Fr[zn]]&s)){pn=oe[Fr[zn]];break}fe(mo,pn&(n|J)?F:pn)}}if(be.get(T))for(var gn=0;gn=-1;ua--){var as=ua===-1?Ii:oe[Fr[ua]];if(as&a){as===L&&fe(ns,S);break}}}if(be.get(L))for(var ro=0;ro=0&&(Ma=oe[Fr[Ml]],Ma&s);Ml--);for(var Au=co+1;Au=0&&oe[Fr[Fe]]&(E|s);Fe--)fe(Fr[Fe],T);for(dl++;dl=0&&oe[Fr[kt]]&s;kt--)fe(Fr[kt],F);for(var er=ot+1;er=0;Zn--){var io=un[Zn].char;if(io===ma||io===b(M(wn))||_(M(io))===wn){Si.push([un[Zn].seqIndex,$n]),un.length=Zn;break}}}Si.sort(function(bo,pu){return bo[0]-pu[0]});for(var fo=0;fo=0;ho--){var qn=Fr[ho];if(oe[qn]&ni){var _a=oe[qn]&Kr?A:x;Co=_a===ln?ln:_a;break}}}if(Co){if(oe[Fr[Oo]]=oe[Fr[ms]]=Co,Co!==ln){for(var ys=Oo+1;ys=0;Mu--)if(oe[Fr[Mu]]&s)jl=Mu;else{hu=oe[Fr[Mu]]&Kr?A:x;break}for(var Su=Xi,yc=rl+1;yc=0&&f(Ee[Cs])&l;Cs--)ee[Cs]=re.level}}return{levels:ee,paragraphs:_e};function du(bo,pu){for(var Jo=bo;Jo=ee&&f(Ee[re])&l;re--)_e[re]=fe.level;for(var pe=fe.level,Te=1/0,Ce=0;Ce<_e.length;Ce++){var ze=_e[Ce];ze>pe&&(pe=ze),ze=Te;we--)for(var me=0;me<_e.length;me++)if(_e[me]>=we){for(var Le=me;me+1<_e.length&&_e[me+1]>=we;)me++;me>Le&&be.push([Le+ee,me+ee])}}}),be}function ue(Ee,xe,ce,oe){var Se=ge(Ee,xe,ce,oe),be=[].concat(Ee);return Se.forEach(function(fe,ee){be[ee]=(xe.levels[fe]&1?j(Ee[fe]):null)||Ee[fe]}),be.join("")}function ge(Ee,xe,ce,oe){for(var Se=te(Ee,xe,ce,oe),be=[],fe=0;fe=0;i--){let n=uae.getBidiCharTypeName(e[i].text[0]);N3r.has(n)?(e[i].level=t,r=!0):r&&O3r.has(n)?e[i].level=t:r=!1}}function G3r(e,t){let r=t,i=1/0;for(let{level:a}of e)a>r&&(r=a),(a|1)=i;a--)for(let o=0;o=a;)s++;for(let l=o,u=s;lt>=n.start&&t<=n.end))==null?void 0:r.level)!=null?i:0}function $3r(e,t,r,i,n){let a=U3r(e,t,i,n);V3r(a,r);let o="",s=[];for(let l of G3r(a,r)){if(q3r.test(l.text))continue;let u=H3r(l);o+=u,s.push(...Array(u.length).fill(l.index))}return{text:o,sourceIndices:s}}function W3r(e,t){let r=t.filter(a=>a>0&&aa-o),n=[];for(let a=0;a+1n.start))).map(([n,a])=>$3r(e,r,j3r(i,n),n,a))}function Y3r(e,t){return Nnt(e,t).map(r=>r.text)}function X3r(e,t,r){return Nnt(e,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=t[n])!=null?a:0})])}function Z3r(e,t,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return K3r(e,n,t);throw Error("Expected varint not more than 10 bytes")}function K3r(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function J3r(e,t,r){let i="",n=t;for(;n239?4:a>223?3:a>191?2:1;if(n+s>r)break;let l,u,c;s===1?a<128&&(o=a):s===2?(l=e[n+1],(l&192)==128&&(o=(a&31)<<6|l&63,o<=127&&(o=null))):s===3?(l=e[n+1],u=e[n+2],(l&192)==128&&(u&192)==128&&(o=(a&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(l=e[n+1],u=e[n+2],c=e[n+3],(l&192)==128&&(u&192)==128&&(c&192)==128&&(o=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,i+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),i+=String.fromCharCode(o),n+=s}return i}function Q3r(e,t,r){e===1&&r.readMessage(ewr,t)}function ewr(e,t,r){if(e===3){let{id:i,bitmap:n,width:a,height:o,left:s,top:l,advance:u}=r.readMessage(twr,{});t.push({id:i,bitmap:new Tq({width:a+6,height:o+6},n),metrics:{width:a,height:o,left:s,top:l,advance:u}})}}function twr(e,t,r){e===1?t.id=r.readVarint():e===2?t.bitmap=r.readBytes():e===3?t.width=r.readVarint():e===4?t.height=r.readVarint():e===5?t.left=r.readSVarint():e===6?t.top=r.readSVarint():e===7&&(t.advance=r.readVarint())}function Vnt(e){return new Unt(e).readFields(Q3r,[])}function DC(e){return typeof(e==null?void 0:e.renderWithWebGL)=="function"}function Gnt(e){let{userImage:t}=e;return!(t!=null&&t.render)||!t.render()?!1:(DC(t.data)||e.data.replace(new Uint8Array(t.data.buffer)),!0)}function cae(e){let t=0,r=0;for(let o of e)t+=o.w*o.h,r=Math.max(r,o.w);e.sort((o,s)=>s.h-o.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],n=0,a=0;for(let o of e)for(let s=i.length-1;s>=0;s--){let l=i[s];if(!(o.w>l.w||o.h>l.h)){if(o.x=l.x,o.y=l.y,a=Math.max(a,o.y+o.h),n=Math.max(n,o.x+o.w),o.w===l.w&&o.h===l.h){let u=i.pop();u&&s=r;a--)t.push(a);r=i+1}else{for(let a=r;ae.toCodeUnitIndex(a)),i=qB.isParsed()?qB:null;if(e.sections.length===1)return i?i.processBidirectionalText(e.toString(),r).map(a=>ett(a,e.sections,[...a].map(()=>0))):Y3r(e.toString(),r).map(a=>tne([...a],e.sections,[...a].map(()=>0)));let n=owr(e);return i?i.processStyledBidirectionalText(e.text,n,r).map(([a,o])=>ett(a,e.sections,o)):X3r(e.text,n,r).map(([a,o])=>{let s=[...a];return tne(s,e.sections,jnt(s).map(l=>{var u;return(u=o[l])!=null?u:0}))})}function tne(e,t,r){var a;let i=new lae(e.join(""),t,[]),n=0;for(let o of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...o].length;return i}function jnt(e){let t=[],r=0;for(let i of e)t.push(r),r+=i.length;return t}function ett(e,t,r){let i=[...e],n=jnt(i),a=awr(i);return tne(a.map(o=>i[o]),t,a.map(o=>{var s;return(s=r[n[o]])!=null?s:0}))}function fB(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d){let v=lae.fromFeature(e,n);f===2&&v.verticalizePunctuation();let m=v.determineLineBreaks(u,a,t,i,p),g=qnt(v.text)?swr(v,m):nwr(v,m),w=[],_={positionedLines:w,text:v.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:f,iconsInText:!1,verticalizable:!1};return gwr(_,t,r,i,g,o,s,l,f,u,h,d),!iwr(w)&&_}function FC(e){let t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function lwr(e,t,r){let i=t.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=t.getMaxImageSize(e),o=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:o}}function $nt(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function uwr(e,t,r,i){var a,o;if(e!=null&&e.rect)return e;let n=(o=(a=t[r.fontStack])==null?void 0:a.default)==null?void 0:o[i];return n?{rect:null,metrics:n.metrics}:null}function cwr(e,t,r){return!(e===1||!t&&!kq(r)||t&&(sae(r)||znt(r)))}function wB(e){return new RegExp("\\p{Nd}","u").test(String.fromCodePoint(e))}function Wnt(e){return new RegExp("\\p{Lu}","u").test(String.fromCodePoint(e))}function fwr(e){return/[\p{P}\p{S}]/u.test(String.fromCodePoint(e))}function hwr(e){let t=e.some(wB)&&e.every(i=>wB(i)||fwr(i)),r=e.length<=3&&e.every(i=>Wnt(i)||wB(i));return t||r}function dwr(e){return(wB(e)||Wnt(e))&&!znt(e)}function pwr(e,t){let r=!1;for(let i=0;ia.codePointAt(0)),i=r.map(kq),n=a=>!i[a]&&!sae(r[a])&&!("imageName"in e.getSection(a));for(let a=0;au){let h=Math.ceil(i/u);r*=h/n,n=h}return{x1:t,y1:r,x2:t+i,y2:r+n}}function ttt(e,t,r,i,n,a){let o=e.image,s;if(o.content){let m=o.content,g=o.pixelRatio||1;s=[m[0]/g,m[1]/g,o.displaySize[0]-m[2]/g,o.displaySize[1]-m[3]/g]}let l=t.left*a,u=t.right*a,c,f,h,p;r==="width"||r==="both"?(p=n[0]+l-i[3],f=n[0]+u+i[1]):(p=n[0]+(l+u-o.displaySize[0])/2,f=p+o.displaySize[0]);let d=t.top*a,v=t.bottom*a;return r==="height"||r==="both"?(c=n[1]+d-i[0],h=n[1]+v+i[2]):(c=n[1]+(d+v-o.displaySize[1])/2,h=c+o.displaySize[1]),{image:o,top:c,right:f,bottom:h,left:p,collisionPadding:s}}function itt(e,t){let{expression:r}=t;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new Io(e+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=wwr(r.zoomStops,e);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=Twr(r),n=r.evaluate(new Io(e+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function wwr(e,t){let r=0;for(;re.evaluate(new Io(t===-1/0?e.zoomStops[1]-1:t)))}function Dq(e,{uSize:t,uSizeT:r},{lowerSize:i,upperSize:n}){return e.kind==="source"?i/128:e.kind==="composite"?Ks.number(i/128,n/128,r):t}function LC(e,t){let r=0,i=0;return e.kind==="constant"?i=e.layoutSize:e.kind==="camera"?i=Awr(e,t):e.kind==="composite"&&(r=Mwr(e,t)),{uSizeT:r,uSize:i}}function Awr({zoomStops:e,sizes:t,layoutSize:r,interpolationType:i},n){let a=e.length-1;for(;a>0&&e[a]>n;)a--;let o=Math.min(a+1,e.length-1),s=i?ea(sp.interpolationFactor(i,n,e[a],e[o]),0,1):0;return Math.min(Ks.number(t[a],t[o],s),r)}function Mwr({interpolationType:e,minZoom:t,maxZoom:r},i){return e?ea(sp.interpolationFactor(e,i,t,r),0,1):0}function Znt(e,t,r,i,n){if(t.segment===void 0||r===0)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(o--,o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],u=0;for(;si;)u-=l.shift().angleDelta;if(u>n)return!1;o++,s+=f.dist(h)}return!0}function Knt(e){let t=0;for(let r=0;ru){let d=(u-l)/p,v=new IT(Ks.number(f.x,h.x,d),Ks.number(f.y,h.y,d),h.angleTo(f),c);return v._round(),!o||Znt(e,v,s,o,t)?v:void 0}l+=p}}function Ewr(e,t,r,i,n,a,o,s,l){let u=Jnt(i,a,o),c=Qnt(i,n),f=c*o,h=e[0].x===0||e[0].x===l||e[0].y===0||e[0].y===l;t-f=0&&b=0&&M=0&&h+u<=c){let x=new IT(b,M,w,d);x._round(),(!i||Znt(e,x,a,i,n))&&p.push(x)}}f+=g}return!s&&!p.length&&!o&&(p=eat(e,f/2,r,i,n,a,o,!0,l)),p}function fae(e,t,r,i,n){let a=[];for(let o of e){let s;for(let l=0;l=i&&c.x>=i)&&(u.x>=i?u=new rr(i,u.y+(c.y-u.y)*((i-u.x)/(c.x-u.x)))._round():c.x>=i&&(c=new rr(i,u.y+(c.y-u.y)*((i-u.x)/(c.x-u.x)))._round()),!(u.y>=n&&c.y>=n)&&(u.y>=n?u=new rr(u.x+(c.x-u.x)*((n-u.y)/(c.y-u.y)),n)._round():c.y>=n&&(c=new rr(u.x+(c.x-u.x)*((n-u.y)/(c.y-u.y)),n)._round()),(!s||!u.equals(s[s.length-1]))&&(s=[u],a.push(s)),s.push(c)))))}}return a}function ntt(e,t,r,i){let n=[],a=e.image,o=a.pixelRatio,s=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},c=a.stretchX||[[0,s]],f=a.stretchY||[[0,l]],h=(D,F)=>D+F[1]-F[0],p=c.reduce(h,0),d=f.reduce(h,0),v=s-p,m=l-d,g=0,w=p,_=0,b=d,M=0,x=v,A=0,T=m;if(a.content&&i){let D=a.content,F=D[2]-D[0],P=D[3]-D[1];(a.textFitWidth||a.textFitHeight)&&(u=Ynt(e)),g=hB(c,0,D[0]),_=hB(f,0,D[1]),w=hB(c,D[0],D[2]),b=hB(f,D[1],D[3]),M=D[0]-g,A=D[1]-_,x=F-w,T=P-b}let y=u.x1,E=u.y1,S=u.x2-y,C=u.y2-E,k=(D,F,P,R)=>{let L=dB(D.stretch-g,w,S,y),I=pB(D.fixed-M,x,D.stretch,p),B=dB(F.stretch-_,b,C,E),O=pB(F.fixed-A,T,F.stretch,d),$=dB(P.stretch-g,w,S,y),X=pB(P.fixed-M,x,P.stretch,p),K=dB(R.stretch-_,b,C,E),G=pB(R.fixed-A,T,R.stretch,d),q=new rr(L,B),J=new rr($,B),N=new rr($,K),V=new rr(L,K),Y=new rr(I/o,O/o),H=new rr(X/o,G/o),j=t*Math.PI/180;if(j){let Ee=Math.sin(j),xe=Math.cos(j),ce=[xe,-Ee,Ee,xe];q._matMult(ce),J._matMult(ce),V._matMult(ce),N._matMult(ce)}let Q=D.stretch+D.fixed,te=P.stretch+P.fixed,ue=F.stretch+F.fixed,ge=R.stretch+R.fixed;return{tl:q,tr:J,bl:V,br:N,tex:{x:a.paddedRect.x+1+Q,y:a.paddedRect.y+1+ue,w:te-Q,h:ge-ue},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Y,pixelOffsetBR:H,minFontScaleX:x/o/S,minFontScaleY:T/o/C,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(k({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));else{let D=att(c,v,p),F=att(f,m,d);for(let P=0;Pf.d||!f.d)&&(f=h),!(h.max-f.d<=t)&&(n=h.h/2,a.push(new ST(h.p.x-n,h.p.y-n,n,e)),a.push(new ST(h.p.x+n,h.p.y-n,n,e)),a.push(new ST(h.p.x-n,h.p.y+n,n,e)),a.push(new ST(h.p.x+n,h.p.y+n,n,e)))}return c.d>0&&f.d-c.d<=t?c.p:f.p}function Fwr(e,t){return t.max-e.max}function Lwr(e,t){let r=!1,i=1/0;for(let n of t)for(let a=0,o=n.length,s=o-1;ae.y!=u.y>e.y&&e.x<(u.x-l.x)*(e.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,tnt(e,l,u))}return(r?1:-1)*Math.sqrt(i)}function Pwr(e){let t=0,r=0,i=0,n=e[0];for(let a=0,o=n.length,s=o-1;ah*24);c.startsWith("top")?f[1]-=7:c.startsWith("bottom")&&(f[1]+=7),l[u+1]=f}return new lg(l)}let a=i.get("text-variable-anchor");if(a){let s;s=e._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(t,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(t,{},r)*24,hae];let l=[];for(let u of a)l.push(u,tat(u,s));return new lg(l)}return null}function Iwr(e){var c,f;e.bucket.createArrays();let t=512*e.bucket.overscaling;e.bucket.tilePixelRatio=qr/t,e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;let r=e.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new Io(e.bucket.zoom+1),e.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new Io(e.bucket.zoom+1),e.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new Io(18))};if(e.bucket.textSizeData.kind==="composite"){let{minZoom:h,maxZoom:p}=e.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new Io(h),e.canonical),n["text-size"].possiblyEvaluate(new Io(p),e.canonical)]}if(e.bucket.iconSizeData.kind==="composite"){let{minZoom:h,maxZoom:p}=e.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new Io(h),e.canonical),n["icon-size"].possiblyEvaluate(new Io(p),e.canonical)]}let o=i.get("text-line-height")*24,s=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let h of e.bucket.features){let p=i.get("text-font").evaluate(h,{},e.canonical).join(","),d=u.evaluate(h,{},e.canonical),v=a.layoutTextSize.evaluate(h,{},e.canonical),m=a.layoutIconSize.evaluate(h,{},e.canonical),g={horizontal:{},vertical:void 0},w=h.text,_=[0,0];if(w){let A=w.toString(),T=i.get("text-letter-spacing").evaluate(h,{},e.canonical)*24,y=F3r(A)?T:0,E=i.get("text-anchor").evaluate(h,{},e.canonical),S=rat(r,h,e.canonical);if(!S){let F=i.get("text-radial-offset").evaluate(h,{},e.canonical);_=F?tat(E,[F*24,hae]):i.get("text-offset").evaluate(h,{},e.canonical).map(P=>P*24)}let C=s?"center":i.get("text-justify").evaluate(h,{},e.canonical),k=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(h,{},e.canonical)*24:1/0,D=()=>{e.bucket.allowVerticalPlacement&&Jie(A)&&(g.vertical=fB(w,e.glyphMap,e.glyphPositions,e.imagePositions,p,k,o,E,"left",y,_,2,!0,v,d))};if(!s&&S){let F=new Set;if(C==="auto")for(let R=0;R{L.x<0||L.x>=8192||L.y<0||L.y>=8192||Bwr(e,L,R,r,i,n,D,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,w,[x,x,x,x],y,l,b,A,E,v,t,a,u,c,o,h)};if(S==="line")for(let R of fae(t.geometry,0,0,qr,qr)){let L=t3(R,F),I=Ewr(L,M,T,r.vertical||m,i,24,_,e.overscaling,qr);for(let B of I){let O=m;(!O||!qwr(e,O.text,C,B))&&P(L,B)}}else if(S==="line-center"){for(let R of t.geometry)if(R.length>1){let L=t3(R,F),I=Swr(L,T,r.vertical||m,i,24,_);I&&P(L,I)}}else if(t.type==="Polygon")for(let R of lq(t.geometry,0)){let L=Dwr(R,16);P(t3(R[0],F,!0),new IT(L.x,L.y,0))}else if(t.type==="LineString")for(let R of t.geometry){let L=t3(R,F);P(L,new IT(L[0].x,L[0].y,0))}else if(t.type==="Point")for(let R of t.geometry)for(let L of R)P([L],new IT(L.x,L.y,0))}function zwr(e,t){let r=e.length,i=t==null?void 0:t.values;if((i==null?void 0:i.length)>0)for(let n=0;n32640&&Pa(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(w=[128*d.compositeTextSizes[0].evaluate(o,{},v),128*d.compositeTextSizes[1].evaluate(o,{},v)],(w[0]>32640||w[1]>32640)&&Pa(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,m,w,s,a,o,c,t,u.lineStartIndex,u.lineLength,p,v,l);for(let _ of f)h[_]=e.text.placedSymbolArray.length-1;return m.length*4}function iat(e){for(let t in e)return e[t];return null}function Bwr(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g,w,_,b,M,x,A,T,y){let E=e.addToLineVertexArray(t,r),S=s.layout.get("symbol-height-offset").evaluate(b,{},A);S>e.maxHeightOffset&&(e.maxHeightOffset=S);let C,k,D,F,P=0,R=0,L=0,I=0,B=-1,O=-1,$={},X=(0,IB.default)("");if(e.allowVerticalPlacement&&i.vertical){let ce=s.layout.get("text-rotate").evaluate(b,{},A)+90,oe=i.vertical;D=new vB(l,t,u,c,f,oe,h,p,d,ce),o&&(F=new vB(l,t,u,c,f,o,m,g,d,ce))}if(n){let ce=s.layout.get("icon-rotate").evaluate(b,{}),oe=s.layout.get("icon-text-fit")!=="none",Se=ntt(n,ce,x,oe),be=o?ntt(o,ce,x,oe):void 0;k=new vB(l,t,u,c,f,n,m,g,!1,ce),P=Se.length*4;let fe=e.iconSizeData,ee=null;fe.kind==="source"?(ee=[128*s.layout.get("icon-size").evaluate(b,{})],ee[0]>32640&&Pa(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):fe.kind==="composite"&&(ee=[128*M.compositeIconSizes[0].evaluate(b,{},A),128*M.compositeIconSizes[1].evaluate(b,{},A)],(ee[0]>32640||ee[1]>32640)&&Pa(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,Se,ee,_,w,b,0,t,E.lineStartIndex,E.lineLength,-1,A,S),B=e.icon.placedSymbolArray.length-1,be&&(R=be.length*4,e.addSymbols(e.icon,be,ee,_,w,b,2,t,E.lineStartIndex,E.lineLength,-1,A,S),O=e.icon.placedSymbolArray.length-1)}let K=Object.keys(i.horizontal);for(let ce of K){let oe=i.horizontal[ce];C||(C=(X=(0,IB.default)(oe.text),new vB(l,t,u,c,f,oe,h,p,d,s.layout.get("text-rotate").evaluate(b,{},A))));let Se=oe.positionedLines.length===1;if(L+=ott(e,t,oe,a,s,d,b,v,S,E,i.vertical?1:3,Se?K:[ce],$,B,M,A),Se)break}i.vertical&&(I+=ott(e,t,i.vertical,a,s,d,b,v,S,E,2,["vertical"],$,O,M,A));let G=C?C.boxStartIndex:e.collisionBoxArray.length,q=C?C.boxEndIndex:e.collisionBoxArray.length,J=D?D.boxStartIndex:e.collisionBoxArray.length,N=D?D.boxEndIndex:e.collisionBoxArray.length,V=k?k.boxStartIndex:e.collisionBoxArray.length,Y=k?k.boxEndIndex:e.collisionBoxArray.length,H=F?F.boxStartIndex:e.collisionBoxArray.length,j=F?F.boxEndIndex:e.collisionBoxArray.length,Q=-1,te=(ce,oe)=>ce!=null&&ce.circleDiameter?Math.max(ce.circleDiameter,oe):oe;Q=te(C,Q),Q=te(D,Q),Q=te(k,Q),Q=te(F,Q);let ue=+(Q>-1);ue&&(Q*=T/24),e.glyphOffsetArray.length>=e.maxGlyphs&&Pa("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),b.sortKey!==void 0&&e.addToSortKeyRanges(e.symbolInstances.length,b.sortKey);let ge=rat(s,b,A),[Ee,xe]=zwr(e.textAnchorOffsets,ge);y&&(X=Owr(X,b)),e.symbolInstances.emplaceBack(t.x,t.y,$.right>=0?$.right:-1,$.center>=0?$.center:-1,$.left>=0?$.left:-1,$.vertical||-1,B,O,X,G,q,J,N,V,Y,H,j,u,L,I,P,R,ue,0,h,Q,Ee,xe,S)}function qwr(e,t,r,i){let n=e.compareText;if(!(t in n))n[t]=[];else{let a=n[t];for(let o=a.length-1;o>=0;o--)if(i.dist(a[o])e&&i in e?String(e[i]):"")}function $wr(e,t,r,i=1){var a;let n=(a=e.get("icon-padding").evaluate(t,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}function oat(e){let t=[],r=e.id;return r===void 0&&t.push(new ri(`layers.${r}`,null,'missing required property "id"')),e.render===void 0&&t.push(new ri(`layers.${r}`,null,'missing required method "render"')),e.renderingMode&&e.renderingMode!=="2d"&&e.renderingMode!=="3d"&&t.push(new ri(`layers.${r}`,null,'property "renderingMode" must be either "2d" or "3d"')),t}function Lq(e,t){if(e.type==="custom")return new Zwr(e,t);switch(e.type){case"background":return new Xwr(e,t);case"circle":return new qbr(e,t);case"color-relief":return new Ybr(e,t);case"fill":return new M_r(e,t);case"fill-extrusion":return new G_r(e,t);case"heatmap":return new Ubr(e,t);case"hillshade":return new Hbr(e,t);case"line":return new t3r(e,t);case"raster":return new rbr(e,t);case"symbol":return new jwr(e,t)}}function Qwr(e,t,r){return!(e<0||e>25||r<0||r>=2**e||t<0||t>=2**e)}function pae(e,t){let{x:r,y:i}=Mo.fromLngLat(t);return!(e<0||e>25||i<0||i>=1||r<0||r>=1)}function n3(e,t,r,i,n){e*=2,e<0&&(e=e*-1-1);let a=1<0;n--){let a=1<>>0;return((t&255)<<24|(t&65280)<<8|t>>>8&65280|t>>>24&255)>>>0}function o5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n]=o>>>30&3}function s5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(o&1)<<2)&7,r[n++]=o>>>1&7,r[n++]=o>>>4&7,r[n++]=o>>>7&7,r[n++]=o>>>10&7,r[n++]=o>>>13&7,r[n++]=o>>>16&7,r[n++]=o>>>19&7,r[n++]=o>>>22&7,r[n++]=o>>>25&7,r[n++]=o>>>28&7,r[n++]=(o>>>31|(s&3)<<1)&7,r[n++]=s>>>2&7,r[n++]=s>>>5&7,r[n++]=s>>>8&7,r[n++]=s>>>11&7,r[n++]=s>>>14&7,r[n++]=s>>>17&7,r[n++]=s>>>20&7,r[n++]=s>>>23&7,r[n++]=s>>>26&7,r[n]=s>>>29&7}function l5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function u5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(o&7)<<2)&31,r[n++]=o>>>3&31,r[n++]=o>>>8&31,r[n++]=o>>>13&31,r[n++]=o>>>18&31,r[n++]=o>>>23&31,r[n++]=(o>>>28|(s&1)<<4)&31,r[n++]=s>>>1&31,r[n++]=s>>>6&31,r[n++]=s>>>11&31,r[n++]=s>>>16&31,r[n++]=s>>>21&31,r[n++]=s>>>26&31,r[n++]=(s>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function c5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(o&15)<<2)&63,r[n++]=o>>>4&63,r[n++]=o>>>10&63,r[n++]=o>>>16&63,r[n++]=o>>>22&63,r[n++]=(o>>>28|(s&3)<<4)&63,r[n++]=s>>>2&63,r[n++]=s>>>8&63,r[n++]=s>>>14&63,r[n++]=s>>>20&63,r[n++]=s>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(c&3)<<4)&63,r[n++]=c>>>2&63,r[n++]=c>>>8&63,r[n++]=c>>>14&63,r[n++]=c>>>20&63,r[n]=c>>>26&63}function f5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(o&7)<<4)&127,r[n++]=o>>>3&127,r[n++]=o>>>10&127,r[n++]=o>>>17&127,r[n++]=o>>>24&127,r[n++]=(o>>>31|(s&63)<<1)&127,r[n++]=s>>>6&127,r[n++]=s>>>13&127,r[n++]=s>>>20&127,r[n++]=(s>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(c&1)<<6)&127,r[n++]=c>>>1&127,r[n++]=c>>>8&127,r[n++]=c>>>15&127,r[n++]=c>>>22&127,r[n++]=(c>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n]=f>>>25&127}function h5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n]=h>>>24&255}function d5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,p=e[t+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(o&15)<<5)&511,r[n++]=o>>>4&511,r[n++]=o>>>13&511,r[n++]=o>>>22&511,r[n++]=(o>>>31|(s&255)<<1)&511,r[n++]=s>>>8&511,r[n++]=s>>>17&511,r[n++]=(s>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(c&3)<<7)&511,r[n++]=c>>>2&511,r[n++]=c>>>11&511,r[n++]=c>>>20&511,r[n++]=(c>>>29|(f&63)<<3)&511,r[n++]=f>>>6&511,r[n++]=f>>>15&511,r[n++]=(f>>>24|(h&1)<<8)&511,r[n++]=h>>>1&511,r[n++]=h>>>10&511,r[n++]=h>>>19&511,r[n++]=(h>>>28|(p&31)<<4)&511,r[n++]=p>>>5&511,r[n++]=p>>>14&511,r[n]=p>>>23&511}function p5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,p=e[t+8]>>>0,d=e[t+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(o&255)<<2)&1023,r[n++]=o>>>8&1023,r[n++]=o>>>18&1023,r[n++]=(o>>>28|(s&63)<<4)&1023,r[n++]=s>>>6&1023,r[n++]=s>>>16&1023,r[n++]=(s>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=c>>>0&1023,r[n++]=c>>>10&1023,r[n++]=c>>>20&1023,r[n++]=(c>>>30|(f&255)<<2)&1023,r[n++]=f>>>8&1023,r[n++]=f>>>18&1023,r[n++]=(f>>>28|(h&63)<<4)&1023,r[n++]=h>>>6&1023,r[n++]=h>>>16&1023,r[n++]=(h>>>26|(p&15)<<6)&1023,r[n++]=p>>>4&1023,r[n++]=p>>>14&1023,r[n++]=(p>>>24|(d&3)<<8)&1023,r[n++]=d>>>2&1023,r[n++]=d>>>12&1023,r[n]=d>>>22&1023}function v5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,p=e[t+8]>>>0,d=e[t+9]>>>0,v=e[t+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(o&1)<<10)&2047,r[n++]=o>>>1&2047,r[n++]=o>>>12&2047,r[n++]=(o>>>23|(s&3)<<9)&2047,r[n++]=s>>>2&2047,r[n++]=s>>>13&2047,r[n++]=(s>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(c&31)<<6)&2047,r[n++]=c>>>5&2047,r[n++]=c>>>16&2047,r[n++]=(c>>>27|(f&63)<<5)&2047,r[n++]=f>>>6&2047,r[n++]=f>>>17&2047,r[n++]=(f>>>28|(h&127)<<4)&2047,r[n++]=h>>>7&2047,r[n++]=h>>>18&2047,r[n++]=(h>>>29|(p&255)<<3)&2047,r[n++]=p>>>8&2047,r[n++]=p>>>19&2047,r[n++]=(p>>>30|(d&511)<<2)&2047,r[n++]=d>>>9&2047,r[n++]=d>>>20&2047,r[n++]=(d>>>31|(v&1023)<<1)&2047,r[n++]=v>>>10&2047,r[n]=v>>>21&2047}function g5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,p=e[t+8]>>>0,d=e[t+9]>>>0,v=e[t+10]>>>0,m=e[t+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(o&15)<<8)&4095,r[n++]=o>>>4&4095,r[n++]=o>>>16&4095,r[n++]=(o>>>28|(s&255)<<4)&4095,r[n++]=s>>>8&4095,r[n++]=s>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(c&255)<<4)&4095,r[n++]=c>>>8&4095,r[n++]=c>>>20&4095,r[n++]=f>>>0&4095,r[n++]=f>>>12&4095,r[n++]=(f>>>24|(h&15)<<8)&4095,r[n++]=h>>>4&4095,r[n++]=h>>>16&4095,r[n++]=(h>>>28|(p&255)<<4)&4095,r[n++]=p>>>8&4095,r[n++]=p>>>20&4095,r[n++]=d>>>0&4095,r[n++]=d>>>12&4095,r[n++]=(d>>>24|(v&15)<<8)&4095,r[n++]=v>>>4&4095,r[n++]=v>>>16&4095,r[n++]=(v>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function m5r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,p=e[t+8]>>>0,d=e[t+9]>>>0,v=e[t+10]>>>0,m=e[t+11]>>>0,g=e[t+12]>>>0,w=e[t+13]>>>0,_=e[t+14]>>>0,b=e[t+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=w>>>0&65535,r[n++]=w>>>16&65535,r[n++]=_>>>0&65535,r[n++]=_>>>16&65535,r[n++]=b>>>0&65535,r[n]=b>>>16&65535}function y5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0;r[n++]=s>>>0&1,r[n++]=s>>>1&1,r[n++]=s>>>2&1,r[n++]=s>>>3&1,r[n++]=s>>>4&1,r[n++]=s>>>5&1,r[n++]=s>>>6&1,r[n++]=s>>>7&1,r[n++]=s>>>8&1,r[n++]=s>>>9&1,r[n++]=s>>>10&1,r[n++]=s>>>11&1,r[n++]=s>>>12&1,r[n++]=s>>>13&1,r[n++]=s>>>14&1,r[n++]=s>>>15&1,r[n++]=s>>>16&1,r[n++]=s>>>17&1,r[n++]=s>>>18&1,r[n++]=s>>>19&1,r[n++]=s>>>20&1,r[n++]=s>>>21&1,r[n++]=s>>>22&1,r[n++]=s>>>23&1,r[n++]=s>>>24&1,r[n++]=s>>>25&1,r[n++]=s>>>26&1,r[n++]=s>>>27&1,r[n++]=s>>>28&1,r[n++]=s>>>29&1,r[n++]=s>>>30&1,r[n++]=s>>>31&1}}function x5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0;r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n++]=s>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function b5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0;r[n++]=s>>>0&7,r[n++]=s>>>3&7,r[n++]=s>>>6&7,r[n++]=s>>>9&7,r[n++]=s>>>12&7,r[n++]=s>>>15&7,r[n++]=s>>>18&7,r[n++]=s>>>21&7,r[n++]=s>>>24&7,r[n++]=s>>>27&7,r[n++]=(s>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function _5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0;r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=c>>>0&15,r[n++]=c>>>4&15,r[n++]=c>>>8&15,r[n++]=c>>>12&15,r[n++]=c>>>16&15,r[n++]=c>>>20&15,r[n++]=c>>>24&15,r[n++]=c>>>28&15}}function w5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0;r[n++]=s>>>0&31,r[n++]=s>>>5&31,r[n++]=s>>>10&31,r[n++]=s>>>15&31,r[n++]=s>>>20&31,r[n++]=s>>>25&31,r[n++]=(s>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(c&15)<<1)&31,r[n++]=c>>>4&31,r[n++]=c>>>9&31,r[n++]=c>>>14&31,r[n++]=c>>>19&31,r[n++]=c>>>24&31,r[n++]=(c>>>29|(f&3)<<3)&31,r[n++]=f>>>2&31,r[n++]=f>>>7&31,r[n++]=f>>>12&31,r[n++]=f>>>17&31,r[n++]=f>>>22&31,r[n++]=f>>>27&31}}function T5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0;r[n++]=s>>>0&63,r[n++]=s>>>6&63,r[n++]=s>>>12&63,r[n++]=s>>>18&63,r[n++]=s>>>24&63,r[n++]=(s>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=c>>>0&63,r[n++]=c>>>6&63,r[n++]=c>>>12&63,r[n++]=c>>>18&63,r[n++]=c>>>24&63,r[n++]=(c>>>30|(f&15)<<2)&63,r[n++]=f>>>4&63,r[n++]=f>>>10&63,r[n++]=f>>>16&63,r[n++]=f>>>22&63,r[n++]=(f>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n++]=h>>>26&63}}function A5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0,p=e[a++]>>>0;r[n++]=s>>>0&127,r[n++]=s>>>7&127,r[n++]=s>>>14&127,r[n++]=s>>>21&127,r[n++]=(s>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(c&3)<<5)&127,r[n++]=c>>>2&127,r[n++]=c>>>9&127,r[n++]=c>>>16&127,r[n++]=c>>>23&127,r[n++]=(c>>>30|(f&31)<<2)&127,r[n++]=f>>>5&127,r[n++]=f>>>12&127,r[n++]=f>>>19&127,r[n++]=(f>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(p&15)<<3)&127,r[n++]=p>>>4&127,r[n++]=p>>>11&127,r[n++]=p>>>18&127,r[n++]=p>>>25&127}}function M5r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0,p=e[a++]>>>0,d=e[a++]>>>0;r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255}}function S5r(e,t,r,i){let n=i,a=t;for(let o=0;o<128;o++){let s=e[a++]>>>0;r[n++]=s&65535,r[n++]=s>>>16&65535}}function E5r(e,t,r,i,n){let a=ane[n]>>>0,o=t,s=0,l=e[o]>>>0,u=i;for(let c=0;c<8;c++){for(let f=0;f<32;f++)if(s+n<=32){let h=l>>>s&a;r[u+f]=h|0,s+=n,s===32&&(s=0,o++,f!==31&&(l=e[o]>>>0))}else{let h=32-s,p=l>>>s;o++,l=e[o]>>>0;let d=n-h,v=-1>>>32-d>>>0,m=(p|(l&v)<>>0)}}function dat(){let e=new Uint8Array(k5r);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function C5r(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);let t=Math.max(16,e|0);return{encodedWords:new Uint32Array(t),decoderWorkspace:dat()}}function D5r(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,t*2));return e.encodedWords=r,r}function F5r(e,t,r,i){i.byteContainer.length>>2;if(n.byteOffset&3)for(let s=0;s>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let s=i.byteContainerI32;(!s||s.buffer!==n.buffer||s.byteOffset!==n.byteOffset||s.length>>2)),s.set(e.subarray(t,t+a))}let o=r&3;if(o>0){let s=e[t+a|0]|0,l=a<<2;for(let u=0;u>>(u<<3)&255}return n}function L5r(e,t,r){let i=e[t++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let o=e[t++]>>>0,s=n5r(o),l=o*a+31>>>5;if(t+l>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${o}, streamWordIndex=${t}, needWords=${l}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=n[a];(!u||u.length>>5)|0,r.exceptionSizes[a]=o}return t}function P5r(e,t,r,i,n){switch(n){case 1:y5r(e,t,r,i);break;case 2:x5r(e,t,r,i);break;case 3:b5r(e,t,r,i);break;case 4:_5r(e,t,r,i);break;case 5:w5r(e,t,r,i);break;case 6:T5r(e,t,r,i);break;case 7:A5r(e,t,r,i);break;case 8:M5r(e,t,r,i);break;case 16:S5r(e,t,r,i);break;default:E5r(e,t,r,i,n)}return t+(n<<3)|0}function I5r(e,t,r,i){if(r+2>t)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let n=e[r++],a=e[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}function R5r(e,t,r,i,n,a){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let o=e[r++];if(o32)throw Error(`FastPFOR decode: invalid maxBits=${o} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let s=o-i|0;if(s<1||s>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${a} (bitWidth=${i}, maxBits=${o})`);if(r+n>t)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${t-r})`);return{maxBits:o,exceptionBitWidth:s,bytePosIn:r}}function z5r(e,t,r,i,n,a,o,s,l){let{maxBits:u,exceptionBitWidth:c,bytePosIn:f}=R5r(n,a,o,r,i,l);if(o=f,c===1){let m=1<v)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${c} (ptr=${d}, need ${i}, size=${v}) at block ${l}`);for(let m=0;m0&&(f=z5r(n,m,d,v,s,l,f,u,h))}if(c!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${t}, packedStart=${r}, consumedPackedEnd=${c}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${e.length})`)}function q5r(e,t,r,i,n,a){let o=r|0,s=e[o]|0;if(s<=0||o+s>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${o} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=o+1|0,u=o+s|0,c=e[u]>>>0,f=c+3>>>2,h=u+1,p=h+f;if(p>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${f}, pageStart=${o}, packedEnd=${u}, byteContainerStart=${h}) causes bitmapPos=${p} out of bounds (encoded.length=${e.length})`);let d=F5r(e,h,c,a),v=c,m=L5r(e,p,a);return a.dataPointers.fill(0),B5r(e,o,l,u,t,i|0,n/256|0,d,v,a),m}function O5r(e,t,r,i,n,a){let o=i+Tae(n,256),s=i,l=r;for(;s!==o;){let u=Math.min(one,o-s);l=q5r(e,t,l,s,u,a),s=s+u|0}return l}function N5r(e,t,r,i,n,a){if(a===0)return t;let o=0,s=t,l=t+r,u=n,c=n,f=n+a,h=0,p=0;for(;s>>o&255;if(o+=8,s+=o>>>5,o&=31,h|=(d&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${p}, partial=${h}, decoded=${c-u}/${a}, inPos=${s}, inEnd=${l})`)}if(c!==f)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-u}, expected=${a}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`);return s}function U5r(e,t,r){let i=0,n=0,a=new Uint32Array(t),o=r!=null?r:dat();if(e.length>0){let u=e[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=O5r(e,a,i,n,u,o),n=n+u|0}let s=e.length-i|0,l=t-n|0;return N5r(e,i,s,a,n,l),a}function V5r(e,t,r,i,n){switch(n){case 2:o5r(e,t,r,i);return;case 3:s5r(e,t,r,i);return;case 4:l5r(e,t,r,i);return;case 5:u5r(e,t,r,i);return;case 6:c5r(e,t,r,i);return;case 7:f5r(e,t,r,i);return;case 8:h5r(e,t,r,i);return;case 9:d5r(e,t,r,i);return;case 10:p5r(e,t,r,i);return;case 11:v5r(e,t,r,i);return;case 12:g5r(e,t,r,i);return;case 16:m5r(e,t,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=e[t+u|0]|0;return}let a=ane[n]>>>0,o=t,s=0,l=e[o]>>>0;for(let u=0;u<32;u++)if(s+n<=32){let c=l>>>s&a;r[i+u]=c|0,s+=n,s===32&&(s=0,o++,u!==31&&(l=e[o]>>>0))}else{let c=32-s,f=l>>>s;o++,l=e[o]>>>0;let h=ane[n-c]>>>0,p=(f|(l&h)<e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let n=Math.floor(r/4),a=r%4!=0,o=a?n+1:n;if(i.length0){let s=e.byteOffset+t;if(s&3)for(let l=0;l=64)throw Error("Varint too long")}return t.set(n),r}function j5r(e,t,r){let i=new Float64Array(r);for(let n=0;n>4,n<128||(n=t[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=t[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(e>>>0);throw Error("Expected varint not more than 10 bytes")}function Y5r(e,t,r,i){return X5r(e,t,r,i,C5r(r>>>2))}function X5r(e,t,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let o=r>>>2,s=D5r(n,o);G5r(e,a,r,s);let l=U5r(s.subarray(0,o),t,n.decoderWorkspace);return i.add(r),l}function Ha(e){return e>>>1^-(e&1)}function df(e){return e>>BigInt(1)^-(e&BigInt(1))}function ix(e){return e%2==1?(e+1)/-2:e/2}function Z5r(e){let t=new Int32Array(e.length);for(let r=0;r=4)for(;i=4)for(;i=4)for(;r=4)for(let i=e[0];r=4)for(;i=4)for(;l>>0;for(let r=1;r>>0;return t}function ptt(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,df(e[0]));for(let r=1;r>>0,t[1]=Ha(e[1])>>>0;for(let r=2;r>>0,t[r+1]=t[r-1]+Ha(e[r+1])>>>0;return t}function f4r(e,t,r,i){let n=vat(e,t,r,i);return new Uint32Array(n)}function h4r(e){return e[1]}function d4r(e){return Ha(e[1])}function p4r(e){if(e.length===2){let t=Ha(e[1]);return[t,t]}return[Ha(e[2]),Ha(e[3])]}function v4r(e){return e[1]}function g4r(e){return df(e[1])}function m4r(e){if(e.length===2){let t=df(e[1]);return[t,t]}return[df(e[2]),df(e[3])]}function Zs(e,t){let r=M4r(e,t);return r.logicalLevelTechnique1===va.MORTON?T4r(r,e,t):(va.RLE===r.logicalLevelTechnique1||va.RLE===r.logicalLevelTechnique2)&&H0.NONE!==r.physicalLevelTechnique?A4r(r,e,t):r}function T4r(e,t,r){let i=pf(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:e.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function A4r(e,t,r){let i=pf(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function M4r(e,t){let r=e[t.get()],i=y4r[r>>4],n={};switch(i){case ou.DATA:n={dictionaryType:b4r[r&15]};break;case ou.OFFSET:n={offsetType:_4r[r&15]};break;case ou.LENGTH:n={lengthType:w4r[r&15]}}t.increment();let a=e[t.get()],o=vtt[a>>5],s=vtt[a>>2&7],l=x4r[a&3];t.increment();let u=pf(e,t,2),c=u[0],f=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:o,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:c,byteLength:f,decompressedCount:c}}function x3(e,t,r){if(!t)return e;let i=t.size(),n=e.constructor,a=new n(i),o=0;for(let s=0;s=o);){let s=e[i.increment()];if(s<=127){let l=s+3,u=e[i.increment()],c=Math.min(a+l,t);n.fill(u,a,c),a=c}else{let l=256-s;for(let u=0;u=12?D4r.decode(e.subarray(t,r)):F4r(e,t,r)}function F4r(e,t,r){let i="",n=t;for(;n239?4:a>223?3:a>191?2:1;if(n+s>r)break;let l,u,c;s===1?a<128&&(o=a):s===2?(l=e[n+1],(l&192)==128&&(o=(a&31)<<6|l&63,o<=127&&(o=null))):s===3?(l=e[n+1],u=e[n+2],(l&192)==128&&(u&192)==128&&(o=(a&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(l=e[n+1],u=e[n+2],c=e[n+3],(l&192)==128&&(u&192)==128&&(c&192)==128&&(o=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,i+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),i+=String.fromCharCode(o),n+=s}return i}function NB(e,t,r,i,n){return z4r(r6(e,t,r),r,i,n)}function hf(e,t,r,i,n){return B4r(r6(e,t,r),r,i,n)}function nx(e,t,r){return O4r(r6(e,t,r),r)}function r6(e,t,r){let i=r.physicalLevelTechnique;switch(i){case H0.FAST_PFOR:return Y5r(e,r.numValues,r.byteLength,t);case H0.VARINT:return pf(e,t,r.numValues);case H0.NONE:return k4r(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function qC(e,t,r){let i=r.physicalLevelTechnique;switch(i){case H0.VARINT:return Aae(e,t,r.numValues);case H0.NONE:return C4r(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function L4r(e,t,r){let i=r6(e,t,r);return i.length===1?Ha(i[0]):d4r(i)}function Eae(e,t,r){let i=r6(e,t,r);return i.length===1?r.logicalLevelTechnique1===va.DELTA?Ha(i[0]):i[0]:h4r(i)}function xat(e,t,r){return p4r(r6(e,t,r))}function bat(e,t,r){return m4r(Aae(e,t,r.numValues))}function _at(e,t,r,i){return Tat(qC(e,t,r),r,i)}function kae(e,t,r,i){return Aat(qC(e,t,r),r,i)}function P4r(e,t,r,i){let n=I4r(e,t,r,!1);return i?x3(n,i,0):n}function I4r(e,t,r,i){if(r.physicalLevelTechnique===H0.VARINT)return q4r(j5r(e,t,r.numValues),r,i);let n=qC(e,t,r),a=i?Tat(n,r):Aat(n,r);return Float64Array.from(a,Number)}function R4r(e,t,r){let i=qC(e,t,r);return i.length===1?df(i[0]):g4r(i)}function wat(e,t,r){let i=qC(e,t,r);return i.length===1?r.logicalLevelTechnique1===va.DELTA?df(i[0]):i[0]:v4r(i)}function z4r(e,t,r,i){let n;switch(t.logicalLevelTechnique1){case va.DELTA:if(t.logicalLevelTechnique2===va.RLE){let a=t;if(!i)return l4r(e,a.runs,a.numRleValues);e=sne(e,a.runs,a.numRleValues),n=ftt(e)}else n=ftt(e);break;case va.RLE:n=e4r(e,t.runs,t.numRleValues);break;case va.MORTON:Mae(e),n=new Int32Array(e);break;case va.COMPONENTWISE_DELTA:if(r&&!i)return vat(e,r.scale,r.min,r.max);n=n4r(e);break;case va.NONE:n=Z5r(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return i?x3(n,i,0):n}function B4r(e,t,r,i){let n;switch(t.logicalLevelTechnique1){case va.DELTA:if(t.logicalLevelTechnique2===va.RLE){let a=t;n=dtt(sne(e,a.runs,a.numRleValues))}else n=dtt(e);break;case va.RLE:n=sne(e,t.runs,t.numRleValues);break;case va.MORTON:Mae(e),n=e;break;case va.COMPONENTWISE_DELTA:n=r&&!i?f4r(e,r.scale,r.min,r.max):c4r(e);break;case va.NONE:n=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return i?x3(n,i,0):n}function Tat(e,t,r){let i;switch(t.logicalLevelTechnique1){case va.DELTA:if(t.logicalLevelTechnique2===va.RLE){let n=t;if(!r)return u4r(e,n.runs,n.numRleValues);e=lne(e,n.runs,n.numRleValues),i=htt(e)}else i=htt(e);break;case va.RLE:i=t4r(e,t.runs,t.numRleValues);break;case va.NONE:i=K5r(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?x3(i,r,BigInt(0)):i}function Aat(e,t,r){let i;switch(t.logicalLevelTechnique1){case va.DELTA:if(t.logicalLevelTechnique2===va.RLE){let n=t;i=ptt(lne(e,n.runs,n.numRleValues))}else i=ptt(e);break;case va.RLE:i=lne(e,t.runs,t.numRleValues);break;case va.NONE:i=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?x3(i,r,BigInt(0)):i}function q4r(e,t,r){switch(t.logicalLevelTechnique1){case va.DELTA:if(t.logicalLevelTechnique2===va.RLE){let i=t;e=pat(e,i.runs,i.numRleValues)}return Q5r(e),e;case va.RLE:return U4r(e,t,r);case va.NONE:return r&&J5r(e),e;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}}function O4r(e,t){if(t.logicalLevelTechnique1===va.DELTA&&t.logicalLevelTechnique2===va.NONE)return a4r(e);if(t.logicalLevelTechnique1===va.RLE&&t.logicalLevelTechnique2===va.NONE){let r=t;return s4r(e,r.runs,r.numRleValues)}if(t.logicalLevelTechnique1===va.NONE&&t.logicalLevelTechnique2===va.NONE){i4r(e);let r=new Uint32Array(t.numValues+1);return r[0]=0,r.set(e,1),r}if(t.logicalLevelTechnique1===va.DELTA&&t.logicalLevelTechnique2===va.RLE){let r=t,i=o4r(e,r.runs,r.numRleValues);return Mae(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function Iq(e,t,r,i,n="int32"){let a=e.logicalLevelTechnique1;if(a===va.RLE)return e.runs===1?Bs.CONST:Bs.FLAT;if(a!==va.DELTA||e.logicalLevelTechnique2!==va.RLE)return e.numValues===1?Bs.CONST:Bs.FLAT;let o=t instanceof Lv?t.size():t,s=e;if(s.numRleValues!==o)return Bs.FLAT;if(s.runs===1)return Bs.SEQUENCE;if(s.runs!==2)return e.numValues===1?Bs.CONST:Bs.FLAT;let l=i.get();if(e.physicalLevelTechnique===H0.VARINT)return N4r(r,i,n)?Bs.SEQUENCE:e.numValues===1?Bs.CONST:Bs.FLAT;let u=i.get(),c=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),c[2]===2&&c[3]===2?Bs.SEQUENCE:e.numValues===1?Bs.CONST:Bs.FLAT}function N4r(e,t,r){let i=new fat(t.get());if(r==="int64"){let a=Aae(e,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=pf(e,i,4);return n[2]===2&&n[3]===2}function U4r(e,t,r){return r?r4r(e,t.runs,t.numRleValues):pat(e,t.runs,t.numRleValues)}function Cae(e,t,r){return{x:gtt(e,t)-r,y:gtt(e>>1,t)-r}}function gtt(e,t){let r=0;for(let i=0;i>i;return r}function V4r(e){let t=Array(e.numGeometries),r=1,i=1,n=1,a=0,o=0,s=0,l=e.mortonSettings,u=e.topologyVector,c=u.geometryOffsets,f=u.partOffsets,h=u.ringOffsets,p=e.vertexOffsets,d=!p||p.length===0,v=e.containsPolygonGeometry(),m=e.vertexBuffer;for(let g=0;g[M]),r+=_,i+=_}break;case qc.LINESTRING:{let _;v?(_=h[i]-h[i-1],i++):_=f[r]-f[r-1],r++;let b;d?(b=_T(m,o,_,!1),o+=_*2):(b=J_(e.vertexBufferType,m,p,s,_,!1,l),s+=_),t[a++]=[b],c&&n++}break;case qc.POLYGON:{let _=f[r]-f[r-1];r++;let b=Array(_-1),M,x=h[i]-h[i-1];if(i++,d){M=_T(m,o,x,!0),o+=x*2;for(let A=0;Ar?t[a++]:1);return i}function btt(e,t,r,i){let n=new Uint32Array(t[t.length-1]+1),a=0;n[0]=a;let o=1,s=0;for(let l=0;l0;)n[a++]=e[u++]}}return n}function Iat(e,t,r,i,n){var p,d;let a,o,s,l,u,c=n,f,h;for(let v=0;v1&&!p.nullable||d===1&&p.nullable)throw Error(`The number of streams for the child field ${p.name} does not match its nullability. nullibilty: ${p.nullable}, numStreams: ${d}`);let m;if(p.nullable){let w=Zs(e,t);m=new Lv(t6(e,w.numValues,w.byteLength,t),w.numValues)}let g=hf(e,t,Zs(e,t),void 0,m);if(s){if(!o)throw Error(`Incomplete shared FSST dictionary for column "${v}"`);c[h++]=new Pat(v,g,n,a,o,s,m,f)}else c[h++]=new RT(v,g,n,a,m)}return c}function sTr(e,t,r,i){let n=lTr(r);if(i===0)return n.map(c=>new wtt(c,[]));let a=uTr(e,t,i),o=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,s=[],l=0,u=0;for(let c=0;c{var i;return e.name+((i=r.name)!=null?i:"")})}function uTr(e,t,r){let i=e[t.get()];t.add(1);let n=hf(e,t,Zs(e,t)),a=r-1,o=[];i&og.STRING&&(a-=cTr(e,t,o)),a-=fTr(e,t,i,o),a-=hTr(e,t,i,o);let s,l=0;if(i&og.PRESENCE){let c=dTr(e,t);s=c.value,l=c.count,a--}let u=new Uint32Array;if(a>0&&(u=hf(e,t,Zs(e,t)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:o,presentStream:s,presentCount:l,flattenedValues:u}}function cTr(e,t,r){let i=e[t.get()];t.add(1);let n=Iat("",e,t,i);if(n)for(let a=0;aa.length)throw Error("Merged map counts underflow while decoding child streams");let p=Array(r),d=i,v=n;for(let w=0;wo.length)throw Error("Map value stream underflow while decoding feature payload");let b=vTr(o,v,_,l);p[w]=b.value,v=b.nextIndex}let m=0;for(let w=i;w=r)throw Error("Unexpected end of map value stream");let n=e[t];if(n===ox.FALSE)return{value:!1,nextIndex:t+1};if(n===ox.TRUE)return{value:!0,nextIndex:t+1};if(n===ox.START_MAP){let a=Ttt(e,t,r);return{value:Rat(e,t+2,a,i).value,nextIndex:a}}if(n===ox.START_LIST){let a=Ttt(e,t,r),o=[],s=t+2;for(;s=r)throw Error("Missing length for nested map/list payload");let i=e[t+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=t+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function zat(e,t){let r=e-ox.COUNT;if(r<0||r>=t.length)throw Error(`Scalar dictionary index out of range: ${e}`);return t[r]}function CT(e,t){for(let r of t)e.push(r)}function gTr(e,t,r,i,n,a){var o;return r.type==="scalarType"?a&&!a.has(r.name)?(gat(i,e,t),null):mTr(i,e,t,n,r.scalarType,r):((o=r.complexType)==null?void 0:o.physicalType)===lx.MAP?sTr(e,t,r,i):i===0?null:oTr(e,t,r,a)}function mTr(e,t,r,i,n,a){var l;let o;if(e===0)return null;if(a.nullable){let u=Zs(t,r),c=u.numValues,f=r.get(),h=t6(t,c,u.byteLength,r);r.set(f+u.byteLength),o=new Lv(h,u.numValues)}let s=o!=null?o:i;switch(n.physicalType){case xo.UINT_32:case xo.INT_32:return wTr(t,r,a,n,s);case xo.STRING:{let u=a.nullable?e-1:e;return(l=Iat(a.name,t,r,u,o))!=null?l:null}case xo.BOOLEAN:return yTr(t,r,a,i,s);case xo.UINT_64:case xo.INT_64:return _Tr(t,r,a,s,n);case xo.FLOAT:return xTr(t,r,a,s);case xo.DOUBLE:return bTr(t,r,a,s);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function yTr(e,t,r,i,n){let a=Zs(e,t),o=a.numValues,s=t.get(),l=OC(n)?n:void 0,u=t6(e,o,a.byteLength,t,l);t.set(s+a.byteLength);let c=new Lv(u,o);return new Q4r(r.name,c,n)}function xTr(e,t,r,i){let n=Zs(e,t),a=OC(i)?i:void 0,o=mat(e,t,n.numValues,a);return new eTr(r.name,o,i)}function bTr(e,t,r,i){let n=Zs(e,t),a=OC(i)?i:void 0,o=yat(e,t,n.numValues,a);return new yae(r.name,o,i)}function _Tr(e,t,r,i,n){let a=Zs(e,t),o=Iq(a,i,e,t,"int64"),s=n.physicalType===xo.INT_64;if(o===Bs.FLAT){let u=OC(i)?i:void 0,c=s?_at(e,t,a,u):kae(e,t,a,u);return new Mat(r.name,c,i)}if(o===Bs.SEQUENCE){let u=bat(e,t,a);return new Sat(r.name,u[0],u[1],a.numRleValues,s)}let l=s?R4r(e,t,a):wat(e,t,a);return new Lat(r.name,l,i,s)}function wTr(e,t,r,i,n){let a=Zs(e,t),o=Iq(a,n,e,t),s=i.physicalType===xo.INT_32;if(o===Bs.FLAT){let u=OC(n)?n:void 0,c=s?NB(e,t,a,void 0,u):hf(e,t,a,void 0,u);return new mae(r.name,c,n)}if(o===Bs.SEQUENCE){let u=xat(e,t,a);return new xae(r.name,u[0],u[1],a.numRleValues,s)}let l=s?L4r(e,t,a):Eae(e,t,a);return new bae(r.name,l,n,s)}function OC(e){return e instanceof Lv}function Bat(e){switch(e){case hc.ID:case hc.ID|hc.ID_NULLABLE:case hc.ID|hc.ID_LONG:case hc.ID|hc.ID_LONG|hc.ID_NULLABLE:return{nullable:(e&hc.ID_NULLABLE)!==0,columnScope:Ok.FEATURE,type:"scalarType",scalarType:{longID:(e&hc.ID_LONG)!==0,type:"logicalType",logicalType:cat.ID}};case hc.GEOMETRY:return{nullable:!1,columnScope:Ok.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:lx.GEOMETRY,children:[]}};case hc.STRUCT:return{nullable:!1,columnScope:Ok.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:lx.STRUCT,children:[]}};case hc.MAP:return{nullable:!0,columnScope:Ok.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:lx.MAP,children:[]}};default:return ETr(e)}}function TTr(e){return e>=hc.SCALAR_BASE}function qat(e){return e===hc.STRUCT||e===hc.MAP}function ATr(e){if(e.type==="scalarType"){let t=e.scalarType;if(t.type==="physicalType")switch(t.physicalType){case xo.BOOLEAN:case xo.INT_8:case xo.UINT_8:case xo.INT_32:case xo.UINT_32:case xo.INT_64:case xo.UINT_64:case xo.FLOAT:case xo.DOUBLE:return!1;case xo.STRING:return!0;default:return!1}if(t.type==="logicalType")return!1}else if(e.type==="complexType"){let t=e.complexType;if(t.type==="physicalType")switch(t.physicalType){case lx.GEOMETRY:case lx.STRUCT:case lx.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}function MTr(e){var t;return e.type==="scalarType"&&((t=e.scalarType)==null?void 0:t.type)==="logicalType"&&e.scalarType.logicalType===cat.ID}function STr(e){var t;return e.type==="complexType"&&((t=e.complexType)==null?void 0:t.type)==="physicalType"&&e.complexType.physicalType===lx.GEOMETRY}function ETr(e){let t;switch(e){case 10:case 11:t=xo.BOOLEAN;break;case 12:case 13:t=xo.INT_8;break;case 14:case 15:t=xo.UINT_8;break;case 16:case 17:t=xo.INT_32;break;case 18:case 19:t=xo.UINT_32;break;case 20:case 21:t=xo.INT_64;break;case 22:case 23:t=xo.UINT_64;break;case 24:case 25:t=xo.FLOAT;break;case 26:case 27:t=xo.DOUBLE;break;case 28:case 29:t=xo.STRING;break;default:return null}return{nullable:!!(e&1),columnScope:Ok.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:t}}}function Lae(e,t){let r=pf(e,t,1)[0];if(r===0)return"";let i=t.get(),n=i+r,a=e.subarray(i,n);return t.add(r),kTr.decode(a)}function CTr(e){let t=e.name,r=e.nullable;return e.type==="scalarType"?{type:"scalarField",scalarField:e.scalarType,name:t,nullable:r}:{type:"complexField",complexField:e.complexType,name:t,nullable:r}}function Oat(e,t){let r=pf(e,t,1)[0]>>>0,i=r>=hc.SCALAR_BASE?Bat(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=da(fn({},i),{name:Lae(e,t)});if(n.type==="complexType"&&qat(r)){let a=n.complexType,o=pf(e,t,1)[0]>>>0;a.children=Array(o);for(let s=0;s>>0,i=Bat(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${Att}`);let n;if(TTr(r))n=Lae(e,t);else if(r>>0,s=a.complexType;s.children=Array(o);for(let l=0;l>>0,a=pf(e,t,1)[0]>>>0;i.columns=Array(a);for(let o=0;o>>0,o=i.get()+a;if(o>e.length)throw Error(`Block overruns tile: ${o} > ${e.length}`);let s=pf(e,i,1)[0]>>>0;if(s!==1&&s!==2){i.set(o);continue}let[l,u]=FTr(e,i),c=l.featureTables[0],f=null,h=null,p=[],d=0;for(let m of c.columns){let g=m.name;if(MTr(m)){let w=null;if(m.nullable){let b=Zs(e,i),M=i.get(),x=t6(e,b.numValues,b.byteLength,i);i.set(M+b.byteLength),w=new Lv(x,b.numValues)}let _=Zs(e,i);d=w?w.size():_.decompressedCount,f=PTr(e,m,i,g,_,w!=null?w:d,r)}else if(STr(m)){let w=pf(e,i,1)[0];if(d===0){let _=i.get();d=Zs(e,i).decompressedCount,i.set(_)}t&&(t.scale=t.extent/u),h=Z4r(e,w,i,d,t)}else{let w=ATr(m)?pf(e,i,1)[0]:1;if(w===0)continue;let _=gTr(e,i,m,w,d,void 0);if(_)if(Array.isArray(_))for(let b of _)p.push(b);else p.push(_)}}let v=new i5r(c.name,h,f,p,u);n.push(v),i.set(o)}return n}function PTr(e,t,r,i,n,a,o=!1){var c;let s=(c=t.scalarType)!=null&&c.longID?xo.UINT_64:xo.UINT_32,l=typeof a=="number"?void 0:a,u=Iq(n,a,e,r,s===xo.UINT_64?"int64":"int32");if(s===xo.UINT_32)switch(u){case Bs.FLAT:return new mae(i,hf(e,r,n,void 0,l),a);case Bs.SEQUENCE:{let f=xat(e,r,n);return new xae(i,f[0],f[1],n.numRleValues,!1)}case Bs.CONST:return new bae(i,Eae(e,r,n),a,!1)}switch(u){case Bs.FLAT:return o?new yae(i,P4r(e,r,n,l),a):new Mat(i,kae(e,r,n,l),a);case Bs.SEQUENCE:{let f=bat(e,r,n);return new Sat(i,f[0],f[1],n.numRleValues,!1)}case Bs.CONST:return new Lat(i,wat(e,r,n),a,!1)}throw Error("Vector type not supported for id column.")}function qTr(e){return typeof e=="object"&&!!e&&"evaluate"in e}function Mtt(e,t,r,i,n){return QB(e,(a,o)=>{let s=t instanceof mq?t.get(o):null;return qTr(s)?s.evaluate(r,i,void 0,n):s})}function OTr(e,t){return t-e}var Eyr,Stt,kyr,Cyr,Dyr,Ett,une,Fyr,Lyr,Ak,tB,Wu,GB,Pv,cg,hC,Ntt,dne,BQe,Vtt,qr,JB,Wyr,OQe,Ire,Ktt,Jtt,Iv,trt,rrt,NQe,YT,a0,TB,zT,Zyr,mC,yC,Ane,lrt,o0,Mn,cu,urt,_r,crt,ri,xC,ki,pa,za,Dv,rq,r3,ya,Qyr,iq,bC,nq,Yk,aq,_C,oq,e2r,frt,hrt,drt,Qre,prt,t2r,r2r,o2r,l2r,Bc,aa,c2r,eie,Bm,fg,hg,op,ul,f2r,lg,ug,Gm,Ene,OT,h2r,_rt,kne,sp,Ks,Trt,iB,Im,HQe,ET,krt,Drt,m2r,y2r,x2r,b2r,_2r,w2r,zrt,I2r,R2r,z2r,B2r,q2r,O2r,Ort,N2r,U2r,V2r,sg,Fne,Wrt,XQe,Lne,Rne,fxr,zne,DT,ig,hxr,Jrt,p3,qne,One,Qk,kB,oit,kxr,net,aet,$xr,oet,Yxr,Xxr,mh,Hne,fie,Rm,DB,Io,tC,hie,MC,set,uet,Qxr,ap,mq,Pi,kn,rC,Lit,yq,dc,fet,jre,Rv,het,ebr,tbr,xq,rbr,ibr,SC,Tl,iC,FB,die,pie,vie,nC,gie,mie,yie,xie,bie,_ie,wie,Tie,Aie,LB,Mie,Sie,PB,Eie,kie,Cie,Die,Fie,Pit,Wne,Iit,Rit,zit,Bit,qit,Oit,Nit,Uit,Vit,Git,Hm,Hit,jit,abr,obr,sbr,lbr,ubr,bT,pet,cbr,fbr,hbr,vet,$it,dbr,Wit,zv,Lie,Yit,Pie,pbr,Js,vbr,gbr,mbr,ybr,IB,Xit,jm,Sn,Ni,xa,Gf,JT,$m,Yne,Xne,xbr,fp,Bk,Q_,Pm,kv,rx,Kit,Jit,Qit,l3,zie,xet,bet,Zne,wet,Rbr,Tet,zbr,Bbr,int,qbr,nnt,Aet,Obr,Nbr,Tq,Es,EC,lnt,Ubr,Met,Vbr,Gbr,unt,Hbr,Eet,jbr,$br,Tu,zm,Wbr,fnt,Ybr,qie,Xbr,aC,Oie,Uie,nu,zB,Vie,Gie,np,Sk,K_,Ek,kk,ng,a3,Aq,LT,PT,v_r,xnt,Fet,w_r,Let,T_r,A_r,bnt,M_r,$ie,S_r,E_r,lp,_nt,kC,C_r,F_r,Hf,yn,Tnt,Mo,mx,Wre,Ent,Iet,N_r,Ret,U_r,V_r,knt,G_r,W_r,Y_r,Xie,X_r,Zie,Z_r,K_r,Cnt,Bet,Dnt,qet,J_r,Oet,Q_r,Net,e3r,cB,Fnt,t3r,r3r,i3r,n3r,Vet,Lnt,qB,f3r,h3r,d3r,Het,p3r,Int,Rnt,Fk,Lk,kT,I3r,R3r,lae,uae,q3r,O3r,N3r,ene,_ri,Jet,Unt,Cq,rwr,Hnt,Qet,rtt,IT,vB,Cwr,ST,Fq,hae,Nwr,rne,ine,IC,stt,Gwr,ltt,Hwr,Xre,nat,dae,jwr,utt,Wwr,Ywr,aat,Xwr,sat,Zwr,Kwr,Jwr,lat,RC,zC,Gc,Zre,BC,r5r,gae,y3,Pq,mae,yae,uat,xae,bae,i5r,Ok,xo,lx,cat,fat,va,H0,_ae,ane,wae,one,k5r,ou,Nf,ag,ju,y4r,vtt,x4r,b4r,_4r,w4r,Bs,Lv,D4r,Mat,Sat,qc,mtt,fx,Eat,kat,Dat,Fat,Y4r,X4r,Q4r,eTr,Lat,Dae,_tt,RT,Pat,wtt,og,ox,hc,kTr,Att,Jre,ITr,RTr,zTr,BTr,Nat,Uat=Ci(()=>{Eyr=Object.create,Stt=Object.defineProperty,kyr=Object.getOwnPropertyDescriptor,Cyr=Object.getOwnPropertyNames,Dyr=Object.getPrototypeOf,Ett=Object.prototype.hasOwnProperty,une=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Fyr=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var n=Cyr(t),a=0,o=n.length,s;at[l]).bind(null,s),enumerable:!(i=kyr(t,s))||i.enumerable});return e},Lyr=(e,t,r)=>(r=e==null?{}:Eyr(Dyr(e)),Fyr(t||!e||!e.__esModule||!Ett.call(e,"default")?Stt(r,"default",{value:e,enumerable:!0}):r,e));rr.prototype={clone(){return new rr(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),r=Math.sin(e),i=t*this.x-r*this.y,n=r*this.x+t*this.y;return this.x=i,this.y=n,this},_rotateAround(e,t){let r=Math.cos(e),i=Math.sin(e),n=t.x+r*(this.x-t.x)-i*(this.y-t.y),a=t.y+i*(this.x-t.x)+r*(this.y-t.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:rr},rr.convert=function(e){if(e instanceof rr)return e;if(Array.isArray(e))return new rr(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new rr(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};Wu=typeof Float32Array<"u"?Float32Array:Array;GB=zyr;Pv=Byr;cg=jB,hC=cp;(function(){var e=Ptt();return function(t,r,i,n,a,o){var s,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,t.length):t.length,s=i;s.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(gh(e,n,a),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=1+o,BQe(i,i))}})(),(function(){var e=zQe(),t=zQe();return function(r,i,n,a,o,s){return Nk(e,i,o,s),Nk(t,n,a,s),Nk(r,e,t,2*s*(1-s)),r}})(),(function(){var e=fne();return function(t,r,i,n){return e[0]=i[0],e[3]=i[1],e[6]=i[2],e[1]=n[0],e[4]=n[1],e[7]=n[2],e[2]=-r[0],e[5]=-r[1],e[8]=-r[2],BQe(t,Gyr(t,e))}})();Vtt=Hyr;(function(){var e=XB();return function(t,r,i,n,a,o){var s,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,t.length):t.length,s=i;sZi(null,null,function*(){let r=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(r,t)}catch(i){throw Error(`Could not load image because of ${Oc(i).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),Jtt=e=>new Promise((t,r)=>{let i=new Image;i.onload=()=>{t(i),URL.revokeObjectURL(i.src),i.onload=null,window.requestAnimationFrame(()=>i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=")},i.onerror=()=>r(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 n=new Blob([new Uint8Array(e)],{type:"image/png"});i.src=URL.createObjectURL(n)});Iv=85.051129,trt={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},rrt={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0};NQe="AbortError",YT=class extends Error{constructor(e=NQe){super(e instanceof Error?e.message:e),this.name=NQe,e instanceof Error&&e.stack&&(this.stack=e.stack)}};a0={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};TB="global-dispatcher",zT=class extends Error{constructor(e,t,r,i){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=i}};Zyr=e=>{var t;return e.startsWith("file:")||((t=tq())==null?void 0:t.startsWith("file:"))&&!/^\w+:/.test(e)};mC=function(e,t){return Zi(this,null,function*(){var r,i;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let n=Tne(e.url);if(n){let a=yield n(e,t);return!a.data&&e.type==="arrayBuffer"?dn(a,{data:new ArrayBuffer(0)}):a}if(o3(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:TB},t)}if(!Zyr(e.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return Kyr(e,t);if(o3(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:TB},t)}return Jyr(e,t)})},yC=(e,t)=>mC(dn(e,{type:"json"}),t),Ane=(e,t)=>mC(dn(e,{type:"arrayBuffer"}),t);lrt=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{t.onloadstart=()=>{r(t)};for(let i of e){let n=window.document.createElement("source");Mne(i)||(t.crossOrigin="Anonymous"),n.src=i,t.appendChild(n)}})};o0=class{constructor(e,t={}){dn(this,t),this.type=e}},Mn=class extends o0{constructor(e,t={}){super("error",dn({error:e},t))}},cu=class{on(e,t){return this._listeners||(this._listeners={}),UQe(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return Rre(e,t,this._listeners),Rre(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||(this._oneTimeListeners={}),UQe(e,t,this._oneTimeListeners),this):new Promise(r=>this.once(e,r))}fire(e,t){var n,a,o,s,l,u;let r=typeof e=="string"?new o0(e,t||{}):e,i=r.type;if(this.listens(i)){r.target=this;let c=(o=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?o:[];for(let p of c)p.call(this,r);let f=(u=(l=(s=this._oneTimeListeners)==null?void 0:s[i])==null?void 0:l.slice())!=null?u:[];for(let p of f)Rre(i,p,this._oneTimeListeners),p.call(this,r);let h=this._eventedParent;h&&(dn(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),h.fire(r))}else r instanceof Mn&&console.error(r.error);return this}listens(e){var t,r,i,n,a;return!!((r=(t=this._listeners)==null?void 0:t[e])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[e])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}},urt={$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:{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"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"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","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"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"}]}}}}},_r=urt,crt=["type","source","source-layer","minzoom","maxzoom","filter","layout"],ri=class{constructor(e,t,r,i,n="error"){this.message=(e?`${e}: `:"")+r,i&&(this.identifier=i),this.severity=n,t!=null&&t.__line__&&(this.line=t.__line__)}},xC={kind:"null"},ki={kind:"number"},pa={kind:"string"},za={kind:"boolean"},Dv={kind:"color"},rq={kind:"projectionDefinition"},r3={kind:"object"},ya={kind:"value"},Qyr={kind:"error"},iq={kind:"collator"},bC={kind:"formatted"},nq={kind:"padding"},Yk={kind:"colorArray"},aq={kind:"numberArray"},_C={kind:"resolvedImage"},oq={kind:"variableAnchorOffsetCollection"};e2r=[xC,ki,pa,za,Dv,rq,bC,r3,Of(ya),nq,aq,Yk,_C,oq];frt=.96422,hrt=.82521,drt=4/29,Qre=6/29,prt=3*Qre*Qre,t2r=Math.PI/180,r2r=180/Math.PI;o2r=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};l2r={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]};aa=(Bc=class{constructor(t,r,i,n=1,a=!0){this.r=t,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[t,r,i,n]))}static parse(t){if(t instanceof Bc)return t;if(typeof t!="string")return;let r=s2r(t);if(r)return new Bc(...r,!1)}get rgb(){let{r:t,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[t/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",i2r(this.rgb))}get lab(){return this.overwriteGetter("lab",grt(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){let[t,r,i,n]=this.rgb;return`rgba(${[t,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(t,r,i,n="rgb"){switch(n){case"rgb":{let[a,o,s,l]=BT(t.rgb,r.rgb,i);return new Bc(a,o,s,l,!1)}case"hcl":{let[a,o,s,l]=t.hcl,[u,c,f,h]=r.hcl,p,d;if(!isNaN(a)&&!isNaN(u)){let _=u-a;u>a&&_>180?_-=360:u180&&(_+=360),p=a+i*_}else isNaN(a)?isNaN(u)?p=NaN:(p=u,(s===1||s===0)&&(d=c)):(p=a,(f===1||f===0)&&(d=o));let[v,m,g,w]=n2r([p,d!=null?d:sx(o,c,i),sx(s,f,i),sx(l,h,i)]);return new Bc(v,m,g,w,!1)}case"lab":{let[a,o,s,l]=mrt(BT(t.lab,r.lab,i));return new Bc(a,o,s,l,!1)}}}},Bc.black=new Bc(0,0,0,1),Bc.white=new Bc(1,1,1,1),Bc.transparent=new Bc(0,0,0,0),Bc.red=new Bc(1,0,0,1),Bc),c2r=["bottom","center","top"],eie=class{constructor(e,t,r,i,n,a){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}},Bm=class mB{constructor(t){this.sections=t}static fromString(t){return new mB([new eie(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof mB?t:mB.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}},fg=class Pk{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Pk)return t;if(typeof t=="number")return new Pk([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(let r of t)if(typeof r!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new Pk(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new Pk(BT(t.values,r.values,i))}},hg=class Ik{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Ik)return t;if(typeof t=="number")return new Ik([t]);if(Array.isArray(t)){for(let r of t)if(typeof r!="number")return;return new Ik(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new Ik(BT(t.values,r.values,i))}},op=class Rk{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Rk)return t;if(typeof t=="string"){let i=aa.parse(t);return i?new Rk([i]):void 0}if(!Array.isArray(t))return;let r=[];for(let i of t){if(typeof i!="string")return;let n=aa.parse(i);if(!n)return;r.push(n)}return new Rk(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i,n="rgb"){let a=[];if(t.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let o=0;o=s)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);let f=r.parse(l,c,a);if(!f)return null;a||(a=f.type),n.push([s,f])}return new wrt(a,i,n,r.key)}evaluate(t){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);let n=this.input.evaluate(t);if(n<=r[0])return i[0].evaluate(t);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(t):i[sq(r,n,this.key)].evaluate(t)}eachChild(t){t(this.input);for(let r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};sp=class tie{constructor(t,r,i,n,a,o){this.type=t,this.operator=r,this.interpolation=i,this.input=n,this.key=o,this.labels=[],this.outputs=[];for(let[s,l]of a)this.labels.push(s),this.outputs.push(l)}static interpolationFactor(t,r,i,n){let a=0;if(t.name==="exponential")a=Nre(r,t.base,i,n);else if(t.name==="linear")a=Nre(r,1,i,n);else if(t.name==="cubic-bezier"){let o=t.controlPoints;a=d2r(o[0],o[1],o[2],o[3])(Nre(r,1,i,n))}return a}static parse(t,r){let[i,n,a,...o]=t;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(c=>typeof c!="number"||c<0||c>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,ki),!a)return null;let s=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=Yk?l=Dv:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=c)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);let d=r.parse(f,p,l);if(!d)return null;l||(l=d.type),s.push([c,d])}return!ex(l,ki)&&!ex(l,rq)&&!ex(l,Dv)&&!ex(l,nq)&&!ex(l,aq)&&!ex(l,Yk)&&!ex(l,oq)&&!ex(l,Of(ki))?r.error(`Type ${wl(l)} is not interpolatable.`):new tie(l,i,n,a,s,r.key)}evaluate(t){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);let n=this.input.evaluate(t);if(n<=r[0])return i[0].evaluate(t);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(t);let o=sq(r,n,this.key),s=r[o],l=r[o+1],u=tie.interpolationFactor(this.interpolation,n,s,l),c=i[o].evaluate(t),f=i[o+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return sx(c,f,u);case"color":return aa.interpolate(c,f,u);case"padding":return fg.interpolate(c,f,u);case"colorArray":return op.interpolate(c,f,u);case"numberArray":return hg.interpolate(c,f,u);case"variableAnchorOffsetCollection":return lg.interpolate(c,f,u,this.key);case"array":return BT(c,f,u);case"projectionDefinition":return Gm.interpolate(c,f,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return aa.interpolate(c,f,u,"hcl");case"colorArray":return op.interpolate(c,f,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return aa.interpolate(c,f,u,"lab");case"colorArray":return op.interpolate(c,f,u,"lab")}}}eachChild(t){t(this.input);for(let r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};Ks={color:aa.interpolate,number:sx,padding:fg.interpolate,numberArray:hg.interpolate,colorArray:op.interpolate,variableAnchorOffsetCollection:lg.interpolate,array:BT},Trt=class Art{constructor(t){this.type=bC,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=t[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let o=1;o<=t.length-1;++o){let s=t[o];if(a&&typeof s=="object"&&!Array.isArray(s)){a=!1;let l=null;if(s["font-scale"]&&(l=r.parse(s["font-scale"],1,ki),!l))return null;let u=null;if(s["text-font"]&&(u=r.parse(s["text-font"],1,Of(pa)),!u))return null;let c=null;if(s["text-color"]&&(c=r.parse(s["text-color"],1,Dv),!c))return null;let f=null;if(s["vertical-align"]){if(typeof s["vertical-align"]=="string"&&!c2r.includes(s["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);if(f=r.parse(s["vertical-align"],1,pa),!f)return null}let h=n[n.length-1];h.scale=l,h.font=u,h.textColor=c,h.verticalAlign=f}else{let l=r.parse(t[o],1,ya);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Art(n)}evaluate(t){return new Bm(this.sections.map(r=>{let i=r.content.evaluate(t);return su(i)===_C?new eie("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(t):null):new eie(Vk(i),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null,r.verticalAlign?r.verticalAlign.evaluate(t):null)}))}eachChild(t){for(let r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}};iB={string:pa,number:ki,boolean:za,object:r3},Im=class Srt{constructor(t,r,i){this.type=t,this.args=r,this.key=i}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=1,n,a=t[0];if(a==="array"){let s;if(t.length>2){let u=t[1];if(typeof u!="string"||!(u in iB)||u==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);s=iB[u],i++}else s=ya;let l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);l=t[2],i++}n=Of(s,l)}else{if(!iB[a])throw Error(`Types doesn't contain name = ${a}`);n=iB[a]}let o=[];for(;it.outputDefined())}},HQe={"to-boolean":za,"to-color":Dv,"to-number":ki,"to-string":pa},ET=class Ert{constructor(t,r,i){this.type=t,this.args=r,this.key=i}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=t[0];if(!HQe[i])throw Error(`Can't parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&t.length!==2)return r.error("Expected one argument.");let n=HQe[i],a=[];for(let o=1;o4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:xrt(r[0],r[1],r[2],r[3]),!i))return new aa(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new ul(i||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(t);let n=fg.parse(r);if(n)return n}throw new ul(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(t);let n=hg.parse(r);if(n)return n}throw new ul(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(t);let n=op.parse(r);if(n)return n}throw new ul(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(t);let n=lg.parse(r);if(n)return n}throw new ul(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(t),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new ul(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return Bm.fromString(Vk(this.args[0].evaluate(t)));case"resolvedImage":return ug.fromString(Vk(this.args[0].evaluate(t)));case"projectionDefinition":{let r=this.args[0].evaluate(t);if(Gm.parse(r))return r;throw new ul(`Could not parse projectionDefinition from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}default:return Vk(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}},krt=class Crt{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(let r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);let i=[];for(let a=1;a=i.length)throw new ul(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new ul(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}},y2r=class Prt{constructor(t,r,i){this.needle=t,this.haystack=r,this.key=i,this.type=za}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ya),n=r.parse(t[2],2,ya);return!i||!n?null:Sne(i.type,[za,pa,ki,xC,ya])?new Prt(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${wl(i.type)} instead`)}evaluate(t){let r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!i3(r,["boolean","string","number","null"]))throw new ul(`Expected first argument to be of type boolean, string, number or null, but found ${wl(su(r))} instead.`,this.key);if(!i3(i,["string","array"]))throw new ul(`Expected second argument to be of type array or string, but found ${wl(su(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}},x2r=class rie{constructor(t,r,i,n){this.needle=t,this.haystack=r,this.key=i,this.fromIndex=n,this.type=ki}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ya),n=r.parse(t[2],2,ya);if(!i||!n)return null;if(!Sne(i.type,[za,pa,ki,xC,ya]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${wl(i.type)} instead`);if(t.length===4){let a=r.parse(t[3],3,ki);return a?new rie(i,n,r.key,a):null}return new rie(i,n,r.key)}evaluate(t){let r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i3(r,["boolean","string","number","null"]))throw new ul(`Expected first argument to be of type boolean, string, number or null, but found ${wl(su(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(t)),i3(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(i3(i,["array"]))return i.indexOf(r,n);throw new ul(`Expected second argument to be of type array or string, but found ${wl(su(i))} instead.`,this.key)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}},b2r=class Irt{constructor(t,r,i,n,a,o){this.inputType=t,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=o}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},o=[];for(let u=2;u2**53-1)return h.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof d=="number"&&Math.floor(d)!==d)return h.error("Numeric branch labels must be integer values.");if(!i)i=su(d);else if(h.checkSubtype(i,su(d)))return null;if(a[String(d)]!==void 0)return h.error("Branch labels must be unique.");a[String(d)]=o.length}let p=r.parse(f,u,n);if(!p)return null;n||(n=p.type),o.push(p)}let s=r.parse(t[1],1,ya);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,n);return!l||s.type.kind!=="value"&&r.concat(1).checkSubtype(i,s.type)?null:new Irt(i,n,s,a,o,l)}evaluate(t){let r=this.input.evaluate(t);return(su(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}},_2r=class Rrt{constructor(t,r,i){this.type=t,this.branches=r,this.otherwise=i}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let o=1;or.outputDefined())&&this.otherwise.outputDefined()}},w2r=class iie{constructor(t,r,i,n,a){this.type=t,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ya),n=r.parse(t[2],2,ki);if(!i||!n)return null;if(!Sne(i.type,[Of(ya),pa,ya]))return r.error(`Expected first argument to be of type array or string, but found ${wl(i.type)} instead`);if(t.length===4){let a=r.parse(t[3],3,ki);return a?new iie(i.type,i,n,r.key,a):null}return new iie(i.type,i,n,r.key)}evaluate(t){let r=this.input.evaluate(t),i=this.beginIndex.evaluate(t),n;if(this.endIndex&&(n=this.endIndex.evaluate(t)),i3(r,["string"]))return[...r].slice(i,n).join("");if(i3(r,["array"]))return r.slice(i,n);throw new ul(`Expected first argument to be of type array or string, but found ${wl(su(r))} instead.`,this.key)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}},zrt=class nie{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let o of t.slice(1)){let s=r.parse(o,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!s)return null;i||(i=s.type),a.push(s)}if(!i)throw Error("No output type");return n&&a.some(o=>Xk(n,o.type))?new nie(ya,a):new nie(i,a)}evaluate(t){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(t),r&&r instanceof ug&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}};I2r=XT("==",T2r,Brt),R2r=XT("!=",A2r,C2r),z2r=XT("<",M2r,D2r),B2r=XT(">",S2r,F2r),q2r=XT("<=",E2r,L2r),O2r=XT(">=",k2r,P2r),Ort=class Nrt{constructor(t,r,i){this.type=iq,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");let i=t[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,za);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,za);if(!a)return null;let o=null;return i.locale&&(o=r.parse(i.locale,1,pa),!o)?null:new Nrt(n,a,o)}evaluate(t){return new Ene(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}},N2r=class Urt{constructor(t,r,i,n,a,o){this.type=pa,this.number=t,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=o}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");let i=r.parse(t[1],1,ki);if(!i)return null;let n=t[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,pa),!a))return null;let o=null;if(n.currency&&(o=r.parse(n.currency,1,pa),!o))return null;let s=null;if(n.unit&&(s=r.parse(n.unit,1,pa),!s))return null;if(o&&s)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&(l=r.parse(n["min-fraction-digits"],1,ki),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,ki),!u)?null:new Urt(i,a,o,s,l,u)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}},U2r=class Vrt{constructor(t){this.type=_C,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");let i=r.parse(t[1],1,pa);return i?new Vrt(i):r.error("No image name provided.")}evaluate(t){let r=this.input.evaluate(t),i=ug.fromString(r);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(r)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}},V2r=class Grt{constructor(t,r){this.input=t,this.key=r,this.type=ki}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=r.parse(t[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${wl(i.type)} instead.`):new Grt(i,r.key):null}evaluate(t){let r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new ul(`Expected value to be of type string or array, but found ${wl(su(r))} instead.`,this.key)}eachChild(t){t(this.input)}outputDefined(){return!1}},sg=8192;Fne=class xB{constructor(t,r){this.type=za,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(qT(t[1])){let i=t[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:o,coordinates:s}=a.geometry;o==="Polygon"&&n.push(s),o==="MultiPolygon"&&n.push(...s)}if(n.length)return new xB(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new xB(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new xB(i,i)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return txr(t,this.geometries);if(t.geometryType()==="LineString")return rxr(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},Wrt=class{constructor(e=[],t=(r,i)=>ri)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;e=0)break;t[e]=t[a],e=a}t[e]=n}},XQe=Math.PI/180,Lne=class{constructor(e){let t=XQe*6378.137*1e3,r=Math.cos(e*XQe),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=t*n*r,this.ky=t*n*i*.9933056200098587}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,i=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(e,t){let r=1/0,i,n,a,o;for(let s=0;s1?(l=e[s+1][0],u=e[s+1][1]):h>0&&(l+=c/this.kx*h,u+=f/this.ky*h)),c=this.wrap(t[0]-l)*this.kx,f=(t[1]-u)*this.ky;let p=c*c+f*f;p180;)e-=360;return e}};Rne=class bB{constructor(t,r){this.type=ki,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(qT(t[1])){let i=t[1];if(i.type==="FeatureCollection")return new bB(i,i.features.map(n=>Ure(n.geometry)).flat());if(i.type==="Feature")return new bB(i,Ure(i.geometry));if("type"in i&&"coordinates"in i)return new bB(i,Ure(i))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return lxr(t,this.geometries);if(t.geometryType()==="LineString")return uxr(t,this.geometries);if(t.geometryType()==="Polygon")return cxr(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},fxr=class Xrt{constructor(t){let r=null;for(let i of t)if(!r)r=i.type;else{if(r===i.type)continue;r=ya;break}this.type=Of(r!=null?r:ya,t.length),this.arr=t}static parse(t,r){if(t.length!==2)return r.error(`'semiliteral' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!qT(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let i=t[1],n=su(i);if(n.kind==="array"){let a=i,o=r.concat(1),s=[];for(let l=0;lr.evaluate(t))}eachChild(t){this.arr.forEach(t)}outputDefined(){return this.arr.every(t=>t.outputDefined())}},zne=class Zrt{constructor(t){this.key=t,this.type=ya}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=t[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new Zrt(i):r.error(`Global state property must be string, but found ${typeof t[1]} instead.`)}evaluate(t){var i,n;let r=(i=t.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=Uk(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},DT={"==":I2r,"!=":R2r,">":B2r,"<":z2r,">=":O2r,"<=":q2r,array:Im,at:m2r,boolean:Im,case:_2r,coalesce:zrt,collator:Ort,format:Trt,image:U2r,in:y2r,"index-of":x2r,interpolate:sp,"interpolate-hcl":sp,"interpolate-lab":sp,length:V2r,let:krt,literal:OT,match:b2r,number:Im,"number-format":N2r,object:Im,semiliteral:fxr,slice:w2r,step:kne,string:Im,"to-boolean":ET,"to-color":ET,"to-number":ET,"to-string":ET,var:Drt,within:Fne,distance:Rne,"global-state":zne},ig=class extends Error{constructor(e,t){super(t),this.message=t,this.key=e}},hxr=class Krt{constructor(t,r=[]){this.parent=t,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(t){return new Krt(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw Error(`${t} not found in scope.`)}has(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1}},Jrt=class Qrt{constructor(t,r,i=[],n,a=new hxr,o=[]){this.registry=t,this.path=i,this.key=i.map(s=>`[${s}]`).join(""),this.scope=a,this.errors=o,this.expectedType=n,this._isConstant=r}parse(t,r,i,n,a={}){return r==null?this._parse(t,a):this.concat(r,i,n)._parse(t,a)}_parse(t,r){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);let i=this.key;function n(a,o,s){return s==="assert"?new Im(o,[a],i):s==="coerce"?new ET(o,[a],i):a}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let a=t[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let o=this.registry[a];if(o){let s=o.parse(t,this);if(!s)return null;if(this.expectedType){let l=this.expectedType,u=s.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")s=n(s,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))s=n(s,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(s instanceof OT)&&s.type.kind!=="resolvedImage"&&this._isConstant(s)){let l=new _rt;try{s=new OT(s.type,s.evaluate(l))}catch(u){return this.error(u.message),null}}return s}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return t===void 0?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,r,i){let n=typeof t=="number"?this.path.concat(t):this.path,a=i?this.scope.concat(i):this.scope;return new Qrt(this.registry,this._isConstant,n,r||null,a,this.errors)}error(t,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new ig(i,t))}checkSubtype(t,r){let i=Xk(t,r);return i&&this.error(i),i}},p3=class zk{constructor(t,r,i,n,a){this.name=t,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(t){return this._evaluate(t,this.args,this.key)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){let i=t[0],n=zk.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=o.filter(([u])=>!Array.isArray(u)||u.length===t.length-1),l=null;for(let[u,c]of s){l=new Jrt(r.registry,EB,r.path,null,r.scope);let f=[],h=!1;for(let p=1;ppxr(f)).join(" | "),c=[];for(let f=1;f{throw new ul(t.evaluate(e),r)}],typeof:[pa,[ya],(e,[t])=>wl(su(t.evaluate(e)))],"to-rgba":[Of(ki,4),[Dv],(e,[t])=>{let[r,i,n,a]=t.evaluate(e).rgb;return[r*255,i*255,n*255,a]}],rgb:[Dv,[ki,ki,ki],QQe],rgba:[Dv,[ki,ki,ki,ki],QQe],has:{type:za,overloads:[[[pa],(e,[t])=>eet(t.evaluate(e),e.properties())],[[pa,r3],(e,[t,r])=>eet(t.evaluate(e),r.evaluate(e))]]},get:{type:ya,overloads:[[[pa],(e,[t])=>Vre(t.evaluate(e),e.properties())],[[pa,r3],(e,[t,r])=>Vre(t.evaluate(e),r.evaluate(e))]]},"feature-state":[ya,[pa],(e,[t])=>Vre(t.evaluate(e),e.featureState||{})],properties:[r3,[],e=>e.properties()],"geometry-type":[pa,[],e=>e.geometryType()],id:[ya,[],e=>e.id()],zoom:[ki,[],e=>e.globals.zoom],"heatmap-density":[ki,[],e=>e.globals.heatmapDensity||0],elevation:[ki,[],e=>e.globals.elevation||0],"line-progress":[ki,[],e=>e.globals.lineProgress||0],accumulated:[ya,[],e=>e.globals.accumulated===void 0?null:e.globals.accumulated],"+":[ki,Z_(ki),(e,t)=>{let r=0;for(let i of t)r+=i.evaluate(e);return r}],"*":[ki,Z_(ki),(e,t)=>{let r=1;for(let i of t)r*=i.evaluate(e);return r}],"-":{type:ki,overloads:[[[ki,ki],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[ki],(e,[t])=>-t.evaluate(e)]]},"/":[ki,[ki,ki],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[ki,[ki,ki],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[ki,[],()=>Math.LN2],pi:[ki,[],()=>Math.PI],e:[ki,[],()=>Math.E],"^":[ki,[ki,ki],(e,[t,r])=>t.evaluate(e)**+r.evaluate(e)],sqrt:[ki,[ki],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[ki,[ki],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[ki,[ki],(e,[t])=>Math.log(t.evaluate(e))],log2:[ki,[ki],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[ki,[ki],(e,[t])=>Math.sin(t.evaluate(e))],cos:[ki,[ki],(e,[t])=>Math.cos(t.evaluate(e))],tan:[ki,[ki],(e,[t])=>Math.tan(t.evaluate(e))],asin:[ki,[ki],(e,[t])=>Math.asin(t.evaluate(e))],acos:[ki,[ki],(e,[t])=>Math.acos(t.evaluate(e))],atan:[ki,[ki],(e,[t])=>Math.atan(t.evaluate(e))],min:[ki,Z_(ki),(e,t)=>Math.min(...t.map(r=>r.evaluate(e)))],max:[ki,Z_(ki),(e,t)=>Math.max(...t.map(r=>r.evaluate(e)))],abs:[ki,[ki],(e,[t])=>Math.abs(t.evaluate(e))],round:[ki,[ki],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[ki,[ki],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[ki,[ki],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[za,[pa,ya],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[za,[ya],(e,[t])=>e.id()===t.value],"filter-type-==":[za,[pa],(e,[t])=>e.geometryType()===t.value],"filter-<":[za,[pa,ya],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i{let r=e.id(),i=t.value;return typeof r==typeof i&&r":[za,[pa,ya],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[za,[ya],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[za,[pa,ya],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[za,[ya],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[za,[pa,ya],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[za,[ya],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[za,[ya],(e,[t])=>{let r=t.value,i=e.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[za,[],e=>e.id()!==null&&e.id()!==void 0],"filter-type-in":[za,[Of(pa)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[za,[Of(ya)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[za,[pa,Of(ya)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[za,[pa,Of(ya)],(e,[t,r])=>dxr(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:za,overloads:[[[za,za],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[Z_(za),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:za,overloads:[[[za,za],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[Z_(za),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[za,[za],(e,[t])=>!t.evaluate(e)],"is-supported-script":[za,[pa],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[pa,[pa],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[pa,[pa],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[pa,Z_(ya),(e,t)=>t.map(r=>Vk(r.evaluate(e))).join("")],split:[Of(pa),[pa,pa],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[pa,[Of(pa),pa],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[pa,[iq],(e,[t])=>t.evaluate(e).resolvedLocale()]});qne=/^(.*)-transition$/;One=class{constructor(e,t,r,i){this.expression=e,this._warningHistory={},this._evaluator=new _rt,this._defaultValue=r?lit(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=t}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=UT(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,n,a){this._globalState&&(e=UT(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let o=this.expression.evaluate(this._evaluator);if(o==null||typeof o=="number"&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ul(`Expected value to be one of ${Object.keys(this._enumValues).map(s=>JSON.stringify(s)).join(", ")}, but found ${JSON.stringify(o)} instead.`,"");return o}catch(o){let s=o instanceof ul?o.path:"",l=`${s}|${o.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(iit(this._rootKey,s,o.message,this._defaultValue))),this._defaultValue}}};Qk=class{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!Kk(t.expression),this.globalStateRefs=AC(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=UT(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=UT(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}},kB=class{constructor(e,t,r,i,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!Kk(t.expression),this.globalStateRefs=AC(t.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=UT(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=UT(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}interpolationFactor(e,t,r){return this.interpolationType?sp.interpolationFactor(this.interpolationType,e,t,r):0}};oit=class sit{constructor(t,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,nit(r),this._parameters=t,this._specification=i,this._rootKey=r,this._defaultValue=lit(i),this._warningHistory={};let n=tit(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(t,r){try{return this._innerEvaluate(t,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(iit(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(t){return new sit(t._parameters,t._rootKey,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification,_rootKey:t._rootKey}}};kxr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};net={promoteId:Rxr};aet=1114111,$xr=/^u\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\?{1,6}))$/i;oet={"*"(){return[]},array:Vne,boolean:Fxr,number:vq,color:uie,constants:hit,enum:eC,filter:Gne,function:dit,layer:yit,object:G0,source:xit,light:bit,sky:_it,terrain:wit,projection:Vxr,projectionDefinition:Gxr,string:cx,formatted:zxr,resolvedImage:Bxr,padding:qxr,numberArray:Oxr,colorArray:Nxr,variableAnchorOffsetCollection:Uxr,sprite:Tit,state:Ait,fontFaces:Mit};V0.source=rp(tp(xit)),V0.sprite=rp(tp(Tit)),V0.glyphs=rp(tp(Sit)),V0.fontFaces=rp(tp(Mit)),V0.light=rp(tp(bit)),V0.sky=rp(tp(_it)),V0.terrain=rp(tp(wit)),V0.state=rp(tp(Ait)),V0.layer=rp(tp(yit)),V0.filter=rp(tp(Gne)),V0.paintProperty=rp(tp(git)),V0.layoutProperty=rp(tp(mit));Yxr={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},Xxr=class{constructor(e,t,r){this._rootKey=t,this._globalState=r,this.setValue(e)}evaluate(){var e;return(e=this._literalValue)!=null?e:this._compiledValue.evaluate({})}setValue(e){if(e==null||e==="visible"||e==="none"){this._literalValue=e==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let t=pq(e,this._rootKey,Yxr,this._globalState);if(t.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=AC(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};mh=V0,Hne=new Set(Object.keys(_r).filter(e=>e.startsWith("source_")).map(e=>e.slice(7).replaceAll("_","-")));fie=class kit{constructor(t,r,i){let n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;let o=new Int32Array(this.arrayBuffer);t=o[0],r=o[1],i=o[2],this.d=r+2*i;for(let u=0;u=f[p+0]&&n>=f[p+1])?(s[h]=!0,o.push(c[h])):s[h]=!1}}}_forEachCell(t,r,i,n,a,o,s,l){let u=this._convertToCellCoord(t),c=this._convertToCellCoord(r),f=this._convertToCellCoord(i),h=this._convertToCellCoord(n);for(let p=u;p<=f;p++)for(let d=c;d<=h;d++){let v=this.d*d+p;if((!l||l(this._convertFromCellCoord(p),this._convertFromCellCoord(d),this._convertFromCellCoord(p+1),this._convertFromCellCoord(d+1)))&&a.call(this,t,r,i,n,v,o,s,l))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let t=this.cells,r=3+this.cells.length+1+1,i=0;for(let o of this.cells)i+=o.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let o=0;or?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}},tC=class{constructor(e,t,r,i){this.property=e,this.value=t,this.expression=Txr(t===void 0?e.specification.default:t,r,e.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}readsGlobalState(e){let t=this.getGlobalStateRefs();return e.some(r=>t.has(r))}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}},hie=class{constructor(e,t,r){this.property=e,this.value=new tC(e,void 0,t,r)}transitioned(e,t){return t.value===this.value?t:new set(this.property,this.value,t,dn({},e.transition,this.transition),e.now)}untransitioned(){return new set(this.property,this.value,null,{},0)}},MC=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return vh(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new hie(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].value=new tC(this._values[e].property,t===null?void 0:vh(t),this._propertyRootKey(e),this._globalState)}setValues(e){for(let t in e){let r=e[t];t.endsWith("-transition")?this.setTransition(t.slice(0,-11),r):Fv(this._values[t].value.value,r)||this.setValue(t,r)}}getTransition(e){return vh(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new hie(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].transition=vh(t)||void 0}retainPriorGlobalState(e,t,r){for(let i of Object.keys(r._values))for(let n=r._values[i];n;n=n.prior){let{value:a}=n;a.property.specification.transition&&!a.isDataDriven()&&a.expression._globalState===this._globalState&&a.readsGlobalState(e)&&(n.value=new tC(a.property,a.value,this._propertyRootKey(i),t))}}applyGlobalStateChange(e,t,r,i){this.retainPriorGlobalState(e,t,r);let n=!1;for(let a of Object.keys(this._values)){let{value:o}=this._values[a];o.readsGlobalState(e)&&(this.setValue(a,o.value),n=!0)}return n?this.transitioned(i,r):r}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);r!==void 0&&(e[t]=r);let i=this.getTransition(t);i!==void 0&&(e[`${t}-transition`]=i)}return e}transitioned(e,t){let r=new uet(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(e,t._values[i]);return r}untransitioned(){let e=new uet(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}},set=class{constructor(e,t,r,i,n){this.property=e,this.value=t,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,e.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let i=e.now||0,n=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(!a)return n;if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},Lit=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,i){if(e.value!==void 0){if(e.expression.kind==="constant"){let n=e.expression.evaluate(t,null,{},r,i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new Io(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Io(Math.floor(t.zoom),t)),e.expression.evaluate(new Io(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},yq=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,i){return!!e.expression.evaluate(t,null,{},r,i)}interpolate(){return!1}},dc=class{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let t in e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let i=this.defaultPropertyValues[t]=new tC(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[t]=new hie(r,r.name,void 0);this.defaultTransitioningPropertyValues[t]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}};Hi("DataDrivenProperty",kn),Hi("DataConstantProperty",Pi),Hi("CrossFadedDataDrivenProperty",rC),Hi("CrossFadedProperty",Lit),Hi("ColorRampProperty",yq);fet=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",jre=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",Rv=class extends cu{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=Zxr(this.visibility,`layers[${this.id}].layout.visibility`,r),e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=VT(e.filter,`layers[${this.id}].filter`,r)),t.layout&&(this._unevaluatedLayout=new Qxr(t.layout,`layers[${this.id}].layout`,r)),t.paint)){this._transitionablePaint=new MC(t.paint,`layers[${this.id}].paint`,r);for(let i in e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new mq(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=VT(e,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var t;if(e==="visibility")return this.visibility;if((t=this._transitionablePaint)!=null&&t.hasProperty(e))throw Error(e+fet);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[t];for(let i of r.getGlobalStateRefs())e.add(i)}for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}getPaintAffectingGlobalStateRefs(){var t;let e=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=(t=e.get(n))!=null?t:[];a.push({name:r,value:i.value}),e.set(n,a)}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){var i;if(e==="visibility"){this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(e)){this.fire(new Mn(Error(e+fet)));return}t!=null&&this._validate(mh.layoutProperty,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){var t,r;if(e.endsWith("-transition")){let i=e.slice(0,-11);if(i==="visibility"||(t=this._unevaluatedLayout)!=null&&t.hasProperty(i))throw Error(e+jre);return this._transitionablePaint.getTransition(i)}if(e==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(e))throw Error(e+jre);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){var i;if(e==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(e))return this.fire(new Mn(Error(e+jre))),!1;if(t!=null&&this._validate(mh.paintProperty,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith("-transition"))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let n=this._transitionablePaint._values[e],a=n.property.specification["property-type"]==="cross-faded-data-driven",o=n.value.isDataDriven(),s=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(e,s,l)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&e>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}retainPriorGlobalState(e,t){var r;(r=this._transitionablePaint)==null||r.retainPriorGlobalState(e,t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){var t,r;let e={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:(t=this._unevaluatedLayout)==null?void 0:t.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(e.layout||(e.layout={}),e.layout.visibility=this.visibility),xne(e,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(e,t,r,i,n={}){return KT(this,e,{key:t,layerType:this.type,objectKey:r,value:i},n)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof ap&&NT(t.property.specification)&&(t.value.kind==="source"||t.value.kind==="composite")&&t.value.isStateDependent)return!0}return!1}},ebr=()=>het||(het=new dc({"raster-opacity":new Pi(_r.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new Pi(_r.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new Pi(_r.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new Pi(_r.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new Pi(_r.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new Pi(_r.paint_raster["raster-contrast"],"raster-contrast"),resampling:new Pi(_r.paint_raster.resampling,"resampling"),"raster-resampling":new Pi(_r.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new Pi(_r.paint_raster["raster-fade-duration"],"raster-fade-duration")})),tbr={get paint(){return ebr()}},xq=e=>e.type==="raster",rbr=class extends Rv{constructor(e,t){super(e,tbr,t)}},ibr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},SC=class{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},Tl=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};iC=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=e*2;return this.int16[i+0]=t,this.int16[i+1]=r,e}};iC.prototype.bytesPerElement=4,Hi("StructArrayLayout2i4",iC);FB=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*3;return this.int16[n+0]=t,this.int16[n+1]=r,this.int16[n+2]=i,e}};FB.prototype.bytesPerElement=6,Hi("StructArrayLayout3i6",FB);die=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=e*4;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,e}};die.prototype.bytesPerElement=8,Hi("StructArrayLayout4i8",die);pie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*6;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}};pie.prototype.bytesPerElement=12,Hi("StructArrayLayout2i4i12",pie);vie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*4,l=e*8;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=o,e}};vie.prototype.bytesPerElement=8,Hi("StructArrayLayout2i4ub8",vie);nC=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=e*2;return this.float32[i+0]=t,this.float32[i+1]=r,e}};nC.prototype.bytesPerElement=8,Hi("StructArrayLayout2f8",nC);gie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,u){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,i,n,a,o,s,l,u)}emplace(e,t,r,i,n,a,o,s,l,u,c){let f=e*10;return this.uint16[f+0]=t,this.uint16[f+1]=r,this.uint16[f+2]=i,this.uint16[f+3]=n,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint16[f+8]=u,this.uint16[f+9]=c,e}};gie.prototype.bytesPerElement=20,Hi("StructArrayLayout10ui20",gie);mie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,i,n,a,o,s)}emplace(e,t,r,i,n,a,o,s,l){let u=e*8;return this.uint16[u+0]=t,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=o,this.uint16[u+6]=s,this.uint16[u+7]=l,e}};mie.prototype.bytesPerElement=16,Hi("StructArrayLayout8ui16",mie);yie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,u,c,f,h){let p=this.length;return this.resize(p+1),this.emplace(p,e,t,r,i,n,a,o,s,l,u,c,f,h)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,p){let d=e*14,v=e*7;return this.int16[d+0]=t,this.int16[d+1]=r,this.int16[d+2]=i,this.int16[d+3]=n,this.uint16[d+4]=a,this.uint16[d+5]=o,this.uint16[d+6]=s,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=c,this.int16[d+10]=f,this.int16[d+11]=h,this.float32[v+6]=p,e}};yie.prototype.bytesPerElement=28,Hi("StructArrayLayout4i4ui4i1f28",yie);xie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*3;return this.float32[n+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}};xie.prototype.bytesPerElement=12,Hi("StructArrayLayout3f12",xie);bie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=e*1;return this.uint32[r+0]=t,e}};bie.prototype.bytesPerElement=4,Hi("StructArrayLayout1ul4",bie);_ie=class extends Tl{_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(e,t,r,i,n,a,o,s,l){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,i,n,a,o,s,l)}emplace(e,t,r,i,n,a,o,s,l,u){let c=e*10,f=e*5;return this.int16[c+0]=t,this.int16[c+1]=r,this.int16[c+2]=i,this.int16[c+3]=n,this.int16[c+4]=a,this.int16[c+5]=o,this.uint32[f+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e}};_ie.prototype.bytesPerElement=20,Hi("StructArrayLayout6i1ul2ui20",_ie);wie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*6;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}};wie.prototype.bytesPerElement=12,Hi("StructArrayLayout2i2i2i12",wie);Tie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n)}emplace(e,t,r,i,n,a){let o=e*4,s=e*8;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=i,this.int16[s+6]=n,this.int16[s+7]=a,e}};Tie.prototype.bytesPerElement=16,Hi("StructArrayLayout2f1f2i16",Tie);Aie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*16,l=e*4,u=e*8;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=o,e}};Aie.prototype.bytesPerElement=16,Hi("StructArrayLayout2ub2f2i16",Aie);LB=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*3;return this.uint16[n+0]=t,this.uint16[n+1]=r,this.uint16[n+2]=i,e}};LB.prototype.bytesPerElement=6,Hi("StructArrayLayout3ui6",LB);Mie=class extends Tl{_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(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g){let w=this.length;return this.resize(w+1),this.emplace(w,e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g,w){let _=e*26,b=e*13,M=e*52;return this.int16[_+0]=t,this.int16[_+1]=r,this.uint16[_+2]=i,this.uint16[_+3]=n,this.uint32[b+2]=a,this.uint32[b+3]=o,this.uint32[b+4]=s,this.uint16[_+10]=l,this.uint16[_+11]=u,this.uint16[_+12]=c,this.float32[b+7]=f,this.float32[b+8]=h,this.uint8[M+36]=p,this.uint8[M+37]=d,this.uint8[M+38]=v,this.uint32[b+10]=m,this.int16[_+22]=g,this.float32[b+12]=w,e}};Mie.prototype.bytesPerElement=52,Hi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Mie);Sie=class extends Tl{_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(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g,w,_,b,M,x,A,T,y,E,S,C){let k=this.length;return this.resize(k+1),this.emplace(k,e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g,w,_,b,M,x,A,T,y,E,S,C)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g,w,_,b,M,x,A,T,y,E,S,C,k){let D=e*34,F=e*17;return this.int16[D+0]=t,this.int16[D+1]=r,this.int16[D+2]=i,this.int16[D+3]=n,this.int16[D+4]=a,this.int16[D+5]=o,this.int16[D+6]=s,this.int16[D+7]=l,this.uint16[D+8]=u,this.uint16[D+9]=c,this.uint16[D+10]=f,this.uint16[D+11]=h,this.uint16[D+12]=p,this.uint16[D+13]=d,this.uint16[D+14]=v,this.uint16[D+15]=m,this.uint16[D+16]=g,this.uint16[D+17]=w,this.uint16[D+18]=_,this.uint16[D+19]=b,this.uint16[D+20]=M,this.uint16[D+21]=x,this.uint16[D+22]=A,this.uint32[F+12]=T,this.float32[F+13]=y,this.float32[F+14]=E,this.uint16[D+30]=S,this.uint16[D+31]=C,this.float32[F+16]=k,e}};Sie.prototype.bytesPerElement=68,Hi("StructArrayLayout8i15ui1ul2f2ui1f68",Sie);PB=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=e*1;return this.float32[r+0]=t,e}};PB.prototype.bytesPerElement=4,Hi("StructArrayLayout1f4",PB);Eie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*6,a=e*3;return this.uint16[n+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,e}};Eie.prototype.bytesPerElement=12,Hi("StructArrayLayout1ui2f12",Eie);kie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*2,a=e*4;return this.uint32[n+0]=t,this.uint16[a+2]=r,this.uint16[a+3]=i,e}};kie.prototype.bytesPerElement=8,Hi("StructArrayLayout1ul2ui8",kie);Cie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=e*2;return this.uint16[i+0]=t,this.uint16[i+1]=r,e}};Cie.prototype.bytesPerElement=4,Hi("StructArrayLayout2ui4",Cie);Die=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=e*1;return this.uint16[r+0]=t,e}};Die.prototype.bytesPerElement=2,Hi("StructArrayLayout1ui2",Die);Fie=class extends Tl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=e*4;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,e}};Fie.prototype.bytesPerElement=16,Hi("StructArrayLayout4f16",Fie);Pit=class extends SC{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 rr(this.anchorPointX,this.anchorPointY)}};Pit.prototype.size=20;Wne=class extends _ie{get(e){return new Pit(this,e)}};Hi("CollisionBoxArray",Wne);Iit=class extends SC{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(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};Iit.prototype.size=52;Rit=class extends Mie{get(e){return new Iit(this,e)}};Hi("PlacedSymbolArray",Rit);zit=class extends SC{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(e){this._structArray.uint32[this._pos4+12]=e}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};zit.prototype.size=68;Bit=class extends Sie{get(e){return new zit(this,e)}};Hi("SymbolInstanceArray",Bit);qit=class extends PB{getoffsetX(e){return this.float32[e*1+0]}};Hi("GlyphOffsetArray",qit);Oit=class extends FB{getx(e){return this.int16[e*3+0]}gety(e){return this.int16[e*3+1]}gettileUnitDistanceFromAnchor(e){return this.int16[e*3+2]}};Hi("SymbolLineVertexArray",Oit);Nit=class extends SC{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]}};Nit.prototype.size=12;Uit=class extends Eie{get(e){return new Nit(this,e)}};Hi("TextAnchorOffsetArray",Uit);Vit=class extends SC{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]}};Vit.prototype.size=8;Git=class extends kie{get(e){return new Vit(this,e)}};Hi("FeatureIndexArray",Git);Hm=class extends iC{},Hit=class extends FB{},jit=class extends die{},abr=class extends iC{},obr=class extends iC{},sbr=class extends pie{},lbr=class extends vie{},ubr=class extends nC{},bT=class extends gie{},pet=class extends mie{},cbr=class extends yie{},fbr=class extends xie{},hbr=class extends bie{},vet=class extends wie{},$it=class extends Tie{},dbr=class extends Aie{},Wit=class extends LB{},zv=class extends LB{},Lie=class extends Cie{},Yit=class extends Die{},Pie=cl([{name:"a_pos",components:2,type:"Int16"}],4),pbr=Pie.members;Pie.size,Pie.alignment;Js=class MT{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,r,i,n){let a=this.segments[this.segments.length-1];return t>MT.MAX_VERTEX_ARRAY_LENGTH&&Pa(`Max vertices per segment is ${MT.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${MT.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+t>MT.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(t,r,i){let n={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(t,r,i){return this.prepareSegment(0,t,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let t of this.segments)for(let r in t.vaos)t.vaos[r].destroy()}static simpleSegment(t,r,i,n){return new MT([{vertexOffset:t,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};Js.MAX_VERTEX_ARRAY_LENGTH=2**16-1,Hi("SegmentVector",Js);vbr=cl([{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"}]),gbr=cl([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),mbr=une(((e,t)=>{function r(i,n){for(var a=i.length&3,o=i.length-a,s=n,l,u=3432918353,c=461845907,f,h=0;h>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,s^=f,s=s<<13|s>>>19,l=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295,s=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(f=0,a){case 3:f^=(i.charCodeAt(h+2)&255)<<16;case 2:f^=(i.charCodeAt(h+1)&255)<<8;case 1:f^=i.charCodeAt(h)&255,f=(f&65535)*u+(((f>>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,s^=f}return s^=i.length,s^=s>>>16,s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295,s^=s>>>13,s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295,s^=s>>>16,s>>>0}t!==void 0&&(t.exports=r)})),ybr=une(((e,t)=>{function r(i,n){for(var a=i.length,o=n^a,s=0,l;a>=4;)l=i.charCodeAt(s)&255|(i.charCodeAt(++s)&255)<<8|(i.charCodeAt(++s)&255)<<16|(i.charCodeAt(++s)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)^l,a-=4,++s;switch(a){case 3:o^=(i.charCodeAt(s+2)&255)<<16;case 2:o^=(i.charCodeAt(s+1)&255)<<8;case 1:o^=i.charCodeAt(s)&255,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)}return o^=o>>>13,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16),o^=o>>>15,o>>>0}t.exports=r})),IB=Lyr(une(((e,t)=>{var r=mbr(),i=ybr();t.exports=r,t.exports.murmur3=r,t.exports.murmur2=i}))(),1),Xit=class Zit{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,r,i,n){this.ids.push(met(t)),this.positions.push(r,i,n)}getPositions(t){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=met(t),i=0,n=this.ids.length-1;for(;i>1;this.ids[o]>=r?n=o:i=o+1}let a=[];for(;this.ids[i]===r;){let o=this.positions[3*i],s=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:o,start:s,end:l}),i++}return a}static serialize(t,r){let i=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Iie(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(t){let r=new Zit;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}};Hi("FeaturePositionMap",Xit);jm=class{constructor(e,t){this.gl=e.gl,this.location=t}},Sn=class extends jm{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},Ni=class extends jm{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}},xa=class extends jm{constructor(e,t){super(e,t),this.current=[0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},Gf=class extends jm{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},JT=class extends jm{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}},$m=class extends jm{constructor(e,t){super(e,t),this.current=aa.transparent}set(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}},Yne=class extends jm{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e.length*4);for(let r=0;r`u_${i}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return this.type==="color"?new $m(e,t):new Ni(e,t)}},Q_=class{constructor(e,t){this.uniformNames=t.map(r=>`u_${r}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,i){let n=null;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&e.set(n)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new JT(e,t):new Ni(e,t)}},Pm=class{constructor(e,t,r,i){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new Io(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(i,e,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new Io(0,n),r,i);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if(this.type==="color"){let i=Rie(r);for(let n=e;n`u_${o}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=t.map(o=>({name:`a_${o}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let i=this.expression.evaluate(new Io(this.zoom,r),t,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new Io(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,i,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new Io(this.zoom,n),r,i),o=this.expression.evaluate(new Io(this.zoom+1,n),r,i);this._setPaintValue(e,t,a,o)}_setPaintValue(e,t,r,i){if(this.type==="color"){let n=Rie(r),a=Rie(i);for(let o=e;o`#define HAS_UNIFORM_${i}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof Pm||r instanceof kv)for(let i of r.paintVertexAttributes)e.push(i.name);else if(r instanceof rx){let i=r.getVertexAttributes();for(let n of i)e.push(n.name)}}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof Bk||r instanceof Q_||r instanceof kv)for(let i of r.uniformNames)e.push(i)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof Bk||n instanceof Q_||n instanceof kv){for(let a of n.uniformNames)if(t[a]){let o=n.getBinding(e,t[a],a);r.push({name:a,property:i,binding:o})}}}return r}setUniforms(e,t,r,i){for(let{name:n,property:a,binding:o}of t)this.binders[a].setUniform(o,i,r.get(a),n)}updatePaintBuffers(e){this._buffers=[];for(let t in this.binders){let r=this.binders[t];if(e&&r instanceof rx){let i=e.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof Pm||r instanceof kv)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof Pm||r instanceof kv||r instanceof rx)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof Pm||t instanceof kv||t instanceof rx)&&t.destroy()}}},l3=class{constructor(e,t,r=()=>!0){this.programConfigurations={};for(let i of e)this.programConfigurations[i.id]=new Qit(i,t,r);this.needsUpload=!1,this._featureMap=new Xit,this._bufferOffset=0}populatePaintArrays(e,t,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(e,t,i);t.id!==void 0&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(e,this._featureMap,t,n,i)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}};Hi("ConstantBinder",Bk),Hi("CrossFadedConstantBinder",Q_),Hi("SourceExpressionBinder",Pm),Hi("CrossFadedPatternBinder",Kit),Hi("CrossFadedDasharrayBinder",Jit),Hi("CompositeExpressionBinder",kv),Hi("ProgramConfiguration",Qit,{omit:["_buffers"]}),Hi("ProgramConfigurationSet",l3);zie=2**14-1,xet=-zie-1;bet=-32768;Zne=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new abr,this.indexArray=new zv,this.segments=new Js,this.programConfigurations=new l3(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){let i=this.layers[0],n=[],a=null,o=!1,s=i.type==="heatmap";if(i.type==="circle"){let f=i;a=f.layout.get("circle-sort-key"),o=!a.isConstant(),s||(s=f.paint.get("circle-pitch-alignment")==="map")}let l=s?t.subdivisionGranularity.circle:1,u=new Io(this.zoom),c=this.layers[0]._featureFilter.needGeometry;for(let{feature:f,id:h,index:p,sourceLayerIndex:d}of e){let v=vx(f,c);if(!this.layers[0]._featureFilter.filter(u,v,r))continue;let m=o?a.evaluate(v,{},r):void 0,g={id:h,properties:f.properties,type:f.type,sourceLayerIndex:d,index:p,geometry:c?v.geometry:v3(f),patterns:{},sortKey:m};n.push(g)}o&&n.sort((f,h)=>f.sortKey-h.sortKey);for(let f of n){let{geometry:h,index:p,sourceLayerIndex:d}=f,v=e[p].feature;this.addFeature(f,h,p,r,l),t.featureIndex.insert(v,h,p,d,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,pbr),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let o=a.length;for(let s of t)for(let l of s){let u=l.x,c=l.y;if(u<0||u>=8192||c<0||c>=8192)continue;let f=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),h=f.vertexLength;for(let p=0;pwet||(wet=new dc({"circle-sort-key":new kn(_r.layout_circle["circle-sort-key"],"circle-sort-key")})),zbr=()=>Tet||(Tet=new dc({"circle-radius":new kn(_r.paint_circle["circle-radius"],"circle-radius"),"circle-color":new kn(_r.paint_circle["circle-color"],"circle-color"),"circle-blur":new kn(_r.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new kn(_r.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new Pi(_r.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new Pi(_r.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new Pi(_r.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new Pi(_r.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new kn(_r.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new kn(_r.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new kn(_r.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),Bbr={get paint(){return zbr()},get layout(){return Rbr()}},int=e=>e.type==="circle",qbr=class extends Rv{constructor(e,t){super(e,Bbr,t)}createBucket(e){return new Zne(e)}queryRadius(e){let t=e;return FT("circle-radius",this,t)+FT("circle-stroke-width",this,t)+_q(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){let l=wq(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),c=this.paint.get("circle-pitch-scale"),f=this.paint.get("circle-pitch-alignment"),h,p;return f==="map"?(h=l,p=u*a):(h=Ibr(l,n,o,s),p=u),rnt({queryGeometry:h,size:p,transform:n,unwrappedTileID:o,getElevation:s,pitchAlignment:f,pitchScale:c},i)}},nnt=class extends Zne{};Hi("HeatmapBucket",nnt,{omit:["layers"]});Obr=()=>Aet||(Aet=new dc({"heatmap-radius":new kn(_r.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new kn(_r.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new Pi(_r.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new yq(_r.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new Pi(_r.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),Nbr={get paint(){return Obr()}};Tq=class ont{constructor(t,r){eae(this,t,1,r)}resize(t){ant(this,t,1)}clone(){return new ont({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,i,n,a){tae(t,r,i,n,a,1)}},Es=class snt{constructor(t,r){eae(this,t,4,r)}resize(t){ant(this,t,4)}replace(t,r){r?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new snt({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,i,n,a){tae(t,r,i,n,a,4)}setPixel(t,r,i){let n=(t*this.width+r)*4;this.data[n+0]=Math.round(i.r*255/i.a),this.data[n+1]=Math.round(i.g*255/i.a),this.data[n+2]=Math.round(i.b*255/i.a),this.data[n+3]=Math.round(i.a*255)}};Hi("AlphaImage",Tq),Hi("RGBAImage",Es);EC="big-fb",lnt=e=>e.type==="heatmap",Ubr=class extends Rv{createBucket(e){return new nnt(e)}constructor(e,t){super(e,Nbr,t),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){e==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){let e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=rae({expression:e,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(EC)}queryRadius(e){return FT("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){return rnt({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(t,r)*a,transform:n,unwrappedTileID:o,getElevation:s},i)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&!this.isHidden()}},Vbr=()=>Met||(Met=new dc({"hillshade-illumination-direction":new Pi(_r.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new Pi(_r.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new Pi(_r.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new Pi(_r.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new Pi(_r.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new Pi(_r.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new Pi(_r.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new Pi(_r.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new Pi(_r.paint_hillshade.resampling,"resampling")})),Gbr={get paint(){return Vbr()}},unt=e=>e.type==="hillshade",Hbr=class extends Rv{constructor(e,t){super(e,Gbr,t),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,t=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(e.length,t.length,r.length,i.length);e=e.concat(Array(n-e.length).fill(e.at(-1))),t=t.concat(Array(n-t.length).fill(t.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=t.map(Os);return{directionRadians:e.map(Os),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},jbr=()=>Eet||(Eet=new dc({"color-relief-opacity":new Pi(_r["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new yq(_r["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new Pi(_r["paint_color-relief"].resampling,"resampling")})),$br={get paint(){return jbr()}};Tu=class{constructor(e,t,r,i){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(t,i)}update(e,t,r){var u;let{width:i,height:n}=e,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:o}=this,{gl:s}=o;this.useMipmap=!!(t!=null&&t.useMipmap),a&&this.size&&this.format===s.RGBA&&(s.deleteTexture(this.texture),this.texture=s.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),s.bindTexture(s.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1);let l=this.format===s.RGBA&&(t==null?void 0:t.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===s.RGBA&&i>0&&n>0){let c=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(s.texStorage2D(s.TEXTURE_2D,c,s.RGBA8,i,n),sB(e)){o.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:f}=e;l&&f&&(f=$re(f)),f&&s.texSubImage2D(s.TEXTURE_2D,0,0,0,i,n,s.RGBA,s.UNSIGNED_BYTE,f)}else o.pixelStoreUnpackPremultiplyAlpha.set(l),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,e)}else sB(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,l,i,n,s)):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(e,s));else{let{x:c,y:f}=r||{x:0,y:0};sB(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,l,c,f,i,n,s)):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(e,c,f,s))}this.useMipmap&&!(sB(e)&&e.data===null)&&s.generateMipmap(s.TEXTURE_2D),o.pixelStoreUnpackFlipY.setDefault(),o.pixelStoreUnpack.setDefault(),o.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,t){t.texImage2D(t.TEXTURE_2D,0,this.format,this.format,t.UNSIGNED_BYTE,e)}_uploadRawData(e,t,r,i,n){let{data:a}=e;t&&a&&(a=$re(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(e,t,r,i){i.texSubImage2D(i.TEXTURE_2D,0,t,r,i.RGBA,i.UNSIGNED_BYTE,e)}_updateRawData(e,t,r,i,n,a,o){let{data:s}=e;t&&s&&(s=$re(s)),o.texSubImage2D(o.TEXTURE_2D,0,r,i,n,a,o.RGBA,o.UNSIGNED_BYTE,s)}bind(e,t,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||e;e!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,e),this.magFilter=e),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),t!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,t),this.wrap=t)}generateMipmap(){if(!this.useMipmap)return;let{gl:e}=this.context;e.bindTexture(e.TEXTURE_2D,this.texture),e.generateMipmap(e.TEXTURE_2D)}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},Wbr=(zm=class{constructor(t,r,i,n=1,a=1,o=1,s=0){if(this.uid=t,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Pa(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),zm.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=o,this.baseShift=s;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let c=-2;c=l)&&this.data.copyWithin(this._idx(0,c),f,f+l),this.data.fill(this.data[f],this._idx(-2,c),this._idx(0,c)),this.data.fill(this.data[f+l-1],this._idx(l,c),this._idx(l+1,c)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let c=0;cthis.max&&(this.max=p),p=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),o=((n+2)*this.stride+i+2)*4,s=this.stride*4,l=t-i,u=r-n,c=this._unpackAtIndex(a,o),f=this._unpackAtIndex(a,o+4),h=this._unpackAtIndex(a,o+s),p=this._unpackAtIndex(a,o+s+4);return c*(1-l)*(1-u)+f*l*(1-u)+h*(1-l)*u+p*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,r){if(t<-2||t>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(t+2)}unpack(t,r,i){return t*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(t){return cnt(t,this.getUnpackVector())}getPixels(){return new Es({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(t,r,i){if(this.dim!==t.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,o=i*this.dim,s=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:o=s-2;break;case 1:s=o+2}let l=-r*this.dim,u=-i*this.dim;for(let c=o;ce.type==="color-relief",Ybr=class extends Rv{constructor(e,t){super(e,$br,t)}_createColorRamp(e){let t={elevationStops:[],colorStops:[]},r=this._transitionablePaint._values["color-relief-color"].value.expression;if(r instanceof Qk&&r._styleExpression.expression instanceof sp){this.colorRampExpression=r;let a=r._styleExpression.expression;t.elevationStops=a.labels,t.colorStops=[];for(let o of t.elevationStops)t.colorStops.push(a.evaluate({globals:{elevation:o}}))}if(t.elevationStops.length<1&&(t.elevationStops=[0],t.colorStops=[aa.transparent]),t.elevationStops.length<2&&(t.elevationStops.push(t.elevationStops[0]+1),t.colorStops.push(t.colorStops[0])),t.elevationStops.length<=e)return t;let i={elevationStops:[],colorStops:[]},n=(t.elevationStops.length-1)/(e-1);for(let a=0;ae)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){let t=1<32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(e)|0,i=Math.round(t)|0,n=this._getKey(r,i),a=this._vertexDictionary.get(n);if(a!==void 0)return a;let o=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,o),this._vertexBuffer.push(r,i),o}_subdivideTrianglesScanline(e,t){if(this._granularity<2)return y_r(this._vertexBuffer,m_r(e,t));let r=[],i=e.length;for(let n=0;n=1||b<=0)||m&&(ln)){c>=i&&c<=n&&a.push(r[(o+1)%3]);continue}if(!m&&_>0){let A=s+p*_,T=l+d*_;a.push(this._vertexToIndex(A,T))}let M=s+p*Math.max(_,0),x=s+p*Math.min(b,1);if(v||this._generateIntraEdgeVertices(a,s,l,u,c,M,x),!m&&b<1){let A=s+p*b,T=l+d*b;a.push(this._vertexToIndex(A,T))}(m||c>=i&&c<=n)&&a.push(r[(o+1)%3]),!m&&(c<=i||c>=n)&&this._generateInterEdgeVertices(a,s,l,u,c,f,h,x,i,n)}return a}_generateIntraEdgeVertices(e,t,r,i,n,a,o){let s=i-t,l=n-r,u=l===0,c=u?Math.min(t,i):Math.min(a,o),f=u?Math.max(t,i):Math.max(a,o),h=Math.floor(c/this._granularityCellSize)+1,p=Math.ceil(f/this._granularityCellSize)-1;if(u?t=h;d--){let v=d*this._granularityCellSize,m=r+l*(v-t)/s;e.push(this._vertexToIndex(v,m))}}_generateInterEdgeVertices(e,t,r,i,n,a,o,s,l,u){let c=n-r,f=a-i,h=o-n,p=(l-n)/h,d=(u-n)/h,v=Math.min(p,d),m=Math.max(p,d),g=i+f*v,w=Math.floor(Math.min(g,s)/this._granularityCellSize)+1,_=Math.ceil(Math.max(g,s)/this._granularityCellSize)-1,b=s=1||m<=0){let A=t-a,T=r-o,y=(l-o)/T,E=(u-o)/T,S=a+A*Math.min(y,E);w=Math.floor(Math.min(S,s)/this._granularityCellSize)+1,_=Math.ceil(Math.max(S,s)/this._granularityCellSize)-1,b=s0?u:l;if(b)for(let A=w;A<=_;A++){let T=A*this._granularityCellSize;e.push(this._vertexToIndex(T,x))}else for(let A=_;A>=w;A--){let T=A*this._granularityCellSize;e.push(this._vertexToIndex(T,x))}}_generateOutline(e,t){let r=[],i=0;for(let n of e){let a=this._granularity<2?this._ringPathIndices(n,i,t):this._pointArrayToIndices(t3(n,this._granularity,!0));i+=n.length;let o=[];for(let s=1;s=2&&mnt(e)&&i.push(i[0]),i}_handlePoles(e){let t=!1,r=!1;this._canonical&&(this._canonical.y===0&&(t=!0),this._canonical.y===(1<n==(a===-32768)?(e.push(r),e.push(t),e.push(this._vertexToIndex(i,a)),e.push(this._vertexToIndex(n,a)),e.push(r),e.push(this._vertexToIndex(i,a))):(e.push(t),e.push(r),e.push(this._vertexToIndex(i,a)),e.push(r),e.push(this._vertexToIndex(n,a)),e.push(this._vertexToIndex(i,a)))}_fillPoles(e,t,r){let i=this._vertexBuffer,n=qr,a=e.length;for(let o=2;o=2&&((s=this._canonical)==null?void 0:s.z)===0&&(a=this._removeTrianglesOutsideTileX(a),o=o.map(l=>this._removeLinesOutsideTileX(l))),{verticesFlattened:this._vertexBuffer,indicesTriangles:a,indicesLineList:o}}_vertexOutsideTileX(e){let t=this._vertexBuffer[e*2];return t<0||t>8192}_removeTrianglesOutsideTileX(e){let t=[];for(let r=0;rt.id),this.index=e.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new obr,this.indexArray=new zv,this.indexArray2=new Lie,this.programConfigurations=new l3(e.layers,e.zoom),this.segments=new Js,this.segments2=new Js,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.hasDependencies=RB("fill",this.layers,t);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],o=new Io(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:f}of e){let h=vx(l,s);if(!this.layers[0]._featureFilter.filter(o,h,r))continue;let p=n?i.evaluate(h,{},r,t.availableImages):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:s?h.geometry:v3(l),patterns:{},sortKey:p};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:c,sourceLayerIndex:f}=l;if(this.hasDependencies){let p=iae("fill",this.layers,l,{zoom:this.zoom},t);this.patternFeatures.push(p)}else this.addFeature(l,u,c,r,{},t.subdivisionGranularity);let h=e[c].feature;t.featureIndex.insert(h,u,c,f,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:e,canonical:t,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,e.subdivisionGranularity)}detectSdfPatterns(e){for(let t of this.patternFeatures)for(let r in t.patterns){let i=t.patterns[r];this.recordSdfPattern(r,e[i.min]),this.recordSdfPattern(r,e[i.mid]),this.recordSdfPattern(r,e[i.max])}for(let t of this.layers){let r=t.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(t.id,e[r.from.toString()]),this.recordSdfPattern(t.id,e[r.to.toString()]))}}recordSdfPattern(e,t){if(!t)return;let r=t.sdf===!0,i=this.sdfPatterns[e];i===void 0?this.sdfPatterns[e]=r:i!==r&&Pa(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${e}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Xbr),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,t,r,i,n,a){for(let o of lq(t,500)){let s=gnt(o,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;ynt((u,c)=>{l.emplaceBack(u,c)},this.segments,this.layoutVertexArray,this.indexArray,s.verticesFlattened,s.indicesTriangles,this.segments2,this.indexArray2,s.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}};Hi("FillBucket",xnt,{omit:["layers","patternFeatures"]});w_r=()=>Fet||(Fet=new dc({"fill-sort-key":new kn(_r.layout_fill["fill-sort-key"],"fill-sort-key")})),T_r=()=>Let||(Let=new dc({"fill-antialias":new Pi(_r.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new kn(_r.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new Pi(_r.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new kn(_r.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new kn(_r.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new Pi(_r.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new Pi(_r.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new rC(_r.paint_fill["fill-pattern"],"fill-pattern")})),A_r={get paint(){return T_r()},get layout(){return w_r()}},bnt=e=>e.type==="fill",M_r=class extends Rv{constructor(e,t){super(e,A_r,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new xnt(e)}queryRadius(){return _q(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:i}){return ent(wq(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),t)}isTileClipped(){return!0}},$ie=cl([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),S_r=cl([{name:"a_centroid",components:2,type:"Int16"}],4),E_r=$ie.members;$ie.size,$ie.alignment;lp=class Wie{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){let r=new Wie;return r.extend(t(new rr(this.minX,this.minY))),r.extend(t(new rr(this.maxX,this.minY))),r.extend(t(new rr(this.minX,this.maxY))),r.extend(t(new rr(this.maxX,this.maxY))),r}static fromPoints(t){let r=new Wie;for(let i of t)r.extend(i);return r}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}},_nt=lp.fromPoints([new rr(0,0),new rr(qr,qr)]);kC=class{constructor(e,t,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=n;e.pos>3,a===0)continue}if(a--,n===1)o+=e.readSVarint(),s+=e.readSVarint(),i&&r.push(i),i=[new rr(o,s)];else if(n===2)o+=e.readSVarint(),s+=e.readSVarint(),i&&i.push(new rr(o,s));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,i=0,n=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;for(;e.pos>3,i===0)continue}if(i--,r===1||r===2)n+=e.readSVarint(),a+=e.readSVarint(),ns&&(s=n),au&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[o,l,s,u]}toGeoJSON(e,t,r){let i=this.extent*2**r,n=this.extent*e,a=this.extent*t,o=this.loadGeometry();function s(f){return[(f.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(f.y+a)*2/i)*Math.PI))-90]}function l(f){return f.map(s)}let u;if(this.type===1){let f=[];for(let p of o)f.push(p[0]);let h=l(f);u=f.length===1?{type:"Point",coordinates:h[0]}:{type:"MultiPoint",coordinates:h}}else if(this.type===2){let f=o.map(l);u=f.length===1?{type:"LineString",coordinates:f[0]}:{type:"MultiLineString",coordinates:f}}else if(this.type===3){let f=wnt(o),h=[];for(let p of f)h.push(p.map(l));u=h.length===1?{type:"Polygon",coordinates:h[0]}:{type:"MultiPolygon",coordinates:h}}else throw Error("unknown feature type");let c={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(c.id=this.id),c}};kC.types=["Unknown","Point","LineString","Polygon"];C_r=class{constructor(e,t){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],t===void 0&&(t=e.length);e.pos=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new kC(this._pbf,t,this.extent,this._keys,this._values)}};F_r=class{constructor(e,t=e.length){let r=Object.create(null);for(;e.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new qk(W0(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){let r=Math.PI/180,i=this.lat*r,n=t.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((t.lng-this.lng)*r);return Hf*Math.acos(Math.min(a,1))}static convert(t){if(t instanceof qk)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new qk(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t)return new qk(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},Tnt=2*Math.PI*Hf;Mo=class Mnt{constructor(t,r,i=0){this.x=+t,this.y=+r,this.z=+i}static fromLngLat(t,r=0){let i=yn.convert(t);return new Mnt(g3(i.lng),m3(i.lat),gx(r,i.lat))}toLngLat(){return new yn(Mq(this.x),jT(this.y))}toAltitude(){return nae(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Tnt*L_r(jT(this.y))}},mx=89.25;Wre=8192;Ent=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new sbr,this.centroidVertexArray=new Hm,this.indexArray=new zv,this.programConfigurations=new l3(e.layers,e.zoom),this.segments=new Js,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.features=[],this.hasDependencies=RB("fill-extrusion",this.layers,t);let i=new Io(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),o=a>0?R_r(a,r):0,s=n._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:f}of e){let h=vx(l,s);if(!n._featureFilter.filter(i,h,r))continue;let p={id:u,sourceLayerIndex:f,index:c,geometry:I_r(s?h.geometry:v3(l),o),properties:l.properties,type:l.type,patterns:{}};this.hasDependencies?this.features.push(iae("fill-extrusion",this.layers,p,{zoom:this.zoom},t)):this.addFeature(p,p.geometry,c,r,{},t.subdivisionGranularity),t.featureIndex.insert(l,p.geometry,c,f,this.index,!0)}}addFeatures({options:e,canonical:t,patternPositions:r}){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,E_r),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,S_r.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,i,n,a){for(let o of lq(t,500)){let s={x:0,y:0,sampleCount:0},l=this.layoutVertexArray.length;this.processPolygon(s,i,e,o,a);let u=this.layoutVertexArray.length-l,c=Math.floor(s.x/s.sampleCount),f=Math.floor(s.y/s.sampleCount);for(let h=0;h{Ck(u,c,f,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let i=1;iJs.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let o=n.sub(a)._perp()._unit(),s=a.dist(n);r+s>32768&&(r=0),Ck(this.layoutVertexArray,n.x,n.y,o.x,o.y,0,0,r),Ck(this.layoutVertexArray,n.x,n.y,o.x,o.y,0,1,r),r+=s,Ck(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,0,r),Ck(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,1,r);let l=t.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}};Hi("FillExtrusionBucket",Ent,{omit:["layers","features"]});N_r=()=>Iet||(Iet=new dc({"fill-extrusion-rounded-corner-distance":new Pi(_r["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),U_r=()=>Ret||(Ret=new dc({"fill-extrusion-opacity":new Pi(_r["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new kn(_r["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new Pi(_r["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new Pi(_r["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new rC(_r["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new kn(_r["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new kn(_r["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new Pi(_r["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),V_r={get paint(){return U_r()},get layout(){return N_r()}},knt=e=>e.type==="fill-extrusion",G_r=class extends Rv{constructor(e,t){super(e,V_r,t)}createBucket(e){return new Ent(e)}queryRadius(){return _q(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:o}){let s=wq(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(t,r),u=this.paint.get("fill-extrusion-base").evaluate(t,r),c=$_r(s,o,0),f=j_r(i,u,l,o),h=f[0],p=f[1];return H_r(h,p,c)}};W_r="geojsonvt_clip_start",Y_r="geojsonvt_clip_end",Xie=cl([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),X_r=Xie.members;Xie.size,Xie.alignment;Zie=cl([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),Z_r=Zie.members;Zie.size,Zie.alignment;K_r=Math.cos(75/2*(Math.PI/180)),Cnt=1/2,Bet=2**14/Cnt,Dnt=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let t of this.layers)this.gradients[t.id]={};this.layoutVertexArray=new lbr,this.layoutVertexArray2=new ubr,this.indexArray=new zv,this.programConfigurations=new l3(e.layers,e.zoom),this.segments=new Js,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.hasDependencies=RB("line",this.layers,t)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],o=new Io(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:f}of e){let h=vx(l,s);if(!this.layers[0]._featureFilter.filter(o,h,r))continue;let p=n?i.evaluate(h,{},r):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:s?h.geometry:v3(l),patterns:{},dashes:{},sortKey:p};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:c,sourceLayerIndex:f}=l;this.hasDependencies?(RB("line",this.layers,t)?iae("line",this.layers,l,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,t),this.patternFeatures.push(l)):this.addFeature(l,u,c,r,{},{},t.subdivisionGranularity);let h=e[c].feature;t.featureIndex.insert(h,u,c,f,this.index)}}update(e,t,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:e,canonical:t,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,i,e.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,Z_r)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,X_r),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,"geojsonvt_clip_start")&&Object.hasOwn(e.properties,"geojsonvt_clip_end"))return{start:+e.properties[W_r],end:+e.properties[Y_r]}}addFeature(e,t,r,i,n,a,o){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),u=s.get("line-cap").evaluate(e,{}),c=s.get("line-miter-limit").evaluate(e,{}),f=s.get("line-round-limit").evaluate(e,{});this.lineClips=this.lineFeatureClips(e);for(let h of t)this.addLine(h,e,l,u,c,f,i,o);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(e,t,r,i,n,a,o,s){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=o?s.line.getGranularityForZoomLevel(o.z):1;if(e=t3(e,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let _=0;_=2&&e[c-1].equals(e[c-2]);)c--;let f=0;for(;f0;if(y&&_>f){let k=d.dist(v);if(k>2*h){let D=d.sub(d.sub(v)._mult(h/k)._round());this.updateDistance(v,D),this.addCurrentVertex(D,g,0,0,p),v=D}}let S=v&&m,C=S?r:u?"butt":i;if(S&&C==="round"&&(An&&(C="bevel"),C==="bevel"&&(A>2&&(C="flipbevel"),A100)b=w.mult(-1);else{let k=A*g.add(w).mag()/g.sub(w).mag();b._perp()._mult(k*(E?-1:1))}this.addCurrentVertex(d,b,0,0,p),this.addCurrentVertex(d,b.mult(-1),0,0,p)}else if(C==="bevel"||C==="fakeround"){let k=-Math.sqrt(A*A-1),D=E?k:0,F=E?0:k;if(v&&this.addCurrentVertex(d,g,D,F,p),C==="fakeround"){let P=Math.round(T*180/Math.PI/20);for(let R=1;R2*h){let D=d.add(m.sub(d)._mult(h/k)._round());this.updateDistance(d,D),this.addCurrentVertex(D,w,0,0,p),d=D}}}}addCurrentVertex(e,t,r,i,n,a=!1){let o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*i,u=-t.y-t.x*i;this.addHalfVertex(e,o,s,a,!1,r,n),this.addHalfVertex(e,l,u,a,!0,-i,n),this.distance>Bet/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,i,n,a))}addHalfVertex({x:e,y:t},r,i,n,a,o,s){let l=(this.lineClips?this.scaledDistance*(Bet-1):this.scaledDistance)*Cnt;if(this.layoutVertexArray.emplaceBack((e<<1)+ +!!n,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(o===0?0:o<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let c=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(c,this.lineClipsArray.length)}let u=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),s.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let r=t.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,i){for(let n of e){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let o=n.layout.get("line-cap").evaluate(t,{})==="round",s={dasharray:a.value.evaluate({zoom:r-1},t,{}),round:o},l={dasharray:a.value.evaluate({zoom:r},t,{}),round:o},u={dasharray:a.value.evaluate({zoom:r+1},t,{}),round:o},c=`${s.dasharray.join(",")},${s.round}`,f=`${l.dasharray.join(",")},${l.round}`,h=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[c]=s,i.dashDependencies[f]=l,i.dashDependencies[h]=u,t.dashes[n.id]={min:c,mid:f,max:h}}}};Hi("LineBucket",Dnt,{omit:["layers","patternFeatures"]});J_r=()=>qet||(qet=new dc({"line-cap":new kn(_r.layout_line["line-cap"],"line-cap"),"line-join":new kn(_r.layout_line["line-join"],"line-join"),"line-miter-limit":new kn(_r.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new kn(_r.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new kn(_r.layout_line["line-sort-key"],"line-sort-key")})),Q_r=()=>Oet||(Oet=new dc({"line-opacity":new kn(_r.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new Pi(_r.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new kn(_r.paint_line["line-color"],"line-color"),"line-translate":new Pi(_r.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new Pi(_r.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new kn(_r.paint_line["line-width"],"line-width"),"line-gap-width":new kn(_r.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new kn(_r.paint_line["line-offset"],"line-offset"),"line-blur":new kn(_r.paint_line["line-blur"],"line-blur"),"line-dasharray":new rC(_r.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new rC(_r.paint_line["line-pattern"],"line-pattern"),"line-gradient":new yq(_r.paint_line["line-gradient"],"line-gradient")})),Net={get paint(){return Q_r()},get layout(){return J_r()}},e3r=class extends kn{possiblyEvaluate(e,t){return t=new Io(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,i){return t=dn({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,i)}},Fnt=e=>e.type==="line",t3r=class extends Rv{constructor(e,t){super(e,Net,t),this.gradientVersion=0,cB||(cB=new e3r(Net.paint.properties["line-width"].specification,"line-floorwidth"),cB.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){let t=this.gradientExpression();this.stepInterpolant=wxr(t)?t._styleExpression.expression instanceof kne:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=cB.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Dnt(e)}queryRadius(e){let t=e,r=Uet(FT("line-width",this,t),FT("line-gap-width",this,t)),i=FT("line-offset",this,t);return r/2+Math.abs(i)+_q(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let o=wq(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),s=a/2*Uet(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),l=this.paint.get("line-offset").evaluate(t,r);return l&&(i=Cbr(i,l*a)),Tbr(o,i,s)}isTileClipped(){return!0}};r3r=cl([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),i3r=cl([{name:"a_projected_pos",components:3,type:"Float32"}],4);cl([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);n3r=cl([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);cl([{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"}]);Vet=cl([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Lnt=cl([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);cl([{name:"triangle",components:3,type:"Uint16"}]),cl([{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"},{type:"Float32",name:"heightOffset"}]),cl([{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"},{type:"Float32",name:"heightOffset"}]),cl([{type:"Float32",name:"offsetX"}]),cl([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),cl([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);qB=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(qB.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return Zi(this,null,function*(){if(this.isParsed())return this.getState();if(e.pluginStatus!=="loading")return this.setState(e),e;let r=e.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield t(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};f3r={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},h3r={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},d3r={\u0644\u0622:[65269,65270],\u0644\u0623:[65271,65272],\u0644\u0625:[65273,65274],\u0644\u0627:[65275,65276]},Het=1604,p3r=/[\u0600-\u06ff\u0750-\u077f\u0870-\u089f\u08a0-\u08ff\ufb50-\ufdff\ufe70-\ufeff]/;Int=new Map;for(let[e,t]of Object.entries(f3r))v3r(t,e,Int);Rnt=typeof Intl<"u"&&"Segmenter"in Intl;kT={"!":"\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"};I3r={10:!0,13:!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},R3r={40:!0};lae=class Qie{constructor(t="",r=[],i=[]){this.text=t,this.sections=r,this.sectionIndex=i,this.imageSectionID=null,this._graphemes=null}graphemes(){var t;return(t=this._graphemes)!=null||(this._graphemes=Kie(this.text)),this._graphemes}static fromFeature(t,r){let i=new Qie;for(let n of t.sections)n.image?i.addImageSection(n):i.addTextSection(n,r);return i}length(){return this.graphemes().length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}verticalizePunctuation(){this.text=P3r(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("\u200B")}trim(){let t=this.graphemes(),r=0;for(;rr&&Zet(t[i-1]);)i--;this.text=t.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(t,r){let i=this.graphemes().slice(t,r).join(""),n=this.sectionIndex.slice(t,r);return new Qie(i,this.sections,n)}toCodeUnitIndex(t){return this.graphemes().slice(0,t).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,r)=>Math.max(t,this.sections[r].scale),0)}getMaxImageSize(t){let r=0,i=0;for(let n=0;n0?i[i.length-1]:"",a=Kie(n+t);this.text+=t,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let o=a.length-+!!n;for(let s=0;s=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(t,r,i,n,a){let o=[],s=this.determineAverageLineWidth(t,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),c=null,f=0,h=0;for(let p=0;p0){let v=u[p-1].codePointAt(0),m=d.codePointAt(0),g=s3r(v),w=Get(v)&&Get(m);(I3r[v]||g||"imageName"in this.getSection(p-1)||u[p+1]!==void 0&&R3r[m]||w&&(c!=null?c:c=D3r(this.text)).has(h))&&o.push(Ket(p,f,s,o,z3r(v,m,g&&l),!1))}sae(d.codePointAt(0))||(f+=Yet(d,this.getSection(p),i,n,t,a)),h+=d.length}return Ont(Ket(this.length(),f,s,o,0,!0))}determineAverageLineWidth(t,r,i,n,a){let o=0,s=0;for(let u of this.graphemes()){let c=this.getSection(s);o+=Yet(u,c,i,n,t,a),s++}let l=Math.max(1,Math.ceil(o/r));return o/l}};uae=B3r(),q3r=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/,O3r=new Set(["WS","FSI","LRI","RLI","PDI"]),N3r=new Set(["S","B"]);ene=4294967296,_ri=1/ene,Jet=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),Unt=class{constructor(e){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(e,t,r=this.length){let i;for(;i=this.nextField(r);)e(i,t,this);return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*ene;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*ene;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let t=this.buf,r=t[this.pos++];if(r<128)return r;let i=r&127,n;return n=t[this.pos++],i|=(n&127)<<7,n<128||(n=t[this.pos++],i|=(n&127)<<14,n<128)||(n=t[this.pos++],i|=(n&127)<<21,n<128)?i:(n=t[this.pos],i|=(n&15)<<28,Z3r(i,e,this))}readSVarint(){let e=this.readVarint();return e%2==1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Jet?Jet.decode(this.buf.subarray(t,e)):J3r(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos=e)return 0;let t=this.readVarint();return this.type=t&7,this._valueStart=this.pos,t>>>3}skip(e){let t=e&7;if(t===0)for(;this.buf[this.pos++]>127;);else if(t===2)this.pos=this.readVarint()+this.pos;else if(t===5)this.pos+=4;else if(t===1)this.pos+=8;else throw Error(`Unimplemented type: ${t}`)}};Cq=class{constructor(e,{pixelRatio:t,version:r,isWebGLImage:i=!1,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=n,this.stretchY=a,this.content=o,this.version=r,this.needsFirstWebGLRender=i,this.textFitWidth=s,this.textFitHeight=l}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},rwr=class{constructor(e,t){let r={},i={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let n=[];this.addImages(e,r,n),this.addImages(t,i,n);let{w:a,h:o}=cae(n),s=new Es({width:a||1,height:o||1});for(let l in e){let u=e[l];if(u.isWebGLImage)continue;let c=r[l].paddedRect;Es.copy(u.data,s,{x:0,y:0},{x:c.x+1,y:c.y+1},u.data)}for(let l in t){let u=t[l],c=i[l].paddedRect,f=c.x+1,h=c.y+1,p=u.data.width,d=u.data.height;Es.copy(u.data,s,{x:0,y:0},{x:f,y:h},u.data),Es.copy(u.data,s,{x:0,y:d-1},{x:f,y:h-1},{width:p,height:1}),Es.copy(u.data,s,{x:0,y:0},{x:f,y:h+d},{width:p,height:1}),Es.copy(u.data,s,{x:p-1,y:0},{x:f-1,y:h},{width:1,height:d}),Es.copy(u.data,s,{x:0,y:0},{x:f+p,y:h},{width:1,height:d})}this.image=s,this.iconPositions=r,this.patternPositions=i}addImages(e,t,r){for(let i in e){let n=e[i],a={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(a),t[i]=new Cq(a,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}}patchUpdatedImages(e,t){if(e.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==e.updateVersion){this.patchedUpdateVersion=e.updateVersion;for(let r in this.iconPositions)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t);for(let r in this.patternPositions)this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}}patchUpdatedImage(e,t,r){var l;if(!e||!t||!e.needsFirstWebGLRender&&e.version===t.version)return;e.needsFirstWebGLRender=!1,e.version=t.version;let[i,n]=e.tl,a=(l=t.userImage)==null?void 0:l.data;if(!DC(a)){r.update(t.data,void 0,{x:i,y:n});return}let{width:o,height:s}=t.data;r.context.setCustomLayerDefaults(),a.renderWithWebGL({gl:r.context.gl,texture:r.texture,x:i,y:n,width:o,height:s}),r.context.setDirty()}};Hi("ImagePosition",Cq),Hi("ImageAtlas",rwr);Hnt=(function(e){return e[e.none=0]="none",e[e.horizontal=1]="horizontal",e[e.vertical=2]="vertical",e[e.horizontalOnly=3]="horizontalOnly",e})(Hnt||{});Qet=new RegExp("^\\p{gc=M}$","u");rtt=32640;IT=class Xnt extends rr{constructor(t,r,i,n){super(t,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new Xnt(this.x,this.y,this.angle,this.segment)}};Hi("Anchor",IT);vB=class{constructor(e,t,r,i,n,a,o,s,l,u){var c;if(this.boxStartIndex=e.length,l){let f=a.top,h=a.bottom,p=a.collisionPadding;p&&(f-=p[1],h+=p[3]);let d=h-f;d>0&&(d=Math.max(10,d),this.circleDiameter=d)}else{let f=(c=a.image)!=null&&c.content&&(a.image.textFitWidth||a.image.textFitHeight)?Ynt(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};f.y1=f.y1*o-s[0],f.y2=f.y2*o+s[2],f.x1=f.x1*o-s[3],f.x2=f.x2*o+s[1];let h=a.collisionPadding;if(h&&(f.x1-=h[0]*o,f.y1-=h[1]*o,f.x2+=h[2]*o,f.y2+=h[3]*o),u){let p=new rr(f.x1,f.y1),d=new rr(f.x2,f.y1),v=new rr(f.x1,f.y2),m=new rr(f.x2,f.y2),g=u*Math.PI/180;p._rotate(g),d._rotate(g),v._rotate(g),m._rotate(g),f.x1=Math.min(p.x,d.x,v.x,m.x),f.x2=Math.max(p.x,d.x,v.x,m.x),f.y1=Math.min(p.y,d.y,v.y,m.y),f.y2=Math.max(p.y,d.y,v.y,m.y)}e.emplaceBack(t.x,t.y,f.x1,f.y1,f.x2,f.y2,r,i,n)}this.boxEndIndex=e.length}},Cwr=class{constructor(e=[],t=(r,i)=>ri)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;e=0)break;t[e]=t[a],e=a}t[e]=n}};ST=class{constructor(e,t,r,i){this.p=new rr(e,t),this.h=r,this.d=Lwr(this.p,i),this.max=this.d+this.h*Math.SQRT2}};Fq=(function(e){return e[e.center=1]="center",e[e.left=2]="left",e[e.right=3]="right",e[e.top=4]="top",e[e.bottom=5]="bottom",e[e["top-left"]=6]="top-left",e[e["top-right"]=7]="top-right",e[e["bottom-left"]=8]="bottom-left",e[e["bottom-right"]=9]="bottom-right",e})({}),hae=1/0;Nwr=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];rne=class{constructor(e){this.layoutVertexArray=new cbr,this.indexArray=new zv,this.programConfigurations=e,this.segments=new Js,this.dynamicLayoutVertexArray=new fbr,this.opacityVertexArray=new hbr,this.hasVisibleVertices=!1,this.placedSymbolArray=new Rit}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(e,t,r,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,r3r.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,i3r.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,Nwr,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}};Hi("SymbolBuffers",rne);ine=class{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new Js,this.collisionVertexArray=new dbr}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,n3r.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}};Hi("CollisionBuffers",ine);IC=class{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(o=>o.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=itt(this.zoom,t["text-size"]),this.iconSizeData=itt(this.zoom,t["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=uC(r,"text-overlap","text-allow-overlap")!=="never"||uC(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(o=>Hnt[o])),this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id),this.sourceID=e.sourceID}createArrays(){this.text=new rne(new l3(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new rne(new l3(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new qit,this.lineVertexArray=new Oit,this.symbolInstances=new Bit,this.textAnchorOffsets=new Uit}calculateGlyphDependencies(e,t,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,o=lae.fromFeature(e,r),s=o.graphemes();for(let u=0;u0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=s.value.kind!=="constant"||!!s.value.value||Object.keys(s.parameters).length>0,c=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let f=t.iconDependencies,h=t.glyphDependencies,p=t.availableImages,d=new Io(this.zoom);for(let{feature:m,id:g,index:w,sourceLayerIndex:_}of e){let b=i._featureFilter.needGeometry,M=vx(m,b);if(!i._featureFilter.filter(d,M,r))continue;b||(M.geometry=v3(m));let x;if(l){let E=i.getValueAndResolveTokens("text-field",M,r,p),S=Bm.factory(E);this.hasRTLText||(this.hasRTLText=Uwr(S)),x=E3r(S,i,M)}let A;if(u){let E=i.getValueAndResolveTokens("icon-image",M,r,p);A=E instanceof ug?E:ug.fromString(E)}if(!x&&!A)continue;let T=this.sortFeaturesByKey?c.evaluate(M,{},r):void 0,y={id:g,text:x,icon:A,index:w,sourceLayerIndex:_,geometry:M.geometry,properties:m.properties,type:kC.types[m.type],sortKey:T};if(this.features.push(y),A&&(f[A.name]=!0),x){let E=a.evaluate(M,{},r).join(","),S=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(v=this.writingModes)==null?void 0:v.includes(2);let C=Jie(x.toString());this.calculateGlyphDependencies(x,h,E,S,C);for(let k of x.sections)k.image&&(f[k.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=C3r(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}addFeatures({options:e,canonical:t,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:o}){Iwr({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:o,canonical:t,subdivisionGranularity:e.subdivisionGranularity,hasPromoteId:e.featureIndex.promoteId!=null})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,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(e,t){let r=this.lineVertexArray.length;if(e.segment!==void 0){let i=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),a={};for(let o=e.segment+1;o=0;o--)a[o]={x:t[o].x,y:t[o].y,tileUnitDistanceFromAnchor:n},o>0&&(n+=t[o-1].dist(t[o]));for(let o=0;o0}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(e,t){let r=e.placedSymbolArray.get(t),i=r.vertexStartIndex+r.numGlyphs*4;for(let n=r.vertexStartIndex;ni[o]-i[s]||n[s]-n[o]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0:r.sortKey)===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let t of this.symbolInstanceIndexes){let r=this.symbolInstances.get(t);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};Hi("SymbolBucket",IC,{omit:["layers","collisionBoxArray","features","compareText"]});Gwr=()=>stt||(stt=new dc({"symbol-placement":new Pi(_r.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new Pi(_r.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new Pi(_r.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new kn(_r.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new Pi(_r.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new Pi(_r.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new Pi(_r.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new Pi(_r.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new Pi(_r.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new kn(_r.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new kn(_r.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new Pi(_r.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new Pi(_r.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new kn(_r.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new kn(_r.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new kn(_r.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new Pi(_r.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new kn(_r.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new kn(_r.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new Pi(_r.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new Pi(_r.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new Pi(_r.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new kn(_r.layout_symbol["text-field"],"text-field"),"text-font":new kn(_r.layout_symbol["text-font"],"text-font"),"text-size":new kn(_r.layout_symbol["text-size"],"text-size"),"text-max-width":new kn(_r.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new Pi(_r.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new kn(_r.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new kn(_r.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new kn(_r.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new Pi(_r.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new kn(_r.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new kn(_r.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new Pi(_r.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new Pi(_r.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new kn(_r.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new Pi(_r.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new Pi(_r.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new kn(_r.layout_symbol["text-transform"],"text-transform"),"text-offset":new kn(_r.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new Pi(_r.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new Pi(_r.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new Pi(_r.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new Pi(_r.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new kn(_r.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new Pi(_r.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),Hwr=()=>ltt||(ltt=new dc({"icon-opacity":new kn(_r.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new kn(_r.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new kn(_r.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new kn(_r.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new kn(_r.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new Pi(_r.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new Pi(_r.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new kn(_r.paint_symbol["text-opacity"],"text-opacity"),"text-color":new kn(_r.paint_symbol["text-color"],"text-color",{runtimeType:Dv,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new kn(_r.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new kn(_r.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new kn(_r.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new Pi(_r.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new Pi(_r.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Xre={get paint(){return Hwr()},get layout(){return Gwr()}},nat=class{constructor(e){if(e.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:xC,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t!=null&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){if(!this.defaultValue.isConstant()){let t=this.defaultValue.value;e(t._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};Hi("FormatSectionOverride",nat,{omit:["defaultValue"]});dae=e=>e.type==="symbol",jwr=class nne extends Rv{constructor(t,r){super(t,Xre,r)}recalculate(t,r){super.recalculate(t,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new ap(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let o of n)a.includes(o)||a.push(o);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,r,i,n){let a=this.layout.get(t).evaluate(r,{},i,n),o=this._unevaluatedLayout._values[t];return!o.isDataDriven()&&!dq(o.value)&&a?Vwr(r.properties,a):a}createBucket(t){return new IC(t)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let t of Xre.paint.overridableProperties){if(!nne.hasPaintOverride(this.layout,t))continue;let r=this.paint.get(t),i=new One(new nat(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new Qk("source",i):new kB("composite",i,r.value.zoomStops),this.paint._values[t]=new ap(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:nne.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,r){let i=t.get("text-field"),n=Xre.paint.properties[r],a=!1,o=s=>{var l;for(let u of s)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof Bm)o(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let s=u=>{if(!a)if(u instanceof OT&&su(u.value)===bC){let c=u.value;o(c.sections)}else u instanceof Trt?o(u.sections):u.eachChild(s)},l=i.value;l._styleExpression&&s(l._styleExpression.expression)}return a}};Wwr=()=>utt||(utt=new dc({"background-color":new Pi(_r.paint_background["background-color"],"background-color"),"background-pattern":new Lit(_r.paint_background["background-pattern"],"background-pattern"),"background-opacity":new Pi(_r.paint_background["background-opacity"],"background-opacity")})),Ywr={get paint(){return Wwr()}},aat=e=>e.type==="background",Xwr=class extends Rv{constructor(e,t){super(e,Ywr,t)}};sat=e=>e.type==="custom",Zwr=class extends Rv{constructor(e,t){super(e,{},t),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};Kwr=class{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var e;this._triggered||(this._triggered=!0,(e=this._channel)==null||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},Jwr={once:!0},lat=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Kwr(()=>this.process()),this.subscription=Wk(this.target,"message",r=>this.receive(r),!1),this.globalScope=o3(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,i)=>{let n=Math.round(Math.random()*1e18).toString(36).substring(0,10),a=t?Wk(t.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new YT(t.signal.reason))},Jwr):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let o=[],s=da(fn({},e),{id:n,sourceMapId:this.mapId,origin:location.origin,data:Hk(e.data,o)});this.target.postMessage(s,{transfer:o})})}receive(e){let t=e.data,r=t.id,i=["file://","resource://android","null"],n=[t.origin,location.origin],a=t.origin===location.origin,o=n.some(s=>i.includes(s));if((a||o)&&!(t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type===""){delete this.tasks[r];let s=this.abortControllers[r];delete this.abortControllers[r],s&&s.abort();return}if(o3(self)||t.mustQueue){this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,t)}}process(){if(this.taskQueue.length===0)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return Zi(this,null,function*(){if(t.type===""){let n=this.resolveRejects[e];if(delete this.resolveRejects[e],!n)return;t.error?n.reject(Oc(jk(t.error))):n.resolve(jk(t.data));return}if(!this.messageHandlers[t.type]){this.completeTask(e,null,null);return}let r=jk(t.data),i=new AbortController;this.abortControllers[e]=i;try{let n=yield this.messageHandlers[t.type](t.sourceMapId,r,i);this.completeTask(e,null,n)}catch(n){this.completeTask(e,Oc(n))}})}completeTask(e,t,r){let i=[];delete this.abortControllers[e];let n={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?Hk(t):null,data:Hk(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};RC=class{constructor(e,t,r){if(!Qwr(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${2**e}, 0<=y<${2**e} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=n3(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){let i=e5r(this.x,this.y,this.z),n=t5r(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=2**this.z;return new rr((e.x*t-this.x)*qr,(e.y*t-this.y)*qr)}toString(){return`${this.z}/${this.x}/${this.y}`}},zC=class{constructor(e,t){this.wrap=e,this.canonical=t,this.key=n3(e,t.z,t.z,t.x,t.y)}},Gc=class ip{constructor(t,r,i,n,a){if(this.terrainRttPosMatrix32f=null,t= z; overscaledZ = ${t}; z = ${i}`);this.overscaledZ=t,this.wrap=r,this.canonical=new RC(i,+n,+a),this.key=n3(r,t,i,n,a)}clone(){return new ip(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-t;return t>this.canonical.z?new ip(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ip(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,r){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-t;return t>this.canonical.z?n3(this.wrap*+r,t,this.canonical.z,this.canonical.x,this.canonical.y):n3(this.wrap*+r,t,t,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(t){if(t.wrap!==this.wrap||this.overscaledZ-t.overscaledZ<=0)return!1;if(t.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-t.canonical.z;return r<0?!1:t.canonical.x===this.canonical.x>>r&&t.canonical.y===this.canonical.y>>r}children(t){if(this.overscaledZ>=t)return[new ip(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new ip(r,this.wrap,r,i,n),new ip(r,this.wrap,r,i+1,n),new ip(r,this.wrap,r,i,n+1),new ip(r,this.wrap,r,i+1,n+1)]}isLessThan(t){return this.wrapt.wrap?!1:this.overscaledZt.overscaledZ?!1:this.canonical.xt.canonical.x?!1:this.canonical.y=0&&t=0&&r=u)return null;let f=this.canonical.x+n,h=this.wrap;return f<0?(h-=Math.ceil(-f/u),f=(f%u+u)%u):f>=u&&(h+=Math.floor(f/u),f%=u),{tileID:new ip(this.overscaledZ,h,l,f,c),x:o,y:s}}};Zre=Math.PI*6378137;Hi("CanonicalTileID",RC),Hi("OverscaledTileID",Gc,{omit:["terrainRttPosMatrix32f"]});BC="_geojsonTileLayer",r5r=class{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}},gae=class{constructor(e,t,r,i,n){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=i,this._z=t;for(let a in e.properties)typeof e.properties[a]=="string"&&e.properties[a].startsWith("__$json__:")&&(e.properties[a]=JSON.parse(e.properties[a].slice(10)));this.properties=e.properties,this.id=n}projectPoint(e,t,r,i){return[(e.x+t)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(e.y+r)*2/i)*Math.PI))-90]}projectLine(e,t,r,i){return e.map(n=>this.projectPoint(n,t,r,i))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*2**this._z,r=e.extent*this._x,i=e.extent*this._y,n=e.loadGeometry();switch(e.type){case 1:{let a=[];for(let s of n)a.push(s[0]);let o=this.projectLine(a,r,i,t);this._geometry=a.length===1?{type:"Point",coordinates:o[0]}:{type:"MultiPoint",coordinates:o};break}case 2:{let a=n.map(o=>this.projectLine(o,r,i,t));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=wnt(n),o=[];for(let s of a)o.push(s.map(l=>this.projectLine(l,r,i,t)));this._geometry=o.length===1?{type:"Polygon",coordinates:o[0]}:{type:"MultiPolygon",coordinates:o};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)t!=="_geometry"&&t!=="_vectorTileFeature"&&t!=="_x"&&t!=="_y"&&t!=="_z"&&(e[t]=this[t]);return e}},y3=class{constructor(e,t,r){this._name=e,this.dataBuffer=t,typeof r=="number"?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){var t;return((t=this.nullabilityBuffer)==null?void 0:t.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},Pq=class extends y3{},mae=class extends Pq{getValueFromBuffer(e){return this.dataBuffer[e]}},yae=class extends Pq{getValueFromBuffer(e){return this.dataBuffer[e]}},uat=class extends y3{constructor(e,t,r,i){super(e,t,i),this.delta=r}},xae=class extends uat{constructor(e,t,r,i,n){super(e,n?Int32Array.of(t):Uint32Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}},bae=class extends y3{constructor(e,t,r,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},i5r=class{constructor(e,t,r,i,n=4096){if(this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=i,this._extent=n,e.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var e;return(e=this._propertyVectors)!=null?e:[]}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(t=>[t.name,t]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r>>32-e;ane=_ae,wae=65536;one=hat(wae),k5r=3*one/256+one|0;(function(e){e.PRESENT="PRESENT",e.DATA="DATA",e.OFFSET="OFFSET",e.LENGTH="LENGTH"})(ou||(ou={}));(function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.SHARED="SHARED",e.VERTEX="VERTEX",e.MORTON="MORTON",e.FSST="FSST"})(Nf||(Nf={}));(function(e){e.VERTEX="VERTEX",e.INDEX="INDEX",e.STRING="STRING",e.KEY="KEY"})(ag||(ag={}));(function(e){e.VAR_BINARY="VAR_BINARY",e.GEOMETRIES="GEOMETRIES",e.PARTS="PARTS",e.RINGS="RINGS",e.TRIANGLES="TRIANGLES",e.SYMBOL="SYMBOL",e.DICTIONARY="DICTIONARY"})(ju||(ju={}));y4r=[ou.PRESENT,ou.DATA,ou.OFFSET,ou.LENGTH],vtt=[va.NONE,va.DELTA,va.COMPONENTWISE_DELTA,va.RLE,va.MORTON],x4r=[H0.NONE,H0.FAST_PFOR,H0.VARINT],b4r=[Nf.NONE,Nf.SINGLE,Nf.SHARED,Nf.VERTEX,Nf.MORTON,Nf.FSST],_4r=[ag.VERTEX,ag.INDEX,ag.STRING,ag.KEY],w4r=[ju.VAR_BINARY,ju.GEOMETRIES,ju.PARTS,ju.RINGS,ju.TRIANGLES,ju.SYMBOL,ju.DICTIONARY];(function(e){e[e.FLAT=0]="FLAT",e[e.CONST=1]="CONST",e[e.SEQUENCE=2]="SEQUENCE",e[e.DICTIONARY=3]="DICTIONARY",e[e.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Bs||(Bs={}));Lv=class{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8),r=e%8;return(this.values[t]>>r&1)==1}set(e,t){let r=Math.floor(e/8),i=e%8;this.values[r]=this.values[r]|+!!t<>r&1}size(){return this._size}getBuffer(){return this.values}};D4r=new TextDecoder;Mat=class extends Pq{getValueFromBuffer(e){return this.dataBuffer[e]}},Sat=class extends uat{constructor(e,t,r,i,n){super(e,n?BigInt64Array.of(t):BigUint64Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}};(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON",e[e.MULTIPOINT=3]="MULTIPOINT",e[e.MULTILINESTRING=4]="MULTILINESTRING",e[e.MULTIPOLYGON=5]="MULTIPOLYGON"})(qc||(qc={}));(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON"})(mtt||(mtt={}));(function(e){e[e.MORTON=0]="MORTON",e[e.VEC_2=1]="VEC_2",e[e.VEC_3=2]="VEC_3"})(fx||(fx={}));Eat=class{constructor(e,t,r,i,n){this._vertexBufferType=e,this._topologyVector=t,this._vertexOffsets=r,this._vertexBuffer=i,this._mortonSettings=n}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let t=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let r=this.vertexOffsets[e],i=this.vertexBuffer[r],n=Cae(i,this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[n.x,n.y]}let t=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getGeometries(){return V4r(this)}get mortonSettings(){return this._mortonSettings}};kat=class extends Eat{constructor(e,t,r,i,n,a,o){super(r,i,n,a,o),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===qc.POLYGON||this._geometryType===qc.MULTIPOLYGON}containsSingleGeometryType(){return!0}};Dat=class extends Eat{constructor(e,t,r,i,n,a){super(e,r,i,n,a),this._geometryTypes=t}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;eda(fn({},r),{[i.name]:new RTr(i)}),{})}},BTr=class{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new fie(qr,16,0),this.grid3D=new fie(qr,16,0),this.featureIndexArray=new Git,this.promoteId=t}insert(e,t,r,i,n,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let s=a?this.grid3D:this.grid;for(let l of t){let u=[1/0,1/0,-1/0,-1/0];for(let c of l)u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new zTr(this.rawTileData).layers:this.vtLayers=new F_r(new Unt(this.rawTileData)).layers,this.sourceLayerCoder=new r5r(this.vtLayers?Object.keys(this.vtLayers).sort():[BC])),this.vtLayers}query(e,t,r,i){this.loadVTLayers();let n=e.params,a=qr/e.tileSize/e.scale,o=VT(n.filter,"queryRenderedFeatures filter",n.globalState),s=e.queryGeometry,l=e.queryPadding*a,u=lp.fromPoints(s),c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),f=lp.fromPoints(e.cameraQueryGeometry).expandBy(l),h=this.grid3D.query(f.minX,f.minY,f.maxX,f.maxY,(v,m,g,w)=>Sbr(e.cameraQueryGeometry,v-l,m-l,g+l,w+l));for(let v of h)c.push(v);c.sort(OTr);let p={},d;for(let v of c){if(v===d)continue;d=v;let m=this.featureIndexArray.get(v),g=null;this.loadMatchingFeature(p,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,o,n.layers,n.availableImages,t,r,i,(w,_,b)=>(g||(g=v3(w)),_.queryIntersectsFeature({queryGeometry:s,feature:w,featureState:b,geometry:g,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return p}loadMatchingFeature(e,t,r,i,n,a,o,s,l,u,c){let f=this.bucketLayerIDs[t];if(a&&!f.some(v=>a.has(v)))return;let h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(i);if(n.needGeometry){let v=vx(p,!0);if(!n.filter(new Io(this.tileID.overscaledZ),v,this.tileID.canonical))return}else if(!n.filter(new Io(this.tileID.overscaledZ),p))return;let d=this.getId(p,h);for(let v of f){if(a&&!a.has(v))continue;let m=s[v];if(!m)continue;let g={};d&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",d));let w=dn({},l[v]);w.paint=Mtt(w.paint,m.paint,p,g,o),w.layout=Mtt(w.layout,m.layout,p,g,o);let _=!c||c(p,m,g);if(!_)continue;let b=new gae(p,this.z,this.x,this.y,d);b.layer=w;let M=e[v];M===void 0&&(M=e[v]=[]),M.push({featureIndex:i,feature:b,intersectionZ:_})}}lookupSymbolFeatures(e,t,r,i,n,a,o,s){let l={};this.loadVTLayers();let u=VT(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let c of e)this.loadMatchingFeature(l,r,i,c,u,a,o,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){var i;let r=e.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[t];r=e.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=e.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(e.properties.cluster_id))}return r}};Hi("FeatureIndex",BTr,{omit:["rawTileData","sourceLayerCoder"]});Nat=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let i=e.wrapped().key;this.data[i]===void 0&&(this.data[i]=[]);let n={value:t,timeout:void 0};if(r!==void 0&&(n.timeout=setTimeout(()=>{this.remove(e,n)},r)),this.data[i].push(n),this.order.push(i),this.order.length>this.max){let a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,i=t===void 0?0:this.data[r].indexOf(t),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),this.data[r].length===0&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(e){let t=[];for(let r in this.data)for(let i of this.data[r])e(i.value)||t.push(i);for(let r of t)this.remove(r.value.tileID,r)}}});var Olt={};Jn(Olt,{AJAXError:()=>zT,AttributionControl:()=>Flt,BoxZoomHandler:()=>xlt,CanvasSource:()=>bst,CooperativeGesturesHandler:()=>Clt,DoubleClickZoomHandler:()=>Mlt,DragPanHandler:()=>Slt,DragRotateHandler:()=>Elt,EXTENT:()=>qr,EdgeInsets:()=>foe,ErrorEvent:()=>Mn,Event:()=>o0,Evented:()=>cu,FullscreenControl:()=>aCr,FullscreenEvent:()=>yoe,GPUInitializationError:()=>mlt,GeoJSONSource:()=>vst,GeolocateControl:()=>eCr,GeolocateErrorEvent:()=>Blt,GeolocateEvent:()=>w3,GeolocatePositionEvent:()=>moe,GlobeControl:()=>sCr,Hash:()=>ylt,ImageSource:()=>l6,KeyboardHandler:()=>Tlt,LngLat:()=>yn,LngLatBounds:()=>Ov,LogoControl:()=>Llt,Map:()=>$kr,MapBoxZoomEvent:()=>toe,MapContextEvent:()=>Zq,MapLibreEvent:()=>vc,MapLibreMap:()=>$kr,MapMouseEvent:()=>s0,MapMovementEvent:()=>Cn,MapProjectionEvent:()=>rst,MapSourceDataEvent:()=>Ns,MapStyleDataEvent:()=>dp,MapStyleImageMissingEvent:()=>ist,MapStyleLoadEvent:()=>eoe,MapTerrainEvent:()=>tst,MapTouchEvent:()=>ZC,MapWheelEvent:()=>est,Marker:()=>goe,MarkerClickEvent:()=>zlt,MarkerDragEvent:()=>_3,MercatorCoordinate:()=>Mo,NavigationControl:()=>Ykr,Point:()=>rr,Popup:()=>cCr,PopupEvent:()=>xoe,RasterDEMTileSource:()=>dst,RasterTileSource:()=>Aoe,ScaleControl:()=>rCr,ScrollZoomHandler:()=>Alt,Style:()=>doe,TerrainControl:()=>oCr,TwoFingersTouchPitchHandler:()=>wlt,TwoFingersTouchRotateHandler:()=>_lt,TwoFingersTouchZoomHandler:()=>blt,TwoFingersTouchZoomRotateHandler:()=>klt,VectorTileSource:()=>hst,VideoSource:()=>xst,addProtocol:()=>ort,addSourceType:()=>rAr,clearPrewarmedResources:()=>C6r,config:()=>a0,createTileMesh:()=>mst,getGlobalDispatcher:()=>Toe,getMaxParallelImageRequests:()=>yCr,getRTLTextPluginStatus:()=>pCr,getVersion:()=>vCr,getWorkerCount:()=>gCr,getWorkerUrl:()=>bCr,importScriptInWorkers:()=>wCr,isTimeFrozen:()=>jTr,now:()=>zo,prewarm:()=>k6r,removeProtocol:()=>srt,restoreNow:()=>HTr,setMaxParallelImageRequests:()=>xCr,setNow:()=>GTr,setRTLTextPlugin:()=>dCr,setWorkerCount:()=>mCr,setWorkerUrl:()=>_Cr});function Qot(){var e=new Wu(4);return Wu!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function NTr(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*a-n*i;return o?(o=1/o,e[0]=a*o,e[1]=-i*o,e[2]=-n*o,e[3]=r*o,e):null}function UTr(e){return e[0]*e[3]-e[2]*e[1]}function VTr(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=i*l+a*s,e[1]=n*l+o*s,e[2]=i*-s+a*l,e[3]=n*-s+o*l,e}function zo(){return uO.getCurrentTime()}function GTr(e){uO.setNow(e)}function HTr(){uO.restoreNow()}function jTr(){return uO.isFrozen()}function Iae(){return UC!=null||(UC={getAttribute:Element.prototype.getAttribute,getAttributeNames:Element.prototype.getAttributeNames,querySelectorAll:Element.prototype.querySelectorAll,remove:Element.prototype.remove,removeAttribute:Element.prototype.removeAttribute,localName:Object.getOwnPropertyDescriptor(Element.prototype,"localName").get,namespaceURI:Object.getOwnPropertyDescriptor(Element.prototype,"namespaceURI").get}),UC}function KTr(e,t){let r={};for(let i in e)i!=="ref"&&(r[i]=e[i]);return crt.forEach(i=>{i in t&&(r[i]=t[i])}),r}function Vat(e){e=e.slice();let t=Object.create(null);for(let r=0;r{"source"in s&&n[s.source]?r.push({command:"removeLayer",args:[s.id]}):o.push(s)}),r=r.concat(a),t6r(o,t.layers,r),i&&t.terrain&&r.push({command:"setTerrain",args:[t.terrain]})}catch(i){console.warn("Unable to compute style diff:",i),r=[{command:"setStyle",args:[t]}]}return r}function i6r(){let e={},t=_r.$version;for(let r in _r.$root){let i=_r.$root[r];if(i.required){let n=null;n=r==="version"?t:i.type==="array"?[]:{},n!=null&&(e[r]=n)}}return e}function Kq(e){let t=[];if(typeof e=="string")t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:i,url:n}of e){let a=`${i}${n}`;r.includes(a)||(r.push(a),t.push({id:i,url:n}))}}return t}function $at(e,t,r){try{let i=new URL(e);return i.pathname+=`${t}${r}`,i.toString()}catch(i){throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function n6r(e,t,r,i){return Zi(this,null,function*(){let n=Kq(e),a=r>1?"@2x":"",o={},s={};for(let{id:l,url:u}of n){let c=yield t.transformRequest($at(u,a,".json"),"SpriteJSON");o[l]=yC(c,i);let f=yield t.transformRequest($at(u,a,".png"),"SpriteImage");s[l]=qv.getImage(f,i)}return yield Promise.all([...Object.values(o),...Object.values(s)]),a6r(o,s)})}function a6r(e,t){return Zi(this,null,function*(){let r={};for(let i in e){r[i]={};let n=(yield t[i]).data;if(!n)throw Error(`Could not load sprite image for ${i}: the response is empty`);let a=l0.getImageCanvasContext(n),o=(yield e[i]).data;for(let s in o){let{width:l,height:u,x:c,y:f,sdf:h,pixelRatio:p,stretchX:d,stretchY:v,content:m,textFitWidth:g,textFitHeight:w}=o[s],_={width:l,height:u,x:c,y:f,context:a};r[i][s]={data:null,pixelRatio:p,sdf:h,stretchX:d,stretchY:v,content:m,textFitWidth:g,textFitHeight:w,spriteData:_}}}return r})}function c6r(e){let t=/^u\+([0-9a-f]*)(\?+)$/i.exec(e);if(t){let[,n,a]=t;return n.length+a.length>6?null:Wat(parseInt(`${n}${"0".repeat(a.length)}`,16),parseInt(`${n}${"f".repeat(a.length)}`,16))}let r=/^u\+([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);if(!r)return null;let i=parseInt(r[1],16);return Wat(i,r[2]===void 0?i:parseInt(r[2],16))}function Wat(e,t){return e>t||e>roe?null:{start:e,end:Math.min(t,roe)}}function f6r(e,t){return e.ranges.some(({start:r,end:i})=>t>=r&&t<=i)}function Yat(e,t,r,i,n,a,o,s,l){for(let u=t;u-1);l++,a[l]=s,o[l]=u,o[l+1]=ioe}for(let s=0,l=0;smC(t,r))),Bq}function D6r(e,t){let r=Om();return lu(r,r,[1,1,0]),Nc(r,r,[e.width*.5,e.height*.5,1]),e.calculatePosMatrix?c3(r,r,e.calculatePosMatrix(t.toUnwrapped())):r}function F6r(e,t,r){if(e)for(let i of e){let n=t[i];if((n==null?void 0:n.source)===r&&n.type==="fill-extrusion")return!0}else for(let i in t){let n=t[i];if(n.source===r&&n.type==="fill-extrusion")return!0}return!1}function L6r(e,t,r,i,n,a,o){var f;let s=F6r((f=n==null?void 0:n.layers)!=null?f:null,t,e.id),l=a.maxPitchScaleFactor(),u=e.tilesIn(i,l,s);u.sort(lst);let c=[];for(let h of u)c.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(t,r,e.getState(),h.queryGeometry,h.cameraQueryGeometry,h.scale,n,a,l,D6r(a,h.tileID),o?(p,d)=>o(h.tileID,p,d):void 0)});return z6r(R6r(c),e)}function P6r(e,t,r,i,n,a,o){let s={},l=a.queryRenderedSymbols(i),u=[];for(let c of Object.keys(l).map(Number))u.push(o[c]);u.sort(lst);for(let c of u){let f=c.featureIndex.lookupSymbolFeatures(l[c.bucketInstanceId],t,c.bucketIndex,c.sourceLayerIndex,{filterSpec:n.filter,globalState:n.globalState},n.layers,n.availableImages,e);for(let h in f){s[h]||(s[h]=[]);let p=f[h];p.sort((d,v)=>{let m=c.featureSortOrder;if(m){let g=m.indexOf(d.featureIndex);return m.indexOf(v.featureIndex)-g}return v.featureIndex-d.featureIndex});for(let d of p)s[h].push(d)}}return B6r(s,e,r)}function I6r(e,t){let r=e.getRenderableIds().map(a=>e.getTileByID(a)),i=[],n={};for(let a of r){let o=a.tileID.canonical.key;n[o]||(n[o]=!0,a.querySourceFeatures(i,t))}return i}function lst(e,t){let r=e.tileID,i=t.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}function R6r(e){let t={},r={};for(let{queryResults:i,wrappedTileID:n}of e){r[n]||(r[n]={});let a=r[n];for(let o in i){let s=i[o];a[o]||(a[o]={});let l=a[o];t[o]||(t[o]=[]);for(let u of s)l[u.featureIndex]||(l[u.featureIndex]=!0,t[o].push(u))}}return t}function z6r(e,t){for(let r in e)for(let i of e[r])ust(i,t);return e}function B6r(e,t,r){for(let i in e)for(let n of e[i]){let a=r[t[i].source];ust(n,a)}return e}function ust(e,t){let r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}function cst(e,t,r,i){return Zi(this,null,function*(){let n=e;if(e.url?n=(yield yC(yield t.transformRequest(e.url,"Source"),r)).data:yield l0.frameAsync(r,i),!n)return null;let a=WT(dn(n,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in n&&n.vector_layers&&(a.vectorLayerIds=n.vector_layers.map(o=>o.id)),a})}function rO(e,t){return t?e.properties[t]:e.id}function q6r(e,t){let r=new Map;if(e==null||e.type==null)return r;if(e.type==="Feature"){let i=rO(e,t);return i==null?void 0:(r.set(i,e),r)}if(e.type==="FeatureCollection"){let i=new Set;for(let n of e.features){let a=rO(n,t);if(a==null||i.has(a))return;i.add(a),r.set(a,n)}return r}}function O6r(e,t,r){var n,a;let i=[];if(t.removeAll)e.clear();else if(t.remove)for(let o of t.remove){let s=e.get(o);s&&(i.push(s.geometry),e.delete(o))}if(t.add)for(let o of t.add){let s=rO(o,r);if(s==null)continue;let l=e.get(s);l&&i.push(l.geometry),i.push(o.geometry),e.set(s,o)}if(t.update)for(let o of t.update){let s=e.get(o.id);if(!s)continue;let l=!!o.newGeometry,u=o.removeAllProperties||((n=o.removeProperties)==null?void 0:n.length)>0||((a=o.addOrUpdateProperties)==null?void 0:a.length)>0;if(!l&&!u)continue;i.push(s.geometry);let c=fn({},s);if(e.set(o.id,c),l&&(i.push(o.newGeometry),c.geometry=o.newGeometry),u){if(c.properties=o.removeAllProperties?{}:fn({},c.properties||{}),o.removeProperties)for(let f of o.removeProperties)delete c.properties[f];if(o.addOrUpdateProperties)for(let{key:f,value:h}of o.addOrUpdateProperties)c.properties[f]=h}}return i}function N6r(e,t,r){if(!e)return t||{};if(!t)return e||{};let i=Jat(e,r),n=Jat(t,r);U6r(i,n);let a={};if((i.removeAll||n.removeAll)&&(a.removeAll=!0),a.remove=new Set([...i.remove,...n.remove]),a.add=new Map([...i.add,...n.add]),a.update=new Map([...i.update,...n.update]),a.remove.size&&a.add.size)for(let o of a.add.keys())a.remove.delete(o);return G6r(a)}function U6r(e,t){t.removeAll&&(e.add.clear(),e.update.clear(),e.remove.clear(),t.remove.clear());for(let r of t.remove)e.add.delete(r),e.update.delete(r);for(let[r,i]of t.update){let n=e.update.get(r);n&&(t.update.set(r,V6r(n,i)),e.update.delete(r))}}function V6r(e,t){let r={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties&&e.addOrUpdateProperties){let i=new Set(t.removeProperties);e.addOrUpdateProperties=e.addOrUpdateProperties.filter(n=>!i.has(n.key))}return(e.removeAllProperties||t.removeAllProperties)&&(r.removeAllProperties=!0),(e.removeProperties||t.removeProperties)&&(r.removeProperties=[...e.removeProperties||[],...t.removeProperties||[]]),(e.addOrUpdateProperties||t.addOrUpdateProperties)&&(r.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...t.addOrUpdateProperties||[]]),(e.newGeometry||t.newGeometry)&&(r.newGeometry=t.newGeometry||e.newGeometry),r}function Jat(e,t){var i,n;if(!e)return{};let r={};return r.removeAll=e.removeAll,r.remove=new Set(e.remove||[]),r.add=new Map((i=e.add)==null?void 0:i.map(a=>[rO(a,t),a])),r.update=new Map((n=e.update)==null?void 0:n.map(a=>[a.id,a])),r}function G6r(e){let t={};return e.removeAll&&(t.removeAll=e.removeAll),e.remove&&(t.remove=Array.from(e.remove)),e.add&&(t.add=Array.from(e.add.values())),e.update&&(t.update=Array.from(e.update.values())),t}function pst(e){return!e||e.length===0?[]:typeof e[0]=="number"?[e]:e.flatMap(t=>pst(t))}function Jq(e){return e.type==="GeometryCollection"?e.geometries.flatMap(t=>Jq(t)):pst(e.coordinates)}function Qat(e){let t=new Ov,r;switch(e.type){case"FeatureCollection":r=e.features.flatMap(i=>Jq(i.geometry));break;case"Feature":r=Jq(e.geometry);break;default:r=Jq(e)}if(r.length===0)return t;for(let i of r){let[n,a]=i;t.extend([n,a])}return t}function H6r({x:e,y:t,z:r},i=0){let n=Mq((e-i)/2**r),a=jT((t+1+i)/2**r),o=Mq((e+1+i)/2**r),s=jT((t-i)/2**r);return new Ov([n,a],[o,s])}function W6r(e){e*=Math.PI/180;let t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}function Y6r(e){return e>0?1/(1-e):1+e}function X6r(e){return e>0?1-1/(1.001-e):-e}function gst(e,t){let r=mst(t,"16bit"),i=Hm.deserialize({arrayBuffer:r.vertices,length:r.vertices.byteLength/2/2}),n=zv.deserialize({arrayBuffer:r.indices,length:r.indices.byteLength/2/3});return new e8(e.createVertexBuffer(i,T3.members),e.createIndexBuffer(n),Js.simpleSegment(0,0,i.length,n.length))}function mst(e,t){let r=e.granularity===void 0?1:Math.max(e.granularity,1),i=r+(e.generateBorders?2:0),n=r+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),a=i+1,o=n+1,s=e.generateBorders?-1:0,l=e.generateBorders||e.extendToNorthPole?-1:0,u=r+ +!!e.generateBorders,c=r+(e.generateBorders||e.extendToSouthPole?1:0),f=a*o,h=i*n*6,p=a*o>65536;if(p&&t==="16bit")throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let d=p||t==="32bit",v=new Int16Array(f*2),m=0;for(let _=l;_<=c;_++)for(let b=s;b<=u;b++){let M=b/r*qr;b===-1&&(M=-qq),b===r+1&&(M=qr+qq);let x=_/r*qr;_===-1&&(x=e.extendToNorthPole?LT:-qq),_===r+1&&(x=e.extendToSouthPole?PT:qr+qq),v[m++]=M,v[m++]=x}let g=d?new Uint32Array(h):new Uint16Array(h),w=0;for(let _=0;_=1&&g<=512)||w>=1?a6:[d,v,w]}function Q6r(e){let t=(1-4/e)/.9921875;return Math.max(0,t)}function yst(e){let[t,r,i,n]=e;return t.x+i.x===r.x+n.x&&t.y+i.y===r.y+n.y}function iAr(e,t){let r={};if(!t)return r;for(let i of e){let n=i.layerIds.map(a=>t.getLayer(a)).filter(Boolean);if(n.length!==0){i.layers=n,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(a=>n.filter(o=>o.id===a)[0]));for(let a of n)r[a.id]=i}}return r}function QC(){return zae||(zae=new nAr),zae}function eot(e){let t=[];for(let r in e)t.push({id:r,state:e[r]});return t}function oAr(e,t,r,i){let n=Uc([],e,t),a=1/n[3]/r*i;return Ntt(n,n,[a,a,1/n[3],a])}function sAr(e,t,r,i){let n=i?4:0,a=i?0:4,o=0,s=[],l=[];for(let f=0;f<4;f++){let h=cg([],e[f+a],e[f+n]),p=cp(h);qs(h,h,1/p),s.push(p),l.push(h)}for(let f=0;f<4;f++){let h=Gtt(e[f+n],l[f],r);o=h!==null&&h>=0?Math.max(o,h):Math.max(o,s[f])}let u=lAr(e,t),c=uAr(r,u);if(c!==null){let f=c/uu(l[0],u);o=Math.min(o,f)}for(let f=0;f<4;f++){let h=Math.min(o,s[f]);e[f+a]=[e[f+n][0]+l[f][0]*h,e[f+n][1]+l[f][1]*h,e[f+n][2]+l[f][2]*h,1]}}function lAr(e,t){let r=cg([],e[t[0]],e[t[1]]),i=cg([],e[t[2]],e[t[1]]),n=[0,0,0,0];return Uf(n,gh([],r,i)),n[3]=-uu(n,e[t[0]]),n}function uAr(e,t){let r=hC(e),i=Ott([],e,1/r),n=cg([],t,qs([],i,uu(t,i))),a=hC(n);if(a>0){let o=Math.sqrt(1-i[3]*i[3]),s=qs([],i,-i[3]),l=j0([],s,qs([],n,o/a));return ZB(t,l)}return null}function cAr(e,t,r){let i=t.intersectsFrustum(e);if(!r||i===0)return i;let n=t.intersectsPlane(r);return n===0?0:i===2&&n===2?2:1}function tot(e,t,r){let i=0,n=(r-t)/10;for(let a=0;a<10;a++){let o=t+(a+.5)/10*(r-t);i+=n*Math.cos(o)**+e}return i}function aoe(e,t){return function(r,i,n,a,o){let s=2*((e-1)/Vc(Math.cos(Os(mx-o))/Math.cos(Os(mx)))-1),l=Math.acos(n/a),u=2*tot(s-1,0,Os(o/2)),c=Math.min(Os(mx),l+Os(o/2)),f=Math.min(c,l-Os(o/2)),h=tot(s-1,f,c),p=Math.atan(i/n),d=Math.hypot(i,n),v=r;return v+=Vc(a/d/Math.max(.5,Math.cos(Os(o/2)))),v+=s*Vc(Math.cos(p))/2,v-=Vc(Math.max(1,h/u/t))/2,v}}function Eoe(e,t){let r=(t.roundZoom?Math.round:Math.floor)(e.zoom+Vc(e.tileSize/t.tileSize));return Math.max(0,r)}function hAr(e,t){let r=mx-e.pitch-e.fov/2,i=ea((15-r)/15,0,1),n=Math.max(500,t!=null?t:0);return e.elevation+i*n}function dAr(e,t,r){let i=e.planes[1],n=e.points.map(l=>{let u=i[0]*l[0]+i[1]*l[1]+i[2]*l[2]+i[3];if(Math.abs(u)>1e-6)return l;let c=[l[0]-r[0],l[1]-r[1],l[2]-r[2]],f=i[0]*c[0]+i[1]*c[1]+i[2]*c[2];if(f>=-1e-9)return l;let h=t/-f;return[l[0]+c[0]*h,l[1]+c[1]*h,l[2]+c[2]*h,l[3]]}),a=e.planes.map((l,u)=>u===1?[l[0],l[1],l[2],l[3]+t]:l),o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0];for(let l of n)for(let u=0;u<3;u++)o[u]=Math.min(o[u],l[u]),s[u]=Math.max(s[u],l[u]);return new Soe(n,a,new Moe(o,s))}function pAr(e,t,r,i){let n=Math.hypot(t[0],t[1],t[2]);if(n===0)return{frustum:e,plane:t};let a=1+i/Hf,o=ea(-t[3]/n,-1,1),s=Math.cos(Math.acos(o)+Math.acos(1/a));return{frustum:dAr(e,Math.sqrt(a*a-1),r),plane:[t[0],t[1],t[2],-s*n]}}function u6(e,t){let r=e.getCameraFrustum(),i=e.getClippingPlane();i&&t.maxContentElevation>0&&({frustum:r,plane:i}=pAr(r,i,e.cameraPosition,t.maxContentElevation));let n=Snt(e),a=Mo.fromLngLat(e.center,e.elevation),o=hAr(e,t.maxContentElevation),s=e.getCoveringTilesDetailsProvider(),l=s.allowVariableZoom(e,t),u=Eoe(e,t),c=t.minzoom||0,f=t.maxzoom===void 0?e.maxZoom:t.maxzoom,h=Math.min(Math.max(0,u),f),p=2**h,d=[p*n.x,p*n.y,0],v=[p*a.x,p*a.y,0],m=Math.hypot(a.x-n.x,a.y-n.y),g=Math.abs(a.z-n.z),w=Math.hypot(m,g),_=x=>({zoom:0,x:0,y:0,wrap:x,fullyVisible:!1}),b=[],M=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let x=1;x<=3;x++)b.push(_(-x)),b.push(_(x));for(b.push(_(0));b.length>0;){let x=b.pop(),A=x.x,T=x.y,y=x.fullyVisible,E={x:A,y:T,z:x.zoom},S=s.getTileBoundingVolume(E,x.wrap,o,t);if(!y){let F=cAr(r,S,i);if(F===0)continue;y=F===2}let C=s.distanceToTile2d(n.x,n.y,E,S),k=u;l&&(k=(t.calculateTileZoom||fAr)(e.zoom+Vc(e.tileSize/t.tileSize),C,g,w,e.fov)),k=(t.roundZoom?Math.round:Math.floor)(k),k=Math.max(0,k);let D=Math.min(k,f);if(x.wrap=s.getWrap(a,E,x.wrap),x.zoom>=D){if(x.zoom>1),L=x.zoom+1;b.push({zoom:L,x:P,y:R,wrap:x.wrap,fullyVisible:y})}}return M.sort((x,A)=>x.distanceSq-A.distanceSq).map(x=>x.tileID)}function rot(e){return e==="raster"||e==="image"||e==="video"}function vAr(e,t,r,i,n,a,o){let s=zo(),l=jtt(t);for(let u of t){let c=e.getTileById(u.key);(c.fadingDirection===0||c.fadeOpacity===0)&&c.resetFadeLogic(),!gAr(e,c,r,s,i,n,o)&&(mAr(e,c,r,s,a,o)||yAr(c,l,s,o)||c.resetFadeLogic())}}function gAr(e,t,r,i,n,a,o){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:u,fadingParentID:c}=t;if(l===0&&u===1&&c)return r[c.key]=c,!0;let f=Math.max(s.overscaledZ-n,a);for(let h=s.overscaledZ-1;h>=f;h--){let p=s.scaledTo(h),d=e.getLoadedTile(p);if(d)return t.setCrossFadeLogic({fadingRole:0,fadingDirection:1,fadingParentID:d.tileID,fadeEndTime:i+o}),d.setCrossFadeLogic({fadingRole:1,fadingDirection:0,fadeEndTime:i+o}),r[p.key]=p,!0}return!1}function mAr(e,t,r,i,n,a){if(!t.hasData())return!1;let o=t.tileID.children(n),s=iot(e,t,o,r,i,n,a);if(s)return!0;for(let l of o)iot(e,t,l.children(n),r,i,n,a)&&(s=!0);return s}function iot(e,t,r,i,n,a,o){if(r[0].overscaledZ>=a)return!1;let s=!1;for(let l of r){let u=e.getLoadedTile(l);if(!u)continue;let{fadingRole:c,fadingDirection:f,fadingParentID:h}=u;(c!==0||f!==0||!h)&&(u.setCrossFadeLogic({fadingRole:0,fadingDirection:0,fadingParentID:t.tileID,fadeEndTime:n+o}),t.setCrossFadeLogic({fadingRole:1,fadingDirection:1,fadeEndTime:n+o})),i[l.key]=l,s=!0}return s}function yAr(e,t,r,i){let n=e.tileID;if(e.selfFading)return!0;if(e.hasData())return!1;if(t.has(n)){let a=r+i;return e.setSelfFadeLogic(a),!0}return!1}function xAr(e,t){if(t<=0)return!1;let r=zo();for(let i of e.getAllTiles())if(i.fadeEndTime>=r)return!0;return!1}function bAr(e,t){var i,n,a;let r=t.getRenderableIds();for(let o of r){if(!((i=e.neighboringTiles)!=null&&i[o]))continue;let s=t.getTileById(o);e.neighboringTiles[o].backfilled||not(e,s),!((a=(n=s.neighboringTiles)==null?void 0:n[e.tileID.key])!=null&&a.backfilled)&¬(s,e)}}function not(e,t){var o;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0;let r=t.tileID.canonical.x-e.tileID.canonical.x,i=t.tileID.canonical.y-e.tileID.canonical.y,n=2**e.tileID.canonical.z,a=t.tileID.key;(r!==0||i!==0)&&(Math.abs(i)>1||(Math.abs(r)>1&&(Math.abs(r+n)===1?r+=n:Math.abs(r-n)===1&&(r-=n)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,i),(o=e.neighboringTiles)!=null&&o[a]&&(e.neighboringTiles[a].backfilled=!0))))}function Qq(e,t,r,i,n){return n?e?e(t,r)+i:i===0?void 0:i:i}function Oq(e,t){let r=!0;return e==="always"||(e==="never"||t==="never")&&(r=!1),r}function wAr(e,t){let r=1/(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),i=1/(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]),n=t[0]*r,a=t[4]*r,o=t[8]*i,s=t[1]*r,l=t[5]*r,u=t[9]*i,c=t[2]*r,f=t[6]*r,h=t[10]*i;e[0]=n,e[1]=a,e[2]=o,e[4]=s,e[5]=l,e[6]=u,e[8]=c,e[9]=f,e[10]=h;let p=t[12],d=t[13],v=t[14];return e[12]=-n*p-s*d-c*v,e[13]=-a*p-l*d-f*v,e[14]=-o*p-u*d-h*v,e[3]=0,e[7]=0,e[11]=0,e[15]=1,e}function TAr(e,t){return e[0]=1/t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/t[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/t[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=t[10]/t[14],e}function AAr(e,t){let r=1/(t[0]*t[5]-t[1]*t[4]);return e[0]=t[5]*r,e[1]=-t[1]*r,e[2]=0,e[3]=0,e[4]=-t[4]*r,e[5]=t[0]*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1/t[10],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1/t[15],e}function koe(e,t,r){let i=Om();if(!e){let{vecSouth:n,vecEast:a}=Coe(t),o=Qot();o[0]=a[0],o[1]=a[1],o[2]=n[0],o[3]=n[1],NTr(o,o),i[0]=o[0],i[1]=o[1],i[4]=o[2],i[5]=o[3]}return Nc(i,i,[1/r,1/r,1]),i}function SAr(e,t,r,i){if(e){let n=Om();if(!t){let{vecSouth:a,vecEast:o}=Coe(r);n[0]=o[0],n[1]=o[1],n[4]=a[0],n[5]=a[1]}return Nc(n,n,[i,i,1]),n}return r.pixelsToClipSpaceMatrix}function Coe(e){let t=Math.cos(e.rollInRadians),r=Math.sin(e.rollInRadians),i=Math.cos(e.pitchInRadians),n=Math.cos(e.bearingInRadians),a=Math.sin(e.bearingInRadians),o=XB();o[0]=-n*i*r-a*t,o[1]=-a*i*r+n*t;let s=vne(o);s<1e-9?gne(o):pne(o,o,1/s);let l=XB();l[0]=n*i*t-a*r,l[1]=a*i*t+n*r;let u=vne(l);return u<1e-9?gne(l):pne(l,l,1/u),{vecEast:l,vecSouth:o}}function M3(e,t,r){var i,n;return Qq(e.getElevation,t,r,(i=e.heightOffset)!=null?i:0,(n=e.heightAnchorGround)!=null?n:!0)}function Doe(e,t,r,i){let n;i==null?(n=[e,t,0,1],Foe(n,n,r)):(n=[e,t,i,1],Uc(n,n,r));let a=n[3];return{point:new rr(n[0]/a,n[1]/a),signedDistanceFromCamera:a,isOccluded:!1}}function Sst(e,t){return .5+e/t*.5}function EAr(e,t){return e.x>=-t[0]&&e.x<=t[0]&&e.y>=-t[1]&&e.y<=t[1]}function kAr(e,t,r,i,n,a,o,s,l,u,c,f,h){let p=r?e.textSizeData:e.iconSizeData,d=LC(p,t.transform.zoom),v=[256/t.width*2+1,256/t.height*2+1],m=r?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;m.clear();let g=e.lineVertexArray,w=r?e.text.placedSymbolArray:e.icon.placedSymbolArray,_=t.transform.width/t.transform.height,b=!1;for(let M=0;MMath.abs(r.x-t.x)*i?{useVertical:!0}:(e===2?t.yr.x)?{needsFlipping:!0}:null}function lot(e){let{projectionContext:t,pitchedLabelPlaneMatrixInverse:r,symbol:i,fontSize:n,flip:a,keepUpright:o,glyphOffsetArray:s,dynamicLayoutVertexArray:l,aspectRatio:u,rotateToLine:c}=e,f=n/24,h=i.lineOffsetX*f,p=i.lineOffsetY*f,d;if(i.numGlyphs>1){let v=i.glyphStartIndex+i.numGlyphs,m=i.lineStartIndex,g=i.lineStartIndex+i.lineLength,w=Est(f,s,h,p,a,i,c,t);if(!w)return{notEnoughRoom:!0};let _=Nq(w.first.point.x,w.first.point.y,t,r),b=Nq(w.last.point.x,w.last.point.y,t,r);if(o&&!a){let M=sot(i.writingMode,_,b,u);if(M)return M}d=[w.first];for(let M=i.glyphStartIndex+1;M0?_.point:kst(t.tileAnchorPoint,w,m,1,t),M=Nq(m.x,m.y,t,r),x=Nq(b.x,b.y,t,r),A=sot(i.writingMode,M,x,u);if(A)return A}let v=iO(f*s.getoffsetX(i.glyphStartIndex),h,p,a,i.segment,i.lineStartIndex,i.lineStartIndex+i.lineLength,t,c);if(!v||t.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};d=[v]}for(let v of d)PC(l,v.point,v.angle);return{}}function kst(e,t,r,i,n){let a=e.add(e.sub(t)._unit()),o=S3(a.x,a.y,n).point,s=r.sub(o);return r.add(s._mult(i/s.mag()))}function soe(e,t,r){let i=t.projectionCache;if(i.projections[e])return i.projections[e];let n=new rr(t.lineVertexArray.getx(e),t.lineVertexArray.gety(e)),a=S3(n.x,n.y,t);if(a.signedDistanceFromCamera>0)return i.projections[e]=a.point,i.anyProjectionOccluded||(i.anyProjectionOccluded=a.isOccluded),a.point;let o=e-r.direction,s=r.distanceFromAnchor===0?t.tileAnchorPoint:new rr(t.lineVertexArray.getx(o),t.lineVertexArray.gety(o)),l=r.absOffsetX-r.distanceFromAnchor+1;return kst(s,n,r.previousVertex,l,t)}function S3(e,t,r){let i=e+r.translation[0],n=t+r.translation[1],a;return r.pitchWithMap?(a=Doe(i,n,r.pitchedLabelPlaneMatrix,M3(r,i,n)),a.isOccluded=!1):(a=r.transform.projectTileCoordinates(i,n,r.unwrappedTileID,M3(r,i,n)),a.point.x=(a.point.x*.5+.5)*r.width,a.point.y=(-a.point.y*.5+.5)*r.height),a}function Nq(e,t,r,i){if(r.pitchWithMap){let n=[e,t,0,1];Uc(n,n,i);let a=n[0]/n[3],o=n[1]/n[3];return r.transform.projectTileCoordinates(a,o,r.unwrappedTileID,M3(r,a,o)).point}return{x:e/r.width*2-1,y:1-t/r.height*2}}function Cst(e,t,r){return r.transform.projectTileCoordinates(e,t,r.unwrappedTileID,M3(r,e,t))}function loe(e,t,r){return e._unit()._perp()._mult(t*r)}function CAr(e,t,r,i,n,a,o,s,l){if(s.projectionCache.offsets[e])return s.projectionCache.offsets[e];let u=r.add(t);if(e+l.direction=n)return s.projectionCache.offsets[e]=u,u;let c=soe(e+l.direction,s,l),f=loe(c.sub(r),o,l.direction),h=r.add(f),p=c.add(f);return s.projectionCache.offsets[e]=Wtt(a,u,h,p)||u,s.projectionCache.offsets[e]}function iO(e,t,r,i,n,a,o,s,l){let u=i?e-t:e+t,c=u>0?1:-1,f=0;i&&(c*=-1,f=Math.PI),c<0&&(f+=Math.PI);let h=c>0?a+n:a+n+1,p;s.projectionCache.cachedAnchorPoint?p=s.projectionCache.cachedAnchorPoint:(p=S3(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=p);let d=p,v=p,m,g,w=0,_=0,b=Math.abs(u),M=[],x;for(;w+_<=b;){if(h+=c,h=o)return null;w+=_,v=d,g=m;let E={absOffsetX:b,direction:c,distanceFromAnchor:w,previousVertex:v};if(d=soe(h,s,E),r===0)M.push(v),x=d.sub(v);else{let S,C=d.sub(v);S=C.mag()===0?loe(soe(h+c,s,E).sub(d),r,c):loe(C,r,c),g||(g=v.add(S)),m=CAr(h,S,d,a,o,g,r,s,E),M.push(g),x=m.sub(g)}_=x.mag()}let A=(b-w)/_,T=x._mult(A)._add(g||v),y=f+Math.atan2(d.y-v.y,d.x-v.x);return M.push(T),{point:T,angle:l?y:0,path:M}}function o6(e,t){for(let r=0;r{let n=Doe(i.x,i.y,r,M3(t,i.x,i.y)),a=t.transform.projectTileCoordinates(n.point.x,n.point.y,t.unwrappedTileID,M3(t,n.point.x,n.point.y));return a.point.x=(a.point.x*.5+.5)*t.width,a.point.y=(-a.point.y*.5+.5)*t.height,a})}function LAr(e){let t=0,r=0,i=0,n=0;for(let a=0;ar&&(r=n,t=i));return e.slice(t,t+r)}function fot(e,t,r,i,n){let{horizontalAlign:a,verticalAlign:o}=FC(e),s=-(a-.5)*t,l=-(o-.5)*r;return new rr(s+i[0]*n,l+i[1]*n)}function hot(e,t,r,i,n,a){(!i||i.length===0)&&(i=[0,0,0,0]);let o=i[0]-100,s=i[1]-100,l=i[2]-100,u=i[3]-100;e.emplaceBack(+!!t,+!!r,n||0,a||0,o,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,u),e.emplaceBack(+!!t,+!!r,n||0,a||0,o,u)}function dot(e){if(e.opacity===0&&!e.placed)return 0;if(e.opacity===1&&e.placed)return 4294967295;let t=+!!e.placed,r=Math.floor(e.opacity*127);return r*BAr+t*qAr+r*OAr+t*NAr+r*512+t*256+r*2+t}function uoe(e,t,r,i,n,a){if(n-i<=r)return;let o=i+n>>1;Fst(e,t,o,i,n,a),uoe(e,t,r,i,o-1,1-a),uoe(e,t,r,o+1,n,1-a)}function Fst(e,t,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,c=r-i+1,f=Math.log(u),h=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*h*(u-h)/u)*(c-u/2<0?-1:1);Fst(e,t,r,Math.max(i,Math.floor(r-c*h/u+p)),Math.min(n,Math.floor(r+(u-c)*h/u+p)),a)}let o=t[2*r+a],s=i,l=n;for(HC(e,t,i,r),t[2*n+a]>o&&HC(e,t,i,n);so;)l--}t[2*i+a]===o?HC(e,t,i,l):(l++,HC(e,t,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function HC(e,t,r,i){Bae(e,r,i),Bae(t,2*r,2*i),Bae(t,2*r+1,2*i+1)}function Bae(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function vot(e,t,r,i){let n=e-r,a=t-i;return n*n+a*a}function go(e,t){let r=/#pragma maplibre: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=t.match(/in ([\w]+) ([\w]+)/g),n=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(n):n,s=i?i.length:0,l={};return e=e.replace(r,(u,c,f,h,p)=>(l[p]=!0,c==="define"?` #ifndef HAS_UNIFORM_u_${p} in ${f} ${h} ${p}; #else uniform ${f} ${h} u_${p}; #endif `:` #ifdef HAS_UNIFORM_u_${p} ${f} ${h} ${p} = u_${p}; #endif `)),t=t.replace(r,(u,c,f,h,p)=>{let d=h==="float"?"vec2":"vec4",v=p.match(/color/)?"color":d;return l[p]?c==="define"?` #ifndef HAS_UNIFORM_u_${p} uniform lowp float u_${p}_t; layout(location = ${s++}) in ${f} ${d} a_${p}; out ${f} ${h} ${p}; #else uniform ${f} ${h} u_${p}; #endif `:v==="vec4"?` #ifndef HAS_UNIFORM_u_${p} ${p} = a_${p}; #else ${f} ${h} ${p} = u_${p}; #endif `:` #ifndef HAS_UNIFORM_u_${p} ${p} = unpack_mix_${v}(a_${p}, u_${p}_t); #else ${f} ${h} ${p} = u_${p}; #endif `:c==="define"?` #ifndef HAS_UNIFORM_u_${p} uniform lowp float u_${p}_t; layout(location = ${s++}) in ${f} ${d} a_${p}; #else uniform ${f} ${h} u_${p}; #endif `:v==="vec4"?` #ifndef HAS_UNIFORM_u_${p} ${f} ${h} ${p} = a_${p}; #else ${f} ${h} ${p} = u_${p}; #endif `:` #ifndef HAS_UNIFORM_u_${p} ${f} ${h} ${p} = unpack_mix_${v}(a_${p}, u_${p}_t); #else ${f} ${h} ${p} = u_${p}; #endif `}),{fragmentSource:e,vertexSource:t,staticAttributes:i,staticUniforms:o}}function nO(e,t){if(!e.renderWorldCopies||e.lngRange)return;let r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}function mot(e){return Math.max(0,Math.floor(e))}function Poe(e,t,r,i){if(i<0||i>=1)return bot;let n=Math.floor(r),a=r-n;for(let o of e.zooms){let s=1<n;a++){let o=(r+i)/2;t(e,o)?i=o:r=o}return{lo:r,hi:i}}function eO(e,t){return Poe(e.index,e.exaggeration,(e.near[0]+t*e.dx)/e.worldSize,(e.near[1]+t*e.dy)/e.worldSize)}function Uq(e,t){return zst(eO(e,t),e.near[2]+t*e.dz)}function _ot({near:e,far:t},r,i,n){let a=t[0]-e[0],o=t[1]-e[1],s=t[2]-e[2];return((r-e[0])*a+(i-e[1])*o+(n-e[2])*s)/(a*a+o*o+s*s)}function Ost(){Pa("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Nst(e){if(e.useSlerp)if(e.k<1){let t=wne(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),r=wne(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),i=new Float64Array(4);Nk(i,t,r,e.k);let n=ert(i);e.tr.setRoll(n.roll),e.tr.setPitch(n.pitch),e.tr.setBearing(n.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(Ks.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(Ks.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(Ks.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function Ust(e,t,r,i,n){let a=n.padding,o=Bv(n.worldSize,r.getNorthWest()),s=Bv(n.worldSize,r.getNorthEast()),l=Bv(n.worldSize,r.getSouthEast()),u=Bv(n.worldSize,r.getSouthWest()),c=Os(-i),f=o.rotate(c),h=s.rotate(c),p=l.rotate(c),d=u.rotate(c),v=new rr(Math.max(f.x,h.x,d.x,p.x),Math.max(f.y,h.y,d.y,p.y)),m=new rr(Math.min(f.x,h.x,d.x,p.x),Math.min(f.y,h.y,d.y,p.y)),g=v.sub(m),w=n.width-(a.left+a.right+t.left+t.right),_=n.height-(a.top+a.bottom+t.top+t.bottom),b=w/g.x,M=_/g.y;if(M<0||b<0){Ost();return}let x=Math.min(Vc(n.scale*Math.min(b,M)),e.maxZoom),A=rr.convert(e.offset),T=(t.left-t.right)/2,y=(t.top-t.bottom)/2,E=new rr(T,y).rotate(Os(i)),S=A.add(E).mult(n.scale/Vf(x));return{center:QT(n.worldSize,o.add(l).div(2).sub(S)),zoom:x,bearing:i}}function Gst(e){let t=s6(e.worldSize,e.center.lat);return 2*Math.PI*t}function oMr(e,t,r){let i=pc(t),n=pc(r),a=uu(i,n),o=Math.acos(a),s=Gst(e);return o/(2*Math.PI)*s}function sMr(e,t){return[ux(e*Math.PI*2+Math.PI,Math.PI*2),2*Math.atan(Math.exp(Math.PI-t*Math.PI*2))-Math.PI*.5]}function lMr(e,t){let r=Math.cos(t),i=new Float64Array(3);return i[0]=Math.sin(e)*r,i[1]=Math.sin(t),i[2]=Math.cos(e)*r,i}function yx(e,t,r,i,n){let a=1/(1<1e-6){let i=e[0]/r,n=e[2]/r,a=Math.acos(n),o=(i>0?a:-a)/Math.PI*180;return new yn(W0(o,-180,180),t)}return new yn(0,t)}function uMr(e,t){return YB(hx(),-e.lng,-e.lat,t)}function cMr(e){let t=e[0],r=e[1],i=e[2],n=e[3];return{lng:-Math.atan2(2*(n*t+r*i),1-2*(t*t+r*r))*180/Math.PI,lat:-Math.asin(ea(2*(n*r-i*t),-1,1))*180/Math.PI,bearing:Math.atan2(2*(n*i+t*r),1-2*(r*r+i*i))*180/Math.PI}}function Aot(e,t){let r=e.cameraPosition,i=cp(r);if(i<=1)return e.screenPointToLocation(t);let n=So();Uf(n,r);let a=e.getRayDirectionFromPixel(t),o=-uu(a,n),s=So();fC(s,a,n,o);let l=cp(s);if(l<1e-9)return e.screenPointToLocation(t);let u=Math.atan2(l,o),c=Math.asin(1/i)*.9;if(u=0?90:-90,s=e.locationToScreenPoint(new yn(0,o)),l=t.x-s.x,u=t.y-s.y,c=l*l+u*u,f=ea(1-(Iv-Math.abs(a))/12,0,1),h=f*f*(3-2*f),p=ux(i-n+180,360)-180,d=0;if(h>0&&r){let v=(l*r.y-u*r.x)/Math.max(c,400);d=(o>0?1:-1)*v*180/Math.PI}return n+(1-h)*p+h*d}function dMr(e){let t=So();return t[0]=e[0]*-e[3],t[1]=e[1]*-e[3],t[2]=e[2]*-e[3],{center:t,radius:Math.sqrt(1-e[3]*e[3])}}function pMr(e,t,r){let i=So();cg(i,r,e);let n=So();return fC(n,e,i,t/hC(i)),n}function sO(e){return Math.cos(e*Math.PI/180)}function Hc(e,t){let r=sO(e),i=sO(t);return Vc(i/r)}function vMr(e,t){return 360/Gst({worldSize:e,center:{lat:t}})}function gMr(e,t){let r=e.rotate(t.bearingInRadians),i=t.zoom+Hc(t.center.lat,0),n=d3(1/sO(t.center.lat),1/sO(Math.min(Math.abs(t.center.lat),60)),gC(i,7,3,0,1)),a=vMr(t.worldSize,t.center.lat);return new yn(t.center.lng-r.x*a*n,ea(t.center.lat+r.y*a,-Iv,Iv))}function Nae(e){let t=.5*e,r=Math.sin(t),i=Math.cos(t);return Math.log(r+i)-Math.log(i-r)}function Mot(e,t,r,i){let n=e.lat+r*i;if(Math.abs(r)>1){let a=e.lat+r,o=(Math.sign(a)===Math.sign(e.lat)?Math.abs(e.lat):-Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+r)*Math.PI/180,l=Nae(o+i*(s-o)),u=Nae(o),c=Nae(s),f=(l-u)/(c-u),h=e.lng+t*f;return new yn(h,n)}{let a=e.lng+t*i;return new yn(a,n)}}function Vq(e,t,r=1){let i=uu(e,t),n=r*r,a=So(),o=So();qs(o,t,i),cg(a,e,o);let s=n-uu(a,a);if(s<0)return null;let l=uu(e,e)-n,u=-i+(i<0?1:-1)*Math.sqrt(s),c=l/u,f=u,h=Math.max(c,f);return h<0?null:{tMin:Math.min(c,f),tMax:h}}function jst(e,t){let r=t*.01569612305760477,i=ea((e-r)/(9*r),0,1);return i*i*(3-2*i)}function tO(e,t,r){let i=e-t;return i<0?-i:Math.max(0,i-r)}function Vae(e,t,r,i,n){let a=e-r,o;return o=a<0?Math.min(-a,1+a-n):a>n?Math.min(Math.max(a-n,0),1-a):0,Math.max(o,tO(t,i,n))}function Sot(e,t){let r=1/0,i=-1/0;for(let n of t){let a=uu(e,n);r=Math.min(r,a),i=Math.max(i,a)}return{min:r,max:i}}function Yst(e,t){let r=So();fC(r,e.origin,e.direction,t);let i=cp(r),n=So();qs(n,r,1/i);let a=JC(n),o=Mo.fromLngLat(a),s=new Mo(o.x,ea(o.y,0,.999999999)),l=Poe(e.index,e.exaggeration,s.x,s.y),u=Math.abs(a.lat)>85.051129?0:l.elevation;return{sample:da(fn({},l),{elevation:u}),radius:i,mercator:s}}function kot(e,t){let{sample:r,radius:i}=Yst(e,t);return zst(r,(i-1)*Hf)}function Cot(e,t){let r=pc(e);return qs(r,r,1+t/Hf)}function Dot(e,t,r){let i=jB(So(),r,e);return uu(i,t)}function xMr(e,t,r){let i={constrainOverride:t};if(Array.isArray(e)){let n=new Tot({type:e},r);return{projection:n,transform:new Fot(i),cameraHelper:new Lot(n)}}switch(e){case"mercator":return{projection:new coe,transform:new aO(i),cameraHelper:new oO};case"globe":{let n=new Tot({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]},{});return{projection:n,transform:new Fot(i),cameraHelper:new Lot(n)}}case"vertical-perspective":return{projection:new Vst,transform:new $st(i),cameraHelper:new Zst};default:return Pa(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new coe,transform:new aO(i),cameraHelper:new oO}}}function kMr(e,t){for(let[r,i]of Object.entries(fO)){let n=e.getUniformBlockIndex(t,r);n!==e.INVALID_INDEX&&e.uniformBlockBinding(t,n,i)}}function Ioe(e){let t={},r=0;for(let{name:i,type:n}of e){let[a,o]=CMr[n];r=Math.ceil(r/o)*o,t[i]=r,r+=a}return{offsets:t,contentWords:r,sizeWords:Math.ceil(r/4)*4}}function Jst(e){return new Roe(e,fO.ProjectionUBO,Kst)}function Pot(e,t){let r=e.pending;r.set(t.mainMatrix,i6.u_projection_matrix),r.set(t.fallbackMatrix,i6.u_projection_fallback_matrix),r.set(t.tileMercatorCoords,i6.u_projection_tile_mercator_coords),r.set(t.clippingPlane,i6.u_projection_clipping_plane),r[i6.u_projection_transition]=t.projectionTransition,e.pendingWords[i6.u_projection_clip_antimeridian]=+!!t.clipAntimeridian,e.upload()}function DMr(e,t){var a;if(!t){e.projectionUniformBuffer.bind();return}let r=t.uniformBufferKey;if(r===void 0){Pot(e.projectionUniformBuffer,t);return}let i=e.keyedProjectionUniformBuffers.get(r);if(i){i.bind();return}let n=(a=e.freeProjectionUniformBuffers.pop())!=null?a:Jst(e);e.keyedProjectionUniformBuffers.set(r,n),Pot(n,t)}function FMr(e){e.freeProjectionUniformBuffers.push(...e.keyedProjectionUniformBuffers.values()),e.keyedProjectionUniformBuffers.clear()}function LMr(e){e.projectionUniformBuffer.destroy();for(let t of e.keyedProjectionUniformBuffers.values())t.destroy();for(let t of e.freeProjectionUniformBuffers)t.destroy()}function PMr(e){return new Roe(e,fO.TerrainUBO,Qst)}function IMr(e,t){let r=e.pending;r.set(t.u_terrain_matrix,Gq.u_terrain_matrix),r.set(t.u_terrain_unpack,Gq.u_terrain_unpack),r[Gq.u_terrain_dim]=t.u_terrain_dim,r[Gq.u_terrain_exaggeration]=t.u_terrain_exaggeration,e.upload()}function Gae(e){let t=[];for(let r of e){if(r===null)continue;let i=r.split(" ");t.push(i.pop())}return t}function RMr(e,t){let r=new Set([e.INT,e.INT_VEC2,e.INT_VEC3,e.INT_VEC4,e.UNSIGNED_INT,e.UNSIGNED_INT_VEC2,e.UNSIGNED_INT_VEC3,e.UNSIGNED_INT_VEC4]),i=new Set,n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a>16,s>>16],u_pixel_coord_lower:[o&65535,s&65535]}}function BMr(e,t,r,i){let n=r.patternAtlas.getPattern(e.from.toString()),a=r.patternAtlas.getPattern(e.to.toString()),{width:o,height:s}=r.patternAtlas.getPixelSize(),l=2**i.tileID.overscaledZ,u=i.tileSize*2**r.transform.tileZoom/l,c=u*(i.tileID.canonical.x+i.tileID.wrap*l),f=u*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[o,s],u_mix:t.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/r0(i,1,r.transform.tileZoom),u_pixel_coord_upper:[c>>16,f>>16],u_pixel_coord_lower:[c&65535,f&65535]}}function iSr(e,t){let r=2**t.canonical.z,i=t.canonical.y;return[new Mo(0,i/r).toLngLat().lat,new Mo(0,(i+1)/r).toLngLat().lat]}function zoe(e,t){return 1/r0(e,1,t.tileZoom)}function alt(e,t,r){return Um(e.transform,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}function dEr(e){return new Roe(e,fO.FrameUBO,llt)}function pEr(e,t){let r=e.pending,{transform:i}=t,n=t.context.gl;r[Y0.u_units_to_pixels]=1/i.pixelsToGLUnits[0],r[Y0.u_units_to_pixels+1]=1/i.pixelsToGLUnits[1],r[Y0.u_world_size]=n.drawingBufferWidth,r[Y0.u_world_size+1]=n.drawingBufferHeight,r[Y0.u_camera_to_center_distance]=i.cameraToCenterDistance,r[Y0.u_symbol_fade_change]=t.options.fadeDuration?t.symbolFadeChange:1,r[Y0.u_aspect_ratio]=i.width/i.height,r[Y0.u_device_pixel_ratio]=t.pixelRatio,r[Y0.u_viewport_size]=i.width,r[Y0.u_viewport_size+1]=i.height,r[Y0.u_pixel_extrude_scale]=1/i.width,r[Y0.u_pixel_extrude_scale+1]=1/i.height,r[Y0.u_pitch]=i.pitch/360*2*Math.PI,e.upload()}function gEr(e,t,r){var n;let i=(n=t==null?void 0:t.transitionState)!=null?n:0;return{currentPass:"offscreen",currentLayer:0,opaquePassCutoff:1/0,depthRangeFor3D:[0,1],isRenderingToTexture:!1,transform:e,terrain:r,projectionTransition:i,isRenderingGlobe:i>0}}function vf(e,t,r={}){var n;let i=e.transform.getProjectionData({overscaledTileID:t,aligned:r.aligned,applyGlobeMatrix:!e.isRenderingToTexture,applyTerrainMatrix:(n=r.applyTerrainMatrix)!=null?n:!0});return e.isRenderingToTexture||(i.uniformBufferKey=r.aligned?`${t.key}/aligned`:t.key),i}function yh(e,t){var r,i;return e.isRenderingToTexture?null:(i=(r=e.terrain)==null?void 0:r.getTerrainData(t))!=null?i:null}function Bot(e,t,r,i,n,a){let o=e.context,s=o.gl,l=e.useProgram("collisionBox"),u=[],c=0,f=0;for(let g of i){let w=t.getTile(g).getBucket(r);if(!w)continue;let _=n?w.textCollisionBox:w.iconCollisionBox,b=w.collisionCircleArray;b.length>0&&(u.push({circleArray:b,circleOffset:f,coord:g}),c+=b.length/4,f=c),_&&l.draw(o,s.LINES,Ua.disabled,Ro.disabled,e.colorModeForRenderPass(),Eo.disabled,null,yh(a,g),vf(a,g),r.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}if(!n||!u.length)return;let h=e.useProgram("collisionCircle"),p=new $it;p.resize(c*4),p._trim();let d=0;for(let g of u)for(let w=0;wc.getElevation(d,T,y):void 0;TEr(m,f,h,l,u,b,x,w,M,Um(u,v,o,s),d.toUnwrapped(),A,r.layout.get("symbol-height-anchor")==="ground")}}}function wEr(e,t,r,i,n,a){let o=t.tileAnchorPoint.add(new rr(t.translation[0],t.translation[1]));if(t.pitchWithMap){let s=i.mult(a);r||(s=s.rotate(-n));let l=o.add(s);return Doe(l.x,l.y,t.pitchedLabelPlaneMatrix,M3(t,l.x,l.y)).point}if(r){let s=S3(t.tileAnchorPoint.x+1,t.tileAnchorPoint.y,t).point.sub(e),l=Math.atan(s.y/s.x)+(s.x<0?Math.PI:0);return e.add(i.rotate(l))}return e.add(i)}function TEr(e,t,r,i,n,a,o,s,l,u,c,f,h){let p=e.text.placedSymbolArray,d=e.text.dynamicLayoutVertexArray,v=e.icon.dynamicLayoutVertexArray,m={};d.clear();for(let g=0;g=0&&(m[w.associatedIconIndex]={shiftedAnchor:R,angle:L})}}if(l){v.clear();let g=e.icon.placedSymbolArray;for(let w=0;we.style.map.terrain.getElevation(k,re,pe):void 0;kAr(F,e,n,H,ae,g,u,r.layout.get("text-rotation-alignment")==="map",k.toUnwrapped(),v.width,v.height,Q,_e)}let ce=n&&A||ge,oe=g?H:e.transform.clipSpaceToPixelsMatrix,Se=w||ce?yEr:oe,be=L&&r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1)!==0,fe;fe=L?F.iconsInText?bSr(I.kind,$,_,g,w,ce,e,Se,j,Q,K,G,y,Ee,xe):slt(I.kind,$,_,g,w,ce,e,Se,j,Q,n,K,be,y,Ee,xe):olt(I.kind,$,_,g,w,ce,e,Se,j,Q,n,K,y,Ee,xe);let ee={program:O,buffers:P,uniformValues:fe,projectionData:te,atlasTexture:q,atlasTextureIcon:N,atlasInterpolation:J,atlasInterpolationIcon:V,isSDF:L,hasHalo:be};if(b&&F.canOverlap){M=!0;let ae=P.segments.get();for(let _e of ae)T.push({segments:new Js([_e]),sortKey:_e.sortKey,state:ee,terrainData:X})}else T.push({segments:P.segments,sortKey:0,state:ee,terrainData:X})}M&&T.sort((k,D)=>k.sortKey-D.sortKey);let E=(C=r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(null))!=null?C:1/0,S=r.layout.get("text-letter-spacing").constantOr(0)*24<0||E>1;for(let k of T){let D=k.state;p.activeTexture.set(d.TEXTURE0),D.atlasTexture.bind(D.atlasInterpolation,d.CLAMP_TO_EDGE),D.atlasTextureIcon&&(p.activeTexture.set(d.TEXTURE1),D.atlasTextureIcon&&D.atlasTextureIcon.bind(D.atlasInterpolationIcon,d.CLAMP_TO_EDGE));let F=D.isSDF&&D.hasHalo;if(F){let P=D.uniformValues;P.u_is_halo=1,S&&(P.u_is_plain=0,Oot(D.buffers,k.segments,r,e,D.program,x,c,f,P,D.projectionData,k.terrainData),P.u_is_halo=0,P.u_is_plain=1)}Oot(D.buffers,k.segments,r,e,D.program,x,c,f,D.uniformValues,D.projectionData,k.terrainData),F&&!S&&(D.uniformValues.u_is_halo=0)}}function Oot(e,t,r,i,n,a,o,s,l,u,c){let f=i.context,h=f.gl;n.draw(f,h.TRIANGLES,a,o,s,Eo.backCCW,l,c,u,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function MEr(e,t,r,i,n){if(n.currentPass!=="translucent")return;let a=r.paint.get("circle-opacity"),o=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),l=!r.layout.get("circle-sort-key").isConstant();if(a.constantOr(1)===0&&(o.constantOr(1)===0||s.constantOr(1)===0))return;let u=e.context,c=u.gl,f=e.transform,h=e.getDepthModeForSublayer(0,Ua.ReadOnly),p=Ro.disabled,d=e.colorModeForRenderPass(),v=[],m=f.getCircleRadiusCorrection();for(let g of i){let w=t.getTile(g),_=w.getBucket(r);if(!_)continue;let b=r.paint.get("circle-translate"),M=r.paint.get("circle-translate-anchor"),x=Um(f,w,b,M),A=_.programConfigurations.get(r.id),T=e.useProgram("circle",A),y=_.layoutVertexBuffer,E=_.indexBuffer,S=yh(n,g),C={programConfiguration:A,program:T,layoutVertexBuffer:y,indexBuffer:E,uniformValues:XMr(e,w,r,x,m),terrainData:S,projectionData:vf(n,g)};if(l){let k=_.segments.get();for(let D of k)v.push({segments:new Js([D]),sortKey:D.sortKey,state:C})}else v.push({segments:_.segments,sortKey:0,state:C})}l&&v.sort((g,w)=>g.sortKey-w.sortKey);for(let g of v){let{programConfiguration:w,program:_,layoutVertexBuffer:b,indexBuffer:M,uniformValues:x,terrainData:A,projectionData:T}=g.state,y=g.segments;_.draw(u,c.TRIANGLES,h,p,d,Eo.backCCW,x,A,T,r.id,b,M,y,r.paint,e.transform.zoom,w)}}function SEr(e,t,r,i,n){if(r.paint.get("heatmap-opacity")===0)return;let a=e.context;if(e.style.map.terrain){for(let o of i){let s=t.getTile(o);t.hasRenderableParent(o)||(n.currentPass==="offscreen"?CEr(e,s,r,o,n):n.currentPass==="translucent"&&DEr(e,r,o,n))}a.viewport.set([0,0,e.width,e.height])}else n.currentPass==="offscreen"?EEr(e,t,r,i,n):n.currentPass==="translucent"&&kEr(e,r)}function EEr(e,t,r,i,n){let a=e.context,o=a.gl,s=e.transform,l=Ro.disabled,u=new Hl([o.ONE,o.ONE],aa.transparent,[!0,!0,!0,!0]);FEr(a,e,r),a.clear({color:aa.transparent});for(let c of i){if(t.hasRenderableParent(c))continue;let f=t.getTile(c),h=f.getBucket(r);if(!h)continue;let p=h.programConfigurations.get(r.id),d=e.useProgram("heatmap",p),v=vf(n,c,{applyTerrainMatrix:!1}),m=s.getCircleRadiusCorrection();d.draw(a,o.TRIANGLES,Ua.disabled,l,u,Eo.backCCW,ilt(f,s.zoom,r.paint.get("heatmap-intensity"),m),null,v,r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,r.paint,s.zoom,p)}a.viewport.set([0,0,e.width,e.height])}function kEr(e,t){let r=e.context,i=r.gl;r.setColorMode(e.colorModeForRenderPass());let n=t.heatmapFbos.get(EC);n&&(r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1),clt(r,t).bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,i.TRIANGLES,Ua.disabled,Ro.disabled,e.colorModeForRenderPass(),Eo.disabled,nlt(e,t,0,1),null,null,t.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,t.paint,e.transform.zoom))}function CEr(e,t,r,i,n){let a=e.context,o=a.gl,s=Ro.disabled,l=new Hl([o.ONE,o.ONE],aa.transparent,[!0,!0,!0,!0]),u=t.getBucket(r);if(!u)return;let c=i.key,f=r.heatmapFbos.get(c);f||(f=ult(a,t.tileSize,t.tileSize),r.heatmapFbos.set(c,f)),a.bindFramebuffer.set(f.framebuffer),a.viewport.set([0,0,t.tileSize,t.tileSize]),a.clear({color:aa.transparent});let h=u.programConfigurations.get(r.id),p=e.useProgram("heatmap",h,!n.isRenderingGlobe),d=vf(n,t.tileID),v=yh(n,i);p.draw(a,o.TRIANGLES,Ua.disabled,s,l,Eo.disabled,ilt(t,e.transform.zoom,r.paint.get("heatmap-intensity"),1),v,d,r.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,r.paint,e.transform.zoom,h)}function DEr(e,t,r,i){let n=e.context,a=n.gl,o=e.transform;n.setColorMode(e.colorModeForRenderPass());let s=clt(n,t),l=r.key,u=t.heatmapFbos.get(l);if(!u)return;n.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,u.colorAttachment.get()),n.activeTexture.set(a.TEXTURE1),s.bind(a.LINEAR,a.CLAMP_TO_EDGE);let c=vf(i,r,{applyTerrainMatrix:i.isRenderingGlobe});e.useProgram("heatmapTexture").draw(n,a.TRIANGLES,Ua.disabled,Ro.disabled,e.colorModeForRenderPass(),Eo.disabled,nlt(e,t,0,1),null,c,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,o.zoom),u.destroy(),t.heatmapFbos.delete(l)}function FEr(e,t,r){let i=e.gl;e.activeTexture.set(i.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);let n=r.heatmapFbos.get(EC);n?(i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),e.bindFramebuffer.set(n.framebuffer)):(n=ult(e,t.width/4,t.height/4),r.heatmapFbos.set(EC,n))}function ult(e,t,r){let i=e.gl,n=i.createTexture();i.bindTexture(i.TEXTURE_2D,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texStorage2D(i.TEXTURE_2D,1,i.RGBA16F,t,r);let a=e.createFramebuffer(t,r,!1,!1);return a.colorAttachment.set(n),a}function clt(e,t){return t.colorRampTexture||(t.colorRampTexture=new Tu(e,t.colorRamp,e.gl.RGBA)),t.colorRampTexture}function flt(e,t,r){let i=e.context,n=i.bindFramebuffer.get(),a=i.viewport.get(),[,,o,s]=a;return LEr(e,o,s),i.viewport.set([0,0,o,s]),i.clear({color:aa.transparent,depth:1,stencil:0}),e.currentStencilSource=void 0,e.renderTileClippingMasks(t,r),{compositeTarget:n,compositeViewport:a}}function LEr(e,t,r){let i=e.context.gl;if(!e.layerOpacityFbo){let a=e.context.createFramebuffer(t,r,!0,!0),o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,r,0,i.RGBA,i.UNSIGNED_BYTE,null),a.colorAttachment.set(o),a.depthAttachment.set(e.context.createRenderbuffer(i.DEPTH_STENCIL,t,r)),e.layerOpacityFbo=a,e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}if(e.layerOpacityFbo.width===t&&e.layerOpacityFbo.height===r){e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}let n=e.layerOpacityFbo;i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,r,0,i.RGBA,i.UNSIGNED_BYTE,null),e.context.bindRenderbuffer.set(n.depthAttachment.get()),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,t,r),e.context.bindRenderbuffer.set(null),n.width=t,n.height=r,e.context.bindFramebuffer.set(n.framebuffer)}function hlt(e,t,r,i){let n=e.context,a=n.gl;n.bindFramebuffer.set(r.compositeTarget),n.viewport.set(r.compositeViewport),n.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,e.layerOpacityFbo.colorAttachment.get()),e.useProgram("layerOpacity").draw(n,a.TRIANGLES,Ua.disabled,Ro.disabled,e.colorModeForRenderPass(),Eo.disabled,gSr(t,0),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom),e.currentStencilSource=void 0}function dlt(e,t,r,i,n,a,o,s){let l=256;if(n.stepInterpolant){let u=t.getSource().maxzoom,c=o.canonical.z===u?Math.ceil(1<e.options.anisotropicFilterPitch&&d.texParameterf(d.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax);let D=yh(c,A),F=vf(c,A,{aligned:w}),P=$6r(C,S,k.fadeMix,r,s,l),R=f!=null?f:m.getMeshFromTileID(p,A.canonical,a,o,"raster"),L=n?n[A.overscaledZ]:Ro.disabled;v.draw(p,d.TRIANGLES,T,L,g,u?Eo.frontCCW:Eo.backCCW,P,D,F,r.id,R.vertexBuffer,R.indexBuffer,R.segments)}}function HEr(e,t,r,i){let n={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(r===0||i)return n;if(e.fadingParentID){let a=t.getLoadedTile(e.fadingParentID);if(!a)return n;let o=2**(a.tileID.overscaledZ-e.tileID.overscaledZ);return{parentTile:a,parentScaleBy:o,parentTopLeft:[e.tileID.canonical.x*o%1,e.tileID.canonical.y*o%1],fadeValues:jEr(e,a,r)}}return e.selfFading?{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:$Er(e,r)}:n}function jEr(e,t,r){let i=zo(),n=(i-e.timeAdded)/r,a=(i-t.timeAdded)/r,o=e.fadingDirection===1,s=ea(n,0,1),l=ea(1-a,0,1),u=o?s:l;return{tileOpacity:u,parentTileOpacity:o?l:s,fadeMix:{opacity:1,mix:1-u}}}function $Er(e,t){let r=(zo()-e.timeAdded)/t,i=ea(r,0,1);return{tileOpacity:i,fadeMix:{opacity:i,mix:0}}}function WEr(e,t,r,i,n){let a=r.paint.get("background-color"),o=r.paint.get("background-opacity");if(o===0)return;let s=e.context,l=s.gl,u=e.style.projection,c=e.transform,f=c.tileSize,h=r.paint.get("background-pattern");if(e.isPatternMissing(h))return;let p=!h&&a.a===1&&o===1&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(n.currentPass!==p)return;let d=Ro.disabled,v=e.getDepthModeForSublayer(0,p==="opaque"?Ua.ReadWrite:Ua.ReadOnly),m=e.colorModeForRenderPass(),g=e.useProgram(h?"backgroundPattern":"background"),w=i||u6(c,{tileSize:f,terrain:e.style.map.terrain});h&&(s.activeTexture.set(l.TEXTURE0),e.patternAtlas.bind(e.context));let _=r.getCrossfadeParameters();for(let b of w){let M=vf(n,b),x=h?ASr(o,e,h,{tileID:b,tileSize:f},_):TSr(o,a),A=yh(n,b),T=u.getMeshFromTileID(s,b.canonical,!1,!0,"raster");g.draw(s,l.TRIANGLES,v,d,m,Eo.backCCW,x,A,M,r.id,T.vertexBuffer,T.indexBuffer,T.segments)}}function QEr(e){let t=e.transform.padding;Vot(e,e.transform.height-(t.top||0),3,YEr),Vot(e,t.bottom||0,3,XEr),Got(e,t.left||0,3,ZEr),Got(e,e.transform.width-(t.right||0),3,KEr);let r=e.transform.centerPoint;ekr(e,r.x,e.transform.height-r.y,JEr)}function ekr(e,t,r,i){lO(e,t-1,r-10,2,20,i),lO(e,t-10,r-1,20,2,i)}function Vot(e,t,r,i){lO(e,0,t+r/2,e.transform.width,r,i)}function Got(e,t,r,i){lO(e,t-r/2,0,r,e.transform.height,i)}function lO(e,t,r,i,n,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio,n*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function tkr(e,t,r,i){for(let n of r)rkr(e,t,n,i)}function rkr(e,t,r,i){var w;let n=e.context,a=n.gl,o=e.useProgram("debug"),s=Ua.disabled,l=Ro.disabled,u=e.colorModeForRenderPass(),c="$debug",f=yh(i,r);n.activeTexture.set(a.TEXTURE0);let h=((w=t.getTileByID(r.key).latestRawTileData)==null?void 0:w.byteLength)||0,p=Math.floor(h/1024),d=t.getTile(r).tileSize,v=512/Math.min(d,512)*(r.overscaledZ/e.transform.zoom)*.5,m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=` => ${r.overscaledZ}`),ikr(e,`${m} ${p}kB`);let g=vf(i,r);o.draw(n,a.TRIANGLES,s,l,Hl.alphaBlended,Eo.disabled,Iot(aa.transparent,v),null,g,c,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),o.draw(n,a.LINE_STRIP,s,l,u,Eo.disabled,Iot(aa.red),f,g,c,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function ikr(e,t){e.initDebugOverlayCanvas();let r=e.debugOverlayCanvas,i=e.context.gl,n=e.debugOverlayCanvas.getContext("2d");n.clearRect(0,0,r.width,r.height),n.shadowColor="white",n.shadowBlur=2,n.lineWidth=1.5,n.strokeStyle="white",n.textBaseline="top",n.font="bold 36px Open Sans, sans-serif",n.fillText(t,5,5),n.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}function nkr(e,t){let r=null,i=Object.values(e._layers).flatMap(s=>s.source&&!s.isHidden(t)?[e.tileManagers[s.source]]:[]),n=i.filter(s=>s.getSource().type==="vector"),a=i.filter(s=>s.getSource().type!=="vector"),o=s=>{(!r||r.getSource().maxzoom{var p;return l.getProjectionData({overscaledTileID:new Gc(h.tileID.canonical.z,(p=h.tileID.wrap)!=null?p:0,h.tileID.canonical.z,h.tileID.canonical.x,h.tileID.canonical.y),aligned:h.aligned,applyGlobeMatrix:h.applyGlobeMatrix,applyTerrainMatrix:h.applyTerrainMatrix})}},f=o.renderingMode?o.renderingMode:"2d";if(i.currentPass==="offscreen"){let h=o.prerender;h&&(e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),h.call(o,a.gl,c),a.setDirty(),e.setBaseState())}else if(i.currentPass==="translucent"){e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),a.setStencilMode(Ro.disabled);let h=f==="3d"?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,Ua.ReadOnly);a.setDepthMode(h),o.render(a.gl,c),a.setDirty(),e.setBaseState(),a.bindFramebuffer.set(null)}}function okr(e,t){let r=e.context,i=r.gl,n=e.transform,a=Hl.unblended,o=new Ua(i.LEQUAL,Ua.ReadWrite,[0,1]),s=t.tileManager.getRenderableTiles(),l=e.useProgram("terrainDepth");r.bindFramebuffer.set(t.getFramebuffer().framebuffer),r.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),r.clear({color:aa.white,depth:1});for(let u of s){let c=t.getTerrainMesh(u.tileID),f=t.getTerrainData(u.tileID),h=n.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),p=EMr(t.getSkirtLength(n.zoom));l.draw(r,i.TRIANGLES,o,Ro.disabled,a,Eo.backCCW,p,f,h,"terrain",c.vertexBuffer,c.indexBuffer,c.segments)}r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height])}function skr(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=a.gl,s=e.transform,l=e.colorModeForRenderPass(),u=e.getDepthModeFor3D(),c=e.useProgram("terrain");a.bindFramebuffer.set(null),a.viewport.set([0,0,e.width,e.height]);for(let f of r){let h=t.getTerrainMesh(f.tileID),p=e.renderToTexture.getTexture(f),d=t.getTerrainData(f.tileID);a.activeTexture.set(o.TEXTURE0),p.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_LINEAR);let v=t.getSkirtLength(s.zoom),m=s.calculateFogMatrix(f.tileID.toUnwrapped()),g=SMr(v,m,e.style.sky,s.pitch,n),w=vf(i,f.tileID,{applyTerrainMatrix:!1});c.draw(a,o.TRIANGLES,u,Ro.disabled,l,Eo.backCCW,g,d,w,"terrain",h.vertexBuffer,h.indexBuffer,h.segments)}}function glt(e,t){if(!t.mesh){let r=new Hm;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);let i=new zv;i.emplaceBack(0,1,2),i.emplaceBack(0,2,3),t.mesh=new e8(e.createVertexBuffer(r,T3.members),e.createIndexBuffer(i),Js.simpleSegment(0,0,r.length,i.length))}return t.mesh}function lkr(e,t){let r=e.context,i=r.gl,n=kSr(t,e.transform,e.pixelRatio),a=new Ua(i.LEQUAL,Ua.ReadWrite,[0,1]),o=Ro.disabled,s=e.colorModeForRenderPass(),l=e.useProgram("sky"),u=glt(r,t);l.draw(r,i.TRIANGLES,a,o,s,Eo.disabled,n,null,void 0,"sky",u.vertexBuffer,u.indexBuffer,u.segments)}function ukr(e,t){let r=e.getCartesianPosition();Rtt(r,r);let i=up(new Float64Array(16));return e.properties.get("anchor")==="map"&&(Nm(i,i,t.rollInRadians),f3(i,i,-t.pitchInRadians),Nm(i,i,t.bearingInRadians),f3(i,i,t.center.lat*Math.PI/180),hne(i,i,-t.center.lng*Math.PI/180)),ztt(r,r,i),r}function ckr(e,t,r){let i=e.context,n=i.gl,a=e.useProgram("atmosphere"),o=new Ua(n.LEQUAL,Ua.ReadOnly,[0,1]),s=e.transform,l=ukr(r,e.transform),u=s.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c=s6(s.worldSize,s.center.lat),f=Hst(s),h=jst(cp(f)-c,c),p=t.properties.get("atmosphere-blend")*u.projectionTransition*h;if(p===0)return;let d=SSr(l,p,f,c,s.inverseProjectionMatrix),v=glt(i,t);a.draw(i,n.TRIANGLES,o,Ro.disabled,Hl.alphaBlended,Eo.disabled,d,null,null,"atmosphere",v.vertexBuffer,v.indexBuffer,v.segments)}function Ooe(e,t){let r=!1,i=null,n,a=()=>{i=null,r&&(r=(e(...n),i=setTimeout(a,t),!1))};return(...o)=>(r=!0,n=o,i||a(),i)}function $C(e,t){(!e.duration||e.duration({around:i,panDelta:i.sub(r)}),activateOnStart:!0,moveStateManager:new i8({checkCorrectEvent:r=>r.button===0&&!r.ctrlKey}),enable:e,assignEvents:dO})}function Ckr({enable:e,clickTolerance:t,aroundCenter:r=!0,minPixelCenterThreshold:i=100,rotateSpeed:n=.8},a){return new r8({clickTolerance:t,move:(o,s)=>{let l=a();if(r&&Math.abs(l.y-o.y)>i)return{bearingDelta:_ne(new rr(o.x,s.y),s,l)};let u=(s.x-o.x)*n;return r&&s.yo.button===0&&o.ctrlKey||o.button===2&&!o.ctrlKey}),enable:e,assignEvents:dO})}function Dkr({enable:e,clickTolerance:t,pitchSpeed:r=-.5}){return new r8({clickTolerance:t,move:(i,n)=>({pitchDelta:(n.y-i.y)*r}),moveStateManager:new i8({checkCorrectEvent:i=>i.button===0&&i.ctrlKey||i.button===2}),enable:e,assignEvents:dO})}function Fkr({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:r=.3},i){return new r8({clickTolerance:t,move:(n,a)=>{let o=i(),s=(a.x-n.x)*r;return a.yn.button===2&&n.ctrlKey}),enable:e,assignEvents:dO})}function Wq(e,t,r){for(let i=0;iMath.abs(e.x)}function Ikr(e){return e*(2-e)}function Jae(e){var t;return((t=e.panDelta)==null?void 0:t.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}function Zkr(e=!1){return Zi(this,null,function*(){if(b3!==void 0&&!e)return b3;if(window.navigator.permissions===void 0)return b3=!!window.navigator.geolocation,b3;try{b3=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(t){b3=!!window.navigator.geolocation}return b3})}function Plt(e,t,r,i=!1){if(i||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return e==null?void 0:e.wrap();let n=new yn(e.lng,e.lat);if(e=new yn(e.lng,e.lat),t){let a=new yn(e.lng-360,e.lat),o=new yn(e.lng+360,e.lat),s=r.locationToScreenPoint(e).distSqr(t);r.locationToScreenPoint(a).distSqr(t)180;){let a=r.locationToScreenPoint(e);if(a.x>=0&&a.y>=0&&a.x<=r.width&&a.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e.lng!==n.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(e))?e:n}function Ilt(e,t,r){let i=e.classList;for(let n in Uoe)i.remove(`maplibregl-${r}-anchor-${n}`);i.add(`maplibregl-${r}-anchor-${t}`)}function hp(e,t,r=[]){let i=Xn.createNS("http://www.w3.org/2000/svg",e);for(let n in t)i.setAttributeNS(null,n,t[n]);for(let n of r)i.appendChild(n);return i}function Kkr(){return Qae||(Qae=hp("svg",{display:"block",height:"41px",width:"27px",viewBox:"0 0 27 41"},[hp("g",{"fill-rule":"nonzero"},[hp("g",{transform:"translate(3.0, 29.0)",fill:"#000000"},[["10.5","5.25002273"],["10.5","5.25002273"],["9.5","4.77275007"],["8.5","4.29549936"],["7.5","3.81822308"],["6.5","3.34094679"],["5.5","2.86367051"],["4.5","2.38636864"]].map(([e,t])=>hp("ellipse",{opacity:"0.04",cx:"10.5",cy:"5.80029008",rx:e,ry:t}))),hp("g",{fill:Rlt},[hp("path",{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"})]),hp("g",{opacity:"0.25",fill:"#000000"},[hp("path",{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"})]),hp("g",{transform:"translate(6.0, 7.0)",fill:"#FFFFFF"}),hp("g",{transform:"translate(8.0, 8.0)"},[hp("circle",{fill:"#000000",opacity:"0.25",cx:"5.5",cy:"5.5",r:"5.4999962"}),hp("circle",{fill:"#FFFFFF",cx:"5.5",cy:"5.5",r:"5.4999962"})])])]),Qae)}function Jkr(e){return e.firstElementChild.children[1]}function Kot(e,t,r){let i=(r==null?void 0:r.maxWidth)||100,{width:n,height:a}=e._camera.transform,o=a/2,s=n/2,l=e.unproject([s-i/2,o]),u=e.unproject([s+i/2,o]),c=Math.round(e.project(u).x-e.project(l).x),f=Math.min(i,c,n),h=l.distanceTo(u);if((r==null?void 0:r.unit)==="imperial"){let p=3.2808*h;p>5280?XC(t,f,p/5280,e._getUIString("ScaleControl.Miles")):XC(t,f,p,e._getUIString("ScaleControl.Feet"))}else(r==null?void 0:r.unit)==="nautical"?XC(t,f,h/1852,e._getUIString("ScaleControl.NauticalMiles")):h>=1e3?XC(t,f,h/1e3,e._getUIString("ScaleControl.Kilometers")):XC(t,f,h,e._getUIString("ScaleControl.Meters"))}function XC(e,t,r,i){let n=nCr(r),a=n/r;e.style.width=`${t*a}px`;let o=`${n}\xA0${i}`;e.textContent!==o&&(e.textContent=o)}function iCr(e){let t=10**Math.ceil(-Math.log(e)/Math.LN10);return Math.round(e*t)/t}function nCr(e){let t=10**(`${Math.floor(e)}`.length-1),r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:iCr(r),t*r}function qlt(e){if(!e)return qlt(new rr(0,0));if(typeof e=="number"){let t=Math.round(Math.abs(e)/Math.SQRT2);return{center:new rr(0,0),top:new rr(0,e),"top-left":new rr(t,t),"top-right":new rr(-t,t),bottom:new rr(0,-e),"bottom-left":new rr(t,-t),"bottom-right":new rr(-t,-t),left:new rr(e,0),right:new rr(-e,0)}}if(e instanceof rr||Array.isArray(e)){let t=rr.convert(e);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:rr.convert(e.center||[0,0]),top:rr.convert(e.top||[0,0]),"top-left":rr.convert(e["top-left"]||[0,0]),"top-right":rr.convert(e["top-right"]||[0,0]),bottom:rr.convert(e.bottom||[0,0]),"bottom-left":rr.convert(e["bottom-left"]||[0,0]),"bottom-right":rr.convert(e["bottom-right"]||[0,0]),left:rr.convert(e.left||[0,0]),right:rr.convert(e.right||[0,0])}}function fCr(e){var t,r,i,n;return e?{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}:{top:0,right:0,bottom:0,left:0}}function dCr(e,t){return QC().setRTLTextPlugin(e,t)}function pCr(){return QC().getRTLTextPluginStatus()}function vCr(){return hCr}function gCr(){return cO.workerCount}function mCr(e){cO.workerCount=e}function yCr(){return a0.MAX_PARALLEL_IMAGE_REQUESTS}function xCr(e){a0.MAX_PARALLEL_IMAGE_REQUESTS=e}function bCr(){return a0.WORKER_URL}function _Cr(e){a0.WORKER_URL=e}function wCr(e){return Zi(this,null,function*(){yield Toe().broadcast("IS",e)})}var Nlt,Jot,Rq,NC,Pae,l0,uO,$Tr,WTr,YTr,XTr,UC,t,Ko,Xn,qv,ZTr,vc,Cn,eoe,dp,Ns,s0,ZC,est,toe,tst,rst,Zq,ist,o6r,s6r,roe,l6r,u6r,h6r,ioe,boe,d6r,p6r,v6r,g6r,Zat,m6r,y6r,Kat,x6r,b6r,_6r,_oe,cO,E6r,KC,sst,Bq,Ov,fst,hst,Aoe,dst,vst,a6,j6r,$6r,e8,T3,qq,l6,xst,bst,_st,eAr,wst,tAr,rAr,noe,nAr,zae,Tst,aAr,Moe,Soe,fAr,aot,Xm,ooe,_Ar,oot,MAr,DAr,PAr,uot,VC,cot,IAr,RAr,zAr,BAr,qAr,OAr,NAr,GC,UAr,VAr,pot,Al,GAr,jC,HAr,jAr,$Ar,Lst,WAr,YAr,XAr,ZAr,KAr,JAr,QAr,eMr,got,dg,Pst,Ist,coe,foe,Loe,tMr,rMr,iMr,yot,xot,nMr,bot,aO,oO,wot,aMr,qae,Vst,Tot,Oae,mMr,Uae,yMr,Eot,$st,Fot,Zst,Lot,bMr,doe,_Mr,wMr,TMr,AMr,MMr,SMr,EMr,fO,CMr,Roe,Kst,i6,Qst,Gq,zMr,qMr,OMr,tlt,NMr,UMr,VMr,GMr,HMr,rlt,jMr,$Mr,WMr,YMr,XMr,ZMr,Iot,KMr,JMr,ilt,nlt,QMr,eSr,tSr,rSr,nSr,aSr,oSr,sSr,lSr,uSr,cSr,hO,fSr,hSr,dSr,pSr,vSr,gSr,mSr,ySr,xSr,olt,slt,bSr,_Sr,wSr,TSr,ASr,MSr,SSr,ESr,kSr,Hq,CSr,DSr,Rot,FSr,Vo,LSr,PSr,ISr,RSr,zSr,BSr,qSr,OSr,NSr,USr,VSr,GSr,HSr,jSr,$Sr,WSr,YSr,XSr,ZSr,KSr,JSr,QSr,eEr,tEr,rEr,iEr,nEr,aEr,oEr,sEr,lEr,Boe,uEr,cEr,fEr,hEr,llt,Y0,Hl,vEr,Ua,Hae,Ro,zot,jae,Eo,jq,yEr,Yae,Zae,YEr,XEr,ZEr,KEr,JEr,fkr,A3,hkr,mlt,ylt,t8,dkr,pkr,vkr,gkr,mkr,ykr,xkr,bkr,xlt,wkr,voe,Tkr,r8,Akr,i8,Skr,Ekr,dO,Lkr,Noe,Hot,blt,_lt,wlt,Pkr,Tlt,Wot,Alt,Mlt,Rkr,zkr,Slt,Elt,klt,Clt,Bkr,Yq,qkr,Okr,Nkr,Dlt,Flt,Llt,Ukr,Yot,Vkr,n6,Gkr,Hkr,jkr,Xot,$kr,Wkr,Ykr,Xkr,b3,Uoe,Zot,Rlt,Qae,_3,zlt,goe,Qkr,Xq,YC,w3,moe,Blt,eCr,tCr,rCr,yoe,aCr,oCr,sCr,lCr,uCr,xoe,cCr,hCr,Ult=Ci(()=>{Uat();Nlt={};Jot="6.11.2";l0={frame(e,t,r,i){let n=i||window,a=n.requestAnimationFrame(s=>{o(),t(s)}),{unsubscribe:o}=Wk(e.signal,"abort",()=>{o(),n.cancelAnimationFrame(a),r(new YT(e.signal.reason))},!1)},frameAsync(e,t){return new Promise((r,i)=>{this.frame(e,r,i,t)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t;if(UB()&&!cne())t=new OffscreenCanvas(e.width,e.height).getContext("2d",{willReadFrequently:!0});else{let r=window.document.createElement("canvas");r.width=e.width,r.height=e.height,t=r.getContext("2d",{willReadFrequently:!0})}if(!t)throw Error("failed to create canvas 2d context");return t.drawImage(e,0,0,e.width,e.height),t},resolveURL(e){return Rq||(Rq=document.createElement("a")),Rq.href=e,Rq.href},get hardwareConcurrency(){return typeof navigator<"u"&&navigator.hardwareConcurrency||4},get prefersReducedMotion(){return Pae===void 0?matchMedia?(NC!=null||(NC=matchMedia("(prefers-reduced-motion: reduce)")),NC.matches):!1:Pae},set prefersReducedMotion(e){Pae=e}},uO=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt===null?performance.now():this._frozenAt}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};$Tr=new Set("a.abbr.b.bdi.bdo.br.cite.code.del.div.em.i.img.ins.kbd.li.mark.ol.p.q.s.samp.small.span.strong.sub.sup.time.u.ul.var.wbr".split(".")),WTr=new Set(["alt","class","datetime","dir","height","href","hreflang","lang","referrerpolicy","rel","role","src","target","title","translate","type","width"]),YTr=new Set(["href","src"]),XTr=new Set(["http:","https:","mailto:"]);Xn=(Ko=class{static create(t,r,i){let n=window.document.createElement(t);return r!==void 0&&(n.className=r),i&&i.appendChild(n),n}static createNS(t,r){return window.document.createElementNS(t,r)}static disableDrag(){Ko.docStyle&&Ko.selectProp&&(Ko.userSelect=Ko.docStyle[Ko.selectProp],Ko.docStyle[Ko.selectProp]="none")}static enableDrag(){Ko.docStyle&&Ko.selectProp&&(Ko.docStyle[Ko.selectProp]=Ko.userSelect)}static suppressClickInternal(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener("click",Ko.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",Ko.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",Ko.suppressClickInternal,!0)},0)}static getScale(t){let r=t.getBoundingClientRect();return{x:r.width/t.offsetWidth||1,y:r.height/t.offsetHeight||1,boundingClientRect:r}}static getPoint(t,r,i){let n=r.boundingClientRect;return new rr((i.clientX-n.left)/r.x-t.clientLeft,(i.clientY-n.top)/r.y-t.clientTop)}static mousePos(t,r){let i=Ko.getScale(t);return Ko.getPoint(t,i,r)}static touchPos(t,r){let i=[],n=Ko.getScale(t);for(let a of r)i.push(Ko.getPoint(t,n,a));return i}static sanitize(t){let r=new DOMParser().parseFromString(t,"text/html").body,{querySelectorAll:i,remove:n}=Iae();for(let o of Array.from(i.call(r,"*")))Ko.isAllowedElement(o)?Ko.removeDisallowedAttributes(o):n.call(o);let a=document.createDocumentFragment();return a.append(...r.childNodes),a}static isAllowedElement(t){let{namespaceURI:r,localName:i}=Iae();return r.call(t)==="http://www.w3.org/1999/xhtml"&&$Tr.has(i.call(t))}static removeDisallowedAttributes(t){let{getAttributeNames:r,getAttribute:i,removeAttribute:n}=Iae();for(let a of r.call(t))Ko.isAllowedAttribute(a,i.call(t,a))||n.call(t,a)}static isAllowedAttribute(t,r){if(!WTr.has(t)&&!t.startsWith("aria-"))return!1;if(!YTr.has(t))return!0;try{return XTr.has(new URL(r,"https://maplibre.invalid/").protocol)}catch(i){return!1}}},Ko.docStyle=typeof window<"u"&&((t=window.document)==null?void 0:t.documentElement.style),Ko.selectProp=!Ko.docStyle||"userSelect"in Ko.docStyle?"userSelect":"webkitUserSelect",Ko);(function(e){let t,r,i,n;e.resetRequestQueue=()=>{t=[],r=0,i=0,n={}},e.addThrottleControl=f=>{let h=i++;return n[h]=f,h},e.removeThrottleControl=f=>{delete n[f],u()};let a=()=>{for(let f of Object.keys(n))if(n[f]())return!0;return!1};function o(f,h,p,d,v=!0,m){return Zi(this,null,function*(){let g=yield f.transformRequest(h,p);return eq(d.signal),qv.getImage(g,d,v,m)})}e.transformAndGetImage=o,e.getImage=(f,h,p=!0,d)=>new Promise((v,m)=>{f.headers||(f.headers={}),f.headers.accept="image/webp,*/*",dn(f,{type:"image"});let g={abortController:h,requestParameters:f,supportImageRefresh:p,imageBitmapOptions:d,state:"queued",onError:w=>{m(w)},onSuccess:w=>{v(w)}};t.push(g),u()});let s=(f,h)=>typeof createImageBitmap=="function"?Ktt(f,h):Jtt(f),l=f=>Zi(null,null,function*(){f.state="running";let{requestParameters:h,supportImageRefresh:p,imageBitmapOptions:d,onError:v,onSuccess:m,abortController:g}=f,w=p===!1&&!d&&!o3(self)&&!Tne(h.url)&&(!h.headers||Object.keys(h.headers).reduce((b,M)=>b&&M==="accept",!0));r++;let _=w?c(h,g):mC(h,g);try{let b=yield _;delete f.abortController,f.state="completed",b.data instanceof HTMLImageElement||px(b.data)?m(b):!b.data||b.data.byteLength===0?m({data:null,cacheControl:b.cacheControl,expires:b.expires}):m({data:yield s(b.data,d),cacheControl:b.cacheControl,expires:b.expires})}catch(b){delete f.abortController,v(Oc(b))}finally{r--,u()}}),u=()=>{let f=a()?a0.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a0.MAX_PARALLEL_IMAGE_REQUESTS;for(let h=r;h0;h++){let p=t.shift();if(p.abortController.signal.aborted){h--;continue}l(p)}},c=(f,h)=>new Promise((p,d)=>{let v=new Image,m=f.url,g=f.credentials;g&&g==="include"?v.crossOrigin="use-credentials":(g&&g==="same-origin"||!Mne(m))&&(v.crossOrigin="anonymous"),h.signal.addEventListener("abort",()=>{v.src="",d(new YT(h.signal.reason))}),v.fetchPriority="high",v.onload=()=>{v.onerror=v.onload=null,p({data:v})},v.onerror=()=>{v.onerror=v.onload=null,!h.signal.aborted&&d(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."))},v.src=m})})(qv||(qv={})),qv.resetRequestQueue();ZTr=class{constructor(e){this._transformRequestFn=e!=null?e:null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}},vc=class extends o0{},Cn=class extends vc{},eoe=class extends vc{constructor(e={}){super("style.load",e)}},dp=class extends vc{constructor(e,t={}){super(e,t),this.dataType="style"}},Ns=class extends vc{constructor(e,t={}){super(e,t),this.dataType="source"}},s0=class extends vc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r,i={}){r=r instanceof MouseEvent?r:new MouseEvent(e,r);let n=Xn.mousePos(t.getCanvas(),r),a=t.unproject(n);super(e,dn({point:n,lngLat:a,originalEvent:r},i)),this._defaultPrevented=!1,this.target=t}},ZC=class extends vc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){let i=e==="touchend"?r.changedTouches:r.touches,n=Xn.touchPos(t.getCanvasContainer(),i),a=n.map(l=>t.unproject(l)),o=n.reduce((l,u,c,f)=>l.add(u.div(f.length)),new rr(0,0)),s=t.unproject(o);super(e,{points:n,point:o,lngLats:a,lngLat:s,originalEvent:r}),this._defaultPrevented=!1}},est=class extends vc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t){super("wheel",{originalEvent:t}),this._defaultPrevented=!1}},toe=class extends vc{},tst=class extends vc{constructor(e={}){super("terrain",e)}},rst=class extends vc{constructor(e={}){super("projectiontransition",e)}},Zq=class extends vc{},ist=class extends vc{constructor(e={}){super("styleimagemissing",e)}};o6r=class extends cu{constructor(){super(),this.images={},this.updateVersion=0,this.loaded=!1,this.requestors=[],this.missingImageResolver=null,this._spriteImagesIds={},this._imagesIds=null,this._renderCallbacksDispatchedThisFrame={}}destroy(){for(let e of Object.keys(this.images))this.removeImage(e);this._spriteImagesIds={}}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:t,promiseResolve:r}of this.requestors)r(this._getImagesForIds(t));this.requestors=[]}}getImage(e){let t=this.images[e];if(t&&!t.data&&t.spriteData){let r=t.spriteData;t.data=new Es({width:r.width,height:r.height},r.context.getImageData(r.x,r.y,r.width,r.height).data),t.spriteData=null}return t}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t,this._imagesIds=null,t.isWebGLImage&&this.updateImage(e,t,!1))}_validate(e,t){let r=!0,i=t.data||t.spriteData;return this._validateStretch(t.stretchX,i==null?void 0:i.width)||(this.fire(new Mn(Error(`Image "${e}" has invalid "stretchX" value`))),r=!1),this._validateStretch(t.stretchY,i==null?void 0:i.height)||(this.fire(new Mn(Error(`Image "${e}" has invalid "stretchY" value`))),r=!1),this._validateContent(t.content,t)||(this.fire(new Mn(Error(`Image "${e}" has invalid "content" value`))),r=!1),r}_validateStretch(e,t){if(!e)return!0;let r=0;for(let i of e){if(i[0]=e[1]}updateImage(e,t,r=!0){var n;let i=this.images[e];if(r){let a=i.data||i.spriteData;if(a.width!==t.data.width||a.height!==t.data.height)throw Error(`size mismatch between old image (${a.width}x${a.height}) and new image (${t.data.width}x${t.data.height}).`)}t.version=((n=i.version)!=null?n:0)+1,this.images[e]=t,this.updateVersion++}removeImage(e){var r;let t=this.images[e];t&&(delete this.images[e],this._imagesIds=null,(r=t.userImage)!=null&&r.onRemove&&t.userImage.onRemove())}listImages(){var e;return(e=this._imagesIds)!=null||(this._imagesIds=Object.keys(this.images)),this._imagesIds}_getSpriteImageId(e,t){return e==="default"?t:`${e}:${t}`}setSpriteImages(e,t){var o;let r=(o=this._spriteImagesIds[e])!=null?o:[],i=[];for(let s in t){let l=this._getSpriteImageId(e,s);i.push(l),l in this.images?this.updateImage(l,t[s],!1):this.addImage(l,t[s])}let n=new Set(i),a=r.filter(s=>!n.has(s));for(let s of a)this.removeImage(s);return this._spriteImagesIds[e]=i,{loaded:i,removed:a}}removeSpriteImages(e){var r;let t=(r=this._spriteImagesIds[e])!=null?r:[];for(let i of t)this.removeImage(i);return delete this._spriteImagesIds[e],t}removeAllSpriteImages(){let e=Object.values(this._spriteImagesIds).flat();for(let t of e)this.removeImage(t);return this._spriteImagesIds={},e}setMissingImageResolver(e){this.missingImageResolver=e}getImages(e){return new Promise((t,r)=>{let i=!0;if(!this.isLoaded())for(let n of e)this.images[n]||(i=!1);this.isLoaded()||i?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){return Zi(this,null,function*(){var n;let t=new Set(e.filter(a=>!this.getImage(a))),r=this.missingImageResolver;r&&(yield Promise.allSettled(Array.from(t,a=>r(a))));let i={};for(let a of e){let o=this.getImage(a);o&&(t.delete(a),i[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf,version:o.version,stretchX:o.stretchX,stretchY:o.stretchY,content:o.content,textFitWidth:o.textFitWidth,textFitHeight:o.textFitHeight,hasRenderCallback:!!((n=o.userImage)!=null&&n.render),isWebGLImage:o.isWebGLImage})}for(let a of t)this.fire(new ist({id:a})),Pa(`Image "${a}" could not be loaded. Please make sure you have added the image before it is needed with map.addImage(), resolved it with map.setMissingStyleImageResolver(), or included it in a "sprite" property in your style.`);return i})}beginFrame(){this._renderCallbacksDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let t of e){if(this._renderCallbacksDispatchedThisFrame[t])continue;this._renderCallbacksDispatchedThisFrame[t]=!0;let r=this.getImage(t);r||Pa(`Image with ID: "${t}" was not found`),Gnt(r)&&this.updateImage(t,r)}}cloneImages(){let e={};for(let t in this.images){let r=this.images[t];e[t]=da(fn({},r),{data:r.data?r.data.clone():null})}return e}},s6r=class{constructor(e){this._imageManager=e,this._entries={},this._image=new Es({width:1,height:1}),this._dirty=!0}destroy(){this._texture&&(this._texture=(this._texture.destroy(),null)),this._entries={},this._image=new Es({width:1,height:1}),this._dirty=!0}getPixelSize(){let{width:e,height:t}=this._image;return{width:e,height:t}}getPattern(e){let t=this._imageManager.getImage(e);if(!t)return null;let r=this._entries[e];if((r==null?void 0:r.image)!==t){let i={w:t.data.width+2,h:t.data.height+2,x:0,y:0};this._entries[e]={bin:i,position:new Cq(i,t),image:t}}else if(r.position.version!==t.version)r.position.version=t.version;else return r.position;return this._update(),this._entries[e].position}bind(e){let t=e.gl;this._texture?this._dirty&&(this._dirty=(this._texture.update(this._image),!1)):(this._texture=new Tu(e,this._image,t.RGBA),this._dirty=!1),this._texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_update(){for(let n in this._entries)this._imageManager.getImage(n)||delete this._entries[n];let e=[];for(let n in this._entries)e.push(this._entries[n].bin);let{w:t,h:r}=cae(e),i=this._image;i.resize({width:t||1,height:r||1});for(let n in this._entries){let{bin:a}=this._entries[n],o=a.x+1,s=a.y+1,l=this._entries[n].image.data,u=l.width,c=l.height;Es.copy(l,i,{x:0,y:0},{x:o,y:s},{width:u,height:c}),Es.copy(l,i,{x:0,y:c-1},{x:o,y:s-1},{width:u,height:1}),Es.copy(l,i,{x:0,y:0},{x:o,y:s+c},{width:u,height:1}),Es.copy(l,i,{x:u-1,y:0},{x:o-1,y:s},{width:1,height:c}),Es.copy(l,i,{x:0,y:0},{x:o+u,y:s},{width:1,height:c})}this._dirty=!0}},roe=1114111,l6r={start:0,end:roe},u6r=0;h6r=class{constructor(e){this.requestManager=e,this._faces={},this._registered=new Set}setFontFaces(e){this._unregisterAll(),this._faces={};for(let[t,r]of Object.entries(e!=null?e:{})){let i=Array.isArray(r)?r:[r];this._faces[t]=i.map(n=>this._declareFontFace(t,n)).filter(n=>n!==null)}}hasFontFaces(){return Object.keys(this._faces).length>0}getFontFamily(e,t){return Zi(this,null,function*(){var r,i;for(let n of e.split(","))for(let a of(r=this._faces[n.trim()])!=null?r:[])if(f6r(a,t)&&((i=a.loaded)!=null||(a.loaded=this._loadFontFace(a)),yield a.loaded))return a.family;return null})}_declareFontFace(e,t){let r=typeof t=="string"?{url:t}:t;if(typeof(r==null?void 0:r.url)!="string")return Pa(`Ignoring the font face declared for "${e}": it has no URL.`),null;let i=`maplibre-gl-font-face-${u6r++}`,n=r["unicode-range"];if(!(n!=null&&n.length))return{url:r.url,ranges:[l6r],family:i};let a=[];for(let o of n){let s=c6r(o);if(!s){Pa(`Ignoring the unicode range "${o}" of the font face at ${r.url}: it is not a valid range.`);continue}a.push(s)}return a.length?{url:r.url,ranges:a,family:i}:null}_loadFontFace(e){return Zi(this,null,function*(){if(typeof FontFace>"u"||typeof document>"u"||!document.fonts)return Pa(`Ignoring the font face at ${e.url}: this environment has no CSS Font Loading API.`),!1;let t;try{return t=new FontFace(e.family,yield this._downloadFontFile(e.url)),Object.values(this._faces).some(r=>r.includes(e))?(document.fonts.add(t),this._registered.add(t),yield t.load(),!0):!1}catch(r){return t&&this._unregister(t),Pa(`Ignoring the font face at ${e.url}: ${Oc(r).message}`),!1}})}_downloadFontFile(e){return Zi(this,null,function*(){let t=yield this.requestManager.transformRequest(e,"Glyphs"),r=yield Ane(t,new AbortController);if(!(r!=null&&r.data))throw Error(`the response was empty for the font file at ${e}`);return r.data})}_unregister(e){var t;(t=document.fonts)==null||t.delete(e),this._registered.delete(e)}_unregisterAll(){var e;for(let t of this._registered)(e=document.fonts)==null||e.delete(t);this._registered.clear()}destroy(){this._unregisterAll(),this._faces={}}},ioe=1e20,boe=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-(e/255)**.45454545454545453;boe[e]=t*Math.abs(t)}boe[255]=-1e20;d6r=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:i=.25,fontFamily:n="sans-serif",fontWeight:a="normal",fontStyle:o="normal",lang:s=null}={}){this.buffer=t,this.radius=r,this.cutoff=i,this.lang=s;let l=this.size=e+t*4,u=this._createCanvas(l),c=this.ctx=u.getContext("2d",{willReadFrequently:!0});c.font=`${o} ${a} ${e}px ${n}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(e,e);let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i,actualBoundingBoxLeft:n,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.floor(-n),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a)-s)),u=Math.max(0,Math.min(this.size-this.buffer,o+Math.ceil(i))),c=l+2*this.buffer,f=u+2*this.buffer,h=Math.max(c*f,0),p=new Uint8ClampedArray(h),d={data:p,width:c,height:f,glyphWidth:l,glyphHeight:u,glyphTop:o,glyphLeft:s,glyphAdvance:t};if(l===0||u===0)return d;let{ctx:v,buffer:m,gridInner:g,gridOuter:w}=this;this.lang&&(v.lang=this.lang),v.clearRect(m,m,l,u),v.fillText(e,m-s,m+o);let _=v.getImageData(m,m,l,u);w.fill(ioe,0,h),g.fill(0,0,h);let b=3;for(let T=0;T{let r=new d6r(e);return r.buffer=t,r},g6r=class{constructor(e,t,r,i=v6r){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={},this.lang=r,this.fontFaceManager=new h6r(e),this.createRasterizer=i}setURL(e){this.url=e}setFontFaces(e){this.fontFaceManager.setFontFaces(e),this.entries={}}getGlyphs(e){return Zi(this,null,function*(){var n;let t=[];for(let a in e)for(let o in e[a])for(let s of e[a][o])t.push(this._getAndCacheGlyphsPromise(a,s,o));let r=yield Promise.all(t),i={};for(let{stack:a,id:o,variant:s,glyph:l}of r)i[a]||(i[a]={}),(n=i[a])[s]||(n[s]={}),i[a][s][o]=l&&{id:l.id,bitmap:l.bitmap.clone(),metrics:l.metrics};return i})}_getAndCacheGlyphsPromise(e,t,r){return Zi(this,null,function*(){var l,u,c;(u=(l=this.entries)[e])!=null||(l[e]={glyphs:{default:{}},requests:{},ranges:{}});let i=this.entries[e],n=(c=i.glyphs)[r]||(c[r]={}),a=n[t];if(a!==void 0)return{stack:e,id:t,variant:r,glyph:a};if(r!=="default")return n[t]=null,{stack:e,id:t,variant:r,glyph:null};let o=t.codePointAt(0),s=this.fontFaceManager.hasFontFaces()?yield this.fontFaceManager.getFontFamily(e,o):null;return s?(a=n[t]=yield this._drawGlyph(i,e,t,s),{stack:e,id:t,variant:r,glyph:a}):!this.url||CC(t)||this._charUsesLocalIdeographFontFamily(o)?(a=n[t]=yield this._drawGlyph(i,e,t),{stack:e,id:t,variant:r,glyph:a}):da(fn({},yield this._downloadAndCacheRangePromise(e,t)),{variant:r})})}_downloadAndCacheRangePromise(e,t){return Zi(this,null,function*(){var a;let r=t.codePointAt(0),i=this.entries[e],n=Math.floor(r/256);if(i.ranges[n])return{stack:e,id:t,glyph:null};(a=i.requests)[n]||(a[n]=this._loadGlyphRange(e,n));try{let o=yield i.requests[n];for(let s in o)i.glyphs.default[String.fromCodePoint(+s)]=o[+s];return i.ranges[n]=!0,{stack:e,id:t,glyph:o[r]||null}}catch(o){let s=i.glyphs.default[t]=yield this._drawGlyph(i,e,t);return this._warnOnMissingGlyphRange(s,n,r,Oc(o)),{stack:e,id:t,glyph:s}}})}_loadGlyphRange(e,t){return Zi(this,null,function*(){let r=t*256,i=r+255,n=yield this.requestManager.transformRequest(this.url.replace("{fontstack}",e).replace("{range}",`${r}-${i}`),"Glyphs"),a=yield Ane(n,new AbortController);if(!(a!=null&&a.data))throw Error(`Could not load glyph range. range: ${t}, ${r}-${i}`);let o={};for(let s of Vnt(a.data))o[s.id]=s;return o})}_warnOnMissingGlyphRange(e,t,r,i){let n=t*256,a=n+255,o=r.toString(16).padStart(4,"0").toUpperCase();Pa(`Unable to load glyph range ${t}, ${n}-${a}. Rendering codepoint U+${o} locally instead. ${i}`)}_charUsesLocalIdeographFontFamily(e){return!!this.localIdeographFontFamily&&Pnt(e)}_drawGlyph(e,t,r,i){return Zi(this,null,function*(){let n=(yield this._getTinySDF(e,t,r,i)).draw(r),a=new RegExp("^\\p{gc=Cf}+$","u").test(r);return{id:r.codePointAt(0),bitmap:new Tq({width:n.width||60,height:n.height||60},n.data),metrics:{width:a?0:n.glyphWidth/2||24,height:n.glyphHeight/2||24,left:n.glyphLeft/2+.5||0,top:n.glyphTop/2-27.5||-8,advance:a?0:n.glyphAdvance/2||24,isDoubleResolution:!0}}})}_getTinySDF(e,t,r,i){var l,u,c,f;let n=CC(r);if(i){let h=n?"clusterTinySDFs":"fontFaceTinySDFs";return(l=e[h])!=null||(e[h]={}),(u=e[h])[i]||(u[i]=this._createTinySDF(i,!1,n?3:1)),e[h][i]}let a=t===p6r&&this.localIdeographFontFamily!==""&&this._charUsesLocalIdeographFontFamily(r.codePointAt(0)),o=a?this.localIdeographFontFamily:t;if(n)return(c=e.clusterTinySDFs)!=null||(e.clusterTinySDFs={}),(f=e.clusterTinySDFs)[o]||(f[o]=this._createTinySDF(o,!0,3)),e.clusterTinySDFs[o];let s=a?"ideographTinySDF":"tinySDF";return e[s]||(e[s]=this._createTinySDF(o)),e[s]}_createTinySDF(e,t=!0,r=1){return Zi(this,null,function*(){var s;let i=e?e.split(","):[];i.push("sans-serif");let n=i.map(l=>/[-\w]+/.test(l)?l:`'${CSS.escape(l)}'`).join(","),a=t?this._fontWeight(i[0]):void 0,o=t?this._fontStyle(i[0]):"normal";if(typeof document<"u"&&((s=document.fonts)!=null&&s.load))try{yield document.fonts.load(`${o} ${a||"normal"} 48px ${n}`)}catch(l){Pa(`Failed to load font "${n}": ${Oc(l).message}`)}return this.createRasterizer({fontSize:48,buffer:Math.max(6,Math.ceil(48*(r-1)/4)),radius:16,cutoff:.25,fontFamily:n,fontWeight:a,fontStyle:o,lang:this.lang},6)})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t={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},r;for(let[i,n]of Object.entries(t))RegExp(`\\b${i}\\b`,"i").test(e)&&(r=`${n}`);return r}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.fontFaceTinySDFs={},t.glyphs={default:{}},t.requests={},t.ranges={}}this.entries={},this.fontFaceManager.destroy()}},m6r=()=>Zat||(Zat=new dc({anchor:new Pi(_r.light.anchor,"anchor"),position:new Pi(_r.light.position,"position"),color:new Pi(_r.light.color,"color"),intensity:new Pi(_r.light.intensity,"intensity")})),y6r=class extends cu{constructor(e,t){super(),this._transitionable=new MC(m6r(),"light",t),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}getCartesianPosition(){return Ytt(this.properties.get("position"))}setLight(e,t={}){this._validate(mh.light,e,t)||this._transitionable.setValues(e)}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}applyGlobalStateChange(e,t,r){this._transitioning=this._transitionable.applyGlobalStateChange(e,t,this._transitioning,r)}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,r){return KT(this,e,{value:t},r)}},x6r=()=>Kat||(Kat=new dc({"sky-color":new Pi(_r.sky["sky-color"],"sky-color"),"horizon-color":new Pi(_r.sky["horizon-color"],"horizon-color"),"fog-color":new Pi(_r.sky["fog-color"],"fog-color"),"fog-ground-blend":new Pi(_r.sky["fog-ground-blend"],"fog-ground-blend"),"horizon-fog-blend":new Pi(_r.sky["horizon-fog-blend"],"horizon-fog-blend"),"sky-horizon-blend":new Pi(_r.sky["sky-horizon-blend"],"sky-horizon-blend"),"atmosphere-blend":new Pi(_r.sky["atmosphere-blend"],"atmosphere-blend")})),b6r=class extends cu{constructor(e,t){super(),this._transitionable=new MC(x6r(),"sky",t),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Io(0))}setSky(e,t={}){return!this._validate(mh.sky,e,t)&&(e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0}),this._transitionable.setValues(e),!0)}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}applyGlobalStateChange(e,t,r){this._transitioning=this._transitionable.applyGlobalStateChange(e,t,this._transitioning,r)}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,r={}){return KT(this,e,{value:t},r)}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}},_6r=class{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,t){var i;let r=e.join(",")+String(t);return(i=this.dashEntry)[r]||(i[r]=this.addDash(e,t)),this.dashEntry[r]}getDashRanges(e,t,r){let i=e.length%2==1,n=[],a=i?-e[e.length-1]*r:0,o=e[0]*r,s=!0;n.push({left:a,right:o,isDash:s,zeroLength:e[0]===0});let l=e[0];for(let u=1;u1&&(l=e[++s]);let c=Math.abs(u-l.left),f=Math.abs(u-l.right),h=Math.min(c,f),p,d=n/r*(i+1);if(l.isDash){let v=i-Math.abs(d);p=Math.sqrt(h*h+v*v)}else p=i-Math.sqrt(h*h+d*d);this.data[o+u]=Math.max(0,Math.min(255,p+128))}}}addRegularDash(e){for(let o=e.length-1;o>=0;--o){let s=e[o],l=e[o+1];s.zeroLength?e.splice(o,1):(l==null?void 0:l.isDash)===s.isDash&&(l.left=s.left,e.splice(o,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let i=this.width*this.nextRow,n=0,a=e[n];for(let o=0;o1&&(a=e[++n]);let s=Math.abs(o-a.left),l=Math.abs(o-a.right),u=Math.min(s,l),c=a.isDash?u:-u;this.data[i+o]=Math.max(0,Math.min(255,c+128))}}addDash(e,t){let r=t?7:0,i=2*r+1;if(this.nextRow+i>this.height)return Pa("LineAtlas out of space"),null;let n=0;for(let o of e)n+=o;if(n!==0){let o=this.width/n,s=this.getDashRanges(e,this.width,o);t?this.addRoundDash(s,o,r):this.addRegularDash(s)}let a={y:this.nextRow+r,height:2*r,width:n};return this.nextRow+=i,this.dirty=!0,a}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}};_oe="maplibre_preloaded_worker_pool",cO=class ost{constructor(){this.active={},this.workersPromise=null}acquire(t){return Zi(this,null,function*(){if(this.active[t]=!0,!this.workersPromise){let r=[];for(;r.length{for(let n of i)n.terminate()})}}isPreloaded(){return!!this.active[_oe]}numActive(){return Object.keys(this.active).length}},E6r=Math.floor(l0.hardwareConcurrency/2);cO.workerCount=Ztt(globalThis)?Math.max(Math.min(E6r,3),1):1;sst=class extends cu{constructor(e,t){super(),this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t,this.removed=!1,this.workerErrorSubscriptions=[],this.actorsPromise=this.initActors(t)}initActors(e){return Zi(this,null,function*(){let t=yield this.workerPool.acquire(e);if(this.removed)return[];if(this.actors=t.map((r,i)=>{this.workerErrorSubscriptions.push(Wk(r,"error",()=>{this.fire(new Mn(Error("Worker failed to load. Check that the worker URL is correct.")))},!1));let n=new lat(r,e);return n.name=`Worker ${i}`,n}),!this.actors.length)throw Error("No actors found");return this.actors})}broadcast(e,t){return Zi(this,null,function*(){let r=yield this.actorsPromise;return Promise.all(r.map(i=>i.sendAsync({type:e,data:t})))})}getActor(){return Zi(this,null,function*(){let e=yield this.actorsPromise;return this.currentActor=(this.currentActor+1)%e.length,e[this.currentActor]})}waitForInitComplete(){return Zi(this,null,function*(){this.actors.length===0&&(yield this.actorsPromise)})}getReadyActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.removed=!0;for(let t of this.actors)t.remove();for(let t of this.workerErrorSubscriptions)t.unsubscribe();this.actors=[],this.workerErrorSubscriptions=[],this.setEventedParent(null),e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){return Zi(this,null,function*(){let r=yield this.actorsPromise;for(let i of r)i.registerMessageHandler(e,t)})}unregisterMessageHandler(e){return Zi(this,null,function*(){let t=yield this.actorsPromise;for(let r of t)r.unregisterMessageHandler(e)})}};Ov=class Wm{constructor(t,r){t&&(r?this.setSouthWest(t).setNorthEast(r):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof yn?new yn(t.lng,t.lat):yn.convert(t),this}setSouthWest(t){return this._sw=t instanceof yn?new yn(t.lng,t.lat):yn.convert(t),this}extend(t){let r=this._sw,i=this._ne,n,a;if(t instanceof yn)n=t,a=t;else if(t instanceof Wm){if(n=t._sw,a=t._ne,!n||!a)return this}else{if(Array.isArray(t)){if(t.length===4||t.every(Array.isArray)){let o=t;return this.extend(Wm.convert(o))}{let o=t;return this.extend(yn.convert(o))}}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(yn.convert(t)):this}return!r&&!i?(this._sw=new yn(n.lng,n.lat),this._ne=new yn(a.lng,a.lat)):(r.lng=Math.min(n.lng,r.lng),r.lat=Math.min(n.lat,r.lat),i.lng=Math.max(a.lng,i.lng),i.lat=Math.max(a.lat,i.lat)),this}getCenter(){return new yn((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 yn(this.getWest(),this.getNorth())}getSouthEast(){return new yn(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(t){let{lng:r,lat:i}=yn.convert(t),n=this._sw.lat<=i&&i<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),n&&a}intersects(t){if(t=Wm.convert(t),!(t.getNorth()>=this.getSouth()&&t.getSouth()<=this.getNorth()))return!1;let r=Math.abs(this.getEast()-this.getWest()),i=Math.abs(t.getEast()-t.getWest());if(r>=360||i>=360)return!0;let n=W0(this.getWest(),-180,180),a=W0(this.getEast(),-180,180),o=W0(t.getWest(),-180,180),s=W0(t.getEast(),-180,180),l=n>a,u=o>s;return l&&u?!0:l?s>=n||o<=a:u?a>=o||n<=s:o<=a&&s>=n}static convert(t){return t instanceof Wm||!t?t:new Wm(t)}static fromLngLat(t,r=0){let i=360*r/40075017,n=i/Math.cos(Math.PI/180*t.lat);return new Wm(new yn(t.lng-n,t.lat-i),new yn(t.lng+n,t.lat+i))}adjustAntiMeridian(){let t=new yn(this._sw.lng,this._sw.lat),r=new yn(this._ne.lng,this._ne.lat);return t.lng>r.lng?new Wm(t,new yn(r.lng+360,r.lat)):new Wm(t,r)}},fst=class{constructor(e,t,r){this.bounds=Ov.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return!Array.isArray(e)||e.length!==4?[-180,-90,180,90]:[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]}contains(e){let t=2**e.z,r={minX:Math.floor(g3(this.bounds.getWest())*t),minY:Math.floor(m3(this.bounds.getNorth())*t),maxX:Math.ceil(g3(this.bounds.getEast())*t),maxY:Math.ceil(m3(this.bounds.getSouth())*t)};return e.x>=r.minX&&e.x=r.minY&&e.y{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}serialize(){return dn({},this._options)}loadTile(e){return Zi(this,null,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:yield this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.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(e),etag:e.etag};if(r.request.collectResourceTiming=this._collectResourceTiming,yield this.dispatcher.waitForInitComplete(),e.aborted)return;let i="RT";if(!e.actor||e.state==="expired")e.actor=this.dispatcher.getReadyActor(),i="LT";else if(e.state==="loading")return new Promise((n,a)=>{e.reloadPromise={resolve:n,reject:a}});e.abortController=new AbortController;try{let n=yield e.actor.sendAsync({type:i,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,n);let a={};return n!=null&&n.etagUnmodified&&(a.unmodified=!0),a}catch(n){if(delete e.abortController,e.aborted||Vm(n))return;if(n&&n.status!==404)throw n;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return Zi(this,null,function*(){if(e.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let t=e.tileID.scaledTo(this.maxzoom).canonical,r=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:t,overzoomRequest:yield this.map._requestManager.transformRequest(r,"Tile")}})}_afterTileLoadWorkerResponse(e,t){if(t!=null&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=t==null?void 0:t.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let r=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(r.resolve).catch(r.reject)}}abortTile(e){return Zi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return Zi(this,null,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}},Aoe=class extends cu{constructor(e,t,r,i){super(),this.id=e,this.dispatcher=r,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._premultiplyAlpha=!0,this._options=dn({type:"raster"},t),dn(this,WT(t,["url","scheme","tileSize"]))}load(e=!1){return Zi(this,null,function*(){this._loaded=!1,this.fire(new Ns("dataloading")),this._tileJSONRequest=new AbortController;try{let t=yield cst(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,t&&(dn(this,t),t.bounds&&(this.tileBounds=new fst(t.bounds,this.minzoom,this.maxzoom)),this.fire(new Ns("data",{sourceDataType:"metadata"})),this.fire(new Ns("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(t){this._tileJSONRequest=null,this._loaded=!0,Vm(t)||this.fire(new Mn(Oc(t)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null)),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return dn({},this._options)}setPremultiplyAlpha(e){return this._premultiplyAlpha===e||this.setSourceProperty(()=>{this._premultiplyAlpha=e}),this}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return Zi(this,null,function*(){var n;let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r=this._premultiplyAlpha,i=r?void 0:{premultiplyAlpha:"none"};e.abortController=new AbortController;try{let a=yield qv.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,i);if(delete e.abortController,e.aborted){e.state="unloaded";return}if(a){this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});let o=this.map.painter.context,s=o.gl,l=(n=a.data)!=null?n:new Es({width:1,height:1},new Uint8Array(4));e.texture=this.map.painter.getTileTexture(l.width),e.texture?e.texture.update(l,{useMipmap:!0,premultiply:r}):(e.texture=new Tu(o,l,s.RGBA,{useMipmap:!0,premultiply:r}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(a){if(delete e.abortController,e.aborted)e.state="unloaded";else if(a)throw e.state="errored",a}})}abortTile(e){return Zi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return Zi(this,null,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}},dst=class extends Aoe{constructor(e,t,r,i){super(e,t,r,i),this.type="raster-dem",this.maxzoom=22,this._options=dn({type:"raster-dem"},t),this.encoding=t.encoding||"mapbox",this.redFactor=t.redFactor,this.greenFactor=t.greenFactor,this.blueFactor=t.blueFactor,this.baseShift=t.baseShift}loadTile(e){return Zi(this,null,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield qv.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,{colorSpaceConversion:"none"});if(delete e.abortController,e.aborted){e.state="unloaded";return}if(r){if(this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires}),!r.data){e.state="loaded";return}let i=r.data,n=px(i)&&UB()?i:yield this.readImageNow(i),a={type:this.type,uid:e.uid,source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&e.state!=="expired"&&e.state!=="reloading")return;yield this.dispatcher.waitForInitComplete(),(!e.actor||e.state==="expired")&&(e.actor=this.dispatcher.getReadyActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:a}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0,e.state="loaded"}}catch(r){if(delete e.abortController,e.aborted)e.state="unloaded";else if(r)throw e.state="errored",r}})}readImageNow(e){return Zi(this,null,function*(){if(typeof VideoFrame<"u"&&cne()){let t=e.width+4,r=e.height+4;try{return new Es({width:t,height:r},yield Qtt(e,-2,-2,t,r))}catch(i){}}return l0.getImageData(e,2)})}_getNeighboringTiles(e){let t=e.canonical,r=2**t.z,i=(t.x-1+r)%r,n=t.x===0?e.wrap-1:e.wrap,a=(t.x+1+r)%r,o=t.x+1===r?e.wrap+1:e.wrap,s={};return s[new Gc(e.overscaledZ,n,t.z,i,t.y).key]={backfilled:!1},s[new Gc(e.overscaledZ,o,t.z,a,t.y).key]={backfilled:!1},t.y>0&&(s[new Gc(e.overscaledZ,n,t.z,i,t.y-1).key]={backfilled:!1},s[new Gc(e.overscaledZ,e.wrap,t.z,t.x,t.y-1).key]={backfilled:!1},s[new Gc(e.overscaledZ,o,t.z,a,t.y-1).key]={backfilled:!1}),t.y+1Qat(t))}}shouldReloadTile(e,{affectedBounds:t}){if(e.state==="loading")return!0;if(e.state==="unloaded")return!1;let{buffer:r,extent:i}=this.workerOptions.geojsonVtOptions,n=H6r(e.tileID.canonical,r/i);for(let a of t)if(n.intersects(a))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return Zi(this,null,function*(){let t=e.actor?"RT":"LT";e.actor=yield this.actorPromise;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.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};e.abortController=new AbortController;try{let i=yield(yield this.actorPromise).sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(i,this.map.painter,t==="RT")}catch(i){if(delete e.abortController,e.aborted||Vm(i))return;throw i}})}abortTile(e){return Zi(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return Zi(this,null,function*(){e.unloadVectorData(),yield(yield this.actorPromise).sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actorPromise.then(e=>e.sendAsync({type:"RS",data:{type:this.type,source:this.id}}))}serialize(){return dn({},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}},a6=[0,0,1],j6r=(e,t)=>({u_tl_parent:new xa(e,t.u_tl_parent),u_scale_parent:new Ni(e,t.u_scale_parent),u_buffer_scale:new Ni(e,t.u_buffer_scale),u_image_warp:new Gf(e,t.u_image_warp),u_fade_t:new Ni(e,t.u_fade_t),u_opacity:new Ni(e,t.u_opacity),u_image0:new Sn(e,t.u_image0),u_image1:new Sn(e,t.u_image1),u_brightness_low:new Ni(e,t.u_brightness_low),u_brightness_high:new Ni(e,t.u_brightness_high),u_saturation_factor:new Ni(e,t.u_saturation_factor),u_contrast_factor:new Ni(e,t.u_contrast_factor),u_spin_weights:new Gf(e,t.u_spin_weights),u_coords_top:new JT(e,t.u_coords_top),u_coords_bottom:new JT(e,t.u_coords_bottom)}),$6r=(e,t,r,i,n,a)=>({u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_image_warp:a,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:X6r(i.paint.get("raster-saturation")),u_contrast_factor:Y6r(i.paint.get("raster-contrast")),u_spin_weights:W6r(i.paint.get("raster-hue-rotate")),u_coords_top:[n[0].x,n[0].y,n[1].x,n[1].y],u_coords_bottom:[n[3].x,n[3].y,n[2].x,n[2].y]});e8=class{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}},T3=cl([{name:"a_pos",type:"Int16",components:2}]),qq=qr/128;l6=class extends cu{constructor(e,t,r,i){super(),this.imageWarp=a6,this.flippedWindingOrder=!1,this._warp="auto",this._imageDirty=!1,this._subdividedQuad=!1,this._subdividedMesh=null,this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=t}load(e){return Zi(this,null,function*(){if(this.options.url===void 0){this._loaded=!0,this._finishLoading();return}this._loaded=!1,this.fire(new Ns("dataloading")),this.url=this.options.url,this._abortController=new AbortController;try{let t=yield qv.transformAndGetImage(this.map._requestManager,this.url,"Image",this._abortController);this._abortController=null,this._loaded=!0,t!=null&&t.data?(this._setImage(t.data),e&&(this.coordinates=e),this._finishLoading()):this.fire(new Mn(Error(`Could not load image ${this.url}: the response is empty`)))}catch(t){if(Vm(t))return;this._abortController=null,this._loaded=!0,this.fire(new Mn(Oc(t)))}})}loaded(){return this._loaded}updateImage(e){return this._abortController&&(this._abortController=(this._abortController.abort(),null)),"image"in e?(this._loaded=!0,this._setImage(e.image),e.coordinates&&(this.coordinates=e.coordinates),this._finishLoading(),this):e.url?(this.options.url=e.url,this.load(e.coordinates),this):this}_setImage(e){this.image=e,this._imageDirty=!0}getMesh(e,t){var r;return!this._subdividedQuad||t?null:((r=this._subdividedMesh)!=null||(this._subdividedMesh=gst(e,{granularity:16})),this._subdividedMesh)}_disposeTexture(){var e;(e=this.texture)==null||e.destroy(),this.texture=null}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Ns("data",{sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){var e;this._abortController&&(this._abortController=(this._abortController.abort(),null)),this._disposeTexture(),(e=this._subdividedMesh)==null||e.destroy(),this._subdividedMesh=null,this.image=null,this.tiles={}}setWarp(e){return this._warp===e?this:(this._warp=e,this.tileCoords&&this.setCoordinates(this.coordinates),this)}getWarp(){return this._warp}setCoordinates(e){this.coordinates=e;let t=e.map(Mo.fromLngLat);return this.tileID=Z6r(t),this.terrainTileRanges=this._getOverlappingTileRanges(t),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=t.map(r=>this.tileID.getTilePoint(r)._round()),this.imageWarp=J6r(this.tileCoords,this._warp),this._subdividedQuad=this.imageWarp[2]>0&&!yst(this.tileCoords),this.flippedWindingOrder=K6r(this.tileCoords),this.fire(new Ns("data",{sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let e=this.map.painter.context,t=e.gl;this.texture?this._imageDirty&&(this.texture.update(this.image),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)):(this.texture=new Tu(e,this.image,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)),this._imageDirty=!1;let r=!1;for(let i in this.tiles){let n=this.tiles[i];n.state!=="loaded"&&(n.state="loaded",n.texture=this.texture,r=!0)}r&&this.fire(new Ns("data",{sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return Zi(this,null,function*(){var t;(t=this.tileID)!=null&&t.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){let e={type:"image",coordinates:this.coordinates};return this.options.url!==void 0&&(e.url=this.options.url),e}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:t,minY:r,maxX:i,maxY:n}=lp.fromPoints(e),a={};for(let o=0;o<=25;o++){let s=2**o,l=Math.floor(t*s),u=Math.floor(r*s),c=Math.floor(i*s),f=Math.floor(n*s),h=(l%s+s)%s,p=c%s,d=Math.floor(l/s),v=Math.floor(c/s);a[o]={minWrap:d,maxWrap:v,minTileXWrapped:h,maxTileXWrapped:p,minTileY:u,maxTileY:f}}return a}};xst=class extends l6{constructor(e,t,r,i){super(e,t,r,i),this._onPlayingHandler=()=>{var n;(n=this.map)==null||n.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}load(){return Zi(this,null,function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let t of e.urls)this.urls.push((yield this.map._requestManager.transformRequest(t,"Source")).url);try{let t=yield lrt(this.urls);if(this._loaded=!0,!t)return;this.video=t,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(t){this.fire(new Mn(Oc(t)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let t=this.video.seekable;et.end(0)?this.fire(new Mn(new ri(`sources.${this.id}`,null,`Playback for this video can be set only between the ${t.start(0)} and ${t.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,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 e=this.map.painter.context,t=e.gl;this.texture?this.video.paused||(this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this.texture=new Tu(e,this.video,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));let r=!1;for(let i in this.tiles){let n=this.tiles[i];n.state!=="loaded"&&(n.state="loaded",n.texture=this.texture,r=!0)}r&&this.fire(new Ns("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},bst=class extends l6{constructor(e,t,r,i){super(e,t,r,i),t.coordinates?(!Array.isArray(t.coordinates)||t.coordinates.length!==4||t.coordinates.some(n=>!Array.isArray(n)||n.length!==2||n.some(a=>typeof a!="number")))&&this.fire(new Mn(new ri(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new Mn(new ri(`sources.${e}`,null,'missing required property "coordinates"'))),t.animate&&typeof t.animate!="boolean"&&this.fire(new Mn(new ri(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),t.canvas?typeof t.canvas!="string"&&!(t.canvas instanceof HTMLCanvasElement)&&this.fire(new Mn(new ri(`sources.${e}`,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 Mn(new ri(`sources.${e}`,null,'missing required property "canvas"'))),this.options=t,this.animate=t.animate===void 0||t.animate}load(){return Zi(this,null,function*(){if(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 Mn(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._playing=(this.prepare(),!1))},this._finishLoading()})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this._playing=!1,super.onRemove()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let t=this.map.painter.context,r=t.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new Tu(t,this.canvas,r.RGBA,{premultiply:!0}),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let n in this.tiles){let a=this.tiles[n];a.state!=="loaded"&&(a.state="loaded",a.texture=this.texture,i=!0)}i&&this.fire(new Ns("data",{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 e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}},_st={},eAr=(e,t,r,i)=>{let n=new(wst(t.type))(e,t,r,i);if(n.id!==e)throw Error(`Expected Source id to be ${e} instead of ${n.id}`);return n},wst=e=>{switch(e){case"geojson":return vst;case"image":return l6;case"raster":return Aoe;case"raster-dem":return dst;case"vector":return hst;case"video":return xst;case"canvas":return bst}return _st[e]},tAr=(e,t)=>{_st[e]=t},rAr=(e,t)=>Zi(null,null,function*(){if(wst(e))throw Error(`A source type called "${e}" already exists.`);tAr(e,t)});noe="RTLPluginLoaded",nAr=class extends cu{constructor(...e){super(...e),this.status="unavailable",this.url=null,this.dispatcher=Toe()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(t=>{throw this.status="error",t})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e,t=!1){return Zi(this,null,function*(){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=l0.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if(this.status==="unavailable")if(t)this.status="deferred",this._syncState(this.status);else return this._requestImport();else if(this.status==="requested")return this._requestImport()})}_requestImport(){return Zi(this,null,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new o0(noe))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}},zae=null;Tst=class{constructor(e,t){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=yne(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rttObjects=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading",this.featureStateRevision=-1}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadingDirection!==0||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:r,fadeEndTime:i}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=r,this.fadeEndTime=i}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=zo(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}getRTT(e){return this.rttObjects[e]}acquireRTT(e,t,r){return this.rttObjects[t]=e.acquireRTT(r)}releaseRTT(e){if(this.rttObjects.length!==0){for(let t of this.rttObjects)t&&e.releaseRTT(t);this.rttObjects.length=0}}loadVectorData(e,t,r){if((e==null?void 0:e.etagUnmodified)===!0){this.state="loaded";return}if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!e){this.collisionBoxArray=new Wne;return}e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=iAr(e.buckets,t==null?void 0:t.style),this.hasSymbolBuckets=!1;for(let i in this.buckets){let n=this.buckets[i];if(n instanceof IC)if(this.hasSymbolBuckets=!0,r)n.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let i in this.buckets){let n=this.buckets[i];if(n instanceof IC&&n.hasRTLText){this.hasRTLText=!0,QC().lazyLoad();break}}this.queryPadding=0;for(let i in this.buckets){let n=this.buckets[i];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(i).queryRadius(n))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}unloadVectorData(){for(let e in this.buckets)this.buckets[e].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(e){return this.buckets[e.id]}upload(e){for(let r in this.buckets){let i=this.buckets[r];i.uploadPending()&&i.upload(e)}let t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Tu(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasImage=(this.glyphAtlasTexture=new Tu(e,this.glyphAtlasImage,t.ALPHA),null))}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,i,n,a,o,s,l,u,c){var f;return(f=this.latestFeatureIndex)!=null&&f.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:a,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:o,queryPadding:this.queryPadding*l,getElevation:c},e,t,r):{}}querySourceFeatures(e,t){let r=this.latestFeatureIndex;if(!(r!=null&&r.rawTileData))return;let i=r.loadVTLayers(),n=t!=null&&t.sourceLayer?t.sourceLayer:"",a=i._geojsonTileLayer||i[n];if(!a)return;let o=VT(t==null?void 0:t.filter,`querySourceFeatures[${n}].filter`,t==null?void 0:t.globalState),{z:s,x:l,y:u}=this.tileID.canonical,c={z:s,x:l,y:u};for(let f=0;fr)i=!1;else if(!t)i=!0;else if(this.expirationTimethis.max[0]||t.aabb.min[1]>this.max[1]||t.aabb.min[2]>this.max[2]||t.aabb.max[0]0?(r+=t[n]*this.min[n],i+=t[n]*this.max[n]):(i+=t[n]*this.min[n],r+=t[n]*this.max[n]);return r>=0?2:i<0?0:1}},Soe=class Mst{constructor(t,r,i){this.points=t,this.planes=r,this.aabb=i}static fromInvProjectionMatrix(t,r=1,i=0,n,a){let o=[[-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]],s=a?[[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]],l=2**i,u=o.map(p=>oAr(p,t,r,l));n&&sAr(u,s[0],n,a);let c=s.map(p=>{let d=cg([],u[p[0]],u[p[1]]),v=cg([],u[p[2]],u[p[1]]),m=Uf([],gh([],d,v)),g=-uu(m,u[p[1]]);return m.concat(g)}),f=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let p of u)for(let d=0;d<3;d++)f[d]=Math.min(f[d],p[d]),h[d]=Math.max(h[d],p[d]);return new Mst(u,c,new Moe(f,h))}};fAr=aoe(9.314,3);aot=class{constructor(){this._tiles={}}handleWrapJump(e){let t={};for(let r in this._tiles){let i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),t[i.tileID.key]=i}this._tiles=t}setFeatureState(e,t,r){for(let i in this._tiles)this._tiles[i].setFeatureState(e,t,r)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(t=>t.tileID).sort(vae).map(t=>t.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let t=this.getTileById(e.key);return t!=null&&t.hasData()?t:null}isIdRenderable(e,t=!1){var r;return(r=this.getTileById(e))==null?void 0:r.isRenderable(t)}getRenderableIds(e=0,t){let r=[];for(let i of this.getAllIds())this.isIdRenderable(i,t)&&r.push(this.getTileById(i));return t?r.sort((i,n)=>{let a=i.tileID,o=n.tileID,s=new rr(a.canonical.x,a.canonical.y)._rotate(-e),l=new rr(o.canonical.x,o.canonical.y)._rotate(-e);return a.overscaledZ-o.overscaledZ||l.y-s.y||l.x-s.x}).map(i=>i.tileID.key):r.map(i=>i.tileID).sort(vae).map(i=>i.key)}},ooe=(Xm=class extends cu{constructor(t,r,i){super(),this._maxContentElevationSeen=0,this.id=t,this.dispatcher=i,this.on("data",n=>{this._dataHandler(n)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=eAr(t,r,i,this),this._inViewTiles=new aot,this._outOfViewCache=new Nat(0,n=>this._unloadTile(n)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new aAr,this._didEmitContent=!1,this._updated=!1}onAdd(t){var r;this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,(r=this._source)!=null&&r.onAdd&&this._source.onAdd(t)}onRemove(t){var r;for(let i of this._inViewTiles.getAllTiles())i.unloadVectorData();this.clearTiles(),(r=this._source)!=null&&r.onRemove&&this._source.onRemove(t),this._inViewTiles=new aot}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 t of this._inViewTiles.getAllTiles())if(t.state!=="loaded"&&t.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,r,i,n){return Zi(this,null,function*(){try{let a=yield this._source.loadTile(t);this._tileLoaded(t,r,i,n,a)}catch(a){t.state="errored",a.status===404?this.update(this.transform,this.terrain):this._source.fire(new Mn(Oc(a),{tile:t}))}})}_unloadTile(t){this._source.unloadTile&&this._source.unloadTile(t)}_abortTile(t){this._source.abortTile&&this._source.abortTile(t),this._source.fire(new Ns("dataabort",{tile:t,coord:t.tileID}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let r of this._inViewTiles.getAllTiles())r.upload(t),r.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(t){var r;return this._inViewTiles.getRenderableIds((r=this.transform)==null?void 0:r.bearingInRadians,t)}hasRenderableParent(t){let r=t.overscaledZ-1;if(r>=this._source.minzoom){let i=this.getLoadedTile(t.scaledTo(r));if(i)return this._inViewTiles.isIdRenderable(i.tileID.key)}return!1}reload(t,r=void 0){if(this._paused){this._shouldReloadOnResume=!0;return}this._outOfViewCache.reset();for(let i of this._inViewTiles.getAllIds()){let n=this._inViewTiles.getTileById(i);(!r||this._source.shouldReloadTile(n,r))&&(t?this._reloadTile(i,n.state==="errored"?"loading":"expired"):n.state!=="errored"&&this._reloadTile(i,"reloading"))}}_reloadTile(t,r){return Zi(this,null,function*(){let i=this._inViewTiles.getTileById(t);if(!i)return;let n=i.hasData();i.state!=="loading"&&(i.state=r),yield this._loadTile(i,t,r,n)})}_tileLoaded(t,r,i,n,a){n||(t.timeAdded=zo(),t.selfFading&&(t.fadeEndTime=t.timeAdded+this._rasterFadeDuration)),i==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(r,t),!(a!=null&&a.unmodified)&&(this.getSource().type==="raster-dem"&&t.dem&&bAr(t,this._inViewTiles),t.featureStateRevision=-1,this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new Ns("data",{tile:t,coord:t.tileID})))}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._inViewTiles.getTileById(t)}_retainLoadedChildren(t,r){let i=this._getLoadedDescendents(r),n=new Set;for(let a of r){let o=i[a.key];if(!(o!=null&&o.length)){n.add(a);continue}let s=a.overscaledZ+Xm.maxOverzooming,l=o.filter(f=>f.tileID.overscaledZ<=s);if(!l.length){n.add(a);continue}let u=Math.min(...l.map(f=>f.tileID.overscaledZ)),c=l.filter(f=>f.tileID.overscaledZ===u).map(f=>f.tileID);for(let f of c)t[f.key]=f;this._areDescendentsComplete(c,u,a.overscaledZ)||n.add(a)}return n}_getLoadedDescendents(t){var i;let r={};for(let n of this._inViewTiles.getAllTiles().filter(a=>a.hasData()))for(let a of t)n.tileID.isChildOf(a)&&(r[i=a.key]||(r[i]=[]),r[a.key].push(n));return r}_areDescendentsComplete(t,r,i){return t.length===1&&t[0].isOverscaled()?t[0].overscaledZ===r:4**(r-i)===t.length}getLoadedTile(t){return this._inViewTiles.getLoadedTile(t)}updateCacheSize(t){let r=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),i=this._maxTileCacheZoomLevels===null?a0.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels,n=Math.floor(r*i),a=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,n):n;this._outOfViewCache.setMaxSize(a)}handleWrapJump(t){let r=(t-(this._prevLng===void 0?t:this._prevLng))/360,i=Math.round(r);this._prevLng=t,i&&(this._inViewTiles.handleWrapJump(i),this._resetTileReloadTimers())}_updateMaxContentElevation(){var n,a;let t=this._maxContentElevationSeen,r=(a=(n=this.map)==null?void 0:n.style)==null?void 0:a._layers;if(!r)return t;let i=this._inViewTiles.getAllTiles();for(let o in r){let s=r[o];if(s.type!=="symbol"||s.source!==this.id||s.isHidden(this.transform.zoom))continue;let l=s;if(!l.layout)continue;let u=l.layout.get("symbol-height-offset");if(t=Math.max(t,u.constantOr(0)),!u.isConstant())for(let c of i){let f=c.getBucket(s);f&&f.maxHeightOffset>t&&(t=f.maxHeightOffset)}}return this._maxContentElevationSeen=t,t}update(t,r){if(!this._sourceLoaded||this._paused)return;this.transform=t,this.terrain=r,this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng);let i;!this.used&&!this.usedForTerrain?i=[]:this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(l=>new Gc(l.canonical.z,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y)):(i=u6(t,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?Math.max(this._source.maxzoom,t.maxZoom-this.map._zoomLevelsToOverscale):this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom,maxContentElevation:this._updateMaxContentElevation()}),this._source.hasTile&&(i=i.filter(l=>this._source.hasTile(l)))),this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let n=i.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new Ns("data",{sourceDataType:"idle",sourceId:this.id}));let a=Eoe(t,this._source),o=this._updateRetainedTiles(i,a),s=rot(this._source.type);s&&this._rasterFadeDuration>0&&!r&&vAr(this._inViewTiles,i,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(t){for(let r of this._inViewTiles.getAllIds())t[r]||this._removeTile(r)}_cleanUpVectorTiles(t){for(let r of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(r);if(t[r]){i.clearSymbolFadeHold();continue}if(!i.hasSymbolBuckets){this._removeTile(r);continue}i.holdingForSymbolFade()?i.symbolFadeFinished()&&this._removeTile(r):i.setSymbolHoldDuration(this.map._fadeDuration)}}_addTerrainIdealTiles(t){let r=[];for(let i of t)if(i.canonical.z>this._source.minzoom){let n=i.scaledTo(i.canonical.z-1);r.push(n);let a=i.scaledTo(Math.max(this._source.minzoom,Math.min(i.canonical.z,5)));r.push(a)}return t.concat(r)}releaseSymbolFadeTiles(){for(let t of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(t).holdingForSymbolFade()&&this._removeTile(t)}_updateRetainedTiles(t,r){var l;let i=new Set;for(let u of t)this._addTile(u).hasData()||i.add(u);let n=t.reduce((u,c)=>(u[c.key]=c,u),{}),a=this._retainLoadedChildren(n,i),o={},s=Math.max(r-Xm.maxUnderzooming,this._source.minzoom);for(let u of a){let c=this._inViewTiles.getTileById(u.key),f=c==null?void 0:c.wasRequested();for(let h=u.overscaledZ-1;h>=s;--h){let p=u.scaledTo(h);if(o[p.key])break;if(o[p.key]=!0,c=this.getTile(p),!c&&f&&(c=this._addTile(p)),c){let d=c.hasData();if((d||!((l=this.map)!=null&&l.cancelPendingTileRequestsWhileZooming)||f)&&(n[p.key]=p),f=c.wasRequested(),d)break}}}return n}_addTile(t){let r=this._inViewTiles.getTileById(t.key);if(r)return r;r=this._outOfViewCache.getAndRemove(t),r&&(r.resetFadeLogic(),this._setTileReloadTimer(t.key,r),r.tileID=t,this._state.initializeTileState(r,this.map?this.map.painter:null));let i=r;return r||(r=new Tst(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(r,t.key,r.state,!1)),r.uses++,this._inViewTiles.setTile(t.key,r),i||this._source.fire(new Ns("dataloading",{tile:r,coord:r.tileID})),r}_setTileReloadTimer(t,r){this._clearTileReloadTimer(t);let i=r.getExpiryTimeout();if(i){let n=()=>{this._reloadTile(t,"expired"),delete this._timers[t]};this._timers[t]=setTimeout(n,i)}}_clearTileReloadTimer(t){let r=this._timers[t];r&&(clearTimeout(r),delete this._timers[t])}_resetTileReloadTimers(){for(let t in this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);this._setTileReloadTimer(t,r)}}refreshTiles(t){for(let r of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(r);(this._inViewTiles.isIdRenderable(r)||i.state=="errored")&&t.some(n=>n.equals(i.tileID.canonical))&&this._reloadTile(r,"expired")}}_removeTile(t){let r=this._inViewTiles.getTileById(t);r&&(r.uses--,this._inViewTiles.deleteTileById(t),this._clearTileReloadTimer(t),!(r.uses>0)&&(r.hasData()&&r.state!=="reloading"?this._outOfViewCache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(t){if(t.dataType==="source"){if(t.sourceDataType==="metadata"){this._sourceLoaded=!0;return}t.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(t.sourceDataChanged,t.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}}resetMaxContentElevation(){this._maxContentElevationSeen=0}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1,this.resetMaxContentElevation();for(let t of this._inViewTiles.getAllIds())this._removeTile(t);this._outOfViewCache.reset()}tilesIn(t,r,i){let n=[],a=this.transform;if(!a)return n;let o=a.getCoveringTilesDetailsProvider().allowWorldCopies(),s=i?a.getCameraQueryGeometry(t):t,l=p=>a.screenPointToMercatorCoordinate(p,this.terrain),u=this.transformBbox(t,l,!o),c=this.transformBbox(s,l,!o),f=this.getIds(),h=lp.fromPoints(c);for(let p of f){let d=this._inViewTiles.getTileById(p);if(d.holdingForSymbolFade())continue;let v=o?[d.tileID]:[d.tileID.unwrapTo(-1),d.tileID.unwrapTo(0)],m=2**(a.zoom-d.tileID.overscaledZ),g=r*d.queryPadding*qr/d.tileSize/m;for(let w of v){let _=h.map(b=>w.getTilePoint(new Mo(b.x,b.y)));if(_.expandBy(g),_.intersects(_nt)){let b=u.map(x=>w.getTilePoint(x)),M=c.map(x=>w.getTilePoint(x));n.push({tile:d,tileID:o?w:w.unwrapTo(0),queryGeometry:b,cameraQueryGeometry:M,scale:m})}}}return n}transformBbox(t,r,i){let n=t.map(r);if(i){let a=lp.fromPoints(t);a.shrinkBy(Math.min(a.width(),a.height())*.001);let o=a.map(r);lp.fromPoints(n).covers(o)||(n=n.map(s=>s.x>.5?new Mo(s.x-1,s.y,s.z):s))}return n}getVisibleCoordinates(t){let r=this.getRenderableIds(t).map(i=>this._inViewTiles.getTileById(i).tileID);return this.transform&&this.transform.populateCache(r),r}hasTransition(){return this._source.hasTransition()?!0:rot(this._source.type)&&xAr(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(t){this._rasterFadeDuration=t}setFeatureState(t,r,i){t||(t=BC),this._state.updateState(t,r,i)}removeFeatureState(t,r,i){t||(t=BC),this._state.removeFeatureState(t,r,i)}getFeatureState(t,r){return t||(t=BC),this._state.getState(t,r)}setDependencies(t,r,i){let n=this._inViewTiles.getTileById(t);n&&n.setDependencies(r,i)}reloadTilesForDependencies(t,r){for(let i of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(i).hasDependency(t,r)&&this._reloadTile(i,"reloading");this._outOfViewCache.filter(i=>!i.hasDependency(t,r))}areTilesLoaded(){for(let t of this._inViewTiles.getAllTiles())if(t.state!=="loaded"&&t.state!=="errored")return!1;return!0}},Xm.maxUnderzooming=10,Xm.maxOverzooming=3,Xm),_Ar=class{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let r=1;r0?(i-a)/o:0;return this.points[n].mult(1-s).add(this.points[t].mult(s))}};oot=class{constructor(e,t,r){let i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let a=0;athis.width||i<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=i){if(n)return[{key:null,x1:e,y1:t,x2:r,y2:i}];for(let l=0;l0}hitTestCircle(e,t,r,i,n){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let u=[],c={hitTest:!0,overlapMode:i,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,u,c,n),u.length>0}_queryCell(e,t,r,i,n,a,o,s){let{seenUids:l,hitTest:u,overlapMode:c}=o,f=this.boxCells[n],h=1e-6;if(f!==null){let d=this.bboxes;for(let v of f)if(!l.box[v]){l.box[v]=!0;let m=v*4,g=this.boxKeys[v];if(e<=d[m+2]+h&&t<=d[m+3]+h&&r>=d[m+0]-h&&i>=d[m+1]-h&&(!s||s(g))&&(!u||!Oq(c,g.overlapMode))&&(a.push({key:g,x1:d[m],y1:d[m+1],x2:d[m+2],y2:d[m+3]}),u))return!0}}let p=this.circleCells[n];if(p!==null){let d=this.circles;for(let v of p)if(!l.circle[v]){l.circle[v]=!0;let m=v*3,g=this.circleKeys[v];if(this._circleAndRectCollide(d[m],d[m+1],d[m+2],e,t,r,i)&&(!s||s(g))&&(!u||!Oq(c,g.overlapMode))){let w=d[m],_=d[m+1],b=d[m+2];if(a.push({key:g,x1:w-b,y1:_-b,x2:w+b,y2:_+b}),u)return!0}}}return!1}_queryCellCircle(e,t,r,i,n,a,o,s){let{circle:l,seenUids:u,overlapMode:c}=o,f=this.boxCells[n];if(f!==null){let p=this.bboxes;for(let d of f)if(!u.box[d]){u.box[d]=!0;let v=d*4,m=this.boxKeys[d];if(this._circleAndRectCollide(l.x,l.y,l.radius,p[v+0],p[v+1],p[v+2],p[v+3])&&(!s||s(m))&&!Oq(c,m.overlapMode))return a.push(!0),!0}}let h=this.circleCells[n];if(h!==null){let p=this.circles;for(let d of h)if(!u.circle[d]){u.circle[d]=!0;let v=d*3,m=this.circleKeys[d];if(this._circlesCollide(p[v],p[v+1],p[v+2],l.x,l.y,l.radius)&&(!s||s(m))&&!Oq(c,m.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(r),f=this._convertToYCellCoord(i);for(let h=l;h<=c;h++)for(let p=u;p<=f;p++){let d=this.xCellCount*p+h;if(n.call(this,e,t,r,i,d,a,o,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,i,n,a){let o=i-e,s=n-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,i,n,a,o){let s=(a-i)/2,l=Math.abs(e-(i+s));if(l>s+r)return!1;let u=(o-n)/2,c=Math.abs(t-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;let f=l-s,h=c-u;return f*f+h*h<=r*r}};MAr=Om();DAr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);PAr=class{constructor(e,t=new oot(e.width+200,e.height+200,25),r=new oot(e.width+200,e.height+200,25)){this.transform=e,this.grid=t,this.ignoredGrid=r,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,t,r,i,n,a,o,s,l,u,c,f,h=0,p=!0){let d=e.anchorPointX+s[0],v=e.anchorPointY+s[1],m=this.projectAndGetPerspectiveRatio(d,v,n,Qq(u,d,v,h,p),f),g=r*m.perspectiveRatio,w;if(!a&&!o){let y=m.x+(c?c.x*g:0),E=m.y+(c?c.y*g:0);w={allPointsOccluded:!1,box:[y+e.x1*g,E+e.y1*g,y+e.x2*g,E+e.y2*g]}}else w=this._projectCollisionBox(e,g,i,n,a,o,s,m,u,c,f,h,p);let[_,b,M,x]=w.box,A=a?w.allPointsOccluded:m.isOccluded,T=A;return T||(T=m.perspectiveRatio=1;I--)P.push(D.path[I]);for(let I=1;IB.signedDistanceFromCamera<=0)?[]:I.map(B=>B.point)}let L=[];if(P.length>0){let I=P[0].clone(),B=P[0].clone();for(let O=1;O=S.x&&B.x<=C.x&&I.y>=S.y&&B.y<=C.y?[P]:B.xC.x||B.yC.y?[]:fae([P],S.x,S.y,C.x,C.y)}for(let I of L){k.reset(I,E*.25);let B=0;B=k.length<=.5*E?1:Math.ceil(k.paddedLength/R)+1;for(let O=0;O=this.screenRightBoundary||i<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,i){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(P.x,P.y,i,Qq(l,P.x,P.y,f,h),c));D=F.some(P=>!P.isOccluded),k=F.map(P=>new rr(P.x,P.y))}else D=!0;return{box:Htt(k),allPointsOccluded:!D}}},uot=class{constructor(e,t,r,i){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):i&&r?1:0,this.placed=r}isHidden(){return this.opacity===0&&!this.placed}},VC=class{constructor(e,t,r,i,n){this.text=new uot(e?e.text:null,t,r,n),this.icon=new uot(e?e.icon:null,t,i,n)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}},cot=class{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}},IAr=class{constructor(e,t,r,i,n){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}},RAr=class{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:r=>r.collisionGroupID===t}}return this.collisionGroups[e]}};zAr=class{constructor(e,t,r,i,n){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new PAr(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=r,this.retainedQueryData={},this.collisionGroups=new RAr(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;if(t)return(r,i)=>t.getElevation(e,r,i)}getBucketParts(e,t,r,i){let n=r.getBucket(t),a=r.latestFeatureIndex;if(!n||!a||t.id!==n.layerIds[0])return;let o=r.collisionBoxArray,s=n.layers[0].layout,l=n.layers[0].paint,u=2**(this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/qr,f=r.tileID.toUnwrapped(),h=s.get("text-rotation-alignment")==="map",p=r0(r,1,this.transform.zoom),d=Um(this.collisionIndex.transform,r,l.get("text-translate"),l.get("text-translate-anchor")),v=Um(this.collisionIndex.transform,r,l.get("icon-translate"),l.get("icon-translate-anchor")),m=koe(h,this.transform,p);this.retainedQueryData[n.bucketInstanceId]=new IAr(n.bucketInstanceId,a,n.sourceLayerIndex,n.index,r.tileID);let g={bucket:n,layout:s,translationText:d,translationIcon:v,unwrappedTileID:f,pitchedLabelPlaneMatrix:m,scale:u,textPixelRatio:c,holdingForFade:r.holdingForSymbolFade(),collisionBoxArray:o,partiallyEvaluatedTextSize:LC(n.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(n.sourceID)};if(i)for(let w of n.sortKeyRanges){let{sortKey:_,symbolInstanceStart:b,symbolInstanceEnd:M}=w;e.push({sortKey:_,symbolInstanceStart:b,symbolInstanceEnd:M,parameters:g})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:n.symbolInstances.length,parameters:g})}attemptAnchorPlacement(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g,w,_,b,M){var E,S,C;let x=Fq[e.textAnchor],A=[e.textOffset0,e.textOffset1],T=fot(x,r,i,A,n),y=this.collisionIndex.placeCollisionBox(t,f,s,l,u,o,a,v,c.predicate,w,T,_,b,M);if((!g||this.collisionIndex.placeCollisionBox(g,f,s,l,u,o,a,m,c.predicate,w,T,_,b,M).placeable)&&y.placeable){let k;if((E=this.prevPlacement)!=null&&E.variableOffsets[h.crossTileID]&&((C=(S=this.prevPlacement)==null?void 0:S.placements[h.crossTileID])!=null&&C.text)&&(k=this.prevPlacement.variableOffsets[h.crossTileID].anchor),h.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[h.crossTileID]={textOffset:A,width:r,height:i,anchor:x,textBoxScale:n,prevAnchor:k},this.markUsedJustification(p,x,h,d),p.allowVerticalPlacement&&(this.markUsedOrientation(p,d,h),this.placedOrientations[h.crossTileID]=d),{shift:T,placedGlyphBoxes:y}}}placeLayerBucketPart(e,t,r){let{bucket:i,layout:n,translationText:a,translationIcon:o,unwrappedTileID:s,pitchedLabelPlaneMatrix:l,textPixelRatio:u,holdingForFade:c,collisionBoxArray:f,partiallyEvaluatedTextSize:h,collisionGroup:p}=e.parameters,d=n.get("text-optional"),v=n.get("icon-optional"),m=uC(n,"text-overlap","text-allow-overlap"),g=m==="always",w=uC(n,"icon-overlap","icon-allow-overlap"),_=w==="always",b=n.get("text-rotation-alignment")==="map",M=n.get("text-pitch-alignment")==="map",x=n.get("icon-text-fit")!=="none",A=n.get("symbol-z-order")==="viewport-y",T=n.get("symbol-height-anchor")==="ground",y=g&&(_||!i.hasIconData()||v),E=_&&(g||!i.hasTextData()||d);!i.collisionArrays&&f&&i.deserializeCollisionBoxes(f);let S=this.retainedQueryData[i.bucketInstanceId].tileID,C=this._getTerrainElevationFunc(S),k=this.transform.getFastPathSimpleProjectionMatrix(S),D=(F,P,R)=>{var xe,ce;if(t[F.crossTileID])return;if(c){this.placements[F.crossTileID]=new cot(!1,!1,!1);return}let L=F.heightOffset,I=!1,B=!1,O=!0,$=null,X={box:null,placeable:!1,offscreen:null,occluded:!1},K={box:null,placeable:!1,offscreen:null},G=null,q=null,J=null,N=0,V=0,Y=0;P.textFeatureIndex?N=P.textFeatureIndex:F.useRuntimeCollisionCircles&&(N=F.featureIndex),P.verticalTextFeatureIndex&&(V=P.verticalTextFeatureIndex);let H=P.textBox;if(H){let oe=ee=>{let ae=1;if(i.allowVerticalPlacement&&!ee&&this.prevPlacement){let _e=this.prevPlacement.placedOrientations[F.crossTileID];_e&&(this.placedOrientations[F.crossTileID]=_e,ae=_e,this.markUsedOrientation(i,ae,F))}return ae},Se=(ee,ae)=>{if(i.allowVerticalPlacement&&F.numVerticalGlyphVertices>0&&P.verticalTextBox){for(let _e of i.writingModes)if(_e===2?(X=ae(),K=X):X=ee(),X==null?void 0:X.placeable)break}else X=ee()},be=F.textAnchorOffsetStartIndex,fe=F.textAnchorOffsetEndIndex;if(fe===be){let ee=(ae,_e)=>{let re=this.collisionIndex.placeCollisionBox(ae,m,u,S,s,M,b,a,p.predicate,C,void 0,k,L,T);return re!=null&&re.placeable&&(this.markUsedOrientation(i,_e,F),this.placedOrientations[F.crossTileID]=_e),re};Se(()=>ee(H,1),()=>{let ae=P.verticalTextBox;return i.allowVerticalPlacement&&F.numVerticalGlyphVertices>0&&ae?ee(ae,2):{box:null,offscreen:null}}),oe(X==null?void 0:X.placeable)}else{let ee=Fq[(ce=(xe=this.prevPlacement)==null?void 0:xe.variableOffsets[F.crossTileID])==null?void 0:ce.anchor],ae=(re,pe,Te)=>{let Ce=re.x2-re.x1,ze=re.y2-re.y1,we=F.textBoxScale,me=x&&w==="never"?pe:null,Le=null,Ne=m==="never"?1:2,Je="never";ee&&Ne++;for(let rt=0;rtae(H,P.iconBox,1),()=>{let re=P.verticalTextBox,pe=X==null?void 0:X.placeable;return i.allowVerticalPlacement&&!pe&&F.numVerticalGlyphVertices>0&&re?ae(re,P.verticalIconBox,2):{box:null,occluded:!0,offscreen:null}}),X&&(I=X.placeable,O=X.offscreen);let _e=oe(X==null?void 0:X.placeable);if(!I&&this.prevPlacement){let re=this.prevPlacement.variableOffsets[F.crossTileID];re&&(this.variableOffsets[F.crossTileID]=re,this.markUsedJustification(i,re.anchor,F,_e))}}}if(G=X,I=G==null?void 0:G.placeable,O=G==null?void 0:G.offscreen,F.useRuntimeCollisionCircles&&F.centerJustifiedTextSymbolIndex>=0){let oe=i.text.placedSymbolArray.get(F.centerJustifiedTextSymbolIndex),Se=Dq(i.textSizeData,h,oe),be=n.get("text-padding"),fe=F.collisionCircleDiameter;q=this.collisionIndex.placeCollisionCircles(m,oe,i.lineVertexArray,i.glyphOffsetArray,Se,s,l,r,M,p.predicate,fe,be,a,C),q.circles.length&&q.collisionDetected&&!r&&Pa("Collisions detected, but collision boxes are not shown"),I=g||q.circles.length>0&&!q.collisionDetected,O&&(O=q.offscreen)}if(P.iconFeatureIndex&&(Y=P.iconFeatureIndex),P.iconBox){let oe=Se=>this.collisionIndex.placeCollisionBox(Se,w,u,S,s,M,b,o,p.predicate,C,x&&$?$:void 0,k,L,T);K&&K.placeable&&P.verticalIconBox?(J=oe(P.verticalIconBox),B=J.placeable):(J=oe(P.iconBox),B=J.placeable),O&&(O=J.offscreen)}let j=d||F.numHorizontalGlyphVertices===0&&F.numVerticalGlyphVertices===0,Q=v||F.numIconVertices===0;!j&&!Q?B=I=B&&I:Q?j||B&&(B=I):I=B&&I;let te=I&&G.placeable,ue=B&&J.placeable;if(te&&(K&&K.placeable&&V?this.collisionIndex.insertCollisionBox(G.box,m,n.get("text-ignore-placement"),i.bucketInstanceId,V,p.ID):this.collisionIndex.insertCollisionBox(G.box,m,n.get("text-ignore-placement"),i.bucketInstanceId,N,p.ID)),ue&&this.collisionIndex.insertCollisionBox(J.box,w,n.get("icon-ignore-placement"),i.bucketInstanceId,Y,p.ID),q&&I&&this.collisionIndex.insertCollisionCircles(q.circles,m,n.get("text-ignore-placement"),i.bucketInstanceId,N,p.ID),r&&this.storeCollisionData(i.bucketInstanceId,R,P,G,J,q),F.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");if(i.bucketInstanceId===0)throw Error("bucket.bucketInstanceId can't be 0");let ge=(I||y)&&!(G!=null&&G.occluded),Ee=(B||E)&&!(J!=null&&J.occluded);this.placements[F.crossTileID]=new cot(ge,Ee,O||i.justReloaded),t[F.crossTileID]=!0};if(A){if(e.symbolInstanceStart!==0)throw Error("bucket.bucketInstanceId should be 0");let F=i.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let P=F.length-1;P>=0;--P){let R=F[P];D(i.symbolInstances.get(R),i.collisionArrays[R],R)}}else for(let F=e.symbolInstanceStart;F=0&&(a>=0&&s!==a?e.text.placedSymbolArray.get(s).crossTileID=0:e.text.placedSymbolArray.get(s).crossTileID=r.crossTileID)}markUsedOrientation(e,t,r){let i=t===1||t===3?t:0,n=t===2?t:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];for(let o of a)e.text.placedSymbolArray.get(o).placedOrientation=i;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=n)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let i=t?t.symbolFadeChange(e):1,n=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let s in this.placements){let l=this.placements[s],u=n[s];u?(this.opacities[s]=new VC(u,i,l.text,l.icon),r||(r=l.text!==u.text.placed),r||(r=l.icon!==u.icon.placed)):(this.opacities[s]=new VC(null,i,l.text,l.icon,l.skipFade),r||(r=l.text||l.icon))}for(let s in n){let l=n[s];if(!this.opacities[s]){let u=new VC(l,i,!1,!1);u.isHidden()||(this.opacities[s]=u,r||(r=l.text.placed),r||(r=l.icon.placed))}}for(let s in a)!this.variableOffsets[s]&&this.opacities[s]&&!this.opacities[s].isHidden()&&(this.variableOffsets[s]=a[s]);for(let s in o)!this.placedOrientations[s]&&this.opacities[s]&&!this.opacities[s].isHidden()&&(this.placedOrientations[s]=o[s]);if(t&&t.lastPlacementChangeTime===void 0)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let i of t){let n=i.getBucket(e);n&&i.latestFeatureIndex&&e.id===n.layerIds[0]&&this.updateBucketOpacities(n,i.tileID,r,i.collisionBoxArray)}}updateBucketOpacities(e,t,r,i){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let n=e.layers[0],a=n.layout,o=new VC(null,0,!1,!1,!0),s=a.get("text-allow-overlap"),l=a.get("icon-allow-overlap"),u=n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"),c=a.get("text-rotation-alignment")==="map",f=a.get("text-pitch-alignment")==="map",h=a.get("icon-text-fit")!=="none",p=new VC(null,0,s&&(l||!e.hasIconData()||a.get("icon-optional")),l&&(s||!e.hasTextData()||a.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);let d=(m,g,w)=>{for(let _=0;_0||_>0,T=g.numIconVertices>0,y=this.placedOrientations[g.crossTileID],E=y===2,S=y===1||y===3;if(A){let k=dot(x.text),D=E?GC:k;d(e.text,w,D);let F=S?GC:k;d(e.text,_,F);let P=x.text.isHidden(),R=[g.rightJustifiedTextSymbolIndex,g.centerJustifiedTextSymbolIndex,g.leftJustifiedTextSymbolIndex];for(let B of R)B>=0&&(e.text.placedSymbolArray.get(B).hidden=P||E?1:0);g.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(g.verticalPlacedTextSymbolIndex).hidden=P||S?1:0);let L=this.variableOffsets[g.crossTileID];L&&this.markUsedJustification(e,L.anchor,g,y);let I=this.placedOrientations[g.crossTileID];I&&(this.markUsedJustification(e,"left",g,I),this.markUsedOrientation(e,I,g))}if(T){let k=dot(x.icon),D=!(h&&g.verticalPlacedIconSymbolIndex&&E);if(g.placedIconSymbolIndex>=0){let F=D?k:GC;d(e.icon,g.numIconVertices,F),e.icon.placedSymbolArray.get(g.placedIconSymbolIndex).hidden=x.icon.isHidden()}if(g.verticalPlacedIconSymbolIndex>=0){let F=D?GC:k;d(e.icon,g.numVerticalIconVertices,F),e.icon.placedSymbolArray.get(g.verticalPlacedIconSymbolIndex).hidden=x.icon.isHidden()}}let C=v!=null&&v.has(m)?v.get(m):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let k=e.collisionArrays[m];if(k){let D=new rr(0,0);if(k.textBox||k.verticalTextBox){let F=!0;if(u){let P=this.variableOffsets[b];P?(D=fot(P.anchor,P.width,P.height,P.textOffset,P.textBoxScale),c&&D._rotate(f?-this.transform.bearingInRadians:this.transform.bearingInRadians)):F=!1}if(k.textBox||k.verticalTextBox){let P;k.textBox&&(P=E),k.verticalTextBox&&(P=S),hot(e.textCollisionBox.collisionVertexArray,x.text.placed,!F||P,C.text,D.x,D.y)}}if(k.iconBox||k.verticalIconBox){let F=!(S||!k.verticalIconBox),P;k.iconBox&&(P=F),k.verticalIconBox&&(P=!F),hot(e.iconCollisionBox.collisionVertexArray,x.icon.placed,P,C.icon,h?D.x:0,h?D.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}};BAr=2**25,qAr=2**24,OAr=2**17,NAr=2**16;GC=0,UAr=class{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,i,n){let a=this._bucketParts;for(;this._currentTileIndexo.sortKey-s.sortKey));this._currentPartIndex!this._forceFullPlacement&&zo()-i>2;for(;this._currentPlacementIndex>=0;){let a=t[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if(dae(a)&&a.layout&&(!a.minzoom||a.minzoom<=o)&&(!a.maxzoom||a.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new UAr(a)),this._inProgressLayer.continuePlacement(r[a.source],this.placement,this._showCollisionBoxes,a,n))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}},pot=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Al=new Uint32Array(96),GAr=class Dst{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(t,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=pot[i&15];if(!a)throw Error("Unrecognized array type.");let[o]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new Dst(s,o,a,void 0,t)}constructor(t,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(t)||t<0)throw Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let o=pot.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,l=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(o<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,t),this.coords=new i(a,8+l+u,t*2),this._pos=t*2,this._finished=!0;else{let c=this.data=new n(8+s+l+u);this.ids=new this.IndexArrayType(c,8,t),this.coords=new i(c,8+l+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(c,0,2).set([219,16+o]),new Uint16Array(c,2,1)[0]=r,new Uint32Array(c,4,1)[0]=t}}add(t,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=r,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw Error(`Added ${t} items when expected ${this.numItems}.`);return uoe(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:s}=this;Al[0]=0,Al[1]=a.length-1,Al[2]=0;let l=3,u=[];for(;l>0;){let c=Al[--l],f=Al[--l],h=Al[--l];if(f-h<=s){for(let m=h;m<=f;m++){let g=o[2*m],w=o[2*m+1];g>=t&&g<=i&&w>=r&&w<=n&&u.push(a[m])}continue}let p=h+f>>1,d=o[2*p],v=o[2*p+1];d>=t&&d<=i&&v>=r&&v<=n&&u.push(a[p]),(c===0?t<=d:r<=v)&&(Al[l++]=h,Al[l++]=p-1,Al[l++]=1-c),(c===0?i>=d:n>=v)&&(Al[l++]=p+1,Al[l++]=f,Al[l++]=1-c)}return u}within(t,r,i){let n=[];return this.withinInto(t,r,i,n),n}withinInto(t,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:s}=this;Al[0]=0,Al[1]=a.length-1,Al[2]=0;let l=3,u=0,c=i*i;for(;l>0;){let f=Al[--l],h=Al[--l],p=Al[--l];if(h-p<=s){for(let g=p;g<=h;g++)vot(o[2*g],o[2*g+1],t,r)<=c&&(n[u++]=a[g]);continue}let d=p+h>>1,v=o[2*d],m=o[2*d+1];vot(v,m,t,r)<=c&&(n[u++]=a[d]),(f===0?t-i<=v:r-i<=m)&&(Al[l++]=p,Al[l++]=d-1,Al[l++]=1-f),(f===0?t+i>=v:r+i>=m)&&(Al[l++]=d+1,Al[l++]=h,Al[l++]=1-f)}return u}};jC=512/qr/2,HAr=class{constructor(e,t,r){this.tileID=e,this.bucketInstanceId=r,this._symbolsByKey={};let i=new Map;for(let n=0;n({x:Math.floor(s.anchorX*jC),y:Math.floor(s.anchorY*jC)})),crossTileIDs:a.map(s=>s.crossTileID)};if(o.positions.length>128){let s=new GAr(o.positions.length,16,Uint16Array);for(let{x:l,y:u}of o.positions)s.add(l,u);s.finish(),delete o.positions,o.index=s}this._symbolsByKey[n]=o}}getScaledCoordinates(e,t){let{x:r,y:i,z:n}=this.tileID.canonical,{x:a,y:o,z:s}=t.canonical,l=s-n,u=jC/2**l,c=(a*qr+e.anchorX)*u,f=(o*qr+e.anchorY)*u,h=r*qr*jC,p=i*qr*jC;return{x:Math.floor(c-h),y:Math.floor(f-p)}}findMatches(e,t,r){let i=this.tileID.canonical.ze)}},jAr=class{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}},$Ar=class{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(t!==0)for(let r in this.indexes){let i=this.indexes[r],n={};for(let a in i){let o=i[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+t),n[o.tileID.key]=o}this.indexes[r]=n}this.lng=e}addBucket(e,t,r){var n,a,o;if((n=this.indexes[e.overscaledZ])!=null&&n[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let s=0;se.overscaledZ)for(let u in l){let c=l[u];c.tileID.isChildOf(e)&&c.findMatches(t.symbolInstances,e,i)}else{let u=l[e.scaledTo(Number(s)).key];u&&u.findMatches(t.symbolInstances,e,i)}}for(let s=0;s> 1u)/127.0,float(packedOpacity & 1u));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c );} #ifdef TERRAIN3D uniform sampler2D u_terrain;uniform highp sampler2D u_depth;layout(std140) uniform TerrainUBO {highp mat4 u_terrain_matrix;highp vec4 u_terrain_unpack;highp float u_terrain_dim;highp float u_terrain_exaggeration;}; #endif const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { #ifdef TERRAIN3D highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); #else return 1.0; #endif }float calculate_visibility(vec4 pos) { #ifdef TERRAIN3D vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; #else return 1.0; #endif }float ele(ivec2 pos) { #ifdef TERRAIN3D vec4 rgb=(texelFetch(u_terrain,pos,0)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif }float get_elevation(vec2 pos) { #ifdef TERRAIN3D #ifdef GLOBE if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} #endif vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.5;vec2 f=fract(coord);ivec2 c=ivec2(floor(coord));ivec2 hi=textureSize(u_terrain,0)-1;float tl=ele(clamp(c,ivec2(0),hi));float tr=ele(clamp(c+ivec2(1,0),ivec2(0),hi));float bl=ele(clamp(c+ivec2(0,1),ivec2(0),hi));float br=ele(clamp(c+ivec2(1,1),ivec2(0),hi));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif }const float PI=3.141592653589793; #define PROJECTION_UBO layout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};`,XAr=`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,ZAr="layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}",KAr=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,JAr="uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",QAr=`in vec3 v_data;flat in float v_visibility; #pragma maplibre: define highp vec4 color #pragma maplibre: define mediump float radius #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 stroke_color #pragma maplibre: define mediump float stroke_width #pragma maplibre: define lowp float stroke_opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump float radius #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 stroke_color #pragma maplibre: initialize mediump float stroke_width #pragma maplibre: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,eMr=`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform vec2 u_translate;layout(location=0) in ivec2 a_pos;out vec3 v_data;flat out float v_visibility; #pragma maplibre: define highp vec4 color #pragma maplibre: define mediump float radius #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 stroke_color #pragma maplibre: define mediump float stroke_width #pragma maplibre: define lowp float stroke_opacity void main(void) { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump float radius #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 stroke_color #pragma maplibre: initialize mediump float stroke_width #pragma maplibre: initialize lowp float stroke_opacity ivec2 pos_raw=a_pos+32768;vec2 extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;vec2 circle_center=vec2(pos_raw >> 3)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { #ifdef GLOBE vec3 center_vector=projectToSphere(circle_center); #endif float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { #ifdef GLOBE vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); #else vec4 projected_center=projectTileWithElevation(circle_center,ele); #endif corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} #ifdef GLOBE vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); #else gl_Position=projectTileWithElevation(corner_position,ele); #endif } else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,got="void main() {fragColor=vec4(1.0);}",dg={prelude:go(WAr,YAr),projectionMercator:go(` void clipAntimeridian() {}`,"float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:go("in highp float v_projection_tile_x;void clipAntimeridian() {if (u_projection_clip_antimeridian !=0 && (v_projection_tile_x < 0.0 || v_projection_tile_x >=8192.0)) {discard;}}",`#define GLOBE_RADIUS 6371008.8 #ifndef PROJECTION_UBO uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix; #endif out highp float v_projection_tile_x;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos );}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float t=exp(PI-(mercator_pos_y*PI*2.0));return (2.0*t)/(t*t+1.0);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;float spherical_x=mercator_pos.x*PI*2.0+PI;float t=exp(PI-(mercator_pos.y*PI*2.0));float t2=t*t;float denom=t2+1.0;float sin_sy=(t2-1.0)/denom;float cos_sy=(2.0*t)/denom;vec3 pos=vec3(sin(spherical_x)*cos_sy,sin_sy,cos(spherical_x)*cos_sy );if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:go(XAr,ZAr),backgroundPattern:go(KAr,JAr),circle:go(QAr,eMr),clippingMask:go(got,"layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:go(`uniform highp float u_intensity;in vec2 v_extrude; #pragma maplibre: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma maplibre: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;layout(location=0) in ivec2 a_pos;out vec2 v_extrude; #pragma maplibre: define highp float weight #pragma maplibre: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma maplibre: initialize highp float weight #pragma maplibre: initialize mediump float radius ivec2 pos_raw=a_pos+32768;vec2 unscaled_extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=vec2(pos_raw >> 3); #ifdef GLOBE vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); #else gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); #endif }`),heatmapTexture:go(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world_size,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:go("flat in float v_placed;flat in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","layout(location=0) in vec2 a_anchor_pos;layout(location=1) in vec2 a_placed;layout(location=2) in vec2 a_box_real;flat out float v_placed;flat out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:go("flat in float v_radius;in vec2 v_extrude;flat in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","layout(location=0) in vec2 a_pos;layout(location=1) in float a_radius;layout(location=2) in vec2 a_flags;flat out float v_radius;out vec2 v_extrude;flat out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:go(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {vec4 data=texelFetch(u_elevation_stops,ivec2(stop,0),0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else {l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=2.0/u_dimension;float scale=(u_dimension.x-4.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:go("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","layout(location=0) in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:go(got,`layout(location=0) in vec2 a_pos;void main() { #ifdef GLOBE gl_Position=projectTileFor3D(a_pos,0.0); #else gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif }`),fill:go(`#pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float opacity fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos; #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float opacity if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:go(`in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define highp vec4 outline_color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 outline_color #pragma maplibre: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define highp vec4 outline_color #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 outline_color #pragma maplibre: initialize lowp float opacity if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillOutlinePattern:go(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;uniform bool u_sdf_pattern;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*alpha*opacity;} else {fragColor=mix(color1,color2,u_fade)*alpha*opacity;} #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillPattern:go(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform bool u_sdf_pattern;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*opacity;} else {fragColor=mix(color1,color2,u_fade)*opacity;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; #pragma maplibre: define lowp float opacity #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:go(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; #ifdef TERRAIN3D layout(location=2) in vec2 a_centroid; #endif out vec4 v_color; #pragma maplibre: define highp float base #pragma maplibre: define highp float height #pragma maplibre: define highp vec4 color void main() { #pragma maplibre: initialize highp float base #pragma maplibre: initialize highp float height #pragma maplibre: initialize highp vec4 color vec3 normal=vec3(a_normal_ed.xyz);float gradient_base=max(0.0,base);float gradient_height=max(0.0,height); #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); #ifdef GLOBE mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); #endif directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+gradient_base)*pow(gradient_height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:go(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; #pragma maplibre: define lowp float base #pragma maplibre: define lowp float height #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float base #pragma maplibre: initialize lowp float height #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed; #ifdef TERRAIN3D layout(location=2) in vec2 a_centroid; #endif #ifdef GLOBE out vec3 v_sphere_pos; #endif out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; #pragma maplibre: define lowp float base #pragma maplibre: define lowp float height #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float base #pragma maplibre: initialize lowp float height #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=vec3(a_normal_ed.xyz);float edgedistance=float(a_normal_ed.w);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;float gradient_base=max(0.0,base);float gradient_height=max(0.0,height); #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif vec2 pos=a_normal_ed.x==1 && a_normal_ed.y==0 && a_normal_ed.z==16384 ? a_pos : vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+gradient_base)*pow(gradient_height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:go(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(ivec2 texel) {vec4 data=texelFetch(u_image,texel,0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {ivec2 pos=ivec2(gl_FragCoord.xy)+ivec2(1);float tileSize=u_dimension.x-4.0;float a=getElevation(pos+ivec2(-1,-1));float b=getElevation(pos+ivec2(0,-1));float c=getElevation(pos+ivec2(1,-1));float d=getElevation(pos+ivec2(-1,0));float e=getElevation(pos);float f=getElevation(pos+ivec2(1,0));float g=getElevation(pos+ivec2(-1,1));float h=getElevation(pos+ivec2(0,1));float i=getElevation(pos+ivec2(1,1));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+128.0/255.0,deriv.y/8.0+128.0/255.0,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;layout(location=1) in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:go(`uniform sampler2D u_image;in highp vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 #define STANDARD 0 #define COMBINED 1 #define IGOR 2 #define MULTIDIRECTIONAL 3 #define BASIC 4 float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else {fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else {fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {highp vec2 size=vec2(textureSize(u_image,0));highp vec2 texturePos=(v_pos*(size-2.0)+1.0)/size;vec4 pixel=texture(u_image,texturePos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=(pixel.rg-128.0/255.0)*8.0/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:go(`flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);v_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*2.0;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),lineGradient:go(`uniform sampler2D u_image;flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),linePattern:go(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;flat in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;flat in float v_width; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity clipAntimeridian();vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;flat out float v_width; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float gapwidth #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define lowp vec4 pattern_from #pragma maplibre: define lowp vec4 pattern_to #pragma maplibre: define lowp float pixel_ratio_from #pragma maplibre: define lowp float pixel_ratio_to void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 pattern_from #pragma maplibre: initialize mediump vec4 pattern_to #pragma maplibre: initialize lowp float pixel_ratio_from #pragma maplibre: initialize lowp float pixel_ratio_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:go(`uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define highp vec4 color #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize highp vec4 color #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:go(`uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; #ifdef GLOBE out float v_depth; #endif #pragma maplibre: define lowp float blur #pragma maplibre: define lowp float opacity #pragma maplibre: define mediump float gapwidth #pragma maplibre: define lowp float offset #pragma maplibre: define mediump float width #pragma maplibre: define lowp float floorwidth #pragma maplibre: define mediump vec4 dasharray_from #pragma maplibre: define mediump vec4 dasharray_to void main() { #pragma maplibre: initialize lowp float blur #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize mediump float gapwidth #pragma maplibre: initialize lowp float offset #pragma maplibre: initialize mediump float width #pragma maplibre: initialize lowp float floorwidth #pragma maplibre: initialize mediump vec4 dasharray_from #pragma maplibre: initialize mediump vec4 dasharray_to if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),layerOpacity:go(`uniform sampler2D u_image;uniform float u_opacity;in vec2 v_pos;void main() {fragColor=texture(u_image,v_pos)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif }`,"layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos.x*2.0-1.0,1.0-a_pos.y*2.0,0.0,1.0);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),raster:go(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec3 v_pos0;in vec3 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0.xy/v_pos0.z);vec4 color1=texture(u_image1,v_pos1.xy/v_pos1.z);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec3 u_image_warp;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;layout(location=0) in vec2 a_pos;out vec3 v_pos0;out vec3 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 topLeft=u_coords_top.xy;vec2 topRight=u_coords_top.zw;vec2 bottomLeft=u_coords_bottom.xy;vec2 bottomRight=u_coords_bottom.zw;vec2 bilinearPos=mix(mix(topLeft,topRight,fractionalPos.x),mix(bottomLeft,bottomRight,fractionalPos.x),fractionalPos.y);float denominator=dot(u_image_warp.xy,fractionalPos)+1.0;vec2 acrossTop=topRight-topLeft+u_image_warp.x*topRight;vec2 downLeft=bottomLeft-topLeft+u_image_warp.y*bottomLeft;vec2 projectivePos=(acrossTop*fractionalPos.x+downLeft*fractionalPos.y+topLeft)/denominator;vec2 position=mix(projectivePos,bilinearPos,u_image_warp.z);gl_Position=projectTile(position,position);vec2 texturePos=((fractionalPos-0.5)/u_buffer_scale)+0.5; #ifdef GLOBE if (a_pos.y <-32767.5) {texturePos.y=0.0;}if (a_pos.y > 32766.5) {texturePos.y=1.0;} #endif float perspectiveRatio=mix(1.0/denominator,1.0,u_image_warp.z);v_pos0=vec3(texturePos*perspectiveRatio,perspectiveRatio);vec2 parentPos=(texturePos*u_scale_parent)+u_tl_parent;v_pos1=vec3(parentPos*perspectiveRatio,perspectiveRatio);}`),symbolIcon:go(`uniform sampler2D u_texture;in vec2 v_tex;flat in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform bool u_rotate_symbol;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_tex;flat out float v_total_opacity; #pragma maplibre: define lowp float opacity void main() { #pragma maplibre: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:go(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_data0;out vec3 v_data1; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float opacity #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:go(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;in vec4 v_data0;in vec3 v_data1;flat in float v_is_sdf; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur float total_opacity=v_data1[2];if (v_is_sdf==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec3 a_projected_pos;layout(location=3) in uint a_fade_opacity;layout(location=4) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec4 v_data0;out vec3 v_data1;flat out float v_is_sdf; #pragma maplibre: define highp vec4 fill_color #pragma maplibre: define highp vec4 halo_color #pragma maplibre: define lowp float opacity #pragma maplibre: define lowp float halo_width #pragma maplibre: define lowp float halo_blur void main() { #pragma maplibre: initialize highp vec4 fill_color #pragma maplibre: initialize highp vec4 halo_color #pragma maplibre: initialize lowp float opacity #pragma maplibre: initialize lowp float halo_width #pragma maplibre: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);float is_sdf=float(a_data.z & 1u);float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec3(gamma_scale,size,total_opacity);v_is_sdf=is_sdf;}`),terrain:go("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","layout(location=0) in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:go("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","layout(location=0) in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),atmosphere:go(`#ifdef GL_ES precision highp float; #endif in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 );color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:go("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;in vec3 v_view_direction;const float ATMOSPHERE_HEIGHT_TO_GLOBE_RADIUS=100000.0/6371000.0;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;float opacity=1.0;if (u_sky_blend > 0.0) {vec3 ray=normalize(v_view_direction);float globe_distance=length(u_globe_position);float angle_to_globe_center=acos(clamp(dot(ray,u_globe_position)/globe_distance,-1.0,1.0));float horizon_angle=asin(min(u_globe_radius/globe_distance,1.0));blend=mix(blend,((angle_to_globe_center-horizon_angle)*u_camera_to_center_distance+1.0)*u_device_pixel_ratio,u_sky_blend);float closest_approach=max(dot(ray,u_globe_position),0.0);float lowest_altitude=sqrt(max(globe_distance*globe_distance-closest_approach*closest_approach,0.0))-u_globe_radius;float atmosphere_height=u_globe_radius*ATMOSPHERE_HEIGHT_TO_GLOBE_RADIUS;float inside_atmosphere=1.0-smoothstep(atmosphere_height,10.0*atmosphere_height,globe_distance-u_globe_radius);float through_atmosphere=1.0-smoothstep(0.0,atmosphere_height,lowest_altitude);opacity=inside_atmosphere*through_atmosphere*(1.0-u_atmosphere_blend);}if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor*=mix(1.0,opacity,u_sky_blend);}","layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 v_view_direction;void main() {v_view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,1.0,1.0);}")};Pst="#define PROJECTION_MERCATOR",Ist="mercator",coe=class{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Ist}get shaderDefine(){return Pst}get shaderPreludeCode(){return dg.projectionMercator}get vertexShaderPreludeCode(){return dg.projectionMercator.vertexSource}get subdivisionGranularity(){return Aq.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}destroy(){}getMeshFromTileID(e,t,r,i,n){if(this._cachedMesh)return this._cachedMesh;let a=new Hm;a.emplaceBack(0,0),a.emplaceBack(qr,0),a.emplaceBack(0,qr),a.emplaceBack(qr,qr);let o=e.createVertexBuffer(a,T3.members),s=Js.simpleSegment(0,0,4,2),l=new zv;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3);let u=e.createIndexBuffer(l);return this._cachedMesh=new e8(o,u,s),this._cachedMesh}recalculate(){}hasTransition(){return!1}},foe=class Rst{constructor(t=0,r=0,i=0,n=0){if(isNaN(t)||t<0||isNaN(r)||r<0||isNaN(i)||i<0||isNaN(n)||n<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=r,this.left=i,this.right=n}interpolate(t,r,i){return r.top!=null&&t.top!=null&&(this.top=Ks.number(t.top,r.top,i)),r.bottom!=null&&t.bottom!=null&&(this.bottom=Ks.number(t.bottom,r.bottom,i)),r.left!=null&&t.left!=null&&(this.left=Ks.number(t.left,r.left,i)),r.right!=null&&t.right!=null&&(this.right=Ks.number(t.right,r.right,i)),this}getCenter(t,r){let i=ea((this.left+t-this.right)/2,0,t),n=ea((this.top+r-this.bottom)/2,0,r);return new rr(i,n)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new Rst(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}};Loe=class{constructor(e,t){var r;this.applyConstrain=(i,n)=>this._constrainOverride===null?this._callbacks.defaultConstrain(i,n):this._constrainOverride(i,n),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=(t==null?void 0:t.renderWorldCopies)===void 0||!!(t!=null&&t.renderWorldCopies),this._minZoom=(t==null?void 0:t.minZoom)||0,this._maxZoom=(t==null?void 0:t.maxZoom)||22,this._minPitch=(t==null?void 0:t.minPitch)===void 0||(t==null?void 0:t.minPitch)===null?0:t==null?void 0:t.minPitch,this._maxPitch=(t==null?void 0:t.maxPitch)===void 0||(t==null?void 0:t.maxPitch)===null?60:t==null?void 0:t.maxPitch,this._constrainOverride=(r=t==null?void 0:t.constrainOverride)!=null?r:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new yn(0,0),this._elevation=0,this._zoom=0,this._tileZoom=mot(this._zoom),this._scale=Vf(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new foe,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,t){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=mot(this._zoom),this._scale=Vf(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new foe(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=e.autoCalculateNearFarZ,t&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}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(e){if(this._minZoom===e)return;this._minZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get maxZoom(){return this._maxZoom}setMaxZoom(e){if(this._maxZoom===e)return;this._maxZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get minPitch(){return this._minPitch}setMinPitch(e){if(this._minPitch===e)return;this._minPitch=e;let t=this._unmodified;this.setPitch(Math.max(this.pitch,e)),this._unmodified=t}get maxPitch(){return this._maxPitch}setMaxPitch(e){if(this._maxPitch===e)return;this._maxPitch=e;let t=this._unmodified;this.setPitch(Math.min(this.pitch,e)),this._unmodified=t}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){e===void 0&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,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 rr(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let t=W0(e,-180,180)*Math.PI/180;this._bearingInRadians!==t&&(this._unmodified=!1,this._bearingInRadians=t,this._calcMatrices(),this._rotationMatrix=Qot(),VTr(this._rotationMatrix,this._rotationMatrix,-this._bearingInRadians))}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let t=ea(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==t&&(this._unmodified=!1,this._pitchInRadians=t,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return Cv(this._fovInRadians)}setFov(e){e=ea(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=Os(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let t=this.applyConstrain(this._center,e).zoom;this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this._tileZoom=Math.max(0,Math.floor(t)),this._scale=Vf(t),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(e){(e.lat!==this._center.lat||e.lng!==this._center.lng)&&(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,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(e,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this.constrainInternal(),this._calcMatrices()}resize(e,t,r=!0){this._width=e,this._height=t,r&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,t;return((e=this._latRange)==null?void 0:e.length)!==2||((t=this._lngRange)==null?void 0:t.length)!==2?null:new Ov([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-Iv,Iv])}getCameraQueryGeometry(e,t){if(t.length===1)return[t[0],e];{let{minX:r,minY:i,maxX:n,maxY:a}=lp.fromPoints(t).extend(e);return[new rr(r,i),new rr(n,i),new rr(n,a),new rr(r,a),new rr(r,i)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(r),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._pixelPerMeter=gx(1,this.center.lat)*this.worldSize,!this._width||!this._height)return;this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=up(new Float64Array(16));Nc(e,e,[this._width/2,-this._height/2,1]),lu(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=up(new Float64Array(16)),Nc(e,e,[1,-1,1]),lu(e,e,[-1,-1,0]),Nc(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e;let t=this.fovInRadians/2;this._cameraToCenterDistance=.5/Math.tan(t)*this._height,this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,t,r,i){let n=r===void 0?this.bearing:r,a=i=i===void 0?this.pitch:i,{distanceToCenter:o,clampedElevation:s}=this._distanceToCenterFromAltElevationPitch(t,this.elevation,a),{x:l,y:u}=Eq(a,n),c=Mo.fromLngLat(e,t),f=nae(1,c.y),h,p,d=0;do{if(d+=1,d>10)break;p=o/f;let v=l*p,m=u*p;h=new Mo(c.x+v,c.y+m),f=1/h.meterInMercatorCoordinateUnits()}while(Math.abs(o-p*f)>1e-12);return{center:h.toLngLat(),elevation:s,zoom:Vc(this.height/2/Math.tan(this.fovInRadians/2)/p/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e===0)return;let t=1/this.worldSize,r=gx(1,this.center.lat)*this.worldSize,i=Mo.fromLngLat(this.center,this.elevation),n=i.x/t,a=i.y/t,o=i.z/t,s=this.pitch,l=this.bearing,{x:u,y:c,z:f}=Eq(s,l),h=this.cameraToCenterDistance,p=n+h*-u,d=a+h*-c,v=o+h*f,{distanceToCenter:m,clampedElevation:g}=this._distanceToCenterFromAltElevationPitch(v/r,e,s),w=m*r,_=p+u*w,b=d+c*w,M=new Mo(_*t,b*t,0).toLngLat(),x=gx(1,M.lat),A=Vc(this.height/2/Math.tan(this.fovInRadians/2)/m/x/this.tileSize);this._elevation=g,this._center=M,this.setZoom(A)}_distanceToCenterFromAltElevationPitch(e,t,r){let i=-Math.cos(Os(r)),n=e-t,a,o=t;return i*n>=0||Math.abs(i)=0?1<i}allowWorldCopies(){return!0}prepareNextFrame(){}},rMr=cl([{name:"a_pos3d",type:"Int16",components:3}]),iMr=class extends cu{constructor(e){super(),this._lastTilesetChange=zo(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null,this.releaseAllRTT()}getSource(){return this.tileManager._source}update(e,t){this.tileManager.update(e,t),this._renderableTilesKeys=[];let r={},i=!1;for(let n of u6(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:t}))r[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float32Array(16),Pv(n.terrainRttPosMatrix32f,0,qr,qr,0,0,1),this._tiles[n.key]=new Tst(n,this.tileSize),this._lastTilesetChange=zo(),i=!0);for(let n in this._tiles)r[n]||(this._tiles[n].releaseRTT(this.tileManager.map.painter),delete this._tiles[n],i=!0);return i}releaseRTT(e){for(let t in this._tiles){let r=this._tiles[t];(r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&r.releaseRTT(this.tileManager.map.painter)}}releaseAllRTT(){for(let e in this._tiles)this._tiles[e].releaseRTT(this.tileManager.map.painter)}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let t={};for(let r of this._renderableTilesKeys){let i=this._tiles[r].tileID,n=e.clone(),a=dx();if(i.canonical.equals(e.canonical))Pv(a,0,qr,qr,0,0,1);else if(i.canonical.isChildOf(e.canonical)){let o=i.canonical.z-e.canonical.z,s=i.canonical.x-(i.canonical.x>>o<>o<>o;Pv(a,0,u,u,0,0,1),lu(a,a,[-s*u,-l*u,0])}else if(e.canonical.isChildOf(i.canonical)){let o=e.canonical.z-i.canonical.z,s=e.canonical.x-(e.canonical.x>>o<>o<>o;Pv(a,0,qr,qr,0,0,1),lu(a,a,[s*u,l*u,0]),Nc(a,a,[1/2**o,1/2**o,0])}else continue;n.terrainRttPosMatrix32f=new Float32Array(a),t[r]=n}return t}_getTerrainCoordsForTileRanges(e,t){let r={};for(let i of this._renderableTilesKeys){let n=this._tiles[i].tileID;if(!this._isWithinTileRanges(n,t))continue;let a=e.clone(),o=dx();if(n.canonical.z===e.canonical.z){let s=e.canonical.x-n.canonical.x+e.wrap*(1<e.canonical.z){let s=n.canonical.z-e.canonical.z,l=n.canonical.x-(n.canonical.x>>s<>s<>s),f=e.canonical.y-(n.canonical.y>>s),h=qr>>s;Pv(o,0,h,h,0,0,1),lu(o,o,[-l*h+c*qr,-u*h+f*qr,0])}else{let s=e.canonical.z-n.canonical.z,l=e.canonical.x-(e.canonical.x>>s<>s<>s)-n.canonical.x,f=(e.canonical.y>>s)-n.canonical.y,h=qr<r.maxzoom&&(i=r.maxzoom),i=r.minzoom&&!(n!=null&&n.dem);)n=this.findTileInCaches(e.scaledTo(i--).key);return n}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e),t)}anyTilesAfterTime(e=zo()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){let r=t[e.canonical.z];return!!r&&(e.wrap>r.minWrap||e.wrap=r.minTileXWrapped&&e.canonical.x<=r.maxTileXWrapped&&e.canonical.y>=r.minTileY&&e.canonical.y<=r.maxTileY)}},yot=qr*(1-1e-12),xot=-.5,nMr=class{constructor(e,t,r,i="auto"){this._meshCache={},this.painter=e,this.tileManager=new iMr(t),this.options=r,this.exaggeration=typeof r.exaggeration=="number"?r.exaggeration:1,this._terrainSkirtLength=i,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache=new Map,this._elevationSamplerCache=new Map}destroy(){this._fbo&&(this._fbo=(this._fbo.destroy(),null)),this._fboDepthTexture&&(this._fboDepthTexture=(this._fboDepthTexture.destroy(),null)),this._emptyDemTexture&&(this._emptyDemTexture=(this._emptyDemTexture.destroy(),null)),this._emptyDepthTexture&&(this._emptyDepthTexture=(this._emptyDepthTexture.destroy(),null));for(let e in this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,t,r,i=qr){let n=e.normalizeCoordinates(t,r,i);if(!n)return 0;let a=this.getElevationSampler(n.tileID);return a?a(n.x,n.y,i):0}getElevationForLngLatZoom(e,t){if(!pae(t,e.wrap()))return 0;let{tileID:r,mercatorX:i,mercatorY:n}=this._getOverscaledTileIDFromLngLatZoom(e,t);return this.getElevation(r,i%qr,n%qr,qr)}getElevationForLngLat(e,t){let r=this.getCoverageIndex();if(r){let a=Mo.fromLngLat(e),o=Poe(r,this.exaggeration,a.x,a.y);if(o.demLoaded)return o.elevation}let i=u6(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),n=0;for(let a of i)a.canonical.z>n&&(n=Math.min(a.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,n)}getElevation(e,t,r,i=qr){return this.getDEMElevation(e,t,r,i)*this.exaggeration}resetElevationCache(){this._elevationSamplerCache.clear(),this._coverageIndex=void 0}getCoverageIndex(){return this._coverageIndex===void 0&&(this._coverageIndex=this._buildCoverageIndex()),this._coverageIndex}_buildCoverageIndex(){let e=[],t=new Map,r=0,i=0;for(let n of this.tileManager.getRenderableTiles()){if(!n)continue;let{canonical:a,wrap:o}=n.tileID;e.includes(a.z)||e.push(a.z);let s=this.getElevationSampler(n.tileID);t.set(`${o}/${a.z}/${a.x}/${a.y}`,s);let{minElevation:l,maxElevation:u}=this.getMinMaxElevation(n.tileID);r=Math.min(r,l!=null?l:0),i=Math.max(i,u!=null?u:0)}return t.size===0?null:(e.sort((n,a)=>a-n),{zooms:e,samplerPerTile:t,minElevation:r-10,maxElevation:i+10})}getElevationSampler(e){let t=e.key,r=this._elevationSamplerCache.get(t);if(r)return r;let i=this.tileManager.getSourceTile(e,!0),n=i==null?void 0:i.dem;if(!i||!n)return null;let a=this._getDEMTileMatrix(e,i),o=a[0]*n.dim,s=a[5]*n.dim,l=a[12]*n.dim+xot,u=a[13]*n.dim+xot,c=(f,h,p)=>{let d=p===8192?1:qr/p;return n.sampleBilinear(f*d*o+l,h*d*s+u)};return this._elevationSamplerCache.set(t,c),c}_getDEMTileMatrix(e,t){let r=`${t.tileID.key}/${e.key}`,i=this._demMatrixCache.get(r);if(i)return i;let n=e.canonical.z-t.tileID.canonical.z,a=e.canonical.x-(e.canonical.x>>n<>n<0,r=t&&e.canonical.y===0,i=t&&e.canonical.y===(1<{n=ea(+n,this.minZoom,this.maxZoom);let a={center:new yn(i.lng,i.lat),zoom:n},o=this._helper._lngRange;!this._helper._renderWorldCopies&&o===null&&(o=[-179.9999999999,180-1e-10]);let s=this.tileSize*Vf(a.zoom),l=0,u=s,c=0,f=s,h=0,p=0,{x:d,y:v}=this.size;if(this._helper._latRange){let M=this._helper._latRange;l=m3(M[1])*s,u=m3(M[0])*s,u-lu&&(_=u-M)}if(o){let M=(c+f)/2,x=m;this._helper._renderWorldCopies&&(x=W0(m,M-s/2,M+s/2));let A=d/2;x-Af&&(w=f-A)}if(w!==void 0||_!==void 0){let M=new rr(w!=null?w:m,_!=null?_:g);a.center=QT(s,M).wrap()}return a},this.applyConstrain=(i,n)=>this._helper.applyConstrain(i,n),this._helper=r!=null?r:new Loe({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(i,n)=>this.defaultConstrain(i,n)},t),this._coveringTilesDetailsProvider=new tMr}clone(){let t=new qst;return t.apply(this,!1),t}apply(t,r){this._helper.apply(t,r)}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(t){let r=[new zC(0,t)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new rr(0,0)),n=this.screenPointToMercatorCoordinate(new rr(this._helper._width,0)),a=this.screenPointToMercatorCoordinate(new rr(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new rr(0,this._helper._height)),s=Math.floor(Math.min(i.x,n.x,a.x,o.x)),l=Math.floor(Math.max(i.x,n.x,a.x,o.x));for(let u=s-1;u<=l+1;u++)u!==0&&r.push(new zC(u,t))}return r}getCameraFrustum(){return Soe.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){let r=this.screenPointToLocation(this.centerPoint,t),i=t?t.getElevationForLngLat(r,this):0;this._helper.recalculateZoomAndCenter(i)}setLocationAtPoint(t,r,i=this.elevation){let n=i-this.elevation,a=this.screenPointToMercatorCoordinateAtZ(r,n),o=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,0),s=Mo.fromLngLat(t),l=new Mo(s.x-(a.x-o.x),s.y-(a.y-o.y));this.setCenter(l==null?void 0:l.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(t,r){return r?this.coordinatePoint(Mo.fromLngLat(t),r.getElevationForLngLat(t,this),this._pixelMatrix3D):this.coordinatePoint(Mo.fromLngLat(t))}screenPointToLocation(t,r){var i;return(i=this.screenPointToMercatorCoordinate(t,r))==null?void 0:i.toLngLat()}screenPointToLocationAtElevation(t,r){var i;return(i=this.screenPointToMercatorCoordinateAtZ(t,r-this.elevation))==null?void 0:i.toLngLat()}screenPointToMercatorCoordinate(t,r){if(r){let i=this.screenTerrainPointToMercatorCoordinate(t,r);if(i!=null)return i}return this.screenPointToMercatorCoordinateAtZ(t)}screenTerrainPointToMercatorCoordinate(t,r){let i=r.getCoverageIndex();if(!i)return null;let{near:n,far:a}=this.getRaySegmentFromPixel(t),o=this.worldSize,s=a[0]-n[0],l=a[1]-n[1],u=a[2]-n[2],c={index:i,exaggeration:r.exaggeration,near:n,dx:s,dy:l,dz:u,worldSize:o},f=0,h=1;if(u===0){if(n[2]>i.maxElevation||n[2]h)return null}let p=Math.hypot(s,l),d=ea(Math.ceil(p*(h-f)/4),1,512),v=0,m=!Uq(c,0);for(let g=0;g<=d;g++){let w=f+(h-f)*g/d;if(!m)m=!Uq(c,w);else if(Uq(c,w)){let{lo:_,hi:b}=Bst(c,Uq,v,w,.001/p),M=eO(c,_),x=eO(c,b),A=n[2]+_*u-M.elevation,T=n[2]+b*u-x.elevation,y=M.covered&&A>T?ea(_+A*(b-_)/(A-T),_,b):b;return new Mo((n[0]+y*s)/o,(n[1]+y*l)/o,eO(c,y).elevation)}v=w}return null}getRaySegmentFromPixel(t){let r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];Uc(r,r,this._pixelMatrixInverse),Uc(i,i,this._pixelMatrixInverse);let n=r[3],a=i[3],o=this.elevation;return{near:[r[0]/n,r[1]/n,r[2]/n+o],far:[i[0]/a,i[1]/a,i[2]/a+o]}}screenPointToMercatorCoordinateAtZ(t,r){let i=r||0,{near:n,far:a}=this.getRaySegmentFromPixel(t),o=n[2]===a[2]?0:(i+this.elevation-n[2])/(a[2]-n[2]);return new Mo(Ks.number(n[0],a[0],o)/this.worldSize,Ks.number(n[1],a[1],o)/this.worldSize,i)}coordinatePoint(t,r=0,i=this._pixelMatrix){let n=this._coordinateClipPoint(t,r,i),a=n[3];return a>0?new rr(n[0]/a,n[1]/a):this._offScreenPointBehindCamera(n[0],n[1],a)}_coordinateClipPoint(t,r,i){let n=[t.x*this.worldSize,t.y*this.worldSize,r,1];return Uc(n,n,i)}_offScreenPointBehindCamera(t,r,i){let n=this.width/2,a=this.height/2,o=t-n*i,s=r-a*i;o===0&&s===0&&(s=1);let l=n+this.width,u=a+this.height,c=Math.min(o===0?1/0:l/Math.abs(o),s===0?1/0:u/Math.abs(s));return new rr(n+o*c,a+s*c)}getBounds(){let t=Math.max(0,this._helper._height/2-e6(this));return new Ov().extend(this.screenPointToLocation(new rr(0,t))).extend(this.screenPointToLocation(new rr(this._helper._width,t))).extend(this.screenPointToLocation(new rr(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new rr(0,this._helper._height)))}isPointOnMapSurface(t,r){return r?this.screenTerrainPointToMercatorCoordinate(t,r)!=null:t.y>this.centerPoint.y-e6(this)}calculatePosMatrix(t,r=!1,i=!1){var l;let n=(l=t.key)!=null?l:n3(t.wrap,t.canonical.z,t.canonical.z,t.canonical.x,t.canonical.y),a=r?this._alignedPosMatrixCache:this._posMatrixCache;if(a.has(n)){let u=a.get(n);return i?u.f32:u.f64}let o=Sq(t,this.worldSize);c3(o,r?this._alignedProjMatrix:this._viewProjMatrix,o);let s={f64:o,f32:new Float32Array(o)};return a.set(n,s),i?s.f32:s.f64}calculateFogMatrix(t){let r=t.key,i=this._fogMatrixCacheF32;if(i.has(r))return i.get(r);let n=Sq(t,this.worldSize);return c3(n,this._fogMatrix,n),i.set(r,new Float32Array(n)),i.get(r)}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){let a=Mo.fromLngLat(t,r),o=Mo.fromLngLat(i,n),s=o.x-a.x,l=o.y-a.y,u=o.z-a.z,c=Math.hypot(s,l,u);if(c===0)throw Error("Can't calculate camera options with same From and To");let f=Math.hypot(s,l),h=Vc(this.cameraToCenterDistance/c/this.tileSize),p=Cv(Math.atan2(s,-l)),d=Cv(Math.acos(f/c));return d=u<0?90-d:90+d,{center:o.toLngLat(),elevation:n,zoom:h,pitch:d,bearing:p}}_calculateNearFarZ(t,r,i){let n=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),a=t-n*this._helper._pixelPerMeter/Math.cos(r),o=n<0?a:t,s=Math.PI/2+this.pitchInRadians,l=Os(this.fov)*(Math.abs(Math.cos(Os(this.roll)))*this.height+Math.abs(Math.sin(Os(this.roll)))*this.width)/this.height*(.5+i.y/this.height),u=Math.sin(l)*o/Math.sin(ea(Math.PI-s-l,.01,Math.PI-.01)),c=e6(this),f=Math.atan(c/this._helper.cameraToCenterDistance),h=Os(90-mx),p=f>h?2*f*(.5+i.y/(c*2)):h,d=Math.sin(p)*o/Math.sin(ea(Math.PI-s-p,.01,Math.PI-.01)),v=Math.min(u,d);this._helper._farZ=(Math.cos(Math.PI/2-r)*v+o)*1.01,this._helper._nearZ=this._helper._height/50}_calcMatrices(t=this._helper.autoCalculateNearFarZ){let r=this.centerOffset,i=Bv(this.worldSize,this.center),n=i.x,a=i.y,o=Os(Math.min(this.pitch,mx)),s=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(o));t&&this._calculateNearFarZ(s,o,r);let l;l=new Float64Array(16),GB(l,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),TAr(this._invProjMatrix,l),l[8]=-r.x*2/this._helper._width,l[9]=r.y*2/this._helper._height,this._projectionMatrix=VB(l),Nc(l,l,[1,-1,1]),lu(l,l,[0,0,-this._helper.cameraToCenterDistance]),Nm(l,l,-this.rollInRadians),f3(l,l,this.pitchInRadians),Nm(l,l,-this.bearingInRadians),lu(l,l,[-n,-a,0]),this._mercatorMatrix=Nc([],l,[this.worldSize,this.worldSize,this.worldSize]),Nc(l,l,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=c3(new Float64Array(16),this.clipSpaceToPixelsMatrix,l),lu(l,l,[0,0,-this.elevation]),this._viewProjMatrix=l,this._invViewProjMatrix=cC([],l);let u=[0,0,-1,1];Uc(u,u,this._invViewProjMatrix),this._cameraPosition=[u[0]/u[3],u[1]/u[3],u[2]/u[3]],this._fogMatrix=new Float64Array(16),GB(this._fogMatrix,this.fovInRadians,this.width/this.height,s,this._helper._farZ),this._fogMatrix[8]=-r.x*2/this.width,this._fogMatrix[9]=r.y*2/this.height,Nc(this._fogMatrix,this._fogMatrix,[1,-1,1]),lu(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),Nm(this._fogMatrix,this._fogMatrix,-this.rollInRadians),f3(this._fogMatrix,this._fogMatrix,this.pitchInRadians),Nm(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),lu(this._fogMatrix,this._fogMatrix,[-n,-a,0]),Nc(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),lu(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=c3(new Float64Array(16),this.clipSpaceToPixelsMatrix,l);let c=this._helper._width%2/2,f=this._helper._height%2/2,h=Math.cos(this.bearingInRadians),p=Math.sin(-this.bearingInRadians),d=n-Math.round(n)+h*c+p*f,v=a-Math.round(a)+h*f+p*c,m=new Float64Array(l);if(lu(m,m,[d>.5?d-1:d,v>.5?v-1:v,0]),this._alignedProjMatrix=m,l=cC(new Float64Array(16),this._pixelMatrix),!l)throw Error("failed to invert matrix");this._pixelMatrixInverse=l,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let t=this.screenPointToMercatorCoordinate(new rr(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return Uc(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this.cameraToCenterDistance/this.pixelsPerMeter+this.elevation}getCameraLngLat(){let t=gx(1,this.center.lat)*this.worldSize,r=this._helper.cameraToCenterDistance/t;return oae(this.center,this.elevation,this.pitch,this.bearing,r).toLngLat()}getProjectionData(t){let{overscaledTileID:r,aligned:i,applyTerrainMatrix:n}=t,a=this._helper.getMercatorTileCoordinates(r),o=r?this.calculatePosMatrix(r,i,!0):null,s;return s=r!=null&&r.terrainRttPosMatrix32f&&n?r.terrainRttPosMatrix32f:o||mne(),{mainMatrix:s,tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s,clipAntimeridian:!1}}isLocationOccluded(t,r,i){if(!(r!=null&&r.getCoverageIndex()))return!1;let n=Mo.fromLngLat(t);i!=null||(i=r.getElevationForLngLat(t,this));let a=this._coordinateClipPoint(n,i,this._pixelMatrix3D),o=a[3];if(o<=0||a[2]>o)return!0;let s=new rr(a[0]/o,a[1]/o),l=this.screenTerrainPointToMercatorCoordinate(s,r);if(l==null)return!1;let u=this.getRaySegmentFromPixel(s),c=_ot(u,n.x*this.worldSize,n.y*this.worldSize,i);return _ot(u,l.x*this.worldSize,l.y*this.worldSize,l.z){if(l&&e.setZoom(Ks.number(r,p,_)),bne(n,a)||Nst({startEulerAngles:n,endEulerAngles:a,tr:e,k:_,useSlerp:n.roll!=a.roll}),s&&(e.interpolatePadding(i,t.padding,_),c=e.centerPoint.add(t.offsetAsPoint)),t.around)e.setLocationAtPoint(t.around,t.aroundPoint);else{let b=Vf(e.zoom-r),M=(p>r?Math.min(2,m):Math.max(.5,m))**(1-_),x=QT(e.worldSize,d.add(v.mult(_*M)).mult(b));e.setLocationAtPoint(e.renderWorldCopies?x.wrap():x,c)}},w=this._transformAtAnimationEnd(e,p,a,t.padding);return t.around?w.setLocationAtPoint(t.around,t.aroundPoint):w.setLocationAtPoint(h,w.centerPoint.add(t.offsetAsPoint)),{easeFunc:g,isZooming:l,elevationCenter:w.center}}handleFlyTo(e,t){let r=t.zoom!==void 0,i=e.zoom,n=e.applyConstrain(yn.convert(t.center||t.locationAtOffset),r?+t.zoom:i),a=n.center,o=n.zoom;nO(e,a);let s=e.worldSize,l=Bv(s,t.locationAtOffset),u=Bv(s,a).sub(l),c=u.mag(),f=Vf(o-i),h=t.minZoom===void 0?e.minZoom:+t.minZoom,p=Math.max(h,e.minZoom),d=Math.min(p,i,o),v=e.applyConstrain(a,d).zoom,m=Vf(v-i),g=(_,b,M,x)=>{e.setZoom(_===1?o:i+Vc(b));let A=_===1?a:QT(s,l.add(u.mult(M)));e.setLocationAtPoint(e.renderWorldCopies?A.wrap():A,x)},w=this._transformAtAnimationEnd(e,o,{roll:t.roll,pitch:t.pitch,bearing:t.bearing},t.padding);return w.setLocationAtPoint(a,w.centerPoint.add(t.offsetAsPoint)),{easeFunc:g,scaleOfZoom:f,targetCenter:w.center,scaleOfMinZoom:m,pixelPathLength:c}}_transformAtAnimationEnd(e,t,r,i){let n=e.clone();return n.setZoom(t),n.setRoll(r.roll),n.setPitch(r.pitch),n.setBearing(r.bearing),n.setPadding(i),n}},aMr=()=>wot||(wot=new dc({type:new Pi(_r.projection.type,"type")})),qae=new Aq({fill:new ng(128,2),line:new ng(512,0),tile:new ng(128,32),stencil:new ng(128,1),circle:3}),Vst=class{constructor(){this._tileMeshCache={}}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return dg.projectionGlobe}get vertexShaderPreludeCode(){return dg.projectionMercator.vertexSource}get subdivisionGranularity(){return qae}get useGlobeControls(){return!0}destroy(){}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,t,r,i,n){let a=(n==="stencil"?qae.stencil:qae.tile).getGranularityForZoomLevel(t.z),o=t.y===0&&i,s=t.y===(1<0}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()}getMeshFromTileID(e,t,r,i,n){return this.currentProjection.getMeshFromTileID(e,t,r,i,n)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}};Oae=Math.PI*.98;mMr=class{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,t,r,i){let n=`${e.z}_${e.x}_${e.y}_${i!=null&&i.terrain?"t":""}_${Math.round(r)}`,a=this._cache.get(n);if(a)return a;let o=this._cachePrevious.get(n);if(o)return this._cache.set(n,o),o;let s=this._boundingVolumeFactory(e,t,r,i);return this._cache.set(n,s),this._hadAnyChanges=!0,s}},Uae=class hoe{constructor(t,r,i,n){this.min=i,this.max=n,this.points=t,this.planes=r}static fromAabb(t,r){let i=[];for(let n=0;n<8;n++)i.push([(n>>0&1)==1?r[0]:t[0],(n>>1&1)==1?r[1]:t[1],(n>>2&1)==1?r[2]:t[2]]);return new hoe(i,[[-1,0,0,r[0]],[1,0,0,-t[0]],[0,-1,0,r[1]],[0,1,0,-t[1]],[0,0,-1,r[2]],[0,0,1,-t[2]]],t,r)}static fromCenterSizeAngles(t,r,i){let n=YB([],i[0],i[1],i[2]),a=$B([],[r[0],0,0],n),o=$B([],[0,r[1],0],n),s=$B([],[0,0,r[2]],n),l=[...t],u=[...t];for(let f=0;f<8;f++)for(let h=0;h<3;h++){let p=t[h]+a[h]*((f>>0&1)==1?1:-1)+o[h]*((f>>1&1)==1?1:-1)+s[h]*((f>>2&1)==1?1:-1);l[h]=Math.min(l[h],p),u[h]=Math.max(u[h],p)}let c=[];for(let f=0;f<8;f++){let h=[...t];j0(h,h,qs([],a,(f>>0&1)==1?1:-1)),j0(h,h,qs([],o,(f>>1&1)==1?1:-1)),j0(h,h,qs([],s,(f>>2&1)==1?1:-1)),c.push(h)}return new hoe(c,[[...a,-uu(a,c[0])],[...o,-uu(o,c[0])],[...s,-uu(s,c[0])],[-a[0],-a[1],-a[2],-uu(a,c[7])],[-o[0],-o[1],-o[2],-uu(o,c[7])],[-s[0],-s[1],-s[2],-uu(s,c[7])]],l,u)}intersectsFrustum(t){let r=!0,i=this.points.length,n=this.planes.length,a=t.planes.length,o=t.points.length;for(let s=0;s=0&&u++}if(u===0)return 0;u=0&&u++}if(u===0)return 0}return 1}intersectsPlane(t){let r=this.points.length,i=0;for(let n=0;n=0&&i++}return i===r?2:i===0?0:1}};yMr=class{constructor(){this._boundingVolumeCache=new mMr(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,r,i){let n=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,r,i){return this._boundingVolumeCache.getTileBoundingVolume(e,t,r,i)}_computeTileBoundingVolume(e,t,r,i){var o,s;let n=Math.min(0,r),a=Math.max(0,r);if(i!=null&&i.terrain){let l=new Gc(e.z,t,e.z,e.x,e.y),u=i.terrain.getMinMaxElevation(l);n=(o=u.minElevation)!=null?o:n,a=Math.max((s=u.maxElevation)!=null?s:a,a)}if(n/=Hf,a/=Hf,n+=1,a+=1,e.z<=0)return Uae.fromAabb([-a,-a,-a],[a,a,a]);if(e.z===1)return Uae.fromAabb([e.x===0?-a:0,e.y===0?0:-a,-a],[e.x===0?0:a,e.y===0?a:0,a]);{let l=[yx(0,0,e.x,e.y,e.z),yx(qr,0,e.x,e.y,e.z),yx(qr,qr,e.x,e.y,e.z),yx(0,qr,e.x,e.y,e.z)],u=[];for(let E of l)u.push(qs([],E,a));if(a!==n)for(let E of l)u.push(qs([],E,n));e.y===0&&u.push([0,1,0]),e.y===(1<=(1<{let a=ea(i.lat,-Iv,Iv),o=ea(+n,this.minZoom+Hc(0,a),this.maxZoom);return{center:new yn(i.lng,a),zoom:o}},this.applyConstrain=(i,n)=>this._helper.applyConstrain(i,n),this._helper=r!=null?r:new Loe({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(i,n)=>this.defaultConstrain(i,n)},t),this._coveringTilesDetailsProvider=new yMr}clone(){let t=new Wst;return t.apply(this,!1),t}apply(t,r){this._helper.apply(t,r)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixF64}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let t=So();return t[0]=this._cameraPosition[0],t[1]=this._cameraPosition[1],t[2]=this._cameraPosition[2],t}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(t){let{overscaledTileID:r,applyGlobeMatrix:i}=t,n=this._helper.getMercatorTileCoordinates(r);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:n,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!i,fallbackMatrix:this._globeViewProjMatrix32f,clipAntimeridian:(r==null?void 0:r.canonical.z)===0}}_computeClippingPlane(t){let r=this.pitchInRadians,i=this.cameraToCenterDistance/t,n=Math.sin(r)*i,a=Math.cos(r)*i+1,o=1/Math.sqrt(n*n+a*a)*1,s=-n,l=a,u=Math.sqrt(s*s+l*l);s/=u,l/=u;let c=[0,s,l];WB(c,c,[0,0,0],-this.bearingInRadians),$T(c,c,[0,0,0],-1*this.center.lat*Math.PI/180),h3(c,c,[0,0,0],this.center.lng*Math.PI/180);let f=1/cp(c);return qs(c,c,f),[...c,-o*f]}isLocationOccluded(t,r,i){let n=r==null?void 0:r.getCoverageIndex();i!=null||(i=n?r.getElevationForLngLat(t,this):0);let a=Cot(t,i);if(!this.isSurfacePointVisible(a))return!0;if(!n)return!1;let o=this._projectSurfacePointToScreen(a),s=this.cameraPosition,l=this.getRayDirectionFromPixel(o),u=Dot(s,l,a);if(u<=0)return!0;let c=this.screenTerrainPointToMercatorCoordinate(o,r);return c!=null&&Dot(s,l,Cot(c.toLngLat(),c.z))a&&(a=h),ps&&(s=p)}let c=[u.lng+o,u.lat+l,u.lng+a,u.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(c[3]=90,c[0]=-180,c[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(c[1]=-90,c[0]=-180,c[2]=180),new Ov(c)}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){let a=yn.convert(i),o=pc(yn.convert(t));qs(o,o,1+r/Hf);let s=pc(a),l=qs(So(),s,1+n/Hf),u=jB(So(),o,s),c=cp(u);if(c=-w&&v<=w,b=g>=-w&&g<=w,M,x;if(_&&b){let E=this.center.lng*Math.PI/180,S=this.center.lat*Math.PI/180,C=vC(h,E),k=vC(v,S),D=vC(p,E),F=vC(g,S);C+k=0}isSurfacePointOnScreen(t){if(!this.isSurfacePointVisible(t))return!1;let r=hx();return Uc(r,[...t,1],this._globeViewProjMatrixF64),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}unprojectScreenPoint(t){let r=this._cameraPosition,i=this.getRayDirectionFromPixel(t),n=Vq(r,i);if(n){let c=So();j0(c,r,[i[0]*n.tMin,i[1]*n.tMin,i[2]*n.tMin]);let f=So();return Uf(f,c),JC(f)}let a=this._cachedClippingPlane,o=a[0]*i[0]+a[1]*i[1]+a[2]*i[2],s=-ZB(a,r)/o,l=So();if(s>0)j0(l,r,[i[0]*s,i[1]*s,i[2]*s]);else{let c=So();j0(c,r,[i[0]*2,i[1]*2,i[2]*2]);let f=ZB(this._cachedClippingPlane,c);cg(l,c,[this._cachedClippingPlane[0]*f,this._cachedClippingPlane[1]*f,this._cachedClippingPlane[2]*f])}let u=dMr(a);return JC(pMr(u.center,u.radius,l))}getProjectionDataForCustomLayer(t=!0){let r=this.getProjectionData({overscaledTileID:new Gc(0,0,0,0,0),applyGlobeMatrix:t});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(t){}};Fot=class Xst{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(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,r,i){this._helper.interpolatePadding(t,r,i)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,r,i=!0){this._helper.resize(t,r,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}setConstrainOverride(t){this._helper.setConstrainOverride(t)}overrideNearFarZ(t,r){this._helper.overrideNearFarZ(t,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}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(t){this._globeness=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(t){this._globeness=1,this.defaultConstrain=(r,i)=>this.currentTransform.defaultConstrain(r,i),this.applyConstrain=(r,i)=>this._helper.applyConstrain(r,i),this._helper=new Loe({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(r,i)=>this.defaultConstrain(r,i)},t),this._globeness=1,this._mercatorTransform=new aO(void 0,this._helper),this._verticalPerspectiveTransform=new $st(void 0,this._helper)}clone(){let t=new Xst;return t._globeness=this._globeness,t.apply(this,!1),t}apply(t,r){this._helper.apply(t,r)}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(t){let r=this._mercatorTransform.getProjectionData(t),i=this._verticalPerspectiveTransform.getProjectionData(t);return{mainMatrix:this.isGlobeRendering?i.mainMatrix:r.mainMatrix,clippingPlane:i.clippingPlane,tileMercatorCoords:i.tileMercatorCoords,projectionTransition:t.applyGlobeMatrix?this._globeness:0,fallbackMatrix:r.fallbackMatrix,clipAntimeridian:i.clipAntimeridian}}isLocationOccluded(t,r,i){return this.currentTransform.isLocationOccluded(t,r,i)}transformLightDirection(t){return this.currentTransform.transformLightDirection(t)}getPixelScale(){return d3(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return d3(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(t,r,i){let n=this._mercatorTransform.getPitchedTextCorrection(t,r,i),a=this._verticalPerspectiveTransform.getPitchedTextCorrection(t,r,i);return d3(n,a,this._globeness)}projectTileCoordinates(t,r,i,n){return this.currentTransform.projectTileCoordinates(t,r,i,n)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform._calcMatrices(),this._mercatorTransform._calcMatrices(this.autoCalculateNearFarZ&&!this.isGlobeRendering))}calculateFogMatrix(t){return this.currentTransform.calculateFogMatrix(t)}getVisibleUnwrappedCoordinates(t){return this.currentTransform.getVisibleUnwrappedCoordinates(t)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(t){this.currentTransform.recalculateZoomAndCenter(t)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this.currentTransform.getCameraAltitude()}getCameraLngLat(){return this.currentTransform.getCameraLngLat()}populateCache(t){this._mercatorTransform.populateCache(t),this._verticalPerspectiveTransform.populateCache(t)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){return this.currentTransform.calculateCameraOptionsFromTo(t,r,i,n)}setLocationAtPoint(t,r,i){this.currentTransform.setLocationAtPoint(t,r,i)}locationToScreenPoint(t,r){return this.currentTransform.locationToScreenPoint(t,r)}screenPointToMercatorCoordinate(t,r){return this.currentTransform.screenPointToMercatorCoordinate(t,r)}screenTerrainPointToMercatorCoordinate(t,r){return this.currentTransform.screenTerrainPointToMercatorCoordinate(t,r)}screenPointToLocation(t,r){return this.currentTransform.screenPointToLocation(t,r)}screenPointToLocationAtElevation(t,r){return this.currentTransform.screenPointToLocationAtElevation(t,r)}isPointOnMapSurface(t,r){return this.currentTransform.isPointOnMapSurface(t,r)}getRayDirectionFromPixel(t){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(t)}getProjectionDataForCustomLayer(t=!0){let r=this._mercatorTransform.getProjectionDataForCustomLayer(t);if(!this.isGlobeRendering)return r;let i=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(t);return i.fallbackMatrix=r.mainMatrix,i.projectionTransition=this._globeness,i}getFastPathSimpleProjectionMatrix(t){return this.currentTransform.getFastPathSimpleProjectionMatrix(t)}},Zst=class Ym{get useGlobeControls(){return!0}handlePanInertia(t,r){let i=gMr(t,r);return Math.abs(i.lng-r.center.lng)>180&&(i.lng=r.center.lng+179.5*Math.sign(i.lng-r.center.lng)),{easingCenter:i,easingOffset:new rr(0,0)}}handleMapControlsRollPitchBearingZoom(t,r){let i=t.around,n=r.screenPointToLocation(i);t.bearingDelta&&r.setBearing(r.bearing+t.bearingDelta),t.pitchDelta&&r.setPitch(r.pitch+t.pitchDelta),t.rollDelta&&r.setRoll(r.roll+t.rollDelta);let a=r.zoom;t.zoomDelta&&r.setZoom(r.zoom+t.zoomDelta);let o=r.zoom-a;if(o===0)return;let s=i0(r.center.lng,n.lng),l=s/(Math.abs(s/180)+1),u=i0(r.center.lat,n.lat),c=r.getRayDirectionFromPixel(i),f=r.cameraPosition,h=uu(f,c)*-1,p=So();j0(p,f,[c[0]*h,c[1]*h,c[2]*h]);let d=cp(p),v=d-1,m=Math.exp(-Math.max(v-.3,0)*.5),g=gC(d,.95,.999,0,1),w=s6(r.worldSize,r.center.lat)/Math.min(r.width,r.height),_=gC(w,.9,.5,1,.25),b=Math.min(m,d3(1,_,g)),M=(1-Vf(-o))*b,x=r.center.lat,A=r.zoom,T=new yn(r.center.lng+l*M,ea(r.center.lat+u*M,-Iv,Iv));r.setLocationAtPoint(n,i);let y=r.center,E=gC(Math.abs(s),45,85,0,1),S=Math.max(E,g)**.25,C=i0(y.lng,T.lng),k=i0(y.lat,T.lat);r.setCenter(new yn(y.lng+C*S,y.lat+k*S).wrap()),r.setZoom(A+Hc(x,r.center.lat))}handleMapControlsPan(t,r,i){t.panDelta&&fMr(r,i,r.isPointOnMapSurface(t.around)?t.around:r.centerPoint,t.panDelta)}cameraForBoxAndBearing(t,r,i,n,a){let o=Ust(t,r,i,n,a);if(!o)return;let s=r.left/a.width*2-1,l=(a.width-r.right)/a.width*2-1,u=r.top/a.height*-2+1,c=(a.height-r.bottom)/a.height*-2+1,f=i0(i.getWest(),i.getEast())<0,h=f?i.getEast():i.getWest(),p=f?i.getWest():i.getEast(),d=Math.max(i.getNorth(),i.getSouth()),v=Math.min(i.getNorth(),i.getSouth()),m=h+i0(h,p)*.5,g=d+i0(d,v)*.5,w=a.clone();w.setCenter(o.center),w.setBearing(o.bearing),w.setPitch(0),w.setRoll(0),w.setZoom(o.zoom);let _=w.modelViewProjectionMatrix,b=[pc(i.getNorthWest()),pc(i.getNorthEast()),pc(i.getSouthWest()),pc(i.getSouthEast()),pc(new yn(p,g)),pc(new yn(h,g)),pc(new yn(m,d)),pc(new yn(m,v))],M=pc(o.center),x=1/0;for(let A of b)s<0&&(x=Ym.getLesserNonNegativeNonNull(x,Ym.solveVectorScale(A,M,_,"x",s))),l>0&&(x=Ym.getLesserNonNegativeNonNull(x,Ym.solveVectorScale(A,M,_,"x",l))),u>0&&(x=Ym.getLesserNonNegativeNonNull(x,Ym.solveVectorScale(A,M,_,"y",u))),c<0&&(x=Ym.getLesserNonNegativeNonNull(x,Ym.solveVectorScale(A,M,_,"y",c)));if(!Number.isFinite(x)||x===0){Ost();return}return o.zoom=Math.min(w.zoom+Vc(x),t.maxZoom),o}handleJumpToCenterZoom(t,r){let i=t.center.lat,n=t.applyConstrain(r.center?yn.convert(r.center):t.center,t.zoom).center;t.setCenter(n.wrap());let a=r.zoom===void 0?t.zoom+Hc(i,n.lat):+r.zoom;t.zoom!==a&&t.setZoom(a)}handleEaseTo(t,r){let i=t.zoom,n=t.center,a=t.padding,o={roll:t.roll,pitch:t.pitch,bearing:t.bearing},s={roll:r.roll===void 0?t.roll:r.roll,pitch:r.pitch===void 0?t.pitch:r.pitch,bearing:r.bearing===void 0?t.bearing:r.bearing},l=r.zoom!==void 0,u=!t.isPaddingEqual(r.padding),c=!1,f=r.center?yn.convert(r.center):n,h=t.applyConstrain(f,i).center;nO(t,h);let p=t.clone();p.setCenter(h),p.setZoom(l?+r.zoom:i+Hc(n.lat,f.lat)),p.setBearing(r.bearing);let d=new rr(ea(t.centerPoint.x+r.offsetAsPoint.x,0,t.width),ea(t.centerPoint.y+r.offsetAsPoint.y,0,t.height));p.setLocationAtPoint(h,d);let v=(r.offset&&r.offsetAsPoint.mag())>0?p.center:h,m=l?+r.zoom:i+Hc(n.lat,v.lat),g=i+Hc(n.lat,0),w=m+Hc(v.lat,0),_=i0(n.lng,v.lng),b=i0(n.lat,v.lat),M=Vf(w-g);return c=m!==i,{easeFunc:x=>{if(bne(o,s)||Nst({startEulerAngles:o,endEulerAngles:s,tr:t,k:x,useSlerp:o.roll!=s.roll}),u&&t.interpolatePadding(a,r.padding,x),r.around)Pa("Easing around a point is not supported under globe projection."),t.setLocationAtPoint(r.around,r.aroundPoint);else{let A=x*(w>g?Math.min(2,M):Math.max(.5,M))**(1-x),T=Mot(n,_,b,A);t.setCenter(T.wrap())}if(c){let A=Ks.number(g,w,x)+Hc(0,t.center.lat);t.setZoom(A)}},isZooming:c,elevationCenter:v}}handleFlyTo(t,r){let i=r.zoom!==void 0,n=t.center,a=t.zoom,o=t.padding,s=!t.isPaddingEqual(r.padding),l=t.applyConstrain(yn.convert(r.center||r.locationAtOffset),a).center,u=i?+r.zoom:t.zoom+Hc(t.center.lat,l.lat),c=t.clone();c.setCenter(l),c.setZoom(u),c.setBearing(r.bearing);let f=new rr(ea(t.centerPoint.x+r.offsetAsPoint.x,0,t.width),ea(t.centerPoint.y+r.offsetAsPoint.y,0,t.height));c.setLocationAtPoint(l,f);let h=c.center;nO(t,h);let p=oMr(t,n,h),d=a+Hc(n.lat,0),v=u+Hc(h.lat,0),m=Vf(v-d),g=typeof r.minZoom=="number"?+r.minZoom:t.minZoom,w=Math.max(g,t.minZoom)+Hc(h.lat,0),_=Math.min(w,d,v)+Hc(0,h.lat),b=t.applyConstrain(h,_).zoom+Hc(h.lat,0),M=Vf(b-d),x=i0(n.lng,h.lng),A=i0(n.lat,h.lat);return{easeFunc:(T,y,E,S)=>{let C=Mot(n,x,A,E);s&&t.interpolatePadding(o,r.padding,T);let k=T===1?h:C;t.setCenter(k.wrap());let D=d+Vc(y);t.setZoom(T===1?u:D+Hc(0,k.lat))},scaleOfZoom:m,targetCenter:h,scaleOfMinZoom:M,pixelPathLength:p}}static solveVectorScale(t,r,i,n,a){let o=a,s=n==="x"?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],l=[i[3],i[7],i[11],i[15]],u=t[0]*s[0]+t[1]*s[1]+t[2]*s[2],c=t[0]*l[0]+t[1]*l[1]+t[2]*l[2],f=r[0]*s[0]+r[1]*s[1]+r[2]*s[2],h=r[0]*l[0]+r[1]*l[1]+r[2]*l[2],p=(f+s[3]-o*h-o*l[3])/(f-u-o*h+o*c);return f+o*c===u+o*h||l[3]*(u-f)+s[3]*(h-c)+u*h===f*c?null:p}static getLesserNonNegativeNonNull(t,r){return r!==null&&r>=0&&r{for(let a in this.tileManagers){let o=this.tileManagers[a].getSource().type;(o==="vector"||o==="geojson")&&this.tileManagers[a].reload()}},this.map=e,this.dispatcher=new sst(woe(),e._getMapId()).setEventedParent(this),this.dispatcher.registerMessageHandler("GG",(a,o)=>this.getGlyphs(a,o)),this.dispatcher.registerMessageHandler("GI",(a,o)=>this.getImages(a,o)),this.dispatcher.registerMessageHandler("GDA",(a,o)=>this.getDashes(a,o)),this.imageManager=new o6r,this.imageManager.setEventedParent(this),this.imageManager.setMissingImageResolver(e._missingStyleImageResolver),this.patternAtlas=new s6r(this.imageManager);let r=((i=e._container)==null?void 0:i.lang)||typeof document<"u"&&((n=document.documentElement)==null?void 0:n.lang)||void 0;this.glyphManager=new g6r(e._requestManager,t.localIdeographFontFamily,r),this.lineAtlas=new _6r(256,512),this.crossTileSymbolIndex=new Lst,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",tq()),QC().on(noe,this._rtlPluginLoaded),this.on("data",a=>{if(a.dataType!=="source"||a.sourceDataType!=="metadata")return;let o=this.tileManagers[a.sourceId];if(!o)return;let s=o.getSource();if(s!=null&&s.vectorLayerIds)for(let l in this._layers){let u=this._layers[l];u.source===s.id&&this._validateLayer(u)}})}_setInitialValues(){var e;this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new DB,this._imagesListDirty=!1,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._symbolPlacementTriggered=!1,this._placedProjectionTransition=void 0,this.crossTileSymbolIndex=new(((e=this.crossTileSymbolIndex)==null?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,t){var i,n,a;this._checkLoaded();let r=t===null?(a=(n=(i=this.stylesheet.state)==null?void 0:i[e])==null?void 0:n.default)!=null?a:null:t;return this._setGlobalStateValues({[e]:r}),this}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let t={};for(let r in e)t[r]=e[r].default;this._setGlobalStateValues(t)}_setGlobalStateValues(e){let t=[];for(let i in e)Fv(e[i],this._globalState[i])||t.push(i);if(t.length===0)return;let r=fn({},this._globalState);for(let i of t)this._globalState[i]=e[i];this._applyGlobalStateChanges(t,r)}_applyGlobalStateChanges(e,t){var a,o;let r=new Set,i={};for(let s of e)i[s]=this._globalState[s];for(let s in this._layers){let l=this._layers[s];l.retainPriorGlobalState(e,t);let u=l.getLayoutAffectingGlobalStateRefs(),c=l.getPaintAffectingGlobalStateRefs(),f=l.getVisibilityAffectingGlobalStateRefs();for(let h of e){if(u.has(h)&&r.add(l.source),c.has(h))for(let{name:p,value:d}of c.get(h))this._updatePaintProperty(l,p,d,{validate:!1});f!=null&&f.has(h)&&(l.recalculateVisibility(),this._updateLayer(l))}}let n={now:zo(),transition:this.getTransition()};(a=this.light)==null||a.applyGlobalStateChange(e,t,n),(o=this.sky)==null||o.applyGlobalStateChange(e,t,n),this.dispatcher.broadcast("UGS",i);for(let s in this.tileManagers)r.has(s)&&(this._reloadSource(s),this._changed=!0)}loadURL(i){return Zi(this,arguments,function*(e,t={},r){this.fire(new dp("dataloading")),t.validate=typeof t.validate!="boolean"||t.validate,this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;try{let a=yield this.map._requestManager.transformRequest(e,"Style");eq(n.signal);let o=yield yC(a,n);this._loadStyleRequest===n&&(this._loadStyleRequest=null),this._load(o.data,t,r)}catch(a){this._loadStyleRequest===n&&(this._loadStyleRequest=null),a&&!n.signal.aborted&&this.fire(new Mn(Oc(a)))}})}loadJSON(e,t={},r){this.fire(new dp("dataloading")),this._frameRequest=new AbortController,l0.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,t.validate=t.validate!==!1,this._load(e,t,r)}).catch(()=>{})}loadEmpty(){this.fire(new dp("dataloading")),this._load(bMr,{validate:!1})}_load(e,t,r){var n,a,o;let i=t.transformStyle?t.transformStyle(r,e):e;if(!(t.validate&&jne(this,i))){i=fn({},i),this._loaded=!0,this.stylesheet=i;for(let s in i.sources)this.addSource(s,i.sources[s],{validate:!1});i.sprite?this._loadSprite(i.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(i.glyphs),this.glyphManager.setFontFaces(i["font-faces"]),this._createLayers(),this.light=new y6r((n=this.stylesheet.light)!=null?n:{},this._globalState),this._setProjectionInternal(((a=this.stylesheet.projection)==null?void 0:a.type)||"mercator"),this.sky=new b6r(this.stylesheet.sky,this._globalState),this.sky.setEventedParent(this),this.map.setTerrain((o=this.stylesheet.terrain)!=null?o:null,{validate:!1}),this.fire(new dp("data")),this.fire(new eoe)}}_createLayers(){var t,r,i;let e=Vat(this.stylesheet.layers);this.setGlobalState((t=this.stylesheet.state)!=null?t:null),this.dispatcher.broadcast("SL",e),this._order=e.map(n=>n.id),this._layers={},this._serializedLayers=null;for(let n of e){let a=Lq(n,this._globalState);if(a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a,xq(a)&&this.tileManagers[a.source]){let o=(i=(r=n.paint)==null?void 0:r["raster-fade-duration"])!=null?i:a.paint.get("raster-fade-duration");this.tileManagers[a.source].setRasterFadeDuration(o)}}}_loadSprite(e,t=!1,r=void 0){return Zi(this,null,function*(){this.imageManager.setLoaded(!1);let i=new AbortController;this._spriteRequest=i;let n;try{let a=yield n6r(e,this.map._requestManager,this.map.getPixelRatio(),i);if(!a)return;for(let o in a){let{loaded:s,removed:l}=this.imageManager.setSpriteImages(o,a[o]);this._markImagesChanged(l),t&&this._markImagesChanged(s)}}catch(a){n=a,i.signal.aborted||this.fire(new Mn(n))}finally{this._spriteRequest=null,this.imageManager.setLoaded(!0),t&&(this._changed=!0),this.dispatcher.broadcast("SI",this.imageManager.listImages()),this.fire(new dp("data")),r==null||r(n)}})}_unloadSprite(){this._markImagesChanged(this.imageManager.removeAllSpriteImages()),this._imagesListDirty=!0,this._changed=!0,this.fire(new dp("data"))}_validateLayer(e){let t=this.tileManagers[e.source];if(!t)return;let r=e.sourceLayer;if(!r)return;let i=t.getSource();(i.type==="geojson"||i.vectorLayerIds&&!i.vectorLayerIds.includes(r))&&this.fire(new Mn(Error(`Source layer "${r}" does not exist on source "${i.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.tileManagers)if(!this.tileManagers[e].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(e,t=!1){let r=this._serializedAllLayers();if(!e||e.length===0)return Object.values(t?vh(r):r);let i=[];for(let n of e)if(r[n]){let a=t?vh(r[n]):r[n];i.push(a)}return i}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let t=Object.keys(this._layers);for(let r of t){let i=this._layers[r];i.type!=="custom"&&(e[r]=i.serialize())}return e}hasTransitions(){var e,t,r;if((e=this.light)!=null&&e.hasTransition()||(t=this.sky)!=null&&t.hasTransition()||(r=this.projection)!=null&&r.hasTransition())return!0;for(let i in this.tileManagers)if(this.tileManagers[i].hasTransition())return!0;for(let i in this._layers)if(this._layers[i].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let t=this._changed;if(t){this._imagesListDirty&&(this._imagesListDirty=(this.dispatcher.broadcast("SI",this.imageManager.listImages()),!1));let n=Object.keys(this._updatedLayers),a=Object.keys(this._removedLayers);(n.length||a.length)&&this._updateWorkerLayers(n,a);for(let o in this._updatedSources){let s=this._updatedSources[o];if(s==="reload")this._reloadSource(o);else if(s==="clear")this._clearSource(o);else throw Error(`Invalid action ${s}`)}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let o in this._updatedPaintProps)this._layers[o].updateTransitions(e);this._resetUpdates()}let r={};for(let n in this.tileManagers){let a=this.tileManagers[n];r[n]=a.used,a.used=!1}let i=this.imageManager.listImages();for(let n of this._order){let a=this._layers[n];a.recalculate(e,i),!a.isHidden(e.zoom)&&a.source&&(this.tileManagers[a.source].used=!0)}for(let n in r){let a=this.tileManagers[n];!!r[n]!=!!a.used&&a.fire(new Ns("data",{sourceDataType:"visibility",sourceId:n}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,t&&this.fire(new dp("data"))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.tileManagers)this.tileManagers[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,t={}){var a;this._checkLoaded();let r=this.serialize();if(e=t.transformStyle?t.transformStyle(r,e):e,((a=t.validate)!=null?a:!0)&&jne(this,e))return!1;e=vh(e),e.layers=Vat(e.layers);let i=r6r(r,e),n=this._getOperationsToPerform(i);if(n.unimplemented.length>0)throw Error(`Unimplemented: ${n.unimplemented.join(", ")}.`);if(n.operations.length===0)return!1;for(let o of n.operations)o();return this.stylesheet=e,this._serializedLayers=null,this.fire(new eoe({style:this})),!0}_getOperationsToPerform(e){let t=[],r=[];for(let i of e)switch(i.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":{let[n,a]=i.args;t.push(()=>this.addLayer(n,a));break}case"removeLayer":{let[n]=i.args;t.push(()=>this.removeLayer(n));break}case"setPaintProperty":{let[n,a,o]=i.args;t.push(()=>this.setPaintProperty(n,a,o));break}case"setLayoutProperty":{let[n,a,o]=i.args;t.push(()=>this.setLayoutProperty(n,a,o));break}case"setFilter":{let[n,a]=i.args;t.push(()=>this.setFilter(n,a));break}case"addSource":{let[n,a]=i.args;t.push(()=>this.addSource(n,a));break}case"removeSource":{let[n]=i.args;t.push(()=>this.removeSource(n));break}case"setLayerZoomRange":{let[n,a,o]=i.args;t.push(()=>this.setLayerZoomRange(n,a,o));break}case"setLight":{let[n]=i.args;t.push(()=>this.setLight(n));break}case"setGeoJSONSourceData":{let[n,a]=i.args;t.push(()=>this.setGeoJSONSourceData(n,a));break}case"setGlyphs":{let[n]=i.args;t.push(()=>this.setGlyphs(n));break}case"setFontFaces":{let[n]=i.args;t.push(()=>this.setFontFaces(n));break}case"setSprite":{let[n]=i.args;t.push(()=>this.setSprite(n));break}case"setTerrain":{let[n]=i.args;t.push(()=>this.map.setTerrain(n));break}case"setSky":{let[n]=i.args;t.push(()=>this.setSky(n));break}case"setProjection":{let[n]=i.args;t.push(()=>this.setProjection(n));break}case"setGlobalState":{let[n]=i.args;t.push(()=>this.setGlobalState(n));break}case"setTransition":t.push(()=>{});break;default:r.push(i.command)}return{operations:t,unimplemented:r}}addImage(e,t){if(this.getImage(e)){this.fire(new Mn(Error(`An image named "${e}" already exists.`)));return}this.imageManager.addImage(e,t),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}setMissingImageResolver(e){this.imageManager.setMissingImageResolver(e)}removeImage(e){if(!this.getImage(e)){this.fire(new Mn(Error(`An image named "${e}" does not exist.`)));return}this.imageManager.removeImage(e),this._afterImageUpdated(e)}_markImagesChanged(e){for(let t of e)this._changedImages[t]=!0}_afterImageUpdated(e){this._changedImages[e]=!0,this._imagesListDirty=!0,this._changed=!0,this.fire(new dp("data"))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,t,r={}){var n;if(this._checkLoaded(),this.tileManagers[e]!==void 0)throw Error(`Source "${e}" already exists.`);if(!t.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(t).join(", ")}.`);if(Hne.has(t.type)&&this._validate(mh.source,`sources.${e}`,t,null,r))return;(n=this.map)!=null&&n._collectResourceTiming&&(t.collectResourceTiming=!0);let i=this.tileManagers[e]=new ooe(e,t,this.dispatcher);i.style=this,i.setEventedParent(this,()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e})),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new Mn(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let t=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],t.fire(new Ns("data",{sourceDataType:"metadata",sourceId:e})),t.setEventedParent(null),t.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);let r=this.tileManagers[e].getSource();if(r.type!=="geojson")throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){var t;return(t=this.tileManagers[e])==null?void 0:t.getSource()}addLayer(e,t,r={}){this._checkLoaded();let i=e.id;if(this.getLayer(i)){this.fire(new Mn(Error(`Layer "${i}" already exists on this map.`)));return}let n;if(e.type==="custom"){if(gq(this,oat(e)))return;n=Lq(e,this._globalState)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(i,e.source),e=vh(e),e=dn(e,{source:i})),this._validate(mh.layer,`layers.${i}`,e,{arrayIndex:-1},r))return;n=Lq(e,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:i}})}let a=t?this._order.indexOf(t):this._order.length;if(t&&a===-1){this.fire(new Mn(Error(`Cannot add layer "${i}" before non-existing layer "${t}".`)));return}if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=n,this._removedLayers[i]&&n.source&&n.type!=="custom"){let o=this._removedLayers[i];delete this._removedLayers[i],o.type===n.type?(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause()):this._updatedSources[n.source]="clear"}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}moveLayer(e,t){if(this._checkLoaded(),this._changed=!0,!this._layers[e]){this.fire(new Mn(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));return}if(e===t)return;if(t&&!this._order.includes(t)){this.fire(new Mn(Error(`Cannot move layer "${e}" before non-existing layer "${t}".`)));return}let r=this._order.indexOf(e);this._order.splice(r,1);let i=t?this._order.indexOf(t):this._order.length;this._order.splice(i,0,e),this._layerOrderChanged=!0}removeLayer(e){var i;this._checkLoaded();let t=this._layers[e];if(!t){this.fire(new Mn(Error(`Cannot remove non-existing layer "${e}".`)));return}t.setEventedParent(null);let r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.type==="symbol"&&t.source&&((i=this.tileManagers[t.source])==null||i.resetMaxContentElevation()),t.onRemove&&t.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,t,r){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new Mn(Error(`Cannot set the zoom range of non-existing layer "${e}".`)));return}(i.minzoom!==t||i.maxzoom!==r)&&(t!=null&&(i.minzoom=t),r!=null&&(i.maxzoom=r),this._updateLayer(i))}setFilter(e,t,r={}){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new Mn(Error(`Cannot filter non-existing layer "${e}".`)));return}if(!Fv(i.filter,t)){if(t==null){i.setFilter(void 0),this._updateLayer(i);return}this._validate(mh.filter,`layers.${i.id}.filter`,t,null,r)||(i.setFilter(vh(t)),this._updateLayer(i))}}getFilter(e){return vh(this.getLayer(e).filter)}setLayoutProperty(e,t,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(!n){this.fire(new Mn(Error(`Cannot style non-existing layer "${e}".`)));return}Fv(n.getLayoutProperty(t),r)||(n.setLayoutProperty(t,r,i),this._updateLayer(n))}getLayoutProperty(e,t){let r=this.getLayer(e);if(!r){this.fire(new Mn(Error(`Cannot get style of non-existing layer "${e}".`)));return}return r.getLayoutProperty(t)}setPaintProperty(e,t,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(!n){this.fire(new Mn(Error(`Cannot style non-existing layer "${e}".`)));return}Fv(n.getPaintProperty(t),r)||this._updatePaintProperty(n,t,r,i)}_updatePaintProperty(e,t,r,i={}){e.setPaintProperty(t,r,i)&&this._updateLayer(e),xq(e)&&t==="raster-fade-duration"&&this.tileManagers[e.source].setRasterFadeDuration(r),this._changed=!0,this._updatedPaintProps[e.id]=!0,e.type==="symbol"&&this.triggerSymbolPlacement(),this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,t){this._checkLoaded();let r=e.source,i=e.sourceLayer,n=this.tileManagers[r];if(n===void 0){this.fire(new Mn(Error(`The source '${r}' does not exist in the map's style.`)));return}let a=n.getSource().type;if(a==="geojson"&&i){this.fire(new Mn(Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(a==="vector"&&!i){this.fire(new Mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(e.id===void 0){this.fire(new Mn(Error("The feature id parameter must be provided.")));return}let o=["__proto__","constructor","prototype"];if(t&&Object.keys(t).some(s=>o.includes(s))){this.fire(new Mn(Error(`The feature state should not include one of the following keys: ${o}`)));return}n.setFeatureState(i,e.id,t)}removeFeatureState(e,t){this._checkLoaded();let r=e.source,i=this.tileManagers[r];if(i===void 0){this.fire(new Mn(Error(`The source '${r}' does not exist in the map's style.`)));return}let n=i.getSource().type,a=n==="vector"?e.sourceLayer:void 0;if(n==="vector"&&!a){this.fire(new Mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(t&&typeof e.id!="string"&&typeof e.id!="number"){this.fire(new Mn(Error("A feature id is required to remove its specific state property.")));return}i.removeFeatureState(a,e.id,t)}getFeatureState(e){this._checkLoaded();let t=e.source,r=e.sourceLayer,i=this.tileManagers[t];if(i===void 0){this.fire(new Mn(Error(`The source '${t}' does not exist in the map's style.`)));return}if(i.getSource().type==="vector"&&!r){this.fire(new Mn(Error("The sourceLayer parameter must be provided for vector source types.")));return}return e.id===void 0&&this.fire(new Mn(Error("The feature id parameter must be provided."))),i.getFeatureState(r,e.id)}getTransition(){var e;return dn({duration:300,delay:0},(e=this.stylesheet)==null?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=QB(this.tileManagers,n=>n.serialize()),t=this._serializeByIds(this._order,!0),r=this.map.getTerrain()||void 0,i=this.stylesheet;return xne({version:i.version,name:i.name,metadata:i.metadata,light:i.light,sky:i.sky,center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,sprite:i.sprite,glyphs:i.glyphs,"font-faces":i["font-faces"],transition:i.transition,projection:i.projection,state:i.state,sources:e,layers:t,terrain:r},n=>n!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.tileManagers[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=a=>this._layers[a].type==="fill-extrusion",r={},i=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o)){r[o]=a;for(let s of e){let l=s[o];if(l)for(let u of l)i.push(u)}}}i.sort((a,o)=>o.intersectionZ-a.intersectionZ);let n=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let s=i.length-1;s>=0;s--){let l=i[s].feature;if(r[l.layer.id]this.map.terrain.getElevation(u,c,f):void 0));return this.placement&&n.push(P6r(this._layers,a,this.tileManagers,e,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(n)}querySourceFeatures(e,t){t!=null&&t.filter&&this._validate(mh.filter,"querySourceFeatures.filter",t.filter,null,t);let r=this.tileManagers[e];return r?I6r(r,t?da(fn({},t),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,t={}){this._checkLoaded();let r=this.light.getLight(),i=!1;for(let a in e)if(!Fv(e[a],r[a])){i=!0;break}if(!i)return;let n={now:zo(),transition:dn({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,t),this.light.updateTransitions(n)}getProjection(){var e;return(e=this.stylesheet)==null?void 0:e.projection}setProjection(e){this._checkLoaded();let t=e!=null?e:{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(t.type)}getSky(){var e;return(e=this.stylesheet)==null?void 0:e.sky}setSky(e,t={}){this._checkLoaded();let r=this.getSky(),i=!1;if(!e&&!r)return;if(e&&!r)i=!0;else if(!e&&r)i=!0;else for(let a in e)if(!Fv(e[a],r[a])){i=!0;break}if(!i)return;let n={now:zo(),transition:dn({duration:300,delay:0},this.stylesheet.transition)};this.sky.setSky(e,t)&&(this.stylesheet.sky=e,this.sky.updateTransitions(n))}_setProjectionInternal(e){var r;let t=xMr(e,(r=this.map._camera)==null?void 0:r.transform.constrainOverride,this._globalState);this.projection=t.projection,this.map.migrateProjection(t.transform,t.cameraHelper);for(let i in this.tileManagers)this.tileManagers[i].reload()}_validate(e,t,r,i,n={}){return n.validate!==!1&&KT(this,e,fn({key:t,style:this.serialize(),value:r},i),n)}_remove(e=!0){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null)),QC().off(noe,this._rtlPluginLoaded);for(let t in this._layers)this._layers[t].setEventedParent(null);for(let t in this.tileManagers){let r=this.tileManagers[t];r.setEventedParent(null),r.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.tileManagers[e].clearTiles()}_reloadSource(e){this.tileManagers[e].resume(),this.tileManagers[e].reload()}_updateSources(e){for(let t in this.tileManagers)this.tileManagers[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}triggerSymbolPlacement(){this._symbolPlacementTriggered=!0}_placementInputsChanged(e,t,r){var n;let i=this.pauseablePlacement;return!i||this._symbolPlacementTriggered||this._placedProjectionTransition!==((n=this.projection)==null?void 0:n.transitionState)||i._showCollisionBoxes!==t||i.placement.collisionGroups.crossSourceCollisions!==r||i.placement.transform.renderWorldCopies!==e.renderWorldCopies||!Ftt(i.placement.transform.modelViewProjectionMatrix,e.modelViewProjectionMatrix)}_updatePlacement(e,t,r,i,n=!1){var c,f;let a=!1,o=!1,s={};for(let h of this._order){let p=this._layers[h];if(p.type!=="symbol")continue;if(!s[p.source]){let v=this.tileManagers[p.source];s[p.source]=v.getRenderableIds(!0).map(m=>v.getTileByID(m)).sort((m,g)=>g.tileID.overscaledZ-m.tileID.overscaledZ||(m.tileID.isLessThan(g.tileID)?-1:1))}let d=this.crossTileSymbolIndex.addLayer(p,s[p.source],e.center.lng);a||(a=d)}this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||r===0);let l=a||this._placementInputsChanged(e,t,i),u=((c=this.pauseablePlacement)==null?void 0:c.isDone())&&!this.placement.stillRecent(zo(),e.zoom);if((n||!this.pauseablePlacement||u&&(l||this.placement.stale))&&(this._symbolPlacementTriggered=!1,this._placedProjectionTransition=(f=this.projection)==null?void 0:f.transitionState,this.pauseablePlacement=new VAr(e,this.map.terrain,this._order,n,t,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?l&&this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(zo()),o=!0),a&&this.pauseablePlacement.placement.setStale()),o||a)for(let h of this._order){let p=this._layers[h];p.type==="symbol"&&this.placement.updateLayerOpacities(p,s[p.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(zo())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,t){return Zi(this,null,function*(){let r=yield this.imageManager.getImages(t.icons);this._updateTilesForChangedImages();let i=this.tileManagers[t.source];return i&&i.setDependencies(t.tileID.key,t.type,t.icons),r})}getGlyphs(e,t){return Zi(this,null,function*(){let r=yield this.glyphManager.getGlyphs(t.stacks),i=this.tileManagers[t.source];return i&&i.setDependencies(t.tileID.key,t.type,[""]),r})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,t={}){this._checkLoaded(),!(e&&this._validate(mh.glyphs,"glyphs",e,null,t))&&(this._changed=!0,this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getFontFaces(){return this.stylesheet["font-faces"]||null}setFontFaces(e){this._checkLoaded(),this._changed=!0,this._glyphsDidChange=!0,this.stylesheet["font-faces"]=e,this.glyphManager.setFontFaces(e)}getDashes(e,t){return Zi(this,null,function*(){let r={};for(let[i,n]of Object.entries(t.dashes))r[i]=this.lineAtlas.getDash(n.dasharray,n.round);return r})}addSprite(e,t,r={},i){this._checkLoaded();let n=[{id:e,url:t}],a=[...Kq(this.stylesheet.sprite),...n];this._validate(mh.sprite,"sprite",a,null,r)||(this.stylesheet.sprite=a,this._loadSprite(n,!0,i))}removeSprite(e){this._checkLoaded();let t=Kq(this.stylesheet.sprite);if(!t.find(i=>i.id===e)){this.fire(new Mn(Error(`Sprite "${e}" doesn't exists on this map.`)));return}let r=this.imageManager.removeSpriteImages(e);this._markImagesChanged(r),t.splice(t.findIndex(i=>i.id===e),1),this.stylesheet.sprite=t.length>0?t:void 0,this._imagesListDirty=!0,this._changed=!0,this.fire(new dp("data"))}getSprite(){return Kq(this.stylesheet.sprite)}setSprite(e,t={},r){this._checkLoaded(),!(e&&this._validate(mh.sprite,"sprite",e,null,t))&&(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,r):(this._unloadSprite(),r&&r(null)))}destroy(){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null));for(let e in this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.patternAtlas.destroy()),this.glyphManager&&this.glyphManager.destroy();for(let e in this._layers){let t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.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={}}},_Mr=cl([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),wMr=class{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,i,n,a,o,s,l){this.context=e;let u=this.boundPaintVertexBuffers.length!==i.length;for(let c=0;!u&&c({u_depth:new Sn(e,t.u_depth),u_terrain:new Sn(e,t.u_terrain)}),AMr=(e,t)=>({u_texture:new Sn(e,t.u_texture),u_ele_delta:new Ni(e,t.u_ele_delta),u_fog_matrix:new fp(e,t.u_fog_matrix),u_fog_color:new $m(e,t.u_fog_color),u_fog_ground_blend:new Ni(e,t.u_fog_ground_blend),u_fog_ground_blend_opacity:new Ni(e,t.u_fog_ground_blend_opacity),u_horizon_color:new $m(e,t.u_horizon_color),u_horizon_fog_blend:new Ni(e,t.u_horizon_fog_blend),u_is_globe_mode:new Ni(e,t.u_is_globe_mode)}),MMr=(e,t)=>({u_ele_delta:new Ni(e,t.u_ele_delta)}),SMr=(e,t,r,i,n)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:t,u_fog_color:r?r.properties.get("fog-color"):aa.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:n?0:r?r.calculateFogBlendOpacity(i):0,u_horizon_color:r?r.properties.get("horizon-color"):aa.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!n}),EMr=e=>({u_ele_delta:e}),fO={ProjectionUBO:0,TerrainUBO:1,FrameUBO:2};CMr={float:[1,1],int:[1,1],vec2:[2,2],vec4:[4,4],mat4:[16,4]};Roe=class{constructor(e,t,r){this.context=e,this.binding=t,this.contentWords=r.contentWords;let i=e.gl;this.buffer=i.createBuffer(),i.bindBuffer(i.UNIFORM_BUFFER,this.buffer),i.bufferData(i.UNIFORM_BUFFER,r.sizeWords*4,i.DYNAMIC_DRAW),this.uploaded=new Float32Array(r.sizeWords),this.pending=new Float32Array(r.sizeWords),this.uploadedWords=new Uint32Array(this.uploaded.buffer),this.pendingWords=new Uint32Array(this.pending.buffer),this.hasData=!1}upload(){let e=this.context.gl,t=!this.hasData;if(!t){let r=this.pendingWords,i=this.uploadedWords;for(let n=0;n=0&&(this.attributes[y]={location:E,isInteger:T.has(y)})}u.deleteShader(x),u.deleteShader(M);for(let y of g)if(y&&!A[y]){let E=u.getUniformLocation(this.program,y);E&&(A[y]=E)}this.fixedUniforms=i(e,A),this.terrainUniforms=TMr(e,A),this.binderUniforms=r?r.getUniforms(e,A):[]}draw(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v,m,g,w){var M;let _=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.terrainUniformBuffer.bind(),e.frameUniformBuffer.bind(),e.setDepthMode(r),e.setStencilMode(i),e.setColorMode(n),e.setCullFace(a),s){e.activeTexture.set(_.TEXTURE2),_.bindTexture(_.TEXTURE_2D,s.depthTexture),e.activeTexture.set(_.TEXTURE3),_.bindTexture(_.TEXTURE_2D,s.texture);for(let x in this.terrainUniforms)this.terrainUniforms[x].set(s[x]);IMr(e.terrainUniformBuffer,s)}if(DMr(e,l),o)for(let x in this.fixedUniforms)this.fixedUniforms[x].set(o[x]);v&&v.setUniforms(e,this.binderUniforms,p,{zoom:d});let b=0;switch(t){case _.LINES:b=2;break;case _.TRIANGLES:b=3;break;case _.LINE_STRIP:b=1}for(let x of h.get())x.vaos||(x.vaos={}),(M=x.vaos)[u]||(M[u]=new wMr),x.vaos[u].bind(e,this,c,v?v.getPaintVertexBuffers():[],f,x.vertexOffset,m,g,w),_.drawElements(t,x.primitiveLength*b,_.UNSIGNED_SHORT,x.primitiveOffset*b*2)}};qMr=(e,t)=>({u_lightpos:new Gf(e,t.u_lightpos),u_lightpos_globe:new Gf(e,t.u_lightpos_globe),u_lightintensity:new Ni(e,t.u_lightintensity),u_lightcolor:new Gf(e,t.u_lightcolor),u_vertical_gradient:new Ni(e,t.u_vertical_gradient),u_opacity:new Ni(e,t.u_opacity),u_fill_translate:new xa(e,t.u_fill_translate)}),OMr=(e,t)=>({u_lightpos:new Gf(e,t.u_lightpos),u_lightpos_globe:new Gf(e,t.u_lightpos_globe),u_lightintensity:new Ni(e,t.u_lightintensity),u_lightcolor:new Gf(e,t.u_lightcolor),u_vertical_gradient:new Ni(e,t.u_vertical_gradient),u_height_factor:new Ni(e,t.u_height_factor),u_opacity:new Ni(e,t.u_opacity),u_fill_translate:new xa(e,t.u_fill_translate),u_image:new Sn(e,t.u_image),u_texsize:new xa(e,t.u_texsize),u_pixel_coord_upper:new xa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new xa(e,t.u_pixel_coord_lower),u_scale:new Gf(e,t.u_scale),u_fade:new Ni(e,t.u_fade)}),tlt=(e,t,r,i)=>{let n=e.style.light,a=n.getCartesianPosition(),o=fne();n.properties.get("anchor")==="viewport"&&ktt(o,e.transform.bearingInRadians),Btt(a,a,o);let s=e.transform.transformLightDirection(a),l=n.properties.get("color");return{u_lightpos:a,u_lightpos_globe:s,u_lightintensity:n.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+t,u_opacity:r,u_fill_translate:i}},NMr=(e,t,r,i,n,a,o)=>dn(tlt(e,t,r,i),elt(a,e,o),{u_height_factor:-(2**n.overscaledZ)/o.tileSize/8}),UMr=(e,t)=>({u_fill_translate:new xa(e,t.u_fill_translate)}),VMr=(e,t)=>({u_image:new Sn(e,t.u_image),u_texsize:new xa(e,t.u_texsize),u_pixel_coord_upper:new xa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new xa(e,t.u_pixel_coord_lower),u_scale:new Gf(e,t.u_scale),u_fade:new Ni(e,t.u_fade),u_sdf_pattern:new Sn(e,t.u_sdf_pattern),u_fill_translate:new xa(e,t.u_fill_translate)}),GMr=(e,t)=>({u_fill_translate:new xa(e,t.u_fill_translate)}),HMr=(e,t)=>({u_image:new Sn(e,t.u_image),u_texsize:new xa(e,t.u_texsize),u_pixel_coord_upper:new xa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new xa(e,t.u_pixel_coord_lower),u_scale:new Gf(e,t.u_scale),u_fade:new Ni(e,t.u_fade),u_sdf_pattern:new Sn(e,t.u_sdf_pattern),u_fill_translate:new xa(e,t.u_fill_translate)}),rlt=(e,t,r,i,n)=>dn(elt(t,e,r),{u_fill_translate:i,u_sdf_pattern:+!!n}),jMr=e=>({u_fill_translate:e}),$Mr=e=>({u_fill_translate:e}),WMr=(e,t,r,i,n)=>rlt(e,t,r,i,n),YMr=(e,t)=>({u_scale_with_map:new Sn(e,t.u_scale_with_map),u_pitch_with_map:new Sn(e,t.u_pitch_with_map),u_extrude_scale:new xa(e,t.u_extrude_scale),u_globe_extrude_scale:new Ni(e,t.u_globe_extrude_scale),u_translate:new xa(e,t.u_translate)}),XMr=(e,t,r,i,n)=>{let a=e.transform,o,s,l=0;if(r.paint.get("circle-pitch-alignment")==="map"){let u=r0(t,1,a.zoom);o=!0,s=[u,u],l=u/(qr*2**t.tileID.overscaledZ)*2*Math.PI*n}else o=!1,s=a.pixelsToGLUnits;return{u_scale_with_map:+(r.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+o,u_extrude_scale:s,u_globe_extrude_scale:l,u_translate:i}},ZMr=(e,t)=>({u_color:new $m(e,t.u_color),u_overlay:new Sn(e,t.u_overlay),u_overlay_scale:new Ni(e,t.u_overlay_scale)}),Iot=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),KMr=(e,t)=>({u_extrude_scale:new Ni(e,t.u_extrude_scale),u_intensity:new Ni(e,t.u_intensity),u_globe_extrude_scale:new Ni(e,t.u_globe_extrude_scale)}),JMr=(e,t)=>({u_matrix:new fp(e,t.u_matrix),u_image:new Sn(e,t.u_image),u_color_ramp:new Sn(e,t.u_color_ramp),u_opacity:new Ni(e,t.u_opacity)}),ilt=(e,t,r,i)=>{let n=r0(e,1,t)/(qr*2**e.tileID.overscaledZ)*2*Math.PI*i;return{u_extrude_scale:r0(e,1,t),u_intensity:r,u_globe_extrude_scale:n}},nlt=(e,t,r,i)=>{let n=Om();return Pv(n,0,e.width,e.height,0,0,1),{u_matrix:n,u_image:r,u_color_ramp:i,u_opacity:t.paint.get("heatmap-opacity")}},QMr=(e,t)=>({u_image:new Sn(e,t.u_image),u_latrange:new xa(e,t.u_latrange),u_exaggeration:new Ni(e,t.u_exaggeration),u_altitudes:new Xne(e,t.u_altitudes),u_azimuths:new Xne(e,t.u_azimuths),u_accent:new $m(e,t.u_accent),u_method:new Sn(e,t.u_method),u_shadows:new Yne(e,t.u_shadows),u_highlights:new Yne(e,t.u_highlights)}),eSr=(e,t)=>({u_matrix:new fp(e,t.u_matrix),u_image:new Sn(e,t.u_image),u_dimension:new xa(e,t.u_dimension),u_zoom:new Ni(e,t.u_zoom),u_unpack:new JT(e,t.u_unpack)}),tSr=(e,t,r)=>{let i=r.paint.get("hillshade-accent-color"),n;switch(r.paint.get("hillshade-method")){case"basic":n=4;break;case"combined":n=1;break;case"igor":n=2;break;case"multidirectional":n=3;break;default:n=0}let a=r.getIlluminationProperties();for(let o=0;o{let r=t.stride,i=Om();return Pv(i,0,qr,-qr,0,0,1),lu(i,i,[0,-qr,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:e.overscaledZ,u_unpack:t.getUnpackVector()}};nSr=(e,t)=>({u_image:new Sn(e,t.u_image),u_unpack:new JT(e,t.u_unpack),u_dimension:new xa(e,t.u_dimension),u_elevation_stops:new Sn(e,t.u_elevation_stops),u_color_stops:new Sn(e,t.u_color_stops),u_color_ramp_size:new Sn(e,t.u_color_ramp_size),u_opacity:new Ni(e,t.u_opacity)}),aSr=(e,t,r=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:e.paint.get("color-relief-opacity")}),oSr=(e,t)=>({u_translation:new xa(e,t.u_translation),u_ratio:new Ni(e,t.u_ratio)}),sSr=(e,t)=>({u_translation:new xa(e,t.u_translation),u_ratio:new Ni(e,t.u_ratio),u_image:new Sn(e,t.u_image),u_image_height:new Ni(e,t.u_image_height)}),lSr=(e,t)=>({u_translation:new xa(e,t.u_translation),u_texsize:new xa(e,t.u_texsize),u_ratio:new Ni(e,t.u_ratio),u_image:new Sn(e,t.u_image),u_scale:new Gf(e,t.u_scale),u_fade:new Ni(e,t.u_fade)}),uSr=(e,t)=>({u_translation:new xa(e,t.u_translation),u_ratio:new Ni(e,t.u_ratio),u_image:new Sn(e,t.u_image),u_mix:new Ni(e,t.u_mix),u_tileratio:new Ni(e,t.u_tileratio),u_crossfade_from:new Ni(e,t.u_crossfade_from),u_crossfade_to:new Ni(e,t.u_crossfade_to),u_lineatlas_width:new Ni(e,t.u_lineatlas_width),u_lineatlas_height:new Ni(e,t.u_lineatlas_height)}),cSr=(e,t)=>({u_translation:new xa(e,t.u_translation),u_ratio:new Ni(e,t.u_ratio),u_image:new Sn(e,t.u_image),u_image_height:new Ni(e,t.u_image_height),u_tileratio:new Ni(e,t.u_tileratio),u_crossfade_from:new Ni(e,t.u_crossfade_from),u_crossfade_to:new Ni(e,t.u_crossfade_to),u_image_dash:new Sn(e,t.u_image_dash),u_mix:new Ni(e,t.u_mix),u_lineatlas_width:new Ni(e,t.u_lineatlas_width),u_lineatlas_height:new Ni(e,t.u_lineatlas_height)}),hO=(e,t,r,i)=>{let n=e.transform;return{u_translation:alt(e,t,r),u_ratio:i/r0(t,1,n.zoom)}},fSr=(e,t,r,i,n)=>dn(hO(e,t,r,i),{u_image:0,u_image_height:n}),hSr=(e,t,r,i,n)=>{let a=e.transform,o=zoe(t,a);return{u_translation:alt(e,t,r),u_texsize:t.imageAtlasTexture.size,u_ratio:i/r0(t,1,a.zoom),u_image:0,u_scale:[o,n.fromScale,n.toScale],u_fade:n.t}},dSr=(e,t,r,i,n)=>{let a=e.transform,o=zoe(t,a);return dn(hO(e,t,r,i),{u_tileratio:o,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image:0,u_mix:n.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},pSr=(e,t,r,i,n,a)=>{let o=e.transform,s=zoe(t,o);return dn(hO(e,t,r,i),{u_image:0,u_image_height:a,u_tileratio:s,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image_dash:1,u_mix:n.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};vSr=(e,t)=>({u_image:new Sn(e,t.u_image),u_opacity:new Ni(e,t.u_opacity)}),gSr=(e,t)=>({u_image:t,u_opacity:e}),mSr=(e,t)=>({u_is_size_zoom_constant:new Sn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new Sn(e,t.u_is_size_feature_constant),u_size_t:new Ni(e,t.u_size_t),u_size:new Ni(e,t.u_size),u_rotate_symbol:new Sn(e,t.u_rotate_symbol),u_label_plane_matrix:new fp(e,t.u_label_plane_matrix),u_coord_matrix:new fp(e,t.u_coord_matrix),u_is_text:new Sn(e,t.u_is_text),u_pitch_with_map:new Sn(e,t.u_pitch_with_map),u_is_along_line:new Sn(e,t.u_is_along_line),u_is_variable_anchor:new Sn(e,t.u_is_variable_anchor),u_texsize:new xa(e,t.u_texsize),u_texture:new Sn(e,t.u_texture),u_translation:new xa(e,t.u_translation),u_pitched_scale:new Ni(e,t.u_pitched_scale),u_is_offset:new Sn(e,t.u_is_offset),u_height_anchor_ground:new Sn(e,t.u_height_anchor_ground)}),ySr=(e,t)=>({u_is_size_zoom_constant:new Sn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new Sn(e,t.u_is_size_feature_constant),u_size_t:new Ni(e,t.u_size_t),u_size:new Ni(e,t.u_size),u_rotate_symbol:new Sn(e,t.u_rotate_symbol),u_label_plane_matrix:new fp(e,t.u_label_plane_matrix),u_coord_matrix:new fp(e,t.u_coord_matrix),u_is_text:new Sn(e,t.u_is_text),u_pitch_with_map:new Sn(e,t.u_pitch_with_map),u_is_along_line:new Sn(e,t.u_is_along_line),u_is_variable_anchor:new Sn(e,t.u_is_variable_anchor),u_texsize:new xa(e,t.u_texsize),u_texture:new Sn(e,t.u_texture),u_gamma_scale:new Ni(e,t.u_gamma_scale),u_is_halo:new Sn(e,t.u_is_halo),u_is_plain:new Sn(e,t.u_is_plain),u_translation:new xa(e,t.u_translation),u_pitched_scale:new Ni(e,t.u_pitched_scale),u_is_offset:new Sn(e,t.u_is_offset),u_height_anchor_ground:new Sn(e,t.u_height_anchor_ground)}),xSr=(e,t)=>({u_is_size_zoom_constant:new Sn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new Sn(e,t.u_is_size_feature_constant),u_size_t:new Ni(e,t.u_size_t),u_size:new Ni(e,t.u_size),u_rotate_symbol:new Sn(e,t.u_rotate_symbol),u_label_plane_matrix:new fp(e,t.u_label_plane_matrix),u_coord_matrix:new fp(e,t.u_coord_matrix),u_is_text:new Sn(e,t.u_is_text),u_pitch_with_map:new Sn(e,t.u_pitch_with_map),u_is_along_line:new Sn(e,t.u_is_along_line),u_is_variable_anchor:new Sn(e,t.u_is_variable_anchor),u_texsize:new xa(e,t.u_texsize),u_texsize_icon:new xa(e,t.u_texsize_icon),u_texture:new Sn(e,t.u_texture),u_texture_icon:new Sn(e,t.u_texture_icon),u_gamma_scale:new Ni(e,t.u_gamma_scale),u_is_halo:new Sn(e,t.u_is_halo),u_translation:new xa(e,t.u_translation),u_pitched_scale:new Ni(e,t.u_pitched_scale),u_is_offset:new Sn(e,t.u_is_offset),u_height_anchor_ground:new Sn(e,t.u_height_anchor_ground)}),olt=(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d)=>({u_is_size_zoom_constant:+(e==="constant"||e==="source"),u_is_size_feature_constant:+(e==="constant"||e==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_rotate_symbol:+r,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+i,u_is_along_line:n,u_is_variable_anchor:a,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:h,u_is_offset:p,u_height_anchor_ground:+d}),slt=(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d,v)=>{let m=o.transform;return dn(olt(e,t,r,i,n,a,o,s,l,u,c,f,p,d,v),{u_gamma_scale:i?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_is_halo:+!!h,u_is_plain:1})},bSr=(e,t,r,i,n,a,o,s,l,u,c,f,h,p,d)=>dn(slt(e,t,r,i,n,a,o,s,l,u,!0,c,!0,h,p,d),{u_texsize_icon:f,u_texture_icon:1}),_Sr=(e,t)=>({u_opacity:new Ni(e,t.u_opacity),u_color:new $m(e,t.u_color)}),wSr=(e,t)=>({u_opacity:new Ni(e,t.u_opacity),u_image:new Sn(e,t.u_image),u_pattern_tl_a:new xa(e,t.u_pattern_tl_a),u_pattern_br_a:new xa(e,t.u_pattern_br_a),u_pattern_tl_b:new xa(e,t.u_pattern_tl_b),u_pattern_br_b:new xa(e,t.u_pattern_br_b),u_texsize:new xa(e,t.u_texsize),u_mix:new Ni(e,t.u_mix),u_pattern_size_a:new xa(e,t.u_pattern_size_a),u_pattern_size_b:new xa(e,t.u_pattern_size_b),u_scale_a:new Ni(e,t.u_scale_a),u_scale_b:new Ni(e,t.u_scale_b),u_pixel_coord_upper:new xa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new xa(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new Ni(e,t.u_tile_units_to_pixels)}),TSr=(e,t)=>({u_opacity:e,u_color:t}),ASr=(e,t,r,i,n)=>dn(BMr(r,n,t,i),{u_opacity:e}),MSr=(e,t)=>({u_sun_pos:new Gf(e,t.u_sun_pos),u_atmosphere_blend:new Ni(e,t.u_atmosphere_blend),u_globe_position:new Gf(e,t.u_globe_position),u_globe_radius:new Ni(e,t.u_globe_radius),u_inv_proj_matrix:new fp(e,t.u_inv_proj_matrix)}),SSr=(e,t,r,i,n)=>({u_sun_pos:e,u_atmosphere_blend:t,u_globe_position:r,u_globe_radius:i,u_inv_proj_matrix:n}),ESr=(e,t)=>({u_sky_color:new $m(e,t.u_sky_color),u_horizon_color:new $m(e,t.u_horizon_color),u_horizon:new xa(e,t.u_horizon),u_horizon_normal:new xa(e,t.u_horizon_normal),u_sky_horizon_blend:new Ni(e,t.u_sky_horizon_blend),u_sky_blend:new Ni(e,t.u_sky_blend),u_inv_proj_matrix:new fp(e,t.u_inv_proj_matrix),u_globe_position:new Gf(e,t.u_globe_position),u_globe_radius:new Ni(e,t.u_globe_radius),u_atmosphere_blend:new Ni(e,t.u_atmosphere_blend)}),kSr=(e,t,r)=>{let i=Math.cos(t.rollInRadians),n=Math.sin(t.rollInRadians),a=e6(t),o=t.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition,s=Hst(t),l=s6(t.worldSize,t.center.lat);return{u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(t.width/2-a*n)*r,(t.height/2+a*i)*r],u_horizon_normal:[-n,i],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*t.height/2*r,u_sky_blend:o,u_inv_proj_matrix:t.inverseProjectionMatrix,u_globe_position:s,u_globe_radius:l,u_atmosphere_blend:e.properties.get("atmosphere-blend")*jst(cp(s)-l,l)}},Hq=(e,t)=>({}),CSr={fillExtrusion:qMr,fillExtrusionPattern:OMr,fill:UMr,fillPattern:VMr,fillOutline:GMr,fillOutlinePattern:HMr,circle:YMr,collisionBox:Hq,collisionCircle:Hq,debug:ZMr,depth:Hq,clippingMask:Hq,heatmap:KMr,heatmapTexture:JMr,hillshade:QMr,hillshadePrepare:eSr,colorRelief:nSr,line:oSr,lineGradient:sSr,linePattern:lSr,lineSDF:uSr,lineGradientSDF:cSr,layerOpacity:vSr,raster:j6r,symbolIcon:mSr,symbolSDF:ySr,symbolTextAndIcon:xSr,background:_Sr,backgroundPattern:wSr,terrain:AMr,terrainDepth:MMr,atmosphere:MSr,sky:ESr},DSr=class{constructor(e,t,r){this.context=e;let i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},Rot={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},FSr=class{constructor(e,t,r,i){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=i,this.context=e;let n=e.gl;this.buffer=n.createBuffer(),e.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r of this.attributes){let i=t.attributes[r.name];i!==void 0&&e.enableVertexAttribArray(i.location)}}setVertexAttribPointers(e,t,r){for(let i of this.attributes){let n=t.attributes[i.name];if(n!==void 0){let a=i.offset+this.itemSize*(r||0);n.isInteger?e.vertexAttribIPointer(n.location,i.components,e[Rot[i.type]],this.itemSize,a):e.vertexAttribPointer(n.location,i.components,e[Rot[i.type]],!1,this.itemSize,a)}}}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},Vo=class{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}},LSr=class extends Vo{getDefault(){return aa.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},PSr=class extends Vo{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}},ISr=class extends Vo{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}},RSr=class extends Vo{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},zSr=class extends Vo{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}},BSr=class extends Vo{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}},qSr=class extends Vo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}},OSr=class extends Vo{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}},NSr=class extends Vo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}},USr=class extends Vo{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}},VSr=class extends Vo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}},GSr=class extends Vo{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}},HSr=class extends Vo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}},jSr=class extends Vo{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}},$Sr=class extends Vo{getDefault(){return aa.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},WSr=class extends Vo{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}},YSr=class extends Vo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}},XSr=class extends Vo{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}},ZSr=class extends Vo{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}},KSr=class extends Vo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}},JSr=class extends Vo{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}},QSr=class extends Vo{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},eEr=class extends Vo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},tEr=class extends Vo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},rEr=class extends Vo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},iEr=class extends Vo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},nEr=class extends Vo{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},aEr=class extends Vo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)}},oEr=class extends Vo{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},sEr=class extends Vo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},lEr=class extends Vo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},Boe=class extends Vo{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}},uEr=class extends Boe{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},cEr=class extends Boe{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},fEr=class extends Boe{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},hEr=class{constructor(e,t,r,i,n){this.context=e,this.width=t,this.height=r;let a=e.gl,o=this.framebuffer=a.createFramebuffer();if(this.colorAttachment=new uEr(e,o),i)this.depthAttachment=n?new fEr(e,o):new cEr(e,o);else if(n)throw Error("Stencil cannot be set without depth")}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let r=this.depthAttachment.get();r&&e.deleteRenderbuffer(r)}e.deleteFramebuffer(this.framebuffer)}},llt=Ioe([{name:"u_units_to_pixels",type:"vec2"},{name:"u_world_size",type:"vec2"},{name:"u_camera_to_center_distance",type:"float"},{name:"u_symbol_fade_change",type:"float"},{name:"u_aspect_ratio",type:"float"},{name:"u_device_pixel_ratio",type:"float"},{name:"u_viewport_size",type:"vec2"},{name:"u_pixel_extrude_scale",type:"vec2"},{name:"u_pitch",type:"float"}]),Y0=llt.offsets;Hl=class{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}};Hl.Replace=[1,0],Hl.disabled=new Hl(Hl.Replace,aa.transparent,[!1,!1,!1,!1]),Hl.unblended=new Hl(Hl.Replace,aa.transparent,[!0,!0,!0,!0]),Hl.alphaBlended=new Hl([1,771],aa.transparent,[!0,!0,!0,!0]);vEr=class{constructor(e){this.gl=e,this.clearColor=new LSr(this),this.clearDepth=new PSr(this),this.clearStencil=new ISr(this),this.colorMask=new RSr(this),this.depthMask=new zSr(this),this.stencilMask=new BSr(this),this.stencilFunc=new qSr(this),this.stencilOp=new OSr(this),this.stencilTest=new NSr(this),this.depthRange=new USr(this),this.depthTest=new VSr(this),this.depthFunc=new GSr(this),this.blend=new HSr(this),this.blendFunc=new jSr(this),this.blendColor=new $Sr(this),this.blendEquation=new WSr(this),this.cullFace=new YSr(this),this.cullFaceSide=new XSr(this),this.frontFace=new ZSr(this),this.program=new KSr(this),this.activeTexture=new JSr(this),this.viewport=new QSr(this),this.bindFramebuffer=new eEr(this),this.bindRenderbuffer=new tEr(this),this.bindTexture=new rEr(this),this.bindVertexBuffer=new iEr(this),this.bindElementBuffer=new nEr(this),this.bindVertexArray=new aEr(this),this.pixelStoreUnpack=new oEr(this),this.pixelStoreUnpackPremultiplyAlpha=new sEr(this),this.pixelStoreUnpackFlipY=new lEr(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),e.getExtension("EXT_color_buffer_half_float"),e.getExtension("EXT_color_buffer_float"),this.boundUniformBuffers=[],this.projectionUniformBuffer=Jst(this),this.keyedProjectionUniformBuffers=new Map,this.freeProjectionUniformBuffers=[],this.terrainUniformBuffer=PMr(this),this.frameUniformBuffer=dEr(this)}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,this.boundUniformBuffers=[]}setCustomLayerDefaults(){this.unbindVAO(),this.cullFace.setDefault(),this.activeTexture.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}createIndexBuffer(e,t){return new DSr(this,e,t)}createVertexBuffer(e,t,r){return new FSr(this,e,t,r)}createRenderbuffer(e,t,r){let i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,e,t,r),this.bindRenderbuffer.set(null),n}createFramebuffer(e,t,r,i){return new hEr(this,e,t,r,i)}clear({color:e,depth:t,stencil:r}){let i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),t!==void 0&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),r!==void 0&&(n|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(n)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func===this.gl.ALWAYS&&!e.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range))}setStencilMode(e){e.test.func===this.gl.ALWAYS&&!e.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask}))}setColorMode(e){Fv(e.blendFunction,Hl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){return this.gl.createVertexArray()}deleteVertexArray(e){this.gl.deleteVertexArray(e)}unbindVAO(){this.bindVertexArray.set(null)}},Ua=class{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}};Ua.ReadOnly=!1,Ua.ReadWrite=!0,Ua.disabled=new Ua(519,Ua.ReadOnly,[0,1]);Hae=7680,Ro=class{constructor(e,t,r,i,n,a){this.test=e,this.ref=t,this.mask=r,this.fail=i,this.depthFail=n,this.pass=a}};Ro.disabled=new Ro({func:519,mask:0},0,0,Hae,Hae,Hae);zot=1029,jae=2305,Eo=class{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}};Eo.disabled=new Eo(!1,zot,jae),Eo.backCCW=new Eo(!0,zot,jae),Eo.frontCCW=new Eo(!0,1028,jae);yEr=up(new Float32Array(16));Yae=0;Zae=[new rr(0,0),new rr(qr,0),new rr(qr,qr),new rr(0,qr)];YEr=new aa(1,0,0,1),XEr=new aa(0,1,0,1),ZEr=new aa(0,0,1,1),KEr=new aa(1,0,1,1),JEr=new aa(0,1,1,1);fkr={symbol:xEr,circle:MEr,heatmap:SEr,line:BEr,fill:qEr,fillExtrusion:OEr,hillshade:NEr,colorRelief:VEr,raster:GEr,background:WEr,sky:lkr,atmosphere:ckr,custom:akr,debug:tkr,debugPadding:QEr,terrainDepth:okr},hkr=(A3=class{constructor(t,r){this.drawFunctions=fkr,this.context=new vEr(t),this.transform=r,this.layerOpacityFbo=null,this._tileTextures={},this._rttObjectRecyclePool=[],this._rttSharedFbo=null,this.terrainFacilitator={depthDirty:!0,matrix:up(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ooe.maxOverzooming+ooe.maxUnderzooming+1,this.depthEpsilon=1/2**16,this.crossTileSymbolIndex=new Lst}resize(t,r,i){if(this.width=Math.round(t*i),this.height=Math.round(r*i),this.pixelRatio=i,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let n of this.style._order)this.style._layers[n].resize()}setup(){let t=this.context,r=new Hm;r.emplaceBack(0,0),r.emplaceBack(qr,0),r.emplaceBack(0,qr),r.emplaceBack(qr,qr),this.tileExtentBuffer=t.createVertexBuffer(r,T3.members),this.tileExtentSegments=Js.simpleSegment(0,0,4,2);let i=new Hm;i.emplaceBack(0,0),i.emplaceBack(qr,0),i.emplaceBack(0,qr),i.emplaceBack(qr,qr),this.debugBuffer=t.createVertexBuffer(i,T3.members),this.debugSegments=Js.simpleSegment(0,0,4,5);let n=new jit;n.emplaceBack(0,0,0,0),n.emplaceBack(qr,0,qr,0),n.emplaceBack(0,qr,0,qr),n.emplaceBack(qr,qr,qr,qr),this.rasterBoundsBuffer=t.createVertexBuffer(n,_Mr.members),this.rasterBoundsSegments=Js.simpleSegment(0,0,4,2);let a=new Hm;a.emplaceBack(0,0),a.emplaceBack(qr,0),a.emplaceBack(0,qr),a.emplaceBack(qr,qr),this.rasterBoundsBufferPosOnly=t.createVertexBuffer(a,T3.members),this.rasterBoundsSegmentsPosOnly=Js.simpleSegment(0,0,4,5);let o=new Hm;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,T3.members),this.viewportSegments=Js.simpleSegment(0,0,4,2);let s=new Yit;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(s);let l=new zv;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(l);let u=this.context.gl;this.stencilClearMode=new Ro({func:u.ALWAYS,mask:0},0,255,u.ZERO,u.ZERO,u.ZERO),this.tileExtentMesh=new e8(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let t=this.context,r=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=Om();Pv(i,0,this.width,this.height,0,0,1),Nc(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]);let n={mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i,clipAntimeridian:!1};this.useProgram("clippingMask",null,!0).draw(t,r.TRIANGLES,Ua.disabled,this.stencilClearMode,Hl.disabled,Eo.disabled,null,null,n,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}renderTileClippingMasks(t,r){if(this.currentStencilSource===t.source||!t.isTileClipped()||!(r!=null&&r.length))return;this.currentStencilSource=t.source,this.nextStencilID+r.length>256&&this.clearStencil();let i=this.context;i.setColorMode(Hl.disabled),i.setDepthMode(Ua.disabled);let n={};for(let a of r)n[a.key]=this.nextStencilID++;this.style.projection.useSubdivision&&this._renderTileMasks(n,r,!0),this._renderTileMasks(n,r,!1),this._tileClippingMaskIDs=n}_renderTileMasks(t,r,i){let n=this.context,a=n.gl,o=this.style.projection,s=this.renderContext,l=this.useProgram("clippingMask");for(let u of r){let c=t[u.key],f=yh(s,u),h=o.getMeshFromTileID(this.context,u.canonical,i,!0,"stencil"),p=vf(s,u);l.draw(n,a.TRIANGLES,Ua.disabled,new Ro({func:a.ALWAYS,mask:0},c,255,a.KEEP,a.KEEP,a.REPLACE),Hl.disabled,s.isRenderingToTexture?Eo.disabled:Eo.backCCW,null,f,p,"$clipping",h.vertexBuffer,h.indexBuffer,h.segments)}}_renderTilesDepthBuffer(){let t=this.context,r=t.gl,i=this.style.projection,n=this.transform,a=this.useProgram("depth"),o=this.getDepthModeFor3D(),s=u6(n,{tileSize:n.tileSize});for(let l of s){let u=yh(this.renderContext,l),c=i.getMeshFromTileID(this.context,l.canonical,!0,!0,"raster"),f=vf(this.renderContext,l);a.draw(t,r.TRIANGLES,o,Ro.disabled,Hl.disabled,Eo.backCCW,null,u,f,"$clipping",c.vertexBuffer,c.indexBuffer,c.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let t=this.nextStencilID++,r=this.context.gl;return new Ro({func:r.NOTEQUAL,mask:255},t,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(t){let r=this.context.gl;return new Ro({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(t){let r=this.context.gl,i=t.sort((o,s)=>s.overscaledZ-o.overscaledZ),n=i[i.length-1].overscaledZ,a=i[0].overscaledZ-n+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();let o={};for(let s=0;ss.overscaledZ-o.overscaledZ),n=i[i.length-1].overscaledZ,a=i[0].overscaledZ-n+1;if(this.clearStencil(),a>1){let o={},s={};for(let l=0;l=0;i.currentLayer--){let h=this.style._layers[n[i.currentLayer]];if(h.isHidden(this.transform.zoom))continue;let p=a[h.source],d=o[h.source];this.renderTileClippingMasks(h,d),this.renderLayer(this,p,h,d,i)}i.currentPass="translucent";let u=!1;for(i.currentLayer=0;i.currentLayer0?r.pop():null}acquireRTT(t){let r=this.context.gl,i=this._rttObjectRecyclePool.pop();if(i)return i.size!==t&&(i.texture.update({width:t,height:t,data:null},{premultiply:!1,useMipmap:!0}),i.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),i.size=t),i;let n=new Tu(this.context,{width:t,height:t,data:null},r.RGBA,{premultiply:!1,useMipmap:!0});return n.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),{texture:n,size:t}}bindRTT(t){let r=this.context.gl,i=t.size;if(!this._rttSharedFbo){let n=this.context.createFramebuffer(i,i,!0,!0),a=this.context.createRenderbuffer(r.DEPTH_STENCIL,i,i);n.depthAttachment.set(a),this._rttSharedFbo={fbo:n,depthRenderbuffer:a,size:i}}this._rttSharedFbo.size!==i&&(this.context.bindRenderbuffer.set(this._rttSharedFbo.depthRenderbuffer),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,i,i),this.context.bindRenderbuffer.set(null),this._rttSharedFbo.fbo.width=i,this._rttSharedFbo.fbo.height=i,this._rttSharedFbo.size=i),this._rttSharedFbo.fbo.colorAttachment.set(t.texture.texture),this.context.bindFramebuffer.set(this._rttSharedFbo.fbo.framebuffer)}releaseRTT(t){this._rttObjectRecyclePool.push(t)}clearRTTPool(){for(let t of this._rttObjectRecyclePool)t.texture.destroy();this._rttObjectRecyclePool.length=0}destroyRTTResources(){if(this.clearRTTPool(),!this._rttSharedFbo)return;this._rttSharedFbo.fbo.colorAttachment.set(null),this._rttSharedFbo.fbo.depthAttachment.set(null);let t=this.context.gl;t.deleteRenderbuffer(this._rttSharedFbo.depthRenderbuffer),t.deleteFramebuffer(this._rttSharedFbo.fbo.framebuffer),this._rttSharedFbo=null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;let r=this.patternAtlas.getPattern(t.from.toString()),i=this.patternAtlas.getPattern(t.to.toString());return!r||!i}useProgram(t,r,i=!1,n=[]){var v;this.cache||(this.cache={});let a=!!this.style.map.terrain,o=this.style.projection,s=i?dg.projectionMercator:o.shaderPreludeCode,l=i?Pst:o.shaderDefine,u=`/${i?Ist:o.shaderVariantName}`,c=r?r.cacheKey:"",f=this._showOverdrawInspector?"/overdraw":"",h=a?"/terrain":"",p=n?`/${n.join("/")}`:"",d=t+c+u+f+h+p;return(v=this.cache)[d]||(v[d]=new zMr(this.context,dg[t],r,CSr[t],this._showOverdrawInspector,a,s,l,n)),this.cache[d]}setCustomLayerDefaults(){this.context.setCustomLayerDefaults()}setBaseState(){let t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;let t=this.context.gl;this.debugOverlayTexture=new Tu(this.context,this.debugOverlayCanvas,t.RGBA)}}destroy(){var t,r,i;if(this._tileTextures){for(let n in this._tileTextures){let a=this._tileTextures[n];if(a)for(let o of a)o.destroy()}this._tileTextures={}}if(this.destroyRTTResources(),(t=this.layerOpacityFbo)==null||t.destroy(),this.layerOpacityFbo=null,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&&((r=this.tileExtentMesh.vertexBuffer)==null||r.destroy()),this.tileExtentMesh&&((i=this.tileExtentMesh.indexBuffer)==null||i.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),LMr(this.context),this.context.terrainUniformBuffer.destroy(),this.context.frameUniformBuffer.destroy(),this.cache){for(let n in this.cache){let a=this.cache[n];a!=null&&a.program&&this.context.gl.deleteProgram(a.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:t,drawingBufferHeight:r}=this.context.gl;return this.width!==t||this.height!==r}},A3.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50,A3),mlt=class extends Error{constructor(e,t){var r;super("WebGL2 is required to display this map. We are sorry, but it seems that your browser does not support WebGL2, a technology for rendering 3D graphics on the web. Read more on https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL"),this.name="GPUInitializationError",this.requestedAttributes=e,this.statusMessage=(r=t==null?void 0:t.statusMessage)!=null?r:null}};ylt=class{constructor(e){this._getHashParams=()=>new URLSearchParams(window.location.hash.replace("#","")),this._getCurrentHash=()=>{var r;let t=this._getHashParams();return this._hashName?(t.get(this._hashName)||"").split("/"):((r=[...t.keys()][0])!=null?r:"").split("/")},this._onHashChange=()=>{let t=this._getCurrentHash();if(!this._isValidHash(t))return!1;let r=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:r,pitch:+(t[4]||0)}),!0},this._updateHashUnthrottled=()=>{let t=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,t)},this._removeHash=()=>{let t=this._getHashParams();if(this._hashName)t.delete(this._hashName);else{let a=Array.from(t.keys());a.length>0&&t.delete(a[0])}let r=decodeURIComponent(t.toString()).replace(/=&/g,"&").replace(/=$/g,""),i=r?`#${r}`:"",n=window.location.href.replace(/(#.+)?$/,i);n=n.replace("&&","&"),window.history.replaceState(window.history.state,null,n)},this._updateHash=Ooe(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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(e){let t=this._map.getCenter(),r=Math.round(this._map.getZoom()*100)/100,i=10**Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),n=Math.round(t.lng*i)/i,a=Math.round(t.lat*i)/i,o=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${n}/${a}/${r}`:`${r}/${a}/${n}`,(o||s)&&(l+=`/${Math.round(o*10)/10}`),s&&(l+=`/${Math.round(s)}`),this._hashName){let u=this._getHashParams();return u.set(this._hashName,l),`#${decodeURIComponent(u.toString()).replace(/=&/g,"&").replace(/=$/g,"")}`}return`#${l}`}_isValidHash(e){if(e.length<3||e.some(n=>isNaN(+n)))return!1;try{new yn(+e[2],+e[1])}catch(n){return!1}let t=+e[0],r=+(e[3]||0),i=+(e[4]||0);return t>=this._map.getMinZoom()&&t<=this._map.getMaxZoom()&&r>=-180&&r<=180&&i>=this._map.getMinPitch()&&i<=this._map.getMaxPitch()}},t8={linearity:.3,easing:KB(0,0,.3,1)},dkr=dn({deceleration:2500,maxSpeed:1400},t8),pkr=dn({deceleration:20,maxSpeed:1400},t8),vkr=dn({deceleration:1e3,maxSpeed:360},t8),gkr=dn({deceleration:1e3,maxSpeed:90},t8),mkr=dn({deceleration:1e3,maxSpeed:360},t8),ykr=class{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:zo(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=zo();for(;e.length>0&&t-e[0].time>160;)e.shift()}_getVelocityEntries(){let e=this._inertiaBuffer,t=zo()-60,r=Math.max(0,e.length-2);for(;r>0&&e[r-1].time>=t;)r--;return e.slice(r)}_onMoveEnd(e){this._drainInertiaBuffer();let t=this._getVelocityEntries();if(t.length<2){this.clear();return}let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new rr(0,0),pinchAround:void 0,around:void 0};for(let{settings:a}of t)a.around&&(r.around=a.around),a.pinchAround&&(r.pinchAround=a.pinchAround);for(let{settings:a}of t.slice(1))r.zoom+=a.zoomDelta||0,r.bearing+=a.bearingDelta||0,r.pitch+=a.pitchDelta||0,r.roll+=a.rollDelta||0,a.panDelta&&r.pan._add(a.panDelta);if(!r.pan.mag()&&!r.zoom&&!r.bearing&&!r.pitch&&!r.roll){this.clear();return}let i=zo()-t[0].time,n={};if(r.pan.mag()){let a=WC(r.pan.mag(),i,dn({},dkr,e||{})),o=r.pan.mult(a.amount/r.pan.mag()),s=this._map._camera.cameraHelper.handlePanInertia(o,this._map._camera.transform);n.center=s.easingCenter,n.offset=s.easingOffset,$C(n,a)}if(r.zoom){let a=WC(r.zoom,i,pkr);n.zoom=n0(this._map.getZoom()+a.amount,this._map.getZoomSnap(),a.amount),$C(n,a)}if(r.bearing){let a=WC(r.bearing,i,vkr);n.bearing=this._map.getBearing()+ea(a.amount,-179,179),$C(n,a)}if(r.pitch){let a=WC(r.pitch,i,gkr);n.pitch=this._map.getPitch()+a.amount,$C(n,a)}if(r.roll){let a=WC(r.roll,i,mkr);n.roll=this._map.getRoll()+ea(a.amount,-179,179),$C(n,a)}if(n.zoom||n.bearing){let a=r.pinchAround===void 0?r.around:r.pinchAround;n.around=a?this._map.unproject(a):this._map.getCenter()}return this.clear(),dn(n,{noMoveStart:!0})}};xkr=class{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new est(this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new s0(e.type,this._map,e))}mouseup(e){this._map.fire(new s0(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new s0(e.type,this._map,e))}dblclick(e){return this._firePreventable(new s0(e.type,this._map,e))}mouseover(e){this._map.fire(new s0(e.type,this._map,e))}mouseout(e){this._map.fire(new s0(e.type,this._map,e))}touchstart(e){return this._firePreventable(new ZC(e.type,this._map,e))}touchmove(e){this._map.fire(new ZC(e.type,this._map,e))}touchend(e){this._map.fire(new ZC(e.type,this._map,e))}touchcancel(e){this._map.fire(new ZC(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},bkr=class{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent,this._clearLongPress(),this._touchActive=!1}mousemove(e){this._map.fire(new s0(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new s0("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}touchstart(e,t,r){if(this._clearLongPress(),this._touchActive=r.length>0,r.length!==1)return;this._longPressStart=t[0];let i=r[0];this._longPressTimer=setTimeout(()=>{this._longPressTimer=void 0;let n=new MouseEvent("contextmenu",{clientX:i.clientX,clientY:i.clientY,button:2,bubbles:!0,cancelable:!0});this._map.fire(new s0("contextmenu",this._map,n))},500)}touchmove(e,t,r){this._longPressTimer&&(r.length!==1||!this._longPressStart||t[0].dist(this._longPressStart)>this._clickTolerance)&&this._clearLongPress()}touchend(){this._touchActive=!1,this._clearLongPress()}touchcancel(){this._touchActive=!1,this._clearLongPress()}_clearLongPress(){this._longPressTimer&&(this._longPressTimer=(clearTimeout(this._longPressTimer),void 0)),this._longPressStart=void 0}contextmenu(e){if(this._touchActive){e.preventDefault();return}this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new s0(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},xlt=class{constructor(e,t,r){this._map=e,this._tr=r,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&typeof t.boxZoom=="object"&&(this._boxZoomEnd=t.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&e.button===0&&(Xn.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;let r=t;if(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)n.fitScreenCoordinates(r,i,this._tr.bearing,{linear:!0})}}}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box=(this._box.remove(),null)),Xn.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,t){return this._map.fire(new toe(e,{originalEvent:t}))}};wkr=class{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,t,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=_kr(t),this.touches=poe(r,t)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let i=poe(r,t);for(let n in this.touches){let a=this.touches[n],o=i[n];(!o||o.dist(a)>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),r.length===0){let i=!this.aborted&&this.centroid;if(this.reset(),i)return i}}},voe=class{constructor(e){this.singleTap=new wkr(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let i=this.singleTap.touchend(e,t,r);if(i){let n=e.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(i)<30;if((!n||!a)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}},Tkr=class{constructor(e,t){this._tr=t,this._zoomIn=new voe({numTouches:1,numTaps:2}),this._zoomOut=new voe({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,t,r){let i=this._zoomIn.touchend(e,t,r),n=this._zoomOut.touchend(e,t,r),a=this._tr;if(i)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:o=>o.easeTo({duration:300,zoom:n0(a.zoom+1,o.getZoomSnap()),around:a.transform.isPointOnMapSurface(i)?a.unproject(i):void 0},{originalEvent:e})};if(n)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:o=>o.easeTo({duration:300,zoom:n0(a.zoom-1,o.getZoomSnap()),around:a.transform.isPointOnMapSurface(n)?a.unproject(n):void 0},{originalEvent:e})}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},r8=class{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e)){this.reset(e);return}let i=Array.isArray(t)?t[0]:t;if(!(!this._moved&&i.dist(r)!0}),t=new Skr){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,r){if(e instanceof MouseEvent)return t(e);if(typeof TouchEvent<"u"&&e instanceof TouchEvent)return r(e)}startMove(e){this._executeRelevantHandler(e,t=>{this.mouseMoveStateManager.startMove(t)},t=>{this.oneFingerTouchMoveStateManager.startMove(t)})}endMove(e){this._executeRelevantHandler(e,t=>{this.mouseMoveStateManager.endMove(t)},t=>{this.oneFingerTouchMoveStateManager.endMove(t)})}isValidStartEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidStartEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidStartEvent(t))}isValidMoveEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidMoveEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(t))}isValidEndEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidEndEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidEndEvent(t))}},dO=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=t=>{t.preventDefault()}};Lkr=class{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new rr(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(this._shouldBePrevented(r.length)){this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e);return}return e.preventDefault(),this._calculateTransform(e,t,r)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,t,r){r.length>0&&(this._active=!0);let i=poe(r,t),n=new rr(0,0),a=new rr(0,0),o=0;for(let l in i){let u=i[l],c=this._touches[l];c&&(n._add(u),a._add(u.sub(c)),o++,i[l]=u)}if(this._touches=i,this._shouldBePrevented(o)||!a.mag())return;let s=a.div(o);if(this._sum._add(s),!(this._sum.mag()=2,n=t.mag()>=2;if(!i&&!n)return;if(!i||!n)return this._firstMove===void 0&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return Kae(e)&&Kae(t)&&a}},Pkr={panStep:100,bearingStep:15,pitchStep:10},Tlt=class{constructor(e,t){this._tr=t;let r=Pkr;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,i=0,n=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),n=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),n=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,i=0),{cameraAnimation:o=>{let s=this._tr;o.easeTo({duration:300,easeId:"keyboardHandler",easing:Ikr,zoom:t?n0(s.zoom+t*(e.shiftKey?2:1),o.getZoomSnap()):s.zoom,bearing:s.bearing+r*this._bearingStep,pitch:s.pitch+i*this._pitchStep,offset:[-n*this._panStep,-a*this._panStep],center:s.center},{originalEvent:e})}}}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}};Wot=4.000244140625,Alt=class{constructor(e,t,r){this._onTimeout=i=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(i)},this._map=e,this._tr=r,this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return this._map.cooperativeGestures.isEnabled()?!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e)):!1}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e)){this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);return}let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?e.deltaY*40:e.deltaY,r=zo(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,t!==0&&t%Wot==0?this._type="wheel":t!==0&&Math.abs(t)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*t)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let t=Xn.mousePos(this._map.getCanvas(),e),r=this._tr;this._aroundPoint=this._aroundCenter?r.transform.locationToScreenPoint(yn.convert(r.center)):t,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let o=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=o),typeof this._targetZoom=="number"&&(this._targetZoom+=o)}if(this._delta!==0){let o=this._type==="wheel"&&Math.abs(this._delta)>Wot?this._wheelZoomRate:this._defaultZoomRate,s=2/(1+Math.exp(-Math.abs(this._delta*o)));this._delta<0&&s!==0&&(s=1/s);let l=typeof this._targetZoom=="number"?Vf(this._targetZoom):e.scale,u=e.applyConstrain(e.getCameraLngLat(),Vc(l*s)).zoom,c=this._map.getZoomSnap();if(this._type==="wheel"&&c>0){let f=n0(e.zoom,c);this._targetZoom=n0(u,c,u-f)}else this._targetZoom=u;this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let t=typeof this._targetZoom=="number"?this._targetZoom:e.zoom,r=this._startZoom,i=this._easing,n=!1,a;if(this._type==="wheel"&&r&&i){let o=zo()-this._lastWheelEventTime,s=Math.min((o+5)/200,1),l=i(s);a=Ks.number(r,t,l),s<1?this._needsRerender=!0:n=!0}else a=t,n=!0;return this._active=!0,n&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=a,{noInertia:!0,needsRenderFrame:!n,zoomDelta:a-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let t=JB;if(this._prevEase){let r=this._prevEase,i=(zo()-r.start)/r.duration,n=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(n*n+1e-4)*.01,o=Math.sqrt(.0729-a*a);t=KB(a,o,.25,1)}return this._prevEase={start:zo(),duration:e,easing:t},t}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}},Mlt=class{constructor(e,t){this._clickZoom=e,this._tapZoom=t}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()}},Rkr=class{constructor(e,t){this._tr=t,this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:n0(this._tr.zoom+(e.shiftKey?-1:1),r.getZoomSnap()),around:this._tr.transform.isPointOnMapSurface(t)?this._tr.unproject(t):void 0},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},zkr=class{constructor(){this._tap=new voe({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=e!=null?e:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,r){if(!this._swipePoint)if(!this._tapTime)this._tap.touchstart(e,t,r);else{let i=t[0],n=e.timeStamp-this._tapTime<500,a=this._tapPoint.dist(i)<30;!n||!a?this.reset():r.length>0&&(this._swipePoint=i,this._swipeTouch=r[0].identifier)}}touchmove(e,t,r){if(!this._tapTime)this._tap.touchmove(e,t,r);else if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let i=t[0],n=i.y-this._swipePoint.y;return this._swipePoint=i,e.preventDefault(),this._active=!0,{zoomDelta:n/128*this._zoomRate}}}touchend(e,t,r){if(this._tapTime)this._swipePoint&&r.length===0&&this.reset();else{let i=this._tap.touchend(e,t,r);i&&(this._tapTime=e.timeStamp,this._tapPoint=i)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},Slt=class{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},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()}},Elt=class{constructor(e,t,r,i){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=r,this._mouseRoll=i}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()}},klt=class{constructor(e,t,r,i){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),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(e){this._touchZoom.setZoomRate(e),this._tapDragZoom.setZoomRate(e)}setZoomThreshold(e){this._touchZoom.setZoomThreshold(e)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}},Clt=class{constructor(e,t){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=Xn.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),i=document.createElement("div");i.className="maplibregl-desktop-message",i.textContent=t,this._container.appendChild(i);let n=document.createElement("div");n.className="maplibregl-mobile-message",n.textContent=r,this._container.appendChild(n),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(e){return e[this._bypassKey]}notifyGestureBlocked(e,t){this._enabled&&(this._map.fire(new vc("cooperativegestureprevented",{gestureType:e,originalEvent:t})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}},Bkr=class{constructor(e){this._camera=e}get transform(){return this._camera._requestedCameraState||this._camera.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(e){return this.transform.screenPointToLocation(rr.convert(e),this._camera.terrain)}},Yq=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate,qkr=class extends o0{};Okr=class{get _ownerDocument(){var e;return((e=this._el)==null?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,t;return((t=(e=this._el)==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}constructor(e,t,r){this._terrainGesture={inFlight:!1,anchorElevation:null},this.handleWindowEvent=n=>{this.handleEvent(n,`${n.type}Window`)},this.handleEvent=(n,a)=>{if(n.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;let o=n.type==="renderFrame"?void 0:n,s={needsRenderFrame:!1},l={},u={};for(let{handlerName:h,handler:p,allowed:d}of this._handlers){if(!p.isEnabled())continue;let v;if(this._blockedByActive(u,d,h))p.reset();else if(p[a||n.type]){if(nrt(n,a||n.type)){let m=Xn.mousePos(this._map.getCanvas(),n);v=p[a||n.type](n,m)}else if(irt(n,a||n.type)){let m=n.touches,g=this._getMapTouches(m),w=Xn.touchPos(this._map.getCanvas(),g);v=p[a||n.type](n,w,g)}else art(a||n.type)||(v=p[a||n.type](n));this.mergeHandlerResult(s,l,v,h,o),v!=null&&v.needsRenderFrame&&this._triggerRenderFrame()}(v||p.isActive())&&(u[h]=p)}let c={};for(let h in this._previousActiveHandlers)u[h]||(c[h]=o);this._previousActiveHandlers=u,(Object.keys(c).length||Jae(s))&&(this._changes.push([s,l,c]),this._triggerRenderFrame()),(Object.keys(u).length||Jae(s))&&this._camera.stop(!0),this._updatingCamera=!1;let{cameraAnimation:f}=s;f&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],f(this._map))},this._map=e,this._camera=t,this._transformProvider=new Bkr(this._camera),this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ykr(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[n,a,o]of this._listeners)n.addEventListener(a,n===this._ownerDocument?this.handleWindowEvent:this.handleEvent,o)}destroy(){for(let[e,t,r]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new xkr(t,e));let i=t.boxZoom=new xlt(t,e,this._transformProvider);this._add("boxZoom",i),e.interactive&&e.boxZoom&&i.enable();let n=t.cooperativeGestures=new Clt(t,e.cooperativeGestures);this._add("cooperativeGestures",n),e.cooperativeGestures&&n.enable();let a=new Tkr(t,this._transformProvider),o=new Rkr(t,this._transformProvider);t.doubleClickZoom=new Mlt(o,a),this._add("tapZoom",a),this._add("clickZoom",o),e.interactive&&e.doubleClickZoom&&t.doubleClickZoom.enable();let s=new zkr;this._add("tapDragZoom",s);let l=t.touchPitch=new wlt(t);this._add("touchPitch",l),e.interactive&&e.touchPitch&&t.touchPitch.enable(e.touchPitch);let u=()=>this._camera.transform.centerPoint,c=Ckr(e,u),f=Dkr(e),h=Fkr(e,u);t.dragRotate=new Elt(e,c,f,h),this._add("mouseRotate",c,["mousePitch"]),this._add("mousePitch",f,["mouseRotate","mouseRoll"]),this._add("mouseRoll",h,["mousePitch"]),e.interactive&&e.dragRotate&&t.dragRotate.enable();let p=kkr(e),d=new Lkr(e,t);t.dragPan=new Slt(r,p,d),this._add("mousePan",p),this._add("touchPan",d,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&t.dragPan.enable(e.dragPan);let v=new _lt,m=new blt;t.touchZoomRotate=new klt(r,m,v,s),this._add("touchRotate",v,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&t.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new bkr(t,e),["touchPan"]);let g=t.scrollZoom=new Alt(t,()=>this._triggerRenderFrame(),this._transformProvider);this._add("scrollZoom",g,["mousePan"]),e.interactive&&e.scrollZoom&&t.scrollZoom.enable(e.scrollZoom);let w=t.keyboard=new Tlt(t,this._transformProvider);this._add("keyboard",w),e.interactive&&e.keyboard&&t.keyboard.enable()}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:t}of this._handlers)t.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Yq(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let i in e)if(i!==r&&!(t!=null&&t.includes(i)))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e){let i=r.target;this._el.contains(i)&&t.push(r)}return t}mergeHandlerResult(e,t,r,i,n){if(!r)return;dn(e,r);let a={handlerName:i,originalEvent:r.originalEvent||n};r.zoomDelta!==void 0&&(t.zoom=a),r.panDelta!==void 0&&(t.drag=a),r.rollDelta!==void 0&&(t.roll=a),r.pitchDelta!==void 0&&(t.pitch=a),r.bearingDelta!==void 0&&(t.rotate=a)}_applyChanges(){let e={},t={},r={};for(let[i,n,a]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new rr(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),i.rollDelta&&(e.rollDelta=(e.rollDelta||0)+i.rollDelta),i.around!==void 0&&(e.around=i.around),i.pinchAround!==void 0&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),dn(t,n),dn(r,a);this._updateMapTransform(e,t,r),this._changes=[]}_updateMapTransform(e,t,r){let i=this._map.terrain;if(!Jae(e)){this._fireEvents(t,r,!0);return}let n=this._camera.getTransformForUpdate();this._camera.stop(!0);let{panDelta:a,zoomDelta:o,bearingDelta:s,pitchDelta:l,rollDelta:u}=e,{around:c,aroundOnSurface:f}=this._resolveAround(e,i,n),h=i?this._terrainGestureElevation(i,c,f,n,t):void 0,p={panDelta:a,zoomDelta:o,rollDelta:u,pitchDelta:l,bearingDelta:s,around:c,aroundElevation:h};this._camera.cameraHelper.useGlobeControls&&!n.isPointOnMapSurface(c)&&(c=n.centerPoint);let d=this._computePreZoomAroundLoc(n,c,a,h);this._handleMapControls({terrain:i,tr:n,deltasForHelper:p,preZoomAroundLoc:d,combinedEventsInProgress:t,panDelta:a}),this._camera.applyUpdatedTransform(n),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_resolveAround(e,t,r){let i=e.pinchAround===void 0?e.around:e.pinchAround;return i||(i=this._camera.transform.centerPoint),t&&!r.isPointOnMapSurface(i)?{around:r.centerPoint,aroundOnSurface:!1}:{around:i,aroundOnSurface:!0}}_terrainGestureElevation(e,t,r,i,n){if(!r)return;if(this._terrainGesture.anchorElevation===null&&(n.drag||n.zoom)){let o=i.screenTerrainPointToMercatorCoordinate(t,e);this._terrainGesture.anchorElevation=o?o.z:void 0}let a=this._terrainGesture.anchorElevation;if(a!=null&&!(t.distSqr(i.centerPoint)<.01)&&!(a-i.elevation>=.9*(i.getCameraAltitude()-i.elevation)))return a}_computePreZoomAroundLoc(e,t,r,i){if(t.distSqr(e.centerPoint)<.01)return e.center;let n=r?t.sub(r):t;return i===void 0?e.screenPointToLocation(n):e.screenPointToLocationAtElevation(n,i)}_handleMapControls({terrain:e,tr:t,deltasForHelper:r,preZoomAroundLoc:i,combinedEventsInProgress:n,panDelta:a}){let o=this._camera.cameraHelper;if(o.handleMapControlsRollPitchBearingZoom(r,t),!e&&!o.useGlobeControls&&!t.isPointOnMapSurface(r.around)){a&&t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a)));return}if(!e){o.handleMapControlsPan(r,t,i);return}if(!this._terrainGesture.inFlight){this._terrainGesture.inFlight=!0,this._camera.elevationFreeze=!0,o.handleMapControlsPan(r,t,i);return}if(!o.useGlobeControls&&r.aroundElevation===void 0&&n.drag&&a){t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a)));return}o.handleMapControlsPan(r,t,i)}_fireEvents(e,t,r){let i=Yq(this._eventsInProgress),n=Yq(e),a={};for(let c in e){let{originalEvent:f}=e[c];this._eventsInProgress[c]||(a[`${c}start`]=f),this._eventsInProgress[c]=e[c]}!i&&n&&this._fireEvent("movestart",n.originalEvent);for(let c in a)this._fireEvent(c,a[c]);n&&this._fireEvent("move",n.originalEvent);for(let c in e){let{originalEvent:f}=e[c];this._fireEvent(c,f)}let o={},s;for(let c in this._eventsInProgress){let{handlerName:f,originalEvent:h}=this._eventsInProgress[c];this._handlersById[f].isActive()||(delete this._eventsInProgress[c],s=t[f]||h,o[`${c}end`]=s)}for(let c in o)this._fireEvent(c,o[c]);let l=Yq(this._eventsInProgress),u=(i||n)&&!l;if(u&&this._terrainGesture.inFlight){this._camera.elevationFreeze=!1,this._terrainGesture={inFlight:!1,anchorElevation:null};let c=this._camera.getTransformForUpdate();this._map.getCenterClampedToGround()&&c.recalculateZoomAndCenter(this._map.terrain),this._camera.applyUpdatedTransform(c)}if(r&&u){this._updatingCamera=!0;let c=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),f=h=>h!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new qkr("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}},Nkr=class extends cu{constructor(e){var t,r,i;super(),this._renderFrameCallback=()=>{let n=Math.min((zo()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(n)),n<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this.transform=new aO,this.cameraHelper=new oO,e.minZoom!==void 0&&this.transform.setMinZoom(e.minZoom),e.maxZoom!==void 0&&this.transform.setMaxZoom(e.maxZoom),e.minPitch!==void 0&&this.transform.setMinPitch(e.minPitch),e.maxPitch!==void 0&&this.transform.setMaxPitch(e.maxPitch),e.renderWorldCopies!==void 0&&this.transform.setRenderWorldCopies(e.renderWorldCopies),e.transformConstrain!==null&&this.transform.setConstrainOverride(e.transformConstrain),this._moving=!1,this._zooming=!1,this._bearingSnap=e.bearingSnap,this._zoomSnap=e.zoomSnap,this._requestRenderFrame=e.requestRenderFrame,this._cancelRenderFrame=e.cancelRenderFrame,this.terrain=e.terrain,this._centerClampedToGround=(t=e.centerClampedToGround)!=null?t:!0,this.transformCameraUpdate=(r=e.transformCameraUpdate)!=null?r:null,this._stopHandlers=(i=e.stopHandlers)!=null?i:(()=>{}),this.on("moveend",()=>{delete this._requestedCameraState})}setTerrain(e){this.terrain=e,this.applyTerrainChange()}migrateProjection(e,t){if(e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t,this._requestedCameraState){let r=e.clone();r.apply(this._requestedCameraState,!0),this._requestedCameraState=r}}getCenter(){return new yn(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,t,r){return e=rr.convert(e).mult(-1),this.panTo(this.transform.center,dn({offset:e},t),r)}panTo(e,t,r){return this.easeTo(dn({center:e},t),r)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,t,r){return this.easeTo(dn({zoom:e},t),r)}zoomIn(e,t){return this.zoomTo(n0(this.getZoom()+1,this._zoomSnap),e,t),this}zoomOut(e,t){return this.zoomTo(n0(this.getZoom()-1,this._zoomSnap),e,t),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,t){return e!=this.transform.fov&&(this.applyTransformChange(r=>r.setFov(e)),this.fire(new Cn("movestart",t)).fire(new Cn("move",t)).fire(new Cn("moveend",t))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,t,r){return this.easeTo(dn({bearing:e},t),r)}resetNorth(e,t){return this.rotateTo(0,dn({duration:1e3},e),t),this}resetNorthPitch(e,t){return this.easeTo(dn({bearing:0,pitch:0,roll:0,duration:1e3},e),t),this}snapToNorth(e,t){return Math.abs(this.getBearing()){d.easeFunc(v),this.terrain&&!e.freezeElevation&&this._updateElevation(v,r),this.applyUpdatedTransform(r),this._fireMoveEvents(t)},v=>{this.terrain&&e.freezeElevation?this._finalizeElevation():this.elevationFreeze=!1,this._afterEase(t,v)},e),this}_prepareEase(e,t,r={}){this._moving=!0,!t&&!r.moving&&this.fire(new Cn("movestart",e)),this._zooming&&!r.zooming&&this.fire(new Cn("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new Cn("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new Cn("pitchstart",e)),this._rolling&&!r.rolling&&this.fire(new Cn("rollstart",e))}_prepareElevation(e,t){this._elevationCenter=e,this._elevationStart=t.elevation,this._elevationTarget=this.terrain.getElevationForLngLat(e,t),this.elevationFreeze=!0}_updateElevation(e,t){(this._elevationStart===void 0||this._elevationCenter===void 0)&&this._prepareElevation(t.center,t),t.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,t.tileZoom));let r=this.terrain.getElevationForLngLat(this._elevationCenter,t);if(e<1&&r!==this._elevationTarget){let i=this._elevationTarget-this._elevationStart,n=(r-(i*e+this._elevationStart))/(1-e);this._elevationStart+=e*(i-n),this._elevationTarget=r}t.setElevation(Ks.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this.elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}applyTerrainChange(){if(this.elevationFreeze)return;let e=this.transform;e.setMinElevationForCurrentTile(this.terrain?this.terrain.getMinTileElevationForLngLatZoom(e.center,e.tileZoom):0),this.getCenterClampedToGround()&&e.setElevation(this.terrain?this.terrain.getElevationForLngLat(e.center,e):0)}getTransformForUpdate(){return!this.transformCameraUpdate&&!this.terrain?this.transform:(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState)}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),r=e.getCameraAltitude(),i=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(rthis._elevateCameraIfInsideTerrain(i)),this.transformCameraUpdate&&t.push(i=>this.transformCameraUpdate(i)),!t.length)return;let r=e.clone();for(let i of t){let n=r.clone(),{center:a,zoom:o,roll:s,pitch:l,bearing:u,elevation:c}=i(n);a&&n.setCenter(a),c!==void 0&&n.setElevation(c),o!==void 0&&n.setZoom(o),s!==void 0&&n.setRoll(s),l!==void 0&&n.setPitch(l),u!==void 0&&n.setBearing(u),r.apply(n,!1)}this.transform.apply(r,!1)}applyTransformChange(e){let t=this._requestedCameraState!==void 0,r=this.getTransformForUpdate();e(r),this.applyUpdatedTransform(r),t||delete this._requestedCameraState}_fireMoveEvents(e){this.fire(new Cn("move",e)),this._zooming&&this.fire(new Cn("zoom",e)),this._rotating&&this.fire(new Cn("rotate",e)),this._pitching&&this.fire(new Cn("pitch",e)),this._rolling&&this.fire(new Cn("roll",e))}_afterEase(e,t){if(this._easeId&&t&&this._easeId===t)return;delete this._easeId;let r=this._zooming,i=this._rotating,n=this._pitching,a=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,r&&this.fire(new Cn("zoomend",e)),i&&this.fire(new Cn("rotateend",e)),n&&this.fire(new Cn("pitchend",e)),a&&this.fire(new Cn("rollend",e)),this.fire(new Cn("moveend",e))}flyTo(e,t){if(!e.essential&&l0.prefersReducedMotion){let k=WT(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(k,t)}this.stop(),e=dn({offset:[0,0],speed:1.2,curve:1.42,easing:JB},e),e.zoom!==void 0&&this._zoomSnap&&(e.zoom=n0(e.zoom,this._zoomSnap));let r=this.getTransformForUpdate(),i=r.bearing,n=r.pitch,a=r.roll,o=r.padding,s=e.bearing===void 0?i:this._normalizeBearing(e.bearing,i),l=e.pitch===void 0?n:+e.pitch,u=e.roll===void 0?a:this._normalizeBearing(e.roll,a),c=e.padding===void 0?r.padding:e.padding,f=rr.convert(e.offset),h=r.centerPoint.add(f),p=r.screenPointToLocation(h),d=this.cameraHelper.handleFlyTo(r,{bearing:s,pitch:l,roll:u,padding:c,locationAtOffset:p,offsetAsPoint:f,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),v=e.curve,m=Math.max(r.width,r.height),g=m/d.scaleOfZoom,w=d.pixelPathLength,_=m/d.scaleOfMinZoom;v=Math.min(v,Math.sqrt(_/w*2));let b=v*v;function M(k){let D=(g*g-m*m+(k?-1:1)*b*b*w*w)/(2*(k?g:m)*b*w);return Math.log(Math.sqrt(D*D+1)-D)}function x(k){return(Math.exp(k)-Math.exp(-k))/2}function A(k){return(Math.exp(k)+Math.exp(-k))/2}function T(k){return x(k)/A(k)}let y=M(!1),E=function(k){return A(y)/A(y+v*k)},S=function(k){return m*((A(y)*T(y+v*k)-x(y))/b)/w},C=(M(!0)-y)/v;if(Math.abs(w)<2e-6||!isFinite(C)){if(Math.abs(m-g)<1e-6)return this.easeTo(e,t);let k=g0,E=D=>Math.exp(k*v*D)}if(e.duration!==void 0)e.duration=+e.duration;else{let k=e.screenSpeed===void 0?+e.speed:+e.screenSpeed/v;e.duration=1e3*C/k}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=i!==s,this._pitching=l!==n,this._rolling=u!==a,this._padding=!r.isPaddingEqual(c),this._prepareEase(t,!1),this.terrain&&this._prepareElevation(d.targetCenter,r),this._ease(k=>{let D=k*C,F=1/E(D),P=S(D);this._rotating&&r.setBearing(Ks.number(i,s,k)),this._pitching&&r.setPitch(Ks.number(n,l,k)),this._rolling&&r.setRoll(Ks.number(a,u,k)),this._padding&&(r.interpolatePadding(o,c,k),h=r.centerPoint.add(f)),d.easeFunc(k,F,P,h),this.terrain&&!e.freezeElevation&&this._updateElevation(k,r),this.applyUpdatedTransform(r),this._fireMoveEvents(t)},()=>{this.terrain&&e.freezeElevation?this._finalizeElevation():this.elevationFreeze=!1,this._afterEase(t)},e),this}isEasing(){return!!this._easeFrameId}stop(e){return this._stop(e)}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,t)}return e||this._stopHandlers(),this}_ease(e,t,r){r.animate===!1||r.duration===0?(e(1),t()):(this._easeStart=zo(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,t){e=W0(e,-180,180);let r=Math.abs(e-t);return Math.abs(e-360-t)MapLibre'},Flt=class{constructor(e=Dlt){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=t=>{t&&(t.type==="terrain"||t.dataType==="style"||t.dataType==="source"&&(t.sourceDataType==="metadata"||t.sourceDataType==="visibility"))&&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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=Xn.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=Xn.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=Xn.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(e,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(i=>typeof i=="string"?i:"")):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let i=this._map.style.stylesheet;this.styleOwner=i.owner,this.styleId=i.id}let t=this._map.style.tileManagers;for(let i in t){let n=t[i];if(n.used||n.usedForTerrain){let a=n.getSource();a.attribution&&!e.includes(a.attribution)&&e.push(a.attribution)}}e=e.filter(i=>String(i).trim()),e.sort((i,n)=>i.length-n.length),e=e.filter((i,n)=>{for(let a=n+1;a{let t=this._container.children;if(t.length){let r=t[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&r.classList.add("maplibregl-compact"):r.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var r;this._map=e,this._compact=(r=this.options)==null?void 0:r.compact,this._container=Xn.create("div","maplibregl-ctrl");let t=Xn.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),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}},Ukr=class{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning,r=t?this._queue.concat(t):this._queue;for(let i of r)if(i.id===e){i.cancelled=!0;return}}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;this._queue=[];let r=!1,i;for(let n of t)if(!n.cancelled){try{n.callback(e)}catch(a){r||(r=!0,i=a)}if(this._cleared)break}if(this._cleared=!1,this._currentlyRunning=!1,r)throw i}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}},Yot=["none","zoom","sourceTiles","visibleLayers","revision"],Vkr=class{constructor(e,t,r,i){this._tileKeys=e.map(n=>n.key).sort().join(),this._revision=t,this._zoom=r,this._visibleLayerIds=i}difference(e){return this._revision===(e==null?void 0:e._revision)?this._visibleLayerIds===e._visibleLayerIds?this._tileKeys===e._tileKeys?this._zoom===e._zoom?"none":"zoom":"sourceTiles":"visibleLayers":"revision"}},n6={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0},Gkr=class{constructor(e,t){this.needsFollowUpFrame=!1,this.painter=e,this.terrain=t,this.rttSize=t.tileManager.tileSize*t.qualityFactor}getTexture(e){return e.getRTT(this._stacks.length-1).texture}prepareForRender(e,t){let r=t!==this._lastPrepareZoom;this._lastPrepareZoom=t,this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(s=>!e._layers[s].isHidden(t));let i=this._renderableLayerIds.join(),n=new Set;for(let s of this._renderableLayerIds){let l=e._layers[s],u=l.source;u&&n6[l.type]&&n.add(u)}this._coordsAscending={},this._rttFingerprints={};for(let s of n){let l=e.tileManagers[s];if(!l)continue;this._coordsAscending[s]={};let u=this._coordsAscending[s],c=l.getSource(),f=c instanceof l6?c.terrainTileRanges:null;for(let d of l.getVisibleCoordinates()){let v=this.terrain.tileManager.getTerrainCoords(d,f);for(let m in v)u[m]||(u[m]=[]),u[m].push(v[m])}this._rttFingerprints[s]={};let h=this._rttFingerprints[s],p=l.getState().revision;for(let d in u)h[d]=new Vkr(u[d],p,t,i)}this.needsFollowUpFrame=!1;let a=r||this.painter.options.moving,o=!1;for(let s of this._renderableTiles){let l=this._textureDifference(s);l!=="none"&&(l==="zoom"&&a||l==="visibleLayers"&&r?this.needsFollowUpFrame=!0:l==="zoom"||l==="sourceTiles"?(o?this.needsFollowUpFrame=!0:s.releaseRTT(this.painter),o=!0):s.releaseRTT(this.painter))}}_textureDifference(e){let t="none";for(let r in this._rttFingerprints){let i=this._rttFingerprints[r][e.tileID.key];if(!i)continue;let n=i.difference(e.rttFingerprint[r]);Yot.indexOf(n)>Yot.indexOf(t)&&(t=n)}return t}renderLayer(e,t){if(e.isHidden(this.painter.transform.zoom))return!1;let r=e.type,i=this.painter,n=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(n6[r]&&((!this._prevType||!n6[this._prevType])&&this._stacks.push([]),this._prevType=r,this._stacks[this._stacks.length-1].push(e.id),!n))return!0;if(n6[this._prevType]||n6[r]&&n){this._prevType=r;let a=this._stacks.length-1,o=this._stacks[a]||[];t.isRenderingToTexture=!0;for(let s of this._renderableTiles){if(this._rttTiles.push(s),s.getRTT(a))continue;let l=s.acquireRTT(i,a,this.rttSize);i.bindRTT(l),i.context.clear({color:aa.transparent,stencil:0}),i.currentStencilSource=void 0;for(let u of o){let c=i.style._layers[u],f=c.source?this._coordsAscending[c.source][s.tileID.key]:[s.tileID];i.context.viewport.set([0,0,this.rttSize,this.rttSize]),i.renderTileClippingMasks(c,f),i.renderLayer(i,i.style.tileManagers[c.source],c,f,t),c.source&&(s.rttFingerprint[c.source]=this._rttFingerprints[c.source][s.tileID.key])}l.texture.generateMipmap()}return t.isRenderingToTexture=!1,skr(this.painter,this.terrain,this._rttTiles,t),this._rttTiles=[],n6[r]}return!1}},Hkr={"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"},jkr=Jot,Xot={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:Dlt,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:a0.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,rotateSpeed:.8,pitchSpeed:-.5,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,terrainSkirtLength:"auto",zoomLevelsToOverscale:4,anisotropicFilterPitch:20},$kr=class extends cu{get _ownerWindow(){var e,t;return((t=(e=this._container)==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}constructor(e){var n,a,o;super(),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ukr,this._controls=[],this._mapId=yne(),this._styleUrl=null,this._missingStyleImageResolver=null,this._lostContextStyle={style:null,images:null},this._contextLost=s=>{if(s.preventDefault(),this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),!this.style){this.fire(new Zq("webglcontextlost",{originalEvent:s}));return}for(let l of Object.values(this.style._layers))if(l.type==="custom"&&console.warn(`Custom layer with id '${l.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),l._listeners)for(let[u]of Object.entries(l._listeners))console.warn(`Custom layer with id '${l.id}' had event listeners for event '${u}' 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 Zq("webglcontextlost",{originalEvent:s}))},this._contextRestored=s=>{if(this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style){this.style.imageManager.images=this._lostContextStyle.images;for(let l in this._lostContextStyle.images){let u=this._lostContextStyle.images[l];u.isWebGLImage&&this.style.imageManager.updateImage(l,u,!1)}}this._lostContextStyle={style:null,images:null};try{this._setupPainter()}catch(l){this.fire(new Mn(l));return}this.resize(),this._update(),this._resizeInternal(),this.fire(new Zq("webglcontextrestored",{originalEvent:s}))},this._onMapScroll=s=>{if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()};let t=da(fn(fn({},Xot),e),{canvasContextAttributes:fn(fn({},Xot.canvasContextAttributes),e.canvasContextAttributes)});if(t.minZoom!=null&&t.maxZoom!=null&&t.minZoom>t.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(t.minPitch!=null&&t.maxPitch!=null&&t.minPitch>t.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(t.minPitch!=null&&t.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(t.maxPitch!=null&&t.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");this._camera=new Nkr({minZoom:t.minZoom,maxZoom:t.maxZoom,minPitch:t.minPitch,maxPitch:t.maxPitch,bearingSnap:t.bearingSnap,zoomSnap:t.zoomSnap,renderWorldCopies:t.renderWorldCopies,centerClampedToGround:t.centerClampedToGround,terrain:this.terrain,transformConstrain:t.transformConstrain,requestRenderFrame:s=>this._requestRenderFrame(s),cancelRenderFrame:s=>this._cancelRenderFrame(s),transformCameraUpdate:t.transformCameraUpdate,stopHandlers:()=>{var s;return(s=this._handlers)==null?void 0:s.stop(!1)}}),this._camera.setEventedParent(this),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._maxTileCacheZoomLevels=t.maxTileCacheZoomLevels,this._canvasContextAttributes=fn({},t.canvasContextAttributes),this._trackResize=t.trackResize===!0,this._terrainSkirtLength=t.terrainSkirtLength,this._refreshExpiredTiles=t.refreshExpiredTiles===!0,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions===!0,this._collectResourceTiming=t.collectResourceTiming===!0,this._locale=fn(fn({},Hkr),t.locale),this._clickTolerance=t.clickTolerance,this._overridePixelRatio=t.pixelRatio,this._maxCanvasSize=t.maxCanvasSize,this._zoomLevelsToOverscale=t.zoomLevelsToOverscale,this.cancelPendingTileRequestsWhileZooming=t.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(t.anisotropicFilterPitch),t.reduceMotion!==void 0&&(l0.prefersReducedMotion=t.reduceMotion),this._requestManager=new ZTr(t.transformRequest),this._container=this._resolveContainer(t.container),t.maxBounds&&this.setMaxBounds(t.maxBounds),this._setupContainer();try{this._setupPainter()}catch(s){throw this._cleanupContainer(),s}this._imageQueueHandle=qv.addThrottleControl(()=>this.isMoving()),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.markTerrainDepthDirty(),this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),this._handlers=new Okr(this,this._camera,t),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver());let r=typeof t.hash=="string"&&t.hash||void 0;this._hash=t.hash?new ylt(r).addTo(this):void 0,(n=this._hash)!=null&&n._onHashChange()||(this.jumpTo({center:t.center,elevation:t.elevation,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch,roll:t.roll}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,dn({},t.fitBoundsOptions,{duration:0}))));let i=typeof t.style=="string"||((o=(a=t.style)==null?void 0:a.projection)==null?void 0:o.type)!=="globe";this.resize(null,i),this._localIdeographFontFamily=t.localIdeographFontFamily,this._validateStyle=t.validateStyle,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Flt(typeof t.attributionControl=="boolean"?void 0:t.attributionControl)),t.maplibreLogo&&this.addControl(new Llt,t.logoPosition),this.on("style.load",()=>{if(i||this._resizeTransform(),this._camera.transform.unmodified){let s=WT(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(s)}}),this.on("data",s=>{this._update(s.dataType==="style"),this.fire(s.dataType==="style"?new dp("styledata",s):new Ns("sourcedata",s))}),this.on("dataloading",s=>{this.fire(s.dataType==="style"?new dp("styledataloading",s):new Ns("sourcedataloading",s))}),this.on("dataabort",s=>{this.fire(new Ns("sourcedataabort",s))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,t){if(t===void 0&&(t=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!(e!=null&&e.onAdd))return this.fire(new Mn(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let r=e.onAdd(this);this._controls.push(e);let i=this._controlPositions[t];return t.includes("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this}removeControl(e){if(!(e!=null&&e.onRemove))return this.fire(new Mn(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let t=this._controls.indexOf(e);return t>-1&&this._controls.splice(t,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return u6(this._camera.transform,e)}setTransformCameraUpdate(e){this._camera.transformCameraUpdate=e}getCenter(){return new yn(this._camera.transform.center.lng,this._camera.transform.center.lat)}setCenter(e,t){return this._camera.setCenter(e,t),this}getCenterElevation(){return this._camera.transform.elevation}setCenterElevation(e,t){return this._camera.setCenterElevation(e,t),this}setCenterClampedToGround(e){this._camera.setCenterClampedToGround(e)}panBy(e,t,r){return this._camera.panBy(e,t,r),this}panTo(e,t,r){return this._camera.panTo(e,t,r),this}getZoom(){return this._camera.transform.zoom}setZoom(e,t){return this._camera.setZoom(e,t),this}zoomTo(e,t,r){return this._camera.zoomTo(e,t,r),this}zoomIn(e,t){return this._camera.zoomIn(e,t),this}zoomOut(e,t){return this._camera.zoomOut(e,t),this}getVerticalFieldOfView(){return this._camera.transform.fov}setVerticalFieldOfView(e,t){return this._camera.setVerticalFieldOfView(e,t),this}getBearing(){return this._camera.transform.bearing}setBearing(e,t){return this._camera.setBearing(e,t),this}getZoomSnap(){return this._camera.getZoomSnap()}setZoomSnap(e){return this._camera.setZoomSnap(e),this}getPadding(){return this._camera.transform.padding}setPadding(e,t){return this._camera.setPadding(e,t),this}rotateTo(e,t,r){return this._camera.rotateTo(e,t,r),this}resetNorth(e,t){return this._camera.resetNorth(e,t),this}resetNorthPitch(e,t){return this._camera.resetNorthPitch(e,t),this}snapToNorth(e,t){return this._camera.snapToNorth(e,t),this}getPitch(){return this._camera.transform.pitch}setPitch(e,t){return this._camera.setPitch(e,t),this}getRoll(){return this._camera.transform.roll}setRoll(e,t){return this._camera.setRoll(e,t),this}cameraForBounds(e,t){return this._camera.cameraForBounds(e,t)}fitBounds(e,t,r){return this._camera.fitBounds(e,t,r),this}fitScreenCoordinates(e,t,r,i,n){return this._camera.fitScreenCoordinates(e,t,r,i,n),this}jumpTo(e,t){return this._camera.jumpTo(e,t),this}calculateAnchoredCameraOptions(e){return this._camera.calculateAnchoredCameraOptions(e)}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n){return this._camera.calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n)}easeTo(e,t){return this._camera.easeTo(e,t),this}flyTo(e,t){return this._camera.flyTo(e,t),this}stop(){return this._camera.stop(),this}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLat(yn.convert(e),this._camera.transform):null}getCenterClampedToGround(){return this._camera.getCenterClampedToGround()}calculateCameraOptionsFromTo(e,t,r,i){return i==null&&this.terrain&&(i=this.terrain.getElevationForLngLat(r,this._camera.transform)),this._camera.transform.calculateCameraOptionsFromTo(e,t,r,i!=null?i:0)}resize(e,t=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(t);let r=!this._camera._moving;return r&&(this.stop(),this.fire(new Cn("movestart",e)).fire(new Cn("move",e))),this.fire(new vc("resize",e)),r&&this.fire(new Cn("moveend",e)),this}_resizeInternal(e=!0){let[t,r]=this._containerDimensions(),i=this._getClampedPixelRatio(t,r);if(this._resizeCanvas(t,r,i),this.painter.resize(t,r,i),this.painter.overLimit()){let n=this.painter.context.gl;this._maxCanvasSize=[n.drawingBufferWidth,n.drawingBufferHeight];let a=this._getClampedPixelRatio(t,r);this._resizeCanvas(t,r,a),this.painter.resize(t,r,a)}this._resizeTransform(e)}_resizeTransform(e=!0){var i;let[t,r]=this._containerDimensions();this._camera.transform.resize(t,r,e),(i=this._camera._requestedCameraState)==null||i.resize(t,r,e)}_getClampedPixelRatio(e,t){let{0:r,1:i}=this._maxCanvasSize,n=this.getPixelRatio(),a=e*n,o=t*n,s=a>r?r/a:1,l=o>i?i/o:1,u=Math.min(s,l);return u<1&&Pa("The canvas is larger than maxCanvasSize and is rendered at a lower pixel ratio to fit. Increase maxCanvasSize, within MAX_TEXTURE_SIZE, to render at full resolution."),u*n}getPixelRatio(){var e;return(e=this._overridePixelRatio)!=null?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this._camera.transform.getBounds()}getMaxBounds(){return this._camera.transform.getMaxBounds()}setMaxBounds(e){return this._camera.applyTransformChange(t=>t.setMaxBounds(Ov.convert(e))),this._update()}setMinZoom(e){if(e!=null||(e=-2),e>=-2&&e<=this._camera.transform.maxZoom){let t=this._camera.transform.zoom;return this._camera.applyTransformChange(r=>r.setMinZoom(e)),this._update(),t!==this._camera.transform.zoom&&this.fire(new Cn("zoomstart")).fire(new Cn("zoom")).fire(new Cn("zoomend")).fire(new Cn("movestart")).fire(new Cn("move")).fire(new Cn("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(e=!1){let t=this._camera.transform;return e?t.applyConstrain(t.center,t.minZoom).zoom:t.minZoom}setMaxZoom(e){if(e!=null||(e=22),e>=this._camera.transform.minZoom){let t=this._camera.transform.zoom;return this._camera.applyTransformChange(r=>r.setMaxZoom(e)),this._update(),t!==this._camera.transform.zoom&&this.fire(new Cn("zoomstart")).fire(new Cn("zoom")).fire(new Cn("zoomend")).fire(new Cn("movestart")).fire(new Cn("move")).fire(new Cn("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this._camera.transform.maxZoom}setMinPitch(e){if(e!=null||(e=0),e<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this._camera.transform.maxPitch){let t=this._camera.transform.pitch;return this._camera.applyTransformChange(r=>r.setMinPitch(e)),this._update(),t!==this._camera.transform.pitch&&this.fire(new Cn("pitchstart")).fire(new Cn("pitch")).fire(new Cn("pitchend")).fire(new Cn("movestart")).fire(new Cn("move")).fire(new Cn("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this._camera.transform.minPitch}setMaxPitch(e){if(e!=null||(e=60),e>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this._camera.transform.minPitch){let t=this._camera.transform.pitch;return this._camera.applyTransformChange(r=>r.setMaxPitch(e)),this._update(),t!==this._camera.transform.pitch&&this.fire(new Cn("pitchstart")).fire(new Cn("pitch")).fire(new Cn("pitchend")).fire(new Cn("movestart")).fire(new Cn("move")).fire(new Cn("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this._camera.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if(e!=null||(e=20),e>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this._camera.transform.renderWorldCopies}setRenderWorldCopies(e){return this._camera.applyTransformChange(t=>t.setRenderWorldCopies(e)),this._update()}setTransformConstrain(e){return this._camera.applyTransformChange(t=>t.setConstrainOverride(e)),this._update()}project(e){return this._camera.transform.locationToScreenPoint(yn.convert(e),this.style&&this.terrain)}unproject(e){return this._camera.transform.screenPointToLocation(rr.convert(e),this.terrain)}isMoving(){var e;return this._camera.isMoving()||((e=this._handlers)==null?void 0:e.isMoving())||!1}isZooming(){var e;return this._camera.isZooming()||((e=this._handlers)==null?void 0:e.isZooming())||!1}isRotating(){var e;return this._camera.isRotating()||((e=this._handlers)==null?void 0:e.isRotating())||!1}_createDelegates(e,t,r){if(e==="mouseenter"||e==="mouseover"){let i=!1;return{mousemove:n=>{let a=t.filter(s=>this.getLayer(s)),o=a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a});o.length?i||(i=!0,r.call(this,new s0(e,this,n.originalEvent,{features:o}))):i=!1},mouseout:()=>{i=!1}}}if(e==="mouseleave"||e==="mouseout"){let i=!1;return{mousemove:n=>{let a=t.filter(o=>this.getLayer(o));(a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a})).length?i=!0:i&&(i=!1,r.call(this,new s0(e,this,n.originalEvent)))},mouseout:n=>{i&&(i=!1,r.call(this,new s0(e,this,n.originalEvent)))}}}{let i=n=>{let a=t.filter(s=>this.getLayer(s)),o=a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a});o.length&&(n.features=o,r.call(this,n),delete n.features)};return{[e]:i}}}_addDelegatedListener(e,t){var r;this._delegatedListeners||(this._delegatedListeners={}),(r=this._delegatedListeners)[e]||(r[e]=[]),this._delegatedListeners[e].push(t);for(let i in t.delegates)this.on(i,t.delegates[i])}_removeDelegatedListener(e,t,r){var n;if(!((n=this._delegatedListeners)!=null&&n[e]))return;let i=this._delegatedListeners[e];for(let a=0;at.includes(s))){for(let s in o.delegates)this.off(s,o.delegates[s]);i.splice(a,1);return}}}on(e,t,r){if(r===void 0)return super.on(e,t);let i=typeof t=="string"?[t]:t,n={layers:i,listener:r,delegates:this._createDelegates(e,i,r)};return this._addDelegatedListener(e,n),{unsubscribe:()=>{this._removeDelegatedListener(e,i,r)}}}once(e,t,r){if(r===void 0)return super.once(e,t);let i=typeof t=="string"?[t]:t,n={layers:i,listener:r,delegates:this._createDelegates(e,i,a=>{this._removeDelegatedListener(e,i,r),r.call(this,a)})};return this._addDelegatedListener(e,n),this}off(e,t,r){if(r===void 0)return super.off(e,t);let i=typeof t=="string"?[t]:t;return this._removeDelegatedListener(e,i,r),this}queryRenderedFeatures(e,t){if(!this.style)return[];let r,i=e instanceof rr||Array.isArray(e),n=i?e:[[0,0],[this._camera.transform.width,this._camera.transform.height]];if(t||(t=(i?{}:e)||{}),n instanceof rr||typeof n[0]=="number")r=[rr.convert(n)];else{let a=rr.convert(n[0]),o=rr.convert(n[1]);r=[a,new rr(o.x,a.y),o,new rr(a.x,o.y),a]}return this.style.queryRenderedFeatures(r,t,this._camera.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,t){return t=dn({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},t),this._styleUrl=typeof e=="string"?e:null,t.diff!==!1&&t.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,t),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._updateStyle(e,t))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(t==null)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var i,n,a;if((i=this._diffStyleRequest)==null||i.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded){this.style.once("style.load",()=>this._updateStyle(e,t));return}let r=this.style&&t.transformStyle?this.style.serialize():void 0;if(this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e)this.style=new doe(this,t||{});else return this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),(a=(n=this.style)==null?void 0:n.projection)==null||a.destroy(),delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof e=="string"?this.style.loadURL(e,t,r):this.style.loadJSON(e,t,r),this}_lazyInitEmptyStyle(){this.style||(this.style=new doe(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,t){return Zi(this,null,function*(){var r;if((r=this._diffStyleRequest)==null||r.abort(),typeof e=="string"){let i=e;this._diffStyleRequest=new AbortController;let n=this._diffStyleRequest;try{let a=yield this._requestManager.transformRequest(i,"Style");if(n.signal.aborted){this._diffStyleRequest=null;return}let o=yield yC(a,n);this._diffStyleRequest=null,this._updateDiff(o.data,t)}catch(a){this._diffStyleRequest=null,Vm(a)||this.fire(new Mn(Oc(a)))}}else typeof e=="object"&&(this._diffStyleRequest=null,this._updateDiff(e,t))})}_updateDiff(e,t){try{this.style.setState(e,t)&&this._update(!0)}catch(r){Pa(`Unable to perform style diff: ${Oc(r).message}. Rebuilding the style from scratch.`),this._updateStyle(e,t)}}getStyle(){if(this.style)return this.style.serialize()}getStyleUrl(){return this._styleUrl}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(!this.style){Pa("There is no style added to the map.");return}return this.style.loaded()}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){var r;let t=(r=this.style)==null?void 0:r.tileManagers[e];if(t===void 0){this.fire(new Mn(Error(`There is no tile manager with ID '${e}'`)));return}return t.loaded()}setTerrain(e,t={}){if(this.style._checkLoaded(),e&&KT(this,mh.terrain,{value:e},t))return this;if(this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),!e)this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture=null,this.painter.destroyRTTResources(),this._camera.setTerrain(null);else{let r=this.style.tileManagers[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);this.terrain===null&&r.reload();for(let i in this.style._layers){let n=this.style._layers[i];n.type==="hillshade"&&n.source===e.source&&Pa("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),n.type==="color-relief"&&n.source===e.source&&Pa("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&&this.terrain.destroy(),this.terrain=new nMr(this.painter,r,e,this._terrainSkirtLength),this.painter.renderToTexture=new Gkr(this.painter,this.terrain),this._camera.setTerrain(this.terrain),this._terrainDataCallback=i=>this._handleTerrainDataEvent(i,e.source),this.style.on("data",this._terrainDataCallback)}return this.style.triggerSymbolPlacement(),this.fire(new tst({terrain:e})),this}_handleTerrainDataEvent(e,t){var i;if(e.dataType==="style"){this.terrain.tileManager.releaseAllRTT();return}let r=e.sourceId===t;if(r&&(this.terrain.resetElevationCache(),this.style.triggerSymbolPlacement()),r&&e.tile&&(this.painter.markTerrainDepthDirty(),this._camera.applyTerrainChange()),e.tile){if(((i=e.source)==null?void 0:i.type)==="image"){this.terrain.tileManager.releaseAllRTT();return}this.terrain.tileManager.releaseRTT(e.tile.tileID)}}getTerrain(){var e,t;return(t=(e=this.terrain)==null?void 0:e.options)!=null?t:null}areTilesLoaded(){var t;let e=(t=this.style)==null?void 0:t.tileManagers;for(let r of Object.values(e))if(!r.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){var t;return(t=this.style)==null?void 0:t.getSource(e)}setSourceTileLodParams(e,t,r){if(r){let i=this.getSource(r);if(!i)throw Error(`There is no source with ID "${r}", cannot set LOD parameters`);i.calculateTileZoom=aoe(Math.max(1,e),Math.max(1,t))}else for(let i in this.style.tileManagers)this.style.tileManagers[i].getSource().calculateTileZoom=aoe(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,t){let r=this.style.tileManagers[e];if(!r)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);t===void 0?r.reload(!0):r.refreshTiles(t.map(i=>new RC(i.z,i.x,i.y)))}addImage(e,t,r={}){var n;this._lazyInitEmptyStyle();let i=this._createStyleImage(t,r);return i?(this.style.addImage(e,i),(n=i.userImage)!=null&&n.onAdd&&i.userImage.onAdd(this,e),this):this}setMissingStyleImageResolver(e){var t;return this._missingStyleImageResolver=e,(t=this.style)==null||t.setMissingImageResolver(e),this}_createStyleImage(e,t={}){let{pixelRatio:r=1,sdf:i=!1,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l}=t;if(e instanceof HTMLImageElement||px(e)){let{width:u,height:c,data:f}=l0.getImageData(e);return{data:new Es({width:u,height:c},f),pixelRatio:r,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l,sdf:i,version:0}}if(e.width===void 0||e.height===void 0)return this.fire(new Mn(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`"))),null;{let{width:u,height:c,data:f}=e,h=e,p=DC(h.data);return{data:p?new Es({width:u,height:c}):new Es({width:u,height:c},new Uint8Array(f)),pixelRatio:r,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l,sdf:i,version:0,isWebGLImage:p,userImage:h}}}updateImage(e,t){let r=this.style.getImage(e);if(!r)return this.fire(new Mn(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:i,height:n,data:a}=t instanceof HTMLImageElement||px(t)?l0.getImageData(t):t;if(i===void 0||n===void 0)return this.fire(new Mn(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(i!==r.data.width||n!==r.data.height)return this.fire(new Mn(Error("The width and height of the updated image must be that same as the previous version of the image")));if(r.isWebGLImage=DC(a),r.isWebGLImage)r.userImage=t;else{let o=!(t instanceof HTMLImageElement||px(t));r.data.replace(a,o)}return this.style.updateImage(e,r),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new Mn(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return Zi(this,null,function*(){let t=yield qv.getImage(yield this._requestManager.transformRequest(e,"Image"),new AbortController);if(!t.data)throw Error(`Could not load image ${e}: the response is empty`);return t})}listImages(){var e,t;return(t=(e=this.style)==null?void 0:e.listImages())!=null?t:[]}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){var t;return(t=this.style)==null?void 0:t.getLayer(e)}getLayersOrder(){var e,t;return(t=(e=this.style)==null?void 0:e.getLayersOrder())!=null?t:[]}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){var i;return(i=this.style)==null||i.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,i={}){var n;return(n=this.style)==null||n.setPaintProperty(e,t,r,i),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,i={}){return this.style.setLayoutProperty(e,t,r,i),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}setFontFaces(e){return this._lazyInitEmptyStyle(),this.style.setFontFaces(e),this._update(!0)}getFontFaces(){return this.style.getFontFaces()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,i=>{i||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,r=>{r||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=Math.floor(this._container.clientWidth)||400,t=Math.floor(this._container.clientHeight)||300),[e,t]}_shouldHandleInitialResize(){var r;if(!((r=this._container)!=null&&r.clientWidth)||!this._container.clientHeight)return!1;let[e,t]=this._containerDimensions();return e!==this._camera.transform.width||t!==this._camera.transform.height}_setupResizeObserver(){var i;let e=!1,t=Ooe(n=>{this._trackResize&&!this._removed&&(this.resize(n),this.redraw())},50),r=(i=this._ownerWindow.ResizeObserver)!=null?i:ResizeObserver;this._resizeObserver=new r(n=>{!e&&(e=!0,!this._shouldHandleInitialResize())||t(n)}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if(typeof e=="string"){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&typeof e=="object"&&e.nodeType===1)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._containerDimensions(),t=this._getClampedPixelRatio(e[0],e[1]),r=this._container;r.classList.add("maplibregl-map");let i=this._canvasContainer=Xn.create("div","maplibregl-canvas-container",r);this._interactive&&i.classList.add("maplibregl-interactive"),this._canvas=Xn.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"),this._resizeCanvas(e[0],e[1],t);let n=this._controlContainer=Xn.create("div","maplibregl-control-container",r),a=this._controlPositions={};for(let o of["top-left","top-right","bottom-left","bottom-right"])a[o]=Xn.create("div",`maplibregl-ctrl-${o} `,n);this._container.addEventListener("scroll",this._onMapScroll,!1)}_cleanupContainer(){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")}_resizeCanvas(e,t,r){let i=Math.round(r*e),n=Math.round(r*t);this._canvas.width=i,this._canvas.height=n,this._canvas.style.width=`${i/r}px`,this._canvas.style.height=`${n/r}px`}_setupPainter(){let e=da(fn({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",i=>{t=i},{once:!0});let r=this._canvas.getContext("webgl2",e);if(!r)throw new mlt(e,t);this.painter=new hkr(r,this._camera.transform)}migrateProjection(e,t){this._camera.migrateProjection(e,t),this.painter.transform=e,this.fire(new rst({newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var t;return(t=this.style)!=null&&t._loaded?(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var o,s,l,u,c;let t=this._idleTriggered?this._fadeDuration:0,r=((o=this.style.projection)==null?void 0:o.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let i=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let f=this._camera.transform.zoom,h=zo();this.style.zoomHistory.update(f,h);let p=new Io(f,{now:h,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),d=p.crossFadingFactor();(d!==1||d!==this._crossFadingFactor)&&(i=!0,this._crossFadingFactor=d),this.style.update(p)}let n=((s=this.style.projection)==null?void 0:s.transitionState)>0!==r;this._camera.transform.setTransitionState((l=this.style.projection)==null?void 0:l.transitionState),this.style&&(this._sourcesDirty||n)&&(this._sourcesDirty=!1,this.style._updateSources(this._camera.transform)),this.terrain?(this.terrain.tileManager.update(this._camera.transform,this.terrain)&&this.terrain.resetElevationCache(),this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),!this._camera.elevationFreeze&&this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))):(this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0)),this._placementDirty=(u=this.style)==null?void 0:u._updatePlacement(this._camera.transform,this.showCollisionBoxes,t,this._crossSourceCollisions,n),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new vc("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new vc("load"))),this.style&&(this.style.hasTransitions()||i)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let a=this._sourcesDirty||this._styleDirty||this._placementDirty||((c=this.painter.renderToTexture)==null?void 0:c.needsFollowUpFrame);return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new vc("idle")),this._loaded&&!this._fullyLoaded&&!a&&(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._render(0)),this}remove(){var t,r;this._hash&&this._hash.remove();for(let i of this._controls)i.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._renderTaskQueue.clear(),(t=this._diffStyleRequest)==null||t.abort(),this.painter.destroy(),this._handlers.destroy(),this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),qv.removeThrottleControl(this._imageQueueHandle),(r=this._resizeObserver)==null||r.disconnect();let e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._cleanupContainer(),this._removed=!0,this.fire(new vc("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,l0.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(t){if(!Vm(t))throw t}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return jkr}getCameraTargetElevation(){return this._camera.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},Wkr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0},Ykr=class{constructor(e){this._updateZoomButtons=()=>{let t=this._map.getZoom(),r=t===this._map.getMaxZoom(),i=t===this._map.getMinZoom(!0);this._zoomInButton.disabled=r,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString())},this._rotateCompassArrow=()=>{let t=this._map.getPitch(),r=this._map.getRoll(),i=this._map.getBearing(),n=1/Math.cos(Os(t))**.5;if(this.options.visualizePitch&&this.options.visualizeRoll){this._compassIcon.style.transform=`scale(${n}) rotateZ(${-r}deg) rotateX(${t}deg) rotateZ(${-i}deg)`;return}if(this.options.visualizePitch){this._compassIcon.style.transform=`scale(${n}) rotateX(${t}deg) rotateZ(${-i}deg)`;return}if(this.options.visualizeRoll){this._compassIcon.style.transform=`rotate(${-i-r}deg)`;return}this._compassIcon.style.transform=`rotate(${-i}deg)`},this._setButtonTitle=(t,r)=>{let i=this._map._getUIString(`NavigationControl.${r}`);t.title=i,t.setAttribute("aria-label",i)},this.options=dn({},Wkr,e),this._container=Xn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),Xn.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),Xn.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=Xn.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("move",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 Xkr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("move",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(e,t){let r=Xn.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},Xkr=class{constructor(e,t,r=!1){this.mousedown=n=>{this.startMove(n,Xn.mousePos(this.element,n)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=n=>{this.move(n,Xn.mousePos(this.element,n))},this.mouseup=n=>{this._rotatePitchHandler.dragEnd(n),this.offTemp()},this.touchstart=n=>{n.targetTouches.length===1?(this._startPos=this._lastPos=Xn.touchPos(this.element,n.targetTouches)[0],this.startMove(n,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend)):this.reset()},this.touchmove=n=>{n.targetTouches.length===1?(this._lastPos=Xn.touchPos(this.element,n.targetTouches)[0],this.move(n,this._lastPos)):this.reset()},this.touchend=n=>{n.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=t;let i=new Ekr;this._rotatePitchHandler=new r8({clickTolerance:3,move:(n,a)=>{let o=t.getBoundingClientRect(),s=new rr((o.bottom-o.top)/2,(o.right-o.left)/2);return{bearingDelta:_ne(new rr(n.x,a.y),a,s),pitchDelta:r?(a.y-n.y)*-.5:void 0}},moveStateManager:i,enable:!0,assignEvents:()=>{}}),this.map=e,t.addEventListener("mousedown",this.mousedown),t.addEventListener("touchstart",this.touchstart,{passive:!1}),t.addEventListener("touchcancel",this.reset)}startMove(e,t){this._rotatePitchHandler.dragStart(e,t),Xn.disableDrag()}move(e,t){let r=this.map,{bearingDelta:i,pitchDelta:n}=this._rotatePitchHandler.dragMove(e,t)||{};i&&r.setBearing(r.getBearing()+i),n&&r.setPitch(r.getPitch()+n)}off(){let e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){Xn.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}};Uoe={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%)"};Zot={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]},Rlt="#3FB1CE";_3=class extends o0{},zlt=class extends o0{},goe=class extends cu{constructor(e){if(super(),this._onClick=t=>{this.fire(new zlt("click",{originalEvent:t}))},this._onKeyPress=t=>{(t.code==="Space"||t.code==="Enter")&&this.togglePopup()},this._onKeyDown=t=>{if(!this._defaultMarker||!this._draggable||!this._map||!this._lngLat||t.composedPath()[0]!==this._element||t.altKey||t.ctrlKey||t.metaKey)return;let r=Zot[t.key];if(!r)return;t.preventDefault(),t.stopPropagation();let i=t.shiftKey?10:1,n=this._map.project(this._lngLat);this.setLngLat(this._map.unproject(new rr(n.x+r[0]*i,n.y+r[1]*i))),this._keyboardDragActive||(this._keyboardDragActive=!0,this.fire(new _3("dragstart"))),this.fire(new _3("drag"))},this._onKeyUp=t=>{Zot[t.key]&&this._endKeyboardDrag()},this._onBlur=()=>{this._endKeyboardDrag()},this._onMapClick=t=>{let r=t.originalEvent.target,i=this._element;this._popup&&(r===i||i.contains(r))&&this.togglePopup()},this._updateCoveredUnthrottled=()=>{var i,n;let t=(i=this._map)==null?void 0:i.terrain;if(!t||!this._isInViewport())return;let r=this._isCovered(t);r&&((n=this._popup)!=null&&n.isOpen())&&this._popup.remove(),this._element.style.opacity=r?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",r)},this._updateCovered=Ooe(this._updateCoveredUnthrottled,100),this._update=t=>{if(!this._map)return;this._lngLat=Plt(this._lngLat,this._flatPos,this._map._camera.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map._camera.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let r="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?r=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(r=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?i="rotateX(0deg)":this._pitchAlignment==="map"&&(i=`rotateX(${this._map.getPitch()}deg)`),!this._subpixelPositioning&&(t==null?void 0:t.type)!=="move"&&(this._pos=this._pos.round()),this._element.style.transform=`${Uoe[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${r}`,this._updateOpacity()},this._onMove=t=>{if(!this._isDragging){let r=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=r}this._isDragging&&(this._pos=t.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 _3("dragstart"))),this.fire(new _3("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 _3("dragend")),this._state="inactive"},this._addDragHandler=t=>{this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.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=(e==null?void 0:e.anchor)||"center",this._color=(e==null?void 0:e.color)||Rlt,this._scale=(e==null?void 0:e.scale)||1,this._draggable=(e==null?void 0:e.draggable)||!1,this._clickTolerance=(e==null?void 0:e.clickTolerance)||0,this._subpixelPositioning=(e==null?void 0:e.subpixelPositioning)||!1,this._isDragging=!1,this._roleManaged=!1,this._tabIndexManaged=!1,this._keyboardDragActive=!1,this._state="inactive",this._rotation=(e==null?void 0:e.rotation)||0,this._rotationAlignment=(e==null?void 0:e.rotationAlignment)||"auto",this._pitchAlignment=e!=null&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e==null?void 0:e.element)this._element=e.element,this._offset=rr.convert((e==null?void 0:e.offset)||[0,0]);else{this._defaultMarker=!0,this._element=Xn.create("div");let t=Kkr().cloneNode(!0);t.setAttributeNS(null,"height",`${41*this._scale}px`),t.setAttributeNS(null,"width",`${27*this._scale}px`),Jkr(t).setAttributeNS(null,"fill",this._color),this._element.appendChild(t),this._offset=rr.convert((e==null?void 0:e.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",t=>{t.preventDefault()}),this._element.addEventListener("mousedown",t=>{t.preventDefault()}),Ilt(this._element,this._anchor,"marker"),e==null?void 0:e.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._defaultMarker&&!this._element.hasAttribute("aria-label")&&this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._updateAccessibilityRole(),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),e.on("idle",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return 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("idle",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.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._element.removeEventListener("keypress",this._onKeyPress),this._keyboardDragActive=!1,this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=yn.convert(e),this._pos=null,this._update(),this._popup&&this._popup.setLngLat(this._lngLat),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress)),e){if(!("offset"in e.options)){let t=13.5/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,(24.6+t)*-1],"bottom-right":[-t,(24.6+t)*-1],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._element.addEventListener("keypress",this._onKeyPress)}return this._updateTabIndex(),this._updateAccessibilityRole(),this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}_endKeyboardDrag(){this._keyboardDragActive&&(this._keyboardDragActive=!1,this.fire(new _3("dragend")))}getPopup(){return this._popup}togglePopup(){let e=this._popup;if(this._element.style.opacity===this._opacityWhenCovered)return this;if(e)e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map));else return this;return this}_updateOpacity(){var r;if(!this._isInViewport())return;let e=(r=this._map)==null?void 0:r.terrain,t=this._map._camera.transform.isLocationOccluded(this._lngLat);if(!e||t){let i=t?this._opacityWhenCovered:this._opacity;this._element.style.opacity!==i&&(this._element.style.opacity=i,this._element.classList.toggle("maplibregl-marker-covered",t));return}this._updateCovered()}_isInViewport(){let{width:e,height:t}=this._map._camera.transform;return!!this._pos&&this._pos.x>=0&&this._pos.y>=0&&this._pos.x<=e&&this._pos.y<=t}_isCovered(e){let t=this._map._camera.transform,r=e.getElevationForLngLat(this._lngLat,t),i=Math.max(0,-this._offset.y)/t.pixelsPerMeter,n=Math.sin(this._map.getPitch()*Math.PI/180)*i;return t.isLocationOccluded(this._lngLat,e,r+n)}getOffset(){return this._offset}setOffset(e){return this._offset=rr.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._element.classList.toggle("maplibregl-marker-draggable",this._draggable),this._map&&(e?(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._defaultMarker&&(this._draggable?(this._element.addEventListener("keydown",this._onKeyDown),this._element.addEventListener("keyup",this._onKeyUp),this._element.addEventListener("blur",this._onBlur)):(this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._endKeyboardDrag())),this._updateTabIndex(),this._updateAccessibilityRole(),this}isDraggable(){return this._draggable}_updateTabIndex(){this._popup||this._defaultMarker&&this._draggable?this._element.hasAttribute("tabindex")||(this._element.setAttribute("tabindex","0"),this._tabIndexManaged=!0):this._tabIndexManaged&&(this._tabIndexManaged=(this._element.getAttribute("tabindex")==="0"&&this._element.removeAttribute("tabindex"),!1))}_updateAccessibilityRole(){if(!this._defaultMarker||this._element.hasAttribute("role")&&!this._roleManaged)return;let e=this._draggable||this._popup?"button":"img";this._element.setAttribute("role",e),this._roleManaged=!0}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(this._opacity===void 0||e===void 0&&t===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=String(e)),t!==void 0&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(),this}},Qkr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Xq=0,YC=!1,w3=class extends o0{},moe=class extends o0{},Blt=class extends o0{},eCr=class extends cu{constructor(e){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t)){this._setErrorState(),this.fire(new moe("outofmaxbounds",t)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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 Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(t),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new moe("geolocate",t)),this._finish()}},this._updateCamera=t=>{let r=new yn(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy,n=this._map.getBearing(),a=dn({bearing:n},this.options.fitBoundsOptions),o=Ov.fromLngLat(r,i);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=t=>{if(t){let r=new yn(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=t=>{if(this._map){if(t.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 r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&YC)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new Blt("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=t=>{if(!this._map)return;let r=(t==null?void 0:t[0])instanceof ResizeObserverEntry;!t.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!r&&!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 w3("trackuserlocationend")),this.fire(new w3("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",t=>{t.preventDefault()}),this._geolocateButton=Xn.create("button","maplibregl-ctrl-geolocate",this._container),Xn.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=t=>{if(this._map){if(t===!1){Pa("Geolocation support is not available so the GeolocateControl will be disabled.");let r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{let r=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Xn.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new goe({element:this._dotElement}),this._circleElement=Xn.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new goe({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=dn({},Qkr,e)}onAdd(e){return this._map=e,this._container=Xn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),Zkr().then(t=>this._finishSetupUI(t)),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,Xq=0,YC=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.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":break;case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!this.options.showUserLocation||!this.options.showAccuracyCircle||!this._accuracy||!e)return;let t=this._map.project(e),r=this._map.unproject([t.x+100,t.y]),i=e.distanceTo(r)/100,n=2*this._accuracy/i;this._circleElement.style.width=`${n.toFixed(2)}px`,this._circleElement.style.height=`${n.toFixed(2)}px`}trigger(){if(!this._setup)return Pa("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 w3("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xq--,YC=!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 w3("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 w3("trackuserlocationstart")),this.fire(new w3("userlocationfocus"));break;default:throw 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 Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xq++;let e;Xq>1?(e={maximumAge:6e5,timeout:0},YC=!0):(e=this.options.positionOptions,YC=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}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)}},tCr={maxWidth:100,unit:"metric"},rCr=class{constructor(e){this._onMove=()=>{Kot(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,Kot(this._map,this._container,this.options)},this.options=fn(fn({},tCr),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=Xn.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.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}};yoe=class extends o0{},aCr=class extends cu{constructor(e={}){var t;super(),this._onFullscreenChange=()=>{var i;let r=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;(i=r==null?void 0:r.shadowRoot)!=null&&i.fullscreenElement;)r=r.shadowRoot.fullscreenElement;r===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(t=e.pseudo)!=null?t:!1,e!=null&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:Pa("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(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=Xn.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 e=this._fullscreenButton=Xn.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);Xn.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_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 yoe("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new yoe("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()}},oCr=class{constructor(e){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=e}onAdd(e){return this._map=e,this._container=Xn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=Xn.create("button","maplibregl-ctrl-terrain",this._container),Xn.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}},sCr=class{constructor(){this._toggleProjection=()=>{var t;let e=(t=this._map.getProjection())==null?void 0:t.type;e==="mercator"||!e?this._map.setProjection({type:"globe"}):this._map.setProjection({type:"mercator"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((e=this._map.getProjection())==null?void 0:e.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(e){return this._map=e,this._container=Xn.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=Xn.create("button","maplibregl-ctrl-globe",this._container),Xn.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}},lCr={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},uCr=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),xoe=class extends o0{},cCr=class extends cu{constructor(e){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._map._camera.transform.isLocationOccluded(this.getLngLat())?this._container.style.opacity=`${this.options.locationOccludedOpacity}`:this._container.style.opacity="")},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("idle",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 xoe("close"))),this),this._update=t=>{let r=this._lngLat||this._trackPointer;if(!this._map||!r||!this._content)return;if(!this._container){if(this._container=Xn.create("div","maplibregl-popup",this._map.getContainer()),this._tip=Xn.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let l of this.options.className.split(" "))this._container.classList.add(l);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Plt(this._lngLat,this._flatPos,this._map._camera.transform,this._trackPointer);let i;if(t&&"point"in t&&t.point&&(i=t.point),this._trackPointer&&!i)return;let n=this._flatPos=this._pos=this._trackPointer&&i?i:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&i?i:this._map._camera.transform.locationToScreenPoint(this._lngLat));let a=this.options.anchor,o=qlt(this.options.offset);if(!a){let l=this._container.offsetWidth,u=this._container.offsetHeight,c=fCr(this.options.padding),f;f=n.y+o.bottom.ythis._map._camera.transform.height-u-c.bottom?["bottom"]:[],n.xthis._map._camera.transform.width-l/2-c.right&&f.push("right"),a=f.length===0?"bottom":f.join("-")}let s=n.add(o[a]);this.options.subpixelPositioning||(s=s.round()),this._container.style.transform=`${Uoe[a]} translate(${s.x}px,${s.y}px)`,Ilt(this._container,a,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=dn(Object.create(lCr),e)}addTo(e){return this._map&&this.remove(),this._map=e,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._map.on("idle",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 xoe("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=yn.convert(e),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(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t=document.createDocumentFragment(),r=document.createElement("body"),i;for(r.innerHTML=e;i=r.firstChild,i;)t.appendChild(i);return this.setDOMContent(t)}getMaxWidth(){var e;return(e=this._container)==null?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=Xn.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}setPadding(e){this.options.padding=e,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=Xn.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 e=this._container.querySelector(uCr);e&&e.focus()}};hCr=Jot});var Glt=W((Wli,Vlt)=>{"use strict";Vlt.exports='var D1=Object.defineProperty,_1=Object.defineProperties;var A1=Object.getOwnPropertyDescriptors;var lh=Object.getOwnPropertySymbols;var S1=Object.prototype.hasOwnProperty,E1=Object.prototype.propertyIsEnumerable;var uh=(t,e,r)=>e in t?D1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xe=(t,e)=>{for(var r in e||(e={}))S1.call(e,r)&&uh(t,r,e[r]);if(lh)for(var r of lh(e))E1.call(e,r)&&uh(t,r,e[r]);return t},Si=(t,e)=>_1(t,A1(e));var et=(t,e,r)=>new Promise((i,n)=>{var a=l=>{try{o(r.next(l))}catch(u){n(u)}},s=l=>{try{o(r.throw(l))}catch(u){n(u)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,s);o((r=r.apply(t,e)).next())});var F1=Object.create,Dp=Object.defineProperty,T1=Object.getOwnPropertyDescriptor,k1=Object.getOwnPropertyNames,I1=Object.getPrototypeOf,_p=Object.prototype.hasOwnProperty,ml=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),C1=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=k1(e),a=0,s=n.length,o;ae[l]).bind(null,o),enumerable:!(i=T1(e,o))||i.enumerable});return t},M1=(t,e,r)=>(r=t==null?{}:F1(I1(t)),C1(e||!t||!t.__esModule||!_p.call(t,"default")?Dp(r,"default",{value:t,enumerable:!0}):r,t));function M(t,e){this.x=t,this.y=e}M.prototype={clone(){return new M(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){let e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){let e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){let t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){let e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround(t,e){let r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),a=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:M},M.convert=function(t){if(t instanceof M)return t;if(Array.isArray(t))return new M(+t[0],+t[1]);if(t.x!==void 0&&t.y!==void 0)return new M(+t.x,+t.y);throw Error("Expected [x, y] or {x, y} point format")};function B1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var Ei;function P1(){return Ei!=null||(Ei=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Ei}var Xn;function z1(){if(Xn==null&&(Xn=!1,P1())){let t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let r=0;r<25;r++){let i=r*4;t.fillStyle=`rgb(${i},${i+1},${i+2})`,t.fillRect(r%5,Math.floor(r/5),1,1)}let e=t.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&e[r]!==r){Xn=!0;break}}}return Xn||!1}var fe=typeof Float32Array<"u"?Float32Array:Array;function L1(){var t=new fe(9);return fe!=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}function Ap(){var t=new fe(3);return fe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function V1(t){var e=t[0],r=t[1],i=t[2];return Math.sqrt(e*e+r*r+i*i)}function hh(t,e,r){var i=new fe(3);return i[0]=t,i[1]=e,i[2]=r,i}function O1(t,e){var r=e[0],i=e[1],n=e[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function R1(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ks(t,e,r){var i=e[0],n=e[1],a=e[2],s=r[0],o=r[1],l=r[2];return t[0]=n*l-a*o,t[1]=a*s-i*l,t[2]=i*o-n*s,t}var $1=V1;(function(){var t=Ap();return function(e,r,i,n,a,s){var o,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=i*s,t[2]=n*s,t[3]=a*s,t}function q1(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*s,t[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*s,t[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*s,t[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*s,t}(function(){var t=N1();return function(e,r,i,n,a,s){var o,l;for(r||(r=4),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o1e-6?(p=Math.acos(f),d=Math.sin(p),y=Math.sin((1-i)*p)/d,m=Math.sin(i*p)/d):(y=1-i,m=i),t[0]=y*n+m*l,t[1]=y*a+m*u,t[2]=y*s+m*h,t[3]=y*o+m*c,t}function G1(t,e){var r=e[0]+e[4]+e[8],i;if(r>0)i=Math.sqrt(r+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var n=0;e[4]>e[0]&&(n=1),e[8]>e[n*3+n]&&(n=2);var a=(n+1)%3,s=(n+2)%3;i=Math.sqrt(e[n*3+n]-e[a*3+a]-e[s*3+s]+1),t[n]=.5*i,i=.5/i,t[3]=(e[a*3+s]-e[s*3+a])*i,t[a]=(e[a*3+n]+e[n*3+a])*i,t[s]=(e[s*3+n]+e[n*3+s])*i}return t}var ph=U1;(function(){var t=Ap(),e=hh(1,0,0),r=hh(0,1,0);return function(i,n,a){var s=R1(n,a);return s<-.999999?(ks(t,e,n),$1(t)<1e-6&&ks(t,r,n),O1(t,t),j1(i,t,Math.PI),i):s>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(ks(t,n,a),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+s,ph(i,i))}})(),(function(){var t=ch(),e=ch();return function(r,i,n,a,s,o){return Is(t,i,s,o),Is(e,n,a,o),Is(r,t,e,2*o*(1-o)),r}})(),(function(){var t=L1();return function(e,r,i,n){return t[0]=i[0],t[3]=i[1],t[6]=i[2],t[1]=n[0],t[4]=n[1],t[7]=n[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],ph(e,G1(e,t))}})();function X1(){var t=new fe(2);return fe!=Float32Array&&(t[0]=0,t[1]=0),t}(function(){var t=X1();return function(e,r,i,n,a,s){var o,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o=1)return 1;let e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function W1(t,e,r,i){return B1(t,e,r,i)}var D5=W1(.25,.1,.25,1);function en(t,e,r){return Math.min(r,Math.max(e,t))}function Z1(t,e,r){let i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function Xt(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function H1(t){return Math.log(t)/Math.LN2%1==0}function xn(t,e,r){let i={};for(let n in t)i[n]=e.call(r||this,t[n],n,t);return i}function K1(t,e,r){let i={};for(let n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function to(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r(e.y-t.y)*(r.x-t.x)}function vr(t){return typeof WorkerGlobalScope<"u"&&t!==void 0&&t instanceof WorkerGlobalScope}function Ba(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap}function J1(t,e,r,i,n){let a=Math.max(-e,0)*4,s=(Math.max(0,r)-r)*i*4+a,o=i*4,l=Math.max(0,e),u=Math.max(0,r),h=Math.min(t.width,e+i),c=Math.min(t.height,r+n);return{rect:{x:l,y:u,width:h-l,height:c-u},layout:[{offset:s,stride:o}]}}function Q1(t,e,r,i,n){return et(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(t,{timestamp:0});try{let s=a==null?void 0:a.format;if(!s||!(s.startsWith("BGR")||s.startsWith("RGB")))throw Error(`Unrecognized format ${s}`);let o=s.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,J1(t,e,r,i,n)),o)for(let u=0;u{t.removeEventListener(e,r,i)}}}function yh(t){return t*Math.PI/180}var mh="AbortError",gl=class extends Error{constructor(t=mh){super(t instanceof Error?t.message:t),this.name=mh,t instanceof Error&&t.stack&&(this.stack=t.stack)}};function xl(t){return t instanceof Error&&t.name==="AbortError"}function e0(t){if(t.aborted)throw new gl(t.reason)}var vl={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function r0(t){return vl.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}function Fp(t,e){vl.REGISTERED_PROTOCOLS[t]=e}function Tp(t){delete vl.REGISTERED_PROTOCOLS[t]}var gh="global-dispatcher",ga=class extends Error{constructor(t,e,r,i){super(`AJAXError: ${e} (${t}): ${r}`),this.status=t,this.statusText=e,this.url=r,this.body=i}};function kp(){var t;if(vr(self))return(t=self.worker)==null?void 0:t.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(e){}return window.location.href}var i0=t=>{var e;return t.startsWith("file:")||((e=kp())==null?void 0:e.startsWith("file:"))&&!/^\\w+:/.test(t)};function n0(t,e){return et(this,null,function*(){let r=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:kp(),referrerPolicy:t.referrerPolicy,signal:e.signal});t.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(s){throw xl(s)?s:new ga(0,tn(s).message,t.url,new Blob)}if(!i.ok){let s=yield i.blob();throw new ga(i.status,i.statusText,t.url,s)}let n;n=t.type==="arrayBuffer"||t.type==="image"?i.arrayBuffer():t.type==="json"?i.json():i.text();let a=yield n;return e0(e.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function a0(t,e){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(t.method||"GET",t.url,!0),(t.type==="arrayBuffer"||t.type==="image")&&(n.responseType="arraybuffer");for(let s in t.headers)n.setRequestHeader(s,t.headers[s]);t.type==="json"&&(n.responseType="text",(a=t.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=t.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!e.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(t.type==="json")try{s=JSON.parse(n.response)}catch(o){i(o);return}r({data:s,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let s=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new ga(n.status,n.statusText,t.url,s))}},e.signal.addEventListener("abort",()=>{n.abort(),i(new gl(e.signal.reason))}),n.send(t.body)})}var Pa=function(t,e){return et(this,null,function*(){var r,i;if(t.url.includes("://")&&!/^https?:|^file:/.test(t.url)){let n=r0(t.url);if(n){let a=yield n(t,e);return!a.data&&t.type==="arrayBuffer"?Xt(a,{data:new ArrayBuffer(0)}):a}if(vr(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:gh},e)}if(!i0(t.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return n0(t,e);if(vr(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:gh},e)}return a0(t,e)})},Ip=(t,e)=>Pa(Xt(t,{type:"json"}),e),Cp=(t,e)=>Pa(Xt(t,{type:"arrayBuffer"}),e);function xh(t,e,r){var i;(i=r[t])!=null&&i.includes(e)||(r[t]||(r[t]=[]),r[t].push(e))}function Cs(t,e,r){if(r!=null&&r[t]){let i=r[t].indexOf(e);i!==-1&&r[t].splice(i,1)}}var Mp=class{constructor(t,e={}){Xt(this,e),this.type=t}},xa=class extends Mp{constructor(t,e={}){super("error",Xt({error:t},e))}},s0=class{on(t,e){return this._listeners||(this._listeners={}),xh(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e)}}}off(t,e){return Cs(t,e,this._listeners),Cs(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners||(this._oneTimeListeners={}),xh(t,e,this._oneTimeListeners),this):new Promise(r=>this.once(t,r))}fire(t,e){var n,a,s,o,l,u;let r=typeof t=="string"?new Mp(t,e||{}):t,i=r.type;if(this.listens(i)){r.target=this;let h=(s=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?s:[];for(let f of h)f.call(this,r);let c=(u=(l=(o=this._oneTimeListeners)==null?void 0:o[i])==null?void 0:l.slice())!=null?u:[];for(let f of c)Cs(i,f,this._oneTimeListeners),f.call(this,r);let p=this._eventedParent;p&&(Xt(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(r))}else r instanceof xa&&console.error(r.error);return this}listens(t){var e,r,i,n,a;return!!((r=(e=this._listeners)==null?void 0:e[t])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[t])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}},Bp={$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:{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"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"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","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"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"}]}}}}},D=Bp,Pp=["type","source","source-layer","minzoom","maxzoom","filter","layout"],E=class{constructor(t,e,r,i,n="error"){this.message=(t?`${t}: `:"")+r,i&&(this.identifier=i),this.severity=n,e!=null&&e.__line__&&(this.line=e.__line__)}},vn={kind:"null"},I={kind:"number"},W={kind:"string"},Q={kind:"boolean"},pe={kind:"color"},za={kind:"projectionDefinition"},mr={kind:"object"},H={kind:"value"},o0={kind:"error"},La={kind:"collator"},bn={kind:"formatted"},Va={kind:"padding"},rn={kind:"colorArray"},Oa={kind:"numberArray"},wn={kind:"resolvedImage"},Ra={kind:"variableAnchorOffsetCollection"};function Ut(t,e){return{kind:"array",itemType:t,N:e}}function mt(t){if(t.kind==="array"){let e=mt(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}var l0=[vn,I,W,Q,pe,za,bn,mr,Ut(H),Va,Oa,rn,wn,Ra];function nn(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!nn(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(let r of l0)if(!nn(r,e))return null}}return`Expected ${mt(t)} but found ${mt(e)} instead.`}function bl(t,e){return e.some(r=>r.kind===t.kind)}function gr(t,e){return e.some(r=>r==="null"?t===null:r==="array"?Array.isArray(t):r==="object"?t&&!Array.isArray(t)&&typeof t=="object":r===typeof t)}function Ye(t,e){return t.kind==="array"&&e.kind==="array"?t.itemType.kind===e.itemType.kind&&typeof t.N=="number":t.kind===e.kind}var zp=.96422,Lp=.82521,Vp=4/29,eo=6/29,Op=3*eo*eo,u0=Math.PI/180,h0=180/Math.PI;function Rp(t){return t%=360,t<0&&(t+=360),t}function $p([t,e,r,i]){t=Ms(t),e=Ms(e),r=Ms(r);let n,a,s=Bs((.2225045*t+.7168786*e+.0606169*r)/1);t===e&&e===r?n=a=s:(n=Bs((.4360747*t+.3850649*e+.1430804*r)/zp),a=Bs((.0139322*t+.0971045*e+.7141733*r)/Lp));let o=116*s-16;return[o<0?0:o,500*(n-s),200*(s-a),i]}function Ms(t){return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Bs(t){return t>.008856451679035631?t**(1/3):t/Op+Vp}function Np([t,e,r,i]){let n=(t+16)/116,a=isNaN(e)?n:n+e/500,s=isNaN(r)?n:n-r/200;return n=1*zs(n),a=zp*zs(a),s=Lp*zs(s),[Ps(3.1338561*a-1.6168667*n-.4906146*s),Ps(-.9787684*a+1.9161415*n+.033454*s),Ps(.0719453*a-.2289914*n+1.4052427*s),i]}function Ps(t){return t=t<=.00304?12.92*t:1.055*t**(1/2.4)-.055,t<0?0:t>1?1:t}function zs(t){return t>eo?t*t*t:Op*(t-Vp)}function c0(t){let[e,r,i,n]=$p(t),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?Rp(Math.atan2(i,r)*h0):NaN,a,e,n]}function p0([t,e,r,i]){return t=isNaN(t)?0:t*u0,Np([r,Math.cos(t)*e,Math.sin(t)*e,i])}function f0([t,e,r,i]){t=Rp(t),e/=100,r/=100;function n(a){let s=(a+t/30)%12,o=e*Math.min(r,1-r);return r-o*Math.max(-1,Math.min(s-3,9-s,1))}return[n(0),n(8),n(4),i]}var d0=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};function Yi(t,e){return d0(t,e)?t[e]:void 0}function y0(t){if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e=Yi(m0,t);if(e){let[i,n,a]=e;return[i/255,n/255,a/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){let i=t.length<6?1:2,n=1;return[Yn(t.slice(n,n+=i)),Yn(t.slice(n,n+=i)),Yn(t.slice(n,n+=i)),Yn(t.slice(n,n+i)||"ff")]}if(t.startsWith("rgb")){let i=t.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(i){let[n,a,s,o,l,u,h,c,p,f,d,y]=i,m=[o||" ",h||" ",f].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[s,u,p].join(""),x=g==="%%%"?100:g===""?255:0;if(x){let v=[Rr(+a/x,0,1),Rr(+l/x,0,1),Rr(+c/x,0,1),d?vh(+d,y):1];if(bh(v))return v}}return}}let r=t.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(r){let[i,n,a,s,o,l,u,h,c]=r,p=[a||" ",o||" ",u].join("");if(p===" "||p===" /"||p===",,"||p===",,,"){let f=[+n,Rr(+s,0,100),Rr(+l,0,100),h?vh(+h,c):1];if(bh(f))return f0(f)}}}function Yn(t){return parseInt(t.padEnd(2,t),16)/255}function vh(t,e){return Rr(e?t/100:t,0,1)}function Rr(t,e,r){return Math.min(Math.max(e,t),r)}function bh(t){return!t.some(Number.isNaN)}var m0={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 er(t,e,r){return t+r*(e-t)}function ti(t,e,r){return t.map((i,n)=>er(i,e[n],r))}function g0(t){return t==="rgb"||t==="hcl"||t==="lab"}var Bt,xt=(Bt=class{constructor(e,r,i,n=1,a=!0){this.r=e,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,r,i,n]))}static parse(e){if(e instanceof Bt)return e;if(typeof e!="string")return;let r=y0(e);if(r)return new Bt(...r,!1)}get rgb(){let{r:e,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[e/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",c0(this.rgb))}get lab(){return this.overwriteGetter("lab",$p(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,i,n]=this.rgb;return`rgba(${[e,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(e,r,i,n="rgb"){switch(n){case"rgb":{let[a,s,o,l]=ti(e.rgb,r.rgb,i);return new Bt(a,s,o,l,!1)}case"hcl":{let[a,s,o,l]=e.hcl,[u,h,c,p]=r.hcl,f,d;if(!isNaN(a)&&!isNaN(u)){let v=u-a;u>a&&v>180?v-=360:u180&&(v+=360),f=a+i*v}else isNaN(a)?isNaN(u)?f=NaN:(f=u,(o===1||o===0)&&(d=h)):(f=a,(c===1||c===0)&&(d=s));let[y,m,g,x]=p0([f,d!=null?d:er(s,h,i),er(o,c,i),er(l,p,i)]);return new Bt(y,m,g,x,!1)}case"lab":{let[a,s,o,l]=Np(ti(e.lab,r.lab,i));return new Bt(a,s,o,l,!1)}}}},Bt.black=new Bt(0,0,0,1),Bt.white=new Bt(1,1,1,1),Bt.transparent=new Bt(0,0,0,0),Bt.red=new Bt(1,0,0,1),Bt),x0=["bottom","center","top"],ro=class{constructor(t,e,r,i,n,a){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}},Le=class ha{constructor(e){this.sections=e}static fromString(e){return new ha([new ro(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof ha?e:ha.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}},Ee=class Ri{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Ri)return e;if(typeof e=="number")return new Ri([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Ri(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Ri(ti(e.values,r.values,i))}},Fe=class $i{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof $i)return e;if(typeof e=="number")return new $i([e]);if(Array.isArray(e)){for(let r of e)if(typeof r!="number")return;return new $i(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new $i(ti(e.values,r.values,i))}},ue=class Ni{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Ni)return e;if(typeof e=="string"){let i=xt.parse(e);return i?new Ni([i]):void 0}if(!Array.isArray(e))return;let r=[];for(let i of e){if(typeof i!="string")return;let n=xt.parse(i);if(!n)return;r.push(n)}return new Ni(r)}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i,n="rgb"){let a=[];if(e.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let s=0;s=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[t,e,r,i].join(", ")}]: \'a\' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[t,e,r,i]:[t,e,r]).join(", ")}]: \'r\', \'g\', and \'b\' must be between 0 and 255.`}function ei(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof Sr||t instanceof xt||t instanceof wl||t instanceof Le||t instanceof Ee||t instanceof Fe||t instanceof ue||t instanceof Ae||t instanceof Se)return!0;if(Array.isArray(t)){for(let e of t)if(!ei(e))return!1;return!0}if(typeof t=="object"){for(let e in t)if(!ei(t[e]))return!1;return!0}return!1}function St(t){if(t===null)return vn;if(typeof t=="string")return W;if(typeof t=="boolean")return Q;if(typeof t=="number")return I;if(t instanceof xt)return pe;if(t instanceof Sr)return za;if(t instanceof wl)return La;if(t instanceof Le)return bn;if(t instanceof Ee)return Va;if(t instanceof Fe)return Oa;if(t instanceof ue)return rn;if(t instanceof Ae)return Ra;if(t instanceof Se)return wn;if(Array.isArray(t)){let e=t.length,r;for(let i of t){let n=St(i);if(!r)r=n;else{if(r===n)continue;r=H;break}}return Ut(r||H,e)}return mr}function Wi(t){let e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof xt||t instanceof Sr||t instanceof Le||t instanceof Ee||t instanceof Fe||t instanceof ue||t instanceof Ae||t instanceof Se?t.toString():JSON.stringify(t)}var ri=class jp{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`\'literal\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=St(i),a=r.expectedType;return n.kind==="array"&&n.N===0&&a&&a.kind==="array"&&(typeof a.N!="number"||a.N===0)&&(n=a),new jp(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}},b0=["Unknown","Point","LineString","Polygon"],Gp=class{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"?b0[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(t){let e=this._parseColorCache.get(t);return e||(e=xt.parse(t),this._parseColorCache.set(t,e)),e}};function $a(t,e,r){let i=t.length-1,n=0,a=i,s=0,o,l;for(;n<=a;)if(s=Math.floor((n+a)/2),o=t[s],l=t[s+1],o<=e){if(s===i||ee)a=s-1;else throw new ft("Input is not a number.",r);return 0}var Dl=class Xp{constructor(e,r,i,n){this.type=e,this.input=r,this.key=n,this.labels=[],this.outputs=[];for(let[a,s]of i)this.labels.push(a),this.outputs.push(s)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=[],a=null;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);for(let s=1;s=o)return r.error(\'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.\',u);let c=r.parse(l,h,a);if(!c)return null;a||(a=c.type),n.push([o,c])}return new Xp(a,i,n,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(e):i[$a(r,n,this.key)].evaluate(e)}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function w0(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var De=class io{constructor(e,r,i,n,a,s){this.type=e,this.operator=r,this.interpolation=i,this.input=n,this.key=s,this.labels=[],this.outputs=[];for(let[o,l]of a)this.labels.push(o),this.outputs.push(l)}static interpolationFactor(e,r,i,n){let a=0;if(e.name==="exponential")a=Ls(r,e.base,i,n);else if(e.name==="linear")a=Ls(r,1,i,n);else if(e.name==="cubic-bezier"){let s=e.controlPoints;a=w0(s[0],s[1],s[2],s[3])(Ls(r,1,i,n))}return a}static parse(e,r){let[i,n,a,...s]=e;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(h=>typeof h!="number"||h<0||h>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,I),!a)return null;let o=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=rn?l=pe:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u=h)return r.error(\'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.\',p);let d=r.parse(c,f,l);if(!d)return null;l||(l=d.type),o.push([h,d])}return!Ye(l,I)&&!Ye(l,za)&&!Ye(l,pe)&&!Ye(l,Va)&&!Ye(l,Oa)&&!Ye(l,rn)&&!Ye(l,Ra)&&!Ye(l,Ut(I))?r.error(`Type ${mt(l)} is not interpolatable.`):new io(l,i,n,a,o,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(e);let s=$a(r,n,this.key),o=r[s],l=r[s+1],u=io.interpolationFactor(this.interpolation,n,o,l),h=i[s].evaluate(e),c=i[s+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return er(h,c,u);case"color":return xt.interpolate(h,c,u);case"padding":return Ee.interpolate(h,c,u);case"colorArray":return ue.interpolate(h,c,u);case"numberArray":return Fe.interpolate(h,c,u);case"variableAnchorOffsetCollection":return Ae.interpolate(h,c,u,this.key);case"array":return ti(h,c,u);case"projectionDefinition":return Sr.interpolate(h,c,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return xt.interpolate(h,c,u,"hcl");case"colorArray":return ue.interpolate(h,c,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return xt.interpolate(h,c,u,"lab");case"colorArray":return ue.interpolate(h,c,u,"lab")}}}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function Ls(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}var br={color:xt.interpolate,number:er,padding:Ee.interpolate,numberArray:Fe.interpolate,colorArray:ue.interpolate,variableAnchorOffsetCollection:Ae.interpolate,array:ti},Yp=class Wp{constructor(e){this.type=bn,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let s=1;s<=e.length-1;++s){let o=e[s];if(a&&typeof o=="object"&&!Array.isArray(o)){a=!1;let l=null;if(o["font-scale"]&&(l=r.parse(o["font-scale"],1,I),!l))return null;let u=null;if(o["text-font"]&&(u=r.parse(o["text-font"],1,Ut(W)),!u))return null;let h=null;if(o["text-color"]&&(h=r.parse(o["text-color"],1,pe),!h))return null;let c=null;if(o["vertical-align"]){if(typeof o["vertical-align"]=="string"&&!x0.includes(o["vertical-align"]))return r.error(`\'vertical-align\' must be one of: \'bottom\', \'center\', \'top\' but found \'${o["vertical-align"]}\' instead.`);if(c=r.parse(o["vertical-align"],1,W),!c)return null}let p=n[n.length-1];p.scale=l,p.font=u,p.textColor=h,p.verticalAlign=c}else{let l=r.parse(e[s],1,H);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be \'string\', \'value\', \'image\' or \'null\'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Wp(n)}evaluate(e){return new Le(this.sections.map(r=>{let i=r.content.evaluate(e);return St(i)===wn?new ro("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(e):null):new ro(Wi(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null,r.verticalAlign?r.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor),r.verticalAlign&&e(r.verticalAlign)}outputDefined(){return!1}};function Zp(t,e,r=0,i=t.length-1,n=D0){for(;i>r;){if(i-r>600){let l=i-r+1,u=e-r+1,h=Math.log(l),c=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*c*(l-c)/l)*(u-l/2<0?-1:1);Zp(t,e,Math.max(r,Math.floor(e-u*c/l+p)),Math.min(i,Math.floor(e+(l-u)*c/l+p)),n)}let a=t[e],s=r,o=i;for(ki(t,r,e),n(t[i],a)>0&&ki(t,r,i);s0;)o--}n(t[r],a)===0?ki(t,r,o):(o++,ki(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}}function ki(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function D0(t,e){return te)}function Na(t,e){if(t.length<=1)return[t];let r=[],i,n;for(let a of t){let s=A0(a);s!==0&&(a.area=Math.abs(s),n===void 0&&(n=s<0),n===s<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),e>1)for(let a=0;a2){let u=e[1];if(typeof u!="string"||!(u in Wn)||u==="object")return r.error(\'The item type argument of "array" must be one of string, number, boolean\',1);o=Wn[u],i++}else o=H;let l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error(\'The length argument to "array" must be a positive integer literal\',2);l=e[2],i++}n=Ut(o,l)}else{if(!Wn[a])throw Error(`Types doesn\'t contain name = ${a}`);n=Wn[a]}let s=[];for(;ie.outputDefined())}},wh={"to-boolean":Q,"to-color":pe,"to-number":I,"to-string":W},jr=class Kp{constructor(e,r,i){this.type=e,this.args=r,this.key=i}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[0];if(!wh[i])throw Error(`Can\'t parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&e.length!==2)return r.error("Expected one argument.");let n=wh[i],a=[];for(let s=1;s4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:qp(r[0],r[1],r[2],r[3]),!i))return new xt(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new ft(i||`Could not parse color from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(e);let n=Ee.parse(r);if(n)return n}throw new ft(`Could not parse padding from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=Fe.parse(r);if(n)return n}throw new ft(`Could not parse numberArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=ue.parse(r);if(n)return n}throw new ft(`Could not parse colorArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(e);let n=Ae.parse(r);if(n)return n}throw new ft(`Could not parse variableAnchorOffsetCollection from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(e),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new ft(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return Le.fromString(Wi(this.args[0].evaluate(e)));case"resolvedImage":return Se.fromString(Wi(this.args[0].evaluate(e)));case"projectionDefinition":{let r=this.args[0].evaluate(e);if(Sr.parse(r))return r;throw new ft(`Could not parse projectionDefinition from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}default:return Wi(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},Jp=class Qp{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let i=[];for(let a=1;a=i.length)throw new ft(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new ft(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},E0=class nf{constructor(e,r,i){this.needle=e,this.haystack=r,this.key=i,this.type=Q}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,H),n=r.parse(e[2],2,H);return!i||!n?null:bl(i.type,[Q,W,I,vn,H])?new nf(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(i.type)} instead`)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!gr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${mt(St(r))} instead.`,this.key);if(!gr(i,["string","array"]))throw new ft(`Expected second argument to be of type array or string, but found ${mt(St(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},F0=class no{constructor(e,r,i,n){this.needle=e,this.haystack=r,this.key=i,this.fromIndex=n,this.type=I}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,H),n=r.parse(e[2],2,H);if(!i||!n)return null;if(!bl(i.type,[Q,W,I,vn,H]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new no(i,n,r.key,a):null}return new no(i,n,r.key)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!gr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${mt(St(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(e)),gr(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(gr(i,["array"]))return i.indexOf(r,n);throw new ft(`Expected second argument to be of type array or string, but found ${mt(St(i))} instead.`,this.key)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},T0=class af{constructor(e,r,i,n,a,s){this.inputType=e,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=s}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},s=[];for(let u=2;u2**53-1)return p.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof d=="number"&&Math.floor(d)!==d)return p.error("Numeric branch labels must be integer values.");if(!i)i=St(d);else if(p.checkSubtype(i,St(d)))return null;if(a[String(d)]!==void 0)return p.error("Branch labels must be unique.");a[String(d)]=s.length}let f=r.parse(c,u,n);if(!f)return null;n||(n=f.type),s.push(f)}let o=r.parse(e[1],1,H);if(!o)return null;let l=r.parse(e[e.length-1],e.length-1,n);return!l||o.type.kind!=="value"&&r.concat(1).checkSubtype(i,o.type)?null:new af(i,n,o,a,s,l)}evaluate(e){let r=this.input.evaluate(e);return(St(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},k0=class sf{constructor(e,r,i){this.type=e,this.branches=r,this.otherwise=i}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let s=1;sr.outputDefined())&&this.otherwise.outputDefined()}},I0=class ao{constructor(e,r,i,n,a){this.type=e,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,H),n=r.parse(e[2],2,I);if(!i||!n)return null;if(!bl(i.type,[Ut(H),W,H]))return r.error(`Expected first argument to be of type array or string, but found ${mt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new ao(i.type,i,n,r.key,a):null}return new ao(i.type,i,n,r.key)}evaluate(e){let r=this.input.evaluate(e),i=this.beginIndex.evaluate(e),n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),gr(r,["string"]))return[...r].slice(i,n).join("");if(gr(r,["array"]))return r.slice(i,n);throw new ft(`Expected first argument to be of type array or string, but found ${mt(St(r))} instead.`,this.key)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},of=class so{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let s of e.slice(1)){let o=r.parse(s,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!o)return null;i||(i=o.type),a.push(o)}if(!i)throw Error("No output type");return n&&a.some(s=>nn(n,s.type))?new so(H,a):new so(i,a)}evaluate(e){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(e),r&&r instanceof Se&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function Dh(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function C0(t,e,r){return e===r}function M0(t,e,r){return e!==r}function B0(t,e,r){return er}function z0(t,e,r){return e<=r}function L0(t,e,r){return e>=r}function lf(t,e,r,i){return i.compare(e,r)===0}function V0(t,e,r,i){return!lf(t,e,r,i)}function O0(t,e,r,i){return i.compare(e,r)<0}function R0(t,e,r,i){return i.compare(e,r)>0}function $0(t,e,r,i){return i.compare(e,r)<=0}function N0(t,e,r,i){return i.compare(e,r)>=0}function li(t,e,r){let i=t!=="=="&&t!=="!=";return class uf{constructor(a,s,o,l){this.lhs=a,this.rhs=s,this.key=o,this.collator=l,this.type=Q,this.hasUntypedArgument=a.type.kind==="value"||s.type.kind==="value"}static parse(a,s){if(a.length!==3&&a.length!==4)return s.error("Expected two or three arguments.");let o=a[0],l=s.parse(a[1],1,H);if(!l)return null;if(!Dh(o,l.type))return s.concat(1).error(`"${o}" comparisons are not supported for type \'${mt(l.type)}\'.`);let u=s.parse(a[2],2,H);if(!u)return null;if(!Dh(o,u.type))return s.concat(2).error(`"${o}" comparisons are not supported for type \'${mt(u.type)}\'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error(`Cannot compare types \'${mt(l.type)}\' and \'${mt(u.type)}\'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Be(u.type,[l],s.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Be(l.type,[u],s.key)));let h=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(h=s.parse(a[3],3,La),!h)return null}return new uf(l,u,s.key,h)}evaluate(a){let s=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=St(s),u=St(o);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new ft(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=St(s),u=St(o);if(l.kind!=="string"||u.kind!=="string")return e(a,s,o)}return this.collator?r(a,s,o,this.collator.evaluate(a)):e(a,s,o)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}var U0=li("==",C0,lf),q0=li("!=",M0,V0),j0=li("<",B0,O0),G0=li(">",P0,R0),X0=li("<=",z0,$0),Y0=li(">=",L0,N0),hf=class cf{constructor(e,r,i){this.type=La,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");let i=e[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,Q);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,Q);if(!a)return null;let s=null;return i.locale&&(s=r.parse(i.locale,1,W),!s)?null:new cf(n,a,s)}evaluate(e){return new wl(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},W0=class pf{constructor(e,r,i,n,a,s){this.type=W,this.number=e,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=s}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=e[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,W),!a))return null;let s=null;if(n.currency&&(s=r.parse(n.currency,1,W),!s))return null;let o=null;if(n.unit&&(o=r.parse(n.unit,1,W),!o))return null;if(s&&o)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&(l=r.parse(n["min-fraction-digits"],1,I),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,I),!u)?null:new pf(i,a,s,o,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},Z0=class ff{constructor(e){this.type=wn,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");let i=r.parse(e[1],1,W);return i?new ff(i):r.error("No image name provided.")}evaluate(e){let r=this.input.evaluate(e),i=Se.fromString(r);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(r)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}},H0=class df{constructor(e,r){this.input=e,this.key=r,this.type=I}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=r.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${mt(i.type)} instead.`):new df(i,r.key):null}evaluate(e){let r=this.input.evaluate(e);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new ft(`Expected value to be of type string or array, but found ${mt(St(r))} instead.`,this.key)}eachChild(e){e(this.input)}outputDefined(){return!1}},_e=8192;function K0(t,e){let r=J0(t[0]),i=tm(t[1]),n=2**e.z;return[Math.round(r*n*_e),Math.round(i*n*_e)]}function _l(t,e){let r=2**e.z,i=(t[0]/_e+e.x)/r,n=(t[1]/_e+e.y)/r;return[Q0(i),em(n)]}function J0(t){return(180+t)/360}function Q0(t){return t*360-180}function tm(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function em(t){return 360/Math.PI*Math.atan(Math.exp((180-t*360)*Math.PI/180))-90}function Dn(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function an(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function rm(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function im(t,e,r){let i=t[0]-e[0],n=t[1]-e[1],a=t[0]-r[0],s=t[1]-r[1];return i*s-a*n===0&&i*a<=0&&n*s<=0}function Ua(t,e,r,i){let n=[e[0]-t[0],e[1]-t[1]];return om([i[0]-r[0],i[1]-r[1]],n)!==0&&!!(_h(t,e,r,i)&&_h(r,i,t,e))}function nm(t,e,r){for(let i of r)for(let n=0;n0&&c<0||h<0&&c>0}function Al(t,e,r){let i=[];for(let n=0;nr[2]){let n=i*.5,a=t[0]-r[0]>n?-i:r[0]-t[0]>n?i:0;a===0&&(a=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=a}Dn(e,t)}function lm(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function Ah(t,e,r,i){let n=2**i.z*_e,a=[i.x*_e,i.y*_e],s=[];for(let o of t)for(let l of o){let u=[l.x+a[0],l.y+a[1]];gf(u,e,r,n),s.push(u)}return s}function Sh(t,e,r,i){let n=2**i.z*_e,a=[i.x*_e,i.y*_e],s=[];for(let o of t){let l=[];for(let u of o){let h=[u.x+a[0],u.y+a[1]];Dn(e,h),l.push(h)}s.push(l)}if(e[2]-e[0]<=n/2){lm(e);for(let o of s)for(let l of o)gf(l,e,r,n)}return s}function um(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=Al(e.coordinates,i,n),s=Ah(t.geometry(),r,i,n);if(!an(r,i))return!1;for(let o of s)if(!ui(o,a))return!1}if(e.type==="MultiPolygon"){let a=mf(e.coordinates,i,n),s=Ah(t.geometry(),r,i,n);if(!an(r,i))return!1;for(let o of s)if(!am(o,a))return!1}return!0}function hm(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=Al(e.coordinates,i,n),s=Sh(t.geometry(),r,i,n);if(!an(r,i))return!1;for(let o of s)if(!yf(o,a))return!1}if(e.type==="MultiPolygon"){let a=mf(e.coordinates,i,n),s=Sh(t.geometry(),r,i,n);if(!an(r,i))return!1;for(let o of s)if(!sm(o,a))return!1}return!0}var Sl=class pa{constructor(e,r){this.type=Q,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'within\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:s,coordinates:o}=a.geometry;s==="Polygon"&&n.push(o),s==="MultiPolygon"&&n.push(...o)}if(n.length)return new pa(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new pa(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new pa(i,i)}return r.error("\'within\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return um(e,this.geometries);if(e.geometryType()==="LineString")return hm(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},xf=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}},Eh=Math.PI/180,El=class{constructor(t){let e=Eh*6378.137*1e3,r=Math.cos(t*Eh),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=e*n*r,this.ky=e*n*i*.9933056200098587}distance(t,e){let r=this.wrap(t[0]-e[0])*this.kx,i=(t[1]-e[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(t,e){let r=1/0,i,n,a,s;for(let o=0;o1?(l=t[o+1][0],u=t[o+1][1]):p>0&&(l+=h/this.kx*p,u+=c/this.ky*p)),h=this.wrap(e[0]-l)*this.kx,c=(e[1]-u)*this.ky;let f=h*h+c*c;f180;)t-=360;return t}};function vf(t,e){return e[0]-t[0]}function va(t){return t[1]-t[0]+1}function Ve(t,e){return t[1]>=t[0]&&t[1]t[1])return[null,null];let r=va(t);if(e){if(r===2)return[t,null];let n=Math.floor(r/2);return[[t[0],t[0]+n],[t[0]+n,t[1]]]}if(r===1)return[t,null];let i=Math.floor(r/2)-1;return[[t[0],t[0]+i],[t[0]+i+1,t[1]]]}function lo(t,e){if(!Ve(e,t.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=e[0];i<=e[1];++i)Dn(r,t[i]);return r}function uo(t){let e=[1/0,1/0,-1/0,-1/0];for(let r of t)for(let i of r)Dn(e,i);return e}function Fh(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function Fl(t,e,r){if(!Fh(t)||!Fh(e))return NaN;let i=0,n=0;return t[2]e[2]&&(i=t[0]-e[2]),t[1]>e[3]&&(n=t[1]-e[3]),t[3]=i)return i;if(an(n,a)){if(Th(t,e))return 0}else if(Th(e,t))return 0;let s=1/0;for(let o of t)for(let l=0,u=o.length,h=u-1;l0;){let l=s.pop();if(l[0]>=a)continue;let u=l[1],h=e?50:100;if(va(u)<=h){if(!Ve(u,t.length))return NaN;if(e){let c=dm(t,u,r,i);if(isNaN(c)||c===0)return c;a=Math.min(a,c)}else for(let c=u[0];c<=u[1];++c){let p=fm(t[c],r,i);if(a=Math.min(a,p),a===0)return 0}}else{let c=oo(u,e);kh(s,a,i,t,o,c[0]),kh(s,a,i,t,o,c[1])}}return a}function wa(t,e,r,i,n,a=1/0){let s=Math.min(a,n.distance(t[0],r[0]));if(s===0)return s;let o=new xf([[0,[0,t.length-1],[0,r.length-1]]],vf);for(;o.length>0;){let l=o.pop();if(l[0]>=s)continue;let u=l[1],h=l[2],c=e?50:100,p=i?50:100;if(va(u)<=c&&va(h)<=p){if(!Ve(u,t.length)&&Ve(h,r.length))return NaN;let f;if(e&&i)f=cm(t,u,r,h,n),s=Math.min(s,f);else if(e&&!i){let d=t.slice(u[0],u[1]+1);for(let y=h[0];y<=h[1];++y)if(f=dr(r[y],d,n),s=Math.min(s,f),s===0)return s}else if(!e&&i){let d=r.slice(h[0],h[1]+1);for(let y=u[0];y<=u[1];++y)if(f=dr(t[y],d,n),s=Math.min(s,f),s===0)return s}else f=pm(t,u,r,h,n),s=Math.min(s,f)}else{let f=oo(u,e),d=oo(h,i);Zn(o,s,n,t,r,f[0],d[0]),Zn(o,s,n,t,r,f[0],d[1]),Zn(o,s,n,t,r,f[1],d[0]),Zn(o,s,n,t,r,f[1],d[1])}}return s}function mm(t,e){let r=t.geometry(),i=r.flat().map(s=>_l([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new El(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,wa(i,!1,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,wa(i,!1,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ba(i,!1,s.coordinates,n,a))}if(a===0)return a}return a}function gm(t,e){let r=t.geometry(),i=r.flat().map(s=>_l([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new El(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,wa(i,!0,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,wa(i,!0,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ba(i,!0,s.coordinates,n,a))}if(a===0)return a}return a}function xm(t,e){let r=t.geometry();if(r.length===0||r[0].length===0)return NaN;let i=Na(r,0).map(s=>s.map(o=>o.map(l=>_l([l.x,l.y],t.canonical)))),n=new El(i[0][0][0][1]),a=1/0;for(let s of e)for(let o of i){switch(s.type){case"Point":a=Math.min(a,ba([s.coordinates],!1,o,n,a));break;case"LineString":a=Math.min(a,ba(s.coordinates,!0,o,n,a));break;case"Polygon":a=Math.min(a,ym(o,s.coordinates,n,a))}if(a===0)return a}return a}function Vs(t){return t.type==="MultiPolygon"?t.coordinates.map(e=>({type:"Polygon",coordinates:e})):t.type==="MultiLineString"?t.coordinates.map(e=>({type:"LineString",coordinates:e})):t.type==="MultiPoint"?t.coordinates.map(e=>({type:"Point",coordinates:e})):[t]}var kl=class fa{constructor(e,r){this.type=I,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'distance\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection")return new fa(i,i.features.map(n=>Vs(n.geometry)).flat());if(i.type==="Feature")return new fa(i,Vs(i.geometry));if("type"in i&&"coordinates"in i)return new fa(i,Vs(i))}return r.error("\'distance\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return mm(e,this.geometries);if(e.geometryType()==="LineString")return gm(e,this.geometries);if(e.geometryType()==="Polygon")return xm(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},vm=class bf{constructor(e){let r=null;for(let i of e)if(!r)r=i.type;else{if(r===i.type)continue;r=H;break}this.type=Ut(r!=null?r:H,e.length),this.arr=e}static parse(e,r){if(e.length!==2)return r.error(`\'semiliteral\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=St(i);if(n.kind==="array"){let a=i,s=r.concat(1),o=[];for(let l=0;lr.evaluate(e))}eachChild(e){this.arr.forEach(e)}outputDefined(){return this.arr.every(e=>e.outputDefined())}},Il=class wf{constructor(e){this.key=e,this.type=H}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=e[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new wf(i):r.error(`Global state property must be string, but found ${typeof e[1]} instead.`)}evaluate(e){var i,n;let r=(i=e.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=Yi(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},Yr={"==":U0,"!=":q0,">":G0,"<":j0,">=":Y0,"<=":X0,array:Be,at:S0,boolean:Be,case:k0,coalesce:of,collator:hf,format:Yp,image:Z0,in:E0,"index-of":F0,interpolate:De,"interpolate-hcl":De,"interpolate-lab":De,length:H0,let:Jp,literal:ri,match:T0,number:Be,"number-format":W0,object:Be,semiliteral:vm,slice:I0,step:Dl,string:Be,"to-boolean":jr,"to-color":jr,"to-number":jr,"to-string":jr,var:tf,within:Sl,distance:kl,"global-state":Il},ve=class extends Error{constructor(t,e){super(e),this.message=e,this.key=t}},bm=class Df{constructor(e,r=[]){this.parent=e,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(e){return new Df(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}},_f=class Af{constructor(e,r,i=[],n,a=new bm,s=[]){this.registry=e,this.path=i,this.key=i.map(o=>`[${o}]`).join(""),this.scope=a,this.errors=s,this.expectedType=n,this._isConstant=r}parse(e,r,i,n,a={}){return r==null?this._parse(e,a):this.concat(r,i,n)._parse(e,a)}_parse(e,r){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);let i=this.key;function n(a,s,o){return o==="assert"?new Be(s,[a],i):o==="coerce"?new jr(s,[a],i):a}if(Array.isArray(e)){if(e.length===0)return this.error(\'Expected an array with at least one element. If you wanted a literal array, use ["literal", []].\');let a=e[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let s=this.registry[a];if(s){let o=s.parse(e,this);if(!o)return null;if(this.expectedType){let l=this.expectedType,u=o.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")o=n(o,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))o=n(o,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(o instanceof ri)&&o.type.kind!=="resolvedImage"&&this._isConstant(o)){let l=new Gp;try{o=new ri(o.type,o.evaluate(l))}catch(u){return this.error(u.message),null}}return o}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return e===void 0?this.error("\'undefined\' value invalid. Use null instead."):typeof e=="object"?this.error(\'Bare objects invalid. Use ["literal", {...}] instead.\'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,r,i){let n=typeof e=="number"?this.path.concat(e):this.path,a=i?this.scope.concat(i):this.scope;return new Af(this.registry,this._isConstant,n,r||null,a,this.errors)}error(e,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new ve(i,e))}checkSubtype(e,r){let i=nn(e,r);return i&&this.error(i),i}},Er=class Ui{constructor(e,r,i,n,a){this.name=e,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(e){return this._evaluate(e,this.args,this.key)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,r){let i=e[0],n=Ui.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=s.filter(([u])=>!Array.isArray(u)||u.length===e.length-1),l=null;for(let[u,h]of o){l=new _f(r.registry,Da,r.path,null,r.scope);let c=[],p=!1;for(let f=1;fDm(c)).join(" | "),h=[];for(let c=1;c>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}function hr(t){return{type:t}}Er.register(Yr,{error:[o0,[W],(t,[e],r)=>{throw new ft(e.evaluate(t),r)}],typeof:[W,[H],(t,[e])=>mt(St(e.evaluate(t)))],"to-rgba":[Ut(I,4),[pe],(t,[e])=>{let[r,i,n,a]=e.evaluate(t).rgb;return[r*255,i*255,n*255,a]}],rgb:[pe,[I,I,I],Ih],rgba:[pe,[I,I,I,I],Ih],has:{type:Q,overloads:[[[W],(t,[e])=>Ch(e.evaluate(t),t.properties())],[[W,mr],(t,[e,r])=>Ch(e.evaluate(t),r.evaluate(t))]]},get:{type:H,overloads:[[[W],(t,[e])=>Os(e.evaluate(t),t.properties())],[[W,mr],(t,[e,r])=>Os(e.evaluate(t),r.evaluate(t))]]},"feature-state":[H,[W],(t,[e])=>Os(e.evaluate(t),t.featureState||{})],properties:[mr,[],t=>t.properties()],"geometry-type":[W,[],t=>t.geometryType()],id:[H,[],t=>t.id()],zoom:[I,[],t=>t.globals.zoom],"heatmap-density":[I,[],t=>t.globals.heatmapDensity||0],elevation:[I,[],t=>t.globals.elevation||0],"line-progress":[I,[],t=>t.globals.lineProgress||0],accumulated:[H,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[I,hr(I),(t,e)=>{let r=0;for(let i of e)r+=i.evaluate(t);return r}],"*":[I,hr(I),(t,e)=>{let r=1;for(let i of e)r*=i.evaluate(t);return r}],"-":{type:I,overloads:[[[I,I],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[I],(t,[e])=>-e.evaluate(t)]]},"/":[I,[I,I],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[I,[I,I],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[I,[],()=>Math.LN2],pi:[I,[],()=>Math.PI],e:[I,[],()=>Math.E],"^":[I,[I,I],(t,[e,r])=>e.evaluate(t)**+r.evaluate(t)],sqrt:[I,[I],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[I,[I],(t,[e])=>Math.log(e.evaluate(t))],log2:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[I,[I],(t,[e])=>Math.sin(e.evaluate(t))],cos:[I,[I],(t,[e])=>Math.cos(e.evaluate(t))],tan:[I,[I],(t,[e])=>Math.tan(e.evaluate(t))],asin:[I,[I],(t,[e])=>Math.asin(e.evaluate(t))],acos:[I,[I],(t,[e])=>Math.acos(e.evaluate(t))],atan:[I,[I],(t,[e])=>Math.atan(e.evaluate(t))],min:[I,hr(I),(t,e)=>Math.min(...e.map(r=>r.evaluate(t)))],max:[I,hr(I),(t,e)=>Math.max(...e.map(r=>r.evaluate(t)))],abs:[I,[I],(t,[e])=>Math.abs(e.evaluate(t))],round:[I,[I],(t,[e])=>{let r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[I,[I],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[I,[I],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Q,[W,H],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[Q,[H],(t,[e])=>t.id()===e.value],"filter-type-==":[Q,[W],(t,[e])=>t.geometryType()===e.value],"filter-<":[Q,[W,H],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i{let r=t.id(),i=e.value;return typeof r==typeof i&&r":[Q,[W,H],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[Q,[H],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>i}],"filter-<=":[Q,[W,H],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[Q,[H],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r<=i}],"filter->=":[Q,[W,H],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[Q,[H],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>=i}],"filter-has":[Q,[H],(t,[e])=>{let r=e.value,i=t.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[Q,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[Q,[Ut(W)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Q,[Ut(H)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Q,[W,Ut(H)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Q,[W,Ut(H)],(t,[e,r])=>wm(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:Q,overloads:[[[Q,Q],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[hr(Q),(t,e)=>{for(let r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:Q,overloads:[[[Q,Q],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[hr(Q),(t,e)=>{for(let r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[Q,[Q],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Q,[W],(t,[e])=>{let r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[W,[W],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[W,[W],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[W,hr(H),(t,e)=>e.map(r=>Wi(r.evaluate(t))).join("")],split:[Ut(W),[W,W],(t,[e,r])=>e.evaluate(t).split(r.evaluate(t))],join:[W,[Ut(W),W],(t,[e,r])=>e.evaluate(t).join(r.evaluate(t))],"resolved-locale":[W,[La],(t,[e])=>e.evaluate(t).resolvedLocale()]});function Dm(t){return Array.isArray(t)?`(${t.map(mt).join(", ")})`:`(${mt(t.type)}...)`}function Da(t){if(t instanceof tf)return Da(t.boundExpression);if(t instanceof Er&&t.name==="error"||t instanceof hf||t instanceof Sl||t instanceof kl||t instanceof Il)return!1;let e=t instanceof jr||t instanceof Be,r=!0;return t.eachChild(i=>{r&&(r=e?Da(i):i instanceof ri)}),r?qa(t)&&ja(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function qa(t){if(t instanceof Er&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof Sl||t instanceof kl)return!1;let e=!0;return t.eachChild(r=>{e&&!qa(r)&&(e=!1)}),e}function sn(t){if(t instanceof Er&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(r=>{e&&!sn(r)&&(e=!1)}),e}function ja(t,e){if(t instanceof Er&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild(i=>{r&&!ja(i,e)&&(r=!1)}),r}function ii(t){return t["property-type"]==="data-driven"||t["property-type"]==="cross-faded-data-driven"}function Sf(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Cl(t){return!!t.expression&&t.expression.interpolated}var Ml=/^(.*)-transition$/;function on(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function J(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}function Ga(t){return typeof t=="object"&&!!t&&!Array.isArray(t)&&St(t)===mr}function _m(t){return t}function Am(t){switch(t.type){case"color":return xt.parse;case"padding":return Ee.parse;case"numberArray":return Fe.parse;case"colorArray":return ue.parse;default:return null}}function Sm(t){switch(t){case"exponential":return Ff;case"interval":return Fm;case"categorical":return Em;case"identity":return Tm;default:throw Error(`Unknown function type "${t}"`)}}function Ef(t,e){let r=t.stops&&typeof t.stops[0][0]=="object",i=r||t.property!==void 0,n=r||!i,a=t.type||(Cl(e)?"exponential":"interval"),s=Am(e);if(s&&(t=on({},t),t.stops&&(t.stops=t.stops.map(h=>[h[0],s(h[1])])),t.default?t.default=s(t.default):t.default=s(e.default)),t.colorSpace&&!g0(t.colorSpace))throw Error(`Unknown color space: "${t.colorSpace}"`);let o=Sm(a),l,u;if(a==="categorical"){l=Object.create(null);for(let h of t.stops)l[h[0]]=h[1];u=typeof t.stops[0][0]}if(r){let h={},c=[];for(let d=0;dd[0]),evaluate({zoom:d},y){return Ff({stops:p,base:t.base},e,d).evaluate(d,y)}}}if(n){let h=a==="exponential"?{name:"exponential",base:t.base===void 0?1:t.base}:null;return{kind:"camera",interpolationType:h,interpolationFactor:De.interpolationFactor.bind(void 0,h),zoomStops:t.stops.map(c=>c[0]),evaluate:({zoom:c})=>o(t,e,c,l,u)}}return{kind:"source",evaluate(h,c){let p=c&&c.properties?c.properties[t.property]:void 0;return p===void 0?_n(t.default,e.default):o(t,e,p,l,u)}}}function _n(t,e,r){if(t!==void 0)return t;if(e!==void 0)return e;if(r!==void 0)return r}function Em(t,e,r,i,n){return _n(typeof r===n?i[r]:void 0,t.default,e.default)}function Fm(t,e,r){if(J(r)!=="number")return _n(t.default,e.default);let i=t.stops.length;if(i===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];let n=$a(t.stops.map(a=>a[0]),r,"");return t.stops[n][1]}function Ff(t,e,r){let i=t.base===void 0?1:t.base;if(J(r)!=="number")return _n(t.default,e.default);let n=t.stops.length;if(n===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];let a=$a(t.stops.map(h=>h[0]),r,""),s=km(r,i,t.stops[a][0],t.stops[a+1][0]),o=t.stops[a][1],l=t.stops[a+1][1],u=br[e.type]||_m;return typeof o.evaluate=="function"?{evaluate(...h){let c=o.evaluate.apply(void 0,h),p=l.evaluate.apply(void 0,h);if(c!==void 0&&p!==void 0)return u(c,p,s,t.colorSpace)}}:u(o,l,s,t.colorSpace)}function Tm(t,e,r){switch(e.type){case"color":r=xt.parse(r);break;case"formatted":r=Le.fromString(r.toString());break;case"resolvedImage":r=Se.fromString(r.toString());break;case"padding":r=Ee.parse(r);break;case"colorArray":r=ue.parse(r);break;case"numberArray":r=Fe.parse(r);break;default:J(r)!==e.type&&(e.type!=="enum"||!e.values[r])&&(r=void 0)}return _n(r,t.default,e.default)}function km(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}function ho(t){return{result:"success",value:t}}function Nr(t){return{result:"error",value:t}}var Bl=class{constructor(t,e,r,i){this.expression=t,this._warningHistory={},this._evaluator=new Gp,this._defaultValue=r?Bf(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=e}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,i,n,a){this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new ft(`Expected value to be one of ${Object.keys(this._enumValues).map(o=>JSON.stringify(o)).join(", ")}, but found ${JSON.stringify(s)} instead.`,"");return s}catch(s){let o=s instanceof ft?s.path:"",l=`${o}|${s.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(Tf(this._rootKey,o,s.message,this._defaultValue))),this._defaultValue}}};function Tf(t,e,r,i){return`${t}${e}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function kf(t){if(!t)throw Error(\'rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".\')}function Xa(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Yr}function ar(t,e,r,i){kf(e);let n=new _f(Yr,Da,[],r?Mm(r):void 0),a=n.parse(t,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?ho(new Bl(a,e,r,i)):Nr(n.errors)}var ln=class{constructor(t,e,r){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!sn(e.expression),this.globalStateRefs=An(e.expression),this._globalState=r}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}},_a=class{constructor(t,e,r,i,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!sn(e.expression),this.globalStateRefs=An(e.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}interpolationFactor(t,e,r){return this.interpolationType?De.interpolationFactor(this.interpolationType,t,e,r):0}};function Im(t){return t._styleExpression!==void 0}function If(t,e,r,i){let n=ar(t,e,r,i);if(n.result==="error")return n;let a=n.value.expression,s=qa(a);if(!s&&!ii(r))return Nr([new ve("","data expressions not supported")]);let o=ja(a,["zoom"]);if(!o&&!Sf(r))return Nr([new ve("","zoom expressions not supported")]);let l=da(a);if(!l&&!o)return Nr([new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\')]);if(l instanceof ve)return Nr([l]);if(l instanceof De&&!Cl(r))return Nr([new ve("",\'"interpolate" expressions cannot be used with this property\')]);if(!l)return ho(s?new ln("constant",n.value,i):new ln("source",n.value,i));let u=l instanceof De?l.interpolation:void 0;return ho(s?new _a("camera",n.value,l.labels,u,i):new _a("composite",n.value,l.labels,u,i))}var Cf=class Mf{constructor(e,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,kf(r),this._parameters=e,this._specification=i,this._rootKey=r,this._defaultValue=Bf(i),this._warningHistory={};let n=Ef(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(e,r){try{return this._innerEvaluate(e,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(Tf(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(e){return new Mf(e._parameters,e._rootKey,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification,_rootKey:e._rootKey}}};function Cm(t,e,r,i){if(Ga(t))return new Cf(t,e,r);if(Xa(t)){let n=If(t,e,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=t;return r.type==="color"&&typeof t=="string"?n=xt.parse(t):r.type==="padding"&&(typeof t=="number"||Array.isArray(t))?n=Ee.parse(t):r.type==="numberArray"&&(typeof t=="number"||Array.isArray(t))?n=Fe.parse(t):r.type==="colorArray"&&(typeof t=="string"||Array.isArray(t))?n=ue.parse(t):r.type==="variableAnchorOffsetCollection"&&Array.isArray(t)?n=Ae.parse(t):r.type==="projectionDefinition"&&typeof t=="string"&&(n=Sr.parse(t)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function da(t){let e=null;if(t instanceof Jp)e=da(t.result);else if(t instanceof of){for(let r of t.args)if(e=da(r),e)break}else(t instanceof Dl||t instanceof De)&&t.input instanceof Er&&t.input.name==="zoom"&&(e=t);return e instanceof ve||t.eachChild(r=>{let i=da(r);i instanceof ve?e=i:!e&&i?e=new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\'):e&&i&&e!==i&&(e=new ve("",\'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.\'))}),e}function An(t,e=new Set){return t instanceof Il&&e.add(t.key),t.eachChild(r=>{An(r,e)}),e}function Mm(t){let e={color:pe,string:W,number:I,enum:W,boolean:Q,formatted:bn,padding:Va,numberArray:Oa,colorArray:rn,projectionDefinition:za,resolvedImage:wn,variableAnchorOffsetCollection:Ra};return t.type==="array"?Ut(e[t.value]||H,t.length):e[t.type]}function Bf(t){if(t.type==="color"&&Ga(t.default))return new xt(0,0,0,0);switch(t.type){case"color":return xt.parse(t.default)||null;case"padding":return Ee.parse(t.default)||null;case"numberArray":return Fe.parse(t.default)||null;case"colorArray":return ue.parse(t.default)||null;case"variableAnchorOffsetCollection":return Ae.parse(t.default)||null;case"projectionDefinition":return Sr.parse(t.default)||null;default:return t.default===void 0?null:t.default}}function ni(t,e){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o}=t!=null?t:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o,globalState:e}}function Bm(t){let e=!1;for(let r of t){let i=Pf(r);if(i==="expression")return"expression";i==="legacy"&&(e=!0)}return e?"legacy":"neutral"}function Pf(t){if(typeof t=="boolean")return"neutral";if(!Array.isArray(t)||t.length===0)return"legacy";switch(t[0]){case"has":return t.length<2||t[1]==="$id"||t[1]==="$type"?"legacy":t.length===2?"neutral":"expression";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return Bm(t.slice(1));default:return"expression"}}function Pl(t){return Pf(t)!=="legacy"}function Mh(t){return t==="$type"?["geometry-type"]:t==="$id"?["id"]:["get",t]}function Pm(t){switch(t[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return t.length!==3||typeof t[1]!="string"?null:[t[0],Mh(t[1]),t[2]];case"in":case"!in":{if(t.length<2||typeof t[1]!="string")return null;let e=["in",Mh(t[1]),["literal",t.slice(2)]];return t[0]==="!in"?["!",e]:e}case"has":case"!has":{if(t.length!==2||typeof t[1]!="string"||t[1]==="$type"||t[1]==="$id")return null;let e=["has",t[1]];return t[0]==="!has"?["!",e]:e}default:return null}}function zf(t){if((t[0]==="<"||t[0]==="<="||t[0]===">"||t[0]===">=")&&t[1]==="$type")return`"$type" cannot be use with operator "${t[0]}"`;let e=Pm(t);return e?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(t)} with ${JSON.stringify(e)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(t)} to expression syntax.`}function Rs(t,e,r){let i=r[t];return Array.isArray(i)?Pl(i)?zl(i,e.concat(t)):{path:e.concat(t),legacyFilter:i}:null}function zl(t,e=[]){if(!Array.isArray(t)||t.length<1)return null;switch(t[0]){case"all":case"any":case"none":for(let r=1;r"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${e}${i}: ${zf(r.legacyFilter)}`)}var Lm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ai(t,e,r){if(t==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Pl(t)?zm(t,e):t=Aa(t);let i=ar(t,e,Lm,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,s)=>i.value.evaluate(n,a,{},s),needGeometry:Lf(t),getGlobalStateRefs:()=>An(i.value.expression)}}function Vm(t,e){return te)}function Lf(t){if(!Array.isArray(t))return!1;if(t[0]==="within"||t[0]==="distance")return!0;for(let e=1;e"||e==="<="||e===">="?$s(t[1],t[2],e):e==="any"?Om(t.slice(1)):e==="all"?["all"].concat(t.slice(1).map(Aa)):e==="none"?["all"].concat(t.slice(1).map(Aa).map(Hn)):e==="in"?Bh(t[1],t.slice(2)):e==="!in"?Hn(Bh(t[1],t.slice(2))):e==="has"?Ph(t[1]):e!=="!has"||Hn(Ph(t[1]))}function $s(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function Om(t){return["any"].concat(t.map(Aa))}function Bh(t,e){if(e.length===0)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",t,["literal",e.sort(Vm)]]:["filter-in-small",t,["literal",e]]}}function Ph(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Hn(t){return["!",t]}function Vf(t){let e=t.key,r=t.value;return r?[new E(e,r,"constants have been deprecated as of v8")]:[]}function _t(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function wr(t){if(Array.isArray(t))return t.map(wr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){let e={};for(let r in t)e[r]=wr(t[r]);return e}return _t(t)}function ee(t){let e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},a=t.style,s=t.styleSpec,o=t.validateSpec,l=[],u=J(r);if(u!=="object")return[new E(e,r,`object expected, ${u} found`)];for(let h in r){let c=h.split(".")[0],p=Yi(i,c)||i["*"],f;if(Yi(n,c))f=n[c];else if(Yi(i,c)){if(r[h]===void 0)continue;f=o}else if(n["*"])f=n["*"];else if(i["*"])f=o;else{l.push(new E(e,r[h],`unknown property "${h}"`));continue}l=l.concat(f({key:(e&&`${e}.`)+h,value:r[h],valueSpec:p,style:a,styleSpec:s,object:r,objectKey:h,validateSpec:o},r))}for(let h in i)n[h]||i[h].required&&i[h].default===void 0&&r[h]===void 0&&l.push(new E(e,r,`missing required property "${h}"`));return l}function Ll(t){let e=t.value,r=t.valueSpec,i=t.validateSpec,n=t.style,a=t.styleSpec,s=t.key,o=t.arrayElementValidator||i;if(J(e)!=="array")return[new E(s,e,`array expected, ${J(e)} found`)];if(r.length&&e.length!==r.length)return[new E(s,e,`array length ${r.length} expected, length ${e.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),J(r.value)==="object"&&(l=r.value);let u=[];for(let h=0;hi.maximum?[new E(e,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new E(e,r,`number expected, ${n} found`)]}function Of(t){let e=t.valueSpec,r=_t(t.value.type),i,n={},a,s,o=r!=="categorical"&&t.value.property===void 0,l=!o,u=J(t.value.stops)==="array"&&J(t.value.stops[0])==="array"&&J(t.value.stops[0][0])==="object",h=ee({key:t.key,value:t.value,valueSpec:t.styleSpec.function,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:c,default:d}});return r==="identity"&&o&&h.push(new E(t.key,t.value,\'missing required property "property"\')),r!=="identity"&&!t.value.stops&&h.push(new E(t.key,t.value,\'missing required property "stops"\')),r==="exponential"&&t.valueSpec.expression&&!Cl(t.valueSpec)&&h.push(new E(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ii(t.valueSpec)?h.push(new E(t.key,t.value,"property functions not supported")):o&&!Sf(t.valueSpec)&&h.push(new E(t.key,t.value,"zoom functions not supported"))),(r==="categorical"||u)&&t.value.property===void 0&&h.push(new E(t.key,t.value,\'"property" property is required\')),h;function c(y){if(r==="identity")return[new E(y.key,y.value,\'identity function may not have a "stops" property\')];let m=[],g=y.value;return m=m.concat(Ll({key:y.key,value:g,valueSpec:y.valueSpec,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,arrayElementValidator:p})),J(g)==="array"&&g.length===0&&m.push(new E(y.key,g,"array must have at least one stop")),m}function p(y){let m=[],g=y.value,x=y.key;if(J(g)!=="array")return[new E(x,g,`array expected, ${J(g)} found`)];if(g.length!==2)return[new E(x,g,`array length 2 expected, length ${g.length} found`)];if(u){if(J(g[0])!=="object")return[new E(x,g,`object expected, ${J(g[0])} found`)];if(g[0].zoom===void 0)return[new E(x,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new E(x,g,"object stop key must have value")];if(s&&s>_t(g[0].zoom))return[new E(x,g[0].zoom,"stop zoom values must appear in ascending order")];_t(g[0].zoom)!==s&&(s=_t(g[0].zoom),a=void 0,n={}),m=m.concat(ee({key:`${x}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{zoom:Ya,value:f}}))}else m=m.concat(f({key:`${x}[0]`,value:g[0],valueSpec:{},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec},g));return Xa(wr(g[1]))?m.concat([new E(`${x}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(y.validateSpec({key:`${x}[1]`,value:g[1],valueSpec:e,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec}))}function f(y,m){let g=J(y.value),x=_t(y.value),v=y.value===null?m:y.value;if(!i)i=g;else if(g!==i)return[new E(y.key,v,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new E(y.key,v,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let b=`number expected, ${g} found`;return ii(e)&&r===void 0&&(b+=\'\\nIf you intended to use a categorical function, specify `"type": "categorical"`.\'),[new E(y.key,v,b)]}return r==="categorical"&&g==="number"&&(!isFinite(x)||Math.floor(x)!==x)?[new E(y.key,v,`integer expected, found ${x}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&xnew E(`${t.key}${i.key}`,t.value,i.message));let r=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!r.outputDefined())return[new E(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!sn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with layout properties.\')];if(t.expressionContext==="filter"&&!sn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with filters.\')];if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!ja(r,["zoom","feature-state"]))return[new E(t.key,t.value,\'"zoom" and "feature-state" expressions are not supported with cluster properties.\')];if(t.expressionContext==="cluster-initial"&&!qa(r))return[new E(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Rm(t){let e=t.value,r=t.key,i=J(e);return i==="boolean"?[]:[new E(r,e,`boolean expected, ${i} found`)]}function co(t){let e=t.key,r=t.value,i=J(r);return i==="string"?xt.parse(String(r))?[]:[new E(e,r,`color expected, "${r}" found`)]:[new E(e,r,`color expected, ${i} found`)]}function un(t){let e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(_t(r))===-1&&n.push(new E(e,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(_t(r))===-1&&n.push(new E(e,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function $m(t,e){let r=t;for(let i of e)r=r[i];return r}function Nm(t,e){let r=zl(e);return r?[new E(`${t.key}${r.path.map(i=>`[${i}]`).join("")}`,$m(t.value,r.path),zf(r.legacyFilter),null,"warning")]:[]}function Vl(t){let e=wr(t.value);return Pl(e)?[...Nm(t,e),...si(on({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:Rf(t)}function Rf(t){let e=t.value,r=t.key;if(J(e)!=="array")return[new E(r,e,`array expected, ${J(e)} found`)];let i=t.styleSpec,n,a=[];if(e.length<1)return[new E(r,e,"filter array must have at least 1 element")];switch(a=a.concat(un({key:`${r}[0]`,value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),_t(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&_t(e[1])==="$type"&&a.push(new E(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&a.push(new E(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(n=J(e[1]),n!=="string"&&a.push(new E(`${r}[1]`,e[1],`string expected, ${n} found`)));for(let s=2;s{c in r&&e.push(new E(i,r[c],`"${c}" is prohibited for ref layers`))});let h;n.layers.forEach(c=>{_t(c.id)===o&&(h=c)}),h?h.ref?e.push(new E(i,r.ref,"ref cannot reference another ref layer")):s=_t(h.type):e.push(new E(i,r.ref,`ref layer "${o}" not found`))}else if(s!=="background")if(!r.source)e.push(new E(i,r,\'missing required property "source"\'));else{let h=n.sources&&n.sources[r.source],c=h&&_t(h.type);h?c==="vector"&&s==="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster source`)):c!=="raster-dem"&&s==="hillshade"||c!=="raster-dem"&&s==="color-relief"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster-dem source`)):c==="raster"&&s!=="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a vector source`)):c==="vector"&&!r["source-layer"]?e.push(new E(i,r,`layer "${r.id}" must specify a "source-layer"`)):c==="raster-dem"&&s!=="hillshade"&&s!=="color-relief"?e.push(new E(i,r.source,"raster-dem source can only be used with layer type \'hillshade\' or \'color-relief\'.")):s==="line"&&r.paint&&r.paint["line-gradient"]&&(c!=="geojson"||!h.lineMetrics)&&e.push(new E(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)):e.push(new E(i,r.source,`source "${r.source}" not found`))}return s==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&e.push(new E(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),e=e.concat(ee({key:i,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*"(){return[]},type(){return t.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:r,objectKey:"type"})},filter:Vl,layout(h){return ee({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return Uf(on({layerType:s},c))}}})},paint(h){return ee({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return Nf(on({layerType:s},c))}}})}}})),e}function ir(t){let e=t.value,r=t.key,i=J(e);return i==="string"?[]:[new E(r,e,`string expected, ${i} found`)]}function Um(t){var c;let e=(c=t.sourceName)!=null?c:"",r=t.value,i=t.styleSpec,n=i.source_raster_dem,a=t.style,s=[],o=J(r);if(r===void 0)return s;if(o!=="object")return s.push(new E("source_raster_dem",r,`object expected, ${o} found`)),s;let l=_t(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],h=t.value.encoding?`"${t.value.encoding}"`:"Default";for(let p in r)!l&&u.includes(p)?s.push(new E(p,r[p],`In "${e}": "${p}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):n[p]?s=s.concat(t.validateSpec({key:p,value:r[p],valueSpec:n[p],validateSpec:t.validateSpec,style:a,styleSpec:i})):s.push(new E(p,r[p],`unknown property "${p}"`));return s}var zh={promoteId:qm};function jf(t){let e=t.value,r=t.key,i=t.styleSpec,n=t.style,a=t.validateSpec;if(!e.type)return[new E(r,e,\'"type" is required\')];let s=_t(e.type),o;switch(s){case"vector":case"raster":return o=ee({key:r,value:e,valueSpec:i[`source_${s.replace("-","_")}`],style:t.style,styleSpec:i,objectElementValidators:zh,validateSpec:a}),o;case"raster-dem":return o=Um({sourceName:r,value:e,style:t.style,styleSpec:i,validateSpec:a}),o;case"geojson":if(o=ee({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:zh}),e.cluster)for(let l in e.clusterProperties){let[u,h]=e.clusterProperties[l],c=typeof u=="string"?[u,["accumulated"],["get",l]]:u;o.push(...si({key:`${r}.${l}.map`,value:h,validateSpec:a,expressionContext:"cluster-map"})),o.push(...si({key:`${r}.${l}.reduce`,value:c,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return ee({key:r,value:e,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return ee({key:r,value:e,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new E(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return un({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function qm({key:t,value:e}){if(J(e)==="string")return ir({key:t,value:e});{let r=[];for(let i in e)r.push(...ir({key:`${t}.${i}`,value:e[i]}));return r}}function Gf(t){let e=t.value,r=t.styleSpec,i=r.light,n=t.style,a=[],s=J(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("light",e,`object expected, ${s} found`)]),a;for(let o in e){let l=o.match(Ml);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,validateSpec:t.validateSpec,style:n,styleSpec:r})):i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)])}return a}function Xf(t){let e=t.value,r=t.styleSpec,i=r.sky,n=t.style,a=J(e);if(e===void 0)return[];if(a!=="object")return[new E("sky",e,`object expected, ${a} found`)];let s=[];for(let o in e){let l=o.match(Ml);s=l&&i[l[1]]&&i[l[1]].transition?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,style:n,styleSpec:r})):i[o]?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],style:n,styleSpec:r})):s.concat([new E(o,e[o],`unknown property "${o}"`)])}return s}function Yf(t){let e=t.value,r=t.styleSpec,i=r.terrain,n=t.style,a=[],s=J(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("terrain",e,`object expected, ${s} found`)]),a;for(let o in e)a=i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)]);return a}function jm(t){return ir(t).length===0?[]:si(t)}function Gm(t){return ir(t).length===0?[]:si(t)}function Xm(t){let e=t.key,r=t.value;if(J(r)==="array"){if(r.length<1||r.length>4)return[new E(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[new E(t,e,\'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"\')],n=r.match(tg);if(!n)return i();let[,a,s,o]=n;if(o!==void 0)return o.length>6?i():[];let l=parseInt(a,16),u=s===void 0?l:parseInt(s,16);return l>Lh||u>Lh?[new E(t,e,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new E(t,e,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Hf(t){var o,l;let e=(o=t.key)!=null?o:"font-faces",r=t.value,i=t.validateSpec,n=(l=t.styleSpec)!=null?l:Bp,a=t.style;if(!po(r))return[new E(e,r,`object expected, ${J(r)} found`)];let s=[];for(let u in r){let h=r[u],c=J(h);if(c==="string")s.push(...ir({key:`${e}.${u}`,value:h}));else if(c==="array"){let p={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[f,d]of h.entries()){let y=`${e}.${u}[${f}]`;s.push(...ee({key:y,value:d,valueSpec:p,styleSpec:n,style:a,validateSpec:i}));let m=po(d)?d["unicode-range"]:void 0;if(J(m)==="array")for(let[g,x]of m.entries())s.push(...eg(`${y}.unicode-range[${g}]`,x))}}else s.push(new E(`${e}.${u}`,h,`string or array expected, ${c} found`))}return s}var Vh={"*"(){return[]},array:Ll,boolean:Rm,number:Ya,color:co,constants:Vf,enum:un,filter:Vl,function:Of,layer:qf,object:ee,source:jf,light:Gf,sky:Xf,terrain:Yf,projection:Hm,projectionDefinition:Km,string:ir,formatted:jm,resolvedImage:Gm,padding:Xm,numberArray:Ym,colorArray:Wm,variableAnchorOffsetCollection:Zm,sprite:Wf,state:Zf,fontFaces:Hf};function Zi(t){let e=t.value,r=t.valueSpec,i=t.styleSpec;return t.validateSpec=Zi,r.expression&&Ga(_t(e))?Of(t):r.expression&&Xa(wr(e))?si(t):r.type&&Vh[r.type]?Vh[r.type](t):ee(on({},t,{valueSpec:r.type?i[r.type]:r}))}function Kf(t){let e=t.value,r=t.key,i=ir(t);return i.length||(e.indexOf("{fontstack}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{fontstack}" token\')),e.indexOf("{range}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{range}" token\'))),i}function te(t,e=D){let r=[];return r=r.concat(Zi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,validateSpec:Zi,objectElementValidators:{glyphs:Kf,"*"(){return[]}}})),t.constants&&(r=r.concat(Vf({key:"constants",value:t.constants,style:t,styleSpec:e,validateSpec:Zi}))),Jf(r)}te.source=ae(ne(jf)),te.sprite=ae(ne(Wf)),te.glyphs=ae(ne(Kf)),te.fontFaces=ae(ne(Hf)),te.light=ae(ne(Gf)),te.sky=ae(ne(Xf)),te.terrain=ae(ne(Yf)),te.state=ae(ne(Zf)),te.layer=ae(ne(qf)),te.filter=ae(ne(Vl)),te.paintProperty=ae(ne(Nf)),te.layoutProperty=ae(ne(Uf));function ne(t){return function(e){return t(Object.assign({},e,{validateSpec:Zi}))}}function Jf(t){return[].concat(t).sort((e,r)=>e.line-r.line)}function ae(t){return function(...e){return Jf(t.apply(this,e))}}var rg={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},ig=class{constructor(t,e,r){this._rootKey=e,this._globalState=r,this.setValue(t)}evaluate(){var t;return(t=this._literalValue)!=null?t:this._compiledValue.evaluate({})}setValue(t){if(t==null||t==="visible"||t==="none"){this._literalValue=t==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let e=ar(t,this._rootKey,rg,this._globalState);if(e.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=An(e.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};function ng(t,e,r){return new ig(t,e,r)}var Oh=te,_5=new Set(Object.keys(D).filter(t=>t.startsWith("source_")).map(t=>t.slice(7).replaceAll("_","-")));function ag(t,e){let r=!1;for(let i of e){if(i.severity==="warning"){Mt(i.message);continue}t.fire(new xa(Error(i.message))),r=!0}return r}function sg(t,e,r,i){return(i==null?void 0:i.validate)!==!1&&ag(t,e(Xe({styleSpec:D},r)))}var fo=class Qf{constructor(e,r,i){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let s=new Int32Array(this.arrayBuffer);e=s[0],r=s[1],i=s[2],this.d=r+2*i;for(let u=0;u=c[f+0]&&n>=c[f+1])?(o[p]=!0,s.push(h[p])):o[p]=!1}}}_forEachCell(e,r,i,n,a,s,o,l){let u=this._convertToCellCoord(e),h=this._convertToCellCoord(r),c=this._convertToCellCoord(i),p=this._convertToCellCoord(n);for(let f=u;f<=c;f++)for(let d=h;d<=p;d++){let y=this.d*d+f;if((!l||l(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&a.call(this,e,r,i,n,y,s,o,l))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,r=3+this.cells.length+1+1,i=0;for(let s of this.cells)i+=s.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let s=0;sr?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}}},hn=class{constructor(t,e,r,i){this.property=t,this.value=e,this.expression=Cm(e===void 0?t.specification.default:e,r,t.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}readsGlobalState(t){let e=this.getGlobalStateRefs();return t.some(r=>e.has(r))}possiblyEvaluate(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)}},yo=class{constructor(t,e,r){this.property=t,this.value=new hn(t,void 0,e,r)}transitioned(t,e){return e.value===this.value?e:new $h(this.property,this.value,e,Xt({},t.transition,this.transition),t.now)}untransitioned(){return new $h(this.property,this.value,null,{},0)}},lg=class{constructor(t,e,r){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=e}_propertyRootKey(t){return`${this._rootKey}.${String(t)}`}hasProperty(t){return t in this._properties.defaultTransitionablePropertyValues}getValue(t){return Je(this._values[t].value.value)}setValue(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new yo(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].value=new hn(this._values[t].property,e===null?void 0:Je(e),this._propertyRootKey(t),this._globalState)}setValues(t){for(let e in t){let r=t[e];e.endsWith("-transition")?this.setTransition(e.slice(0,-11),r):to(this._values[e].value.value,r)||this.setValue(e,r)}}getTransition(t){return Je(this._values[t].transition)}setTransition(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new yo(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].transition=Je(e)||void 0}retainPriorGlobalState(t,e,r){for(let i of Object.keys(r._values))for(let n=r._values[i];n;n=n.prior){let{value:a}=n;a.property.specification.transition&&!a.isDataDriven()&&a.expression._globalState===this._globalState&&a.readsGlobalState(t)&&(n.value=new hn(a.property,a.value,this._propertyRootKey(i),e))}}applyGlobalStateChange(t,e,r,i){this.retainPriorGlobalState(t,e,r);let n=!1;for(let a of Object.keys(this._values)){let{value:s}=this._values[a];s.readsGlobalState(t)&&(this.setValue(a,s.value),n=!0)}return n?this.transitioned(i,r):r}serialize(){let t={};for(let e of Object.keys(this._values)){let r=this.getValue(e);r!==void 0&&(t[e]=r);let i=this.getTransition(e);i!==void 0&&(t[`${e}-transition`]=i)}return t}transitioned(t,e){let r=new Nh(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(t,e._values[i]);return r}untransitioned(){let t=new Nh(this._properties);for(let e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}},$h=class{constructor(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(t,e,r){let i=t.now||0,n=this.value.possiblyEvaluate(t,e,r),a=this.prior;if(!a)return n;if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},id=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){if(t.value!==void 0){if(t.expression.kind==="constant"){let n=t.expression.evaluate(e,null,{},r,i);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new st(Math.floor(e.zoom-1),e)),t.expression.evaluate(new st(Math.floor(e.zoom),e)),t.expression.evaluate(new st(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Za=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){return!!t.expression.evaluate(e,null,{},r,i)}interpolate(){return!1}},Yt=class{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let e in t){let r=t[e];r.specification.overridable&&this.overridableProperties.push(e);let i=this.defaultPropertyValues[e]=new hn(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[e]=new yo(r,r.name,void 0);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}}};C("DataDrivenProperty",U),C("DataConstantProperty",R),C("CrossFadedDataDrivenProperty",cn),C("CrossFadedProperty",id),C("ColorRampProperty",Za);var qh=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",Ns=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",ye=class extends s0{constructor(t,e,r){if(super(),this.id=t.id,this.type=t.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=ng(this.visibility,`layers[${this.id}].layout.visibility`,r),t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=ai(t.filter,`layers[${this.id}].filter`,r)),e.layout&&(this._unevaluatedLayout=new ug(e.layout,`layers[${this.id}].layout`,r)),e.paint)){this._transitionablePaint=new lg(e.paint,`layers[${this.id}].paint`,r);for(let i in t.paint)this.setPaintProperty(i,t.paint[i],{validate:!1});for(let i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Wa(e.paint)}}setFilter(t){this.filter=t,this._featureFilter=ai(t,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){var e;if(t==="visibility")return this.visibility;if((e=this._transitionablePaint)!=null&&e.hasProperty(t))throw Error(t+qh);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${t}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){let t=new Set;for(let e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(let e in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[e];for(let i of r.getGlobalStateRefs())t.add(i)}for(let e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var e;let t=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=(e=t.get(n))!=null?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,r={}){var i;if(t==="visibility"){this.visibility=e,this._visibilityExpression.setValue(e),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(t)){this.fire(new xa(Error(t+qh)));return}e!=null&&this._validate(Oh.layoutProperty,`layers.${this.id}.layout.${t}`,t,e,r)||this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){var e,r;if(t.endsWith("-transition")){let i=t.slice(0,-11);if(i==="visibility"||(e=this._unevaluatedLayout)!=null&&e.hasProperty(i))throw Error(t+Ns);return this._transitionablePaint.getTransition(i)}if(t==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(t))throw Error(t+Ns);return this._transitionablePaint.getValue(t)}setPaintProperty(t,e,r={}){var i;if(t==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(t))return this.fire(new xa(Error(t+Ns))),!1;if(e!=null&&this._validate(Oh.paintProperty,`layers.${this.id}.paint.${t}`,t,e,r))return!1;if(t.endsWith("-transition"))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{let n=this._transitionablePaint._values[t],a=n.property.specification["property-type"]==="cross-faded-data-driven",s=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);let l=this._transitionablePaint._values[t].value;return l.isDataDriven()||s||a||this._handleOverridablePaintPropertyUpdate(t,o,l)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,r){return!1}isHidden(t=this.minzoom,e=!1){return this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&t>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}retainPriorGlobalState(t,e){var r;(r=this._transitionablePaint)==null||r.retainPriorGlobalState(t,e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){var e,r;let t={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:(e=this._unevaluatedLayout)==null?void 0:e.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(t.layout||(t.layout={}),t.layout.visibility=this.visibility),K1(t,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(t,e,r,i,n={}){return sg(this,t,{key:e,layerType:this.type,objectKey:r,value:i},n)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let t in this.paint._values){let e=this.paint.get(t);if(e instanceof le&&ii(e.property.specification)&&(e.value.kind==="source"||e.value.kind==="composite")&&e.value.isStateDependent)return!0}return!1}},jh,hg=()=>jh||(jh=new Yt({"raster-opacity":new R(D.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new R(D.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new R(D.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new R(D.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new R(D.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new R(D.paint_raster["raster-contrast"],"raster-contrast"),resampling:new R(D.paint_raster.resampling,"resampling"),"raster-resampling":new R(D.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new R(D.paint_raster["raster-fade-duration"],"raster-fade-duration")})),cg={get paint(){return hg()}};var pg=class extends ye{constructor(t,e){super(t,cg,e)}},fg={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Sn=class{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},vt=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){let e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};function Et(t,e=1){let r=0,i=0;return{members:t.map(n=>{let a=dg(n.type),s=r=Gh(r,Math.max(e,a)),o=n.components||1;return i=Math.max(i,a),r+=a*o,{name:n.name,type:n.type,components:o,offset:s}}),size:Gh(r,Math.max(i,e)),alignment:e}}function dg(t){return fg[t].BYTES_PER_ELEMENT}function Gh(t,e){return Math.ceil(t/e)*e}var pn=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.int16[i+0]=e,this.int16[i+1]=r,t}};pn.prototype.bytesPerElement=4,C("StructArrayLayout2i4",pn);var mo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t}};mo.prototype.bytesPerElement=6,C("StructArrayLayout3i6",mo);var Xh=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,t}};Xh.prototype.bytesPerElement=8,C("StructArrayLayout4i8",Xh);var go=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};go.prototype.bytesPerElement=12,C("StructArrayLayout2i4i12",go);var xo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*4,l=t*8;return this.int16[o+0]=e,this.int16[o+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=s,t}};xo.prototype.bytesPerElement=8,C("StructArrayLayout2i4ub8",xo);var fn=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.float32[i+0]=e,this.float32[i+1]=r,t}};fn.prototype.bytesPerElement=8,C("StructArrayLayout2f8",fn);var vo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u){let h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,i,n,a,s,o,l,u)}emplace(t,e,r,i,n,a,s,o,l,u,h){let c=t*10;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=s,this.uint16[c+6]=o,this.uint16[c+7]=l,this.uint16[c+8]=u,this.uint16[c+9]=h,t}};vo.prototype.bytesPerElement=20,C("StructArrayLayout10ui20",vo);var bo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o){let l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,i,n,a,s,o)}emplace(t,e,r,i,n,a,s,o,l){let u=t*8;return this.uint16[u+0]=e,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=s,this.uint16[u+6]=o,this.uint16[u+7]=l,t}};bo.prototype.bytesPerElement=16,C("StructArrayLayout8ui16",bo);var wo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u,h,c,p){let f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,i,n,a,s,o,l,u,h,c,p)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f){let d=t*14,y=t*7;return this.int16[d+0]=e,this.int16[d+1]=r,this.int16[d+2]=i,this.int16[d+3]=n,this.uint16[d+4]=a,this.uint16[d+5]=s,this.uint16[d+6]=o,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=h,this.int16[d+10]=c,this.int16[d+11]=p,this.float32[y+6]=f,t}};wo.prototype.bytesPerElement=28,C("StructArrayLayout4i4ui4i1f28",wo);var Do=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t}};Do.prototype.bytesPerElement=12,C("StructArrayLayout3f12",Do);var _o=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint32[r+0]=e,t}};_o.prototype.bytesPerElement=4,C("StructArrayLayout1ul4",_o);var Ao=class extends vt{_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(t,e,r,i,n,a,s,o,l){let u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,a,s,o,l)}emplace(t,e,r,i,n,a,s,o,l,u){let h=t*10,c=t*5;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=i,this.int16[h+3]=n,this.int16[h+4]=a,this.int16[h+5]=s,this.uint32[c+3]=o,this.uint16[h+8]=l,this.uint16[h+9]=u,t}};Ao.prototype.bytesPerElement=20,C("StructArrayLayout6i1ul2ui20",Ao);var So=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};So.prototype.bytesPerElement=12,C("StructArrayLayout2i2i2i12",So);var Yh=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n)}emplace(t,e,r,i,n,a){let s=t*4,o=t*8;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=i,this.int16[o+6]=n,this.int16[o+7]=a,t}};Yh.prototype.bytesPerElement=16,C("StructArrayLayout2f1f2i16",Yh);var Eo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*16,l=t*4,u=t*8;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=s,t}};Eo.prototype.bytesPerElement=16,C("StructArrayLayout2ub2f2i16",Eo);var Fo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t}};Fo.prototype.bytesPerElement=6,C("StructArrayLayout3ui6",Fo);var To=class extends vt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g){let x=this.length;return this.resize(x+1),this.emplace(x,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x){let v=t*26,b=t*13,w=t*52;return this.int16[v+0]=e,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[b+2]=a,this.uint32[b+3]=s,this.uint32[b+4]=o,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=h,this.float32[b+7]=c,this.float32[b+8]=p,this.uint8[w+36]=f,this.uint8[w+37]=d,this.uint8[w+38]=y,this.uint32[b+10]=m,this.int16[v+22]=g,this.float32[b+12]=x,t}};To.prototype.bytesPerElement=52,C("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",To);var ko=class extends vt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,S,T,L,O,B){let V=this.length;return this.resize(V+1),this.emplace(V,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,S,T,L,O,B)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,S,T,L,O,B,V){let F=t*34,$=t*17;return this.int16[F+0]=e,this.int16[F+1]=r,this.int16[F+2]=i,this.int16[F+3]=n,this.int16[F+4]=a,this.int16[F+5]=s,this.int16[F+6]=o,this.int16[F+7]=l,this.uint16[F+8]=u,this.uint16[F+9]=h,this.uint16[F+10]=c,this.uint16[F+11]=p,this.uint16[F+12]=f,this.uint16[F+13]=d,this.uint16[F+14]=y,this.uint16[F+15]=m,this.uint16[F+16]=g,this.uint16[F+17]=x,this.uint16[F+18]=v,this.uint16[F+19]=b,this.uint16[F+20]=w,this.uint16[F+21]=_,this.uint16[F+22]=A,this.uint32[$+12]=S,this.float32[$+13]=T,this.float32[$+14]=L,this.uint16[F+30]=O,this.uint16[F+31]=B,this.float32[$+16]=V,t}};ko.prototype.bytesPerElement=68,C("StructArrayLayout8i15ui1ul2f2ui1f68",ko);var Sa=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.float32[r+0]=e,t}};Sa.prototype.bytesPerElement=4,C("StructArrayLayout1f4",Sa);var Io=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*6,a=t*3;return this.uint16[n+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,t}};Io.prototype.bytesPerElement=12,C("StructArrayLayout1ui2f12",Io);var Co=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*2,a=t*4;return this.uint32[n+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=i,t}};Co.prototype.bytesPerElement=8,C("StructArrayLayout1ul2ui8",Co);var Mo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.uint16[i+0]=e,this.uint16[i+1]=r,t}};Mo.prototype.bytesPerElement=4,C("StructArrayLayout2ui4",Mo);var Wh=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint16[r+0]=e,t}};Wh.prototype.bytesPerElement=2,C("StructArrayLayout1ui2",Wh);var Bo=class extends vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,t}};Bo.prototype.bytesPerElement=16,C("StructArrayLayout4f16",Bo);var nd=class extends Sn{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 M(this.anchorPointX,this.anchorPointY)}};nd.prototype.size=20;var Rl=class extends Ao{get(t){return new nd(this,t)}};C("CollisionBoxArray",Rl);var ad=class extends Sn{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(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};ad.prototype.size=52;var sd=class extends To{get(t){return new ad(this,t)}};C("PlacedSymbolArray",sd);var od=class extends Sn{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(t){this._structArray.uint32[this._pos4+12]=t}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};od.prototype.size=68;var ld=class extends ko{get(t){return new od(this,t)}};C("SymbolInstanceArray",ld);var ud=class extends Sa{getoffsetX(t){return this.float32[t*1+0]}};C("GlyphOffsetArray",ud);var hd=class extends mo{getx(t){return this.int16[t*3+0]}gety(t){return this.int16[t*3+1]}gettileUnitDistanceFromAnchor(t){return this.int16[t*3+2]}};C("SymbolLineVertexArray",hd);var cd=class extends Sn{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]}};cd.prototype.size=12;var pd=class extends Io{get(t){return new cd(this,t)}};C("TextAnchorOffsetArray",pd);var fd=class extends Sn{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]}};fd.prototype.size=8;var dd=class extends Co{get(t){return new fd(this,t)}};C("FeatureIndexArray",dd);var yg=class extends pn{};var mg=class extends pn{},gg=class extends pn{},xg=class extends go{},vg=class extends xo{},bg=class extends fn{},Vr=class extends vo{},Zh=class extends bo{},wg=class extends wo{},Dg=class extends Do{},_g=class extends _o{},Hh=class extends So{};var Ag=class extends Eo{};var En=class extends Fo{},Po=class extends Mo{};var zo=Et([{name:"a_pos",components:2,type:"Int16"}],4),Sg=zo.members;zo.size,zo.alignment;var ie=class Ur{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,r,i,n){let a=this.segments[this.segments.length-1];return e>Ur.MAX_VERTEX_ARRAY_LENGTH&&Mt(`Max vertices per segment is ${Ur.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \\`fillLargeMeshArrays\\` function if you require meshes with more than ${Ur.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+e>Ur.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(e,r,i){let n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(e,r,i){return this.prepareSegment(0,e,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,i,n){return new Ur([{vertexOffset:e,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};ie.MAX_VERTEX_ARRAY_LENGTH=2**16-1,C("SegmentVector",ie);function Kh(t,e){return t=en(Math.floor(t),0,255),e=en(Math.floor(e),0,255),256*t+e}var Eg=Et([{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"}]),Fg=Et([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),Tg=ml(((t,e)=>{function r(i,n){for(var a=i.length&3,s=i.length-a,o=n,l,u=3432918353,h=461845907,c,p=0;p>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c,o=o<<13|o>>>19,l=(o&65535)*5+(((o>>>16)*5&65535)<<16)&4294967295,o=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(c=0,a){case 3:c^=(i.charCodeAt(p+2)&255)<<16;case 2:c^=(i.charCodeAt(p+1)&255)<<8;case 1:c^=i.charCodeAt(p)&255,c=(c&65535)*u+(((c>>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c}return o^=i.length,o^=o>>>16,o=(o&65535)*2246822507+(((o>>>16)*2246822507&65535)<<16)&4294967295,o^=o>>>13,o=(o&65535)*3266489909+(((o>>>16)*3266489909&65535)<<16)&4294967295,o^=o>>>16,o>>>0}e!==void 0&&(e.exports=r)})),kg=ml(((t,e)=>{function r(i,n){for(var a=i.length,s=n^a,o=0,l;a>=4;)l=i.charCodeAt(o)&255|(i.charCodeAt(++o)&255)<<8|(i.charCodeAt(++o)&255)<<16|(i.charCodeAt(++o)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^l,a-=4,++o;switch(a){case 3:s^=(i.charCodeAt(o+2)&255)<<16;case 2:s^=(i.charCodeAt(o+1)&255)<<8;case 1:s^=i.charCodeAt(o)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}e.exports=r})),Ea=M1(ml(((t,e)=>{var r=Tg(),i=kg();e.exports=r,e.exports.murmur3=r,e.exports.murmur2=i}))(),1),yd=class md{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,i,n){this.ids.push(Jh(e)),this.positions.push(r,i,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=Jh(e),i=0,n=this.ids.length-1;for(;i>1;this.ids[s]>=r?n=s:i=s+1}let a=[];for(;this.ids[i]===r;){let s=this.positions[3*i],o=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:s,start:o,end:l}),i++}return a}static serialize(e,r){let i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Lo(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(e){let r=new md;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}};function Jh(t){let e=+t;return!isNaN(e)&&e<=2**53-1?e:(0,Ea.default)(String(t))}function Lo(t,e,r,i){for(;r>1],a=r-1,s=i+1;for(;;){do a++;while(t[a]n);if(a>=s)break;Kn(t,a,s),Kn(e,3*a,3*s),Kn(e,3*a+1,3*s+1),Kn(e,3*a+2,3*s+2)}s-r`u_${i}`),this.type=r}setUniform(t,e,r){t.set(r.constantOr(this.value))}getBinding(t,e,r){return this.type==="color"?new Cg(t,e):new Nl(t,e)}},fr=class{constructor(t,e){this.uniformNames=e.map(r=>`u_${r}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width]}setUniform(t,e,r,i){let n=null;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&t.set(n)}getBinding(t,e,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new Ig(t,e):new Nl(t,e)}},Ce=class{constructor(t,e,r,i){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(t,e,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new st(0,r),e,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(i,t,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(0,n),r,i);this._setPaintValue(t,e,a)}_setPaintValue(t,e,r){if(this.type==="color"){let i=Vo(r);for(let n=t;n`u_${s}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(s=>({name:`a_${s}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(t,e,r){let i=this.expression.evaluate(new st(this.zoom,r),e,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new st(this.zoom+1,r),e,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(a,t,i,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(this.zoom,n),r,i),s=this.expression.evaluate(new st(this.zoom+1,n),r,i);this._setPaintValue(t,e,a,s)}_setPaintValue(t,e,r,i){if(this.type==="color"){let n=Vo(r),a=Vo(i);for(let s=t;s`#define HAS_UNIFORM_${i}`))}return t}getBinderAttributes(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof Ce||r instanceof ce)for(let i of r.paintVertexAttributes)t.push(i.name);else if(r instanceof Ze){let i=r.getVertexAttributes();for(let n of i)t.push(n.name)}}return t}getBinderUniforms(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof qi||r instanceof fr||r instanceof ce)for(let i of r.uniformNames)t.push(i)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof qi||n instanceof fr||n instanceof ce){for(let a of n.uniformNames)if(e[a]){let s=n.getBinding(t,e[a],a);r.push({name:a,property:i,binding:s})}}}return r}setUniforms(t,e,r,i){for(let{name:n,property:a,binding:s}of e)this.binders[a].setUniform(s,i,r.get(a),n)}updatePaintBuffers(t){this._buffers=[];for(let e in this.binders){let r=this.binders[e];if(t&&r instanceof Ze){let i=t.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof Ce||r instanceof ce)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(t){for(let e in this.binders){let r=this.binders[e];(r instanceof Ce||r instanceof ce||r instanceof Ze)&&r.upload(t)}this.updatePaintBuffers()}destroy(){for(let t in this.binders){let e=this.binders[t];(e instanceof Ce||e instanceof ce||e instanceof Ze)&&e.destroy()}}},Dr=class{constructor(t,e,r=()=>!0){this.programConfigurations={};for(let i of t)this.programConfigurations[i.id]=new vd(i,e,r);this.needsUpload=!1,this._featureMap=new yd,this._bufferOffset=0}populatePaintArrays(t,e,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e,i);e.id!==void 0&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(t,this._featureMap,e,n,i)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(let e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(let t in this.programConfigurations)this.programConfigurations[t].destroy()}};function Mg(t,e){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"]}[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}function Bg(t){return{"line-pattern":{source:Vr,composite:Vr},"fill-pattern":{source:Vr,composite:Vr},"fill-extrusion-pattern":{source:Vr,composite:Vr},"line-dasharray":{source:Zh,composite:Zh}}[t]}function Qh(t,e,r){var n;let i={color:{source:fn,composite:Bo},number:{source:Sa,composite:fn}};return((n=Bg(t))==null?void 0:n[r])||i[e][r]}C("ConstantBinder",qi),C("CrossFadedConstantBinder",fr),C("SourceExpressionBinder",Ce),C("CrossFadedPatternBinder",gd),C("CrossFadedDasharrayBinder",xd),C("CompositeExpressionBinder",ce),C("ProgramConfiguration",vd,{omit:["_buffers"]}),C("ProgramConfigurationSet",Dr);var Oo=2**14-1,tc=-Oo-1;function Fr(t){let e=gt/t.extent,r=t.loadGeometry();for(let i of r)for(let n of i){let a=Math.round(n.x*e),s=Math.round(n.y*e);n.x=en(a,tc,Oo),n.y=en(s,tc,Oo),(an.x+1||sn.y+1)&&Mt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function hi(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Fr(t):[]}}var ec=-32768;function Pg(t,e,r,i,n){t.emplaceBack(ec+e*8+i,ec+r*8+n)}var Ul=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new mg,this.indexArray=new En,this.segments=new ie,this.programConfigurations=new Dr(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){let i=this.layers[0],n=[],a=null,s=!1,o=i.type==="heatmap";if(i.type==="circle"){let c=i;a=c.layout.get("circle-sort-key"),s=!a.isConstant(),o||(o=c.paint.get("circle-pitch-alignment")==="map")}let l=o?e.subdivisionGranularity.circle:1,u=new st(this.zoom),h=this.layers[0]._featureFilter.needGeometry;for(let{feature:c,id:p,index:f,sourceLayerIndex:d}of t){let y=hi(c,h);if(!this.layers[0]._featureFilter.filter(u,y,r))continue;let m=s?a.evaluate(y,{},r):void 0,g={id:p,properties:c.properties,type:c.type,sourceLayerIndex:d,index:f,geometry:h?y.geometry:Fr(c),patterns:{},sortKey:m};n.push(g)}s&&n.sort((c,p)=>c.sortKey-p.sortKey);for(let c of n){let{geometry:p,index:f,sourceLayerIndex:d}=c,y=t[f].feature;this.addFeature(c,p,f,r,l),e.featureIndex.insert(y,p,f,d,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures(t){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Sg),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let s=a.length;for(let o of e)for(let l of o){let u=l.x,h=l.y;if(u<0||u>=8192||h<0||h>=8192)continue;let c=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,t.sortKey),p=c.vertexLength;for(let f=0;f=3){for(let n of i)if(oi(t,n))return!0}if(Vg(t,i,r))return!0}return!1}function Vg(t,e,r){if(t.length>1){if(ql(t,e))return!0;for(let i of e)if(Ro(i,t,r))return!0}for(let i of t)if(Ro(i,e,r))return!0;return!1}function ql(t,e){if(t.length===0||e.length===0)return!1;for(let r=0;r1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function rc(t,e){let r=!1,i,n,a;for(let s of t){i=s;for(let o=0,l=i.length-1;oe.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function oi(t,e){let r=!1;for(let i=0,n=t.length-1;ie.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r)}return r}function Rg(t,e,r,i,n){for(let s of t)if(e<=s.x&&r<=s.y&&i>=s.x&&n>=s.y)return!0;let a=[new M(e,r),new M(e,n),new M(i,n),new M(i,r)];if(t.length>2){for(let s of a)if(oi(t,s))return!0}for(let s=0;sn.x&&e.x>n.x||t.yn.y&&e.y>n.y)return!1;let a=Qe(t,e,r[0]);return a!==Qe(t,e,r[1])||a!==Qe(t,e,r[2])||a!==Qe(t,e,r[3])}function Wr(t,e,r){let i=e.paint.get(t).value;return i.kind==="constant"?i.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Ka(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ja(t,e,r,i,n){if(!e[0]&&!e[1])return t;let a=M.convert(e)._mult(n);r==="viewport"&&a._rotate(-i);let s=[];for(let o of t)s.push(o.sub(a));return s}function Ng(t){let e=[];for(let r=0;rjl(n,e,r,i))}var ic,Wg=()=>ic||(ic=new Yt({"circle-sort-key":new U(D.layout_circle["circle-sort-key"],"circle-sort-key")})),nc,Zg=()=>nc||(nc=new Yt({"circle-radius":new U(D.paint_circle["circle-radius"],"circle-radius"),"circle-color":new U(D.paint_circle["circle-color"],"circle-color"),"circle-blur":new U(D.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new U(D.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new R(D.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new R(D.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new R(D.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new R(D.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new U(D.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new U(D.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new U(D.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),Hg={get paint(){return Zg()},get layout(){return Wg()}};var Kg=class extends ye{constructor(t,e){super(t,Hg,e)}createBucket(t){return new Ul(t)}queryRadius(t){let e=t;return Wr("circle-radius",this,e)+Wr("circle-stroke-width",this,e)+Ka(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){let l=Ja(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),h=this.paint.get("circle-pitch-scale"),c=this.paint.get("circle-pitch-alignment"),p,f;return c==="map"?(p=l,f=u*a):(p=Yg(l,n,s,o),f=u),Dd({queryGeometry:p,size:f,transform:n,unwrappedTileID:s,getElevation:o,pitchAlignment:c,pitchScale:h},i)}},_d=class extends Ul{};C("HeatmapBucket",_d,{omit:["layers"]});var ac,Jg=()=>ac||(ac=new Yt({"heatmap-radius":new U(D.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new U(D.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new R(D.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new Za(D.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new R(D.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),Qg={get paint(){return Jg()}};function Gl(t,{width:e,height:r},i,n){if(!n)n=new Uint8Array(e*r*i);else if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==e*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${e*r*i}`);return t.width=e,t.height=r,t.data=n,t}function Ad(t,{width:e,height:r},i){if(e===t.width&&r===t.height)return;let n=Gl({},{width:e,height:r},i);Xl(t,n,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,r)},i),t.width=e,t.height=r,t.data=n.data}function Xl(t,e,r,i,n,a){if(n.width===0||n.height===0)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw RangeError("out of range destination coordinates for image copy");let s=t.data,o=e.data;if(s===o)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{e[t.evaluationKey]=l;let u=t.expression.evaluate(e);n.setPixel(s/4/r,o/4,u)};if(t.clips)for(let s=0,o=0;ssc||(sc=new Yt({"hillshade-illumination-direction":new R(D.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new R(D.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new R(D.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new R(D.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new R(D.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new R(D.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new R(D.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new R(D.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new R(D.paint_hillshade.resampling,"resampling")})),nx={get paint(){return ix()}};var ax=class extends ye{constructor(t,e){super(t,nx,e),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,e=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(t.length,e.length,r.length,i.length);t=t.concat(Array(n-t.length).fill(t.at(-1))),e=e.concat(Array(n-e.length).fill(e.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=e.map(yh);return{directionRadians:t.map(yh),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},oc,sx=()=>oc||(oc=new Yt({"color-relief-opacity":new R(D["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new Za(D["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new R(D["paint_color-relief"].resampling,"resampling")})),ox={get paint(){return sx()}};function Jn(t){return"data"in t}var lc=class{constructor(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this._ownedHandle=this.texture,this.update(e,i)}update(t,e,r){var u;let{width:i,height:n}=t,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:s}=this,{gl:o}=s;this.useMipmap=!!(e!=null&&e.useMipmap),a&&this.size&&this.format===o.RGBA&&(o.deleteTexture(this.texture),this.texture=o.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),o.bindTexture(o.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);let l=this.format===o.RGBA&&(e==null?void 0:e.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===o.RGBA&&i>0&&n>0){let h=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(o.texStorage2D(o.TEXTURE_2D,h,o.RGBA8,i,n),Jn(t)){s.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:c}=t;l&&c&&(c=Us(c)),c&&o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGBA,o.UNSIGNED_BYTE,c)}else s.pixelStoreUnpackPremultiplyAlpha.set(l),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t)}else Jn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(t,l,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(t,o));else{let{x:h,y:c}=r||{x:0,y:0};Jn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(t,l,h,c,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(t,h,c,o))}this.useMipmap&&!(Jn(t)&&t.data===null)&&o.generateMipmap(o.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(t,e){e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,e.UNSIGNED_BYTE,t)}_uploadRawData(t,e,r,i,n){let{data:a}=t;e&&a&&(a=Us(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(t,e,r,i){i.texSubImage2D(i.TEXTURE_2D,0,e,r,i.RGBA,i.UNSIGNED_BYTE,t)}_updateRawData(t,e,r,i,n,a,s){let{data:o}=t;e&&o&&(o=Us(o)),s.texSubImage2D(s.TEXTURE_2D,0,r,i,n,a,s.RGBA,s.UNSIGNED_BYTE,o)}bind(t,e,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||t;t!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),this.magFilter=t),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)}generateMipmap(){if(!this.useMipmap)return;let{gl:t}=this.context;t.bindTexture(t.TEXTURE_2D,this.texture),t.generateMipmap(t.TEXTURE_2D)}destroy(){let{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},ze,Yl=(ze=class{constructor(e,r,i,n=1,a=1,s=1,o=0){if(this.uid=e,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Mt(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),ze.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=s,this.baseShift=o;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let h=-2;h=l)&&this.data.copyWithin(this._idx(0,h),c,c+l),this.data.fill(this.data[c],this._idx(-2,h),this._idx(0,h)),this.data.fill(this.data[c+l-1],this._idx(l,h),this._idx(l+1,h)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let h=0;hthis.max&&(this.max=f),f=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),s=((n+2)*this.stride+i+2)*4,o=this.stride*4,l=e-i,u=r-n,h=this._unpackAtIndex(a,s),c=this._unpackAtIndex(a,s+4),p=this._unpackAtIndex(a,s+o),f=this._unpackAtIndex(a,s+o+4);return h*(1-l)*(1-u)+c*l*(1-u)+p*(1-l)*u+f*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-2||e>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(e+2)}unpack(e,r,i){return e*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(e){return Fd(e,this.getUnpackVector())}getPixels(){return new Ht({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,r,i){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,s=i*this.dim,o=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:s=o-2;break;case 1:o=s+2}let l=-r*this.dim,u=-i*this.dim;for(let h=s;h80*r){o=t[0],l=t[1];let h=o,c=l;for(let p=r;ph&&(h=f),d>c&&(c=d)}u=Math.max(h-o,c-l),u=u===0?0:32767/u}return Uo(a,s,o,l,u),s}function Td(t,e,r,i,n){let a=null;if(n===Tx(t,e,r,i)>0)for(let s=e;s=e;s-=i)a=cc(s/i|0,t[s],t[s+1],a);return a&&yn(a,a.next)&&(gn(a),a=a.next),a}function _r(t,e=t){let r=e===t,i=t,n;do n=!1,i!==i.next&&(dn.size===0||!dn.has(i))&&(yn(i,i.next)||Tt(i.prev,i,i.next)===0)?((r||i===e)&&(e=i.prev),No=!0,gn(i),i=i.prev,n=!0):(r||i!==e)&&(i=i.next,n=!r);while(n||i!==e);return e}function Uo(t,e,r,i,n){n&&Dx(t,r,i,n);let a=t,s=!1;for(;t.prev!==t.next;){let o=t.prev,l=t.next;if(Tt(o,t,l)<0&&(n?px(t,r,i,n):cx(t))){e.push(o.i,t.i,l.i),gn(t),t=l,a=l;continue}if(t=l,t===a){if(No=!1,t=_r(t),No){a=t;continue}if(!s){t=fx(t,e),a=t,s=!0;continue}dx(t,e,r,i,n);break}}}function cx(t){let e=t.prev,r=t,i=t.next,n=e.x,a=r.x,s=i.x,o=e.y,l=r.y,u=i.y,h=Math.min(n,a,s),c=Math.min(o,l,u),p=Math.max(n,a,s),f=Math.max(o,l,u),d=i.next;for(;d!==e;){if(d.x>=h&&d.x<=p&&d.y>=c&&d.y<=f&&(n!==d.x||o!==d.y)&&ka(n,o,a,l,s,u,d.x,d.y)&&Tt(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function px(t,e,r,i){let n=t.prev,a=t,s=t.next,o=n.x,l=a.x,u=s.x,h=n.y,c=a.y,p=s.y,f=Math.min(o,l,u),d=Math.min(h,c,p),y=Math.max(o,l,u),m=Math.max(h,c,p),g=Xo(f,d,e,r,i),x=Xo(y,m,e,r,i),v=t.prevZ;for(;v&&v.z>=g;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==s&&(o!==v.x||h!==v.y)&&ka(o,h,l,c,u,p,v.x,v.y)&&Tt(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let b=t.nextZ;for(;b&&b.z<=x;){if(b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==s&&(o!==b.x||h!==b.y)&&ka(o,h,l,c,u,p,b.x,b.y)&&Tt(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function fx(t,e){let r=t,i=!1;do{let n=r.prev,a=r.next.next;Id(n,r,r.next,a,!1)&&mn(n,a)&&mn(a,n)&&(e.push(n.i,r.i,a.i),gn(r),gn(r.next),r=t=a,i=!0),r=r.next}while(r!==t);return i?_r(r):r}function dx(t,e,r,i,n){let a=t;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&Sx(a,s)){let o=Cd(a,s);a=_r(a,a.next),o=_r(o,o.next),Uo(a,e,r,i,n),Uo(o,e,r,i,n);return}s=s.next}a=a.next}while(a!==t)}var qo=!1;function yx(t,e,r,i){let n=[];for(let a=0,s=e.length;as&&(s=r.x),r.yo&&(o=r.y),h.xs&&(s=h.x),h.yo&&(o=h.y),r=h}while(++l<16&&r!==e);Go[i]=r;let u=i*4;Dt[u]=n,Dt[u+1]=a,Dt[u+2]=s,Dt[u+3]=o}while(r!==e)}function vx(t,e){let r=t.z*4;e.xDt[r+2]&&(Dt[r+2]=e.x),e.y>Dt[r+3]&&(Dt[r+3]=e.y)}function uc(t){let e=Go[t];for(;e.prev.next!==e;)e=e.next;return Go[t]=e,e}function hc(t){let e=jo[t];for(;e.prev.next!==e;)e=e.next;return jo[t]=e,e}function bx(t,e){let r=e,i=t.x,n=t.y,a=-1/0,s;if(yn(t,r))return r;for(let p=0,f=0;pDt[f+3]||Dt[f]>i||Dt[f+2]<=a)continue;let d=uc(p);r=hc(p);do{if(r.prev.next===r){if(yn(t,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let y=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(y<=i&&y>a&&(a=y,s=r.xi||Dt[f+3]h)continue;let d=uc(p);r=hc(p);do{if(r.prev.next===r&&i>=r.x&&r.x>=o&&i!==r.x&&ka(ni)&&(ys.x||r.x===s.x&&wx(s,r)))&&(s=r,c=y)}r=r.next}while(r!==d)}return s}function wx(t,e){return Tt(t.prev,t,e.prev)<0&&Tt(e.next,t,t.next)<0}var oe=[],Ii=[],cr=new Uint32Array,Ci=new Uint32Array,Mi=new Uint32Array(256);function Dx(t,e,r,i){let n=t,a=0;do n.z=Xo(n.x,n.y,e,r,i),oe[a++]=n,n=n.next;while(n!==t);_x(a);let s=null;for(let o=0;o=0&&oe[n].z>i;)oe[n+1]=oe[n],n--;oe[n+1]=r}return}cr.length>>a&255]++;let s=0;for(let o=0;o<256;o++){let l=Mi[o];Mi[o]=s,s+=l}for(let o=0;o>>a&255]++;i[u]=e[o],n[u]=l}}function Xo(t,e,r,i,n){return t=(t-r)*n|0,e=(e-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Ax(t){let e=t,r=t;do(e.x=(t-s)*(a-o)&&(t-s)*(i-o)>=(r-s)*(e-o)&&(r-s)*(a-o)>=(n-s)*(i-o)}function Sx(t,e){let r=yn(t,e)&&Tt(t.prev,t,t.next)>0&&Tt(e.prev,e,e.next)>0;return t.next.i!==e.i&&(r||mn(t,e)&&mn(e,t)&&(Tt(t.prev,t,e.prev)!==0||Tt(t,e.prev,e)!==0))&&!Ex(t,e)&&(r||Fx(t,e))}function Tt(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function yn(t,e){return t.x===e.x&&t.y===e.y}function Id(t,e,r,i,n=!0){let a=Tt(t,e,r),s=Tt(t,e,i),o=Tt(r,i,t),l=Tt(r,i,e);return(a>0&&s<0||a<0&&s>0)&&(o>0&&l<0||o<0&&l>0)?!0:n?!!(a===0&&ta(t,r,e)||s===0&&ta(t,i,e)||o===0&&ta(r,t,i)||l===0&&ta(r,e,i)):!1}function ta(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Ex(t,e){let r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.y,e.y),s=t;do{let o=s.next;if(s.x>i&&o.x>i||s.xa&&o.y>a||s.y=0&&Tt(t,t.prev,e)>=0:Tt(t,e,t.prev)<0||Tt(t,t.next,e)<0}function Fx(t,e){let r=t,i=!1,n=(t.x+e.x)/2,a=(t.y+e.y)/2;do{let s=r.next;r.y>a!=s.y>a&&n<(s.x-r.x)*(a-r.y)/(s.y-r.y)+r.x&&(i=!i),r=s}while(r!==t);return i}function Cd(t,e){let r=Yo(t.i,t.x,t.y),i=Yo(e.i,e.x,e.y),n=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function cc(t,e,r,i){let n=Yo(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function gn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),qo&&vx(t.prev,t.next)}function Yo(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Tx(t,e,r,i){let n=0;for(let a=e,s=r-i;at)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e}getGranularityForZoomLevel(t){let e=1<32767||e>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(t)|0,i=Math.round(e)|0,n=this._getKey(r,i),a=this._vertexDictionary.get(n);if(a!==void 0)return a;let s=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,s),this._vertexBuffer.push(r,i),s}_subdivideTrianglesScanline(t,e){if(this._granularity<2)return Bx(this._vertexBuffer,Mx(t,e));let r=[],i=t.length;for(let n=0;n=1||b<=0)||m&&(ln)){h>=i&&h<=n&&a.push(r[(s+1)%3]);continue}if(!m&&v>0){let A=o+f*v,S=l+d*v;a.push(this._vertexToIndex(A,S))}let w=o+f*Math.max(v,0),_=o+f*Math.min(b,1);if(y||this._generateIntraEdgeVertices(a,o,l,u,h,w,_),!m&&b<1){let A=o+f*b,S=l+d*b;a.push(this._vertexToIndex(A,S))}(m||h>=i&&h<=n)&&a.push(r[(s+1)%3]),!m&&(h<=i||h>=n)&&this._generateInterEdgeVertices(a,o,l,u,h,c,p,_,i,n)}return a}_generateIntraEdgeVertices(t,e,r,i,n,a,s){let o=i-e,l=n-r,u=l===0,h=u?Math.min(e,i):Math.min(a,s),c=u?Math.max(e,i):Math.max(a,s),p=Math.floor(h/this._granularityCellSize)+1,f=Math.ceil(c/this._granularityCellSize)-1;if(u?e=p;d--){let y=d*this._granularityCellSize,m=r+l*(y-e)/o;t.push(this._vertexToIndex(y,m))}}_generateInterEdgeVertices(t,e,r,i,n,a,s,o,l,u){let h=n-r,c=a-i,p=s-n,f=(l-n)/p,d=(u-n)/p,y=Math.min(f,d),m=Math.max(f,d),g=i+c*y,x=Math.floor(Math.min(g,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(g,o)/this._granularityCellSize)-1,b=o=1||m<=0){let A=e-a,S=r-s,T=(l-s)/S,L=(u-s)/S,O=a+A*Math.min(T,L);x=Math.floor(Math.min(O,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(O,o)/this._granularityCellSize)-1,b=o0?u:l;if(b)for(let A=x;A<=v;A++){let S=A*this._granularityCellSize;t.push(this._vertexToIndex(S,_))}else for(let A=v;A>=x;A--){let S=A*this._granularityCellSize;t.push(this._vertexToIndex(S,_))}}_generateOutline(t,e){let r=[],i=0;for(let n of t){let a=this._granularity<2?this._ringPathIndices(n,i,e):this._pointArrayToIndices(yr(n,this._granularity,!0));i+=n.length;let s=[];for(let o=1;o=2&&Bd(t)&&i.push(i[0]),i}_handlePoles(t){let e=!1,r=!1;this._canonical&&(this._canonical.y===0&&(e=!0),this._canonical.y===(1<n==(a===-32768)?(t.push(r),t.push(e),t.push(this._vertexToIndex(i,a)),t.push(this._vertexToIndex(n,a)),t.push(r),t.push(this._vertexToIndex(i,a))):(t.push(e),t.push(r),t.push(this._vertexToIndex(i,a)),t.push(r),t.push(this._vertexToIndex(n,a)),t.push(this._vertexToIndex(i,a)))}_fillPoles(t,e,r){let i=this._vertexBuffer,n=gt,a=t.length;for(let s=2;s=2&&((o=this._canonical)==null?void 0:o.z)===0&&(a=this._removeTrianglesOutsideTileX(a),s=s.map(l=>this._removeLinesOutsideTileX(l))),{verticesFlattened:this._vertexBuffer,indicesTriangles:a,indicesLineList:s}}_vertexOutsideTileX(t){let e=this._vertexBuffer[t*2];return e<0||e>8192}_removeTrianglesOutsideTileX(t){let e=[];for(let r=0;r0?(Math.floor(w/n)+1)*n:(Math.ceil(w/n)-1)*n,T=x>0?(Math.floor(_/n)+1)*n:(Math.ceil(_/n)-1)*n,L=Math.abs(w-S),O=Math.abs(_-T),B=Math.abs(w-f),V=Math.abs(_-d),F=y?L/v:1/0,$=m?O/b:1/0;if((B<=L||!y)&&(V<=O||!m))break;if(F<$&&y||!m){w=S,_+=x*F;let G=new M(w,Math.round(_));(a[a.length-1].x!==G.x||a[a.length-1].y!==G.y)&&a.push(G)}else{w+=g*$,_=T;let G=new M(Math.round(w),_);(a[a.length-1].x!==G.x||a[a.length-1].y!==G.y)&&a.push(G)}}let A=new M(f,d);(a[a.length-1].x!==A.x||a[a.length-1].y!==A.y)&&a.push(A)}return a}function Bd(t){return!t[0].equals(t[t.length-1])}function Cx(t){let e=[],r=[];for(let i of t)if(i.length!==0){i!==t[0]&&e.push(r.length/2);for(let n of i)r.push(n.x),r.push(n.y)}return{flattened:r,holeIndices:e}}function Mx(t,e){let r=Array(t.length);for(let i=0;i0?(r.push(n),r.push(s),r.push(a)):(r.push(n),r.push(a),r.push(s))}return r}function Px(t,e,r){if(e.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=t[e[0]*2];for(let l=1;l=0?s-1:a-1,u=(o+1)%a,h=t[e[l]*2],c=t[e[l]*2+1],p=t[e[u]*2],f=t[e[u]*2+1],d=t[e[s]*2],y=t[e[s]*2+1],m=t[e[o]*2],g=t[e[o]*2+1],x=!1;if(hp)x=!1;else{let v=g-y,b=-(m-d),w=y((p-d)*v+(f-y)*b)*w&&(x=!0)}if(x){let v=e[l],b=e[s],w=e[o];v!==b&&v!==w&&b!==w&&r.push(w,b,v),s--,s<0&&(s=a-1)}else{let v=e[u],b=e[s],w=e[o];v!==b&&v!==w&&b!==w&&r.push(w,b,v),o++,o>=a&&(o=0)}if(l===u)break}}function Pd(t,e,r,i,n,a,s,o,l){let u=n.length/2,h=s&&o&&l;if(uie.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,g=!0,h=0);let v=Ji(s,i,a,o,p,y,u),b=Ji(s,i,a,o,f,m,u),w=Ji(s,i,a,o,d,g,u);r.emplaceBack(h+v-l,h+b-l,h+w-l),u.primitiveLength++}}function Lx(t,e,r,i,n,a){let s=[];for(let c=0;cie.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,h=0);let x=Ji(s,i,a,o,f,y,u),v=Ji(s,i,a,o,d,m,u);r.emplaceBack(h+x-l,h+v-l),u.primitiveLength++}}var zd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new gg,this.indexArray=new En,this.indexArray2=new Po,this.programConfigurations=new Dr(t.layers,t.zoom),this.segments=new ie,this.segments2=new ie,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Fa("fill",this.layers,e);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r,e.availableImages):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Fr(l),patterns:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;if(this.hasDependencies){let f=Wl("fill",this.layers,l,{zoom:this.zoom},e);this.patternFeatures.push(f)}else this.addFeature(l,u,h,r,{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:t,canonical:e,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,t.subdivisionGranularity)}detectSdfPatterns(t){for(let e of this.patternFeatures)for(let r in e.patterns){let i=e.patterns[r];this.recordSdfPattern(r,t[i.min]),this.recordSdfPattern(r,t[i.mid]),this.recordSdfPattern(r,t[i.max])}for(let e of this.layers){let r=e.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(e.id,t[r.from.toString()]),this.recordSdfPattern(e.id,t[r.to.toString()]))}}recordSdfPattern(t,e){if(!e)return;let r=e.sdf===!0,i=this.sdfPatterns[t];i===void 0?this.sdfPatterns[t]=r:i!==r&&Mt(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${t}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ux),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),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(t,e,r,i,n,a){for(let s of Na(e,500)){let o=Md(s,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;Pd((u,h)=>{l.emplaceBack(u,h)},this.segments,this.layoutVertexArray,this.indexArray,o.verticesFlattened,o.indicesTriangles,this.segments2,this.indexArray2,o.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,canonical:i})}};C("FillBucket",zd,{omit:["layers","patternFeatures"]});var pc,Vx=()=>pc||(pc=new Yt({"fill-sort-key":new U(D.layout_fill["fill-sort-key"],"fill-sort-key")})),fc,Ox=()=>fc||(fc=new Yt({"fill-antialias":new R(D.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new U(D.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new R(D.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new U(D.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new U(D.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new R(D.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new R(D.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new cn(D.paint_fill["fill-pattern"],"fill-pattern")})),Rx={get paint(){return Ox()},get layout(){return Vx()}};var $x=class extends ye{constructor(t,e){super(t,Rx,e)}recalculate(t,e){super.recalculate(t,e);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new zd(t)}queryRadius(){return Ka(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:r,pixelsToTileUnits:i}){return bd(Ja(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),e)}isTileClipped(){return!0}},Wo=Et([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Nx=Et([{name:"a_centroid",components:2,type:"Int16"}],4),Ux=Wo.members;Wo.size,Wo.alignment;var Ia=class Zo{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let r=new Zo;return r.extend(e(new M(this.minX,this.minY))),r.extend(e(new M(this.maxX,this.minY))),r.extend(e(new M(this.minX,this.maxY))),r.extend(e(new M(this.maxX,this.maxY))),r}static fromPoints(e){let r=new Zo;for(let i of e)r.extend(i);return r}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}},A5=Ia.fromPoints([new M(0,0),new M(gt,gt)]);function Ho(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function dc(t){return t.every(e=>e.x<0)||t.every(e=>e.x>8192)||t.every(e=>e.y<0)||t.every(e=>e.y>8192)}var Fn=class{constructor(t,e,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n;t.pos>3,a===0)continue}if(a--,n===1)s+=t.readSVarint(),o+=t.readSVarint(),i&&r.push(i),i=[new M(s,o)];else if(n===2)s+=t.readSVarint(),o+=t.readSVarint(),i&&i.push(new M(s,o));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let t=this._pbf;t.pos=this._geometry;let e=t.readVarint()+t.pos,r=1,i=0,n=0,a=0,s=1/0,o=-1/0,l=1/0,u=-1/0;for(;t.pos>3,i===0)continue}if(i--,r===1||r===2)n+=t.readSVarint(),a+=t.readSVarint(),no&&(o=n),au&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[s,l,o,u]}toGeoJSON(t,e,r){let i=this.extent*2**r,n=this.extent*t,a=this.extent*e,s=this.loadGeometry();function o(c){return[(c.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(c.y+a)*2/i)*Math.PI))-90]}function l(c){return c.map(o)}let u;if(this.type===1){let c=[];for(let f of s)c.push(f[0]);let p=l(c);u=c.length===1?{type:"Point",coordinates:p[0]}:{type:"MultiPoint",coordinates:p}}else if(this.type===2){let c=s.map(l);u=c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}}else if(this.type===3){let c=Ld(s),p=[];for(let f of c)p.push(f.map(l));u=p.length===1?{type:"Polygon",coordinates:p[0]}:{type:"MultiPolygon",coordinates:p}}else throw Error("unknown feature type");let h={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(h.id=this.id),h}};Fn.types=["Unknown","Point","LineString","Polygon"];function Ld(t){let e=t.length;if(e<=1)return[t];let r=[],i,n;for(let a=0;a=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[t];let e=this._pbf.readVarint()+this._pbf.pos;return new Fn(this._pbf,e,this.extent,this._keys,this._values)}};function Gx(t){let e=null,r=t.readVarint()+t.pos;for(;t.pos90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Gi(Z1(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let r=Math.PI/180,i=this.lat*r,n=e.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((e.lng-this.lng)*r);return Vd*Math.acos(Math.min(a,1))}static convert(e){if(e instanceof Gi)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Gi(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e)return new Gi(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}},Od=2*Math.PI*Vd;function Rd(t){return Od*Math.cos(t*Math.PI/180)}function Xx(t){return(180+t)/360}function Yx(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Wx(t,e){return t/Rd(e)}function Zx(t){return t*360-180}function Ko(t){let e=180-t*360;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Hx(t,e){return t*Rd(Ko(e))}function Kx(t){return 1/Math.cos(t*Math.PI/180)}var Hl=class $d{constructor(e,r,i=0){this.x=+e,this.y=+r,this.z=+i}static fromLngLat(e,r=0){let i=yc.convert(e);return new $d(Xx(i.lng),Yx(i.lat),Wx(r,i.lat))}toLngLat(){return new yc(Zx(this.x),Ko(this.y))}toAltitude(){return Hx(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Od*Kx(Ko(this.y))}};function Jx(t,e,r){let i=1/(1<r2(r,e))}function e2(t,e){let r=Qx(gt/2,gt/2,e),i=Hl.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y;)e.pop();return e}function n2(t,e,r,i,n){let a=e.sub(r),s=i.sub(r),o=a.mag(),l=s.mag();if(o<1e-6||l<1e-6){t.push(r.clone());return}a._div(o),s._div(l);let u=a.x*s.x+a.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){t.push(r.clone());return}let h=.2,c=Math.min(n,o*h,l*h),p=r.add(a.mult(c)),f=r.add(s.mult(c)),d=Math.sqrt((1+u)/2),y=r.add(a.add(s)._unit()._mult(c/d)),m=p.sub(y).angleWith(f.sub(y)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let x=0;x<=g;x++)t.push(p.rotateAround(x/g*m,y))}var Gs=8192;function Bi(t,e,r,i,n,a,s,o){t.emplaceBack(e,r,Math.floor(i*Gs)*2+s,n*Gs*2,a*Gs*2,Math.round(o))}var Nd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new xg,this.centroidVertexArray=new yg,this.indexArray=new En,this.programConfigurations=new Dr(t.layers,t.zoom),this.segments=new ie,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.features=[],this.hasDependencies=Fa("fill-extrusion",this.layers,e);let i=new st(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),s=a>0?e2(a,r):0,o=n._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!n._featureFilter.filter(i,p,r))continue;let f={id:u,sourceLayerIndex:c,index:h,geometry:t2(o?p.geometry:Fr(l),s),properties:l.properties,type:l.type,patterns:{}};this.hasDependencies?this.features.push(Wl("fill-extrusion",this.layers,f,{zoom:this.zoom},e)):this.addFeature(f,f.geometry,h,r,{},e.subdivisionGranularity),e.featureIndex.insert(l,f.geometry,h,c,this.index,!0)}}addFeatures({options:t,canonical:e,patternPositions:r}){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,e,r,t.subdivisionGranularity)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ux),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Nx.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,r,i,n,a){for(let s of Na(e,500)){let o={x:0,y:0,sampleCount:0},l=this.layoutVertexArray.length;this.processPolygon(o,i,t,s,a);let u=this.layoutVertexArray.length-l,h=Math.floor(o.x/o.sampleCount),c=Math.floor(o.y/o.sampleCount);for(let p=0;p{Bi(u,h,c,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e){let r=0;for(let i=1;iie.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=n.sub(a)._perp()._unit(),o=a.dist(n);r+o>32768&&(r=0),Bi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,0,r),Bi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,1,r),r+=o,Bi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,0,r),Bi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,1,r);let l=e.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}}};function a2(t,e){for(let r=0;rmc||(mc=new Yt({"fill-extrusion-rounded-corner-distance":new R(D["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),gc,o2=()=>gc||(gc=new Yt({"fill-extrusion-opacity":new R(D["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new U(D["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new R(D["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new R(D["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new cn(D["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new U(D["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new U(D["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new R(D["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),l2={get paint(){return o2()},get layout(){return s2()}};var u2=class extends ye{constructor(t,e){super(t,l2,e)}createBucket(t){return new Nd(t)}queryRadius(){return Ka(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:s}){let o=Ja(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(e,r),u=this.paint.get("fill-extrusion-base").evaluate(e,r),h=p2(o,s,0),c=c2(i,u,l,s),p=c[0],f=c[1];return h2(p,f,h)}};function Pi(t,e){return t.x*e.x+t.y*e.y}function xc(t,e){if(t.length===1){let r=0,i=e[r++],n;for(;!n||i.equals(n);)if(n=e[r++],!n)return 1/0;for(;r>1),s=r-e,o,l=t[e],u=t[e+1],h=t[r],c=t[r+1];for(let p=e+3;pn){o=p,n=f;continue}if(f===n){let d=Math.abs(p-a);di&&(o-e>3&&Jo(t,e,o,i),t[o+2]=n,r-o>3&&Jo(t,o,r,i))}function f2(t,e,r,i,n,a){let s=n-r,o=a-i;if(s!==0||o!==0){let l=((t-r)*s+(e-i)*o)/(s*s+o*o);l>1?(r=n,i=a):l>0&&(r+=s*l,i+=o*l)}return s=t-r,o=e-i,s*s+o*o}function Ct(t,e,r,i){let n={type:e,geom:r},a={id:t!=null?t:null,type:n.type,geometry:n.geom,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(n.type){case"Point":case"MultiPoint":zi(a,n.geom);break;case"LineString":zi(a,n.geom.points);break;case"Polygon":zi(a,n.geom[0].points);break;case"MultiLineString":for(let s of n.geom)zi(a,s.points);break;case"MultiPolygon":for(let s of n.geom)zi(a,s[0].points)}return a}function Kl(t){let e=t;t.points.length>64&&(e.points=new Float64Array(t.points))}function zi(t,e){for(let r=0;r1024)throw Error("GeometryCollection nesting exceeds supported depth: 1024");if(e.geometry.type==="GeometryCollection"){y2(t,e,e.geometry,r,i,n+1);return}if(!((o=e.geometry.coordinates)!=null&&o.length))return;let a=d2(e,r,i),s=(r.tolerance/((1<0&&(s+=i?(n*h-u*a)/2:Math.sqrt((u-n)**2+(h-a)**2)),n=u,a=h}let o=e.points.length-3;e.points[2]=1,r>0&&Jo(e.points,0,o,r),e.points[o+2]=1,Kl(e),e.size=Math.abs(s),e.start=0,e.end=e.size}function tu(t,e,r,i){for(let n=0;n1?1:r}function D2(t){return{type:"FeatureCollection",features:t.map(e=>Ca(e))}}function Ca(t){let e={type:"Feature",geometry:_2(t),properties:t.tags};return t.id!=null&&(e.id=t.id),e}function _2(t){let{type:e,geometry:r}=t;switch(e){case"Point":return{type:e,coordinates:Ud(r[0],r[1])};case"MultiPoint":return{type:e,coordinates:ea(r)};case"LineString":return{type:e,coordinates:ea(r.points)};case"MultiLineString":case"Polygon":return{type:e,coordinates:r.map(i=>ea(i.points))};case"MultiPolygon":return{type:e,coordinates:r.map(i=>i.map(n=>ea(n.points)))}}}function ea(t){let e=[];for(let r=0;r=r&&s=i)return null;let l=[];for(let u of t){let h=n===0?u.minX:u.minY,c=n===0?u.maxX:u.maxY;if(h>=r&&c=i))switch(u.type){case"Point":case"MultiPoint":A2(u,l,r,i,n);continue;case"LineString":S2(u,l,r,i,n,o);continue;case"MultiLineString":E2(u,l,r,i,n);continue;case"Polygon":F2(u,l,r,i,n);continue;case"MultiPolygon":T2(u,l,r,i,n);continue}}return l.length?l:null}function A2(t,e,r,i,n){let a=[];if(k2(t.geometry,a,r,i,n),!a.length)return;let s=a.length===3?"Point":"MultiPoint";e.push(Ct(t.id,s,a,t.tags))}function S2(t,e,r,i,n,a){let s=[];if(Gd(t.geometry,s,r,i,n,!1,a.lineMetrics),s.length){if(a.lineMetrics){for(let o of s)e.push(Ct(t.id,"LineString",o,t.tags));return}if(s.length>1){e.push(Ct(t.id,"MultiLineString",s,t.tags));return}e.push(Ct(t.id,"LineString",s[0],t.tags))}}function E2(t,e,r,i,n){let a=[];if(eu(t.geometry,a,r,i,n,!1),a.length){if(a.length===1){e.push(Ct(t.id,"LineString",a[0],t.tags));return}e.push(Ct(t.id,"MultiLineString",a,t.tags))}}function F2(t,e,r,i,n){let a=[];eu(t.geometry,a,r,i,n,!0),a.length&&e.push(Ct(t.id,"Polygon",a,t.tags))}function T2(t,e,r,i,n){let a=[];for(let s of t.geometry){let o=[];eu(s,o,r,i,n,!0),o.length&&a.push(o)}a.length&&e.push(Ct(t.id,"MultiPolygon",a,t.tags))}function k2(t,e,r,i,n){for(let a=0;a=r&&s<=i&&Kr(e,t[a],t[a+1],t[a+2])}}function Gd(t,e,r,i,n,a,s){let o=vc(t),l=n===0?I2:C2,u=t.start,h,c;for(let g=0;gr&&(c=l(o,x,v,w,_,r),s&&(o.start=u+h*c)):A>i?S=r&&(c=l(o,x,v,w,_,r),T=!0),S>i&&A<=i&&(c=l(o,x,v,w,_,i),T=!0),!a&&T&&(s&&(o.end=u+h*c),e.push(o),o=vc(t)),s&&(u+=h)}let p=t.points.length-3,f=t.points[p],d=t.points[p+1],y=t.points[p+2],m=n===0?f:d;m>=r&&m<=i&&Kr(o.points,f,d,y),p=o.points.length-3,a&&p>=3&&(o.points[p]!==o.points[0]||o.points[p+1]!==o.points[1])&&Kr(o.points,o.points[0],o.points[1],o.points[2]),o.points.length&&(Kl(o),e.push(o))}function vc(t){return{points:[],size:t.size,start:t.start,end:t.end}}function eu(t,e,r,i,n,a){for(let s of t)Gd(s,e,r,i,n,a,!1)}function Kr(t,e,r,i){t.push(e,r,i)}function I2(t,e,r,i,n,a){let s=(a-e)/(i-e);return Kr(t.points,a,r+(n-r)*s,1),s}function C2(t,e,r,i,n,a){let s=(a-r)/(n-r);return Kr(t.points,e+(i-e)*s,a,1),s}function ru(t,e){let r=e.buffer/e.extent,i=t,n=Me(t,1,-1-r,r,0,-1,2,e),a=Me(t,1,1-r,2+r,0,-1,2,e);return!n&&!a||(i=Me(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=bc(n,1).concat(i)),a&&(i=i.concat(bc(a,-1)))),i}function bc(t,e){let r=[];for(let i of t)switch(i.type){case"Point":case"MultiPoint":{let n=M2(i.geometry,e);r.push(Ct(i.id,i.type,n,i.tags));continue}case"LineString":{let n=Xs(i.geometry,e);r.push(Ct(i.id,i.type,n,i.tags));continue}case"MultiLineString":case"Polygon":{let n=[];for(let a of i.geometry)n.push(Xs(a,e));r.push(Ct(i.id,i.type,n,i.tags));continue}case"MultiPolygon":{let n=[];for(let a of i.geometry){let s=[];for(let o of a)s.push(Xs(o,e));n.push(s)}r.push(Ct(i.id,i.type,n,i.tags));continue}}return r}function M2(t,e){let r=[];for(let i=0;io.id));t=t.filter(o=>!s.has(o.id))}if(i.add.size){let s=Jl({type:"FeatureCollection",features:Array.from(i.add.values())},r);s=ru(s,r),n=n.concat(s),t=t.concat(s)}}if(i.update.size){let a=new Map,s=[];for(let o of t)i.update.has(o.id)?a.set(o.id,[...a.get(o.id)||[],o]):s.push(o);for(let[o,l]of i.update){let u=a.get(o);if(!u||u.length===0)continue;let h=P2(u,l,r);n=n.concat(u,h),s=s.concat(h)}t=s}return{affected:n,source:t}}function P2(t,e,r){var a,s;let i=!!e.newGeometry,n=e.removeAllProperties||((a=e.removeProperties)==null?void 0:a.length)>0||((s=e.addOrUpdateProperties)==null?void 0:s.length)>0;if(i){let o=t[0],l=Jl({type:"FeatureCollection",features:[{type:"Feature",id:o.id,geometry:e.newGeometry,properties:n?wc(o.tags,e):o.tags}]},r);return l=ru(l,r),l}if(n){let o=[];for(let l of t){let u=Xe({},l);u.tags=wc(u.tags,e),o.push(u)}return o}return t}function wc(t,e){if(e.removeAllProperties)return{};let r=Xe({},t||{});if(e.removeProperties)for(let i of e.removeProperties)delete r[i];if(e.addOrUpdateProperties)for(let{key:i,value:n}of e.addOrUpdateProperties)r[i]=n;return r}function z2(t,e){var r,i;return t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map((r=t.add)==null?void 0:r.map(n=>[e.promoteId?n.properties[e.promoteId]:n.id,n])),update:new Map((i=t.update)==null?void 0:i.map(n=>[n.id,n]))}:{remove:new Set,add:new Map,update:new Map}}var Dc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],yt=new Uint32Array(96),L2=class Xd{static from(e){if(!e||e.byteLength===void 0||e.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(e,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=Dc[i&15];if(!a)throw Error("Unrecognized array type.");let[s]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Xd(o,s,a,void 0,e)}constructor(e,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(e)||e<0)throw Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let s=Dc.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,l=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(s<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,e),this.coords=new i(a,8+l+u,e*2),this._pos=e*2,this._finished=!0;else{let h=this.data=new n(8+o+l+u);this.ids=new this.IndexArrayType(h,8,e),this.coords=new i(h,8+l+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(h,0,2).set([219,16+s]),new Uint16Array(h,2,1)[0]=r,new Uint32Array(h,4,1)[0]=e}}add(e,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=r,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return Qo(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;yt[0]=0,yt[1]=a.length-1,yt[2]=0;let l=3,u=[];for(;l>0;){let h=yt[--l],c=yt[--l],p=yt[--l];if(c-p<=o){for(let m=p;m<=c;m++){let g=s[2*m],x=s[2*m+1];g>=e&&g<=i&&x>=r&&x<=n&&u.push(a[m])}continue}let f=p+c>>1,d=s[2*f],y=s[2*f+1];d>=e&&d<=i&&y>=r&&y<=n&&u.push(a[f]),(h===0?e<=d:r<=y)&&(yt[l++]=p,yt[l++]=f-1,yt[l++]=1-h),(h===0?i>=d:n>=y)&&(yt[l++]=f+1,yt[l++]=c,yt[l++]=1-h)}return u}within(e,r,i){let n=[];return this.withinInto(e,r,i,n),n}withinInto(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;yt[0]=0,yt[1]=a.length-1,yt[2]=0;let l=3,u=0,h=i*i;for(;l>0;){let c=yt[--l],p=yt[--l],f=yt[--l];if(p-f<=o){for(let g=f;g<=p;g++)_c(s[2*g],s[2*g+1],e,r)<=h&&(n[u++]=a[g]);continue}let d=f+p>>1,y=s[2*d],m=s[2*d+1];_c(y,m,e,r)<=h&&(n[u++]=a[d]),(c===0?e-i<=y:r-i<=m)&&(yt[l++]=f,yt[l++]=d-1,yt[l++]=1-c),(c===0?e+i>=y:r+i>=m)&&(yt[l++]=d+1,yt[l++]=p,yt[l++]=1-c)}return u}};function Qo(t,e,r,i,n,a){if(n-i<=r)return;let s=i+n>>1;Yd(t,e,s,i,n,a),Qo(t,e,r,i,s-1,1-a),Qo(t,e,r,s+1,n,1-a)}function Yd(t,e,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,h=r-i+1,c=Math.log(u),p=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*p*(u-p)/u)*(h-u/2<0?-1:1);Yd(t,e,r,Math.max(i,Math.floor(r-h*p/u+f)),Math.min(n,Math.floor(r+(u-h)*p/u+f)),a)}let s=e[2*r+a],o=i,l=n;for(Li(t,e,i,r),e[2*n+a]>s&&Li(t,e,i,n);os;)l--}e[2*i+a]===s?Li(t,e,i,l):(l++,Li(t,e,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function Li(t,e,r,i){Ys(t,r,i),Ys(e,2*r,2*i),Ys(e,2*r+1,2*i+1)}function Ys(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function _c(t,e,r,i){let n=t-r,a=e-i;return n*n+a*a}var tl={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},V2=class{constructor(t){this.options=Object.assign(Object.create(tl),t),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(t){let e=[];for(let r of t){if(!r.geometry)continue;let[i,n]=r.geometry.coordinates,[a,s]=[Zr(i),Hr(n)],o={id:r.id,type:"Point",geometry:[a,s],tags:r.properties};e.push(o)}this.createIndex(e)}initialize(t){let e=[];for(let r of t)r.type==="Point"&&e.push(r);this.createIndex(e)}updateIndex(t,e,r){this.options=Object.assign(Object.create(tl),r.clusterOptions),this.initialize(t)}createIndex(t){let{log:e,minZoom:r,maxZoom:i}=this.options;e&&console.time("total time");let n=`prepare ${t.length} points`;e&&console.time(n),this.points=t;let a=[];for(let o=0;o=r;o--){let l=Date.now();s=this.trees[o]=this.createTree(this.cluster(s,o)),e&&console.log("z%d: %d clusters in %dms",o,s.numItems,Date.now()-l)}e&&console.timeEnd("total time")}getClusters(t,e){return this.getClustersInternal(t,e).map(r=>Ca(r))}getClustersInternal(t,e){let r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=t[2]===180?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){let h=this.getClustersInternal([r,i,180,a],e),c=this.getClustersInternal([-180,i,n,a],e);return h.concat(c)}let s=this.trees[this.limitZoom(e)],o=s.range(Zr(r),Hr(a),Zr(n),Hr(i)),l=s.flatData,u=[];for(let h of o){let c=this.stride*h;u.push(l[c+5]>1?O2(l,c,this.clusterProps):this.points[l[c+3]])}return u}getChildren(t){let e=this.getOriginId(t),r=this.getOriginZoom(t),i=Error("No cluster with the specified id: "+t),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(e*this.stride>=a.length)throw i;let s=this.options.radius/(this.options.extent*2**(r-1)),o=a[e*this.stride],l=a[e*this.stride+1],u=n.within(o,l,s),h=[];for(let c of u){let p=c*this.stride;a[p+4]===t&&h.push(a[p+5]>1?R2(a,p,this.clusterProps):Ca(this.points[a[p+3]]))}if(h.length===0)throw i;return h}getLeaves(t,e,r){e||(e=10),r||(r=0);let i=[];return this.appendLeaves(i,t,e,r,0),i}getTile(t,e,r){let i=this.trees[this.limitZoom(t)];if(!i)return null;let n=2**t,{extent:a,radius:s}=this.options,o=s/a,l=(r-o)/n,u=(r+1+o)/n,h={transformed:!0,features:[],source:null,x:e,y:r,z:t};return this.addTileFeatures(i.range((e-o)/n,l,(e+1+o)/n,u),i.flatData,e,r,n,h),e===0&&this.addTileFeatures(i.range(1-o/n,l,1,u),i.flatData,n,r,n,h),e===n-1&&this.addTileFeatures(i.range(0,l,o/n,u),i.flatData,-1,r,n,h),h}getClusterExpansionZoom(t){return this.getOriginZoom(t)}appendLeaves(t,e,r,i,n){let a=this.getChildren(e);for(let s of a){let o=s.properties;if(o!=null&&o.cluster?n+o.point_count<=i?n+=o.point_count:n=this.appendLeaves(t,o.cluster_id,r,i,n):n1,u,h,c;if(l)u=iu(e,o,this.clusterProps),h=e[o],c=e[o+1];else{let d=this.points[e[o+3]];u=d.tags,[h,c]=d.geometry}let p={type:1,geometry:[[Math.round(this.options.extent*(h*n-r)),Math.round(this.options.extent*(c*n-i))]],tags:u},f;f=l||this.options.generateId?e[o+3]:this.points[e[o+3]].id,f!==void 0&&(p.id=f),a.features.push(p)}}limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}cluster(t,e){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,s=r/(i*2**e),o=t.flatData,l=[],u=this.stride;for(let h=0;he&&(y+=o[g+5])}if(y>d&&y>=a){let m=c*d,g=p*d,x,v=-1,b=((h/u|0)<<5)+(e+1)+this.points.length;for(let w of f){let _=w*u;if(o[_+2]<=e)continue;o[_+2]=e;let A=o[_+5];m+=o[_]*A,g+=o[_+1]*A,o[_+4]=b,n&&(x||(x=this.map(o,h,!0),v=this.clusterProps.length,this.clusterProps.push(x)),n(x,this.map(o,_)))}o[h+4]=b,l.push(m/y,g/y,1/0,b,-1,y),n&&l.push(v)}else{for(let m=0;m1)for(let m of f){let g=m*u;if(!(o[g+2]<=e)){o[g+2]=e;for(let x=0;x>5}getOriginZoom(t){return(t-this.points.length)%32}map(t,e,r){if(t[e+5]>1){let a=this.clusterProps[t[e+6]];return r?Object.assign({},a):a}let i=this.points[t[e+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}};function O2(t,e,r){return{id:t[e+3],type:"Point",tags:iu(t,e,r),geometry:[t[e],t[e+1]]}}function R2(t,e,r){return{type:"Feature",id:t[e+3],properties:iu(t,e,r),geometry:{type:"Point",coordinates:[qd(t[e]),jd(t[e+1])]}}}function iu(t,e,r){let i=t[e+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,a=t[e+6],s=a===-1?{}:Object.assign({},r[a]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:i,point_count_abbreviated:n})}var Wd="geojsonvt_clip_start",Zd="geojsonvt_clip_end";function Ac(t,e,r,i,n){let a=e===n.maxZoom?0:n.tolerance/((1<0&&e.size<(n?s:i)){r.numPoints+=e.points.length/3;return}let o=[];for(let l=0;ls)&&(r.numSimplified++,o.push(e.points[l],e.points[l+1])),r.numPoints++;n&&G2(o,a),t.push(o)}function G2(t,e){let r=0;for(let i=0,n=t.length,a=n-2;i0===e)for(let i=0,n=t.length;i1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(e),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],s=Ac(t,i,n,a,r);s.source=t;let o=ra(i,n,a);if(this.tiles[o]=s,this.tileCoords.push({z:i,x:n,y:a,id:o}),r.debug){let l=`z${i}`;this.stats[l]=(this.stats[l]||0)+1,this.total++}}getClusterExpansionZoom(t){return null}getChildren(t){return null}getLeaves(t,e,r){return null}getTile(t,e,r){let{extent:i,debug:n}=this.options,a=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);let o=t,l=e,u=r,h;for(;!h&&o>0;)o--,l>>=1,u>>=1,h=this.tiles[ra(o,l,u)];return!(h!=null&&h.source)||(n>1&&(console.log("found parent tile z%d-%d-%d",o,l,u),console.time("drilling down")),this.splitTile(h.source,o,l,u,t,e,r),n>1&&console.timeEnd("drilling down"),!this.tiles[s])?null:Sc(this.tiles[s],i)}splitTile(t,e,r,i,n,a,s){let o=[t,e,r,i],l=this.options,u=l.debug;for(;o.length;){i=o.pop(),r=o.pop(),e=o.pop(),t=o.pop();let h=1<1&&console.time("creation"),p=this.tiles[c]=Ac(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i,id:c}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));let A=`z${e}`;this.stats[A]=(this.stats[A]||0)+1,this.total++}if(p.source=t,n==null){if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===n)continue;if(n!=null){let A=n-e;if(r!==a>>A||i!==s>>A)continue}}if(p.source=null,!t.length)continue;u>1&&console.time("clipping");let f=.5*l.buffer/l.extent,d=.5-f,y=.5+f,m=1+f,g=null,x=null,v=null,b=null,w=Me(t,h,r-f,r+y,0,p.minX,p.maxX,l),_=Me(t,h,r+d,r+m,0,p.minX,p.maxX,l);w&&(g=Me(w,h,i-f,i+y,1,p.minY,p.maxY,l),x=Me(w,h,i+d,i+m,1,p.minY,p.maxY,l)),_&&(v=Me(_,h,i-f,i+y,1,p.minY,p.maxY,l),b=Me(_,h,i+d,i+m,1,p.minY,p.maxY,l)),u>1&&console.timeEnd("clipping"),o.push(g||[],e+1,r*2,i*2),o.push(x||[],e+1,r*2,i*2+1),o.push(v||[],e+1,r*2+1,i*2),o.push(b||[],e+1,r*2+1,i*2+1)}}invalidateTiles(t){if(!t.length)return;let e=this.options,{debug:r}=e,i=1/0,n=-1/0,a=1/0,s=-1/0;for(let u of t)i=Math.min(i,u.minX),n=Math.max(n,u.maxX),a=Math.min(a,u.minY),s=Math.max(s,u.maxY);let o=e.buffer/e.extent,l=new Set;for(let u in this.tiles){let h=this.tiles[u],c=1<=f||s=y)continue;let m=!1;for(let g of t)if(g.maxX>=p&&g.minX=d&&g.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",h.z,h.x,h.y,h.numFeatures,h.numPoints,h.numSimplified);let g=`z${h.z}`;this.stats[g]=(this.stats[g]||0)-1,this.total--}delete this.tiles[u],l.add(u)}}l.size&&(this.tileCoords=this.tileCoords.filter(u=>!l.has(u.id)))}};function ra(t,e,r){return((1<24)throw Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw Error("promoteId and generateId cannot be used together.");let i=Jl(t,e);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles")),i=ru(i,e),e.updateable&&(this.source=i),this.initializeIndex(i,e)}initializeIndex(t,e){this.tileIndex=e.cluster?new V2(e.clusterOptions):new W2(e),t.length&&this.tileIndex.initialize(t)}getTile(t,e,r){return t=+t,e=+e,r=+r,t<0||t>24?null:this.tileIndex.getTile(t,e,r)}updateData(t,e){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:i,source:n}=B2(this.source,t,r);e&&({affected:i,source:n}=this.filterUpdate(n,i,e)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(t,e,r){let i=new Set;for(let n of t)n.id!=null&&(r(Ca(n))||(e.push(n),i.add(n.id)));return t=t.filter(n=>!i.has(n.id)),{affected:e,source:t}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return D2(this.source)}updateClusterOptions(t,e){let r=this.options.cluster;if(this.options.cluster=t,this.options.clusterOptions=e,r==t){this.tileIndex.updateIndex(this.source,[],this.options);return}this.initializeIndex(this.source,this.options)}getClusterExpansionZoom(t){return this.tileIndex.getClusterExpansionZoom(t)}getClusterChildren(t){return this.tileIndex.getChildren(t)}getClusterLeaves(t,e,r){return this.tileIndex.getLeaves(t,e,r)}},el=Et([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),H2=el.members;el.size,el.alignment;var rl=Et([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),K2=rl.members;rl.size,rl.alignment;var J2=Math.cos(75/2*(Math.PI/180)),Jd=1/2,Ec=2**14/Jd,Qd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let e of this.layers)this.gradients[e.id]={};this.layoutVertexArray=new vg,this.layoutVertexArray2=new bg,this.indexArray=new En,this.programConfigurations=new Dr(t.layers,t.zoom),this.segments=new ie,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Fa("line",this.layers,e)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Fr(l),patterns:{},dashes:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;this.hasDependencies?(Fa("line",this.layers,e)?Wl("line",this.layers,l,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,e),this.patternFeatures.push(l)):this.addFeature(l,u,h,r,{},{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:t,canonical:e,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,i,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,K2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,H2),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.hasOwn(t.properties,"geojsonvt_clip_start")&&Object.hasOwn(t.properties,"geojsonvt_clip_end"))return{start:+t.properties[Wd],end:+t.properties[Zd]}}addFeature(t,e,r,i,n,a,s){let o=this.layers[0].layout,l=o.get("line-join").evaluate(t,{}),u=o.get("line-cap").evaluate(t,{}),h=o.get("line-miter-limit").evaluate(t,{}),c=o.get("line-round-limit").evaluate(t,{});this.lineClips=this.lineFeatureClips(t);for(let p of e)this.addLine(p,t,l,u,h,c,i,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(t,e,r,i,n,a,s,o){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=s?o.line.getGranularityForZoomLevel(s.z):1;if(t=yr(t,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let v=0;v=2&&t[h-1].equals(t[h-2]);)h--;let c=0;for(;c0;if(T&&v>c){let V=d.dist(y);if(V>2*p){let F=d.sub(d.sub(y)._mult(p/V)._round());this.updateDistance(y,F),this.addCurrentVertex(F,g,0,0,f),y=F}}let O=y&&m,B=O?r:u?"butt":i;if(O&&B==="round"&&(An&&(B="bevel"),B==="bevel"&&(A>2&&(B="flipbevel"),A100)b=x.mult(-1);else{let V=A*g.add(x).mag()/g.sub(x).mag();b._perp()._mult(V*(L?-1:1))}this.addCurrentVertex(d,b,0,0,f),this.addCurrentVertex(d,b.mult(-1),0,0,f)}else if(B==="bevel"||B==="fakeround"){let V=-Math.sqrt(A*A-1),F=L?V:0,$=L?0:V;if(y&&this.addCurrentVertex(d,g,F,$,f),B==="fakeround"){let G=Math.round(S*180/Math.PI/20);for(let P=1;P2*p){let F=d.add(m.sub(d)._mult(p/V)._round());this.updateDistance(d,F),this.addCurrentVertex(F,x,0,0,f),d=F}}}}addCurrentVertex(t,e,r,i,n,a=!1){let s=e.x+e.y*r,o=e.y-e.x*r,l=-e.x+e.y*i,u=-e.y-e.x*i;this.addHalfVertex(t,s,o,a,!1,r,n),this.addHalfVertex(t,l,u,a,!0,-i,n),this.distance>Ec/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,r,i,n,a))}addHalfVertex({x:t,y:e},r,i,n,a,s,o){let l=(this.lineClips?this.scaledDistance*(Ec-1):this.scaledDistance)*Jd;if(this.layoutVertexArray.emplaceBack((t<<1)+ +!!n,(e<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(s===0?0:s<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let h=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(h,this.lineClipsArray.length)}let u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),o.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}hasLineDasharray(t){for(let e of t){let r=e.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(t,e,r,i){for(let n of t){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let s=n.layout.get("line-cap").evaluate(e,{})==="round",o={dasharray:a.value.evaluate({zoom:r-1},e,{}),round:s},l={dasharray:a.value.evaluate({zoom:r},e,{}),round:s},u={dasharray:a.value.evaluate({zoom:r+1},e,{}),round:s},h=`${o.dasharray.join(",")},${o.round}`,c=`${l.dasharray.join(",")},${l.round}`,p=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[h]=o,i.dashDependencies[c]=l,i.dashDependencies[p]=u,e.dashes[n.id]={min:h,mid:c,max:p}}}};C("LineBucket",Qd,{omit:["layers","patternFeatures"]});var Fc,Q2=()=>Fc||(Fc=new Yt({"line-cap":new U(D.layout_line["line-cap"],"line-cap"),"line-join":new U(D.layout_line["line-join"],"line-join"),"line-miter-limit":new U(D.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new U(D.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new U(D.layout_line["line-sort-key"],"line-sort-key")})),Tc,tv=()=>Tc||(Tc=new Yt({"line-opacity":new U(D.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new R(D.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new U(D.paint_line["line-color"],"line-color"),"line-translate":new R(D.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new R(D.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new U(D.paint_line["line-width"],"line-width"),"line-gap-width":new U(D.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new U(D.paint_line["line-offset"],"line-offset"),"line-blur":new U(D.paint_line["line-blur"],"line-blur"),"line-dasharray":new cn(D.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new cn(D.paint_line["line-pattern"],"line-pattern"),"line-gradient":new Za(D.paint_line["line-gradient"],"line-gradient")})),kc={get paint(){return tv()},get layout(){return Q2()}},ev=class extends U{possiblyEvaluate(t,e){return e=new st(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,r,i){return e=Xt({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,r,i)}},ia;var rv=class extends ye{constructor(t,e){super(t,kc,e),this.gradientVersion=0,ia||(ia=new ev(kc.paint.properties["line-width"].specification,"line-floorwidth"),ia.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){let e=this.gradientExpression();this.stepInterpolant=Im(e)?e._styleExpression.expression instanceof Dl:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=ia.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Qd(t)}queryRadius(t){let e=t,r=Ic(Wr("line-width",this,e),Wr("line-gap-width",this,e)),i=Wr("line-offset",this,e);return r/2+Math.abs(i)+Ka(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let s=Ja(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),o=a/2*Ic(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),l=this.paint.get("line-offset").evaluate(e,r);return l&&(i=Ug(i,l*a)),Lg(s,i,o)}isTileClipped(){return!0}};function Ic(t,e){return e>0?e+2*t:t}var iv=Et([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),nv=Et([{name:"a_projected_pos",components:3,type:"Float32"}],4);Et([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var av=Et([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Et([{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"}]);var Cc=Et([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),S5=Et([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Et([{name:"triangle",components:3,type:"Uint16"}]),Et([{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"},{type:"Float32",name:"heightOffset"}]),Et([{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"},{type:"Float32",name:"heightOffset"}]),Et([{type:"Float32",name:"offsetX"}]),Et([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Et([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Ar=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(Ar.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,e){return et(this,null,function*(){if(this.isParsed())return this.getState();if(t.pluginStatus!=="loading")return this.setState(t),t;let r=t.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield e(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};function sv(t){return/[\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u077F\\u07C0-\\u07FA\\u07FD-\\u07FF\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\u1800\\u1801\\u1804\\u1806-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\uA840-\\uA877\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF80-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDEFF\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB]|\\uD805[\\uDE60-\\uDE6C]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9C-\\uDC9F]|\\uD83A[\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function ov(t){return/[\\u0591-\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u07B1\\u07C0-\\u07FA\\u07FD-\\u082D\\u0830-\\u083E\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC57-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD1F-\\uDD39\\uDD3F-\\uDD59\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F-\\uDE48\\uDE50-\\uDE58\\uDE60-\\uDE9F\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF00-\\uDF35\\uDF39-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD27\\uDD30-\\uDD39\\uDD40-\\uDD65\\uDD69-\\uDD85\\uDD8E\\uDD8F\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEAB-\\uDEAD\\uDEB0\\uDEB1\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDF27\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function lv(t){return/[\\u02EA\\u02EB\\u2E80-\\u2FDF\\u2FF0-\\u303F\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FD-\\u30FF\\u3105-\\u312F\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\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(t))}function ts(t){return/[\\u02EA\\u02EB\\u1100-\\u11FF\\u1401-\\u167F\\u18B0-\\u18FF\\u2065\\u20DD-\\u20E0\\u20E2-\\u20E4\\u2B97\\u2BF0-\\u2BFF\\u2E50\\u2E51\\u2E80-\\u3007\\u3012\\u3013\\u3020-\\u302F\\u3031-\\u30FB\\u30FD-\\uA4CF\\uA960-\\uA97F\\uAC00-\\uD7FF\\uF900-\\uFAFF\\uFE10-\\uFE1F\\uFE30-\\uFE48\\uFE50-\\uFE57\\uFE5F-\\uFE62\\uFE67-\\uFE6F\\uFF00-\\uFF07\\uFF0A-\\uFF0C\\uFF0E-\\uFF19\\uFF1F-\\uFF3A\\uFF3C\\uFF3E\\uFF40-\\uFF5A\\uFFE0-\\uFFE2\\uFFE4-\\uFFE7\\uFFF0-\\uFFF8]|\\uD802[\\uDD80-\\uDD9F]|\\uD805[\\uDD80-\\uDDFF]|\\uD806[\\uDE00-\\uDEBF]|[\\uD80C-\\uD810\\uD81C-\\uD822\\uD83C\\uD83D\\uD840-\\uD87E\\uD880-\\uD8BE][\\uDC00-\\uDFFF]|\\uD811[\\uDC00-\\uDE7F]|\\uD81B[\\uDFE0-\\uDFFF]|\\uD823[\\uDC00-\\uDDFF]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFF]|\\uD833[\\uDEC0-\\uDFCF]|\\uD834[\\uDC00-\\uDDFF\\uDEE0-\\uDF7F]|\\uD836[\\uDC00-\\uDEAF]|\\uD83E[\\uDD00-\\uDEFF]|[\\uD87F\\uD8BF][\\uDC00-\\uDFFD]/gim.test(String.fromCodePoint(t))}function uv(t){return/[\\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(t))}function hv(t){return/[\\r\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0600-\\u0605\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DD\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0890\\u0891\\u0897-\\u089F\\u08CA-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E33-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB3-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1037\\u1039-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1084-\\u1086\\u108D\\u109D\\u1100-\\u11FF\\u135D-\\u135F\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA960-\\uA97C\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDD69-\\uDD6D\\uDEAB\\uDEAC\\uDEFA-\\uDEFF\\uDF46-\\uDF50\\uDF82-\\uDF85]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC70\\uDC73\\uDC74\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDCBD\\uDCC2\\uDCCD\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD45\\uDD46\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDDC2\\uDDC3\\uDDC9-\\uDDCC\\uDDCE\\uDDCF\\uDE2C-\\uDE37\\uDE3E\\uDE41\\uDEDF-\\uDEEA\\uDF00-\\uDF03\\uDF3B\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74\\uDFB8-\\uDFC0\\uDFC2\\uDFC5\\uDFC7-\\uDFCA\\uDFCC-\\uDFD2\\uDFE1\\uDFE2]|\\uD805[\\uDC35-\\uDC46\\uDC5E\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDDDC\\uDDDD\\uDE30-\\uDE40\\uDEAB-\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF2B]|\\uD806[\\uDC2C-\\uDC3A\\uDD30-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDDD1-\\uDDD7\\uDDDA-\\uDDE0\\uDDE4\\uDE01-\\uDE0A\\uDE33-\\uDE39\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE5B\\uDE84-\\uDE99\\uDF60-\\uDF67]|\\uD807[\\uDC2F-\\uDC36\\uDC38-\\uDC3F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD8A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD97\\uDEF3-\\uDEF6\\uDF00-\\uDF03\\uDF34-\\uDF3A\\uDF3E-\\uDF42\\uDF5A]|\\uD80D[\\uDC40\\uDC47-\\uDC55]|\\uD818[\\uDD1E-\\uDD2F]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDD63\\uDD67-\\uDD6A\\uDF4F\\uDF51-\\uDF87\\uDF8F-\\uDF92\\uDFE4\\uDFF0\\uDFF1]|\\uD82F[\\uDC9D\\uDC9E]|\\uD833[\\uDF00-\\uDF2D\\uDF30-\\uDF46]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDC8F\\uDD30-\\uDD36\\uDEAE\\uDEEC-\\uDEEF]|\\uD839[\\uDCEC-\\uDCEF\\uDDEE\\uDDEF\\uDEE3\\uDEE6\\uDEEE\\uDEEF\\uDEF5]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDDE6-\\uDDFF\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF]/.test(t)}function Mc(t){return/[\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0EDC-\\u0EDF\\u0F00-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F97\\u0F99-\\u0FBC\\u0FBE-\\u0FCC\\u0FCE-\\u0FD4\\u0FD9\\u0FDA\\u1000-\\u103F\\u1050-\\u108F\\u109A-\\u109F\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19DE\\u19DF\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1AA0-\\u1AAD\\u1B00-\\u1B4C\\u1B4E-\\u1B7F\\uA980-\\uA9CD\\uA9D0-\\uA9D9\\uA9DE-\\uA9EF\\uA9FA-\\uA9FE\\uAA60-\\uAAC2\\uAADB-\\uAADF]|\\uD805[\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF3A\\uDF3B\\uDF3F-\\uDF46]/gim.test(String.fromCodePoint(t))}function cv(t,e){return/(?:[\\u1039\\u17D2\\u1A60\\u1BAB\\u200D\\uAAF6]|\\uD802\\uDE3F|\\uD804[\\uDD33\\uDFD0]|\\uD806[\\uDD3E\\uDE47\\uDE99]|\\uD807[\\uDD45\\uDD97\\uDF42])$/.test(t)||new RegExp("^\\\\p{gc=Mc}","u").test(e)}var pv={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},fv={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},dv={\\u0644\\u0622:[65269,65270],\\u0644\\u0623:[65271,65272],\\u0644\\u0625:[65273,65274],\\u0644\\u0627:[65275,65276]},Bc=1604,yv=/[\\u0600-\\u06ff\\u0750-\\u077f\\u0870-\\u089f\\u08a0-\\u08ff\\ufb50-\\ufdff\\ufe70-\\ufeff]/;function mv(t,e,r){let i=0;for(let n of t.split(";")){let[a,s]=n.split(",").map(l=>parseInt(l,36)),o=i+a;for(let l=o;l{let r=e.codePointAt(0);return{codePoint:r,type:gv(r),form:null}})}function Dv(t){let e=t.filter(r=>r.type!=="T");for(let r=0;r0&&xv(e[r-1].type),a=r+1String.fromCodePoint(Sv(r))).join("")}function Fv(t,e,r){var n;let i=e.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?t=t.toLocaleUpperCase():i==="lowercase"&&(t=t.toLocaleLowerCase()),((n=Ar.applyArabicShaping)!=null?n:Ev)(t)}function Tv(t,e,r){for(let i of t.sections)i.text=Fv(i.text,e,r);return t}function Ws(t,e,r){let i=r?e.last.points:e.first.points,n=r?i[i.length-1]:i[0];return`${t}:${n.x}:${n.y}`}function kv(t){let e=t.first.points,r=e.length;for(let a=t.first.next;a;a=a.next)r+=a.points.length-1;let i=Array(r);for(let a=0;a=0&&cv(e[i],r)?e[i]+=r:e.push(r)}return e}function Cv(t){let e=new Set;if(ey){Oi!=null||(Oi=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of Oi.segment(t))e.add(i);return e}let r=0;for(let i of t.split(new RegExp("\\\\b|(?=\\\\p{Ideo})","u")))e.add(r),r+=i.length;return e}function ry(t){let e=t.codePointAt(0);return t.length>(e>65535?2:1)}function au(t){return/\\s/u.test(String.fromCodePoint(t))}function nl(t){for(let e of t)if(ts(e.codePointAt(0)))return!0;return!1}function Mv(t){for(let e of t)if(!Bv(e.codePointAt(0)))return!1;return!0}function Bv(t){return!sv(t)}function Lc(t){return!(ts(t)||uv(t))}function iy(t){return new RegExp("\\\\p{sc=Arab}","u").test(String.fromCodePoint(t))}function ny(t){return ov(t)}function ay(t){for(let e of t)if(ny(e.codePointAt(0)))return!0;return!1}var Gr={"!":"\\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"};function Pv(t){let e="",r={premature:!0,value:void 0},i=t[Symbol.iterator](),n=i.next(),a=t[Symbol.iterator]();a.next();let s=a.next();for(;!n.done;)(s.done||!Lc(s.value.codePointAt(0))||Gr[s.value])&&(r.premature||!Lc(r.value.codePointAt(0))||Gr[r.value])&&Gr[n.value]?e+=Gr[n.value]:e+=n.value,r={value:n.value,premature:!1},n=i.next(),s=a.next();return e}var zv={10:!0,13:!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},Lv={40:!0};function Vc(t,e,r,i,n,a){var s;if("fontStack"in e){let o=(s=r[e.fontStack])==null?void 0:s.default,l=o==null?void 0:o[t];if(l)return l.metrics.advance*e.scale+n;let u=0;for(let h of t){let c=o==null?void 0:o[h];c&&(u+=c.metrics.advance*e.scale+n)}return u}{let o=i[e.imageName];return o?o.displaySize[0]*e.scale*24/a+n:0}}function Oc(t,e,r,i){let n=(t-e)**2;return i?tr&&Rc(e[i-1]);)i--;this.text=e.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(e,r){let i=this.graphemes().slice(e,r).join(""),n=this.sectionIndex.slice(e,r);return new al(i,this.sections,n)}toCodeUnitIndex(e){return this.graphemes().slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}getMaxImageSize(e){let r=0,i=0;for(let n=0;n0?i[i.length-1]:"",a=il(n+e);this.text+=e,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let s=a.length-+!!n;for(let o=0;o=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,r,i,n,a){let s=[],o=this.determineAverageLineWidth(e,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),h=null,c=0,p=0;for(let f=0;f0){let y=u[f-1].codePointAt(0),m=d.codePointAt(0),g=lv(y),x=Mc(y)&&Mc(m);(zv[y]||g||"imageName"in this.getSection(f-1)||u[f+1]!==void 0&&Lv[m]||x&&(h!=null?h:h=Cv(this.text)).has(p))&&s.push($c(f,c,o,s,Vv(y,m,g&&l),!1))}au(d.codePointAt(0))||(c+=Vc(d,this.getSection(f),i,n,e,a)),p+=d.length}return sy($c(this.length(),c,o,s,0,!0))}determineAverageLineWidth(e,r,i,n,a){let s=0,o=0;for(let u of this.graphemes()){let h=this.getSection(o);s+=Vc(u,h,i,n,e,a),o++}let l=Math.max(1,Math.ceil(s/r));return s/l}};function Ov(){return(function(t){var e={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},r={},i={};r.L=1,i[1]="L",Object.keys(e).forEach(function(N,at){r[N]=1<1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function d(N,at){var Y=0,k=new Map,ot=at&&new Map,X;return N.split(",").forEach(function K(j){if(j.indexOf("+")!==-1)for(var Nt=+j;Nt--;)K(X);else{X=j;var bt=j.split(">"),nt=bt[0],kt=bt[1];nt=String.fromCodePoint(Y+=parseInt(nt,36)),kt=String.fromCodePoint(Y+=parseInt(kt,36)),k.set(nt,kt),at&&ot.set(kt,nt)}}),{map:k,reverseMap:ot}}var y,m,g;function x(){if(!y){var N=d(f.pairs,!0),at=N.map,Y=N.reverseMap;y=at,m=Y,g=d(f.canonical,!1).map}}function v(N){return x(),y.get(N)||null}function b(N){return x(),m.get(N)||null}function w(N){return x(),g.get(N)||null}var _=r.L,A=r.R,S=r.EN,T=r.ES,L=r.ET,O=r.AN,B=r.CS,V=r.B,F=r.S,$=r.ON,G=r.BN,P=r.NSM,z=r.AL,it=r.LRO,dt=r.RLO,ct=r.LRE,pt=r.RLE,Kt=r.PDF,jt=r.LRI,Jt=r.RLI,Oe=r.FSI,Gt=r.PDI;function Re(N,at){for(var Y=125,k=new Uint32Array(N.length),ot=0;ot0)Ie--;else if(is>0){for(qe=0;!lt[lt.length-1]._isolate;)lt.pop();var ns=lt[lt.length-1]._isolInitIndex;ns!=null&&(Nt.set(ns,zt),Nt.set(zt,ns)),lt.pop(),is--}wt=lt[lt.length-1],j[zt]=wt._level,wt._override&&K(zt,wt._override)}else Lt&Kt?(Ie===0&&(qe>0?qe--:!wt._isolate&<.length>1&&(lt.pop(),wt=lt[lt.length-1])),j[zt]=wt._level):Lt&V&&(j[zt]=nt.level);else j[zt]=wt._level,wt._override&&Lt!==G&&K(zt,wt._override)}for(var Cr=[],me=null,ur=nt.start;ur<=nt.end;ur++){var as=k[ur];if(!(as&o)){var Vu=j[ur],Ou=as&n,m1=as===Gt;me&&Vu===me._level?(me._end=ur,me._endsWithIsolInit=Ou):Cr.push(me={_start:ur,_end:ur,_level:Vu,_startsWithPDI:m1,_endsWithIsolInit:Ou})}}for(var ss=[],In=0;In=0;Bn--)if(!(k[Bn]&o)){Nu=j[Bn];break}var hs=Mr[Mr.length-1],x1=j[hs],Uu=nt.level;if(!(k[hs]&n)){for(var Pn=hs+1;Pn<=nt.end;Pn++)if(!(k[Pn]&o)){Uu=j[Pn];break}}ss.push({_seqIndices:Mr,_sosType:Math.max(Nu,g1)%2?A:_,_eosType:Math.max(Uu,x1)%2?A:_})}}for(var cs=0;cs=0;Ln--)if(!(k[q[Ln]]&o)){fs=k[q[Ln]];break}K(qu,fs&(n|Gt)?$:fs)}}if(X.get(S))for(var Vn=0;Vn=-1;On--){var Gu=On===-1?yi:k[q[On]];if(Gu&a){Gu===z&&K(ju,O);break}}}if(X.get(z))for(var ds=0;ds=0&&(Pr=k[q[gs]],Pr&o);gs--);for(var xs=mi+1;xs=0&&k[q[Rn]]&(L|o);Rn--)K(q[Rn],S);for(ge++;ge=0&&k[q[$n]]&o;$n--)K(q[$n],$);for(var Nn=gi+1;Nn=0;bi--){var ws=zr[bi].char;if(ws===Ku||ws===b(w(vi))||v(w(ws))===vi){Un.push([zr[bi].seqIndex,Lr]),zr.length=bi;break}}}Un.sort(function(Wt,he){return Wt[0]-he[0]});for(var Ds=0;Ds=0;Ss--){var rh=q[Ss];if(k[rh]&Hu){var ih=k[rh]&xi?A:_;xe=ih===Br?Br:ih;break}}}if(xe){if(k[q[qn]]=k[q[_s]]=xe,xe!==Br){for(var wi=qn+1;wi=0;_i--)if(k[q[_i]]&o)nh=_i;else{Fs=k[q[_i]]&xi?A:_;break}for(var ah=v1,Ai=je+1;Ai=0&&c(N[Gn])&l;Gn--)j[Gn]=nt.level}}return{levels:j,paragraphs:bt};function sh(Wt,he){for(var Zt=Wt;Zt=j&&c(N[nt])&l;nt--)bt[nt]=K.level;for(var kt=K.level,di=1/0,lr=0;lrkt&&(kt=Ne),Ne=di;Ue--)for(var lt=0;lt=Ue){for(var wt=lt;lt+1=Ue;)lt++;lt>wt&&X.push([wt+j,lt+j])}}}),X}function or(N,at,Y,k){var ot=Ir(N,at,Y,k),X=[].concat(N);return ot.forEach(function(K,j){X[j]=(at.levels[K]&1?Te(N[K]):null)||N[K]}),X.join("")}function Ir(N,at,Y,k){for(var ot=ke(N,at,Y,k),X=[],K=0;K=0;i--){let n=ou.getBidiCharTypeName(t[i].text[0]);Nv.has(n)?(t[i].level=e,r=!0):r&&$v.has(n)?t[i].level=e:r=!1}}function jv(t,e){let r=e,i=1/0;for(let{level:a}of t)a>r&&(r=a),(a|1)=i;a--)for(let s=0;s=a;)o++;for(let l=s,u=o;le>=n.start&&e<=n.end))==null?void 0:r.level)!=null?i:0}function Yv(t,e,r,i,n){let a=Uv(t,e,i,n);qv(a,r);let s="",o=[];for(let l of jv(a,r)){if(Rv.test(l.text))continue;let u=Gv(l);s+=u,o.push(...Array(u.length).fill(l.index))}return{text:s,sourceIndices:o}}function Wv(t,e){let r=e.filter(a=>a>0&&aa-s),n=[];for(let a=0;a+1n.start))).map(([n,a])=>Yv(t,r,Xv(i,n),n,a))}function Zv(t,e){return oy(t,e).map(r=>r.text)}function Hv(t,e,r){return oy(t,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=e[n])!=null?a:0})])}var sl=4294967296,Nc=1/sl,Uc=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),lu=class{constructor(t){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(t,e,r=this.length){let i;for(;i=this.nextField(r);)t(i,e,this);return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){let t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){let t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*sl;return this.pos+=8,t}readSFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*sl;return this.pos+=8,t}readFloat(){let t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){let t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){let e=this.buf,r=e[this.pos++];if(r<128)return r;let i=r&127,n;return n=e[this.pos++],i|=(n&127)<<7,n<128||(n=e[this.pos++],i|=(n&127)<<14,n<128)||(n=e[this.pos++],i|=(n&127)<<21,n<128)?i:(n=e[this.pos],i|=(n&15)<<28,Jv(i,t,this))}readSVarint(){let t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){let t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Uc?Uc.decode(this.buf.subarray(e,t)):pb(this.buf,e,t)}readBytes(){let t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){let r=this.readPackedEnd();for(;this.pos=t)return 0;let e=this.readVarint();return this.type=e&7,this._valueStart=this.pos,e>>>3}skip(t){let e=t&7;if(e===0)for(;this.buf[this.pos++]>127;);else if(e===2)this.pos=this.readVarint()+this.pos;else if(e===5)this.pos+=4;else if(e===1)this.pos+=8;else throw Error(`Unimplemented type: ${e}`)}},Kv=class{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.length=this.buf.length}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e=0&&t<128){this.pos>=this.length&&this.realloc(1),this.buf[this.pos++]=t;return}if(t>268435455||t<0){tb(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))}writeSVarint(t){this.writeVarint(t<0?-t*2-1:t*2)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(t.length*4),this.pos++;let e=this.pos;this.pos=fb(this.buf,t,this.pos);let r=this.pos-e;r>=128&&qc(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){let e=t.length;this.writeVarint(e),this.realloc(e),this.buf.set(t,this.pos),this.pos+=e}writeRawMessage(t,e){this.pos++;let r=this.pos;t(e,this);let i=this.pos-r;i>=128&&qc(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(t,e,r){this.writeTag(t,2),this.writeRawMessage(e,r)}writePackedVarint(t,e){e.length&&this.writeMessage(t,ib,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,nb,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,ob,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,ab,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,sb,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,lb,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,ub,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,hb,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,cb,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}};function Jv(t,e,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return Qv(t,n,e);throw Error("Expected varint not more than 10 bytes")}function Qv(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function tb(t,e){let r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(r=~(-t%4294967296),i=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,i=i+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),eb(r,i,e),rb(i,e)}function eb(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function rb(t,e){let r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function qc(t,e,r){let i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(i),r.buf.copyWithin(t+i,t,r.pos)}function ib(t,e){let r=t.length,i=e.buf,n=e.pos,a=e.length;for(let s=0;sa){e.pos=n,e.writeVarint(o),i=e.buf,n=e.pos,a=e.length;continue}for(;o>127;)i[n++]=o%128|128,o=Math.floor(o/128);i[n++]=o}e.pos=n}function nb(t,e){for(let r=0;r239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function fb(t,e,r){for(let i=0,n,a;i55295&&n<57344)if(a){if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else{n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):a=n;continue}else a&&(a=(t[r++]=239,t[r++]=191,t[r++]=189,null));n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=n&63|128)}return r}function db(t){return typeof(t==null?void 0:t.renderWithWebGL)=="function"}function uu(t){let e=0,r=0;for(let s of t)e+=s.w*s.h,r=Math.max(r,s.w);t.sort((s,o)=>o.h-s.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],n=0,a=0;for(let s of t)for(let o=i.length-1;o>=0;o--){let l=i[o];if(!(s.w>l.w||s.h>l.h)){if(s.x=l.x,s.y=l.y,a=Math.max(a,s.y+s.h),n=Math.max(n,s.x+s.w),s.w===l.w&&s.h===l.h){let u=i.pop();u&&o=r;a--)e.push(a);r=i+1}else{for(let a=r;at.toCodeUnitIndex(a)),i=Ar.isParsed()?Ar:null;if(t.sections.length===1)return i?i.processBidirectionalText(t.toString(),r).map(a=>Gc(a,t.sections,[...a].map(()=>0))):Zv(t.toString(),r).map(a=>ol([...a],t.sections,[...a].map(()=>0)));let n=xb(t);return i?i.processStyledBidirectionalText(t.text,n,r).map(([a,s])=>Gc(a,t.sections,s)):Hv(t.text,n,r).map(([a,s])=>{let o=[...a];return ol(o,t.sections,hy(o).map(l=>{var u;return(u=s[l])!=null?u:0}))})}function ol(t,e,r){var a;let i=new su(t.join(""),e,[]),n=0;for(let s of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...s].length;return i}function hy(t){let e=[],r=0;for(let i of t)e.push(r),r+=i.length;return e}function Gc(t,e,r){let i=[...t],n=hy(i),a=gb(i);return ol(a.map(s=>i[s]),e,a.map(s=>{var o;return(o=r[n[s]])!=null?o:0}))}function na(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d){let y=su.fromFeature(t,n);c===2&&y.verticalizePunctuation();let m=y.determineLineBreaks(u,a,e,i,f),g=ay(y.text)?vb(y,m):mb(y,m),x=[],v={positionedLines:x,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:c,iconsInText:!1,verticalizable:!1};return Tb(v,e,r,i,g,s,o,l,c,u,p,d),!yb(x)&&v}function cy(t){let e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function bb(t,e,r){let i=e.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=e.getMaxImageSize(t),s=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:s}}function py(t){switch(t){case"top":return 0;case"center":return .5;default:return 1}}function wb(t,e,r,i){var a,s;if(t!=null&&t.rect)return t;let n=(s=(a=e[r.fontStack])==null?void 0:a.default)==null?void 0:s[i];return n?{rect:null,metrics:n.metrics}:null}function Db(t,e,r){return!(t===1||!e&&!ts(r)||e&&(au(r)||iy(r)))}function ma(t){return new RegExp("\\\\p{Nd}","u").test(String.fromCodePoint(t))}function fy(t){return new RegExp("\\\\p{Lu}","u").test(String.fromCodePoint(t))}function _b(t){return/[\\p{P}\\p{S}]/u.test(String.fromCodePoint(t))}function Ab(t){let e=t.some(ma)&&t.every(i=>ma(i)||_b(i)),r=t.length<=3&&t.every(i=>fy(i)||ma(i));return e||r}function Sb(t){return(ma(t)||fy(t))&&!iy(t)}function Eb(t,e){let r=!1;for(let i=0;ia.codePointAt(0)),i=r.map(ts),n=a=>!i[a]&&!au(r[a])&&!("imageName"in t.getSection(a));for(let a=0;au){let p=Math.ceil(i/u);r*=p/n,n=p}return{x1:e,y1:r,x2:e+i,y2:r+n}}function Xc(t,e,r,i,n,a){let s=t.image,o;if(s.content){let m=s.content,g=s.pixelRatio||1;o=[m[0]/g,m[1]/g,s.displaySize[0]-m[2]/g,s.displaySize[1]-m[3]/g]}let l=e.left*a,u=e.right*a,h,c,p,f;r==="width"||r==="both"?(f=n[0]+l-i[3],c=n[0]+u+i[1]):(f=n[0]+(l+u-s.displaySize[0])/2,c=f+s.displaySize[0]);let d=e.top*a,y=e.bottom*a;return r==="height"||r==="both"?(h=n[1]+d-i[0],p=n[1]+y+i[2]):(h=n[1]+(d+y-s.displaySize[1])/2,p=h+s.displaySize[1]),{image:s,top:h,right:c,bottom:p,left:f,collisionPadding:o}}var Yc=32640;function Wc(t,e){let{expression:r}=e;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new st(t+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=Pb(r.zoomStops,t);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=zb(r),n=r.evaluate(new st(t+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function Pb(t,e){let r=0;for(;rt.evaluate(new st(e===-1/0?t.zoomStops[1]-1:e)))}var Jr=class yy extends M{constructor(e,r,i,n){super(e,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new yy(this.x,this.y,this.angle,this.segment)}};C("Anchor",Jr);function my(t,e,r,i,n){if(e.segment===void 0||r===0)return!0;let a=e,s=e.segment+1,o=0;for(;o>-r/2;){if(s--,s<0)return!1;o-=t[s].dist(a),a=t[s]}o+=t[s].dist(t[s+1]),s++;let l=[],u=0;for(;oi;)u-=l.shift().angleDelta;if(u>n)return!1;s++,o+=c.dist(p)}return!0}function gy(t){let e=0;for(let r=0;ru){let d=(u-l)/f,y=new Jr(br.number(c.x,p.x,d),br.number(c.y,p.y,d),p.angleTo(c),h);return y._round(),!s||my(t,y,o,s,e)?y:void 0}l+=f}}function Vb(t,e,r,i,n,a,s,o,l){let u=xy(i,a,s),h=vy(i,n),c=h*s,p=t[0].x===0||t[0].x===l||t[0].y===0||t[0].y===l;e-c=0&&b=0&&w=0&&p+u<=h){let _=new Jr(b,w,x,d);_._round(),(!i||my(t,_,a,i,n))&&f.push(_)}}c+=g}return!o&&!f.length&&!s&&(f=by(t,c/2,r,i,n,a,s,!0,l)),f}function Ob(t,e,r,i,n){let a=[];for(let s of t){let o;for(let l=0;l=i&&h.x>=i)&&(u.x>=i?u=new M(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round():h.x>=i&&(h=new M(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round()),!(u.y>=n&&h.y>=n)&&(u.y>=n?u=new M(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round():h.y>=n&&(h=new M(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round()),(!o||!u.equals(o[o.length-1]))&&(o=[u],a.push(o)),o.push(h)))))}}return a}function wy(t,e,r,i,n,a){let s=Zc(t,e,r,n,0);return s=Zc(s,e,i,a,1),s}function Zc(t,e,r,i,n){switch(e){case 1:return Rb(t,r,i,n);case 2:return Hc(t,r,i,n,!1);case 3:return Hc(t,r,i,n,!0)}return[]}function Rb(t,e,r,i){let n=[];for(let a of t)for(let s of a){let o=i===0?s.x:s.y;o>=e&&o<=r&&n.push([s])}return n}function $b(t,e,r,i,n){let a=i===0?Nb:Ub,s=[],o=[];for(let h=0;he&&s.push(a(c,p,e)):f>r?d=e&&(s.push(a(c,p,e)),y=!0),d>r&&f<=r&&(s.push(a(c,p,r)),y=!0),!n&&y&&(o.push(s),s=[])}let l=t.length-1,u=i===0?t[l].x:t[l].y;return u>=e&&u<=r&&s.push(t[l]),n&&s.length>0&&!s[0].equals(s[s.length-1])&&s.push(new M(s[0].x,s[0].y)),s.length>0&&o.push(s),o}function Hc(t,e,r,i,n){let a=[];for(let s of t){let o=$b(s,e,r,i,n);o.length>0&&a.push(...o)}return a}function Nb(t,e,r){let i=(r-t.x)/(e.x-t.x);return new M(r,t.y+(e.y-t.y)*i)}function Ub(t,e,r){let i=(r-t.y)/(e.y-t.y);return new M(t.x+(e.x-t.x)*i,r)}function Kc(t,e,r,i){let n=[],a=t.image,s=a.pixelRatio,o=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom},h=a.stretchX||[[0,o]],c=a.stretchY||[[0,l]],p=(F,$)=>F+$[1]-$[0],f=h.reduce(p,0),d=c.reduce(p,0),y=o-f,m=l-d,g=0,x=f,v=0,b=d,w=0,_=y,A=0,S=m;if(a.content&&i){let F=a.content,$=F[2]-F[0],G=F[3]-F[1];(a.textFitWidth||a.textFitHeight)&&(u=dy(t)),g=aa(h,0,F[0]),v=aa(c,0,F[1]),x=aa(h,F[0],F[2]),b=aa(c,F[1],F[3]),w=F[0]-g,A=F[1]-v,_=$-x,S=G-b}let T=u.x1,L=u.y1,O=u.x2-T,B=u.y2-L,V=(F,$,G,P)=>{let z=sa(F.stretch-g,x,O,T),it=oa(F.fixed-w,_,F.stretch,f),dt=sa($.stretch-v,b,B,L),ct=oa($.fixed-A,S,$.stretch,d),pt=sa(G.stretch-g,x,O,T),Kt=oa(G.fixed-w,_,G.stretch,f),jt=sa(P.stretch-v,b,B,L),Jt=oa(P.fixed-A,S,P.stretch,d),Oe=new M(z,dt),Gt=new M(pt,dt),Re=new M(pt,jt),$e=new M(z,jt),sr=new M(it/s,ct/s),fi=new M(Kt/s,Jt/s),Te=e*Math.PI/180;if(Te){let N=Math.sin(Te),at=Math.cos(Te),Y=[at,-N,N,at];Oe._matMult(Y),Gt._matMult(Y),$e._matMult(Y),Re._matMult(Y)}let $t=F.stretch+F.fixed,ke=G.stretch+G.fixed,or=$.stretch+$.fixed,Ir=P.stretch+P.fixed;return{tl:Oe,tr:Gt,bl:$e,br:Re,tex:{x:a.paddedRect.x+1+$t,y:a.paddedRect.y+1+or,w:ke-$t,h:Ir-or},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:sr,pixelOffsetBR:fi,minFontScaleX:_/s/O,minFontScaleY:S/s/B,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(V({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:o+1},{fixed:0,stretch:l+1}));else{let F=Jc(h,y,f),$=Jc(c,m,d);for(let G=0;G0&&(d=Math.max(10,d),this.circleDiameter=d)}else{let c=(h=a.image)!=null&&h.content&&(a.image.textFitWidth||a.image.textFitHeight)?dy(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};c.y1=c.y1*s-o[0],c.y2=c.y2*s+o[2],c.x1=c.x1*s-o[3],c.x2=c.x2*s+o[1];let p=a.collisionPadding;if(p&&(c.x1-=p[0]*s,c.y1-=p[1]*s,c.x2+=p[2]*s,c.y2+=p[3]*s),u){let f=new M(c.x1,c.y1),d=new M(c.x2,c.y1),y=new M(c.x1,c.y2),m=new M(c.x2,c.y2),g=u*Math.PI/180;f._rotate(g),d._rotate(g),y._rotate(g),m._rotate(g),c.x1=Math.min(f.x,d.x,y.x,m.x),c.x2=Math.max(f.x,d.x,y.x,m.x),c.y1=Math.min(f.y,d.y,y.y,m.y),c.y2=Math.max(f.y,d.y,y.y,m.y)}t.emplaceBack(e.x,e.y,c.x1,c.y1,c.x2,c.y2,r,i,n)}this.boxEndIndex=t.length}},jb=class{constructor(t=[],e=(r,i)=>ri)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t=0)break;e[t]=e[a],t=a}e[t]=n}};function Gb(t,e=1){let r=Ia.fromPoints(t[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new jb([],Xb),{minX:s,minY:o,maxX:l,maxY:u}=r;if(i===0)return new M(s,o);for(let p=s;pc.d||!c.d)&&(c=p),!(p.max-c.d<=e)&&(n=p.h/2,a.push(new qr(p.p.x-n,p.p.y-n,n,t)),a.push(new qr(p.p.x+n,p.p.y-n,n,t)),a.push(new qr(p.p.x-n,p.p.y+n,n,t)),a.push(new qr(p.p.x+n,p.p.y+n,n,t)))}return h.d>0&&c.d-h.d<=e?h.p:c.p}function Xb(t,e){return e.max-t.max}var qr=class{constructor(t,e,r,i){this.p=new M(t,e),this.h=r,this.d=Yb(this.p,i),this.max=this.d+this.h*Math.SQRT2}};function Yb(t,e){let r=!1,i=1/0;for(let n of e)for(let a=0,s=n.length,o=s-1;at.y!=u.y>t.y&&t.x<(u.x-l.x)*(t.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,wd(t,l,u))}return(r?1:-1)*Math.sqrt(i)}function Wb(t){let e=0,r=0,i=0,n=t[0];for(let a=0,s=n.length,o=s-1;ap*24);h.startsWith("top")?c[1]-=7:h.startsWith("bottom")&&(c[1]+=7),l[u+1]=c}return new Ae(l)}let a=i.get("text-variable-anchor");if(a){let o;o=t._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(e,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(e,{},r)*24,cu];let l=[];for(let u of a)l.push(u,Dy(u,o));return new Ae(l)}return null}function Hb(t){var h,c;t.bucket.createArrays();let e=512*t.bucket.overscaling;t.bucket.tilePixelRatio=gt/e,t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;let r=t.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new st(18))};if(t.bucket.textSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new st(p),t.canonical),n["text-size"].possiblyEvaluate(new st(f),t.canonical)]}if(t.bucket.iconSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new st(p),t.canonical),n["icon-size"].possiblyEvaluate(new st(f),t.canonical)]}let s=i.get("text-line-height")*24,o=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let p of t.bucket.features){let f=i.get("text-font").evaluate(p,{},t.canonical).join(","),d=u.evaluate(p,{},t.canonical),y=a.layoutTextSize.evaluate(p,{},t.canonical),m=a.layoutIconSize.evaluate(p,{},t.canonical),g={horizontal:{},vertical:void 0},x=p.text,v=[0,0];if(x){let A=x.toString(),S=i.get("text-letter-spacing").evaluate(p,{},t.canonical)*24,T=Mv(A)?S:0,L=i.get("text-anchor").evaluate(p,{},t.canonical),O=_y(r,p,t.canonical);if(!O){let $=i.get("text-radial-offset").evaluate(p,{},t.canonical);v=$?Dy(L,[$*24,cu]):i.get("text-offset").evaluate(p,{},t.canonical).map(G=>G*24)}let B=o?"center":i.get("text-justify").evaluate(p,{},t.canonical),V=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(p,{},t.canonical)*24:1/0,F=()=>{t.bucket.allowVerticalPlacement&&nl(A)&&(g.vertical=na(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,V,s,L,"left",T,v,2,!0,y,d))};if(!o&&O){let $=new Set;if(B==="auto")for(let P=0;P{z.x<0||z.x>=8192||z.y<0||z.y>=8192||Qb(t,z,P,r,i,n,F,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,x,[_,_,_,_],T,l,b,A,L,y,e,a,u,h,s,p)};if(O==="line")for(let P of Ob(e.geometry,0,0,gt,gt)){let z=yr(P,$),it=Vb(z,w,S,r.vertical||m,i,24,v,t.overscaling,gt);for(let dt of it){let ct=m;(!ct||!tw(t,ct.text,B,dt))&&G(z,dt)}}else if(O==="line-center"){for(let P of e.geometry)if(P.length>1){let z=yr(P,$),it=Lb(z,S,r.vertical||m,i,24,v);it&&G(z,it)}}else if(e.type==="Polygon")for(let P of Na(e.geometry,0)){let z=Gb(P,16);G(yr(P[0],$,!0),new Jr(z.x,z.y,0))}else if(e.type==="LineString")for(let P of e.geometry){let z=yr(P,$);G(z,new Jr(z[0].x,z[0].y,0))}else if(e.type==="Point")for(let P of e.geometry)for(let z of P)G([z],new Jr(z.x,z.y,0))}function Jb(t,e){let r=t.length,i=e==null?void 0:e.values;if((i==null?void 0:i.length)>0)for(let n=0;n32640&&Mt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(x=[128*d.compositeTextSizes[0].evaluate(s,{},y),128*d.compositeTextSizes[1].evaluate(s,{},y)],(x[0]>32640||x[1]>32640)&&Mt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,m,x,o,a,s,h,e,u.lineStartIndex,u.lineLength,f,y,l);for(let v of c)p[v]=t.text.placedSymbolArray.length-1;return m.length*4}function Ay(t){for(let e in t)return t[e];return null}function Qb(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,w,_,A,S,T){let L=t.addToLineVertexArray(e,r),O=o.layout.get("symbol-height-offset").evaluate(b,{},A);O>t.maxHeightOffset&&(t.maxHeightOffset=O);let B,V,F,$,G=0,P=0,z=0,it=0,dt=-1,ct=-1,pt={},Kt=(0,Ea.default)("");if(t.allowVerticalPlacement&&i.vertical){let Y=o.layout.get("text-rotate").evaluate(b,{},A)+90,k=i.vertical;F=new la(l,e,u,h,c,k,p,f,d,Y),s&&($=new la(l,e,u,h,c,s,m,g,d,Y))}if(n){let Y=o.layout.get("icon-rotate").evaluate(b,{}),k=o.layout.get("icon-text-fit")!=="none",ot=Kc(n,Y,_,k),X=s?Kc(s,Y,_,k):void 0;V=new la(l,e,u,h,c,n,m,g,!1,Y),G=ot.length*4;let K=t.iconSizeData,j=null;K.kind==="source"?(j=[128*o.layout.get("icon-size").evaluate(b,{})],j[0]>32640&&Mt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):K.kind==="composite"&&(j=[128*w.compositeIconSizes[0].evaluate(b,{},A),128*w.compositeIconSizes[1].evaluate(b,{},A)],(j[0]>32640||j[1]>32640)&&Mt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,ot,j,v,x,b,0,e,L.lineStartIndex,L.lineLength,-1,A,O),dt=t.icon.placedSymbolArray.length-1,X&&(P=X.length*4,t.addSymbols(t.icon,X,j,v,x,b,2,e,L.lineStartIndex,L.lineLength,-1,A,O),ct=t.icon.placedSymbolArray.length-1)}let jt=Object.keys(i.horizontal);for(let Y of jt){let k=i.horizontal[Y];B||(B=(Kt=(0,Ea.default)(k.text),new la(l,e,u,h,c,k,p,f,d,o.layout.get("text-rotate").evaluate(b,{},A))));let ot=k.positionedLines.length===1;if(z+=tp(t,e,k,a,o,d,b,y,O,L,i.vertical?1:3,ot?jt:[Y],pt,dt,w,A),ot)break}i.vertical&&(it+=tp(t,e,i.vertical,a,o,d,b,y,O,L,2,["vertical"],pt,ct,w,A));let Jt=B?B.boxStartIndex:t.collisionBoxArray.length,Oe=B?B.boxEndIndex:t.collisionBoxArray.length,Gt=F?F.boxStartIndex:t.collisionBoxArray.length,Re=F?F.boxEndIndex:t.collisionBoxArray.length,$e=V?V.boxStartIndex:t.collisionBoxArray.length,sr=V?V.boxEndIndex:t.collisionBoxArray.length,fi=$?$.boxStartIndex:t.collisionBoxArray.length,Te=$?$.boxEndIndex:t.collisionBoxArray.length,$t=-1,ke=(Y,k)=>Y!=null&&Y.circleDiameter?Math.max(Y.circleDiameter,k):k;$t=ke(B,$t),$t=ke(F,$t),$t=ke(V,$t),$t=ke($,$t);let or=+($t>-1);or&&($t*=S/24),t.glyphOffsetArray.length>=t.maxGlyphs&&Mt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),b.sortKey!==void 0&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);let Ir=_y(o,b,A),[N,at]=Jb(t.textAnchorOffsets,Ir);T&&(Kt=ew(Kt,b)),t.symbolInstances.emplaceBack(e.x,e.y,pt.right>=0?pt.right:-1,pt.center>=0?pt.center:-1,pt.left>=0?pt.left:-1,pt.vertical||-1,dt,ct,Kt,Jt,Oe,Gt,Re,$e,sr,fi,Te,u,z,it,G,P,or,0,p,$t,N,at,O)}function tw(t,e,r,i){let n=t.compareText;if(!(e in n))n[e]=[];else{let a=n[e];for(let s=a.length-1;s>=0;s--)if(i.dist(a[s])s.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Wc(this.zoom,e["text-size"]),this.iconSizeData=Wc(this.zoom,e["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=ep(r,"text-overlap","text-allow-overlap")!=="never"||ep(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(s=>uy[s])),this.stateDependentLayerIds=this.layers.filter(s=>s.isStateDependent()).map(s=>s.id),this.sourceID=t.sourceID}createArrays(){this.text=new ll(new Dr(this.layers,this.zoom,t=>t.startsWith("text"))),this.icon=new ll(new Dr(this.layers,this.zoom,t=>t.startsWith("icon"))),this.glyphOffsetArray=new ud,this.lineVertexArray=new hd,this.symbolInstances=new ld,this.textAnchorOffsets=new pd}calculateGlyphDependencies(t,e,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,s=su.fromFeature(t,r),o=s.graphemes();for(let u=0;u0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=o.value.kind!=="constant"||!!o.value.value||Object.keys(o.parameters).length>0,h=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let c=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,d=new st(this.zoom);for(let{feature:m,id:g,index:x,sourceLayerIndex:v}of t){let b=i._featureFilter.needGeometry,w=hi(m,b);if(!i._featureFilter.filter(d,w,r))continue;b||(w.geometry=Fr(m));let _;if(l){let L=i.getValueAndResolveTokens("text-field",w,r,f),O=Le.factory(L);this.hasRTLText||(this.hasRTLText=nw(O)),_=Tv(O,i,w)}let A;if(u){let L=i.getValueAndResolveTokens("icon-image",w,r,f);A=L instanceof Se?L:Se.fromString(L)}if(!_&&!A)continue;let S=this.sortFeaturesByKey?h.evaluate(w,{},r):void 0,T={id:g,text:_,icon:A,index:x,sourceLayerIndex:v,geometry:w.geometry,properties:m.properties,type:Fn.types[m.type],sortKey:S};if(this.features.push(T),A&&(c[A.name]=!0),_){let L=a.evaluate(w,{},r).join(","),O=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(y=this.writingModes)==null?void 0:y.includes(2);let B=nl(_.toString());this.calculateGlyphDependencies(_,p,L,O,B);for(let V of _.sections)V.image&&(c[V.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=Iv(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.sortKey)}update(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}))}addFeatures({options:t,canonical:e,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:s}){Hb({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:s,canonical:e,subdivisionGranularity:t.subdivisionGranularity,hasPromoteId:t.featureIndex.promoteId!=null})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,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(t,e){let r=this.lineVertexArray.length;if(t.segment!==void 0){let i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),a={};for(let s=t.segment+1;s=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(let s=0;s0}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(t,e){let r=t.placedSymbolArray.get(e),i=r.vertexStartIndex+r.numGlyphs*4;for(let n=r.vertexStartIndex;ni[s]-i[o]||n[o]-n[s]),a}addToSortKeyRanges(t,e){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0:r.sortKey)===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let r=this.symbolInstances.get(e);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};C("SymbolBucket",Sy,{omit:["layers","collisionBoxArray","features","compareText"]});function aw(t,e){return e.replace(/{([^{}]+)}/g,(r,i)=>t&&i in t?String(t[i]):"")}var rp,sw=()=>rp||(rp=new Yt({"symbol-placement":new R(D.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new R(D.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new R(D.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new U(D.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new R(D.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new R(D.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new R(D.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new R(D.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new R(D.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new U(D.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new U(D.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new R(D.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new R(D.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new U(D.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new U(D.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new U(D.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new R(D.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new U(D.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new U(D.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new R(D.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new R(D.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new R(D.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new U(D.layout_symbol["text-field"],"text-field"),"text-font":new U(D.layout_symbol["text-font"],"text-font"),"text-size":new U(D.layout_symbol["text-size"],"text-size"),"text-max-width":new U(D.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new R(D.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new U(D.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new U(D.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new U(D.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new R(D.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new U(D.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new U(D.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new R(D.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new R(D.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new U(D.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new R(D.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new R(D.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new U(D.layout_symbol["text-transform"],"text-transform"),"text-offset":new U(D.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new R(D.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new R(D.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new R(D.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new R(D.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new U(D.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new R(D.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),ip,ow=()=>ip||(ip=new Yt({"icon-opacity":new U(D.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new U(D.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new U(D.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new U(D.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new U(D.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new R(D.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new R(D.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new U(D.paint_symbol["text-opacity"],"text-opacity"),"text-color":new U(D.paint_symbol["text-color"],"text-color",{runtimeType:pe,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new U(D.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new U(D.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new U(D.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new R(D.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new R(D.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Zs={get paint(){return ow()},get layout(){return sw()}},Ey=class{constructor(t){if(t.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:vn,this.defaultValue=t}evaluate(t){if(t.formattedSection){let e=this.defaultValue.property.overrides;if(e!=null&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){if(!this.defaultValue.isConstant()){let e=this.defaultValue.value;t(e._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};C("FormatSectionOverride",Ey,{omit:["defaultValue"]});var lw=class hl extends ye{constructor(e,r){super(e,Zs,r)}recalculate(e,r){super.recalculate(e,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new le(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let s of n)a.includes(s)||a.push(s);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,i,n){let a=this.layout.get(e).evaluate(r,{},i,n),s=this._unevaluatedLayout._values[e];return!s.isDataDriven()&&!Xa(s.value)&&a?aw(r.properties,a):a}createBucket(e){return new Sy(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of Zs.paint.overridableProperties){if(!hl.hasPaintOverride(this.layout,e))continue;let r=this.paint.get(e),i=new Bl(new Ey(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new ln("source",i):new _a("composite",i,r.value.zoomStops),this.paint._values[e]=new le(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:hl.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){let i=e.get("text-field"),n=Zs.paint.properties[r],a=!1,s=o=>{var l;for(let u of o)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof Le)s(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let o=u=>{if(!a)if(u instanceof ri&&St(u.value)===bn){let h=u.value;s(h.sections)}else u instanceof Yp?s(u.sections):u.eachChild(o)},l=i.value;l._styleExpression&&o(l._styleExpression.expression)}return a}};function uw(t,e,r,i=1){var a;let n=(a=t.get("icon-padding").evaluate(e,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}var np,hw=()=>np||(np=new Yt({"background-color":new R(D.paint_background["background-color"],"background-color"),"background-pattern":new id(D.paint_background["background-pattern"],"background-pattern"),"background-opacity":new R(D.paint_background["background-opacity"],"background-opacity")})),cw={get paint(){return hw()}};var pw=class extends ye{constructor(t,e){super(t,cw,e)}};var fw=class extends ye{constructor(t,e){super(t,{},e),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};function Fy(t,e){if(t.type==="custom")return new fw(t,e);switch(t.type){case"background":return new pw(t,e);case"circle":return new Kg(t,e);case"color-relief":return new lx(t,e);case"fill":return new $x(t,e);case"fill-extrusion":return new u2(t,e);case"heatmap":return new rx(t,e);case"hillshade":return new ax(t,e);case"line":return new rv(t,e);case"raster":return new pg(t,e);case"symbol":return new lw(t,e)}}var dw=class{constructor(t){this._methodToThrottle=t,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var t;this._triggered||(this._triggered=!0,(t=this._channel)==null||t.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},yw={once:!0},Ty=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new dw(()=>this.process()),this.subscription=dh(this.target,"message",r=>this.receive(r),!1),this.globalScope=vr(self)?t:window}registerMessageHandler(t,e){this.messageHandlers[t]=e}unregisterMessageHandler(t){delete this.messageHandlers[t]}sendAsync(t,e){return new Promise((r,i)=>{let n=Math.round(Math.random()*1e18).toString(36).substring(0,10),a=e?dh(e.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new gl(e.signal.reason))},yw):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let s=[],o=Si(Xe({},t),{id:n,sourceMapId:this.mapId,origin:location.origin,data:Hi(t.data,s)});this.target.postMessage(o,{transfer:s})})}receive(t){let e=t.data,r=e.id,i=["file://","resource://android","null"],n=[e.origin,location.origin],a=e.origin===location.origin,s=n.some(o=>i.includes(o));if((a||s)&&!(e.targetMapId&&this.mapId!==e.targetMapId)){if(e.type===""){delete this.tasks[r];let o=this.abortControllers[r];delete this.abortControllers[r],o&&o.abort();return}if(vr(self)||e.mustQueue){this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,e)}}process(){if(this.taskQueue.length===0)return;let t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,e){return et(this,null,function*(){if(e.type===""){let n=this.resolveRejects[t];if(delete this.resolveRejects[t],!n)return;e.error?n.reject(tn(Ki(e.error))):n.resolve(Ki(e.data));return}if(!this.messageHandlers[e.type]){this.completeTask(t,null,null);return}let r=Ki(e.data),i=new AbortController;this.abortControllers[t]=i;try{let n=yield this.messageHandlers[e.type](e.sourceMapId,r,i);this.completeTask(t,null,n)}catch(n){this.completeTask(t,tn(n))}})}completeTask(t,e,r){let i=[];delete this.abortControllers[t];let n={id:t,type:"",sourceMapId:this.mapId,origin:location.origin,error:e?Hi(e):null,data:Hi(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};function mw(t,e,r){return!(t<0||t>25||r<0||r>=2**t||e<0||e>=2**t)}var ky=class{constructor(t,e,r){if(!mw(t,e,r))throw Error(`x=${e}, y=${r}, z=${t} outside of bounds. 0<=x<${2**t}, 0<=y<${2**t} 0<=z<=25 `);this.z=t,this.x=e,this.y=r,this.key=Qi(0,t,t,e,r)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,r){let i=xw(this.x,this.y,this.z),n=vw(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,e>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}isChildOf(t){let e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){let e=2**this.z;return new M((t.x*e-this.x)*gt,(t.y*e-this.y)*gt)}toString(){return`${this.z}/${this.x}/${this.y}`}},gw=class{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Qi(t,e.z,e.z,e.x,e.y)}},pu=class se{constructor(e,r,i,n,a){if(this.terrainRttPosMatrix32f=null,e= z; overscaledZ = ${e}; z = ${i}`);this.overscaledZ=e,this.wrap=r,this.canonical=new ky(i,+n,+a),this.key=Qi(r,e,i,n,a)}clone(){return new se(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?new se(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new se(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,r){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-e;return e>this.canonical.z?Qi(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):Qi(this.wrap*+r,e,e,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(e.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-e.canonical.z;return r<0?!1:e.canonical.x===this.canonical.x>>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new se(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new se(r,this.wrap,r,i,n),new se(r,this.wrap,r,i+1,n),new se(r,this.wrap,r,i,n+1),new se(r,this.wrap,r,i+1,n+1)]}isLessThan(e){return this.wrape.wrap?!1:this.overscaledZe.overscaledZ?!1:this.canonical.xe.canonical.x?!1:this.canonical.y=0&&e=0&&r=u)return null;let c=this.canonical.x+n,p=this.wrap;return c<0?(p-=Math.ceil(-c/u),c=(c%u+u)%u):c>=u&&(p+=Math.floor(c/u),c%=u),{tileID:new se(this.overscaledZ,p,l,c,h),x:s,y:o}}};function Qi(t,e,r,i,n){t*=2,t<0&&(t=t*-1-1);let a=1<0;n--){let a=1<Dw(n,a,r),t.layers[i])}function Dw(t,e,r=""){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let s=0;s>31}function Sw(t,e){let r=t.loadGeometry(),i=t.type,n=0,a=0;for(let s of r){let o=1;i===1&&(o=s.length),e.writeVarint(Ks(1,o));let l=i===3?s.length-1:s.length;for(let u=0;u=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${t} can\'t be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}},Fw=class{constructor(t,e,r,i,n){this.type="Feature",this._vectorTileFeature=t,this._x=r,this._y=i,this._z=e;for(let a in t.properties)typeof t.properties[a]=="string"&&t.properties[a].startsWith("__$json__:")&&(t.properties[a]=JSON.parse(t.properties[a].slice(10)));this.properties=t.properties,this.id=n}projectPoint(t,e,r,i){return[(t.x+e)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(t.y+r)*2/i)*Math.PI))-90]}projectLine(t,e,r,i){return t.map(n=>this.projectPoint(n,e,r,i))}get geometry(){if(this._geometry)return this._geometry;let t=this._vectorTileFeature,e=t.extent*2**this._z,r=t.extent*this._x,i=t.extent*this._y,n=t.loadGeometry();switch(t.type){case 1:{let a=[];for(let o of n)a.push(o[0]);let s=this.projectLine(a,r,i,e);this._geometry=a.length===1?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{let a=n.map(s=>this.projectLine(s,r,i,e));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=Ld(n),s=[];for(let o of a)s.push(o.map(l=>this.projectLine(l,r,i,e)));this._geometry=s.length===1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){let t={geometry:this.geometry};for(let e in this)e!=="_geometry"&&e!=="_vectorTileFeature"&&e!=="_x"&&e!=="_y"&&e!=="_z"&&(t[e]=this[e]);return t}},Tr=class{constructor(t,e,r){this._name=t,this.dataBuffer=e,typeof r=="number"?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){var e;return((e=this.nullabilityBuffer)==null?void 0:e.get(t))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},es=class extends Tr{},yu=class extends es{getValueFromBuffer(t){return this.dataBuffer[t]}},mu=class extends es{getValueFromBuffer(t){return this.dataBuffer[t]}},Cy=class extends Tr{constructor(t,e,r,i){super(t,e,i),this.delta=r}},gu=class extends Cy{constructor(t,e,r,i,n){super(t,n?Int32Array.of(e):Uint32Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}},xu=class extends Tr{constructor(t,e,r,i){super(t,i?Int32Array.of(e):Uint32Array.of(e),r)}getValueFromBuffer(t){return this.dataBuffer[0]}},Tw=class{constructor(t,e,r,i,n=4096){if(this._name=t,this._geometryVector=e,this._idVector=r,this._propertyVectors=i,this._extent=n,t.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var t;return(t=this._propertyVectors)!=null?t:[]}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(t)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let t=[],e=this.geometryVector.getGeometries();for(let r=0;r>>32-t;var pl=vu,bu=65536;function wu(t,e){return t-t%e}function kw(t){return wu(t+31,32)}function Py(t){if(!Number.isFinite(t)||t<=0)return bu;let e=wu(Math.floor(t),256);return e===0?256:e}function Iw(t){let e=t>>>0;return((e&255)<<24|(e&65280)<<8|e>>>8&65280|e>>>24&255)>>>0}function Cw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n]=s>>>30&3}function Mw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(s&1)<<2)&7,r[n++]=s>>>1&7,r[n++]=s>>>4&7,r[n++]=s>>>7&7,r[n++]=s>>>10&7,r[n++]=s>>>13&7,r[n++]=s>>>16&7,r[n++]=s>>>19&7,r[n++]=s>>>22&7,r[n++]=s>>>25&7,r[n++]=s>>>28&7,r[n++]=(s>>>31|(o&3)<<1)&7,r[n++]=o>>>2&7,r[n++]=o>>>5&7,r[n++]=o>>>8&7,r[n++]=o>>>11&7,r[n++]=o>>>14&7,r[n++]=o>>>17&7,r[n++]=o>>>20&7,r[n++]=o>>>23&7,r[n++]=o>>>26&7,r[n]=o>>>29&7}function Bw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function Pw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(s&7)<<2)&31,r[n++]=s>>>3&31,r[n++]=s>>>8&31,r[n++]=s>>>13&31,r[n++]=s>>>18&31,r[n++]=s>>>23&31,r[n++]=(s>>>28|(o&1)<<4)&31,r[n++]=o>>>1&31,r[n++]=o>>>6&31,r[n++]=o>>>11&31,r[n++]=o>>>16&31,r[n++]=o>>>21&31,r[n++]=o>>>26&31,r[n++]=(o>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function zw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(s&15)<<2)&63,r[n++]=s>>>4&63,r[n++]=s>>>10&63,r[n++]=s>>>16&63,r[n++]=s>>>22&63,r[n++]=(s>>>28|(o&3)<<4)&63,r[n++]=o>>>2&63,r[n++]=o>>>8&63,r[n++]=o>>>14&63,r[n++]=o>>>20&63,r[n++]=o>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n]=h>>>26&63}function Lw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(s&7)<<4)&127,r[n++]=s>>>3&127,r[n++]=s>>>10&127,r[n++]=s>>>17&127,r[n++]=s>>>24&127,r[n++]=(s>>>31|(o&63)<<1)&127,r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=(o>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(c&15)<<3)&127,r[n++]=c>>>4&127,r[n++]=c>>>11&127,r[n++]=c>>>18&127,r[n]=c>>>25&127}function Vw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n]=p>>>24&255}function Ow(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(s&15)<<5)&511,r[n++]=s>>>4&511,r[n++]=s>>>13&511,r[n++]=s>>>22&511,r[n++]=(s>>>31|(o&255)<<1)&511,r[n++]=o>>>8&511,r[n++]=o>>>17&511,r[n++]=(o>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(h&3)<<7)&511,r[n++]=h>>>2&511,r[n++]=h>>>11&511,r[n++]=h>>>20&511,r[n++]=(h>>>29|(c&63)<<3)&511,r[n++]=c>>>6&511,r[n++]=c>>>15&511,r[n++]=(c>>>24|(p&1)<<8)&511,r[n++]=p>>>1&511,r[n++]=p>>>10&511,r[n++]=p>>>19&511,r[n++]=(p>>>28|(f&31)<<4)&511,r[n++]=f>>>5&511,r[n++]=f>>>14&511,r[n]=f>>>23&511}function Rw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(s&255)<<2)&1023,r[n++]=s>>>8&1023,r[n++]=s>>>18&1023,r[n++]=(s>>>28|(o&63)<<4)&1023,r[n++]=o>>>6&1023,r[n++]=o>>>16&1023,r[n++]=(o>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=h>>>0&1023,r[n++]=h>>>10&1023,r[n++]=h>>>20&1023,r[n++]=(h>>>30|(c&255)<<2)&1023,r[n++]=c>>>8&1023,r[n++]=c>>>18&1023,r[n++]=(c>>>28|(p&63)<<4)&1023,r[n++]=p>>>6&1023,r[n++]=p>>>16&1023,r[n++]=(p>>>26|(f&15)<<6)&1023,r[n++]=f>>>4&1023,r[n++]=f>>>14&1023,r[n++]=(f>>>24|(d&3)<<8)&1023,r[n++]=d>>>2&1023,r[n++]=d>>>12&1023,r[n]=d>>>22&1023}function $w(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(s&1)<<10)&2047,r[n++]=s>>>1&2047,r[n++]=s>>>12&2047,r[n++]=(s>>>23|(o&3)<<9)&2047,r[n++]=o>>>2&2047,r[n++]=o>>>13&2047,r[n++]=(o>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(h&31)<<6)&2047,r[n++]=h>>>5&2047,r[n++]=h>>>16&2047,r[n++]=(h>>>27|(c&63)<<5)&2047,r[n++]=c>>>6&2047,r[n++]=c>>>17&2047,r[n++]=(c>>>28|(p&127)<<4)&2047,r[n++]=p>>>7&2047,r[n++]=p>>>18&2047,r[n++]=(p>>>29|(f&255)<<3)&2047,r[n++]=f>>>8&2047,r[n++]=f>>>19&2047,r[n++]=(f>>>30|(d&511)<<2)&2047,r[n++]=d>>>9&2047,r[n++]=d>>>20&2047,r[n++]=(d>>>31|(y&1023)<<1)&2047,r[n++]=y>>>10&2047,r[n]=y>>>21&2047}function Nw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(s&15)<<8)&4095,r[n++]=s>>>4&4095,r[n++]=s>>>16&4095,r[n++]=(s>>>28|(o&255)<<4)&4095,r[n++]=o>>>8&4095,r[n++]=o>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(h&255)<<4)&4095,r[n++]=h>>>8&4095,r[n++]=h>>>20&4095,r[n++]=c>>>0&4095,r[n++]=c>>>12&4095,r[n++]=(c>>>24|(p&15)<<8)&4095,r[n++]=p>>>4&4095,r[n++]=p>>>16&4095,r[n++]=(p>>>28|(f&255)<<4)&4095,r[n++]=f>>>8&4095,r[n++]=f>>>20&4095,r[n++]=d>>>0&4095,r[n++]=d>>>12&4095,r[n++]=(d>>>24|(y&15)<<8)&4095,r[n++]=y>>>4&4095,r[n++]=y>>>16&4095,r[n++]=(y>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function Uw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0,g=t[e+12]>>>0,x=t[e+13]>>>0,v=t[e+14]>>>0,b=t[e+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=y>>>0&65535,r[n++]=y>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=x>>>0&65535,r[n++]=x>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=b>>>0&65535,r[n]=b>>>16&65535}function qw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0;r[n++]=o>>>0&1,r[n++]=o>>>1&1,r[n++]=o>>>2&1,r[n++]=o>>>3&1,r[n++]=o>>>4&1,r[n++]=o>>>5&1,r[n++]=o>>>6&1,r[n++]=o>>>7&1,r[n++]=o>>>8&1,r[n++]=o>>>9&1,r[n++]=o>>>10&1,r[n++]=o>>>11&1,r[n++]=o>>>12&1,r[n++]=o>>>13&1,r[n++]=o>>>14&1,r[n++]=o>>>15&1,r[n++]=o>>>16&1,r[n++]=o>>>17&1,r[n++]=o>>>18&1,r[n++]=o>>>19&1,r[n++]=o>>>20&1,r[n++]=o>>>21&1,r[n++]=o>>>22&1,r[n++]=o>>>23&1,r[n++]=o>>>24&1,r[n++]=o>>>25&1,r[n++]=o>>>26&1,r[n++]=o>>>27&1,r[n++]=o>>>28&1,r[n++]=o>>>29&1,r[n++]=o>>>30&1,r[n++]=o>>>31&1}}function jw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0;r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n++]=o>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function Gw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0;r[n++]=o>>>0&7,r[n++]=o>>>3&7,r[n++]=o>>>6&7,r[n++]=o>>>9&7,r[n++]=o>>>12&7,r[n++]=o>>>15&7,r[n++]=o>>>18&7,r[n++]=o>>>21&7,r[n++]=o>>>24&7,r[n++]=o>>>27&7,r[n++]=(o>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function Xw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0;r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=h>>>0&15,r[n++]=h>>>4&15,r[n++]=h>>>8&15,r[n++]=h>>>12&15,r[n++]=h>>>16&15,r[n++]=h>>>20&15,r[n++]=h>>>24&15,r[n++]=h>>>28&15}}function Yw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0;r[n++]=o>>>0&31,r[n++]=o>>>5&31,r[n++]=o>>>10&31,r[n++]=o>>>15&31,r[n++]=o>>>20&31,r[n++]=o>>>25&31,r[n++]=(o>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(h&15)<<1)&31,r[n++]=h>>>4&31,r[n++]=h>>>9&31,r[n++]=h>>>14&31,r[n++]=h>>>19&31,r[n++]=h>>>24&31,r[n++]=(h>>>29|(c&3)<<3)&31,r[n++]=c>>>2&31,r[n++]=c>>>7&31,r[n++]=c>>>12&31,r[n++]=c>>>17&31,r[n++]=c>>>22&31,r[n++]=c>>>27&31}}function Ww(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0;r[n++]=o>>>0&63,r[n++]=o>>>6&63,r[n++]=o>>>12&63,r[n++]=o>>>18&63,r[n++]=o>>>24&63,r[n++]=(o>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=h>>>0&63,r[n++]=h>>>6&63,r[n++]=h>>>12&63,r[n++]=h>>>18&63,r[n++]=h>>>24&63,r[n++]=(h>>>30|(c&15)<<2)&63,r[n++]=c>>>4&63,r[n++]=c>>>10&63,r[n++]=c>>>16&63,r[n++]=c>>>22&63,r[n++]=(c>>>28|(p&3)<<4)&63,r[n++]=p>>>2&63,r[n++]=p>>>8&63,r[n++]=p>>>14&63,r[n++]=p>>>20&63,r[n++]=p>>>26&63}}function Zw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0;r[n++]=o>>>0&127,r[n++]=o>>>7&127,r[n++]=o>>>14&127,r[n++]=o>>>21&127,r[n++]=(o>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(h&3)<<5)&127,r[n++]=h>>>2&127,r[n++]=h>>>9&127,r[n++]=h>>>16&127,r[n++]=h>>>23&127,r[n++]=(h>>>30|(c&31)<<2)&127,r[n++]=c>>>5&127,r[n++]=c>>>12&127,r[n++]=c>>>19&127,r[n++]=(c>>>26|(p&1)<<6)&127,r[n++]=p>>>1&127,r[n++]=p>>>8&127,r[n++]=p>>>15&127,r[n++]=p>>>22&127,r[n++]=(p>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n++]=f>>>25&127}}function Hw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0,d=t[a++]>>>0;r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255}}function Kw(t,e,r,i){let n=i,a=e;for(let s=0;s<128;s++){let o=t[a++]>>>0;r[n++]=o&65535,r[n++]=o>>>16&65535}}function Jw(t,e,r,i,n){let a=pl[n]>>>0,s=e,o=0,l=t[s]>>>0,u=i;for(let h=0;h<8;h++){for(let c=0;c<32;c++)if(o+n<=32){let p=l>>>o&a;r[u+c]=p|0,o+=n,o===32&&(o=0,s++,c!==31&&(l=t[s]>>>0))}else{let p=32-o,f=l>>>o;s++,l=t[s]>>>0;let d=n-p,y=-1>>>32-d>>>0,m=(f|(l&y)<>>0)}}var fl=Py(bu),Qw=3*fl/256+fl|0;function zy(){let t=new Uint8Array(Qw);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:t,byteContainerI32:new Int32Array(t.buffer,t.byteOffset,t.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function t3(t=16){if(t<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${t}`);let e=Math.max(16,t|0);return{encodedWords:new Uint32Array(e),decoderWorkspace:zy()}}function e3(t,e){if(e<=t.encodedWords.length)return t.encodedWords;let r=new Uint32Array(Math.max(16,e*2));return t.encodedWords=r,r}function r3(t,e,r,i){i.byteContainer.length>>2;if(n.byteOffset&3)for(let o=0;o>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let o=i.byteContainerI32;(!o||o.buffer!==n.buffer||o.byteOffset!==n.byteOffset||o.length>>2)),o.set(t.subarray(e,e+a))}let s=r&3;if(s>0){let o=t[e+a|0]|0,l=a<<2;for(let u=0;u>>(u<<3)&255}return n}function i3(t,e,r){let i=t[e++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(e>=t.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${e}, needWords=1, availableWords=${t.length-e}, encodedWords=${t.length})`);let s=t[e++]>>>0,o=kw(s),l=s*a+31>>>5;if(e+l>t.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${s}, streamWordIndex=${e}, needWords=${l}, availableWords=${t.length-e}, encodedWords=${t.length})`);let u=n[a];(!u||u.length>>5)|0,r.exceptionSizes[a]=s}return e}function n3(t,e,r,i,n){switch(n){case 1:qw(t,e,r,i);break;case 2:jw(t,e,r,i);break;case 3:Gw(t,e,r,i);break;case 4:Xw(t,e,r,i);break;case 5:Yw(t,e,r,i);break;case 6:Ww(t,e,r,i);break;case 7:Zw(t,e,r,i);break;case 8:Hw(t,e,r,i);break;case 16:Kw(t,e,r,i);break;default:Jw(t,e,r,i,n)}return e+(n<<3)|0}function a3(t,e,r,i){if(r+2>e)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${e})`);let n=t[r++],a=t[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}function s3(t,e,r,i,n,a){if(r+1>e)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${e})`);let s=t[r++];if(s32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let o=s-i|0;if(o<1||o>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${o} at block=${a} (bitWidth=${i}, maxBits=${s})`);if(r+n>e)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${e-r})`);return{maxBits:s,exceptionBitWidth:o,bytePosIn:r}}function o3(t,e,r,i,n,a,s,o,l){let{maxBits:u,exceptionBitWidth:h,bytePosIn:c}=s3(n,a,s,r,i,l);if(s=c,h===1){let m=1<y)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${h} (ptr=${d}, need ${i}, size=${y}) at block ${l}`);for(let m=0;m0&&(c=o3(n,m,d,y,o,l,c,u,p))}if(h!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${e}, packedStart=${r}, consumedPackedEnd=${h}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${t.length})`)}function u3(t,e,r,i,n,a){let s=r|0,o=t[s]|0;if(o<=0||s+o>t.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${o} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${t.length})`);let l=s+1|0,u=s+o|0,h=t[u]>>>0,c=h+3>>>2,p=u+1,f=p+c;if(f>=t.length)throw Error(`FastPFOR decode: invalid byteSize=${h} (metaInts=${c}, pageStart=${s}, packedEnd=${u}, byteContainerStart=${p}) causes bitmapPos=${f} out of bounds (encoded.length=${t.length})`);let d=r3(t,p,h,a),y=h,m=i3(t,f,a);return a.dataPointers.fill(0),l3(t,s,l,u,e,i|0,n/256|0,d,y,a),m}function h3(t,e,r,i,n,a){let s=i+wu(n,256),o=i,l=r;for(;o!==s;){let u=Math.min(fl,s-o);l=u3(t,e,l,o,u,a),o=o+u|0}return l}function c3(t,e,r,i,n,a){if(a===0)return e;let s=0,o=e,l=e+r,u=n,h=n,c=n+a,p=0,f=0;for(;o>>s&255;if(s+=8,o+=s>>>5,s&=31,p|=(d&127)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${f}, partial=${p}, decoded=${h-u}/${a}, inPos=${o}, inEnd=${l})`)}if(h!==c)throw Error(`FastPFOR VByte: truncated stream (decoded=${h-u}, expected=${a}, consumedWords=${o-e}/${r}, vbyteStart=${e}, vbyteEnd=${l})`);return o}function p3(t,e,r){let i=0,n=0,a=new Uint32Array(e),s=r!=null?r:zy();if(t.length>0){let u=t[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=h3(t,a,i,n,u,s),n=n+u|0}let o=t.length-i|0,l=e-n|0;return c3(t,i,o,a,n,l),a}function f3(t,e,r,i,n){switch(n){case 2:Cw(t,e,r,i);return;case 3:Mw(t,e,r,i);return;case 4:Bw(t,e,r,i);return;case 5:Pw(t,e,r,i);return;case 6:zw(t,e,r,i);return;case 7:Lw(t,e,r,i);return;case 8:Vw(t,e,r,i);return;case 9:Ow(t,e,r,i);return;case 10:Rw(t,e,r,i);return;case 11:$w(t,e,r,i);return;case 12:Nw(t,e,r,i);return;case 16:Uw(t,e,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=t[e+u|0]|0;return}let a=pl[n]>>>0,s=e,o=0,l=t[s]>>>0;for(let u=0;u<32;u++)if(o+n<=32){let h=l>>>o&a;r[i+u]=h|0,o+=n,o===32&&(o=0,s++,u!==31&&(l=t[s]>>>0))}else{let h=32-o,c=l>>>o;s++,l=t[s]>>>0;let p=pl[n-h]>>>0,f=(c|(l&p)<t.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${e}, byteLength=${r}, bytes.length=${t.length})`);let n=Math.floor(r/4),a=r%4!=0,s=a?n+1:n;if(i.length0){let o=t.byteOffset+e;if(o&3)for(let l=0;l=64)throw Error("Varint too long")}return e.set(n),r}function m3(t,e,r){let i=new Float64Array(r);for(let n=0;n>4,n<128||(n=e[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=e[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(t>>>0);throw Error("Expected varint not more than 10 bytes")}function v3(t,e,r,i){return b3(t,e,r,i,t3(r>>>2))}function b3(t,e,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${t.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=r>>>2,o=e3(n,s);d3(t,a,r,o);let l=p3(o.subarray(0,s),e,n.decoderWorkspace);return i.add(r),l}function tt(t){return t>>>1^-(t&1)}function Ot(t){return t>>BigInt(1)^-(t&BigInt(1))}function He(t){return t%2==1?(t+1)/-2:t/2}function w3(t){let e=new Int32Array(t.length);for(let r=0;r=4)for(;i=4)for(;i=4)for(;r=4)for(let i=t[0];r=4)for(;i=4)for(;l>>0;for(let r=1;r>>0;return e}function hp(t){let e=new BigUint64Array(t.length);e[0]=BigInt.asUintN(64,Ot(t[0]));for(let r=1;r>>0,e[1]=tt(t[1])>>>0;for(let r=2;r>>0,e[r+1]=e[r-1]+tt(t[r+1])>>>0;return e}function L3(t,e,r,i){let n=Vy(t,e,r,i);return new Uint32Array(n)}function V3(t){return t[1]}function O3(t){return tt(t[1])}function R3(t){if(t.length===2){let e=tt(t[1]);return[e,e]}return[tt(t[2]),tt(t[3])]}function $3(t){return t[1]}function N3(t){return Ot(t[1])}function U3(t){if(t.length===2){let e=Ot(t[1]);return[e,e]}return[Ot(t[2]),Ot(t[3])]}var At;(function(t){t.PRESENT="PRESENT",t.DATA="DATA",t.OFFSET="OFFSET",t.LENGTH="LENGTH"})(At||(At={}));var qt;(function(t){t.NONE="NONE",t.SINGLE="SINGLE",t.SHARED="SHARED",t.VERTEX="VERTEX",t.MORTON="MORTON",t.FSST="FSST"})(qt||(qt={}));var be;(function(t){t.VERTEX="VERTEX",t.INDEX="INDEX",t.STRING="STRING",t.KEY="KEY"})(be||(be={}));var Ft;(function(t){t.VAR_BINARY="VAR_BINARY",t.GEOMETRIES="GEOMETRIES",t.PARTS="PARTS",t.RINGS="RINGS",t.TRIANGLES="TRIANGLES",t.SYMBOL="SYMBOL",t.DICTIONARY="DICTIONARY"})(Ft||(Ft={}));var q3=[At.PRESENT,At.DATA,At.OFFSET,At.LENGTH],cp=[Z.NONE,Z.DELTA,Z.COMPONENTWISE_DELTA,Z.RLE,Z.MORTON],j3=[re.NONE,re.FAST_PFOR,re.VARINT],G3=[qt.NONE,qt.SINGLE,qt.SHARED,qt.VERTEX,qt.MORTON,qt.FSST],X3=[be.VERTEX,be.INDEX,be.STRING,be.KEY],Y3=[Ft.VAR_BINARY,Ft.GEOMETRIES,Ft.PARTS,Ft.RINGS,Ft.TRIANGLES,Ft.SYMBOL,Ft.DICTIONARY];function ht(t,e){let r=H3(t,e);return r.logicalLevelTechnique1===Z.MORTON?W3(r,t,e):(Z.RLE===r.logicalLevelTechnique1||Z.RLE===r.logicalLevelTechnique2)&&re.NONE!==r.physicalLevelTechnique?Z3(r,t,e):r}function W3(t,e,r){let i=Rt(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function Z3(t,e,r){let i=Rt(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function H3(t,e){let r=t[e.get()],i=q3[r>>4],n={};switch(i){case At.DATA:n={dictionaryType:G3[r&15]};break;case At.OFFSET:n={offsetType:X3[r&15]};break;case At.LENGTH:n={lengthType:Y3[r&15]}}e.increment();let a=t[e.get()],s=cp[a>>5],o=cp[a>>2&7],l=j3[a&3];e.increment();let u=Rt(t,e,2),h=u[0],c=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:s,logicalLevelTechnique2:o,physicalLevelTechnique:l,numValues:h,byteLength:c,decompressedCount:h}}var ut;(function(t){t[t.FLAT=0]="FLAT",t[t.CONST=1]="CONST",t[t.SEQUENCE=2]="SEQUENCE",t[t.DICTIONARY=3]="DICTIONARY",t[t.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(ut||(ut={}));var de=class{constructor(t,e){this.values=t,this._size=e}get(t){let e=Math.floor(t/8),r=t%8;return(this.values[e]>>r&1)==1}set(t,e){let r=Math.floor(t/8),i=t%8;this.values[r]=this.values[r]|+!!e<>r&1}size(){return this._size}getBuffer(){return this.values}};function kr(t,e,r){if(!e)return t;let i=e.size(),n=t.constructor,a=new n(i),s=0;for(let o=0;o=s);){let o=t[i.increment()];if(o<=127){let l=o+3,u=t[i.increment()],h=Math.min(a+l,e);n.fill(u,a,h),a=h}else{let l=256-o;for(let u=0;u=12?e6.decode(t.subarray(e,r)):r6(t,e,r)}function r6(t,e,r){let i="",n=e;for(;n239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function Ma(t,e,r,i,n){return o6(pi(t,e,r),r,i,n)}function Vt(t,e,r,i,n){return l6(pi(t,e,r),r,i,n)}function Ke(t,e,r){return h6(pi(t,e,r),r)}function pi(t,e,r){let i=r.physicalLevelTechnique;switch(i){case re.FAST_PFOR:return v3(t,r.numValues,r.byteLength,e);case re.VARINT:return Rt(t,e,r.numValues);case re.NONE:return Q3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function Tn(t,e,r){let i=r.physicalLevelTechnique;switch(i){case re.VARINT:return Du(t,e,r.numValues);case re.NONE:return t6(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function i6(t,e,r){let i=pi(t,e,r);return i.length===1?tt(i[0]):O3(i)}function Su(t,e,r){let i=pi(t,e,r);return i.length===1?r.logicalLevelTechnique1===Z.DELTA?tt(i[0]):i[0]:V3(i)}function Ny(t,e,r){return R3(pi(t,e,r))}function Uy(t,e,r){return U3(Du(t,e,r.numValues))}function qy(t,e,r,i){return Gy(Tn(t,e,r),r,i)}function Eu(t,e,r,i){return Xy(Tn(t,e,r),r,i)}function n6(t,e,r,i){let n=a6(t,e,r,!1);return i?kr(n,i,0):n}function a6(t,e,r,i){if(r.physicalLevelTechnique===re.VARINT)return u6(m3(t,e,r.numValues),r,i);let n=Tn(t,e,r),a=i?Gy(n,r):Xy(n,r);return Float64Array.from(a,Number)}function s6(t,e,r){let i=Tn(t,e,r);return i.length===1?Ot(i[0]):N3(i)}function jy(t,e,r){let i=Tn(t,e,r);return i.length===1?r.logicalLevelTechnique1===Z.DELTA?Ot(i[0]):i[0]:$3(i)}function o6(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case Z.DELTA:if(e.logicalLevelTechnique2===Z.RLE){let a=e;if(!i)return B3(t,a.runs,a.numRleValues);t=dl(t,a.runs,a.numRleValues),n=op(t)}else n=op(t);break;case Z.RLE:n=S3(t,e.runs,e.numRleValues);break;case Z.MORTON:_u(t),n=new Int32Array(t);break;case Z.COMPONENTWISE_DELTA:if(r&&!i)return Vy(t,r.scale,r.min,r.max);n=k3(t);break;case Z.NONE:n=w3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?kr(n,i,0):n}function l6(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case Z.DELTA:if(e.logicalLevelTechnique2===Z.RLE){let a=e;n=up(dl(t,a.runs,a.numRleValues))}else n=up(t);break;case Z.RLE:n=dl(t,e.runs,e.numRleValues);break;case Z.MORTON:_u(t),n=t;break;case Z.COMPONENTWISE_DELTA:n=r&&!i?L3(t,r.scale,r.min,r.max):z3(t);break;case Z.NONE:n=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?kr(n,i,0):n}function Gy(t,e,r){let i;switch(e.logicalLevelTechnique1){case Z.DELTA:if(e.logicalLevelTechnique2===Z.RLE){let n=e;if(!r)return P3(t,n.runs,n.numRleValues);t=yl(t,n.runs,n.numRleValues),i=lp(t)}else i=lp(t);break;case Z.RLE:i=E3(t,e.runs,e.numRleValues);break;case Z.NONE:i=D3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?kr(i,r,BigInt(0)):i}function Xy(t,e,r){let i;switch(e.logicalLevelTechnique1){case Z.DELTA:if(e.logicalLevelTechnique2===Z.RLE){let n=e;i=hp(yl(t,n.runs,n.numRleValues))}else i=hp(t);break;case Z.RLE:i=yl(t,e.runs,e.numRleValues);break;case Z.NONE:i=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?kr(i,r,BigInt(0)):i}function u6(t,e,r){switch(e.logicalLevelTechnique1){case Z.DELTA:if(e.logicalLevelTechnique2===Z.RLE){let i=e;t=Ly(t,i.runs,i.numRleValues)}return A3(t),t;case Z.RLE:return p6(t,e,r);case Z.NONE:return r&&_3(t),t;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}}function h6(t,e){if(e.logicalLevelTechnique1===Z.DELTA&&e.logicalLevelTechnique2===Z.NONE)return I3(t);if(e.logicalLevelTechnique1===Z.RLE&&e.logicalLevelTechnique2===Z.NONE){let r=e;return M3(t,r.runs,r.numRleValues)}if(e.logicalLevelTechnique1===Z.NONE&&e.logicalLevelTechnique2===Z.NONE){T3(t);let r=new Uint32Array(e.numValues+1);return r[0]=0,r.set(t,1),r}if(e.logicalLevelTechnique1===Z.DELTA&&e.logicalLevelTechnique2===Z.RLE){let r=e,i=C3(t,r.runs,r.numRleValues);return _u(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function rs(t,e,r,i,n="int32"){let a=t.logicalLevelTechnique1;if(a===Z.RLE)return t.runs===1?ut.CONST:ut.FLAT;if(a!==Z.DELTA||t.logicalLevelTechnique2!==Z.RLE)return t.numValues===1?ut.CONST:ut.FLAT;let s=e instanceof de?e.size():e,o=t;if(o.numRleValues!==s)return ut.FLAT;if(o.runs===1)return ut.SEQUENCE;if(o.runs!==2)return t.numValues===1?ut.CONST:ut.FLAT;let l=i.get();if(t.physicalLevelTechnique===re.VARINT)return c6(r,i,n)?ut.SEQUENCE:t.numValues===1?ut.CONST:ut.FLAT;let u=i.get(),h=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),h[2]===2&&h[3]===2?ut.SEQUENCE:t.numValues===1?ut.CONST:ut.FLAT}function c6(t,e,r){let i=new By(e.get());if(r==="int64"){let a=Du(t,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=Rt(t,i,4);return n[2]===2&&n[3]===2}function p6(t,e,r){return r?F3(t,e.runs,e.numRleValues):Ly(t,e.runs,e.numRleValues)}var Yy=class extends es{getValueFromBuffer(t){return this.dataBuffer[t]}},Wy=class extends Cy{constructor(t,e,r,i,n){super(t,n?BigInt64Array.of(e):BigUint64Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}};function Fu(t,e,r){return{x:pp(t,e)-r,y:pp(t>>1,e)-r}}function pp(t,e){let r=0;for(let i=0;i>i;return r}var Pt;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON",t[t.MULTIPOINT=3]="MULTIPOINT",t[t.MULTILINESTRING=4]="MULTILINESTRING",t[t.MULTIPOLYGON=5]="MULTIPOLYGON"})(Pt||(Pt={}));var fp;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON"})(fp||(fp={}));var nr;(function(t){t[t.MORTON=0]="MORTON",t[t.VEC_2=1]="VEC_2",t[t.VEC_3=2]="VEC_3"})(nr||(nr={}));function f6(t){let e=Array(t.numGeometries),r=1,i=1,n=1,a=0,s=0,o=0,l=t.mortonSettings,u=t.topologyVector,h=u.geometryOffsets,c=u.partOffsets,p=u.ringOffsets,f=t.vertexOffsets,d=!f||f.length===0,y=t.containsPolygonGeometry(),m=t.vertexBuffer;for(let g=0;g[w]),r+=v,i+=v}break;case Pt.LINESTRING:{let v;y?(v=p[i]-p[i-1],i++):v=c[r]-c[r-1],r++;let b;d?(b=Or(m,s,v,!1),s+=v*2):(b=pr(t.vertexBufferType,m,f,o,v,!1,l),o+=v),e[a++]=[b],h&&n++}break;case Pt.POLYGON:{let v=c[r]-c[r-1];r++;let b=Array(v-1),w,_=p[i]-p[i-1];if(i++,d){w=Or(m,s,_,!0),s+=_*2;for(let A=0;Ar?e[a++]:1);return i}function mp(t,e,r,i){let n=new Uint32Array(e[e.length-1]+1),a=0;n[0]=a;let s=1,o=0;for(let l=0;l0;)n[a++]=t[u++]}}return n}var e1=class extends Tu{constructor(t,e,r,i,n,a,s,o){super(t,r,i,s!=null?s:e.length),this.indexBuffer=e,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a,this.sharedDictionaryCache=o}getValueFromBuffer(t){var n,a,s;(s=this.decodedDictionary)!=null||(this.decodedDictionary=(n=this.sharedDictionaryCache)==null?void 0:n.decodedDictionary,(a=this.decodedDictionary)!=null||(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let e=this.indexBuffer[t],r=this.offsetBuffer[e],i=this.offsetBuffer[e+1];return Au(this.decodedDictionary,r,i)}decodeDictionary(){var t;return(t=this.symbolLengthBuffer)!=null||(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),F6(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(t){let e=new Uint32Array(t.length-1),r=t[0];for(let i=1;i1&&!f.nullable||d===1&&f.nullable)throw Error(`The number of streams for the child field ${f.name} does not match its nullability. nullibilty: ${f.nullable}, numStreams: ${d}`);let m;if(f.nullable){let x=ht(t,e);m=new de(ci(t,x.numValues,x.byteLength,e),x.numValues)}let g=Vt(t,e,ht(t,e),void 0,m);if(o){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${y}"`);h[p++]=new e1(y,g,n,a,s,o,m,c)}else h[p++]=new Qr(y,g,n,a,m)}return h}var xp=class extends Tr{constructor(t,e,r){super(t,new Uint8Array,r!=null?r:e.length),this.values=e}getValueFromBuffer(t){return this.values[t]}},we;(function(t){t[t.STRING=1]="STRING",t[t.INT32=2]="INT32",t[t.UINT32=4]="UINT32",t[t.INT64=8]="INT64",t[t.UINT64=16]="UINT64",t[t.FLOAT=32]="FLOAT",t[t.DOUBLE=64]="DOUBLE",t[t.PRESENCE=128]="PRESENCE"})(we||(we={}));var tr;(function(t){t[t.FALSE=0]="FALSE",t[t.TRUE=1]="TRUE",t[t.START_MAP=2]="START_MAP",t[t.START_LIST=3]="START_LIST",t[t.COUNT=4]="COUNT"})(tr||(tr={}));function M6(t,e,r,i){let n=B6(r);if(i===0)return n.map(h=>new xp(h,[]));let a=P6(t,e,i),s=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,o=[],l=0,u=0;for(let h=0;h{var i;return t.name+((i=r.name)!=null?i:"")})}function P6(t,e,r){let i=t[e.get()];e.add(1);let n=Vt(t,e,ht(t,e)),a=r-1,s=[];i&we.STRING&&(a-=z6(t,e,s)),a-=L6(t,e,i,s),a-=V6(t,e,i,s);let o,l=0;if(i&we.PRESENCE){let h=O6(t,e);o=h.value,l=h.count,a--}let u=new Uint32Array;if(a>0&&(u=Vt(t,e,ht(t,e)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:s,presentStream:o,presentCount:l,flattenedValues:u}}function z6(t,e,r){let i=t[e.get()];e.add(1);let n=r1("",t,e,i);if(n)for(let a=0;aa.length)throw Error("Merged map counts underflow while decoding child streams");let f=Array(r),d=i,y=n;for(let x=0;xs.length)throw Error("Map value stream underflow while decoding feature payload");let b=$6(s,y,v,l);f[x]=b.value,y=b.nextIndex}let m=0;for(let x=i;x=r)throw Error("Unexpected end of map value stream");let n=t[e];if(n===tr.FALSE)return{value:!1,nextIndex:e+1};if(n===tr.TRUE)return{value:!0,nextIndex:e+1};if(n===tr.START_MAP){let a=vp(t,e,r);return{value:i1(t,e+2,a,i).value,nextIndex:a}}if(n===tr.START_LIST){let a=vp(t,e,r),s=[],o=e+2;for(;o=r)throw Error("Missing length for nested map/list payload");let i=t[e+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=e+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function n1(t,e){let r=t-tr.COUNT;if(r<0||r>=e.length)throw Error(`Scalar dictionary index out of range: ${t}`);return e[r]}function Xr(t,e){for(let r of e)t.push(r)}function N6(t,e,r,i,n,a){var s;return r.type==="scalarType"?a&&!a.has(r.name)?(Oy(i,t,e),null):U6(i,t,e,n,r.scalarType,r):((s=r.complexType)==null?void 0:s.physicalType)===rr.MAP?M6(t,e,r,i):i===0?null:C6(t,e,r,a)}function U6(t,e,r,i,n,a){var l;let s;if(t===0)return null;if(a.nullable){let u=ht(e,r),h=u.numValues,c=r.get(),p=ci(e,h,u.byteLength,r);r.set(c+u.byteLength),s=new de(p,u.numValues)}let o=s!=null?s:i;switch(n.physicalType){case rt.UINT_32:case rt.INT_32:return Y6(e,r,a,n,o);case rt.STRING:{let u=a.nullable?t-1:t;return(l=r1(a.name,e,r,u,s))!=null?l:null}case rt.BOOLEAN:return q6(e,r,a,i,o);case rt.UINT_64:case rt.INT_64:return X6(e,r,a,o,n);case rt.FLOAT:return j6(e,r,a,o);case rt.DOUBLE:return G6(e,r,a,o);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function q6(t,e,r,i,n){let a=ht(t,e),s=a.numValues,o=e.get(),l=kn(n)?n:void 0,u=ci(t,s,a.byteLength,e,l);e.set(o+a.byteLength);let h=new de(u,s);return new A6(r.name,h,n)}function j6(t,e,r,i){let n=ht(t,e),a=kn(i)?i:void 0,s=Ry(t,e,n.numValues,a);return new S6(r.name,s,i)}function G6(t,e,r,i){let n=ht(t,e),a=kn(i)?i:void 0,s=$y(t,e,n.numValues,a);return new mu(r.name,s,i)}function X6(t,e,r,i,n){let a=ht(t,e),s=rs(a,i,t,e,"int64"),o=n.physicalType===rt.INT_64;if(s===ut.FLAT){let u=kn(i)?i:void 0,h=o?qy(t,e,a,u):Eu(t,e,a,u);return new Yy(r.name,h,i)}if(s===ut.SEQUENCE){let u=Uy(t,e,a);return new Wy(r.name,u[0],u[1],a.numRleValues,o)}let l=o?s6(t,e,a):jy(t,e,a);return new t1(r.name,l,i,o)}function Y6(t,e,r,i,n){let a=ht(t,e),s=rs(a,n,t,e),o=i.physicalType===rt.INT_32;if(s===ut.FLAT){let u=kn(n)?n:void 0,h=o?Ma(t,e,a,void 0,u):Vt(t,e,a,void 0,u);return new yu(r.name,h,n)}if(s===ut.SEQUENCE){let u=Ny(t,e,a);return new gu(r.name,u[0],u[1],a.numRleValues,o)}let l=o?i6(t,e,a):Su(t,e,a);return new xu(r.name,l,n,o)}function kn(t){return t instanceof de}var It={ID:0,ID_NULLABLE:1,ID_LONG:2,GEOMETRY:4,SCALAR_BASE:10,STRUCT:30,MAP:31};function a1(t){switch(t){case It.ID:case It.ID|It.ID_NULLABLE:case It.ID|It.ID_LONG:case It.ID|It.ID_LONG|It.ID_NULLABLE:return{nullable:(t&It.ID_NULLABLE)!==0,columnScope:Xi.FEATURE,type:"scalarType",scalarType:{longID:(t&It.ID_LONG)!==0,type:"logicalType",logicalType:My.ID}};case It.GEOMETRY:return{nullable:!1,columnScope:Xi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:rr.GEOMETRY,children:[]}};case It.STRUCT:return{nullable:!1,columnScope:Xi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:rr.STRUCT,children:[]}};case It.MAP:return{nullable:!0,columnScope:Xi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:rr.MAP,children:[]}};default:return J6(t)}}function W6(t){return t>=It.SCALAR_BASE}function s1(t){return t===It.STRUCT||t===It.MAP}function Z6(t){if(t.type==="scalarType"){let e=t.scalarType;if(e.type==="physicalType")switch(e.physicalType){case rt.BOOLEAN:case rt.INT_8:case rt.UINT_8:case rt.INT_32:case rt.UINT_32:case rt.INT_64:case rt.UINT_64:case rt.FLOAT:case rt.DOUBLE:return!1;case rt.STRING:return!0;default:return!1}if(e.type==="logicalType")return!1}else if(t.type==="complexType"){let e=t.complexType;if(e.type==="physicalType")switch(e.physicalType){case rr.GEOMETRY:case rr.STRUCT:case rr.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",t),!1}function H6(t){var e;return t.type==="scalarType"&&((e=t.scalarType)==null?void 0:e.type)==="logicalType"&&t.scalarType.logicalType===My.ID}function K6(t){var e;return t.type==="complexType"&&((e=t.complexType)==null?void 0:e.type)==="physicalType"&&t.complexType.physicalType===rr.GEOMETRY}function J6(t){let e;switch(t){case 10:case 11:e=rt.BOOLEAN;break;case 12:case 13:e=rt.INT_8;break;case 14:case 15:e=rt.UINT_8;break;case 16:case 17:e=rt.INT_32;break;case 18:case 19:e=rt.UINT_32;break;case 20:case 21:e=rt.INT_64;break;case 22:case 23:e=rt.UINT_64;break;case 24:case 25:e=rt.FLOAT;break;case 26:case 27:e=rt.DOUBLE;break;case 28:case 29:e=rt.STRING;break;default:return null}return{nullable:!!(t&1),columnScope:Xi.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:e}}}var Q6=new TextDecoder,bp="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";function Iu(t,e){let r=Rt(t,e,1)[0];if(r===0)return"";let i=e.get(),n=i+r,a=t.subarray(i,n);return e.add(r),Q6.decode(a)}function t5(t){let e=t.name,r=t.nullable;return t.type==="scalarType"?{type:"scalarField",scalarField:t.scalarType,name:e,nullable:r}:{type:"complexField",complexField:t.complexType,name:e,nullable:r}}function o1(t,e){let r=Rt(t,e,1)[0]>>>0,i=r>=It.SCALAR_BASE?a1(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=Si(Xe({},i),{name:Iu(t,e)});if(n.type==="complexType"&&s1(r)){let a=n.complexType,s=Rt(t,e,1)[0]>>>0;a.children=Array(s);for(let o=0;o>>0,i=a1(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${bp}`);let n;if(W6(r))n=Iu(t,e);else if(r>>0,o=a.complexType;o.children=Array(s);for(let l=0;l>>0,a=Rt(t,e,1)[0]>>>0;i.columns=Array(a);for(let s=0;s>>0,s=i.get()+a;if(s>t.length)throw Error(`Block overruns tile: ${s} > ${t.length}`);let o=Rt(t,i,1)[0]>>>0;if(o!==1&&o!==2){i.set(s);continue}let[l,u]=r5(t,i),h=l.featureTables[0],c=null,p=null,f=[],d=0;for(let m of h.columns){let g=m.name;if(H6(m)){let x=null;if(m.nullable){let b=ht(t,i),w=i.get(),_=ci(t,b.numValues,b.byteLength,i);i.set(w+b.byteLength),x=new de(_,b.numValues)}let v=ht(t,i);d=x?x.size():v.decompressedCount,c=n5(t,m,i,g,v,x!=null?x:d,r)}else if(K6(m)){let x=Rt(t,i,1)[0];if(d===0){let v=i.get();d=ht(t,i).decompressedCount,i.set(v)}e&&(e.scale=e.extent/u),p=w6(t,x,i,d,e)}else{let x=Z6(m)?Rt(t,i,1)[0]:1;if(x===0)continue;let v=N6(t,i,m,x,d,void 0);if(v)if(Array.isArray(v))for(let b of v)f.push(b);else f.push(v)}}let y=new Tw(h.name,p,c,f,u);n.push(y),i.set(s)}return n}function n5(t,e,r,i,n,a,s=!1){var h;let o=(h=e.scalarType)!=null&&h.longID?rt.UINT_64:rt.UINT_32,l=typeof a=="number"?void 0:a,u=rs(n,a,t,r,o===rt.UINT_64?"int64":"int32");if(o===rt.UINT_32)switch(u){case ut.FLAT:return new yu(i,Vt(t,r,n,void 0,l),a);case ut.SEQUENCE:{let c=Ny(t,r,n);return new gu(i,c[0],c[1],n.numRleValues,!1)}case ut.CONST:return new xu(i,Su(t,r,n),a,!1)}switch(u){case ut.FLAT:return s?new mu(i,n6(t,r,n,l),a):new Yy(i,Eu(t,r,n,l),a);case ut.SEQUENCE:{let c=Uy(t,r,n);return new Wy(i,c[0],c[1],n.numRleValues,!1)}case ut.CONST:return new t1(i,jy(t,r,n),a,!1)}throw Error("Vector type not supported for id column.")}var Qs=Py(bu);Qs/32*4,3*Qs/256+Qs|0;var a5=class{constructor(t,e){var r;switch(this._featureData=t,this.properties=this._featureData.properties||{},(r=this._featureData.geometry)==null?void 0:r.type){case Pt.POINT:case Pt.MULTIPOINT:this.type=1;break;case Pt.LINESTRING:case Pt.MULTILINESTRING:this.type=2;break;case Pt.POLYGON:case Pt.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=e,this.id=Number(this._featureData.id)}loadGeometry(){let t=[];for(let e of this._featureData.geometry.coordinates){let r=[];for(let i of e)r.push(new M(i.x,i.y));t.push(r)}return t}},s5=class{constructor(t){this.features=[],this.featureTable=t,this.name=t.name,this.extent=t.extent,this.version=2,this.features=t.getFeatures(),this.length=this.features.length}feature(t){return new a5(this.features[t],this.extent)}},Cu=class{constructor(t){this.layers={};let e=i5(new Uint8Array(t));this.layers=e.reduce((r,i)=>Si(Xe({},r),{[i.name]:new s5(i)}),{})}},Mu=class{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new fo(gt,16,0),this.grid3D=new fo(gt,16,0),this.featureIndexArray=new dd,this.promoteId=e}insert(t,e,r,i,n,a){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let o=a?this.grid3D:this.grid;for(let l of e){let u=[1/0,1/0,-1/0,-1/0];for(let h of l)u[0]=Math.min(u[0],h.x),u[1]=Math.min(u[1],h.y),u[2]=Math.max(u[2],h.x),u[3]=Math.max(u[3],h.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&o.insert(s,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new Cu(this.rawTileData).layers:this.vtLayers=new Zl(new lu(this.rawTileData)).layers,this.sourceLayerCoder=new du(this.vtLayers?Object.keys(this.vtLayers).sort():[cl])),this.vtLayers}query(t,e,r,i){this.loadVTLayers();let n=t.params,a=gt/t.tileSize/t.scale,s=ai(n.filter,"queryRenderedFeatures filter",n.globalState),o=t.queryGeometry,l=t.queryPadding*a,u=Ia.fromPoints(o),h=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),c=Ia.fromPoints(t.cameraQueryGeometry).expandBy(l),p=this.grid3D.query(c.minX,c.minY,c.maxX,c.maxY,(y,m,g,x)=>Rg(t.cameraQueryGeometry,y-l,m-l,g+l,x+l));for(let y of p)h.push(y);h.sort(l5);let f={},d;for(let y of h){if(y===d)continue;d=y;let m=this.featureIndexArray.get(y),g=null;this.loadMatchingFeature(f,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,s,n.layers,n.availableImages,e,r,i,(x,v,b)=>(g||(g=Fr(x)),v.queryIntersectsFeature({queryGeometry:o,feature:x,featureState:b,geometry:g,zoom:this.z,transform:t.transform,pixelsToTileUnits:a,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return f}loadMatchingFeature(t,e,r,i,n,a,s,o,l,u,h){let c=this.bucketLayerIDs[e];if(a&&!c.some(y=>a.has(y)))return;let p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(i);if(n.needGeometry){let y=hi(f,!0);if(!n.filter(new st(this.tileID.overscaledZ),y,this.tileID.canonical))return}else if(!n.filter(new st(this.tileID.overscaledZ),f))return;let d=this.getId(f,p);for(let y of c){if(a&&!a.has(y))continue;let m=o[y];if(!m)continue;let g={};d&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",d));let x=Xt({},l[y]);x.paint=wp(x.paint,m.paint,f,g,s),x.layout=wp(x.layout,m.layout,f,g,s);let v=!h||h(f,m,g);if(!v)continue;let b=new Fw(f,this.z,this.x,this.y,d);b.layer=x;let w=t[y];w===void 0&&(w=t[y]=[]),w.push({featureIndex:i,feature:b,intersectionZ:v})}}lookupSymbolFeatures(t,e,r,i,n,a,s,o){let l={};this.loadVTLayers();let u=ai(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let h of t)this.loadMatchingFeature(l,r,i,h,u,a,s,o,e);return l}hasLayer(t){for(let e of this.bucketLayerIDs)for(let r of e)if(t===r)return!0;return!1}getId(t,e){var i;let r=t.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[e];r=t.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=t.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(t.properties.cluster_id))}return r}};C("FeatureIndex",Mu,{omit:["rawTileData","sourceLayerCoder"]});function o5(t){return typeof t=="object"&&!!t&&"evaluate"in t}function wp(t,e,r,i,n){return xn(t,(a,s)=>{let o=e instanceof Wa?e.get(s):null;return o5(o)?o.evaluate(r,i,void 0,n):o})}function l5(t,e){return e-t}var l1=class{constructor(t){this.maxEntries=t,this.map=new Map}get(t){let e=this.map.get(t);return e!==void 0&&(this.map.delete(t),this.map.set(t,e)),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxEntries){let r=this.map.keys().next().value;this.map.delete(r)}this.map.set(t,e)}clear(){this.map.clear()}};function Bu(t){let e=typeof t;if(e==="number"||e==="boolean"||e==="string"||t==null)return JSON.stringify(t);if(Array.isArray(t)){let n="[";for(let a of t)n+=`${Bu(a)},`;return`${n}]`}let r=Object.keys(t).sort(),i="{";for(let n=0;nthis._layers[c.id]),s=a[0];if(s.isHidden())continue;let o=s.source||"",l=this.familiesBySource[o];l||(l=this.familiesBySource[o]={});let u=s.sourceLayer||"_geojsonTileLayer",h=l[u];h||(h=l[u]=[]),h.push(a)}}},c1=class{constructor(t){let e={},r=[];for(let s in t){let o=e[s]={};for(let l in t[s]){let u=t[s][l];o[l]={};for(let h in u){let c=u[h];if(!c||c.bitmap.width===0||c.bitmap.height===0)continue;let p={x:0,y:0,w:c.bitmap.width+2,h:c.bitmap.height+2};r.push(p),o[l][h]={rect:p,metrics:c.metrics}}}}let{w:i,h:n}=uu(r),a=new Qa({width:i||1,height:n||1});for(let s in t)for(let o in t[s]){let l=t[s][o];for(let u in l){let h=l[u];if(!h||h.bitmap.width===0||h.bitmap.height===0)continue;let c=e[s][o][u].rect;Qa.copy(h.bitmap,a,{x:0,y:0},{x:c.x+1,y:c.y+1},h.bitmap)}}this.image=a,this.positions=e}};C("GlyphAtlas",c1);var p1=class{constructor(t){this.tileID=new pu(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,e,r,i,n){return et(this,null,function*(){this.data=t,this.collisionBoxArray=new Rl;let a=new du(Object.keys(t.layers).sort()),s=new Mu(this.tileID,this.promoteId);s.bucketLayerIDs=[];let o={},l={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:r,subdivisionGranularity:n},u=e.familiesBySource[this.source];for(let S in u){let T=t.layers[S];if(!T)continue;T.version===1&&Mt(`Vector tile source "${this.source}" layer "${S}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let L=a.encode(S),O=[];for(let B=0;BF.id)))}}let h=xn(l.glyphDependencies,S=>xn(S,T=>Object.keys(T)));for(let S of this.inFlightDependencies)S==null||S.abort();this.inFlightDependencies=[];let c=Promise.resolve({});if(Object.keys(h).length){let S=new AbortController;this.inFlightDependencies.push(S),c=i.sendAsync({type:"GG",data:{stacks:h,source:this.source,tileID:this.tileID,type:"glyphs"}},S)}let p=Object.keys(l.iconDependencies),f=Promise.resolve({});if(p.length){let S=new AbortController;this.inFlightDependencies.push(S),f=i.sendAsync({type:"GI",data:{icons:p,source:this.source,tileID:this.tileID,type:"icons"}},S)}let d=Object.keys(l.patternDependencies),y=Promise.resolve({});if(d.length){let S=new AbortController;this.inFlightDependencies.push(S),y=i.sendAsync({type:"GI",data:{icons:d,source:this.source,tileID:this.tileID,type:"patterns"}},S)}let m=l.dashDependencies,g=Promise.resolve({});if(Object.keys(m).length){let S=new AbortController;this.inFlightDependencies.push(S),g=i.sendAsync({type:"GDA",data:{dashes:m}},S)}let[x,v,b,w]=yield Promise.all([c,f,y,g]),_=new c1(x),A=new hu(v,b);for(let S in o){let T=o[S];T.hasDependencies&&(u1(T.layers,this.zoom,r),T.addFeatures({options:l,canonical:this.tileID.canonical,glyphMap:x,glyphPositions:_.positions,iconMap:v,iconPositions:A.iconPositions,patternMap:b,patternPositions:A.patternPositions,dashPositions:w,showCollisionBoxes:this.showCollisionBoxes}))}return{buckets:Object.values(o).filter(S=>!S.isEmpty()),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:_.image,imageAtlas:A,dashPositions:w,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?v:null,glyphPositions:this.returnDependencies?_.positions:null}})}};function u1(t,e,r){let i=new st(e);for(let n of t)n.recalculate(i,r)}var f1=class{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(t,e){this.loading[t]=e}finishLoading(t){delete this.loading[t]}abort(t){let e=this.loading[t];e!=null&&e.abort&&(e.abort.abort(),delete this.loading[t])}getParsing(t){return this.parsing[t]}setParsing(t,e){this.parsing[t]=e}removeParsing(t){delete this.parsing[t]}markLoaded(t,e){this.loaded[t]=e}getLoaded(t){let e=this.loaded[t];if(e)return e}removeLoaded(t){delete this.loaded[t]}clearLoaded(){this.loaded={}}},d1=class{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}},p5=class{constructor(t,e,r,i,n){this.type=t,this.properties=r||{},this.extent=n,this.pointsArray=e,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(e=>new M(e.x,e.y)))}},f5=class{constructor(t,e,r){this.version=2,this._myFeatures=t,this.name=e,this.length=t.length,this.extent=r}feature(t){return this._myFeatures[t]}},d5=class{constructor(){this.layers={}}addLayer(t){this.layers[t.name]=t}};function y5(t,e,r){let{extent:i}=t,n=2**(r.z-e.z),a=(r.x-e.x*n)*i,s=(r.y-e.y*n)*i,o=[];for(let l=0;l0&&l.addLayer(d)}let h={vectorTile:l,rawData:fu(l).buffer};return this.overzoomedTileResultCache.set(s,h),h}reloadTile(t){return et(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}abortTile(t){return et(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return et(this,null,function*(){this.tileState.removeLoaded(t.uid)})}},g5=class{constructor(){this.loaded={}}loadTile(t){return et(this,null,function*(){let{uid:e,encoding:r,rawImageData:i,redFactor:n,greenFactor:a,blueFactor:s,baseShift:o}=t,l=i.width+4,u=i.height+4,h=Ba(i)?new Ht({width:l,height:u},yield Ep(i,-2,-2,l,u)):i,c=new Yl(e,h,r,n,a,s,o);return this.loaded||(this.loaded={}),this.loaded[e]=c,c})}removeTile(t){let e=this.loaded,r=t.uid;e!=null&&e[r]&&delete e[r]}},x5=class{constructor(t,e,r,i=v5){this.actor=t,this.layerIndex=e,this.availableImages=r,this.tileState=new f1,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:e,x:r,y:i}=t.tileID.canonical,n=this._geoJSONIndex.getTile(e,r,i);if(!n)return null;let a=new Iy(n.features,{version:2,extent:gt});return{vectorTile:a,rawData:fu(a,Sp).buffer}}loadTile(t){return et(this,null,function*(){let{uid:e}=t,r=new p1(t);r.abort=new AbortController;try{let i=this.loadVectorTile(t);if(!i)return null;let{vectorTile:n,rawData:a}=i;r.vectorTile=n,this.tileState.markLoaded(e,r);let s={rawData:a};return this.tileState.setParsing(e,s),yield this._parseWorkerTile(r,t)}catch(i){throw this.tileState.markLoaded(e,r),i}})}_parseWorkerTile(t,e){return et(this,null,function*(){let r=this.tileState.getParsing(t.uid),i=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);if(r){let{rawData:n}=r;i=Xt({rawTileData:n.slice(0),encoding:"mvt"},i),this.tileState.removeParsing(t.uid)}return i})}abortTile(t){return et(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return et(this,null,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return et(this,null,function*(){var r;(r=this._pendingRequest)==null||r.abort();let e=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let i={};return t.request&&(i.data=t.data),this._finishRequestTiming(e,t,i),i}catch(i){if(delete this._pendingRequest,!xl(i))throw i;return{abandoned:!0}}})}_startRequestTiming(t){var e;if((e=t.request)!=null&&e.collectResourceTiming)return new d1(t.request.url)}_finishRequestTiming(t,e,r){let i=t==null?void 0:t.finish();i&&(r.resourceTiming={[e.source]:JSON.parse(JSON.stringify(i))})}reloadTile(t){return et(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)return yield this.loadTile(t);if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}loadAndProcessGeoJSON(t,e){return et(this,null,function*(){var r;if(t.request&&(t.data=(yield Ip(t.request,e)).data),t.data){t.data=this._filterGeoJSON(t.data,t.filter,t.source),this._geoJSONIndex=this._createGeoJSONIndex(t.data,t);return}if(t.dataDiff){(r=this._geoJSONIndex)!=null||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter,t.source));return}if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,y1(t)),this._geoJSONIndex==null)throw Error(`Input data given to \'${t.source}\' is not a valid GeoJSON object.`)})}_filterGeoJSON(t,e,r){if(t.type!=="FeatureCollection")return t;let i=this._getFilterPredicate(e,r);return i?{type:"FeatureCollection",features:t.features.filter(n=>i(n))}:t}_getFilterPredicate(t,e){if(typeof t!="boolean"&&!(t!=null&&t.length))return;let r=ar(t,`sources.${e}.filter`,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(r.result==="error")throw Error(r.value.map(i=>`${i.key}: ${i.message}`).join(", "));return i=>r.value.evaluate({zoom:0},i)}removeSource(t){return et(this,null,function*(){var e;(e=this._pendingRequest)==null||e.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 v5(t,e){let r=Xt(e.geojsonVtOptions||{},{updateable:!0,clusterOptions:y1(e)});return new Kd(t,r)}function y1({geojsonVtOptions:t,clusterProperties:e,source:r}){if(!e||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},s={properties:null},o=Object.keys(e);for(let l of o){let[u,h]=e[l],c=ar(h,`sources.${r}.clusterProperties.${l}[1]`),p=ar(typeof u=="string"?[u,["accumulated"],["get",l]]:u,`sources.${r}.clusterProperties.${l}[0]`);i[l]=c.value,n[l]=p.value}return t.clusterOptions.map=l=>{s.properties=l;let u={};for(let h of o)u[h]=i[h].evaluate(a,s);return u},t.clusterOptions.reduce=(l,u)=>{s.properties=u;for(let h of o)a.accumulated=l[h],l[h]=n[h].evaluate(a,s)},t.clusterOptions}function h1(t){return et(this,null,function*(){if(t.endsWith(".mjs")){yield import(t);return}let e=yield fetch(t,{credentials:"same-origin"});if(!e.ok)throw Error(`Failed to load ${t}: ${e.status}`);let r=yield e.text();if(/^[ \\t]*(import|export)\\s/m.test(r)){let i=URL.createObjectURL(new Blob([r],{type:"text/javascript"}));try{yield import(i)}finally{URL.revokeObjectURL(i)}return}globalThis.eval(r)})}var b5=class{constructor(t){this.self=t,this.actor=new Ty(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,r)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=r},this.self.addProtocol=Fp,this.self.removeProtocol=Tp,this.self.registerRTLTextPlugin=e=>{Ar.setMethods(e)},this.self.makeRequest=Pa,this.actor.registerMessageHandler("LDT",(e,r)=>this._getDEMWorkerSource(e,r.source).loadTile(r)),this.actor.registerMessageHandler("RDT",(e,r)=>et(this,null,function*(){this._getDEMWorkerSource(e,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(e,r)=>et(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(e,r)=>et(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(e,r)=>et(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadData(r)),this.actor.registerMessageHandler("LT",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadTile(r)),this.actor.registerMessageHandler("RT",(e,r)=>this._getWorkerSource(e,r.type,r.source).reloadTile(r)),this.actor.registerMessageHandler("AT",(e,r)=>this._getWorkerSource(e,r.type,r.source).abortTile(r)),this.actor.registerMessageHandler("RMT",(e,r)=>this._getWorkerSource(e,r.type,r.source).removeTile(r)),this.actor.registerMessageHandler("RS",(e,r)=>et(this,null,function*(){var n,a;if(!((a=(n=this.workerSources[e])==null?void 0:n[r.type])!=null&&a[r.source]))return;let i=this.workerSources[e][r.type][r.source];delete this.workerSources[e][r.type][r.source],i.removeSource!==void 0&&i.removeSource(r)})),this.actor.registerMessageHandler("RM",e=>et(this,null,function*(){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)})),this.actor.registerMessageHandler("SR",(e,r)=>et(this,null,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,r)=>this._syncRTLPluginState(e,r)),this.actor.registerMessageHandler("IS",(e,r)=>et(this,null,function*(){yield h1(r)})),this.actor.registerMessageHandler("SI",(e,r)=>this._setImages(e,r)),this.actor.registerMessageHandler("UL",(e,r)=>et(this,null,function*(){this._getLayerIndex(e).update(r.layers,r.removedIds,this._getGlobalState(e))})),this.actor.registerMessageHandler("UGS",(e,r)=>et(this,null,function*(){let i=this._getGlobalState(e);for(let n in r)i[n]=r[n]})),this.actor.registerMessageHandler("SL",(e,r)=>et(this,null,function*(){this._getLayerIndex(e).replace(r,this._getGlobalState(e))}))}_getGlobalState(t){let e=this.globalStates.get(t);return e||(e={},this.globalStates.set(t,e)),e}_setImages(t,e){return et(this,null,function*(){this.availableImages[t]=e;for(let r in this.workerSources[t]){let i=this.workerSources[t][r];for(let n in i)i[n].availableImages=e}})}_syncRTLPluginState(t,e){return et(this,null,function*(){return yield Ar.syncState(e,h1)})}_getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}_getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new c5),e}_getWorkerSource(t,e,r){var i,n;if((i=this.workerSources)[t]||(i[t]={}),(n=this.workerSources[t])[e]||(n[e]={}),!this.workerSources[t][e][r]){let a={sendAsync:(s,o)=>(s.targetMapId=t,this.actor.sendAsync(s,o))};switch(e){case"vector":this.workerSources[t][e][r]=new m5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;case"geojson":this.workerSources[t][e][r]=new x5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;default:this.workerSources[t][e][r]=new this.externalWorkerSourceTypes[e](a,this._getLayerIndex(t),this._getAvailableImages(t))}}return this.workerSources[t][e][r]}_getDEMWorkerSource(t,e){var r,i;return(r=this.demWorkerSources)[t]||(r[t]={}),(i=this.demWorkerSources[t])[e]||(i[e]=new g5),this.demWorkerSources[t][e]}};vr(self)&&(self.worker=new b5(self));export{b5 as default};\n/*! Bundled license information:\n\nmaplibre-gl/dist/maplibre-gl-shared.mjs:\nmaplibre-gl/dist/maplibre-gl-worker.mjs:\n (**\n * MapLibre GL JS\n * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.11.2/LICENSE.txt\n *)\n*/\n'});var Ylt=W((Yli,Wlt)=>{"use strict";var E3=tt(),TCr=ao().sanitizeHTML,ACr=Cre(),Hlt=Q2();function jlt(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=Hlt.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var pp=jlt.prototype;pp.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=pO(t)};pp.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};pp.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};pp.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};pp.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};pp.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};pp.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!pO(e)){var r=MCr(e);t.addSource(this.idSource,r)}};pp.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function $lt(e){var t={},r={};switch(e.type){case"circle":E3.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":E3.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":E3.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,n=ACr(i.textposition,i.iconsize);E3.extendFlat(t,{"icon-image":i.icon,"icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":n.anchor,"text-offset":n.offset,"symbol-placement":i.placement}),E3.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":E3.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function MCr(e){var t=e.sourcetype,r=e.source,i={type:t},n;return t==="geojson"?n="data":t==="vector"?n=typeof r=="string"?"url":"tiles":t==="raster"?(n="tiles",i.tileSize=256):t==="image"&&(n="url",i.coordinates=e.coordinates),i[n]=r,e.sourceattribution&&(i.attribution=TCr(e.sourceattribution)),i}Wlt.exports=function(t,r,i){var n=new jlt(t,r);return n.update(i),n}});var aut=W((Xli,nut)=>{"use strict";var gO=(Ult(),Pt(Olt)),SCr=Glt(),Xlt=!1,ECr=()=>{Xlt||(Xlt=!0,gO.setWorkerUrl(URL.createObjectURL(new Blob([SCr],{type:"text/javascript"}))))},mO=tt(),Jlt=Am(),Zlt=xi(),kCr=Yi(),CCr=Ef(),vO=Is(),Qlt=_1(),DCr=Qlt.drawMode,FCr=Qlt.selectMode,LCr=xu().prepSelect,PCr=xu().clearOutline,ICr=xu().clearSelectionsCache,RCr=xu().selectOnClick,xx=Q2(),zCr=Ylt();function eut(e,t){this.id=t,this.gd=e;var r=e._fullLayout,i=e._context;this.container=r._glcontainer.node(),this.isStatic=i.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var fu=eut.prototype;fu.plot=function(e,t,r){var i=this,n;i.map?n=new Promise(function(a,o){i.updateMap(e,t,a,o)}):n=new Promise(function(a,o){i.createMap(e,t,a,o)}),r.push(n)};fu.createMap=function(e,t,r,i){var n=this,a=t[n.id],o=n.styleObj=iut(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:n.div,style:o.style,center:Voe(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!n.isStatic,canvasContextAttributes:{preserveDrawingBuffer:n.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=a._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:xx.fitBoundsPadding}),ECr();let f=n.map=new gO.Map(u).addControl(new gO.AttributionControl({compact:!0})),h={};f.setMissingStyleImageResolver(d=>(!h[d]&&/^[a-zA-Z0-9-]+$/.test(d)&&(h[d]=new Promise(v=>{let m=new Image(15,15);m.onload=()=>{f.addImage(d,m,{sdf:!0}),v()},m.onerror=()=>v(),m.crossOrigin="Anonymous",m.src=`https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/${d}.svg`})),h[d])),f.setTransformRequest(function(d){return d=d.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),d=d.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),d=d.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:d}}),f._canvas.style.left="0px",f._canvas.style.top="0px",n.rejectOnError(i),n.isStatic||n.initFx(e,t);var p=[];p.push(new Promise(function(d){f.once("load",d)})),p=p.concat(Jlt.fetchTraceGeoData(e)),Promise.all(p).then(function(){c&&tut(n,a),rut(n,a),n.fillBelowLookup(e,t),n.updateData(e),n.updateLayout(t),n.resolveOnRender(r)}).catch(i)};fu.updateMap=function(e,t,r,i){var n=this,a=n.map,o=t[this.id];n.rejectOnError(i);var s=[],l=iut(o.style);JSON.stringify(n.styleObj)!==JSON.stringify(l)&&(n.styleObj=l,a.setStyle(l.style),n.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(Jlt.fetchTraceGeoData(e)),Promise.all(s).then(function(){n.fillBelowLookup(e,t),n.updateData(e);let u=o._fitBounds;u&&(a.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:xx.fitBoundsPadding,animate:!1}),tut(n,o),rut(n,o)),n.updateLayout(t),n.resolveOnRender(r)}).catch(i)};function tut(e,t){let{center:r,zoom:i}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=i,t._input._fitView={center:fn({},r),zoom:i}}function rut(e,t){let r=e.getView();e.viewInitial={center:mO.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}fu.fillBelowLookup=function(e,t){var r=t[this.id],i=r.layers,n,a,o=this.belowLookup={},s=!1;for(n=0;n1)for(n=0;nt.project(i).x,_subplot:t},t.yaxis={_id:"y",c2p:i=>t.project(i).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},kCr.setConvert(t.mockAxis,e)};fu.initFx=function(e,t){var r=this,i=r.gd,n=r.map;n.on("moveend",function(s){if(r.map){var l=i._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];Zlt.call("_storeDirectGUIEdit",i.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,i.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),n.on("wheel",function(){r.wheeling=!0}),n.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return n.unproject(u).lng},r.yaxis.p2c=function(){return n.unproject(u).lat},i._fullLayout._rehover=function(){i._fullLayout._hoversubplot===r.id&&i._fullLayout[r.id]&&vO.hover(i,s,r.id)},vO.hover(i,s,r.id),i._fullLayout._hoversubplot=r.id});function a(){vO.loneUnhover(t._hoverlayer)}n.on("dragstart",function(){r.dragging=!0,a()}),n.on("zoomstart",a),n.on("mouseout",function(){i._fullLayout._hoversubplot=null});function o(){var s=r.getView();i.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}n.on("drag",o),n.on("zoom",o),n.on("dblclick",function(){var s=i._fullLayout[r.id];Zlt.call("_storeDirectGUIEdit",i.layout,i._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;n.setCenter(Voe(l.center)),n.setZoom(l.zoom),n.setBearing(l.bearing),n.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,i.emit("plotly_doubleclick",null),i.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){ICr(r.dragOptions),PCr(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=i._fullLayout.clickmode;u.indexOf("select")>-1&&RCr(l.originalEvent,i,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&vO.click(i,l.originalEvent)}}};fu.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(t.isStatic)return;function n(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[n([u.xmin,u.ymin]),n([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(n)}};var s=t.dragOptions;t.dragOptions=mO.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),FCr(a)||DCr(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){LCr(l,u,c,t.dragOptions,a)},CCr.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};fu.updateFramework=function(e){var t=e[this.id].domain,r=e._size,i=this.div.style;i.width=r.w*(t.x[1]-t.x[0])+"px",i.height=r.h*(t.y[1]-t.y[0])+"px",i.left=r.l+t.x[0]*r.w+"px",i.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};fu.updateLayers=function(e){var t=e[this.id],r=t.layers,i=this.layerList,n;if(r.length!==i.length){for(n=0;nBCr});function BCr(e,t){let r=[];for(let l of e){if(l.subplot!==t||l.visible!==!0)continue;if(l.type==="choroplethmap")return null;let{lat:u,lon:c}=l;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let h=0;h{"use strict";out=l1(Am())});var fut=W((Kli,cut)=>{"use strict";var Goe=tt(),qCr=Kb(),OCr=tf(),uut=bk(),{getMapFitBounds:NCr}=(lut(),Pt(sut));cut.exports=function(t,r,i){qCr(t,r,i,{type:"map",attributes:uut,handleDefaults:UCr,partition:"y",fullData:i})};function UCr(e,t,r,i){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let n=r("fitbounds");var a=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(a===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,OCr(e,t,{name:"layers",handleItemDefaults:VCr}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:h}=e,p=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&h===c;if(n&&p){let d=NCr(i.fullData,i.id);d&&(t._fitBounds=d)}t._input=e}function VCr(e,t){function r(l,u){return Goe.coerce(e,t,uut.layers,l,u)}var i=r("visible");if(i){var n=r("sourcetype"),a=n==="raster"||n==="image";r("source"),r("sourceattribution"),n==="vector"&&r("sourcelayer"),n==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",Goe.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),Goe.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var yO=W(Z0=>{"use strict";var Hoe=tt(),hut=Hoe.strTranslate,GCr=Hoe.strScale,HCr=Mc().getSubplotCalcData,jCr=(md(),Pt(gd)),$Cr=gi(),dut=Qi(),WCr=ao(),YCr=aut(),bx="map";Z0.name=bx;Z0.attr="subplot";Z0.idRoot=bx;Z0.idRegex=Z0.attrRegex=Hoe.counterRegex(bx);Z0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};Z0.layoutAttributes=bk();Z0.supplyLayoutDefaults=fut();Z0.plot=function(t){for(var r=t._fullLayout,i=t.calcdata,n=r._subplots[bx],a=0;av/2){var m=f.split("|").join("
");p.text(m).attr("data-unformatted",m).call(WCr.convertToTspans,e),d=dut.bBox(p.node())}p.attr("transform",hut(-3,-d.height+8)),h.insert("rect",".static-attribution").attr({x:-d.width-6,y:-d.height-3,width:d.width+6,height:d.height+3,fill:"rgba(255, 255, 255, 0.75)"});var g=1;d.width+6>v&&(g=v/(d.width+6));var w=[i.l+i.w*o.x[1],i.t+i.h*(1-o.y[0])];h.attr("transform",hut(w[0],w[1])+GCr(g))}};Z0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[bx],i=0;i{"use strict";put.exports={attributes:Wz(),supplyDefaults:pQe(),colorbar:Cc(),formatLabels:kre(),calc:OQ(),plot:kQe(),hoverPoints:Jz().hoverPoints,eventData:LQe(),selectPoints:IQe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:yO(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var mut=W((eui,gut)=>{"use strict";gut.exports=vut()});var joe=W((tui,yut)=>{"use strict";var Zm=NE(),XCr=Fo(),{hovertemplateAttrs:ZCr,templatefallbackAttrs:KCr}=Wa(),JCr=Ja(),_x=an().extendFlat;yut.exports=_x({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:_x({},Zm.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Zm.text,hovertext:Zm.hovertext,marker:{line:{color:_x({},Zm.marker.line.color,{editType:"plot"}),width:_x({},Zm.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:_x({},Zm.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:_x({},Zm.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:_x({},Zm.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Zm.hoverinfo,hovertemplate:ZCr({},{keys:["properties"]}),hovertemplatefallback:KCr(),showlegend:_x({},JCr.showlegend,{dflt:!1})},XCr("",{cLetter:"z",editTypeOverride:"calc"}))});var but=W((rui,xut)=>{"use strict";var n8=tt(),QCr=Bu(),e8r=joe();xut.exports=function(t,r,i,n){function a(c,f){return n8.coerce(t,r,e8r,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!n8.isArrayOrTypedArray(o)||!o.length||!n8.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||n8.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),QCr(t,r,n,a,{prefix:"",cLetter:"z"}),n8.coerceSelectionMarkerOpacity(r,a)}});var $oe=W((iui,Tut)=>{"use strict";var t8r=hn(),Km=tt(),r8r=es(),i8r=Qi(),n8r=IE().makeBlank,_ut=Am();function a8r(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,i={layout:{visibility:"none"},paint:{}},n={layout:{visibility:"none"},paint:{}},a=t._opts={fill:i,line:n,geojson:n8r()};if(!r)return a;var o=_ut.extractTraceFeature(e);if(!o)return a;var s=r8r.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;Km.isArrayOrTypedArray(l.opacity)&&(c=function(w){var _=w.mo;return t8r(_)?+Km.constrain(_,0,1):0});var f;Km.isArrayOrTypedArray(u.color)&&(f=function(w){return w.mlc});var h;Km.isArrayOrTypedArray(u.width)&&(h=function(w){return w.mlw});for(var p=0;p{"use strict";var Mut=$oe().convert,o8r=$oe().convertOnSelect,Aut=Q2().traceLayerPrefix;function Sut(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",Aut+t+"-fill"],["line",Aut+t+"-line"]],this.below=null}var c6=Sut.prototype;c6.update=function(e){this._update(Mut(e)),e[0].trace._glTrace=this};c6.updateOnSelect=function(e){this._update(o8r(e))};c6._update=function(e){var t=this.subplot,r=this.layerList,i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(e,i),this.below=i);for(var n=0;n=0;r--)e.removeLayer(t[r][1])};c6.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Eut.exports=function(t,r){var i=r[0].trace,n=new Sut(t,i.uid),a=n.sourceId,o=Mut(r),s=n.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),n._addLayers(o,s),r[0].trace._glTrace=n,n}});var Dut=W((aui,Cut)=>{"use strict";Cut.exports={attributes:joe(),supplyDefaults:but(),colorbar:F5(),calc:yee(),plot:kut(),hoverPoints:bee(),eventData:_ee(),selectPoints:wee(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),i=r.length-2;i>=0;i--){var n=r[i].id;if(typeof n=="string"&&n.indexOf("water")===0){for(var a=i+1;a{"use strict";Fut.exports=Dut()});var Yoe=W((sui,Iut)=>{"use strict";var s8r=Fo(),{hovertemplateAttrs:l8r,templatefallbackAttrs:u8r}=Wa(),Put=Ja(),xO=Wz(),Woe=an().extendFlat;Iut.exports=Woe({lon:xO.lon,lat:xO.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:xO.text,hovertext:xO.hovertext,hoverinfo:Woe({},Put.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:l8r(),hovertemplatefallback:u8r(),showlegend:Woe({},Put.showlegend,{dflt:!1})},s8r("",{cLetter:"z",editTypeOverride:"calc"}))});var zut=W((lui,Rut)=>{"use strict";var c8r=tt(),f8r=Bu(),h8r=Yoe();Rut.exports=function(t,r,i,n){function a(u,c){return c8r.coerce(t,r,h8r,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f8r(t,r,n,a,{prefix:"",cLetter:"z"})}});var Out=W((uui,qut)=>{"use strict";var Xoe=hn(),d8r=tt().isArrayOrTypedArray,Zoe=(ra(),Pt(ia)).BADNUM,p8r=rf(),But=tt()._;qut.exports=function(t,r){for(var i=r._length,n=new Array(i),a=r.z,o=d8r(a)&&a.length,s=0;s{"use strict";var v8r=hn(),Koe=tt(),Nut=ti(),Uut=es(),Vut=(ra(),Pt(ia)).BADNUM,g8r=IE().makeBlank;Gut.exports=function(t){var r=t[0].trace,i=r.visible===!0&&r._length!==0,n={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:n,geojson:g8r()};if(!i)return a;var o=[],s,l=r.z,u=r.radius,c=Koe.isArrayOrTypedArray(l)&&l.length,f=Koe.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:p},properties:d})}}var m=Uut.extractOpts(r),g=m.reversescale?Uut.flipScale(m.colorscale):m.colorscale,w=g[0][1],_=Nut.opacity(w)<1?w:Nut.addOpacity(w,0),b=["interpolate",["linear"],["heatmap-density"],0,_];for(s=1;s{"use strict";var jut=Hut(),m8r=Q2().traceLayerPrefix;function $ut(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",m8r+t+"-heatmap"]],this.below=null}var bO=$ut.prototype;bO.update=function(e){var t=this.subplot,r=this.layerList,i=jut(e),n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(i,n),this.below=n);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};bO.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Wut.exports=function(t,r){var i=r[0].trace,n=new $ut(t,i.uid),a=n.sourceId,o=jut(r),s=n.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),n._addLayers(o,s),n}});var Zut=W((hui,Xut)=>{"use strict";var y8r=Yi(),x8r=Jz().hoverPoints,b8r=Jz().getExtraText;Xut.exports=function(t,r,i){var n=x8r(t,r,i);if(n){var a=n[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=y8r.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=b8r(s,l,o[0].t.labels),[a]}}});var Jut=W((dui,Kut)=>{"use strict";Kut.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var ect=W((pui,Qut)=>{"use strict";Qut.exports={attributes:Yoe(),supplyDefaults:zut(),colorbar:F5(),formatLabels:kre(),calc:Out(),plot:Yut(),hoverPoints:Zut(),eventData:Jut(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;i{"use strict";tct.exports=ect()});var Qoe=W((mui,sct)=>{"use strict";var _8r=jo(),w8r=Ja(),ict=Yl(),Joe=tw(),T8r=ds().attributes,{hovertemplateAttrs:nct,templatefallbackAttrs:act}=Wa(),A8r=Fo(),M8r=Ra().templatedArray,S8r=Ts().descriptionOnlyNumbers,oct=an().extendFlat,E8r=hs().overrideAll,gui=sct.exports=E8r({hoverinfo:oct({},w8r.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:Joe.hoverlabel,domain:T8r({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},direction:{valType:"enumerated",values:["forward","reversed"],dflt:"forward"},valueformat:{valType:"string",dflt:".3s",description:S8r("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:_8r({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:ict.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:Joe.hoverlabel,hovertemplate:nct({},{keys:["value","label"]}),hovertemplatefallback:act(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"},sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:ict.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:Joe.hoverlabel,hovertemplate:nct({},{keys:["value","label"]}),hovertemplatefallback:act(),colorscales:M8r("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:oct(A8r().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var fct=W((yui,cct)=>{"use strict";var f6=tt(),_O=Qoe(),k3=ti(),k8r=ds().defaults,lct=UA(),uct=Ra(),C8r=tf();cct.exports=function(t,r,i,n){function a(b,M){return f6.coerce(t,r,_O,b,M)}var o=f6.extendDeep(n.hoverlabel,t.hoverlabel),s=t.node,l=uct.newContainer(r,"node");function u(b,M){return f6.coerce(s,l,_O.node,b,M)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),lct(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=n.colorway;let f=b=>c[b%c.length];u("color",l.label.map((b,M)=>k3.addOpacity(f(M),.8))),u("customdata");var h=t.link||{},p=uct.newContainer(r,"link");function d(b,M){return f6.coerce(h,p,_O.link,b,M)}d("label"),d("arrowlen"),d("source"),d("target"),d("value"),d("line.color"),d("line.width"),d("hoverinfo",t.hoverinfo),lct(h,p,d,o),d("hovertemplate"),d("sort");var v=k3.luminosity(n.paper_bgcolor)<.333,m=v?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",g=d("color",m);function w(b){if(!k3.isValid(b))return b;let M=k3.opacity(b);return M<=.8?k3.addOpacity(b,M+.2):v?k3.brighten(b,10):k3.adjustLightness(b,-10)}d("hovercolor",Array.isArray(g)?g.map(w):w(g)),d("customdata"),C8r(h,p,{name:"colorscales",handleItemDefaults:D8r}),k8r(r,n,a),a("orientation"),a("direction"),a("valueformat"),a("valuesuffix");let _=l.x.length&&l.y.length?"freeform":void 0;a("arrangement",_),f6.coerceFont(a,"textfont",n.font,{autoShadowDflt:!0}),r._length=null};function D8r(e,t){function r(i,n){return f6.coerce(e,t,_O.link.colorscales,i,n)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var ese=W((xui,hct)=>{"use strict";hct.exports=F8r;function F8r(e){for(var t=e.length,r=new Array(t),i=new Array(t),n=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){m=w[w.length-1];var _=e[m];if(a[m]<_.length){for(var b=a[m];b<_.length;++b){var M=_[b];if(r[M]<0){r[M]=i[M]=u,n[M]=!0,u+=1,g.push(M),w.push(M);break}else n[M]&&(i[m]=Math.min(i[m],i[M])|0);o[M]>=0&&s[m].push(o[M])}a[m]=b}else{if(i[m]===r[m]){for(var x=[],A=[],T=0,b=g.length-1;b>=0;--b){var y=g[b];if(n[y]=!1,x.push(y),A.push(s[y]),T+=s[y].length,o[y]=c.length,y===m){g.length=b;break}}c.push(x);for(var E=new Array(T),b=0;b{"use strict";var L8r=ese(),h6=tt(),P8r=eg().wrap,a8=h6.isArrayOrTypedArray,dct=h6.isIndex,pct=es();function I8r(e){var t=e.node,r=e.link,i=[],n=a8(r.color),a=a8(r.hovercolor),o=a8(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cd&&(d=r.source[c]),r.target[c]>d&&(d=r.target[c]);var v=d+1;e.node._count=v;var m,g=e.node.groups,w={};for(c=0;c0&&dct(T,v)&&dct(y,v)&&!(w.hasOwnProperty(T)&&w.hasOwnProperty(y)&&w[T]===w[y])){w.hasOwnProperty(y)&&(y=w[y]),w.hasOwnProperty(T)&&(T=w[T]),T=+T,y=+y,s[T]=s[y]=!0;var E="";r.label&&r.label[c]&&(E=r.label[c]);var S=null;E&&l.hasOwnProperty(E)&&(S=l[E]),i.push({pointNumber:c,label:E,color:n?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:S,source:T,target:y,value:+A}),x.source.push(T),x.target.push(y)}}var C=v+g.length,k=a8(t.color),D=a8(t.customdata),F=[];for(c=0;cv-1,childrenNodes:[],pointNumber:c,label:P,color:k?t.color[c]:t.color,customdata:D?t.customdata[c]:t.customdata})}var R=!1;return R8r(C,x.source,x.target)&&(R=!0),{circular:R,links:i,nodes:F,groups:g,groupLookup:w}}function R8r(e,t,r){for(var i=h6.init2dArray(e,0),n=0;n1})}vct.exports=function(t,r){var i=I8r(r);return P8r({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}});var yct=W((wO,mct)=>{(function(e,t){typeof wO=="object"&&typeof mct!="undefined"?t(wO):(e=e||self,t(e.d3=e.d3||{}))})(wO,function(e){"use strict";function t(A){var T=+this._x.call(null,A),y=+this._y.call(null,A);return r(this.cover(T,y),T,y,A)}function r(A,T,y,E){if(isNaN(T)||isNaN(y))return A;var S,C=A._root,k={data:E},D=A._x0,F=A._y0,P=A._x1,R=A._y1,L,I,B,O,$,X,K,G;if(!C)return A._root=k,A;for(;C.length;)if(($=T>=(L=(D+P)/2))?D=L:P=L,(X=y>=(I=(F+R)/2))?F=I:R=I,S=C,!(C=C[K=X<<1|$]))return S[K]=k,A;if(B=+A._x.call(null,C.data),O=+A._y.call(null,C.data),T===B&&y===O)return k.next=C,S?S[K]=k:A._root=k,A;do S=S?S[K]=new Array(4):A._root=new Array(4),($=T>=(L=(D+P)/2))?D=L:P=L,(X=y>=(I=(F+R)/2))?F=I:R=I;while((K=X<<1|$)===(G=(O>=I)<<1|B>=L));return S[G]=C,S[K]=k,A}function i(A){var T,y,E=A.length,S,C,k=new Array(E),D=new Array(E),F=1/0,P=1/0,R=-1/0,L=-1/0;for(y=0;yR&&(R=S),CL&&(L=C));if(F>R||P>L)return this;for(this.cover(F,P).cover(R,L),y=0;yA||A>=S||E>T||T>=C;)switch(P=(TR||(D=O.y0)>L||(F=O.x1)=K)<<1|A>=X)&&(O=I[I.length-1],I[I.length-1]=I[I.length-1-$],I[I.length-1-$]=O)}else{var G=A-+this._x.call(null,B.data),q=T-+this._y.call(null,B.data),J=G*G+q*q;if(J=(I=(k+F)/2))?k=I:F=I,($=L>=(B=(D+P)/2))?D=B:P=B,T=y,!(y=y[X=$<<1|O]))return this;if(!y.length)break;(T[X+1&3]||T[X+2&3]||T[X+3&3])&&(E=T,K=X)}for(;y.data!==A;)if(S=y,!(y=y.next))return this;return(C=y.next)&&delete y.next,S?(C?S.next=C:delete S.next,this):T?(C?T[X]=C:delete T[X],(y=T[0]||T[1]||T[2]||T[3])&&y===(T[3]||T[2]||T[1]||T[0])&&!y.length&&(E?E[K]=y:this._root=y),this):(this._root=C,this)}function c(A){for(var T=0,y=A.length;T{(function(e,t){t(typeof TO=="object"&&typeof xct!="undefined"?TO:e.d3=e.d3||{})})(TO,(function(e){"use strict";var t="$";function r(){}r.prototype=i.prototype={constructor:r,has:function(v){return t+v in this},get:function(v){return this[t+v]},set:function(v,m){return this[t+v]=m,this},remove:function(v){var m=t+v;return m in this&&delete this[m]},clear:function(){for(var v in this)v[0]===t&&delete this[v]},keys:function(){var v=[];for(var m in this)m[0]===t&&v.push(m.slice(1));return v},values:function(){var v=[];for(var m in this)m[0]===t&&v.push(this[m]);return v},entries:function(){var v=[];for(var m in this)m[0]===t&&v.push({key:m.slice(1),value:this[m]});return v},size:function(){var v=0;for(var m in this)m[0]===t&&++v;return v},empty:function(){for(var v in this)if(v[0]===t)return!1;return!0},each:function(v){for(var m in this)m[0]===t&&v(this[m],m.slice(1),this)}};function i(v,m){var g=new r;if(v instanceof r)v.each(function(x,A){g.set(A,x)});else if(Array.isArray(v)){var w=-1,_=v.length,b;if(m==null)for(;++w<_;)g.set(w,v[w]);else for(;++w<_;)g.set(m(b=v[w],w,v),b)}else if(v)for(var M in v)g.set(M,v[M]);return g}function n(){var v=[],m=[],g,w,_;function b(x,A,T,y){if(A>=v.length)return g!=null&&x.sort(g),w!=null?w(x):x;for(var E=-1,S=x.length,C=v[A++],k,D,F=i(),P,R=T();++Ev.length)return x;var T,y=m[A-1];return w!=null&&A>=v.length?T=x.entries():(T=[],x.each(function(E,S){T.push({key:S,values:M(E,A)})})),y!=null?T.sort(function(E,S){return y(E.key,S.key)}):T}return _={object:function(x){return b(x,0,a,o)},map:function(x){return b(x,0,s,l)},entries:function(x){return M(b(x,0,s,l),0)},key:function(x){return v.push(x),_},sortKeys:function(x){return m[v.length-1]=x,_},sortValues:function(x){return g=x,_},rollup:function(x){return w=x,_}}}function a(){return{}}function o(v,m,g){v[m]=g}function s(){return i()}function l(v,m,g){v.set(m,g)}function u(){}var c=i.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(v){return v+="",this[t+v]=v,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(v,m){var g=new u;if(v instanceof u)v.each(function(b){g.add(b)});else if(v){var w=-1,_=v.length;if(m==null)for(;++w<_;)g.add(v[w]);else for(;++w<_;)g.add(m(v[w],w,v))}return g}function h(v){var m=[];for(var g in v)m.push(g);return m}function p(v){var m=[];for(var g in v)m.push(v[g]);return m}function d(v){var m=[];for(var g in v)m.push({key:g,value:v[g]});return m}e.nest=n,e.set=f,e.map=i,e.keys=h,e.values=p,e.entries=d,Object.defineProperty(e,"__esModule",{value:!0})}))});var _ct=W((AO,bct)=>{(function(e,t){typeof AO=="object"&&typeof bct!="undefined"?t(AO):(e=e||self,t(e.d3=e.d3||{}))})(AO,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}i.prototype=r.prototype={constructor:i,on:function(s,l){var u=this._,c=n(s+"",u),f,h=-1,p=c.length;if(arguments.length<2){for(;++h0)for(var u=new Array(f),c=0,f,h;c{(function(e,t){typeof MO=="object"&&typeof wct!="undefined"?t(MO):(e=e||self,t(e.d3=e.d3||{}))})(MO,function(e){"use strict";var t=0,r=0,i=0,n=1e3,a,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function h(){return l||(f(p),l=c.now()+u)}function p(){l=0}function d(){this._call=this._time=this._next=null}d.prototype=v.prototype={constructor:d,restart:function(A,T,y){if(typeof A!="function")throw new TypeError("callback is not a function");y=(y==null?h():+y)+(T==null?0:+T),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=A,this._time=y,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}};function v(A,T,y){var E=new d;return E.restart(A,T,y),E}function m(){h(),++t;for(var A=a,T;A;)(T=l-A._time)>=0&&A._call.call(null,T),A=A._next;--t}function g(){l=(s=c.now())+u,t=r=0;try{m()}finally{t=0,_(),l=0}}function w(){var A=c.now(),T=A-s;T>n&&(u-=T,s=A)}function _(){for(var A,T=a,y,E=1/0;T;)T._call?(E>T._time&&(E=T._time),A=T,T=T._next):(y=T._next,T._next=null,T=A?A._next=y:a=y);o=A,b(E)}function b(A){if(!t){r&&(r=clearTimeout(r));var T=A-l;T>24?(A<1/0&&(r=setTimeout(g,A-c.now()-u)),i&&(i=clearInterval(i))):(i||(s=c.now(),i=setInterval(w,n)),t=1,f(g))}}function M(A,T,y){var E=new d;return T=T==null?0:+T,E.restart(function(S){E.stop(),A(S+T)},T,y),E}function x(A,T,y){var E=new d,S=T;return T==null?(E.restart(A,T,y),E):(T=+T,y=y==null?h():+y,E.restart(function C(k){k+=S,E.restart(C,S+=T,y),A(k)},T,y),E)}e.interval=x,e.now=h,e.timeout=M,e.timer=v,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})})});var Mct=W((SO,Act)=>{(function(e,t){typeof SO=="object"&&typeof Act!="undefined"?t(SO,yct(),tse(),_ct(),Tct()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(SO,(function(e,t,r,i,n){"use strict";function a(A,T){var y;A==null&&(A=0),T==null&&(T=0);function E(){var S,C=y.length,k,D=0,F=0;for(S=0;SL.index){var Q=I-Y.x-Y.vx,te=B-Y.y-Y.vy,ue=Q*Q+te*te;ueI+j||NB+j||VF.r&&(F.r=F[P].r)}function D(){if(T){var F,P=T.length,R;for(y=new Array(P),F=0;F1?($==null?D.remove(O):D.set(O,B($)),T):D.get(O)},find:function(O,$,X){var K=0,G=A.length,q,J,N,V,Y;for(X==null?X=1/0:X*=X,K=0;K1?(P.on(O,$),T):P.on(O)}}}function _(){var A,T,y,E=o(-30),S,C=1,k=1/0,D=.81;function F(I){var B,O=A.length,$=t.quadtree(A,d,v).visitAfter(R);for(y=I,B=0;B=k)return;(I.data!==T||I.next)&&(X===0&&(X=s(),q+=X*X),K===0&&(K=s(),q+=K*K),q{(function(e,t){typeof EO=="object"&&typeof Sct!="undefined"?t(EO):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(EO,(function(e){"use strict";function t(Ge,Qe){return GeQe?1:Ge>=Qe?0:NaN}function r(Ge){let Qe=Ge,nt=Ge;Ge.length===1&&(Qe=(hr,Ut)=>Ge(hr)-Ut,nt=i(Ge));function gt(hr,Ut,Lr,jr){for(Lr==null&&(Lr=0),jr==null&&(jr=hr.length);Lr>>1;nt(hr[ii],Ut)<0?Lr=ii+1:jr=ii}return Lr}function ht(hr,Ut,Lr,jr){for(Lr==null&&(Lr=0),jr==null&&(jr=hr.length);Lr>>1;nt(hr[ii],Ut)>0?jr=ii:Lr=ii+1}return Lr}function Ft(hr,Ut,Lr,jr){Lr==null&&(Lr=0),jr==null&&(jr=hr.length);let ii=gt(hr,Ut,Lr,jr-1);return ii>Lr&&Qe(hr[ii-1],Ut)>-Qe(hr[ii],Ut)?ii-1:ii}return{left:gt,center:Ft,right:ht}}function i(Ge){return(Qe,nt)=>t(Ge(Qe),nt)}function n(Ge){return Ge===null?NaN:+Ge}function*a(Ge,Qe){if(Qe===void 0)for(let nt of Ge)nt!=null&&(nt=+nt)>=nt&&(yield nt);else{let nt=-1;for(let gt of Ge)(gt=Qe(gt,++nt,Ge))!=null&&(gt=+gt)>=gt&&(yield gt)}}let o=r(t),s=o.right,l=o.left,u=r(n).center;function c(Ge,Qe){let nt=0;if(Qe===void 0)for(let gt of Ge)gt!=null&&(gt=+gt)>=gt&&++nt;else{let gt=-1;for(let ht of Ge)(ht=Qe(ht,++gt,Ge))!=null&&(ht=+ht)>=ht&&++nt}return nt}function f(Ge){return Ge.length|0}function h(Ge){return!(Ge>0)}function p(Ge){return typeof Ge!="object"||"length"in Ge?Ge:Array.from(Ge)}function d(Ge){return Qe=>Ge(...Qe)}function v(...Ge){let Qe=typeof Ge[Ge.length-1]=="function"&&d(Ge.pop());Ge=Ge.map(p);let nt=Ge.map(f),gt=Ge.length-1,ht=new Array(gt+1).fill(0),Ft=[];if(gt<0||nt.some(h))return Ft;for(;;){Ft.push(ht.map((Ut,Lr)=>Ge[Lr][Ut]));let hr=gt;for(;++ht[hr]===nt[hr];){if(hr===0)return Qe?Ft.map(Qe):Ft;ht[hr--]=0}}}function m(Ge,Qe){var nt=0,gt=0;return Float64Array.from(Ge,Qe===void 0?ht=>nt+=+ht||0:ht=>nt+=+Qe(ht,gt++,Ge)||0)}function g(Ge,Qe){return QeGe?1:Qe>=Ge?0:NaN}function w(Ge,Qe){let nt=0,gt,ht=0,Ft=0;if(Qe===void 0)for(let hr of Ge)hr!=null&&(hr=+hr)>=hr&&(gt=hr-ht,ht+=gt/++nt,Ft+=gt*(hr-ht));else{let hr=-1;for(let Ut of Ge)(Ut=Qe(Ut,++hr,Ge))!=null&&(Ut=+Ut)>=Ut&&(gt=Ut-ht,ht+=gt/++nt,Ft+=gt*(Ut-ht))}if(nt>1)return Ft/(nt-1)}function _(Ge,Qe){let nt=w(Ge,Qe);return nt&&Math.sqrt(nt)}function b(Ge,Qe){let nt,gt;if(Qe===void 0)for(let ht of Ge)ht!=null&&(nt===void 0?ht>=ht&&(nt=gt=ht):(nt>ht&&(nt=ht),gt=Ft&&(nt=gt=Ft):(nt>Ft&&(nt=Ft),gt0){for(hr=Qe[--nt];nt>0&&(gt=hr,ht=Qe[--nt],hr=gt+ht,Ft=ht-(hr-gt),!Ft););nt>0&&(Ft<0&&Qe[nt-1]<0||Ft>0&&Qe[nt-1]>0)&&(ht=Ft*2,gt=hr+ht,ht==gt-hr&&(hr=gt))}return hr}}function x(Ge,Qe){let nt=new M;if(Qe===void 0)for(let gt of Ge)(gt=+gt)&&nt.add(gt);else{let gt=-1;for(let ht of Ge)(ht=+Qe(ht,++gt,Ge))&&nt.add(ht)}return+nt}function A(Ge,Qe){let nt=new M,gt=-1;return Float64Array.from(Ge,Qe===void 0?ht=>nt.add(+ht||0):ht=>nt.add(+Qe(ht,++gt,Ge)||0))}class T extends Map{constructor(Qe,nt=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nt}}),Qe!=null)for(let[gt,ht]of Qe)this.set(gt,ht)}get(Qe){return super.get(E(this,Qe))}has(Qe){return super.has(E(this,Qe))}set(Qe,nt){return super.set(S(this,Qe),nt)}delete(Qe){return super.delete(C(this,Qe))}}class y extends Set{constructor(Qe,nt=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nt}}),Qe!=null)for(let gt of Qe)this.add(gt)}has(Qe){return super.has(E(this,Qe))}add(Qe){return super.add(S(this,Qe))}delete(Qe){return super.delete(C(this,Qe))}}function E({_intern:Ge,_key:Qe},nt){let gt=Qe(nt);return Ge.has(gt)?Ge.get(gt):nt}function S({_intern:Ge,_key:Qe},nt){let gt=Qe(nt);return Ge.has(gt)?Ge.get(gt):(Ge.set(gt,nt),nt)}function C({_intern:Ge,_key:Qe},nt){let gt=Qe(nt);return Ge.has(gt)&&(nt=Ge.get(nt),Ge.delete(gt)),nt}function k(Ge){return Ge!==null&&typeof Ge=="object"?Ge.valueOf():Ge}function D(Ge){return Ge}function F(Ge,...Qe){return $(Ge,D,D,Qe)}function P(Ge,...Qe){return $(Ge,Array.from,D,Qe)}function R(Ge,Qe,...nt){return $(Ge,D,Qe,nt)}function L(Ge,Qe,...nt){return $(Ge,Array.from,Qe,nt)}function I(Ge,...Qe){return $(Ge,D,O,Qe)}function B(Ge,...Qe){return $(Ge,Array.from,O,Qe)}function O(Ge){if(Ge.length!==1)throw new Error("duplicate key");return Ge[0]}function $(Ge,Qe,nt,gt){return(function ht(Ft,hr){if(hr>=gt.length)return nt(Ft);let Ut=new T,Lr=gt[hr++],jr=-1;for(let ii of Ft){let Fr=Lr(ii,++jr,Ft),Ii=Ut.get(Fr);Ii?Ii.push(ii):Ut.set(Fr,[ii])}for(let[ii,Fr]of Ut)Ut.set(ii,ht(Fr,hr));return Qe(Ut)})(Ge,0)}function X(Ge,Qe){return Array.from(Qe,nt=>Ge[nt])}function K(Ge,...Qe){if(typeof Ge[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Ge=Array.from(Ge);let[nt=t]=Qe;if(nt.length===1||Qe.length>1){let gt=Uint32Array.from(Ge,(ht,Ft)=>Ft);return Qe.length>1?(Qe=Qe.map(ht=>Ge.map(ht)),gt.sort((ht,Ft)=>{for(let hr of Qe){let Ut=t(hr[ht],hr[Ft]);if(Ut)return Ut}})):(nt=Ge.map(nt),gt.sort((ht,Ft)=>t(nt[ht],nt[Ft]))),X(Ge,gt)}return Ge.sort(nt)}function G(Ge,Qe,nt){return(Qe.length===1?K(R(Ge,Qe,nt),(([gt,ht],[Ft,hr])=>t(ht,hr)||t(gt,Ft))):K(F(Ge,nt),(([gt,ht],[Ft,hr])=>Qe(ht,hr)||t(gt,Ft)))).map(([gt])=>gt)}var q=Array.prototype,J=q.slice;function N(Ge){return function(){return Ge}}var V=Math.sqrt(50),Y=Math.sqrt(10),H=Math.sqrt(2);function j(Ge,Qe,nt){var gt,ht=-1,Ft,hr,Ut;if(Qe=+Qe,Ge=+Ge,nt=+nt,Ge===Qe&&nt>0)return[Ge];if((gt=Qe0){let Lr=Math.round(Ge/Ut),jr=Math.round(Qe/Ut);for(Lr*UtQe&&--jr,hr=new Array(Ft=jr-Lr+1);++htQe&&--jr,hr=new Array(Ft=jr-Lr+1);++ht=0?(Ft>=V?10:Ft>=Y?5:Ft>=H?2:1)*Math.pow(10,ht):-Math.pow(10,-ht)/(Ft>=V?10:Ft>=Y?5:Ft>=H?2:1)}function te(Ge,Qe,nt){var gt=Math.abs(Qe-Ge)/Math.max(0,nt),ht=Math.pow(10,Math.floor(Math.log(gt)/Math.LN10)),Ft=gt/ht;return Ft>=V?ht*=10:Ft>=Y?ht*=5:Ft>=H&&(ht*=2),Qe0?(Ge=Math.floor(Ge/ht)*ht,Qe=Math.ceil(Qe/ht)*ht):ht<0&&(Ge=Math.ceil(Ge*ht)/ht,Qe=Math.floor(Qe*ht)/ht),gt=ht}}function ge(Ge){return Math.ceil(Math.log(c(Ge))/Math.LN2)+1}function Ee(){var Ge=D,Qe=b,nt=ge;function gt(ht){Array.isArray(ht)||(ht=Array.from(ht));var Ft,hr=ht.length,Ut,Lr=new Array(hr);for(Ft=0;Ft=Fr)if(mo>=Fr&&Qe===b){let zn=Q(ii,Fr,pn);isFinite(zn)&&(zn>0?Fr=(Math.floor(Fr/zn)+1)*zn:zn<0&&(Fr=(Math.ceil(Fr*-zn)+1)/-zn))}else Ii.pop()}for(var Xi=Ii.length;Ii[0]<=ii;)Ii.shift(),--Xi;for(;Ii[Xi-1]>Fr;)Ii.pop(),--Xi;var ln=new Array(Xi+1),la;for(Ft=0;Ft<=Xi;++Ft)la=ln[Ft]=[],la.x0=Ft>0?Ii[Ft-1]:ii,la.x1=Ft=gt)&&(nt=gt);else{let gt=-1;for(let ht of Ge)(ht=Qe(ht,++gt,Ge))!=null&&(nt=ht)&&(nt=ht)}return nt}function ce(Ge,Qe){let nt;if(Qe===void 0)for(let gt of Ge)gt!=null&&(nt>gt||nt===void 0&>>=gt)&&(nt=gt);else{let gt=-1;for(let ht of Ge)(ht=Qe(ht,++gt,Ge))!=null&&(nt>ht||nt===void 0&&ht>=ht)&&(nt=ht)}return nt}function oe(Ge,Qe,nt=0,gt=Ge.length-1,ht=t){for(;gt>nt;){if(gt-nt>600){let Lr=gt-nt+1,jr=Qe-nt+1,ii=Math.log(Lr),Fr=.5*Math.exp(2*ii/3),Ii=.5*Math.sqrt(ii*Fr*(Lr-Fr)/Lr)*(jr-Lr/2<0?-1:1),Xi=Math.max(nt,Math.floor(Qe-jr*Fr/Lr+Ii)),ln=Math.min(gt,Math.floor(Qe+(Lr-jr)*Fr/Lr+Ii));oe(Ge,Qe,Xi,ln,ht)}let Ft=Ge[Qe],hr=nt,Ut=gt;for(Se(Ge,nt,Qe),ht(Ge[gt],Ft)>0&&Se(Ge,nt,gt);hr0;)--Ut}ht(Ge[nt],Ft)===0?Se(Ge,nt,Ut):(++Ut,Se(Ge,Ut,gt)),Ut<=Qe&&(nt=Ut+1),Qe<=Ut&&(gt=Ut-1)}return Ge}function Se(Ge,Qe,nt){let gt=Ge[Qe];Ge[Qe]=Ge[nt],Ge[nt]=gt}function be(Ge,Qe,nt){if(Ge=Float64Array.from(a(Ge,nt)),!!(gt=Ge.length)){if((Qe=+Qe)<=0||gt<2)return ce(Ge);if(Qe>=1)return xe(Ge);var gt,ht=(gt-1)*Qe,Ft=Math.floor(ht),hr=xe(oe(Ge,Ft).subarray(0,Ft+1)),Ut=ce(Ge.subarray(Ft+1));return hr+(Ut-hr)*(ht-Ft)}}function fe(Ge,Qe,nt=n){if(gt=Ge.length){if((Qe=+Qe)<=0||gt<2)return+nt(Ge[0],0,Ge);if(Qe>=1)return+nt(Ge[gt-1],gt-1,Ge);var gt,ht=(gt-1)*Qe,Ft=Math.floor(ht),hr=+nt(Ge[Ft],Ft,Ge),Ut=+nt(Ge[Ft+1],Ft+1,Ge);return hr+(Ut-hr)*(ht-Ft)}}function ee(Ge,Qe,nt){return Math.ceil((nt-Qe)/(2*(be(Ge,.75)-be(Ge,.25))*Math.pow(c(Ge),-1/3)))}function ae(Ge,Qe,nt){return Math.ceil((nt-Qe)/(3.5*_(Ge)*Math.pow(c(Ge),-1/3)))}function _e(Ge,Qe){let nt,gt=-1,ht=-1;if(Qe===void 0)for(let Ft of Ge)++ht,Ft!=null&&(nt=Ft)&&(nt=Ft,gt=ht);else for(let Ft of Ge)(Ft=Qe(Ft,++ht,Ge))!=null&&(nt=Ft)&&(nt=Ft,gt=ht);return gt}function re(Ge,Qe){let nt=0,gt=0;if(Qe===void 0)for(let ht of Ge)ht!=null&&(ht=+ht)>=ht&&(++nt,gt+=ht);else{let ht=-1;for(let Ft of Ge)(Ft=Qe(Ft,++ht,Ge))!=null&&(Ft=+Ft)>=Ft&&(++nt,gt+=Ft)}if(nt)return gt/nt}function pe(Ge,Qe){return be(Ge,.5,Qe)}function*Te(Ge){for(let Qe of Ge)yield*Kle(Qe)}function Ce(Ge){return Array.from(Te(Ge))}function ze(Ge,Qe){let nt,gt=-1,ht=-1;if(Qe===void 0)for(let Ft of Ge)++ht,Ft!=null&&(nt>Ft||nt===void 0&&Ft>=Ft)&&(nt=Ft,gt=ht);else for(let Ft of Ge)(Ft=Qe(Ft,++ht,Ge))!=null&&(nt>Ft||nt===void 0&&Ft>=Ft)&&(nt=Ft,gt=ht);return gt}function we(Ge,Qe=me){let nt=[],gt,ht=!1;for(let Ft of Ge)ht&&nt.push(Qe(gt,Ft)),gt=Ft,ht=!0;return nt}function me(Ge,Qe){return[Ge,Qe]}function Le(Ge,Qe,nt){Ge=+Ge,Qe=+Qe,nt=(ht=arguments.length)<2?(Qe=Ge,Ge=0,1):ht<3?1:+nt;for(var gt=-1,ht=Math.max(0,Math.ceil((Qe-Ge)/nt))|0,Ft=new Array(ht);++gt0:t(hr,hr)===0)&&(nt=Ft,ht=hr,gt=!0)}}else for(let ht of Ge)(gt?Qe(ht,nt)>0:Qe(ht,ht)===0)&&(nt=ht,gt=!0);return nt}function mt(Ge,Qe=t){if(Qe.length===1)return _e(Ge,Qe);let nt,gt=-1,ht=-1;for(let Ft of Ge)++ht,(gt<0?Qe(Ft,Ft)===0:Qe(Ft,nt)>0)&&(nt=Ft,gt=ht);return gt}function dt(Ge,Qe){let nt=Je(Ge,Qe);return nt<0?void 0:nt}var St=Ke(Math.random);function Ke(Ge){return function(nt,gt=0,ht=nt.length){let Ft=ht-(gt=+gt);for(;Ft;){let hr=Ge()*Ft--|0,Ut=nt[Ft+gt];nt[Ft+gt]=nt[hr+gt],nt[hr+gt]=Ut}return nt}}function bt(Ge,Qe){let nt=0;if(Qe===void 0)for(let gt of Ge)(gt=+gt)&&(nt+=gt);else{let gt=-1;for(let ht of Ge)(ht=+Qe(ht,++gt,Ge))&&(nt+=ht)}return nt}function pt(Ge){if(!(Ft=Ge.length))return[];for(var Qe=-1,nt=ce(Ge,Oe),gt=new Array(nt);++QeQe(nt,gt,Ge))}function st(Ge,Qe,nt){if(typeof Qe!="function")throw new TypeError("reducer is not a function");let gt=Ge[Symbol.iterator](),ht,Ft,hr=-1;if(arguments.length<3){if({done:ht,value:nt}=gt.next(),ht)return;++hr}for(;{done:ht,value:Ft}=gt.next(),!ht;)nt=Qe(nt,Ft,++hr,Ge);return nt}function _t(Ge){if(typeof Ge[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Ge).reverse()}function Wt(Ge,...Qe){Ge=new Set(Ge);for(let nt of Qe)for(let gt of nt)Ge.delete(gt);return Ge}function Ht(Ge,Qe){let nt=Qe[Symbol.iterator](),gt=new Set;for(let ht of Ge){if(gt.has(ht))return!1;let Ft,hr;for(;({value:Ft,done:hr}=nt.next())&&!hr;){if(Object.is(ht,Ft))return!1;gt.add(Ft)}}return!0}function fr(Ge){return Ge instanceof Set?Ge:new Set(Ge)}function lr(Ge,...Qe){Ge=new Set(Ge),Qe=Qe.map(fr);e:for(let nt of Ge)for(let gt of Qe)if(!gt.has(nt)){Ge.delete(nt);continue e}return Ge}function Ot(Ge,Qe){let nt=Ge[Symbol.iterator](),gt=new Set;for(let ht of Qe){if(gt.has(ht))continue;let Ft,hr;for(;{value:Ft,done:hr}=nt.next();){if(hr)return!1;if(gt.add(Ft),Object.is(ht,Ft))break}}return!0}function Jt(Ge,Qe){return Ot(Qe,Ge)}function Cr(...Ge){let Qe=new Set;for(let nt of Ge)for(let gt of nt)Qe.add(gt);return Qe}e.Adder=M,e.InternMap=T,e.InternSet=y,e.ascending=t,e.bin=Ee,e.bisect=s,e.bisectCenter=u,e.bisectLeft=l,e.bisectRight=s,e.bisector=r,e.count=c,e.cross=v,e.cumsum=m,e.descending=g,e.deviation=_,e.difference=Wt,e.disjoint=Ht,e.every=je,e.extent=b,e.fcumsum=A,e.filter=Ie,e.fsum=x,e.greatest=rt,e.greatestIndex=mt,e.group=F,e.groupSort=G,e.groups=P,e.histogram=Ee,e.index=I,e.indexes=B,e.intersection=lr,e.least=Ne,e.leastIndex=Je,e.map=Ve,e.max=xe,e.maxIndex=_e,e.mean=re,e.median=pe,e.merge=Ce,e.min=ce,e.minIndex=ze,e.nice=ue,e.pairs=we,e.permute=X,e.quantile=be,e.quantileSorted=fe,e.quickselect=oe,e.range=Le,e.reduce=st,e.reverse=_t,e.rollup=R,e.rollups=L,e.scan=dt,e.shuffle=St,e.shuffler=Ke,e.some=$e,e.sort=K,e.subset=Jt,e.sum=bt,e.superset=Ot,e.thresholdFreedmanDiaconis=ee,e.thresholdScott=ae,e.thresholdSturges=ge,e.tickIncrement=Q,e.tickStep=te,e.ticks=j,e.transpose=pt,e.union=Cr,e.variance=w,e.zip=Ue,Object.defineProperty(e,"__esModule",{value:!0})}))});var Cct=W((kO,kct)=>{(function(e,t){typeof kO=="object"&&typeof kct!="undefined"?t(kO):(e=e||self,t(e.d3=e.d3||{}))})(kO,function(e){"use strict";var t=Math.PI,r=2*t,i=1e-6,n=r-i;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,p=this._y1,d=u-s,v=c-l,m=h-s,g=p-l,w=m*m+g*g;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(w>i)if(!(Math.abs(g*d-v*m)>i)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var _=u-h,b=c-p,M=d*d+v*v,x=_*_+b*b,A=Math.sqrt(M),T=Math.sqrt(w),y=f*Math.tan((t-Math.acos((M+w-x)/(2*A*T)))/2),E=y/T,S=y/A;Math.abs(E-1)>i&&(this._+="L"+(s+E*m)+","+(l+E*g)),this._+="A"+f+","+f+",0,0,"+ +(g*_>m*b)+","+(this._x1=s+S*d)+","+(this._y1=l+S*v)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var p=u*Math.cos(c),d=u*Math.sin(c),v=s+p,m=l+d,g=1^h,w=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+v+","+m:(Math.abs(this._x1-v)>i||Math.abs(this._y1-m)>i)&&(this._+="L"+v+","+m),u&&(w<0&&(w=w%r+r),w>n?this._+="A"+u+","+u+",0,1,"+g+","+(s-p)+","+(l-d)+"A"+u+","+u+",0,1,"+g+","+(this._x1=v)+","+(this._y1=m):w>i&&(this._+="A"+u+","+u+",0,"+ +(w>=t)+","+g+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var rse=W((CO,Dct)=>{(function(e,t){typeof CO=="object"&&typeof Dct!="undefined"?t(CO,Cct()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(CO,function(e,t){"use strict";function r(Fe){return function(){return Fe}}var i=Math.abs,n=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,p=2*f;function d(Fe){return Fe>1?0:Fe<-1?f:Math.acos(Fe)}function v(Fe){return Fe>=1?h:Fe<=-1?-h:Math.asin(Fe)}function m(Fe){return Fe.innerRadius}function g(Fe){return Fe.outerRadius}function w(Fe){return Fe.startAngle}function _(Fe){return Fe.endAngle}function b(Fe){return Fe&&Fe.padAngle}function M(Fe,ot,lt,kt,er,zt,Ar,Zt){var wr=lt-Fe,Kr=kt-ot,ni=Ar-er,Si=Zt-zt,un=Si*wr-ni*Kr;if(!(un*unys*ys+tl*tl&&(ss=Go,No=ho),{cx:ss,cy:No,x01:-ni,y01:-Si,x11:ss*(er/ms-1),y11:No*(er/ms-1)}}function A(){var Fe=m,ot=g,lt=r(0),kt=null,er=w,zt=_,Ar=b,Zt=null;function wr(){var Kr,ni,Si=+Fe.apply(this,arguments),un=+ot.apply(this,arguments),$n=er.apply(this,arguments)-h,wn=zt.apply(this,arguments)-h,ma=i(wn-$n),Zn=wn>$n;if(Zt||(Zt=Kr=t.path()),unc))Zt.moveTo(0,0);else if(ma>p-c)Zt.moveTo(un*a($n),un*l($n)),Zt.arc(0,0,un,$n,wn,!Zn),Si>c&&(Zt.moveTo(Si*a(wn),Si*l(wn)),Zt.arc(0,0,Si,wn,$n,Zn));else{var io=$n,fo=wn,ko=$n,Oo=wn,ms=ma,os=ma,Co=Ar.apply(this,arguments)/2,ss=Co>c&&(kt?+kt.apply(this,arguments):u(Si*Si+un*un)),No=s(i(un-Si)/2,+lt.apply(this,arguments)),Go=No,ho=No,qn,_a;if(ss>c){var ys=v(ss/Si*l(Co)),tl=v(ss/un*l(Co));(ms-=ys*2)>c?(ys*=Zn?1:-1,ko+=ys,Oo-=ys):(ms=0,ko=Oo=($n+wn)/2),(os-=tl*2)>c?(tl*=Zn?1:-1,io+=tl,fo-=tl):(os=0,io=fo=($n+wn)/2)}var rl=un*a(io),jl=un*l(io),il=Si*a(Oo),hu=Si*l(Oo);if(No>c){var Mu=un*a(fo),Su=un*l(fo),yc=Si*a(ko),$l=Si*l(ko),Za;if(mac?ho>c?(qn=x(yc,$l,rl,jl,un,ho,Zn),_a=x(Mu,Su,il,hu,un,ho,Zn),Zt.moveTo(qn.cx+qn.x01,qn.cy+qn.y01),hoc)||!(ms>c)?Zt.lineTo(il,hu):Go>c?(qn=x(il,hu,Mu,Su,Si,-Go,Zn),_a=x(rl,jl,yc,$l,Si,-Go,Zn),Zt.lineTo(qn.cx+qn.x01,qn.cy+qn.y01),Go=un;--$n)Zt.point(fo[$n],ko[$n]);Zt.lineEnd(),Zt.areaEnd()}Zn&&(fo[Si]=+Fe(ma,Si,ni),ko[Si]=+lt(ma,Si,ni),Zt.point(ot?+ot(ma,Si,ni):fo[Si],kt?+kt(ma,Si,ni):ko[Si]))}if(io)return Zt=null,io+""||null}function Kr(){return C().defined(er).curve(Ar).context(zt)}return wr.x=function(ni){return arguments.length?(Fe=typeof ni=="function"?ni:r(+ni),ot=null,wr):Fe},wr.x0=function(ni){return arguments.length?(Fe=typeof ni=="function"?ni:r(+ni),wr):Fe},wr.x1=function(ni){return arguments.length?(ot=ni==null?null:typeof ni=="function"?ni:r(+ni),wr):ot},wr.y=function(ni){return arguments.length?(lt=typeof ni=="function"?ni:r(+ni),kt=null,wr):lt},wr.y0=function(ni){return arguments.length?(lt=typeof ni=="function"?ni:r(+ni),wr):lt},wr.y1=function(ni){return arguments.length?(kt=ni==null?null:typeof ni=="function"?ni:r(+ni),wr):kt},wr.lineX0=wr.lineY0=function(){return Kr().x(Fe).y(lt)},wr.lineY1=function(){return Kr().x(Fe).y(kt)},wr.lineX1=function(){return Kr().x(ot).y(lt)},wr.defined=function(ni){return arguments.length?(er=typeof ni=="function"?ni:r(!!ni),wr):er},wr.curve=function(ni){return arguments.length?(Ar=ni,zt!=null&&(Zt=Ar(zt)),wr):Ar},wr.context=function(ni){return arguments.length?(ni==null?zt=Zt=null:Zt=Ar(zt=ni),wr):zt},wr}function D(Fe,ot){return otFe?1:ot>=Fe?0:NaN}function F(Fe){return Fe}function P(){var Fe=F,ot=D,lt=null,kt=r(0),er=r(p),zt=r(0);function Ar(Zt){var wr,Kr=Zt.length,ni,Si,un=0,$n=new Array(Kr),wn=new Array(Kr),ma=+kt.apply(this,arguments),Zn=Math.min(p,Math.max(-p,er.apply(this,arguments)-ma)),io,fo=Math.min(Math.abs(Zn)/Kr,zt.apply(this,arguments)),ko=fo*(Zn<0?-1:1),Oo;for(wr=0;wr0&&(un+=Oo);for(ot!=null?$n.sort(function(ms,os){return ot(wn[ms],wn[os])}):lt!=null&&$n.sort(function(ms,os){return lt(Zt[ms],Zt[os])}),wr=0,Si=un?(Zn-Kr*ko)/un:0;wr0?Oo*Si:0)+ko,wn[ni]={data:Zt[ni],index:wr,value:Oo,startAngle:ma,endAngle:io,padAngle:fo};return wn}return Ar.value=function(Zt){return arguments.length?(Fe=typeof Zt=="function"?Zt:r(+Zt),Ar):Fe},Ar.sortValues=function(Zt){return arguments.length?(ot=Zt,lt=null,Ar):ot},Ar.sort=function(Zt){return arguments.length?(lt=Zt,ot=null,Ar):lt},Ar.startAngle=function(Zt){return arguments.length?(kt=typeof Zt=="function"?Zt:r(+Zt),Ar):kt},Ar.endAngle=function(Zt){return arguments.length?(er=typeof Zt=="function"?Zt:r(+Zt),Ar):er},Ar.padAngle=function(Zt){return arguments.length?(zt=typeof Zt=="function"?Zt:r(+Zt),Ar):zt},Ar}var R=I(y);function L(Fe){this._curve=Fe}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Fe,ot){this._curve.point(ot*Math.sin(Fe),ot*-Math.cos(Fe))}};function I(Fe){function ot(lt){return new L(Fe(lt))}return ot._curve=Fe,ot}function B(Fe){var ot=Fe.curve;return Fe.angle=Fe.x,delete Fe.x,Fe.radius=Fe.y,delete Fe.y,Fe.curve=function(lt){return arguments.length?ot(I(lt)):ot()._curve},Fe}function O(){return B(C().curve(R))}function $(){var Fe=k().curve(R),ot=Fe.curve,lt=Fe.lineX0,kt=Fe.lineX1,er=Fe.lineY0,zt=Fe.lineY1;return Fe.angle=Fe.x,delete Fe.x,Fe.startAngle=Fe.x0,delete Fe.x0,Fe.endAngle=Fe.x1,delete Fe.x1,Fe.radius=Fe.y,delete Fe.y,Fe.innerRadius=Fe.y0,delete Fe.y0,Fe.outerRadius=Fe.y1,delete Fe.y1,Fe.lineStartAngle=function(){return B(lt())},delete Fe.lineX0,Fe.lineEndAngle=function(){return B(kt())},delete Fe.lineX1,Fe.lineInnerRadius=function(){return B(er())},delete Fe.lineY0,Fe.lineOuterRadius=function(){return B(zt())},delete Fe.lineY1,Fe.curve=function(Ar){return arguments.length?ot(I(Ar)):ot()._curve},Fe}function X(Fe,ot){return[(ot=+ot)*Math.cos(Fe-=Math.PI/2),ot*Math.sin(Fe)]}var K=Array.prototype.slice;function G(Fe){return Fe.source}function q(Fe){return Fe.target}function J(Fe){var ot=G,lt=q,kt=E,er=S,zt=null;function Ar(){var Zt,wr=K.call(arguments),Kr=ot.apply(this,wr),ni=lt.apply(this,wr);if(zt||(zt=Zt=t.path()),Fe(zt,+kt.apply(this,(wr[0]=Kr,wr)),+er.apply(this,wr),+kt.apply(this,(wr[0]=ni,wr)),+er.apply(this,wr)),Zt)return zt=null,Zt+""||null}return Ar.source=function(Zt){return arguments.length?(ot=Zt,Ar):ot},Ar.target=function(Zt){return arguments.length?(lt=Zt,Ar):lt},Ar.x=function(Zt){return arguments.length?(kt=typeof Zt=="function"?Zt:r(+Zt),Ar):kt},Ar.y=function(Zt){return arguments.length?(er=typeof Zt=="function"?Zt:r(+Zt),Ar):er},Ar.context=function(Zt){return arguments.length?(zt=Zt==null?null:Zt,Ar):zt},Ar}function N(Fe,ot,lt,kt,er){Fe.moveTo(ot,lt),Fe.bezierCurveTo(ot=(ot+kt)/2,lt,ot,er,kt,er)}function V(Fe,ot,lt,kt,er){Fe.moveTo(ot,lt),Fe.bezierCurveTo(ot,lt=(lt+er)/2,kt,lt,kt,er)}function Y(Fe,ot,lt,kt,er){var zt=X(ot,lt),Ar=X(ot,lt=(lt+er)/2),Zt=X(kt,lt),wr=X(kt,er);Fe.moveTo(zt[0],zt[1]),Fe.bezierCurveTo(Ar[0],Ar[1],Zt[0],Zt[1],wr[0],wr[1])}function H(){return J(N)}function j(){return J(V)}function Q(){var Fe=J(Y);return Fe.angle=Fe.x,delete Fe.x,Fe.radius=Fe.y,delete Fe.y,Fe}var te={draw:function(Fe,ot){var lt=Math.sqrt(ot/f);Fe.moveTo(lt,0),Fe.arc(0,0,lt,0,p)}},ue={draw:function(Fe,ot){var lt=Math.sqrt(ot/5)/2;Fe.moveTo(-3*lt,-lt),Fe.lineTo(-lt,-lt),Fe.lineTo(-lt,-3*lt),Fe.lineTo(lt,-3*lt),Fe.lineTo(lt,-lt),Fe.lineTo(3*lt,-lt),Fe.lineTo(3*lt,lt),Fe.lineTo(lt,lt),Fe.lineTo(lt,3*lt),Fe.lineTo(-lt,3*lt),Fe.lineTo(-lt,lt),Fe.lineTo(-3*lt,lt),Fe.closePath()}},ge=Math.sqrt(1/3),Ee=ge*2,xe={draw:function(Fe,ot){var lt=Math.sqrt(ot/Ee),kt=lt*ge;Fe.moveTo(0,-lt),Fe.lineTo(kt,0),Fe.lineTo(0,lt),Fe.lineTo(-kt,0),Fe.closePath()}},ce=.8908130915292852,oe=Math.sin(f/10)/Math.sin(7*f/10),Se=Math.sin(p/10)*oe,be=-Math.cos(p/10)*oe,fe={draw:function(Fe,ot){var lt=Math.sqrt(ot*ce),kt=Se*lt,er=be*lt;Fe.moveTo(0,-lt),Fe.lineTo(kt,er);for(var zt=1;zt<5;++zt){var Ar=p*zt/5,Zt=Math.cos(Ar),wr=Math.sin(Ar);Fe.lineTo(wr*lt,-Zt*lt),Fe.lineTo(Zt*kt-wr*er,wr*kt+Zt*er)}Fe.closePath()}},ee={draw:function(Fe,ot){var lt=Math.sqrt(ot),kt=-lt/2;Fe.rect(kt,kt,lt,lt)}},ae=Math.sqrt(3),_e={draw:function(Fe,ot){var lt=-Math.sqrt(ot/(ae*3));Fe.moveTo(0,lt*2),Fe.lineTo(-ae*lt,-lt),Fe.lineTo(ae*lt,-lt),Fe.closePath()}},re=-.5,pe=Math.sqrt(3)/2,Te=1/Math.sqrt(12),Ce=(Te/2+1)*3,ze={draw:function(Fe,ot){var lt=Math.sqrt(ot/Ce),kt=lt/2,er=lt*Te,zt=kt,Ar=lt*Te+lt,Zt=-zt,wr=Ar;Fe.moveTo(kt,er),Fe.lineTo(zt,Ar),Fe.lineTo(Zt,wr),Fe.lineTo(re*kt-pe*er,pe*kt+re*er),Fe.lineTo(re*zt-pe*Ar,pe*zt+re*Ar),Fe.lineTo(re*Zt-pe*wr,pe*Zt+re*wr),Fe.lineTo(re*kt+pe*er,re*er-pe*kt),Fe.lineTo(re*zt+pe*Ar,re*Ar-pe*zt),Fe.lineTo(re*Zt+pe*wr,re*wr-pe*Zt),Fe.closePath()}},we=[te,ue,xe,ee,fe,_e,ze];function me(){var Fe=r(te),ot=r(64),lt=null;function kt(){var er;if(lt||(lt=er=t.path()),Fe.apply(this,arguments).draw(lt,+ot.apply(this,arguments)),er)return lt=null,er+""||null}return kt.type=function(er){return arguments.length?(Fe=typeof er=="function"?er:r(er),kt):Fe},kt.size=function(er){return arguments.length?(ot=typeof er=="function"?er:r(+er),kt):ot},kt.context=function(er){return arguments.length?(lt=er==null?null:er,kt):lt},kt}function Le(){}function Ne(Fe,ot,lt){Fe._context.bezierCurveTo((2*Fe._x0+Fe._x1)/3,(2*Fe._y0+Fe._y1)/3,(Fe._x0+2*Fe._x1)/3,(Fe._y0+2*Fe._y1)/3,(Fe._x0+4*Fe._x1+ot)/6,(Fe._y0+4*Fe._y1+lt)/6)}function Je(Fe){this._context=Fe}Je.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:Ne(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(Fe,ot){switch(Fe=+Fe,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Fe,ot):this._context.moveTo(Fe,ot);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:Ne(this,Fe,ot);break}this._x0=this._x1,this._x1=Fe,this._y0=this._y1,this._y1=ot}};function rt(Fe){return new Je(Fe)}function mt(Fe){this._context=Fe}mt.prototype={areaStart:Le,areaEnd:Le,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(Fe,ot){switch(Fe=+Fe,ot=+ot,this._point){case 0:this._point=1,this._x2=Fe,this._y2=ot;break;case 1:this._point=2,this._x3=Fe,this._y3=ot;break;case 2:this._point=3,this._x4=Fe,this._y4=ot,this._context.moveTo((this._x0+4*this._x1+Fe)/6,(this._y0+4*this._y1+ot)/6);break;default:Ne(this,Fe,ot);break}this._x0=this._x1,this._x1=Fe,this._y0=this._y1,this._y1=ot}};function dt(Fe){return new mt(Fe)}function St(Fe){this._context=Fe}St.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(Fe,ot){switch(Fe=+Fe,ot=+ot,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var lt=(this._x0+4*this._x1+Fe)/6,kt=(this._y0+4*this._y1+ot)/6;this._line?this._context.lineTo(lt,kt):this._context.moveTo(lt,kt);break;case 3:this._point=4;default:Ne(this,Fe,ot);break}this._x0=this._x1,this._x1=Fe,this._y0=this._y1,this._y1=ot}};function Ke(Fe){return new St(Fe)}function bt(Fe,ot){this._basis=new Je(Fe),this._beta=ot}bt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Fe=this._x,ot=this._y,lt=Fe.length-1;if(lt>0)for(var kt=Fe[0],er=ot[0],zt=Fe[lt]-kt,Ar=ot[lt]-er,Zt=-1,wr;++Zt<=lt;)wr=Zt/lt,this._basis.point(this._beta*Fe[Zt]+(1-this._beta)*(kt+wr*zt),this._beta*ot[Zt]+(1-this._beta)*(er+wr*Ar));this._x=this._y=null,this._basis.lineEnd()},point:function(Fe,ot){this._x.push(+Fe),this._y.push(+ot)}};var pt=(function Fe(ot){function lt(kt){return ot===1?new Je(kt):new bt(kt,ot)}return lt.beta=function(kt){return Fe(+kt)},lt})(.85);function Oe(Fe,ot,lt){Fe._context.bezierCurveTo(Fe._x1+Fe._k*(Fe._x2-Fe._x0),Fe._y1+Fe._k*(Fe._y2-Fe._y0),Fe._x2+Fe._k*(Fe._x1-ot),Fe._y2+Fe._k*(Fe._y1-lt),Fe._x2,Fe._y2)}function Ue(Fe,ot){this._context=Fe,this._k=(1-ot)/6}Ue.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:Oe(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Fe,ot){switch(Fe=+Fe,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Fe,ot):this._context.moveTo(Fe,ot);break;case 1:this._point=2,this._x1=Fe,this._y1=ot;break;case 2:this._point=3;default:Oe(this,Fe,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Fe,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var je=(function Fe(ot){function lt(kt){return new Ue(kt,ot)}return lt.tension=function(kt){return Fe(+kt)},lt})(0);function $e(Fe,ot){this._context=Fe,this._k=(1-ot)/6}$e.prototype={areaStart:Le,areaEnd:Le,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(Fe,ot){switch(Fe=+Fe,ot=+ot,this._point){case 0:this._point=1,this._x3=Fe,this._y3=ot;break;case 1:this._point=2,this._context.moveTo(this._x4=Fe,this._y4=ot);break;case 2:this._point=3,this._x5=Fe,this._y5=ot;break;default:Oe(this,Fe,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Fe,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Ie=(function Fe(ot){function lt(kt){return new $e(kt,ot)}return lt.tension=function(kt){return Fe(+kt)},lt})(0);function Ve(Fe,ot){this._context=Fe,this._k=(1-ot)/6}Ve.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(Fe,ot){switch(Fe=+Fe,ot=+ot,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:Oe(this,Fe,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Fe,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var st=(function Fe(ot){function lt(kt){return new Ve(kt,ot)}return lt.tension=function(kt){return Fe(+kt)},lt})(0);function _t(Fe,ot,lt){var kt=Fe._x1,er=Fe._y1,zt=Fe._x2,Ar=Fe._y2;if(Fe._l01_a>c){var Zt=2*Fe._l01_2a+3*Fe._l01_a*Fe._l12_a+Fe._l12_2a,wr=3*Fe._l01_a*(Fe._l01_a+Fe._l12_a);kt=(kt*Zt-Fe._x0*Fe._l12_2a+Fe._x2*Fe._l01_2a)/wr,er=(er*Zt-Fe._y0*Fe._l12_2a+Fe._y2*Fe._l01_2a)/wr}if(Fe._l23_a>c){var Kr=2*Fe._l23_2a+3*Fe._l23_a*Fe._l12_a+Fe._l12_2a,ni=3*Fe._l23_a*(Fe._l23_a+Fe._l12_a);zt=(zt*Kr+Fe._x1*Fe._l23_2a-ot*Fe._l12_2a)/ni,Ar=(Ar*Kr+Fe._y1*Fe._l23_2a-lt*Fe._l12_2a)/ni}Fe._context.bezierCurveTo(kt,er,zt,Ar,Fe._x2,Fe._y2)}function Wt(Fe,ot){this._context=Fe,this._alpha=ot}Wt.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(Fe,ot){if(Fe=+Fe,ot=+ot,this._point){var lt=this._x2-Fe,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Fe,ot):this._context.moveTo(Fe,ot);break;case 1:this._point=2;break;case 2:this._point=3;default:_t(this,Fe,ot);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=Fe,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Ht=(function Fe(ot){function lt(kt){return ot?new Wt(kt,ot):new Ue(kt,0)}return lt.alpha=function(kt){return Fe(+kt)},lt})(.5);function fr(Fe,ot){this._context=Fe,this._alpha=ot}fr.prototype={areaStart:Le,areaEnd:Le,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(Fe,ot){if(Fe=+Fe,ot=+ot,this._point){var lt=this._x2-Fe,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Fe,this._y3=ot;break;case 1:this._point=2,this._context.moveTo(this._x4=Fe,this._y4=ot);break;case 2:this._point=3,this._x5=Fe,this._y5=ot;break;default:_t(this,Fe,ot);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=Fe,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var lr=(function Fe(ot){function lt(kt){return ot?new fr(kt,ot):new $e(kt,0)}return lt.alpha=function(kt){return Fe(+kt)},lt})(.5);function Ot(Fe,ot){this._context=Fe,this._alpha=ot}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._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(Fe,ot){if(Fe=+Fe,ot=+ot,this._point){var lt=this._x2-Fe,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,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:_t(this,Fe,ot);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=Fe,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Jt=(function Fe(ot){function lt(kt){return ot?new Ot(kt,ot):new Ve(kt,0)}return lt.alpha=function(kt){return Fe(+kt)},lt})(.5);function Cr(Fe){this._context=Fe}Cr.prototype={areaStart:Le,areaEnd:Le,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Fe,ot){Fe=+Fe,ot=+ot,this._point?this._context.lineTo(Fe,ot):(this._point=1,this._context.moveTo(Fe,ot))}};function Ge(Fe){return new Cr(Fe)}function Qe(Fe){return Fe<0?-1:1}function nt(Fe,ot,lt){var kt=Fe._x1-Fe._x0,er=ot-Fe._x1,zt=(Fe._y1-Fe._y0)/(kt||er<0&&-0),Ar=(lt-Fe._y1)/(er||kt<0&&-0),Zt=(zt*er+Ar*kt)/(kt+er);return(Qe(zt)+Qe(Ar))*Math.min(Math.abs(zt),Math.abs(Ar),.5*Math.abs(Zt))||0}function gt(Fe,ot){var lt=Fe._x1-Fe._x0;return lt?(3*(Fe._y1-Fe._y0)/lt-ot)/2:ot}function ht(Fe,ot,lt){var kt=Fe._x0,er=Fe._y0,zt=Fe._x1,Ar=Fe._y1,Zt=(zt-kt)/3;Fe._context.bezierCurveTo(kt+Zt,er+Zt*ot,zt-Zt,Ar-Zt*lt,zt,Ar)}function Ft(Fe){this._context=Fe}Ft.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:ht(this,this._t0,gt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Fe,ot){var lt=NaN;if(Fe=+Fe,ot=+ot,!(Fe===this._x1&&ot===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Fe,ot):this._context.moveTo(Fe,ot);break;case 1:this._point=2;break;case 2:this._point=3,ht(this,gt(this,lt=nt(this,Fe,ot)),lt);break;default:ht(this,this._t0,lt=nt(this,Fe,ot));break}this._x0=this._x1,this._x1=Fe,this._y0=this._y1,this._y1=ot,this._t0=lt}}};function hr(Fe){this._context=new Ut(Fe)}(hr.prototype=Object.create(Ft.prototype)).point=function(Fe,ot){Ft.prototype.point.call(this,ot,Fe)};function Ut(Fe){this._context=Fe}Ut.prototype={moveTo:function(Fe,ot){this._context.moveTo(ot,Fe)},closePath:function(){this._context.closePath()},lineTo:function(Fe,ot){this._context.lineTo(ot,Fe)},bezierCurveTo:function(Fe,ot,lt,kt,er,zt){this._context.bezierCurveTo(ot,Fe,kt,lt,zt,er)}};function Lr(Fe){return new Ft(Fe)}function jr(Fe){return new hr(Fe)}function ii(Fe){this._context=Fe}ii.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Fe=this._x,ot=this._y,lt=Fe.length;if(lt)if(this._line?this._context.lineTo(Fe[0],ot[0]):this._context.moveTo(Fe[0],ot[0]),lt===2)this._context.lineTo(Fe[1],ot[1]);else for(var kt=Fr(Fe),er=Fr(ot),zt=0,Ar=1;Ar=0;--ot)er[ot]=(Ar[ot]-er[ot+1])/zt[ot];for(zt[lt-1]=(Fe[lt]+er[lt-1])/2,ot=0;ot=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Fe,ot){switch(Fe=+Fe,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Fe,ot):this._context.moveTo(Fe,ot);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,ot),this._context.lineTo(Fe,ot);else{var lt=this._x*(1-this._t)+Fe*this._t;this._context.lineTo(lt,this._y),this._context.lineTo(lt,ot)}break}}this._x=Fe,this._y=ot}};function ln(Fe){return new Xi(Fe,.5)}function la(Fe){return new Xi(Fe,0)}function mo(Fe){return new Xi(Fe,1)}function pn(Fe,ot){if((Ar=Fe.length)>1)for(var lt=1,kt,er,zt=Fe[ot[0]],Ar,Zt=zt.length;lt=0;)lt[ot]=ot;return lt}function gn(Fe,ot){return Fe[ot]}function ns(){var Fe=r([]),ot=zn,lt=pn,kt=gn;function er(zt){var Ar=Fe.apply(this,arguments),Zt,wr=zt.length,Kr=Ar.length,ni=new Array(Kr),Si;for(Zt=0;Zt0){for(var lt,kt,er=0,zt=Fe[0].length,Ar;er0)for(var lt,kt=0,er,zt,Ar,Zt,wr,Kr=Fe[ot[0]].length;kt0?(er[0]=Ar,er[1]=Ar+=zt):zt<0?(er[1]=Zt,er[0]=Zt+=zt):(er[0]=0,er[1]=zt)}function ro(Fe,ot){if((er=Fe.length)>0){for(var lt=0,kt=Fe[ot[0]],er,zt=kt.length;lt0)||!((zt=(er=Fe[ot[0]]).length)>0))){for(var lt=0,kt=1,er,zt,Ar;ktzt&&(zt=er,lt=ot);return lt}function Ma(Fe){var ot=Fe.map(el);return zn(Fe).sort(function(lt,kt){return ot[lt]-ot[kt]})}function el(Fe){for(var ot=0,lt=-1,kt=Fe.length,er;++lt{(function(e,t){typeof DO=="object"&&typeof Fct!="undefined"?t(DO,Ect(),rse()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(DO,function(e,t,r){"use strict";function i(x){return x.target.depth}function n(x){return x.depth}function a(x,A){return A-1-x.height}function o(x,A){return x.sourceLinks.length?x.depth:A-1}function s(x){return x.targetLinks.length?x.depth:x.sourceLinks.length?t.min(x.sourceLinks,i)-1:0}function l(x){return function(){return x}}function u(x,A){return f(x.source,A.source)||x.index-A.index}function c(x,A){return f(x.target,A.target)||x.index-A.index}function f(x,A){return x.y0-A.y0}function h(x){return x.value}function p(x){return x.index}function d(x){return x.nodes}function v(x){return x.links}function m(x,A){let T=x.get(A);if(!T)throw new Error("missing: "+A);return T}function g({nodes:x}){for(let A of x){let T=A.y0,y=T;for(let E of A.sourceLinks)E.y0=T+E.width/2,T+=E.width;for(let E of A.targetLinks)E.y1=y+E.width/2,y+=E.width}}function w(){let x=0,A=0,T=1,y=1,E=24,S=8,C,k=p,D=o,F,P,R=d,L=v,I=6,B=2/3;function O(){let xe={nodes:R.apply(null,arguments),links:L.apply(null,arguments)};return $(xe),X(xe),K(xe),G(xe),N(xe),g(xe),xe}O.update=function(xe){return g(xe),xe},O.nodeId=function(xe){return arguments.length?(k=typeof xe=="function"?xe:l(xe),O):k},O.nodeAlign=function(xe){return arguments.length?(D=typeof xe=="function"?xe:l(xe),O):D},O.nodeSort=function(xe){return arguments.length?(F=xe,O):F},O.nodeWidth=function(xe){return arguments.length?(E=+xe,O):E},O.nodePadding=function(xe){return arguments.length?(S=C=+xe,O):S},O.nodes=function(xe){return arguments.length?(R=typeof xe=="function"?xe:l(xe),O):R},O.links=function(xe){return arguments.length?(L=typeof xe=="function"?xe:l(xe),O):L},O.linkSort=function(xe){return arguments.length?(P=xe,O):P},O.size=function(xe){return arguments.length?(x=A=0,T=+xe[0],y=+xe[1],O):[T-x,y-A]},O.extent=function(xe){return arguments.length?(x=+xe[0][0],T=+xe[1][0],A=+xe[0][1],y=+xe[1][1],O):[[x,A],[T,y]]},O.iterations=function(xe){return arguments.length?(I=+xe,O):I};function $({nodes:xe,links:ce}){for(let[Se,be]of xe.entries())be.index=Se,be.sourceLinks=[],be.targetLinks=[];let oe=new Map(xe.map((Se,be)=>[k(Se,be,xe),Se]));for(let[Se,be]of ce.entries()){be.index=Se;let{source:fe,target:ee}=be;typeof fe!="object"&&(fe=be.source=m(oe,fe)),typeof ee!="object"&&(ee=be.target=m(oe,ee)),fe.sourceLinks.push(be),ee.targetLinks.push(be)}if(P!=null)for(let{sourceLinks:Se,targetLinks:be}of xe)Se.sort(P),be.sort(P)}function X({nodes:xe}){for(let ce of xe)ce.value=ce.fixedValue===void 0?Math.max(t.sum(ce.sourceLinks,h),t.sum(ce.targetLinks,h)):ce.fixedValue}function K({nodes:xe}){let ce=xe.length,oe=new Set(xe),Se=new Set,be=0;for(;oe.size;){for(let fe of oe){fe.depth=be;for(let{target:ee}of fe.sourceLinks)Se.add(ee)}if(++be>ce)throw new Error("circular link");oe=Se,Se=new Set}}function G({nodes:xe}){let ce=xe.length,oe=new Set(xe),Se=new Set,be=0;for(;oe.size;){for(let fe of oe){fe.height=be;for(let{source:ee}of fe.targetLinks)Se.add(ee)}if(++be>ce)throw new Error("circular link");oe=Se,Se=new Set}}function q({nodes:xe}){let ce=t.max(xe,be=>be.depth)+1,oe=(T-x-E)/(ce-1),Se=new Array(ce);for(let be of xe){let fe=Math.max(0,Math.min(ce-1,Math.floor(D.call(null,be,ce))));be.layer=fe,be.x0=x+fe*oe,be.x1=be.x0+E,Se[fe]?Se[fe].push(be):Se[fe]=[be]}if(F)for(let be of Se)be.sort(F);return Se}function J(xe){let ce=t.min(xe,oe=>(y-A-(oe.length-1)*C)/t.sum(oe,h));for(let oe of xe){let Se=A;for(let be of oe){be.y0=Se,be.y1=Se+be.value*ce,Se=be.y1+C;for(let fe of be.sourceLinks)fe.width=fe.value*ce}Se=(y-Se+C)/(oe.length+1);for(let be=0;beoe.length)-1)),J(ce);for(let oe=0;oe0))continue;let re=(ae/_e-ee.y0)*ce;ee.y0+=re,ee.y1+=re,te(ee)}F===void 0&&fe.sort(f),H(fe,oe)}}function Y(xe,ce,oe){for(let Se=xe.length,be=Se-2;be>=0;--be){let fe=xe[be];for(let ee of fe){let ae=0,_e=0;for(let{target:pe,value:Te}of ee.sourceLinks){let Ce=Te*(pe.layer-ee.layer);ae+=Ee(ee,pe)*Ce,_e+=Ce}if(!(_e>0))continue;let re=(ae/_e-ee.y0)*ce;ee.y0+=re,ee.y1+=re,te(ee)}F===void 0&&fe.sort(f),H(fe,oe)}}function H(xe,ce){let oe=xe.length>>1,Se=xe[oe];Q(xe,Se.y0-C,oe-1,ce),j(xe,Se.y1+C,oe+1,ce),Q(xe,y,xe.length-1,ce),j(xe,A,0,ce)}function j(xe,ce,oe,Se){for(;oe1e-6&&(be.y0+=fe,be.y1+=fe),ce=be.y1+C}}function Q(xe,ce,oe,Se){for(;oe>=0;--oe){let be=xe[oe],fe=(be.y1-ce)*Se;fe>1e-6&&(be.y0-=fe,be.y1-=fe),ce=be.y0-C}}function te({sourceLinks:xe,targetLinks:ce}){if(P===void 0){for(let{source:{sourceLinks:oe}}of ce)oe.sort(c);for(let{target:{targetLinks:oe}}of xe)oe.sort(u)}}function ue(xe){if(P===void 0)for(let{sourceLinks:ce,targetLinks:oe}of xe)ce.sort(c),oe.sort(u)}function ge(xe,ce){let oe=xe.y0-(xe.sourceLinks.length-1)*C/2;for(let{target:Se,width:be}of xe.sourceLinks){if(Se===ce)break;oe+=be+C}for(let{source:Se,width:be}of ce.targetLinks){if(Se===xe)break;oe-=be}return oe}function Ee(xe,ce){let oe=ce.y0-(ce.targetLinks.length-1)*C/2;for(let{source:Se,width:be}of ce.targetLinks){if(Se===xe)break;oe+=be+C}for(let{target:Se,width:be}of xe.sourceLinks){if(Se===ce)break;oe-=be}return oe}return O}function _(x){return[x.source.x1,x.y0]}function b(x){return[x.target.x0,x.y1]}function M(){return r.linkHorizontal().source(_).target(b)}e.sankey=w,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=n,e.sankeyLinkHorizontal=M,e.sankeyRight=a,Object.defineProperty(e,"__esModule",{value:!0})})});var Ict=W((FO,Pct)=>{(function(e,t){t(typeof FO=="object"&&typeof Pct!="undefined"?FO:e.d3=e.d3||{})})(FO,(function(e){"use strict";function t(N,V){return NV?1:N>=V?0:NaN}function r(N){return N.length===1&&(N=i(N)),{left:function(V,Y,H,j){for(H==null&&(H=0),j==null&&(j=V.length);H>>1;N(V[Q],Y)<0?H=Q+1:j=Q}return H},right:function(V,Y,H,j){for(H==null&&(H=0),j==null&&(j=V.length);H>>1;N(V[Q],Y)>0?j=Q:H=Q+1}return H}}}function i(N){return function(V,Y){return t(N(V),Y)}}var n=r(t),a=n.right,o=n.left;function s(N,V){V==null&&(V=l);for(var Y=0,H=N.length-1,j=N[0],Q=new Array(H<0?0:H);YN?1:V>=N?0:NaN}function f(N){return N===null?NaN:+N}function h(N,V){var Y=N.length,H=0,j=-1,Q=0,te,ue,ge=0;if(V==null)for(;++j1)return ge/(H-1)}function p(N,V){var Y=h(N,V);return Y&&Math.sqrt(Y)}function d(N,V){var Y=N.length,H=-1,j,Q,te;if(V==null){for(;++H=j)for(Q=te=j;++Hj&&(Q=j),te=j)for(Q=te=j;++Hj&&(Q=j),te0)return[N];if((H=V0)for(N=Math.ceil(N/ue),V=Math.floor(V/ue),te=new Array(Q=Math.ceil(V-N+1));++j=0?(Q>=M?10:Q>=x?5:Q>=A?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(Q>=M?10:Q>=x?5:Q>=A?2:1)}function E(N,V,Y){var H=Math.abs(V-N)/Math.max(0,Y),j=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/j;return Q>=M?j*=10:Q>=x?j*=5:Q>=A&&(j*=2),Vce;)oe.pop(),--Se;var be=new Array(Se+1),fe;for(Q=0;Q<=Se;++Q)fe=be[Q]=[],fe.x0=Q>0?oe[Q-1]:xe,fe.x1=Q=1)return+Y(N[H-1],H-1,N);var H,j=(H-1)*V,Q=Math.floor(j),te=+Y(N[Q],Q,N),ue=+Y(N[Q+1],Q+1,N);return te+(ue-te)*(j-Q)}}function D(N,V,Y){return N=g.call(N,f).sort(t),Math.ceil((Y-V)/(2*(k(N,.75)-k(N,.25))*Math.pow(N.length,-1/3)))}function F(N,V,Y){return Math.ceil((Y-V)/(3.5*p(N)*Math.pow(N.length,-1/3)))}function P(N,V){var Y=N.length,H=-1,j,Q;if(V==null){for(;++H=j)for(Q=j;++HQ&&(Q=j)}else for(;++H=j)for(Q=j;++HQ&&(Q=j);return Q}function R(N,V){var Y=N.length,H=Y,j=-1,Q,te=0;if(V==null)for(;++j=0;)for(te=N[V],Y=te.length;--Y>=0;)Q[--j]=te[Y];return Q}function B(N,V){var Y=N.length,H=-1,j,Q;if(V==null){for(;++H=j)for(Q=j;++Hj&&(Q=j)}else for(;++H=j)for(Q=j;++Hj&&(Q=j);return Q}function O(N,V){for(var Y=V.length,H=new Array(Y);Y--;)H[Y]=N[V[Y]];return H}function $(N,V){if(Y=N.length){var Y,H=0,j=0,Q,te=N[j];for(V==null&&(V=t);++H{var z8r=ese();Rct.exports=function(t,r){var i=[],n=[],a=[],o={},s=[],l;function u(_){a[_]=!1,o.hasOwnProperty(_)&&Object.keys(o[_]).forEach(function(b){delete o[_][b],a[b]&&u(b)})}function c(_){var b=!1;n.push(_),a[_]=!0;var M,x;for(M=0;M=_})}function p(_){h(_);for(var b=t,M=z8r(b),x=M.components.filter(function(k){return k.length>1}),A=1/0,T,y=0;y{(function(e,t){typeof LO=="object"&&typeof Bct!="undefined"?t(LO,Ict(),tse(),rse(),zct()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(LO,(function(e,t,r,i,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;function a(ce){return ce.target.depth}function o(ce){return ce.depth}function s(ce,oe){return oe-1-ce.height}function l(ce,oe){return ce.sourceLinks.length?ce.depth:oe-1}function u(ce){return ce.targetLinks.length?ce.depth:ce.sourceLinks.length?t.min(ce.sourceLinks,a)-1:0}function c(ce){return function(){return ce}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ce){return typeof ce}:function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce};function h(ce,oe){return d(ce.source,oe.source)||ce.index-oe.index}function p(ce,oe){return d(ce.target,oe.target)||ce.index-oe.index}function d(ce,oe){return ce.partOfCycle===oe.partOfCycle?ce.y0-oe.y0:ce.circularLinkType==="top"||oe.circularLinkType==="bottom"?-1:1}function v(ce){return ce.value}function m(ce){return(ce.y0+ce.y1)/2}function g(ce){return m(ce.source)}function w(ce){return m(ce.target)}function _(ce){return ce.index}function b(ce){return ce.nodes}function M(ce){return ce.links}function x(ce,oe){var Se=ce.get(oe);if(!Se)throw new Error("missing: "+oe);return Se}function A(ce,oe){return oe(ce)}var T=25,y=10,E=.3;function S(){var ce=0,oe=0,Se=1,be=1,fe=24,ee,ae=_,_e=l,re=b,pe=M,Te=32,Ce=2,ze,we=null;function me(){var Ke={nodes:re.apply(null,arguments),links:pe.apply(null,arguments)};Le(Ke),C(Ke,ae,we),Ne(Ke),mt(Ke),k(Ke,ae),dt(Ke,Te,ae),St(Ke);for(var bt=4,pt=0;pt0?bt+T+y:bt,pt=pt>0?pt+T+y:pt,Oe=Oe>0?Oe+T+y:Oe,Ue=Ue>0?Ue+T+y:Ue,{top:bt,bottom:pt,left:Ue,right:Oe}}function rt(Ke,bt){var pt=t.max(Ke.nodes,function(st){return st.column}),Oe=Se-ce,Ue=be-oe,je=Oe+bt.right+bt.left,$e=Ue+bt.top+bt.bottom,Ie=Oe/je,Ve=Ue/$e;return ce=ce*Ie+bt.left,Se=bt.right==0?Se:Se*Ie,oe=oe*Ve+bt.top,be=be*Ve,Ke.nodes.forEach(function(st){st.x0=ce+st.column*((Se-ce-fe)/pt),st.x1=st.x0+fe}),Ve}function mt(Ke){var bt,pt,Oe;for(bt=Ke.nodes,pt=[],Oe=0;bt.length;++Oe,bt=pt,pt=[])bt.forEach(function(Ue){Ue.depth=Oe,Ue.sourceLinks.forEach(function(je){pt.indexOf(je.target)<0&&!je.circular&&pt.push(je.target)})});for(bt=Ke.nodes,pt=[],Oe=0;bt.length;++Oe,bt=pt,pt=[])bt.forEach(function(Ue){Ue.height=Oe,Ue.targetLinks.forEach(function(je){pt.indexOf(je.source)<0&&!je.circular&&pt.push(je.source)})});Ke.nodes.forEach(function(Ue){Ue.column=Math.floor(_e.call(null,Ue,Oe))})}function dt(Ke,bt,pt){var Oe=r.nest().key(function(st){return st.column}).sortKeys(t.ascending).entries(Ke.nodes).map(function(st){return st.values});$e(pt),Ve();for(var Ue=1,je=bt;je>0;--je)Ie(Ue*=.99,pt),Ve();function $e(st){if(ze){var _t=1/0;Oe.forEach(function(lr){var Ot=be*ze/(lr.length+1);_t=Ot<_t?Ot:_t}),ee=_t}var Wt=t.min(Oe,function(lr){return(be-oe-(lr.length-1)*ee)/t.sum(lr,v)});Wt=Wt*E,Ke.links.forEach(function(lr){lr.width=lr.value*Wt});var Ht=Je(Ke),fr=rt(Ke,Ht);Wt=Wt*fr,Ke.links.forEach(function(lr){lr.width=lr.value*Wt}),Oe.forEach(function(lr){var Ot=lr.length;lr.forEach(function(Jt,Cr){Jt.depth==Oe.length-1&&Ot==1||Jt.depth==0&&Ot==1?(Jt.y0=be/2-Jt.value*Wt,Jt.y1=Jt.y0+Jt.value*Wt):Jt.partOfCycle?P(Jt,st)==0?(Jt.y0=be/2+Cr,Jt.y1=Jt.y0+Jt.value*Wt):Jt.circularLinkType=="top"?(Jt.y0=oe+Cr,Jt.y1=Jt.y0+Jt.value*Wt):(Jt.y0=be-Jt.value*Wt-Cr,Jt.y1=Jt.y0+Jt.value*Wt):Ht.top==0||Ht.bottom==0?(Jt.y0=(be-oe)/Ot*Cr,Jt.y1=Jt.y0+Jt.value*Wt):(Jt.y0=(be-oe)/2-Ot/2+Cr,Jt.y1=Jt.y0+Jt.value*Wt)})})}function Ie(st,_t){var Wt=Oe.length;Oe.forEach(function(Ht){var fr=Ht.length,lr=Ht[0].depth;Ht.forEach(function(Ot){var Jt;if((Ot.sourceLinks.length||Ot.targetLinks.length)&&!(Ot.partOfCycle&&P(Ot,_t)>0))if(lr==0&&fr==1)Jt=Ot.y1-Ot.y0,Ot.y0=be/2-Jt/2,Ot.y1=be/2+Jt/2;else if(lr==Wt-1&&fr==1)Jt=Ot.y1-Ot.y0,Ot.y0=be/2-Jt/2,Ot.y1=be/2+Jt/2;else{var Cr=0,Ge=t.mean(Ot.sourceLinks,w),Qe=t.mean(Ot.targetLinks,g);Ge&&Qe?Cr=(Ge+Qe)/2:Cr=Ge||Qe;var nt=(Cr-m(Ot))*st;Ot.y0+=nt,Ot.y1+=nt}})})}function Ve(){Oe.forEach(function(st){var _t,Wt,Ht=oe,fr=st.length,lr;for(st.sort(d),lr=0;lr0&&(_t.y0+=Wt,_t.y1+=Wt),Ht=_t.y1+ee;if(Wt=Ht-ee-be,Wt>0)for(Ht=_t.y0-=Wt,_t.y1-=Wt,lr=fr-2;lr>=0;--lr)_t=st[lr],Wt=_t.y1+ee-Ht,Wt>0&&(_t.y0-=Wt,_t.y1-=Wt),Ht=_t.y0})}}function St(Ke){Ke.nodes.forEach(function(bt){bt.sourceLinks.sort(p),bt.targetLinks.sort(h)}),Ke.nodes.forEach(function(bt){var pt=bt.y0,Oe=pt,Ue=bt.y1,je=Ue;bt.sourceLinks.forEach(function($e){$e.circular?($e.y0=Ue-$e.width/2,Ue=Ue-$e.width):($e.y0=pt+$e.width/2,pt+=$e.width)}),bt.targetLinks.forEach(function($e){$e.circular?($e.y1=je-$e.width/2,je=je-$e.width):($e.y1=Oe+$e.width/2,Oe+=$e.width)})})}return me}function C(ce,oe,Se){var be=0;if(Se===null){for(var fe=[],ee=0;eeoe.source.column)}function P(ce,oe){var Se=0;ce.sourceLinks.forEach(function(fe){Se=fe.circular&&!Ee(fe,oe)?Se+1:Se});var be=0;return ce.targetLinks.forEach(function(fe){be=fe.circular&&!Ee(fe,oe)?be+1:be}),Se+be}function R(ce){var oe=ce.source.sourceLinks,Se=0;oe.forEach(function(ee){Se=ee.circular?Se+1:Se});var be=ce.target.targetLinks,fe=0;return be.forEach(function(ee){fe=ee.circular?fe+1:fe}),!(Se>1||fe>1)}function L(ce,oe,Se){return ce.sort(O),ce.forEach(function(be,fe){var ee=0;if(Ee(be,Se)&&R(be))be.circularPathData.verticalBuffer=ee+be.width/2;else{var ae=0;for(ae;aeee?_e:ee}be.circularPathData.verticalBuffer=ee+be.width/2}}),ce}function I(ce,oe,Se,be){var fe=5,ee=t.min(ce.links,function(re){return re.source.y0});ce.links.forEach(function(re){re.circular&&(re.circularPathData={})});var ae=ce.links.filter(function(re){return re.circularLinkType=="top"});L(ae,oe,be);var _e=ce.links.filter(function(re){return re.circularLinkType=="bottom"});L(_e,oe,be),ce.links.forEach(function(re){if(re.circular){if(re.circularPathData.arcRadius=re.width+y,re.circularPathData.leftNodeBuffer=fe,re.circularPathData.rightNodeBuffer=fe,re.circularPathData.sourceWidth=re.source.x1-re.source.x0,re.circularPathData.sourceX=re.source.x0+re.circularPathData.sourceWidth,re.circularPathData.targetX=re.target.x0,re.circularPathData.sourceY=re.y0,re.circularPathData.targetY=re.y1,Ee(re,be)&&R(re))re.circularPathData.leftSmallArcRadius=y+re.width/2,re.circularPathData.leftLargeArcRadius=y+re.width/2,re.circularPathData.rightSmallArcRadius=y+re.width/2,re.circularPathData.rightLargeArcRadius=y+re.width/2,re.circularLinkType=="bottom"?(re.circularPathData.verticalFullExtent=re.source.y1+T+re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.rightLargeArcRadius):(re.circularPathData.verticalFullExtent=re.source.y0-T-re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.rightLargeArcRadius);else{var pe=re.source.column,Te=re.circularLinkType,Ce=ce.links.filter(function(me){return me.source.column==pe&&me.circularLinkType==Te});re.circularLinkType=="bottom"?Ce.sort(X):Ce.sort($);var ze=0;Ce.forEach(function(me,Le){me.circularLinkID==re.circularLinkID&&(re.circularPathData.leftSmallArcRadius=y+re.width/2+ze,re.circularPathData.leftLargeArcRadius=y+re.width/2+Le*oe+ze),ze=ze+me.width}),pe=re.target.column,Ce=ce.links.filter(function(me){return me.target.column==pe&&me.circularLinkType==Te}),re.circularLinkType=="bottom"?Ce.sort(G):Ce.sort(K),ze=0,Ce.forEach(function(me,Le){me.circularLinkID==re.circularLinkID&&(re.circularPathData.rightSmallArcRadius=y+re.width/2+ze,re.circularPathData.rightLargeArcRadius=y+re.width/2+Le*oe+ze),ze=ze+me.width}),re.circularLinkType=="bottom"?(re.circularPathData.verticalFullExtent=Math.max(Se,re.source.y1,re.target.y1)+T+re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.rightLargeArcRadius):(re.circularPathData.verticalFullExtent=ee-T-re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.rightLargeArcRadius)}re.circularPathData.leftInnerExtent=re.circularPathData.sourceX+re.circularPathData.leftNodeBuffer,re.circularPathData.rightInnerExtent=re.circularPathData.targetX-re.circularPathData.rightNodeBuffer,re.circularPathData.leftFullExtent=re.circularPathData.sourceX+re.circularPathData.leftLargeArcRadius+re.circularPathData.leftNodeBuffer,re.circularPathData.rightFullExtent=re.circularPathData.targetX-re.circularPathData.rightLargeArcRadius-re.circularPathData.rightNodeBuffer}if(re.circular)re.path=B(re);else{var we=i.linkHorizontal().source(function(me){var Le=me.source.x0+(me.source.x1-me.source.x0),Ne=me.y0;return[Le,Ne]}).target(function(me){var Le=me.target.x0,Ne=me.y1;return[Le,Ne]});re.path=we(re)}})}function B(ce){var oe="";return ce.circularLinkType=="top"?oe="M"+ce.circularPathData.sourceX+" "+ce.circularPathData.sourceY+" L"+ce.circularPathData.leftInnerExtent+" "+ce.circularPathData.sourceY+" A"+ce.circularPathData.leftLargeArcRadius+" "+ce.circularPathData.leftSmallArcRadius+" 0 0 0 "+ce.circularPathData.leftFullExtent+" "+(ce.circularPathData.sourceY-ce.circularPathData.leftSmallArcRadius)+" L"+ce.circularPathData.leftFullExtent+" "+ce.circularPathData.verticalLeftInnerExtent+" A"+ce.circularPathData.leftLargeArcRadius+" "+ce.circularPathData.leftLargeArcRadius+" 0 0 0 "+ce.circularPathData.leftInnerExtent+" "+ce.circularPathData.verticalFullExtent+" L"+ce.circularPathData.rightInnerExtent+" "+ce.circularPathData.verticalFullExtent+" A"+ce.circularPathData.rightLargeArcRadius+" "+ce.circularPathData.rightLargeArcRadius+" 0 0 0 "+ce.circularPathData.rightFullExtent+" "+ce.circularPathData.verticalRightInnerExtent+" L"+ce.circularPathData.rightFullExtent+" "+(ce.circularPathData.targetY-ce.circularPathData.rightSmallArcRadius)+" A"+ce.circularPathData.rightLargeArcRadius+" "+ce.circularPathData.rightSmallArcRadius+" 0 0 0 "+ce.circularPathData.rightInnerExtent+" "+ce.circularPathData.targetY+" L"+ce.circularPathData.targetX+" "+ce.circularPathData.targetY:oe="M"+ce.circularPathData.sourceX+" "+ce.circularPathData.sourceY+" L"+ce.circularPathData.leftInnerExtent+" "+ce.circularPathData.sourceY+" A"+ce.circularPathData.leftLargeArcRadius+" "+ce.circularPathData.leftSmallArcRadius+" 0 0 1 "+ce.circularPathData.leftFullExtent+" "+(ce.circularPathData.sourceY+ce.circularPathData.leftSmallArcRadius)+" L"+ce.circularPathData.leftFullExtent+" "+ce.circularPathData.verticalLeftInnerExtent+" A"+ce.circularPathData.leftLargeArcRadius+" "+ce.circularPathData.leftLargeArcRadius+" 0 0 1 "+ce.circularPathData.leftInnerExtent+" "+ce.circularPathData.verticalFullExtent+" L"+ce.circularPathData.rightInnerExtent+" "+ce.circularPathData.verticalFullExtent+" A"+ce.circularPathData.rightLargeArcRadius+" "+ce.circularPathData.rightLargeArcRadius+" 0 0 1 "+ce.circularPathData.rightFullExtent+" "+ce.circularPathData.verticalRightInnerExtent+" L"+ce.circularPathData.rightFullExtent+" "+(ce.circularPathData.targetY+ce.circularPathData.rightSmallArcRadius)+" A"+ce.circularPathData.rightLargeArcRadius+" "+ce.circularPathData.rightSmallArcRadius+" 0 0 1 "+ce.circularPathData.rightInnerExtent+" "+ce.circularPathData.targetY+" L"+ce.circularPathData.targetX+" "+ce.circularPathData.targetY,oe}function O(ce,oe){return q(ce)==q(oe)?ce.circularLinkType=="bottom"?X(ce,oe):$(ce,oe):q(oe)-q(ce)}function $(ce,oe){return ce.y0-oe.y0}function X(ce,oe){return oe.y0-ce.y0}function K(ce,oe){return ce.y1-oe.y1}function G(ce,oe){return oe.y1-ce.y1}function q(ce){return ce.target.column-ce.source.column}function J(ce){return ce.target.x0-ce.source.x1}function N(ce,oe){var Se=D(ce),be=J(oe)/Math.tan(Se),fe=ge(ce)=="up"?ce.y1+be:ce.y1-be;return fe}function V(ce,oe){var Se=D(ce),be=J(oe)/Math.tan(Se),fe=ge(ce)=="up"?ce.y1-be:ce.y1+be;return fe}function Y(ce,oe,Se,be){ce.links.forEach(function(fe){if(!fe.circular&&fe.target.column-fe.source.column>1){var ee=fe.source.column+1,ae=fe.target.column-1,_e=1,re=ae-ee+1;for(_e=1;ee<=ae;ee++,_e++)ce.nodes.forEach(function(pe){if(pe.column==ee){var Te=_e/(re+1),Ce=Math.pow(1-Te,3),ze=3*Te*Math.pow(1-Te,2),we=3*Math.pow(Te,2)*(1-Te),me=Math.pow(Te,3),Le=Ce*fe.y0+ze*fe.y0+we*fe.y1+me*fe.y1,Ne=Le-fe.width/2,Je=Le+fe.width/2,rt;Ne>pe.y0&&Nepe.y0&&Jepe.y1&&j(mt,rt,oe,Se)})):Nepe.y1&&(rt=Je-pe.y0+10,pe=j(pe,rt,oe,Se),ce.nodes.forEach(function(mt){A(mt,be)==A(pe,be)||mt.column!=pe.column||mt.y0pe.y1&&j(mt,rt,oe,Se)}))}})}})}function H(ce,oe){return ce.y0>oe.y0&&ce.y0oe.y0&&ce.y1oe.y1}function j(ce,oe,Se,be){return ce.y0+oe>=Se&&ce.y1+oe<=be&&(ce.y0=ce.y0+oe,ce.y1=ce.y1+oe,ce.targetLinks.forEach(function(fe){fe.y1=fe.y1+oe}),ce.sourceLinks.forEach(function(fe){fe.y0=fe.y0+oe})),ce}function Q(ce,oe,Se,be){ce.nodes.forEach(function(fe){be&&fe.y+(fe.y1-fe.y0)>oe&&(fe.y=fe.y-(fe.y+(fe.y1-fe.y0)-oe));var ee=ce.links.filter(function(re){return A(re.source,Se)==A(fe,Se)}),ae=ee.length;ae>1&&ee.sort(function(re,pe){if(!re.circular&&!pe.circular){if(re.target.column==pe.target.column)return re.y1-pe.y1;if(ue(re,pe)){if(re.target.column>pe.target.column){var Te=V(pe,re);return re.y1-Te}if(pe.target.column>re.target.column){var Ce=V(re,pe);return Ce-pe.y1}}else return re.y1-pe.y1}if(re.circular&&!pe.circular)return re.circularLinkType=="top"?-1:1;if(pe.circular&&!re.circular)return pe.circularLinkType=="top"?1:-1;if(re.circular&&pe.circular)return re.circularLinkType===pe.circularLinkType&&re.circularLinkType=="top"?re.target.column===pe.target.column?re.target.y1-pe.target.y1:pe.target.column-re.target.column:re.circularLinkType===pe.circularLinkType&&re.circularLinkType=="bottom"?re.target.column===pe.target.column?pe.target.y1-re.target.y1:re.target.column-pe.target.column:re.circularLinkType=="top"?-1:1});var _e=fe.y0;ee.forEach(function(re){re.y0=_e+re.width/2,_e=_e+re.width}),ee.forEach(function(re,pe){if(re.circularLinkType=="bottom"){var Te=pe+1,Ce=0;for(Te;Te1&&fe.sort(function(_e,re){if(!_e.circular&&!re.circular){if(_e.source.column==re.source.column)return _e.y0-re.y0;if(ue(_e,re)){if(re.source.column<_e.source.column){var pe=N(re,_e);return _e.y0-pe}if(_e.source.column0?"up":"down"}function Ee(ce,oe){return A(ce.source,oe)==A(ce.target,oe)}function xe(ce,oe,Se){var be=ce.nodes,fe=ce.links,ee=!1,ae=!1;if(fe.forEach(function(ze){ze.circularLinkType=="top"?ee=!0:ze.circularLinkType=="bottom"&&(ae=!0)}),ee==!1||ae==!1){var _e=t.min(be,function(ze){return ze.y0}),re=t.max(be,function(ze){return ze.y1}),pe=re-_e,Te=Se-oe,Ce=Te/pe;be.forEach(function(ze){var we=(ze.y1-ze.y0)*Ce;ze.y0=(ze.y0-_e)*Ce,ze.y1=ze.y0+we}),fe.forEach(function(ze){ze.y0=(ze.y0-_e)*Ce,ze.y1=(ze.y1-_e)*Ce,ze.width=ze.width*Ce})}}e.sankeyCircular=S,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var ise={};Jn(ise,{cn:()=>j8r,duration:()=>G8r,ease:()=>H8r,forceIterations:()=>U8r,forceTicksPerFrame:()=>V8r,nodePadAcross:()=>O8r,nodeTextOffsetHorizontal:()=>B8r,nodeTextOffsetVertical:()=>q8r,sankeyIterations:()=>N8r});var B8r,q8r,O8r,N8r,U8r,V8r,G8r,H8r,j8r,nse=Ci(()=>{"use strict";B8r=4,q8r=3,O8r=10,N8r=50,U8r=5,V8r=10,G8r=500,H8r="linear",j8r={sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}});var Jct=W((Tui,Kct)=>{"use strict";var Oct=Mct(),$8r=(S_(),Pt(M_)).interpolateNumber,d6=gi(),o8=Lct(),W8r=qct(),Bo=(nse(),Pt(ise)),pg=ti(),Y8r=Qi(),vg=tt(),C3=vg.strTranslate,Nct=vg.strRotate,sse=eg(),s8=sse.keyFun,PO=sse.repeat,$ct=sse.unwrap,Uct=ao(),X8r=xi(),Wct=(Jl(),Pt(Kl)),Z8r=Wct.CAP_SHIFT,K8r=Wct.LINE_SPACING,J8r=3;function Q8r(e,t,r){var i=$ct(t),n=i.trace,a=n.domain,o=n.orientation==="h",s=n.direction==="reversed",l=n.node.pad,u=n.node.thickness,c={justify:o8.sankeyJustify,left:o8.sankeyLeft,right:o8.sankeyRight,center:o8.sankeyCenter}[n.node.align],f=e.width*(a.x[1]-a.x[0]),h=e.height*(a.y[1]-a.y[0]),p=i._nodes,d=i._links,v=i.circular,m;v?m=W8r.sankeyCircular().circularLinkGap(0):m=o8.sankey(),m.iterations(Bo.sankeyIterations).size(o?[f,h]:[h,f]).nodeWidth(u).nodePadding(l).nodeId(function(L){return L.pointNumber}).nodeAlign(c).nodes(p).links(d);function g(L){n[L].sort==="input"&&(v?vg.warn(`Circular Sankey diagrams do not support the "input" ${L}.sort mode; falling back to the default sort.`):m[`${L}Sort`](null))}g("link"),g("node");var w=m();m.nodePadding()=$||(O=$-B.y0,O>1e-6&&(B.y0+=O,B.y1+=O)),$=B.y1+l})}function C(L){var I=L.map(function(q,J){return{x0:q.x0,index:J}}).sort(function(q,J){return q.x0-J.x0}),B=[],O=-1,$,X=-1/0,K;for(_=0;_X+u&&(O+=1,$=G.x0),X=G.x0,B[O]||(B[O]=[]),B[O].push(G),K=$-G.x0,G.x0+=K,G.x1+=K}return B}if(n.node.x.length&&n.node.y.length){for(_=0;_0?" L "+n.targetX+" "+n.targetY:"")+"Z"):(r="M "+(n.targetX-t)+" "+(n.targetY-i)+" L "+(n.rightInnerExtent-t)+" "+(n.targetY-i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightSmallArcRadius+i)+" 0 0 0 "+(n.rightFullExtent-i-t)+" "+(n.targetY+n.rightSmallArcRadius)+" L "+(n.rightFullExtent-i-t)+" "+n.verticalRightInnerExtent,a&&o?r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightInnerExtent-i-t)+" "+(n.verticalFullExtent+i)+" L "+(n.rightFullExtent+i-t-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent+i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent:a?r+=" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightFullExtent-t-i-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" L "+(n.leftFullExtent+i+(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent:r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent+i)+" L "+n.leftInnerExtent+" "+(n.verticalFullExtent+i)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent,r+=" L "+(n.leftFullExtent+i)+" "+(n.sourceY+n.leftSmallArcRadius)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-i)+" L "+n.sourceX+" "+(n.sourceY-i)+" L "+n.sourceX+" "+(n.sourceY+i)+" L "+n.leftInnerExtent+" "+(n.sourceY+i)+" A "+(n.leftLargeArcRadius-i)+" "+(n.leftSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent-i)+" "+(n.sourceY+n.leftSmallArcRadius)+" L "+(n.leftFullExtent-i)+" "+n.verticalLeftInnerExtent,a&&o?r+=" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent-i-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" L "+(n.rightFullExtent+i-t+(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:a?r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+(n.verticalFullExtent+i)+" L "+(n.rightFullExtent-t-i)+" "+(n.verticalFullExtent+i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:r+=" A "+(n.leftLargeArcRadius-i)+" "+(n.leftLargeArcRadius-i)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-i)+" L "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightLargeArcRadius-i)+" 0 0 1 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent,r+=" L "+(n.rightFullExtent+i-t)+" "+(n.targetY+n.rightSmallArcRadius)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.targetY+i)+" L "+(n.targetX-t)+" "+(n.targetY+i)+(t>0?" L "+n.targetX+" "+n.targetY:"")+"Z"),r}function lse(){var e=.5;function t(r){var i=r.linkArrowLength;if(r.link.circular)return tDr(r.link,i);var n=Math.abs((r.link.target.x0-r.link.source.x1)/2);i>n&&(i=n);var a=r.link.source.x1,o=r.link.target.x0-i,s=$8r(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,p=r.link.y1+r.link.width/2,d="M"+a+","+c,v="C"+l+","+c+" "+u+","+h+" "+o+","+h,m="C"+u+","+p+" "+l+","+f+" "+a+","+f,g=i>0?"L"+(o+i)+","+(h+r.link.width/2):"";return g+="L"+o+","+p,d+v+g+m+"Z"}return t}function rDr(e,t){var r=Bo.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var n=t.dx,a=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=vg.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(n),visibleHeight:a,zoneX:-r,zoneY:-i,zoneWidth:n+2*r,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:pg.rgb(t.color),alpha:pg.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function ose(e){e.attr("transform",function(t){return C3(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function iDr(e){e.call(ose)}function Yct(e,t){e.call(iDr),t.attr("d",lse())}function Vct(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function ase(e){return e.link.width>1||e.linkLineWidth>0}function Gct(e){return e.horizontal?e.reversed?C3(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":C3(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?C3(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":C3(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function Hct(e,t,r){e.on(".basic",null).on("mouseover.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.hover(this,i,t),i.interactionState.hovered=[this,i])}).on("mousemove.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.follow(this,i),i.interactionState.hovered=[this,i])}).on("mouseout.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.unhover(this,i,t),i.interactionState.hovered=!1)}).on("click.basic",function(i){i.interactionState.hovered&&(r.unhover(this,i,t),i.interactionState.hovered=!1),!i.interactionState.dragInProgress&&!i.partOfGroup&&r.select(this,i,t)})}function nDr(e,t,r,i){var n=d6.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on("dragstart",function(a){if(a.arrangement!=="fixed"&&(vg.ensureSingle(i._fullLayout._infolayer,"g","dragcover",function(s){i._fullLayout._dragCover=s}),vg.raiseToTop(this),a.interactionState.dragInProgress=a.node,jct(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement==="snap")){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):aDr(e,o,a,i),oDr(e,t,a,o,i)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=d6.event.x,s=d6.event.y;a.arrangement==="snap"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement==="freeform"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),jct(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),Yct(e.filter(Zct(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,Xct(r,n)}})}function sDr(e,t,r,i){return function(){for(var a=0,o=0;o0&&i.forceLayouts[t].alpha(0)}}function Xct(e,t){let r=[...e.trace.node.x],i=[...e.trace.node.y];for(let n of e.graph.nodes)n.partOfGroup||(r[n.pointNumber]=(n.x0+n.x1)/2/e.figure.width,i[n.pointNumber]=(n.y0+n.y1)/2/e.figure.height);X8r.call("_guiRestyle",t,{"node.x":[r],"node.y":[i]},e.trace.index).then(function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()})}function lDr(e){var t=[],r;for(r=0;rase(m)?pg.rgb(m.linkLineColor):m.rgb).style("stroke-opacity",m=>ase(m)?pg.opacity(m.linkLineColor):m.alpha).style("fill",m=>m.rgb).style("fill-opacity",m=>m.alpha).style("stroke-width",m=>ase(m)?m.linkLineWidth:1).attr("d",lse()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(Bo.ease).duration(Bo.duration).style("opacity",1),f.exit().transition().ease(Bo.ease).duration(Bo.duration).style("opacity",0).remove();var h=u.selectAll("."+Bo.cn.sankeyNodeSet).data(PO,s8);h.enter().append("g").classed(Bo.cn.sankeyNodeSet,!0),h.style("cursor",function(m){switch(m.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var p=h.selectAll("."+Bo.cn.sankeyNode).data(function(m){var g=m.graph.nodes;return lDr(g),g.map(rDr.bind(null,m))},s8);p.enter().append("g").classed(Bo.cn.sankeyNode,!0).call(ose).style("opacity",function(m){return(e._context.staticPlot||o)&&!m.partOfGroup?1:0}),p.call(Hct,u,n.nodeEvents).call(nDr,f,n,e),p.transition().ease(Bo.ease).duration(Bo.duration).call(ose).style("opacity",function(m){return m.partOfGroup?0:1}),p.exit().transition().ease(Bo.ease).duration(Bo.duration).style("opacity",0).remove();var d=p.selectAll("."+Bo.cn.nodeRect).data(PO);d.enter().append("rect").classed(Bo.cn.nodeRect,!0).call(Vct),d.style("stroke-width",function(m){return m.nodeLineWidth}).style("stroke",function(m){return pg.rgb(m.nodeLineColor)}).style("stroke-opacity",function(m){return pg.opacity(m.nodeLineColor)}).style("fill",m=>m.rgb).style("fill-opacity",m=>m.alpha),d.transition().ease(Bo.ease).duration(Bo.duration).call(Vct);var v=p.selectAll("."+Bo.cn.nodeLabel).data(PO);v.enter().append("text").classed(Bo.cn.nodeLabel,!0).style("cursor","default"),v.attr("data-notex",1).text(function(m){return m.node.label}).each(function(m){var g=d6.select(this);Y8r.font(g,m.textFont),Uct.convertToTspans(g,e)}).attr("text-anchor",function(m){return m.horizontal&&m.left!==m.reversed?"end":"start"}).attr("transform",function(m){var g=d6.select(this),w=Uct.lineCount(g),_=m.textFont.size*((w-1)*K8r-Z8r),b=m.nodeLineWidth/2+J8r;if(!m.horizontal){var A=m.reversed?(m.visibleWidth+_)/2:(m.visibleWidth-_)/2,M=m.reversed?Nct(90):"scale(-1,1)"+Nct(90);return C3(A,b)+M}var x=b,A=(m.visibleHeight-_)/2;return m.left?x=-x:x+=m.visibleWidth,C3(x,A)+(m.reversed?"scale(-1,1)":"")}),v.transition().ease(Bo.ease).duration(Bo.duration)}});var fse=W((Aui,sft)=>{"use strict";var jf=gi(),cse=tt(),IO=cse.numberFormat,fDr=Jct(),p6=Is(),hDr=ti(),wx=(nse(),Pt(ise)).cn,l8=cse._;function Qct(e){return e!==""}function v6(e,t){return e.filter(function(r){return r.key===t.traceId})}function eft(e,t){jf.select(e).select("path").style("fill-opacity",t),jf.select(e).select("rect").style("fill-opacity",t)}function tft(e){jf.select(e).select("text.name").style("fill","black")}function rft(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function ift(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function nft(e,t,r){t&&r&&v6(r,t).selectAll("."+wx.sankeyLink).filter(rft(t)).call(aft.bind(0,t,r,!1))}function use(e,t,r){t&&r&&v6(r,t).selectAll("."+wx.sankeyLink).filter(rft(t)).call(oft.bind(0,t,r,!1))}function aft(e,t,r,i){i.style("fill",function(n){if(!n.link.concentrationscale)return n.hoverRgb}).style("fill-opacity",function(n){if(!n.link.concentrationscale)return n.hoverAlpha}),i.each(function(n){var a=n.link.label;a!==""&&v6(t,e).selectAll("."+wx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&v6(t,e).selectAll("."+wx.sankeyNode).filter(ift(e)).call(nft)}function oft(e,t,r,i){i.style("fill",function(n){return n.rgb}).style("fill-opacity",function(n){return n.alpha}),i.each(function(n){var a=n.link.label;a!==""&&v6(t,e).selectAll("."+wx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&v6(t,e).selectAll(wx.sankeyNode).filter(ift(e)).call(use)}function Qs(e,t){var r=e.hoverlabel||{},i=cse.nestedProperty(r,t).get();return Array.isArray(i)?!1:i}sft.exports=function(t,r){for(var i=t._fullLayout,n=i._paper,a=i._size,o=0;o"),color:Qs(A,"bgcolor")||hDr.addOpacity(C.color,1),borderColor:Qs(A,"bordercolor"),fontFamily:Qs(A,"font.family"),fontSize:Qs(A,"font.size"),fontColor:Qs(A,"font.color"),fontWeight:Qs(A,"font.weight"),fontStyle:Qs(A,"font.style"),fontVariant:Qs(A,"font.variant"),fontTextcase:Qs(A,"font.textcase"),fontLineposition:Qs(A,"font.lineposition"),fontShadow:Qs(A,"font.shadow"),nameLength:Qs(A,"namelength"),textAlign:Qs(A,"align"),idealAlign:jf.event.x"),color:Qs(A,"bgcolor")||x.rgb,borderColor:Qs(A,"bordercolor"),fontFamily:Qs(A,"font.family"),fontSize:Qs(A,"font.size"),fontColor:Qs(A,"font.color"),fontWeight:Qs(A,"font.weight"),fontStyle:Qs(A,"font.style"),fontVariant:Qs(A,"font.variant"),fontTextcase:Qs(A,"font.textcase"),fontLineposition:Qs(A,"font.lineposition"),fontShadow:Qs(A,"font.shadow"),nameLength:Qs(A,"namelength"),textAlign:Qs(A,"align"),idealAlign:"left",hovertemplate:A.hovertemplate,hovertemplateLabels:D,eventData:[x.node]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t});eft(R,.85),tft(R)}}},b=function(M,x,A){t._fullLayout.hovermode!==!1&&(jf.select(M).call(use,x,A),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:jf.event,points:[x.node]})),p6.loneUnhover(i._hoverlayer.node()))};fDr(t,n,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:v,unhover:m,select:l},nodeEvents:{hover:w,follow:_,unhover:b,select:g}})}});var lft=W(D3=>{"use strict";var dDr=hs().overrideAll,pDr=Mc().getModuleCalcData,vDr=fse(),gDr=yy(),mDr=Xp(),yDr=Ef(),xDr=xu().prepSelect,hse=tt(),bDr=xi(),RO="sankey";D3.name=RO;D3.baseLayoutAttrOverrides=dDr({hoverlabel:gDr.hoverlabel},"plot","nested");D3.plot=function(e){var t=pDr(e.calcdata,RO)[0];vDr(e,t),D3.updateFx(e)};D3.clean=function(e,t,r,i){var n=i._has&&i._has(RO),a=t._has&&t._has(RO);n&&!a&&(i._paperdiv.selectAll(".sankey").remove(),i._paperdiv.selectAll(".bgsankey").remove())};D3.updateFx=function(e){for(var t=0;t{"use strict";uft.exports=function(t,r){for(var i=t.cd,n=[],a=i[0].trace,o=a._sankey,s=o.graph.nodes,l=a.orientation==="v",u=a.direction==="reversed",c=0;c{"use strict";fft.exports={attributes:Qoe(),supplyDefaults:fct(),calc:gct(),plot:fse(),moduleType:"trace",name:"sankey",basePlotModule:lft(),selectPoints:cft(),categories:["noOpacity"],meta:{}}});var pft=W((kui,dft)=>{"use strict";dft.exports=hft()});var gft=W(g6=>{"use strict";var vft=Qo();g6.name="indicator";g6.plot=function(e,t,r,i){vft.plotBasePlot(g6.name,e,t,r,i)};g6.clean=function(e,t,r,i){vft.cleanBasePlot(g6.name,e,t,r,i)}});var pse=W((Dui,wft)=>{"use strict";var Tx=an().extendFlat,yft=an().extendDeep,wDr=hs().overrideAll,xft=jo(),bft=Yl(),TDr=ds().attributes,fl=ac(),ADr=Ra().templatedArray,zO=(G5(),Pt(V5)),mft=Ts().descriptionOnlyNumbers,dse=xft({editType:"plot",colorEditType:"plot"}),u8={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:bft.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},_ft={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},MDr=ADr("step",yft({},u8,{range:_ft}));wft.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:TDr({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Tx({},dse,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:mft("value")},font:Tx({},dse,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:mft("value")},increasing:{symbol:{valType:"string",dflt:zO.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:zO.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:zO.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:zO.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Tx({},dse,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:yft({},u8,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:bft.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:wDr({range:_ft,visible:Tx({},fl.visible,{dflt:!0}),tickmode:fl.minor.tickmode,nticks:fl.nticks,tick0:fl.tick0,dtick:fl.dtick,tickvals:fl.tickvals,ticktext:fl.ticktext,ticks:Tx({},fl.ticks,{dflt:"outside"}),ticklen:fl.ticklen,tickwidth:fl.tickwidth,tickcolor:fl.tickcolor,ticklabelstep:fl.ticklabelstep,showticklabels:fl.showticklabels,labelalias:fl.labelalias,tickfont:xft({}),tickangle:fl.tickangle,tickformat:fl.tickformat,tickformatstops:fl.tickformatstops,tickprefix:fl.tickprefix,showtickprefix:fl.showtickprefix,ticksuffix:fl.ticksuffix,showticksuffix:fl.showticksuffix,separatethousands:fl.separatethousands,exponentformat:fl.exponentformat,minexponent:fl.minexponent,showexponent:fl.showexponent,editType:"plot"},"plot"),steps:MDr,threshold:{line:{color:Tx({},u8.line.color,{}),width:Tx({},u8.line.width,{dflt:1}),editType:"plot"},thickness:Tx({},u8.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var vse={};Jn(vse,{bulletNumberDomainSize:()=>EDr,bulletPadding:()=>kDr,defaultNumberFontSize:()=>SDr,horizontalPadding:()=>LDr,innerRadius:()=>CDr,titlePadding:()=>FDr,valueThickness:()=>DDr});var SDr,EDr,kDr,CDr,DDr,FDr,LDr,gse=Ci(()=>{"use strict";SDr=80,EDr=.25,kDr=.025,CDr=.75,DDr=.5,FDr=5,LDr=10});var Mft=W((Fui,Aft)=>{"use strict";var gg=tt(),qO=pse(),PDr=ds().defaults,Tft=Ra(),IDr=tf(),BO=(gse(),Pt(vse)),RDr=ub(),zDr=Cw(),BDr=Py(),qDr=Iy();function ODr(e,t,r,i){function n(x,A){return gg.coerce(e,t,qO,x,A)}PDr(t,i,n),n("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=n("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){n("number.valueformat");var l=gg.extendFlat({},i.font);l.size=void 0,gg.coerceFont(n,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=BO.defaultNumberFontSize,o[0]=!0),n("number.prefix"),n("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=gg.extendFlat({},i.font);c.size=void 0,gg.coerceFont(n,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||BO.defaultNumberFontSize),o[1]=!0),n("delta.reference",t.value),n("delta.relative"),n("delta.valueformat",t.delta.relative?"2%":""),n("delta.increasing.symbol"),n("delta.increasing.color"),n("delta.decreasing.symbol"),n("delta.decreasing.color"),n("delta.position"),n("delta.prefix"),n("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=gg.extendFlat({},i.font);f.size=.25*(s||u||BO.defaultNumberFontSize),gg.coerceFont(n,"title.font",f),n("title.text");var h,p,d,v;function m(x,A){return gg.coerce(h,p,qO.gauge,x,A)}function g(x,A){return gg.coerce(d,v,qO.gauge.axis,x,A)}if(t._hasGauge){h=e.gauge,h||(h={}),p=Tft.newContainer(t,"gauge"),m("shape");var w=t._isBullet=t.gauge.shape==="bullet";w||n("title.align","center");var _=t._isAngular=t.gauge.shape==="angular";_||n("align","center"),m("bgcolor",i.paper_bgcolor),m("borderwidth"),m("bordercolor"),m("bar.color"),m("bar.line.color"),m("bar.line.width");var b=BO.valueThickness*(t.gauge.shape==="bullet"?.5:1);m("bar.thickness",b),IDr(h,p,{name:"steps",handleItemDefaults:NDr}),m("threshold.value"),m("threshold.thickness"),m("threshold.line.width"),m("threshold.line.color"),d={},h&&(d=h.axis||{}),v=Tft.newContainer(p,"axis"),g("visible"),t._range=g("range",t._range);var M={font:i.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};RDr(d,v,g,"linear"),qDr(d,v,g,"linear",M),BDr(d,v,g,"linear",M),zDr(d,v,g,M)}else n("title.align","center"),n("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function NDr(e,t){function r(i,n){return gg.coerce(e,t,qO.gauge.steps,i,n)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}Aft.exports={supplyDefaults:ODr}});var Eft=W((Lui,Sft)=>{"use strict";function UDr(e,t){var r=[],i=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var n=t._lastValue,a=n;return t._hasDelta&&typeof t.delta.reference=="number"&&(a=t.delta.reference),r[0]={y:i,lastY:n,delta:i-a,relativeDelta:(i-a)/a},r}Sft.exports={calc:UDr}});var Pft=W((Pui,Lft)=>{"use strict";var R3=gi(),VDr=(S_(),Pt(M_)).interpolate,kft=(S_(),Pt(M_)).interpolateNumber,Ax=tt(),GDr=Ax.strScale,f8=Ax.strTranslate,HDr=Ax.rad2deg,jDr=(Jl(),Pt(Kl)).MID_SHIFT,I3=Qi(),F3=(gse(),Pt(vse)),NO=ao(),jc=Yi(),$Dr=PM(),WDr=aL(),YDr=ac(),m6=ti(),mse={left:"start",center:"middle",right:"end"},L3={left:0,center:.5,right:1},Cft=/[yzafpnµmkMGTPEZY]/;function h8(e){return e&&e.duration>0}Lft.exports=function(t,r,i,n){var a=t._fullLayout,o;h8(i)&&n&&(o=n()),Ax.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=R3.select(this),f=u._hasGauge,h=u._isAngular,p=u._isBullet,d=u.domain,v={w:a._size.w*(d.x[1]-d.x[0]),h:a._size.h*(d.y[1]-d.y[0]),l:a._size.l+a._size.w*d.x[0],r:a._size.r+a._size.w*(1-d.x[1]),t:a._size.t+a._size.h*(1-d.y[1]),b:a._size.b+a._size.h*d.y[0]},m=v.l+v.w/2,g=v.t+v.h/2,w=Math.min(v.w/2,v.h),_=F3.innerRadius*w,b,M,x,A=u.align||"center";if(M=g,!f)b=v.l+L3[A]*v.w,x=function(R){return Dft(R,v.w,v.h)};else if(h&&(b=m,M=g+w/2,x=function(R){return QDr(R,.9*_)}),p){var T=F3.bulletPadding,y=1-F3.bulletNumberDomainSize+T;b=v.l+(y+(1-y)*L3[A])*v.w,x=function(R){return Dft(R,(F3.bulletNumberDomainSize-T)*v.w,v.h)}}KDr(t,c,s,{numbersX:b,numbersY:M,numbersScaler:x,transitionOpts:i,onComplete:o});var E,S;f&&(E={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},S={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var C=c.selectAll("g.angular").data(h?s:[]);C.exit().remove();var k=c.selectAll("g.angularaxis").data(h?s:[]);k.exit().remove(),h&&ZDr(t,c,s,{radius:w,innerRadius:_,gauge:C,layer:k,size:v,gaugeBg:E,gaugeOutline:S,transitionOpts:i,onComplete:o});var D=c.selectAll("g.bullet").data(p?s:[]);D.exit().remove();var F=c.selectAll("g.bulletaxis").data(p?s:[]);F.exit().remove(),p&&XDr(t,c,s,{gauge:D,layer:F,size:v,gaugeBg:E,gaugeOutline:S,transitionOpts:i,onComplete:o});var P=c.selectAll("text.title").data(s);P.exit().remove(),P.enter().append("text").classed("title",!0),P.attr("text-anchor",function(){return p?mse.right:mse[u.title.align]}).text(u.title.text).call(I3.font,u.title.font).call(NO.convertToTspans,t),P.attr("transform",function(){var R=v.l+v.w*L3[u.title.align],L,I=F3.titlePadding,B=I3.bBox(P.node());if(f){if(h)if(u.gauge.axis.visible){var O=I3.bBox(k.node());L=O.top-I-B.bottom}else L=v.t+v.h/2-w/2-B.bottom-I;p&&(L=M-(B.top+B.bottom)/2,R=v.l-F3.bulletPadding*v.w)}else L=u._numbersTop-I-B.bottom;return f8(R,L)})})};function XDr(e,t,r,i){var n=r[0].trace,a=i.gauge,o=i.layer,s=i.gaugeBg,l=i.gaugeOutline,u=i.size,c=n.domain,f=i.transitionOpts,h=i.onComplete,p,d,v,m,g;a.enter().append("g").classed("bullet",!0),a.attr("transform",f8(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var w=u.h,_=n.gauge.bar.thickness*w,b=c.x[0],M=c.x[0]+(c.x[1]-c.x[0])*(n._hasNumber||n._hasDelta?1-F3.bulletNumberDomainSize:1);p=c8(e,n.gauge.axis),p._id="xbulletaxis",p.domain=[b,M],p.setScale(),d=jc.calcTicks(p),v=jc.makeTransTickFn(p),m=jc.getTickSigns(p)[2],g=u.t+u.h,p.visible&&(jc.drawTicks(e,p,{vals:p.ticks==="inside"?jc.clipEnds(p,d):d,layer:o,path:jc.makeTickPath(p,g,m),transFn:v}),jc.drawLabels(e,p,{vals:d,layer:o,transFn:v,labelFns:jc.makeLabelFns(p,g)}));function x(k){k.attr("width",function(D){return Math.max(0,p.c2p(D.range[1])-p.c2p(D.range[0]))}).attr("x",function(D){return p.c2p(D.range[0])}).attr("y",function(D){return .5*(1-D.thickness)*w}).attr("height",function(D){return D.thickness*w})}var A=[s].concat(n.gauge.steps),T=a.selectAll("g.bg-bullet").data(A);T.enter().append("g").classed("bg-bullet",!0).append("rect"),T.select("rect").call(x).call(P3),T.exit().remove();var y=a.selectAll("g.value-bullet").data([n.gauge.bar]);y.enter().append("g").classed("value-bullet",!0).append("rect"),y.select("rect").attr("height",_).attr("y",(w-_)/2).call(P3),h8(f)?y.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,p.c2p(Math.min(n.gauge.axis.range[1],r[0].y)))):y.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,p.c2p(Math.min(n.gauge.axis.range[1],r[0].y))):0),y.exit().remove();var E=r.filter(function(){return n.gauge.threshold.value||n.gauge.threshold.value===0}),S=a.selectAll("g.threshold-bullet").data(E);S.enter().append("g").classed("threshold-bullet",!0).append("line"),S.select("line").attr("x1",p.c2p(n.gauge.threshold.value)).attr("x2",p.c2p(n.gauge.threshold.value)).attr("y1",(1-n.gauge.threshold.thickness)/2*w).attr("y2",(1-(1-n.gauge.threshold.thickness)/2)*w).call(m6.stroke,n.gauge.threshold.line.color).style("stroke-width",n.gauge.threshold.line.width),S.exit().remove();var C=a.selectAll("g.gauge-outline").data([l]);C.enter().append("g").classed("gauge-outline",!0).append("rect"),C.select("rect").call(x).call(P3),C.exit().remove()}function ZDr(e,t,r,i){var n=r[0].trace,a=i.size,o=i.radius,s=i.innerRadius,l=i.gaugeBg,u=i.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=i.gauge,h=i.layer,p=i.transitionOpts,d=i.onComplete,v=Math.PI/2;function m($){var X=n.gauge.axis.range[0],K=n.gauge.axis.range[1],G=($-X)/(K-X)*Math.PI-v;return G<-v?-v:G>v?v:G}function g($){return R3.svg.arc().innerRadius((s+o)/2-$/2*(o-s)).outerRadius((s+o)/2+$/2*(o-s)).startAngle(-v)}function w($){$.attr("d",function(X){return g(X.thickness).startAngle(m(X.range[0])).endAngle(m(X.range[1]))()})}var _,b,M,x;f.enter().append("g").classed("angular",!0),f.attr("transform",f8(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),_=c8(e,n.gauge.axis),_.type="linear",_.range=n.gauge.axis.range,_._id="xangularaxis",_.ticklabeloverflow="allow",_.setScale();var A=function($){return(_.range[0]-$.x)/(_.range[1]-_.range[0])*Math.PI+Math.PI},T={},y=jc.makeLabelFns(_,0),E=y.labelStandoff;T.xFn=function($){var X=A($);return Math.cos(X)*E},T.yFn=function($){var X=A($),K=Math.sin(X)>0?.2:1;return-Math.sin(X)*(E+$.fontSize*K)+Math.abs(Math.cos(X))*($.fontSize*jDr)},T.anchorFn=function($){var X=A($),K=Math.cos(X);return Math.abs(K)<.1?"middle":K>0?"start":"end"},T.heightFn=function($,X,K){var G=A($);return-.5*(1+Math.sin(G))*K};var S=function($){return f8(c[0]+o*Math.cos($),c[1]-o*Math.sin($))};M=function($){return S(A($))};var C=function($){var X=A($);return S(X)+"rotate("+-HDr(X)+")"};if(b=jc.calcTicks(_),x=jc.getTickSigns(_)[2],_.visible){x=_.ticks==="inside"?-1:1;var k=(_.linewidth||1)/2;jc.drawTicks(e,_,{vals:b,layer:h,path:"M"+x*k+",0h"+x*_.ticklen,transFn:C}),jc.drawLabels(e,_,{vals:b,layer:h,transFn:M,labelFns:T})}var D=[l].concat(n.gauge.steps),F=f.selectAll("g.bg-arc").data(D);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(w).call(P3),F.exit().remove();var P=g(n.gauge.bar.thickness),R=f.selectAll("g.value-arc").data([n.gauge.bar]);R.enter().append("g").classed("value-arc",!0).append("path");var L=R.select("path");h8(p)?(L.transition().duration(p.duration).ease(p.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).attrTween("d",JDr(P,m(r[0].lastY),m(r[0].y))),n._lastValue=r[0].y):L.attr("d",typeof r[0].y=="number"?P.endAngle(m(r[0].y)):"M0,0Z"),L.call(P3),R.exit().remove(),D=[];var I=n.gauge.threshold.value;(I||I===0)&&D.push({range:[I,I],color:n.gauge.threshold.color,line:{color:n.gauge.threshold.line.color,width:n.gauge.threshold.line.width},thickness:n.gauge.threshold.thickness});var B=f.selectAll("g.threshold-arc").data(D);B.enter().append("g").classed("threshold-arc",!0).append("path"),B.select("path").call(w).call(P3),B.exit().remove();var O=f.selectAll("g.gauge-outline").data([u]);O.enter().append("g").classed("gauge-outline",!0).append("path"),O.select("path").call(w).call(P3),O.exit().remove()}function KDr(e,t,r,i){var n=r[0].trace,a=i.numbersX,o=i.numbersY,s=n.align||"center",l=mse[s],u=i.transitionOpts,c=i.onComplete,f=Ax.ensureSingle(t,"g","numbers"),h,p,d,v=[];n._hasNumber&&v.push("number"),n._hasDelta&&(v.push("delta"),n.delta.position==="left"&&v.reverse());var m=f.selectAll("text").data(v);m.enter().append("text"),m.attr("text-anchor",function(){return l}).attr("class",function(S){return S}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),m.exit().remove();function g(S,C,k,D){if(S.match("s")&&k>=0!=D>=0&&!C(k).slice(-1).match(Cft)&&!C(D).slice(-1).match(Cft)){var F=S.slice().replace("s","f").replace(/\d+/,function(R){return parseInt(R)-1}),P=c8(e,{tickformat:F});return function(R){return Math.abs(R)<1?jc.tickText(P,R).text:C(R)}}else return C}function w(){var S=c8(e,{tickformat:n.number.valueformat},n._range);S.setScale(),jc.prepTicks(S);var C=function(R){return jc.tickText(S,R).text},k=n.number.suffix,D=n.number.prefix,F=f.select("text.number");function P(){var R=typeof r[0].y=="number"?D+C(r[0].y)+k:"-";F.text(R).call(I3.font,n.number.font).call(NO.convertToTspans,e)}return h8(u)?F.transition().duration(u.duration).ease(u.easing).each("end",function(){P(),c&&c()}).each("interrupt",function(){P(),c&&c()}).attrTween("text",function(){var R=R3.select(this),L=kft(r[0].lastY,r[0].y);n._lastValue=r[0].y;var I=g(n.number.valueformat,C,r[0].lastY,r[0].y);return function(B){R.text(D+I(L(B))+k)}}):P(),h=Fft(D+C(r[0].y)+k,n.number.font,l,e),F}function _(){var S=c8(e,{tickformat:n.delta.valueformat},n._range);S.setScale(),jc.prepTicks(S);var C=function(B){return jc.tickText(S,B).text},k=n.delta.suffix,D=n.delta.prefix,F=function(B){var O=n.delta.relative?B.relativeDelta:B.delta;return O},P=function(B,O){return B===0||typeof B!="number"||isNaN(B)?"-":(B>0?n.delta.increasing.symbol:n.delta.decreasing.symbol)+D+O(B)+k},R=function(B){return B.delta>=0?n.delta.increasing.color:n.delta.decreasing.color};n._deltaLastValue===void 0&&(n._deltaLastValue=F(r[0]));var L=f.select("text.delta");L.call(I3.font,n.delta.font).call(m6.fill,R({delta:n._deltaLastValue}));function I(){L.text(P(F(r[0]),C)).call(m6.fill,R(r[0])).call(NO.convertToTspans,e)}return h8(u)?L.transition().duration(u.duration).ease(u.easing).tween("text",function(){var B=R3.select(this),O=F(r[0]),$=n._deltaLastValue,X=g(n.delta.valueformat,C,$,O),K=kft($,O);return n._deltaLastValue=O,function(G){B.text(P(K(G),X)),B.call(m6.fill,R({delta:K(G)}))}}).each("end",function(){I(),c&&c()}).each("interrupt",function(){I(),c&&c()}):I(),p=Fft(P(F(r[0]),C),n.delta.font,l,e),L}var b=n.mode+n.align,M;if(n._hasDelta&&(M=_(),b+=n.delta.position+n.delta.font.size+n.delta.font.family+n.delta.valueformat,b+=n.delta.increasing.symbol+n.delta.decreasing.symbol,d=p),n._hasNumber&&(w(),b+=n.number.font.size+n.number.font.family+n.number.valueformat+n.number.suffix+n.number.prefix,d=h),n._hasDelta&&n._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],A=[(p.left+p.right)/2,(p.top+p.bottom)/2],T,y,E=.75*n.delta.font.size;n.delta.position==="left"&&(T=OO(n,"deltaPos",0,-1*(h.width*L3[n.align]+p.width*(1-L3[n.align])+E),b,Math.min),y=x[1]-A[1],d={width:h.width+p.width+E,height:Math.max(h.height,p.height),left:p.left+T,right:h.right,top:Math.min(h.top,p.top+y),bottom:Math.max(h.bottom,p.bottom+y)}),n.delta.position==="right"&&(T=OO(n,"deltaPos",0,h.width*(1-L3[n.align])+p.width*L3[n.align]+E,b,Math.max),y=x[1]-A[1],d={width:h.width+p.width+E,height:Math.max(h.height,p.height),left:h.left,right:p.right+T,top:Math.min(h.top,p.top+y),bottom:Math.max(h.bottom,p.bottom+y)}),n.delta.position==="bottom"&&(T=null,y=p.height,d={width:Math.max(h.width,p.width),height:h.height+p.height,left:Math.min(h.left,p.left),right:Math.max(h.right,p.right),top:h.bottom-h.height,bottom:h.bottom+p.height}),n.delta.position==="top"&&(T=null,y=h.top,d={width:Math.max(h.width,p.width),height:h.height+p.height,left:Math.min(h.left,p.left),right:Math.max(h.right,p.right),top:h.bottom-h.height-p.height,bottom:h.bottom}),M.attr({dx:T,dy:y})}(n._hasNumber||n._hasDelta)&&f.attr("transform",function(){var S=i.numbersScaler(d);b+=S[2];var C=OO(n,"numbersScale",1,S[0],b,Math.min),k;n._scaleNumbers||(C=1),n._isAngular?k=o-C*d.bottom:k=o-C*(d.top+d.bottom)/2,n._numbersTop=C*d.top+k;var D=d[s];s==="center"&&(D=(d.left+d.right)/2);var F=a-C*D;return F=OO(n,"numbersTranslate",0,F,b,Math.max),f8(F,k)+GDr(C)})}function P3(e){e.each(function(t){m6.stroke(R3.select(this),t.line.color)}).each(function(t){m6.fill(R3.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function JDr(e,t,r){return function(){var i=VDr(t,r);return function(n){return e.endAngle(i(n))()}}}function c8(e,t,r){var i=e._fullLayout,n=Ax.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return Ax.coerce(n,a,YDr,l,u)}return $Dr(n,a,s,o,i),WDr(n,a,s,o),a}function Dft(e,t,r){var i=Math.min(t/e.width,r/e.height);return[i,e,t+"x"+r]}function QDr(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),i=t/r;return[i,e,t]}function Fft(e,t,r,i){var n=document.createElementNS("http://www.w3.org/2000/svg","text"),a=R3.select(n);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(NO.convertToTspans,i).call(I3.font,t),I3.bBox(a.node())}function OO(e,t,r,i,n,a){var o="_cache"+t;e[o]&&e[o].key===n||(e[o]={key:n,value:r});var s=Ax.aggNums(a,null,[e[o].value,i],2);return e[o].value=s,s}});var Rft=W((Iui,Ift)=>{"use strict";Ift.exports={moduleType:"trace",name:"indicator",basePlotModule:gft(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:pse(),supplyDefaults:Mft().supplyDefaults,calc:Eft().calc,plot:Pft(),meta:{}}});var Bft=W((Rui,zft)=>{"use strict";zft.exports=Rft()});var yse=W((Bui,Uft)=>{"use strict";var qft=Xy(),UO=an().extendFlat,e7r=hs().overrideAll,Oft=jo(),t7r=ds().attributes,Nft=Ts().descriptionOnlyNumbers,zui=Uft.exports=e7r({domain:t7r({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:Nft("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:UO({},qft.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:UO({},Oft({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:Nft("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:UO({},qft.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:UO({},Oft({arrayOk:!0}))}},"calc","from-root")});var Gft=W((qui,Vft)=>{"use strict";var xse=tt(),r7r=yse(),i7r=ds().defaults;function n7r(e,t){for(var r=e.columnorder||[],i=e.header.values.length,n=r.slice(0,i),a=n.slice().sort(function(l,u){return l-u}),o=n.map(function(l){return a.indexOf(l)}),s=o.length;s{"use strict";var a7r=eg().wrap;Hft.exports=function(){return a7r({})}});var bse={};Jn(bse,{cellPad:()=>o7r,cn:()=>E7r,columnExtentOffset:()=>s7r,columnTitleOffset:()=>l7r,emptyHeaderHeight:()=>u7r,goldenRatio:()=>f7r,latexCheck:()=>c7r,lineBreaker:()=>h7r,maxDimensionCount:()=>d7r,overdrag:()=>p7r,releaseTransitionDuration:()=>v7r,releaseTransitionEase:()=>g7r,scrollbarCaptureWidth:()=>m7r,scrollbarHideDelay:()=>y7r,scrollbarHideDuration:()=>x7r,scrollbarOffset:()=>b7r,scrollbarWidth:()=>_7r,transitionDuration:()=>w7r,transitionEase:()=>T7r,uplift:()=>A7r,wrapSpacer:()=>M7r,wrapSplitCharacter:()=>S7r});var o7r,s7r,l7r,u7r,c7r,f7r,h7r,d7r,p7r,v7r,g7r,m7r,y7r,x7r,b7r,_7r,w7r,T7r,A7r,M7r,S7r,E7r,_se=Ci(()=>{"use strict";o7r=8,s7r=10,l7r=28,u7r=16,c7r=/^\$.*\$$/,f7r=1.618,h7r="
",d7r=60,p7r=45,v7r=120,g7r="cubic-out",m7r=18,y7r=1e3,x7r=1e3,b7r=5,_7r=8,w7r=100,T7r="cubic-out",A7r=5,M7r=" ",S7r=" ",E7r={table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}});var eht=W((Nui,Qft)=>{"use strict";var $ft=(_se(),Pt(bse)),Tse=an().extendFlat,k7r=hn(),C7r=Tc().isTypedArray,VO=Tc().isArrayOrTypedArray;Qft.exports=function(t,r){var i=wse(r.cells.values),n=function(y){return y.slice(r.header.values.length,y.length)},a=wse(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=wse(a));var o=a.concat(n(i).map(function(){return Jft((a[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[$ft.emptyHeaderHeight],f=i.length?i[0].map(function(){return r.cells.height}):[],h=c.reduce(Wft,0),p=u-h,d=p+$ft.uplift,v=Zft(f,d),m=Zft(c,h),g=Xft(m,[]),w=Xft(v,g),_={},b=r.columnorder;VO(b)&&(b=Array.from(b)),b=b.concat(n(i.map(function(y,E){return E})));var M=o.map(function(y,E){var S=VO(r.columnwidth)?r.columnwidth[Math.min(E,r.columnwidth.length-1)]:r.columnwidth;return k7r(S)?Number(S):1}),x=M.reduce(Wft,0);M=M.map(function(y){return y/x*l});var A=Math.max(Ase(r.header.line.width),Ase(r.cells.line.width)),T={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:A,height:u,columnOrder:b,groupHeight:u,rowBlocks:w,headerRowBlocks:g,scrollY:0,cells:Tse({},r.cells,{values:i}),headerCells:Tse({},r.header,{values:o}),gdColumns:o.map(function(y){return y[0]}),gdColumnsOriginalOrder:o.map(function(y){return y[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(y,E){var S=_[y];_[y]=(S||0)+1;var C=y+"__"+_[y];return{key:C,label:y,specIndex:E,xIndex:b[E],xScale:Yft,x:void 0,calcdata:void 0,columnWidth:M[E]}})};return T.columns.forEach(function(y){y.calcdata=T,y.x=Yft(y)}),T};function Ase(e){if(VO(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[n]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=Kft(),n+=a,s=u+1,a=0);return r}function Kft(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var tht=W(Mse=>{"use strict";var GO=an().extendFlat;Mse.splitToPanels=function(e){var t=[0,0],r=GO({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:GO({},e.calcdata,{cells:e.calcdata.headerCells})}),i=GO({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n=GO({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[i,n,r]};Mse.splitToCells=function(e){var t=D7r(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,i){var n=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:i+n,key:t[0]+i,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function D7r(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,i=t?r+t.rows.length:0;return[r,i]}});var Rse=W((Vui,hht)=>{"use strict";var Ai=(_se(),Pt(bse)),ks=gi(),Sse=tt(),F7r=Sse.numberFormat,qo=eg(),Ese=Qi(),L7r=ao(),P7r=tt().raiseToTop,vp=tt().strTranslate,I7r=tt().cancelTransition,R7r=eht(),lht=tht(),rht=ti();hht.exports=function(t,r){var i=!t._context.staticPlot,n=t._fullLayout._paper.selectAll("."+Ai.cn.table).data(r.map(function(w){var _=qo.unwrap(w),b=_.trace;return R7r(t,b)}),qo.keyFun);n.exit().remove(),n.enter().append("g").classed(Ai.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"),n.attr("width",function(w){return w.width+w.size.l+w.size.r}).attr("height",function(w){return w.height+w.size.t+w.size.b}).attr("transform",function(w){return vp(w.translateX,w.translateY)});var a=n.selectAll("."+Ai.cn.tableControlView).data(qo.repeat,qo.keyFun),o=a.enter().append("g").classed(Ai.cn.tableControlView,!0).style("box-sizing","content-box");if(i){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(w){a.filter(function(_){return w===_}).call(d8,t)}).on(s,function(w){if(!w.scrollbarState.wheeling){w.scrollbarState.wheeling=!0;var _=w.scrollY+ks.event.deltaY,b=jO(t,a,null,_)(w);b||(ks.event.stopPropagation(),ks.event.preventDefault()),w.scrollbarState.wheeling=!1}}).call(d8,t,!0)}a.attr("transform",function(w){return vp(w.size.l,w.size.t)});var l=a.selectAll("."+Ai.cn.scrollBackground).data(qo.repeat,qo.keyFun);l.enter().append("rect").classed(Ai.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(w){return w.width}).attr("height",function(w){return w.height}),a.each(function(w){Ese.setClipUrl(ks.select(this),iht(t,w),t)});var u=a.selectAll("."+Ai.cn.yColumn).data(function(w){return w.columns},qo.keyFun);u.enter().append("g").classed(Ai.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(w){return vp(w.x,0)}),i&&u.call(ks.behavior.drag().origin(function(w){var _=ks.select(this);return oht(_,w,-Ai.uplift),P7r(this),w.calcdata.columnDragInProgress=!0,d8(a.filter(function(b){return w.calcdata.key===b.key}),t),w}).on("drag",function(w){var _=ks.select(this),b=function(A){return(w===A?ks.event.x:A.x)+A.columnWidth/2};w.x=Math.max(-Ai.overdrag,Math.min(w.calcdata.width+Ai.overdrag-w.columnWidth,ks.event.x));var M=uht(u).filter(function(A){return A.calcdata.key===w.calcdata.key}),x=M.sort(function(A,T){return b(A)-b(T)});x.forEach(function(A,T){A.xIndex=T,A.x=w===A?A.x:A.xScale(A)}),u.filter(function(A){return w!==A}).transition().ease(Ai.transitionEase).duration(Ai.transitionDuration).attr("transform",function(A){return vp(A.x,0)}),_.call(I7r).attr("transform",vp(w.x,-Ai.uplift))}).on("dragend",function(w){var _=ks.select(this),b=w.calcdata;w.x=w.xScale(w),w.calcdata.columnDragInProgress=!1,oht(_,w,0),j7r(t,b,b.columns.map(function(M){return M.xIndex}))})),u.each(function(w){Ese.setClipUrl(ks.select(this),nht(t,w),t)});var c=u.selectAll("."+Ai.cn.columnBlock).data(lht.splitToPanels,qo.keyFun);c.enter().append("g").classed(Ai.cn.columnBlock,!0).attr("id",function(w){return w.key}),c.style("cursor",function(w){return w.dragHandle?"ew-resize":w.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter($7r),h=c.filter(Lse);i&&h.call(ks.behavior.drag().origin(function(w){return ks.event.stopPropagation(),w}).on("drag",jO(t,a,-1)).on("dragend",function(){})),kse(t,a,f,c),kse(t,a,h,c);var p=a.selectAll("."+Ai.cn.scrollAreaClip).data(qo.repeat,qo.keyFun);p.enter().append("clipPath").classed(Ai.cn.scrollAreaClip,!0).attr("id",function(w){return iht(t,w)});var d=p.selectAll("."+Ai.cn.scrollAreaClipRect).data(qo.repeat,qo.keyFun);d.enter().append("rect").classed(Ai.cn.scrollAreaClipRect,!0).attr("x",-Ai.overdrag).attr("y",-Ai.uplift).attr("fill","none"),d.attr("width",function(w){return w.width+2*Ai.overdrag}).attr("height",function(w){return w.height+Ai.uplift});var v=u.selectAll("."+Ai.cn.columnBoundary).data(qo.repeat,qo.keyFun);v.enter().append("g").classed(Ai.cn.columnBoundary,!0);var m=u.selectAll("."+Ai.cn.columnBoundaryClippath).data(qo.repeat,qo.keyFun);m.enter().append("clipPath").classed(Ai.cn.columnBoundaryClippath,!0),m.attr("id",function(w){return nht(t,w)});var g=m.selectAll("."+Ai.cn.columnBoundaryRect).data(qo.repeat,qo.keyFun);g.enter().append("rect").classed(Ai.cn.columnBoundaryRect,!0).attr("fill","none"),g.attr("width",function(w){return w.columnWidth+2*HO(w)}).attr("height",function(w){return w.calcdata.height+2*HO(w)+Ai.uplift}).attr("x",function(w){return-HO(w)}).attr("y",function(w){return-HO(w)}),Pse(null,h,a)};function HO(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function iht(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function nht(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function uht(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function d8(e,t,r){function i(u){var c=u.rowBlocks;return Dse(c,c.length-1)+(c.length?$O(c[c.length-1],1/0):1)}var n=e.selectAll("."+Ai.cn.scrollbarKit).data(qo.repeat,qo.keyFun);n.enter().append("g").classed(Ai.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),n.each(function(u){var c=u.scrollbarState;c.totalHeight=i(u),c.scrollableAreaHeight=u.groupHeight-Cse(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ai.goldenRatio*Ai.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ai.scrollbarWidth/2+Ai.scrollbarOffset;return vp(c,Cse(u))});var a=n.selectAll("."+Ai.cn.scrollbar).data(qo.repeat,qo.keyFun);a.enter().append("g").classed(Ai.cn.scrollbar,!0);var o=a.selectAll("."+Ai.cn.scrollbarSlider).data(qo.repeat,qo.keyFun);o.enter().append("g").classed(Ai.cn.scrollbarSlider,!0),o.attr("transform",function(u){return vp(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ai.cn.scrollbarGlyph).data(qo.repeat,qo.keyFun);s.enter().append("line").classed(Ai.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ai.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ai.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ai.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ai.scrollbarHideDelay).duration(Ai.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ai.cn.scrollbarCaptureZone).data(qo.repeat,qo.keyFun);l.enter().append("line").classed(Ai.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ai.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=ks.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,p=c-f.top,d=ks.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=p&&p<=h.bottomY||jO(t,e,null,d(p-h.barLength/2))(u)}).call(ks.behavior.drag().origin(function(u){return ks.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",jO(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function kse(e,t,r,i){var n=z7r(r),a=B7r(n);U7r(a);var o=q7r(a);G7r(o);var s=N7r(a),l=O7r(s);V7r(l),cht(l,t,i,e),Ise(a)}function z7r(e){var t=e.selectAll("."+Ai.cn.columnCells).data(qo.repeat,qo.keyFun);return t.enter().append("g").classed(Ai.cn.columnCells,!0),t.exit().remove(),t}function B7r(e){var t=e.selectAll("."+Ai.cn.columnCell).data(lht.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ai.cn.columnCell,!0),t.exit().remove(),t}function q7r(e){var t=e.selectAll("."+Ai.cn.cellRect).data(qo.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ai.cn.cellRect,!0),t}function O7r(e){var t=e.selectAll("."+Ai.cn.cellText).data(qo.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ai.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){ks.event.stopPropagation()}),t}function N7r(e){var t=e.selectAll("."+Ai.cn.cellTextHolder).data(qo.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ai.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function U7r(e){e.each(function(t,r){var i=t.calcdata.cells.font,n=t.column.specIndex,a={size:$f(i.size,n,r),color:$f(i.color,n,r),family:$f(i.family,n,r),weight:$f(i.weight,n,r),style:$f(i.style,n,r),variant:$f(i.variant,n,r),textcase:$f(i.textcase,n,r),lineposition:$f(i.lineposition,n,r),shadow:$f(i.shadow,n,r)};t.rowNumber=t.key,t.align=$f(t.calcdata.cells.align,n,r),t.cellBorderWidth=$f(t.calcdata.cells.line.width,n,r),t.font=a})}function V7r(e){e.each(function(t){Ese.font(ks.select(this),t.font)})}function G7r(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=ks.select(this);rht.stroke(r,$f(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),rht.fill(r,$f(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function cht(e,t,r,i){e.text(function(n){var a=n.column.specIndex,o=n.rowNumber,s=n.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;n.mayHaveMarkup=l&&s.match(/[<&>]/);var f=H7r(s);n.latex=f;var h=f?"":$f(n.calcdata.cells.prefix,a,o)||"",p=f?"":$f(n.calcdata.cells.suffix,a,o)||"",d=f?null:$f(n.calcdata.cells.format,a,o)||null,v=h+(d?F7r(d)(n.value):n.value)+p,m;n.wrappingNeeded=!n.wrapped&&!c&&!f&&(m=aht(v)),n.cellHeightMayIncrease=u||f||n.mayHaveMarkup||(m===void 0?aht(v):m),n.needsConvertToTspans=n.mayHaveMarkup||n.wrappingNeeded||n.latex;var g;if(n.wrappingNeeded){var w=Ai.wrapSplitCharacter===" "?v.replace(/n&&i.push(a),n+=l}return i}function Pse(e,t,r){var i=uht(t)[0];if(i!==void 0){var n=i.rowBlocks,a=i.calcdata,o=Dse(n,n.length),s=i.calcdata.groupHeight-Cse(i),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=W7r(n,l,s);u.length===1&&(u[0]===n.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=Dse(c.rowBlocks,c.page)-c.scrollY;return vp(0,f)}),e&&(sht(e,r,t,u,i.prevPages,i,0),sht(e,r,t,u,i.prevPages,i,1),d8(r,e))}}function jO(e,t,r,i){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=i===void 0?o.scrollY+l*ks.event.dy:i;var c=s.selectAll("."+Ai.cn.yColumn).selectAll("."+Ai.cn.columnBlock).filter(Lse);return Pse(e,c,s),o.scrollY===u}}function sht(e,t,r,i,n,a,o){var s=i[o]!==n[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&i[c]!==n[c]});kse(e,t,l,r),n[o]=i[o]}))}function Y7r(e,t,r,i){return function(){var a=ks.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(v,m){s[m].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,p=0,d=o.column.columnWidth-2*Ai.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,p+h>d&&(o.value+=c.join(Ai.wrapSpacer)+Ai.lineBreaker,c=[],p=0),c.push(f.text),p+=h;p&&(o.value+=c.join(Ai.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),cht(a.select("."+Ai.cn.cellText),r,e,i),ks.select(t.parentNode.parentNode).call(Ise)}}function X7r(e,t,r,i,n){return function(){if(!n.settledY){var o=ks.select(t.parentNode),s=Fse(n),l=n.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=n.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ai.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ai.cn.columnCell).call(Ise),Pse(null,e.filter(Lse),0),d8(r,i,!0)),o.attr("transform",function(){var p=this,d=p.parentNode,v=d.getBoundingClientRect(),m=ks.select(p.parentNode).select("."+Ai.cn.cellRect).node().getBoundingClientRect(),g=p.transform.baseVal.consolidate(),w=m.top-v.top+(g?g.matrix.f:Ai.cellPad);return vp(fht(n,ks.select(p.parentNode).select("."+Ai.cn.cellTextHolder).node().getBoundingClientRect().width),w)}),n.settledY=!0}}}function fht(e,t){switch(e.align){case"left":return Ai.cellPad;case"right":return e.column.columnWidth-(t||0)-Ai.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ai.cellPad}}function Ise(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+$O(s,1/0)},0),i=Fse(t),n=$O(i,t.key),a=n+r;return vp(0,a)}).selectAll("."+Ai.cn.cellRect).attr("height",function(t){return K7r(Fse(t),t.key).rowHeight})}function Dse(e,t){for(var r=0,i=t-1;i>=0;i--)r+=Z7r(e[i]);return r}function $O(e,t){for(var r=0,i=0;i{"use strict";var J7r=Mc().getModuleCalcData,Q7r=Rse(),WO="table";YO.name=WO;YO.plot=function(e){var t=J7r(e.calcdata,WO)[0];t.length&&Q7r(e,t)};YO.clean=function(e,t,r,i){var n=i._has&&i._has(WO),a=t._has&&t._has(WO);n&&!a&&i._paperdiv.selectAll(".table").remove()}});var vht=W((Hui,pht)=>{"use strict";pht.exports={attributes:yse(),supplyDefaults:Gft(),calc:jft(),plot:Rse(),moduleType:"trace",name:"table",basePlotModule:dht(),categories:["noOpacity"],meta:{}}});var mht=W((jui,ght)=>{"use strict";ght.exports=vht()});var wht=W(($ui,_ht)=>{"use strict";var yht=jo(),xht=Yl(),zse=ac(),eFr=Ts().descriptionWithDates,tFr=hs().overrideAll,bht=zu().dash,Bse=an().extendFlat;_ht.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:yht({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:zse.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:Bse({},zse.labelalias,{editType:"calc"}),tickfont:yht({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:eFr("tick label")},tickformatstops:tFr(zse.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:xht.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:Bse({},bht,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:Bse({},bht,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:xht.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var ZO=W((Wui,Mht)=>{"use strict";var rFr=jo(),Tht=wht(),Aht=Yl(),XO=rFr({editType:"calc"}),iFr=Ws().zorder;XO.family.dflt='"Open Sans", verdana, arial, sans-serif';XO.size.dflt=12;XO.color.dflt=Aht.defaultLine;Mht.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:Tht,baxis:Tht,font:XO,color:{valType:"color",dflt:Aht.defaultLine,editType:"plot"},zorder:iFr}});var kht=W((Yui,Eht)=>{"use strict";var Sht=tt().isArray1D;Eht.exports=function(t,r,i){var n=i("x"),a=n&&n.length,o=i("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!n,(!a||Sht(n))&&(!s||Sht(o))){var l=a?n.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var Fht=W((Xui,Dht)=>{"use strict";var nFr=ZO(),Cht=ti().addOpacity,aFr=xi(),p8=tt(),oFr=ub(),sFr=Py(),lFr=Iy(),uFr=rL(),cFr=g1(),fFr=Rw();Dht.exports=function(t,r,i){var n=i.letter,a=i.font||{},o=nFr[n+"axis"];function s(y,E){return p8.coerce(t,r,o,y,E)}function l(y,E){return p8.coerce2(t,r,o,y,E)}i.name&&(r._name=i.name,r._id=i.name),s("autotypenumbers",i.autotypenumbersDflt);var u=s("type");if(u==="-"&&(i.data&&hFr(r,i.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",n+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=n,u==="date"){var c=aFr.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",i.calendar)}cFr(r,i.fullLayout),r.c2p=p8.identity;var f=s("color",i.dfltColor),h=f===t.color?f:a.color,p=s("title.text");p&&(p8.coerceFont(s,"title.font",a,{overrideDflt:{size:p8.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var d=s("autorange",!r.isValidRange(t.range));d&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),oFr(t,r,s,u),lFr(t,r,s,u,i),sFr(t,r,s,u,i),uFr(t,r,s,{data:i.data,dataAttr:n});var v=s("gridcolor",Cht(f,.3)),m=l("gridwidth"),g=l("griddash"),w=s("showgrid");w||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var _=l("startlinecolor",f),b=l("startlinewidth",m),M=s("startline",r.showgrid||!!_||!!b);M||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),A=l("endlinewidth",m),T=s("endline",r.showgrid||!!x||!!A);return T||(delete r.endlinecolor,delete r.endlinewidth),w?(s("minorgridcount"),s("minorgridwidth",m),s("minorgriddash",g),s("minorgridcolor",Cht(v,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function hFr(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),n=i+"calendar",a=e[n];e.type=fFr(t,a,{autotypenumbers:e.autotypenumbers})}}});var Pht=W((Zui,Lht)=>{"use strict";var dFr=Fht(),pFr=Ra();Lht.exports=function(t,r,i,n,a){var o=n("a");o||(n("da"),n("a0"));var s=n("b");s||(n("db"),n("b0")),vFr(t,r,i,a)};function vFr(e,t,r,i){var n=["aaxis","baxis"];n.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=pFr.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:i,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};dFr(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var zht=W((Kui,Rht)=>{"use strict";var Iht=tt(),gFr=kht(),mFr=Pht(),yFr=ZO(),xFr=Yl();Rht.exports=function(t,r,i,n){function a(l,u){return Iht.coerce(t,r,yFr,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",xFr.defaultLine);if(Iht.coerceFont(a,"font",n.font),a("carpet"),mFr(t,r,n,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=gFr(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var qse=W((Jui,Bht)=>{"use strict";var bFr=tt().isArrayOrTypedArray;Bht.exports=function(t,r,i){var n;for(bFr(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],n=0;n{"use strict";qht.exports=function(t,r,i){if(t.length===0)return"";var n,a=[],o=i?3:1;for(n=0;n{"use strict";Oht.exports=function(t,r,i,n,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(i),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),p=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,p)}var d=Math.atan2(l,s)*180/Math.PI;return d<-90?(d+=180,u=-u):d>90&&(d-=180,u=-u),{angle:d,flip:u,p:t.c2p(n,r,i),offsetMultplier:c}}});var Yht=W((tci,Wht)=>{"use strict";var eN=gi(),KO=Qi(),JO=qse(),Ght=Ose(),v8=Nht(),Nse=ao(),u0=tt(),Hht=u0.strRotate,QO=u0.strTranslate,jht=(Jl(),Pt(Kl));Wht.exports=function(t,r,i,n){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;u0.makeTraceGroups(n,i,"trace").each(function(c){var f=eN.select(this),h=c[0],p=h.trace,d=p.aaxis,v=p.baxis,m=u0.ensureSingle(f,"g","minorlayer"),g=u0.ensureSingle(f,"g","majorlayer"),w=u0.ensureSingle(f,"g","boundarylayer"),_=u0.ensureSingle(f,"g","labellayer");f.style("opacity",p.opacity),y6(o,s,g,d,"a",d._gridlines,!0,a),y6(o,s,g,v,"b",v._gridlines,!0,a),y6(o,s,m,d,"a",d._minorgridlines,!0,a),y6(o,s,m,v,"b",v._minorgridlines,!0,a),y6(o,s,w,d,"a-boundary",d._boundarylines,a),y6(o,s,w,v,"b-boundary",v._boundarylines,a);var b=Uht(t,o,s,p,h,_,d._labels,"a-label"),M=Uht(t,o,s,p,h,_,v._labels,"b-label");wFr(t,_,p,h,o,s,b,M),_Fr(p,h,u,o,s)})};function _Fr(e,t,r,i,n){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=u0.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l0?"start":"end","data-notex":1}).call(KO.font,f.font).text(f.text).call(Nse.convertToTspans,e),g=KO.bBox(this);m.attr("transform",QO(p.p[0],p.p[1])+Hht(p.angle)+QO(f.axis.labelpadding*v,g.height*.3)),u=Math.max(u,g.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function wFr(e,t,r,i,n,a,o,s){var l,u,c,f,h=u0.aggNums(Math.min,null,r.a),p=u0.aggNums(Math.max,null,r.a),d=u0.aggNums(Math.min,null,r.b),v=u0.aggNums(Math.max,null,r.b);l=.5*(h+p),u=d,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&u0.extendFlat(o,v8(r,n,a,c,r.dxydb_rough(l,u))),Vht(e,t,r,i,c,f,r.aaxis,n,a,o,"a-title"),l=h,u=.5*(d+v),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&u0.extendFlat(s,v8(r,n,a,c,r.dxyda_rough(l,u))),Vht(e,t,r,i,c,f,r.baxis,n,a,s,"b-title")}var $ht=jht.LINE_SPACING,TFr=(1-jht.MID_SHIFT)/$ht+1;function Vht(e,t,r,i,n,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),p=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var d=v8(r,s,l,n,a);["start","both"].indexOf(o.showticklabels)===-1&&(p=0);var v=o.title.font.size;p+=v+o.title.offset;var m=u.angle+(u.flip<0?180:0),g=(m-d.angle+450)%360,w=g>90&&g<270,_=eN.select(this);_.text(o.title.text).call(Nse.convertToTspans,e),w&&(p=(-Nse.lineCount(_)+TFr)*$ht*v-p),_.attr("transform",QO(d.p[0],d.p[1])+Hht(d.angle)+QO(0,p)).attr("text-anchor","middle").call(KO.font,o.title.font)}),h.exit().remove()}});var Zht=W((rci,Xht)=>{"use strict";var tN=tt().isArrayOrTypedArray;Xht.exports=function(e,t,r){var i,n,a,o,s,l,u=[],c=tN(e)?e.length:e,f=tN(t)?t.length:t,h=tN(e)?e:null,p=tN(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),p&&(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1));var d,v=1/0,m=-1/0;for(n=0;n{"use strict";var Kht=tt().isArrayOrTypedArray;Qht.exports=function(e){return Jht(e,0)};function Jht(e,t){if(!Kht(e)||t>=10)return null;for(var r=1/0,i=-1/0,n=e.length,a=0;a{"use strict";var AFr=Yi(),Mx=an().extendFlat;t0t.exports=function(t,r,i){var n,a,o,s,l,u,c,f,h,p,d,v,m,g,w=t["_"+r],_=t[r+"axis"],b=_._gridlines=[],M=_._minorgridlines=[],x=_._boundarylines=[],A=t["_"+i],T=t[i+"axis"];_.tickmode==="array"&&(_.tickvals=w.slice());var y=t._xctrl,E=t._yctrl,S=y[0].length,C=y.length,k=t._a.length,D=t._b.length;AFr.prepTicks(_),_.tickmode==="array"&&delete _.tickvals;var F=_.smoothing?3:1;function P(L){var I,B,O,$,X,K,G,q,J,N,V,Y,H=[],j=[],Q={};if(r==="b")for(B=t.b2j(L),O=Math.floor(Math.max(0,Math.min(D-2,B))),$=B-O,Q.length=D,Q.crossLength=k,Q.xy=function(te){return t.evalxy([],te,B)},Q.dxy=function(te,ue){return t.dxydi([],te,O,ue,$)},I=0;I0&&(J=t.dxydi([],I-1,O,0,$),H.push(X[0]+J[0]/3),j.push(X[1]+J[1]/3),N=t.dxydi([],I-1,O,1,$),H.push(q[0]-N[0]/3),j.push(q[1]-N[1]/3)),H.push(q[0]),j.push(q[1]),X=q;else for(I=t.a2i(L),K=Math.floor(Math.max(0,Math.min(k-2,I))),G=I-K,Q.length=k,Q.crossLength=D,Q.xy=function(te){return t.evalxy([],I,te)},Q.dxy=function(te,ue){return t.dxydj([],K,te,G,ue)},B=0;B0&&(V=t.dxydj([],K,B-1,G,0),H.push(X[0]+V[0]/3),j.push(X[1]+V[1]/3),Y=t.dxydj([],K,B-1,G,1),H.push(q[0]-Y[0]/3),j.push(q[1]-Y[1]/3)),H.push(q[0]),j.push(q[1]),X=q;return Q.axisLetter=r,Q.axis=_,Q.crossAxis=T,Q.value=L,Q.constvar=i,Q.index=f,Q.x=H,Q.y=j,Q.smoothing=T.smoothing,Q}function R(L){var I,B,O,$,X,K=[],G=[],q={};if(q.length=w.length,q.crossLength=A.length,r==="b")for(O=Math.max(0,Math.min(D-2,L)),X=Math.min(1,Math.max(0,L-O)),q.xy=function(J){return t.evalxy([],J,L)},q.dxy=function(J,N){return t.dxydi([],J,O,N,X)},I=0;Iw.length-1)&&b.push(Mx(R(a),{color:_.gridcolor,width:_.gridwidth,dash:_.griddash}));for(f=u;fw.length-1)&&!(d<0||d>w.length-1))for(v=w[o],m=w[d],n=0;n<_.minorgridcount;n++)g=d-o,!(g<=0)&&(p=v+(m-v)*(n+1)/(_.minorgridcount+1)*(_.arraydtick/g),!(pw[w.length-1])&&M.push(Mx(P(p),{color:_.minorgridcolor,width:_.minorgridwidth,dash:_.minorgriddash})));_.startline&&x.push(Mx(R(0),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&x.push(Mx(R(w.length-1),{color:_.endlinecolor,width:_.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((w[w.length-1]-_.tick0)/_.dtick*(1+s)),Math.ceil((w[0]-_.tick0)/_.dtick/(1+s))].sort(function(L,I){return L-I}),u=l[0],c=l[1],f=u;f<=c;f++)h=_.tick0+_.dtick*f,b.push(Mx(P(h),{color:_.gridcolor,width:_.gridwidth,dash:_.griddash}));for(f=u-1;fw[w.length-1])&&M.push(Mx(P(p),{color:_.minorgridcolor,width:_.minorgridwidth,dash:_.minorgriddash}));_.startline&&x.push(Mx(P(w[0]),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&x.push(Mx(P(w[w.length-1]),{color:_.endlinecolor,width:_.endlinewidth}))}}});var o0t=W((aci,a0t)=>{"use strict";var i0t=Yi(),n0t=an().extendFlat;a0t.exports=function(t,r){var i,n,a,o,s,l=r._labels=[],u=r._gridlines;for(i=0;i{"use strict";s0t.exports=function(t,r,i,n){var a,o,s,l=[],u=!!i.smoothing,c=!!n.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var c0t=W((sci,u0t)=>{"use strict";var MFr=tt();u0t.exports=function(t,r,i){var n,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(O,$){var X=0,K,G=0;return O>0&&(K=t[$][O-1])!==void 0&&(G++,X+=K),O0&&(K=t[$-1][O])!==void 0&&(G++,X+=K),$0&&a0&&nT);return MFr.log("Smoother converged to",y,"after",S,"iterations"),t}});var f0t={};Jn(f0t,{RELATIVE_CULL_TOLERANCE:()=>SFr});var SFr,h0t=Ci(()=>{"use strict";SFr=1e-6});var v0t=W((lci,p0t)=>{"use strict";var d0t=.5;p0t.exports=function(t,r,i,n){var a=t[0]-r[0],o=t[1]-r[1],s=i[0]-r[0],l=i[1]-r[1],u=Math.pow(a*a+o*o,d0t/2),c=Math.pow(s*s+l*l,d0t/2),f=(c*c*a-u*u*s)*n,h=(c*c*o-u*u*l)*n,p=c*(u+c)*3,d=u*(u+c)*3;return[[r[0]+(p&&f/p),r[1]+(p&&h/p)],[r[0]-(d&&f/d),r[1]-(d&&h/d)]]}});var m0t=W((uci,g0t)=>{"use strict";var Use=v0t(),rN=tt().ensureArray;function x6(e,t,r){var i=-.5*r[0]+1.5*t[0],n=-.5*r[1]+1.5*t[1];return[(2*i+e[0])/3,(2*n+e[1])/3]}g0t.exports=function(t,r,i,n,a,o){var s,l,u,c,f,h,p,d,v,m,g=i[0].length,w=i.length,_=a?3*g-2:g,b=o?3*w-2:w;for(t=rN(t,b),r=rN(r,b),u=0;u{"use strict";y0t.exports=function(e,t,r,i,n){var a=t-2,o=r-2;return i&&n?function(s,l,u){s||(s=[]);var c,f,h,p,d,v,m=Math.max(0,Math.min(Math.floor(l),a)),g=Math.max(0,Math.min(Math.floor(u),o)),w=Math.max(0,Math.min(1,l-m)),_=Math.max(0,Math.min(1,u-g));m*=3,g*=3;var b=w*w,M=b*w,x=1-w,A=x*x,T=A*x,y=_*_,E=y*_,S=1-_,C=S*S,k=C*S;for(v=0;v{"use strict";b0t.exports=function(e,t,r){return t&&r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,p;n*=3,a*=3;var d=o*o,v=1-o,m=v*v,g=v*o*2,w=-3*m,_=3*(m-g),b=3*(g-d),M=3*d,x=s*s,A=x*s,T=1-s,y=T*T,E=y*T;for(p=0;p{"use strict";w0t.exports=function(e,t,r){return t&&r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,p;n*=3,a*=3;var d=o*o,v=d*o,m=1-o,g=m*m,w=g*m,_=s*s,b=1-s,M=b*b,x=b*s*2,A=-3*M,T=3*(M-x),y=3*(x-_),E=3*_;for(p=0;p{"use strict";var A0t=(h0t(),Pt(f0t)),M0t=SD().findBin,EFr=m0t(),kFr=x0t(),CFr=_0t(),DFr=T0t();S0t.exports=function(t){var r=t._a,i=t._b,n=r.length,a=i.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[n-1],c=i[0],f=i[a-1],h=r[r.length-1]-r[0],p=i[i.length-1]-i[0],d=h*A0t.RELATIVE_CULL_TOLERANCE,v=p*A0t.RELATIVE_CULL_TOLERANCE;l-=d,u+=d,c-=v,f+=v,t.isVisible=function(m,g){return m>l&&mc&&gu||gf},t.setScale=function(){var m=t._x,g=t._y,w=EFr(t._xctrl,t._yctrl,m,g,o.smoothing,s.smoothing);t._xctrl=w[0],t._yctrl=w[1],t.evalxy=kFr([t._xctrl,t._yctrl],n,a,o.smoothing,s.smoothing),t.dxydi=CFr([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=DFr([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(m){var g=Math.max(0,Math.floor(m[0]),n-2),w=m[0]-g;return(1-w)*r[g]+w*r[g+1]},t.j2b=function(m){var g=Math.max(0,Math.floor(m[1]),n-2),w=m[1]-g;return(1-w)*i[g]+w*i[g+1]},t.ij2ab=function(m){return[t.i2a(m[0]),t.j2b(m[1])]},t.a2i=function(m){var g=Math.max(0,Math.min(M0t(m,r),n-2)),w=r[g],_=r[g+1];return Math.max(0,Math.min(n-1,g+(m-w)/(_-w)))},t.b2j=function(m){var g=Math.max(0,Math.min(M0t(m,i),a-2)),w=i[g],_=i[g+1];return Math.max(0,Math.min(a-1,g+(m-w)/(_-w)))},t.ab2ij=function(m){return[t.a2i(m[0]),t.b2j(m[1])]},t.i2c=function(m,g){return t.evalxy([],m,g)},t.ab2xy=function(m,g,w){if(!w&&(mr[n-1]|gi[a-1]))return[!1,!1];var _=t.a2i(m),b=t.b2j(g),M=t.evalxy([],_,b);if(w){var x=0,A=0,T=[],y,E,S,C;mr[n-1]?(y=n-2,E=1,x=(m-r[n-1])/(r[n-1]-r[n-2])):(y=Math.max(0,Math.min(n-2,Math.floor(_))),E=_-y),gi[a-1]?(S=a-2,C=1,A=(g-i[a-1])/(i[a-1]-i[a-2])):(S=Math.max(0,Math.min(a-2,Math.floor(b))),C=b-S),x&&(t.dxydi(T,y,S,E,C),M[0]+=T[0]*x,M[1]+=T[1]*x),A&&(t.dxydj(T,y,S,E,C),M[0]+=T[0]*A,M[1]+=T[1]*A)}return M},t.c2p=function(m,g,w){return[g.c2p(m[0]),w.c2p(m[1])]},t.p2x=function(m,g,w){return[g.p2c(m[0]),w.p2c(m[1])]},t.dadi=function(m){var g=Math.max(0,Math.min(r.length-2,m));return r[g+1]-r[g]},t.dbdj=function(m){var g=Math.max(0,Math.min(i.length-2,m));return i[g+1]-i[g]},t.dxyda=function(m,g,w,_){var b=t.dxydi(null,m,g,w,_),M=t.dadi(m,w);return[b[0]/M,b[1]/M]},t.dxydb=function(m,g,w,_){var b=t.dxydj(null,m,g,w,_),M=t.dbdj(g,_);return[b[0]/M,b[1]/M]},t.dxyda_rough=function(m,g,w){var _=h*(w||.1),b=t.ab2xy(m+_,g,!0),M=t.ab2xy(m-_,g,!0);return[(b[0]-M[0])*.5/_,(b[1]-M[1])*.5/_]},t.dxydb_rough=function(m,g,w){var _=p*(w||.1),b=t.ab2xy(m,g+_,!0),M=t.ab2xy(m,g-_,!0);return[(b[0]-M[0])*.5/_,(b[1]-M[1])*.5/_]},t.dpdx=function(m){return m._m},t.dpdy=function(m){return m._m}}});var R0t=W((pci,I0t)=>{"use strict";var iN=Yi(),k0t=tt().isArray1D,FFr=Zht(),C0t=e0t(),D0t=r0t(),F0t=o0t(),LFr=l0t(),L0t=iP(),P0t=c0t(),PFr=tP(),IFr=E0t();I0t.exports=function(t,r){var i=iN.getFromId(t,r.xaxis),n=iN.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&k0t(s)&&u.push("x"),l&&k0t(l)&&u.push("y"),u.length&&PFr(r,a,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var p=a.cheatertype==="index"?c.length:c,d=o.cheatertype==="index"?f.length:f;s=FFr(p,d,r.cheaterslope)}r._x=s=L0t(s),r._y=l=L0t(l),P0t(s,c,f),P0t(l,c,f),IFr(r),r.setScale();var v=C0t(s),m=C0t(l),g=.5*(v[1]-v[0]),w=.5*(v[1]+v[0]),_=.5*(m[1]-m[0]),b=.5*(m[1]+m[0]),M=1.3;return v=[w-g*M,w+g*M],m=[b-_*M,b+_*M],r._extremes[i._id]=iN.findExtremes(i,v,{padded:!0}),r._extremes[n._id]=iN.findExtremes(n,m,{padded:!0}),D0t(r,"a","b"),D0t(r,"b","a"),F0t(r,a),F0t(r,o),h.clipsegments=LFr(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var B0t=W((vci,z0t)=>{"use strict";z0t.exports={attributes:ZO(),supplyDefaults:zht(),plot:Yht(),calc:R0t(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:xl(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var O0t=W((gci,q0t)=>{"use strict";q0t.exports=B0t()});var Vse=W((mci,G0t)=>{"use strict";var RFr=C1(),K0=Ws(),zFr=Ja(),{hovertemplateAttrs:BFr,texttemplateAttrs:qFr,templatefallbackAttrs:N0t}=Wa(),U0t=Fo(),Sx=an().extendFlat,gp=K0.marker,b6=K0.line,V0t=gp.line;G0t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Sx({},K0.mode,{dflt:"markers"}),text:Sx({},K0.text,{}),texttemplate:qFr({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:N0t({editType:"plot"}),hovertext:Sx({},K0.hovertext,{}),line:{color:b6.color,width:b6.width,dash:b6.dash,backoff:b6.backoff,shape:Sx({},b6.shape,{values:["linear","spline"]}),smoothing:b6.smoothing,editType:"calc"},connectgaps:K0.connectgaps,fill:Sx({},K0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:RFr(),marker:Sx({symbol:gp.symbol,opacity:gp.opacity,maxdisplayed:gp.maxdisplayed,angle:gp.angle,angleref:gp.angleref,standoff:gp.standoff,size:gp.size,sizeref:gp.sizeref,sizemin:gp.sizemin,sizemode:gp.sizemode,line:Sx({width:V0t.width,dash:V0t.dash,editType:"calc"},U0t("marker.line")),gradient:gp.gradient,editType:"calc"},U0t("marker")),textfont:K0.textfont,textposition:K0.textposition,selected:K0.selected,unselected:K0.unselected,hoverinfo:Sx({},zFr.hoverinfo,{flags:["a","b","text","name"]}),hoveron:K0.hoveron,hovertemplate:BFr(),hovertemplatefallback:N0t(),zorder:K0.zorder}});var W0t=W((yci,$0t)=>{"use strict";var H0t=tt(),OFr=(k1(),Pt(E1)),_6=Wo(),NFr=Dd(),UFr=tv(),j0t=Jw(),VFr=rv(),GFr=F1(),HFr=Vse();$0t.exports=function(t,r,i,n){function a(h,p){return H0t.coerce(t,r,HFr,h,p)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l{"use strict";Y0t.exports=function(t,r){var i={},n=r._carpet,a=n.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=n.evalxy([],o,l,s,u);return i.yLabel=c[1].toFixed(3),i}});var nN=W((bci,Z0t)=>{"use strict";Z0t.exports=function(e,t){for(var r=e._fullData.length,i,n=0;n{"use strict";var K0t=hn(),jFr=Fd(),$Fr=L1(),WFr=C0(),YFr=Ld().calcMarkerSize,XFr=nN();J0t.exports=function(t,r){var i=r._carpetTrace=XFr(t,r);if(!(!i||!i.visible||i.visible==="legendonly")){var n;r.xaxis=i.xaxis,r.yaxis=i.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(n=0;n{"use strict";var ZFr=n5(),edt=Yi(),KFr=Qi();tdt.exports=function(t,r,i,n){var a,o,s,l=i[0][0].carpet,u=edt.getFromId(t,l.xaxis||"x"),c=edt.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var JFr=l5(),QFr=tt().fillText;idt.exports=function(t,r,i,n){var a=JFr(t,r,i,n);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,p=h._carpet,d=h._module.formatLabels(f,h);o.yLabel=d.yLabel,delete o.text;var v=[];function m(_,b){var M;_.labelprefix&&_.labelprefix.length>0?M=_.labelprefix.replace(/ = $/,""):M=_._hovertitle,v.push(M+": "+b.toFixed(3)+_.labelsuffix)}if(!h.hovertemplate){var g=f.hi||h.hoverinfo,w=g.split("+");w.indexOf("all")!==-1&&(w=["a","b","text"]),w.indexOf("a")!==-1&&m(p.aaxis,f.a),w.indexOf("b")!==-1&&m(p.baxis,f.b),v.push("y: "+o.yLabel),w.indexOf("text")!==-1&&QFr(f,h,v),o.extraText=v.join("
")}return a}});var odt=W((Aci,adt)=>{"use strict";adt.exports=function(t,r,i,n,a){var o=n[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var ldt=W((Mci,sdt)=>{"use strict";sdt.exports={attributes:Vse(),supplyDefaults:W0t(),colorbar:Cc(),formatLabels:X0t(),calc:Q0t(),plot:rdt(),style:lh().style,styleOnSelect:lh().styleOnSelect,hoverPoints:ndt(),selectPoints:Rb(),eventData:odt(),moduleType:"trace",name:"scattercarpet",basePlotModule:xl(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var cdt=W((Sci,udt)=>{"use strict";udt.exports=ldt()});var Gse=W((Eci,fdt)=>{"use strict";var mp=S5(),Jm=oS(),eLr=Fo(),tLr=an().extendFlat,mg=Jm.contours;fdt.exports=tLr({carpet:{valType:"string",editType:"calc"},z:mp.z,a:mp.x,a0:mp.x0,da:mp.dx,b:mp.y,b0:mp.y0,db:mp.dy,text:mp.text,hovertext:mp.hovertext,transpose:mp.transpose,atype:mp.xtype,btype:mp.ytype,fillcolor:Jm.fillcolor,autocontour:Jm.autocontour,ncontours:Jm.ncontours,contours:{type:mg.type,start:mg.start,end:mg.end,size:mg.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:mg.showlines,showlabels:mg.showlabels,labelfont:mg.labelfont,labelformat:mg.labelformat,operation:mg.operation,value:mg.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Jm.line.color,width:Jm.line.width,dash:Jm.line.dash,smoothing:Jm.line.smoothing,editType:"plot"},zorder:Jm.zorder},eLr("",{cLetter:"z",autoColorDflt:!1}))});var Hse=W((kci,pdt)=>{"use strict";var hdt=tt(),rLr=JL(),ddt=Gse(),iLr=HY(),nLr=TP(),aLr=AP();pdt.exports=function(t,r,i,n){function a(u,c){return hdt.coerce(t,r,ddt,u,c)}function o(u){return hdt.coerce2(t,r,ddt,u)}if(a("carpet"),t.a&&t.b){var s=rLr(t,r,a,n,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?iLr(t,r,a,n,i,{hasHover:!1}):(nLr(t,r,a,o),aLr(t,r,a,n,{hasHover:!1}))}else r._defaultColor=i,r._length=null;a("zorder")}});var ydt=W((Cci,mdt)=>{"use strict";var oLr=rf(),vdt=tt(),sLr=tP(),lLr=iP(),uLr=nP(),cLr=aP(),gdt=dY(),fLr=Hse(),hLr=nN(),dLr=LY();mdt.exports=function(t,r){var i=r._carpetTrace=hLr(t,r);if(!(!i||!i.visible||i.visible==="legendonly")){if(!r.a||!r.b){var n=t.data[i.index],a=t.data[r.index];a.a||(a.a=n.a),a.b||(a.b=n.b),fLr(a,r,r._defaultColor,t._fullLayout)}var o=pLr(t,r);return dLr(r,r._z),o}};function pLr(e,t){var r=t._carpetTrace,i=r.aaxis,n=r.baxis,a,o,s,l,u,c,f;i._minDtick=0,n._minDtick=0,vdt.isArray1D(t.z)&&sLr(t,i,n,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?i.makeCalcdata(t,"_a"):[],l=l?n.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=lLr(t._z||t.z,t.transpose),t._emptypoints=cLr(f),uLr(f,t._emptypoints);var h=vdt.maxRowLength(f),p=t.xtype==="scaled"?"":a,d=gdt(t,p,o,s,h,i),v=t.ytype==="scaled"?"":l,m=gdt(t,v,u,c,f.length,n),g={a:d,b:m,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&oLr(e,t,{vals:f,containerStr:"",cLetter:"z"}),[g]}});var bdt=W((Dci,xdt)=>{"use strict";var vLr=tt().isArrayOrTypedArray;xdt.exports=function(e,t,r,i){var n,a,o,s,l,u,c,f,h,p,d,v,m,g=vLr(r)?"a":"b",w=g==="a"?e.aaxis:e.baxis,_=w.smoothing,b=g==="a"?e.a2i:e.b2j,M=g==="a"?r:i,x=g==="a"?i:r,A=g==="a"?t.a.length:t.b.length,T=g==="a"?t.b.length:t.a.length,y=Math.floor(g==="a"?e.b2j(x):e.a2i(x)),E=g==="a"?function($){return e.evalxy([],$,y)}:function($){return e.evalxy([],y,$)};_&&(o=Math.max(0,Math.min(T-2,y)),s=y-o,a=g==="a"?function($,X){return e.dxydi([],$,o,X,s)}:function($,X){return e.dxydj([],o,$,s,X)});var S=b(M[0]),C=b(M[1]),k=S0?Math.floor:Math.ceil,P=k>0?Math.ceil:Math.floor,R=k>0?Math.min:Math.max,L=k>0?Math.max:Math.min,I=F(S+D),B=P(C-D);c=E(S);var O=[[c]];for(n=I;n*k{"use strict";var oN=gi(),sN=qse(),Mdt=Ose(),g8=Qi(),Qm=tt(),gLr=IY(),mLr=RY(),z3=EP(),aN=(uS(),Pt(lS)),yLr=OY(),xLr=qY(),bLr=NY(),_Lr=nN(),_dt=bdt();Sdt.exports=function(t,r,i,n){var a=r.xaxis,o=r.yaxis;Qm.makeTraceGroups(n,i,"contour").each(function(s){var l=oN.select(this),u=s[0],c=u.trace,f=c._carpetTrace=_Lr(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var p=u.a,d=u.b,v=c.contours,m=xLr(v,r,u),g=v.type==="constraint",w=v._operation,_=g?w==="="?"lines":"fill":v.coloring;function b(F){var P=f.ab2xy(F[0],F[1],!0);return[a.c2p(P[0]),o.c2p(P[1])]}var M=[[p[0],d[d.length-1]],[p[p.length-1],d[d.length-1]],[p[p.length-1],d[0]],[p[0],d[0]]];gLr(m);var x=(p[p.length-1]-p[0])*1e-8,A=(d[d.length-1]-d[0])*1e-8;mLr(m,x,A);var T=m;v.type==="constraint"&&(T=yLr(m,w)),wLr(m,b);var y,E,S,C,k=[];for(C=h.clipsegments.length-1;C>=0;C--)y=h.clipsegments[C],E=sN([],y.x,a.c2p),S=sN([],y.y,o.c2p),E.reverse(),S.reverse(),k.push(Mdt(E,S,y.bicubic));var D="M"+k.join("L")+"Z";MLr(l,h.clipsegments,a,o,g,_),SLr(c,l,a,o,T,M,b,f,h,_,D),TLr(l,m,t,u,v,r,f),g8.setClipUrl(l,f._clipPathId,t)})};function wLr(e,t){var r,i,n,a,o,s,l,u,c;for(r=0;rm&&(i.max=m),i.len=i.max-i.min}function wdt(e,t,r){var i=e.getPointAtLength(t),n=e.getPointAtLength(r),a=n.x-i.x,o=n.y-i.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function Tdt(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function Adt(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),i=Math.sqrt(1-r*r);return i/r}function MLr(e,t,r,i,n,a){var o,s,l,u,c=Qm.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!n?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u=0&&(p=E,v=m):Math.abs(h[1]-p[1])<_?Math.abs(h[1]-E[1])<_&&(E[0]-h[0])*(p[0]-E[0])>=0&&(p=E,v=m):Qm.log("endpt to newendpt is not vert. or horz.",h,p,E)}if(v>=0)break;u+=T(h,p),h=p}if(v===t.edgepaths.length){Qm.log("unclosed perimeter path");break}l=v,f=c.indexOf(l)===-1,f&&(l=c[0],u+=T(h,p)+"Z",h=null)}for(l=0;l{"use strict";kdt.exports={attributes:Gse(),supplyDefaults:Hse(),colorbar:DP(),calc:ydt(),plot:Edt(),style:CP(),moduleType:"trace",name:"contourcarpet",basePlotModule:xl(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var Fdt=W((Pci,Ddt)=>{"use strict";Ddt.exports=Cdt()});var uN=W((Ici,zdt)=>{"use strict";var lN=tt().extendFlat,m8=Ws(),Ldt=Ts().axisHoverFormat,{hovertemplateAttrs:kLr,templatefallbackAttrs:CLr}=Wa(),Idt=zu().dash,DLr=tw(),Rdt=(G5(),Pt(V5)),FLr=Rdt.INCREASING.COLOR,LLr=Rdt.DECREASING.COLOR,jse=m8.line;function Pdt(e){return{line:{color:lN({},jse.color,{dflt:e}),width:jse.width,dash:Idt,editType:"style"},editType:"style"}}zdt.exports={xperiod:m8.xperiod,xperiod0:m8.xperiod0,xperiodalignment:m8.xperiodalignment,xhoverformat:Ldt("x"),yhoverformat:Ldt("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:lN({},jse.width,{}),dash:lN({},Idt,{}),editType:"style"},increasing:Pdt(FLr),decreasing:Pdt(LLr),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:kLr({},{keys:["open","high","low","close"]}),hovertemplatefallback:CLr(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:lN({},DLr.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:m8.zorder}});var $se=W((Rci,Bdt)=>{"use strict";var PLr=xi(),ILr=tt();Bdt.exports=function(t,r,i,n){var a=i("x"),o=i("open"),s=i("high"),l=i("low"),u=i("close");i("hoverlabel.split");var c=PLr.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],n),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,ILr.minRowLength(a))),r._length=f,f}}});var Ndt=W((zci,Odt)=>{"use strict";var RLr=tt(),zLr=$se(),BLr=ev(),qLr=uN();Odt.exports=function(t,r,i,n){function a(s,l){return RLr.coerce(t,r,qLr,s,l)}var o=zLr(t,r,a,n);if(!o){r.visible=!1;return}BLr(t,r,n,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),qdt(t,r,a,"increasing"),qdt(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),n._requestRangeslider[r.xaxis]=!0,a("zorder")};function qdt(e,t,r,i){r(i+".line.color"),r(i+".line.width",t.line.width),r(i+".line.dash",t.line.dash)}});var Wse=W((Bci,Vdt)=>{"use strict";var w6=tt(),cN=w6._,fN=Yi(),OLr=iv(),y8=(ra(),Pt(ia)).BADNUM;function NLr(e,t){var r=fN.getFromId(e,t.xaxis),i=fN.getFromId(e,t.yaxis),n=VLr(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=Udt(e,t,o,s,i,ULr);return t._extremes[r._id]=fN.findExtremes(r,s,{vpad:a/2}),l.length?(w6.extendFlat(l[0].t,{wHover:a/2,tickLen:n}),l):[{t:{empty:!0}}]}function ULr(e,t,r,i){return{o:e,h:t,l:r,c:i}}function Udt(e,t,r,i,n,a){for(var o=n.makeCalcdata(t,"open"),s=n.makeCalcdata(t,"high"),l=n.makeCalcdata(t,"low"),u=n.makeCalcdata(t,"close"),c=w6.isArrayOrTypedArray(t.text),f=w6.isArrayOrTypedArray(t.hovertext),h=!0,p=null,d=!!t.xperiodalignment,v=[],m=0;mp):h=M>w,p=M;var x=a(w,_,b,M);x.pos=g,x.yc=(w+M)/2,x.i=m,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[b,_],d&&(x.orig_p=r[m]),c&&(x.tx=t.text[m]),f&&(x.htx=t.hovertext[m]),v.push(x)}else v.push({pos:g,empty:!0})}return t._extremes[n._id]=fN.findExtremes(n,w6.concat(l,s),{padded:!0}),v.length&&(v[0].t={labels:{open:cN(e,"open:")+" ",high:cN(e,"high:")+" ",low:cN(e,"low:")+" ",close:cN(e,"close:")+" "}}),v}function VLr(e,t,r){var i=r._minDiff;if(!i){var n=e._fullData,a=[];i=1/0;var o;for(o=0;o{"use strict";var GLr=gi(),Gdt=tt();Hdt.exports=function(t,r,i,n){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;Gdt.makeTraceGroups(n,i,"trace ohlc").each(function(l){var u=GLr.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var p=f.tickLen,d=u.selectAll("path").data(Gdt.identity);d.enter().append("path"),d.exit().remove(),d.attr("d",function(v){if(v.empty)return"M0,0Z";var m=o.c2p(v.pos-p,!0),g=o.c2p(v.pos+p,!0),w=s?(m+g)/2:o.c2p(v.pos,!0),_=a.c2p(v.o,!0),b=a.c2p(v.h,!0),M=a.c2p(v.l,!0),x=a.c2p(v.c,!0);return"M"+m+","+_+"H"+w+"M"+w+","+b+"V"+M+"M"+g+","+x+"H"+w})})}});var Wdt=W((Oci,$dt)=>{"use strict";var Yse=gi(),HLr=Qi(),jLr=ti();$dt.exports=function(t,r,i){var n=i||Yse.select(t).selectAll("g.ohlclayer").selectAll("g.trace");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var o=a[0].trace;Yse.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;Yse.select(this).style("fill","none").call(jLr.stroke,l.color).call(HLr.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var Zse=W((Nci,Jdt)=>{"use strict";var Xse=Yi(),$Lr=tt(),hN=Is(),WLr=ti(),YLr=tt().fillText,Ydt=(G5(),Pt(V5)),XLr={increasing:Ydt.INCREASING.SYMBOL,decreasing:Ydt.DECREASING.SYMBOL};function ZLr(e,t,r,i){var n=e.cd,a=n[0].trace;return a.hoverlabel.split?Zdt(e,t,r,i):Kdt(e,t,r,i)}function Xdt(e,t,r,i){var n=e.cd,a=e.xa,o=n[0].trace,s=n[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,p=s.bPos||0,d=function(E){return E.pos+p-t},v=s.bdPos||s.tickLen,m=s.wHover,g=Math.min(1,v/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-g,h=e.maxSpikeDistance-g;function w(E){var S=d(E);return hN.inbox(S-m,S+m,f)}function _(E){var S=E[u],C=E[c];return S===C||hN.inbox(S-r,C-r,f)}function b(E){return(w(E)+_(E))/2}var M=hN.getDistanceFunction(i,w,_,b);if(hN.getClosest(n,M,e),e.index===!1)return null;var x=n[e.index];if(x.empty)return null;var A=x.dir,T=o[A],y=T.line.color;return WLr.opacity(y)&&T.line.width?e.color=y:e.color=T.fillcolor,e.x0=a.c2p(x.pos+p-v,!0),e.x1=a.c2p(x.pos+p+v,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=b(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function Zdt(e,t,r,i){var n=e.cd,a=e.ya,o=n[0].trace,s=n[0].t,l=[],u=Xdt(e,t,r,i);if(!u)return[];var c=n[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],p={},d=0;d"+s.labels[v]+Xse.hoverLabelText(a,m,o.yhoverformat)):(w=$Lr.extendFlat({},u),w.y0=w.y1=g,w.yLabelVal=m,w.yLabel=s.labels[v]+Xse.hoverLabelText(a,m,o.yhoverformat),w.name="",l.push(w),p[m]=w)}return l}function Kdt(e,t,r,i){var n=e.cd,a=e.ya,o=n[0].trace,s=n[0].t,l=Xdt(e,t,r,i);if(!l)return[];var u=l.index,c=n[u],f=l.index=c.i,h=c.dir;function p(b){return s.labels[b]+Xse.hoverLabelText(a,o[b][f],o.yhoverformat)}var d=c.hi||o.hoverinfo||"",v=d.split("+"),m=d==="all",g=m||v.indexOf("y")!==-1,w=m||v.indexOf("text")!==-1,_=g?[p("open"),p("high"),p("low"),p("close")+" "+XLr[h]]:[];return w&&YLr(c,o,_),l.extraText=_.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}Jdt.exports={hoverPoints:ZLr,hoverSplit:Zdt,hoverOnPoints:Kdt}});var Kse=W((Uci,Qdt)=>{"use strict";Qdt.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l=i[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";ept.exports={moduleType:"trace",name:"ohlc",basePlotModule:xl(),categories:["cartesian","svg","showLegend"],meta:{},attributes:uN(),supplyDefaults:Ndt(),calc:Wse().calc,plot:jdt(),style:Wdt(),hoverPoints:Zse().hoverPoints,selectPoints:Kse()}});var ipt=W((Gci,rpt)=>{"use strict";rpt.exports=tpt()});var Qse=W((Hci,opt)=>{"use strict";var Jse=tt().extendFlat,npt=Ts().axisHoverFormat,xh=uN(),T6=KM();function apt(e){return{line:{color:Jse({},T6.line.color,{dflt:e}),width:T6.line.width,editType:"style"},fillcolor:T6.fillcolor,editType:"style"}}opt.exports={xperiod:xh.xperiod,xperiod0:xh.xperiod0,xperiodalignment:xh.xperiodalignment,xhoverformat:npt("x"),yhoverformat:npt("y"),x:xh.x,open:xh.open,high:xh.high,low:xh.low,close:xh.close,line:{width:Jse({},T6.line.width,{}),editType:"style"},increasing:apt(xh.increasing.line.color.dflt),decreasing:apt(xh.decreasing.line.color.dflt),text:xh.text,hovertext:xh.hovertext,hovertemplate:xh.hovertemplate,hovertemplatefallback:xh.hovertemplatefallback,whiskerwidth:Jse({},T6.whiskerwidth,{dflt:0}),hoverlabel:xh.hoverlabel,zorder:T6.zorder}});var upt=W((jci,lpt)=>{"use strict";var KLr=tt(),JLr=ti(),QLr=$se(),ePr=ev(),tPr=Qse();lpt.exports=function(t,r,i,n){function a(s,l){return KLr.coerce(t,r,tPr,s,l)}var o=QLr(t,r,a,n);if(!o){r.visible=!1;return}ePr(t,r,n,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),spt(t,r,a,"increasing"),spt(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),n._requestRangeslider[r.xaxis]=!0,a("zorder")};function spt(e,t,r,i){var n=r(i+".line.color");r(i+".line.width",t.line.width),r(i+".fillcolor",JLr.addOpacity(n,.5))}});var dpt=W(($ci,hpt)=>{"use strict";var cpt=tt(),fpt=Yi(),rPr=iv(),iPr=Wse().calcCommon;hpt.exports=function(e,t){var r=e._fullLayout,i=fpt.getFromId(e,t.xaxis),n=fpt.getFromId(e,t.yaxis),a=i.makeCalcdata(t,"x"),o=rPr(t,i,"x",a).vals,s=iPr(e,t,a,o,n,nPr);return s.length?(cpt.extendFlat(s[0].t,{num:r._numBoxes,dPos:cpt.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function nPr(e,t,r,i){return{min:r,q1:Math.min(e,i),med:i,q3:Math.max(e,i),max:t}}});var vpt=W((Wci,ppt)=>{"use strict";ppt.exports={moduleType:"trace",name:"candlestick",basePlotModule:xl(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:Qse(),layoutAttributes:JM(),supplyLayoutDefaults:$L().supplyLayoutDefaults,crossTraceCalc:YL().crossTraceCalc,supplyDefaults:upt(),calc:dpt(),plot:XL().plot,layerName:"boxlayer",style:ZL().style,hoverPoints:Zse().hoverPoints,selectPoints:Kse()}});var mpt=W((Yci,gpt)=>{"use strict";gpt.exports=vpt()});var tle=W((Xci,ypt)=>{"use strict";var pN=tt(),aPr=g1(),dN=pN.deg2rad,ele=pN.rad2deg;ypt.exports=function(t,r,i){switch(aPr(t,i),t._id){case"x":case"radialaxis":oPr(t,r);break;case"angularaxis":uPr(t,r);break}};function oPr(e,t){var r=t._subplot;e.setGeometry=function(){var i=e._rl[0],n=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(n-i),s=a/o,l=i>n?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-i;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+i-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function sPr(e,t){return t==="degrees"?dN(e):e}function lPr(e,t){return t==="degrees"?ele(e):e}function uPr(e,t){var r=e.type;if(r==="linear"){var i=e.d2c,n=e.c2d;e.d2c=function(a,o){return sPr(i(a),o)},e.c2d=function(a,o){return n(lPr(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(m){return e.d2c(m,a.thetaunit)};if(s)for(u=new Array(l),c=0;cxPr,MINZOOM:()=>bPr,OFFEDGE:()=>_Pr,angularDragBoxSize:()=>gPr,attr:()=>cPr,axisName2dataArray:()=>dPr,axisNames:()=>hPr,cornerHalfWidth:()=>yPr,cornerLen:()=>mPr,layerNames:()=>pPr,name:()=>fPr,radialDragBoxSize:()=>vPr});var cPr,fPr,hPr,dPr,pPr,vPr,gPr,mPr,yPr,xPr,bPr,_Pr,gN=Ci(()=>{"use strict";cPr="subplot",fPr="polar",hPr=["angularaxis","radialaxis"],dPr={angularaxis:"theta",radialaxis:"r"},pPr=["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],vPr=50,gPr=30,mPr=25,yPr=2,xPr=8,bPr=20,_Pr=20});var yN=W((Zci,Tpt)=>{"use strict";var B3=tt(),xpt=nM().tester,rle=B3.findIndexOfMin,_pt=B3.isAngleInsideSector,wPr=B3.angleDelta,bpt=B3.angleDist;function TPr(e,t,r,i,n){if(!_pt(t,i))return!1;var a,o;r[0]0?o:1/0},i=rle(t,r),n=B3.mod(i+1,t.length);return[t[i],t[n]]}function mN(e){return Math.abs(e)>1e-10?e:0}function ile(e,t,r){t=t||0,r=r||0;for(var i=e.length,n=new Array(i),a=0;a{"use strict";function Apt(e){return e<0?-1:e>0?1:0}function M6(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var i=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/i,2*r/i]}function S6(e,t){var r=t[0],i=t[1];return[r*e.radius+e.cx,-i*e.radius+e.cy]}function Mpt(e,t){return t*e.radius}function FPr(e,t,r,i){var n=S6(e,M6([r,t])),a=n[0],o=n[1],s=S6(e,M6([i,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=Mpt(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function LPr(e,t,r,i){var n=Mpt(e,1/(t+1)),a=S6(e,M6([t,r])),o=a[0],s=a[1],l=S6(e,M6([t,i])),u=l[0],c=l[1];if(Apt(r)!==Apt(i)){var f=S6(e,M6([t,0])),h=f[0],p=f[1];return["M"+o+","+s,"A"+n+","+n+" 0 0,"+(0{"use strict";var q3=gi(),N3=xi(),gs=tt(),yg=gs.strRotate,Yu=gs.strTranslate,wN=ti(),x8=Qi(),PPr=Qo(),bh=Yi(),IPr=g1(),RPr=tle(),zPr=Yp().doAutoRange,ey=i$(),_N=Ef(),Ept=Is(),BPr=pb(),qPr=xu().prepSelect,OPr=xu().selectOnClick,ale=xu().clearOutline,kpt=Xp(),Cpt=GA(),Dpt=JA().redrawReglTraces,NPr=(Jl(),Pt(Kl)).MID_SHIFT,Ex=(gN(),Pt(vN)),ty=yN(),TN=nle(),xN=TN.smith,UPr=TN.reactanceArc,VPr=TN.resistanceArc,bN=TN.smithTransform,GPr=gs._,Fpt=gs.mod,kx=gs.deg2rad,O3=gs.rad2deg;function Lpt(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var i=e._fullLayout,n="clip"+i._uid+t;this.clipIds.forTraces=n+"-for-traces",this.clipPaths.forTraces=i._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=i["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var gc=Lpt.prototype;Rpt.exports=function(t,r,i){return new Lpt(t,r,i)};gc.plot=function(e,t){for(var r=this,i=t[r.id],n=!1,a=0;am?(g=u,w=u*m,M=(c-w)/n.h/2,_=[s[0],s[1]],b=[l[0]+M,l[1]-M]):(g=c/m,w=c,M=(u-g)/n.w/2,_=[s[0]+M,s[1]-M],b=[l[0],l[1]]),r.xLength2=g,r.yLength2=w,r.xDomain2=_,r.yDomain2=b;var x=r.xOffset2=n.l+n.w*_[0],A=r.yOffset2=n.t+n.h*(1-b[1]),T=r.radius=g/p,y=r.innerRadius=r.getHole(t)*T,E=r.cx=x-T*h[0],S=r.cy=A+T*h[3],C=r.cxx=E-x,k=r.cyy=S-A,D=a.side,F;D==="counterclockwise"?(F=D,D="top"):D==="clockwise"&&(F=D,D="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:D,_trueSide:F,domain:[y/n.w,T/n.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:_}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:b});var P=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",P).attr("transform",Yu(C,k)),i.frontplot.attr("transform",Yu(x,A)).call(x8.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),i.bg.attr("d",P).attr("transform",Yu(E,S)).call(wN.fill,t.bgcolor)};gc.mockAxis=function(e,t,r,i){var n=gs.extendFlat({},r,i);return RPr(n,t,e),n};gc.mockCartesianAxis=function(e,t,r){var i=this,n=i.isSmith,a=r._id,o=gs.extendFlat({type:"linear"},r);IPr(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=i.sectorBBox,u=s[a],c=i.radialAxis._rl,f=(c[1]-c[0])/(1-i.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!n?function(l){return i.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};gc.doAutoRange=function(e,t){var r=this,i=r.gd,n=r.radialAxis,a=r.getRadial(t);zPr(i,n);var o=n.range;if(a.range=o.slice(),a._input.range=o.slice(),n._rl=[n.r2l(o[0],null,"gregorian"),n.r2l(o[1],null,"gregorian")],n.minallowed!==void 0){var s=n.r2l(n.minallowed);n._rl[0]>n._rl[1]?n._rl[1]=Math.max(n._rl[1],s):n._rl[0]=Math.max(n._rl[0],s)}if(n.maxallowed!==void 0){var l=n.r2l(n.maxallowed);n._rl[0]90&&c<=270&&(f.tickangle=180);var d=p?function(T){var y=bN(r,xN([T.x,0]));return Yu(y[0]-s,y[1]-l)}:function(T){return Yu(f.l2p(T.x)+o,0)},v=p?function(T){return VPr(r,T.x,-1/0,1/0)}:function(T){return r.pathArc(f.r2p(T.x)+o)},m=Ppt(u);if(r.radialTickLayout!==m&&(n["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),h){f.setScale();var g=0,w=p?(f.tickvals||[]).filter(function(T){return T>=0}).map(function(T){return bh.tickText(f,T,!0,!1)}):bh.calcTicks(f),_=p?w:bh.clipEnds(f,w),b=bh.getTickSigns(f)[2];p&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(b=-b),f.ticks==="top"&&f.side==="top"&&(g=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(g=f.ticklen)),bh.drawTicks(i,f,{vals:w,layer:n["radial-axis"],path:bh.makeTickPath(f,0,b),transFn:d,crisp:!1}),bh.drawGrid(i,f,{vals:_,layer:n["radial-grid"],path:v,transFn:gs.noop,crisp:!1}),bh.drawLabels(i,f,{vals:w,layer:n["radial-axis"],transFn:d,labelFns:bh.makeLabelFns(f,g)})}var M=r.radialAxisAngle=r.vangles?O3(Ipt(kx(u.angle),r.vangles)):u.angle,x=Yu(s,l),A=x+yg(-M);b8(n["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:A}),b8(n["radial-grid"],h&&u.showgrid,{transform:p?"":x}),b8(n["radial-line"].select("line"),h&&u.showline,{x1:p?-a:o,y1:0,x2:a,y2:0,transform:A}).attr("stroke-width",u.linewidth).call(wN.stroke,u.linecolor)};gc.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var i=this,n=i.gd,a=i.radius,o=i.cx,s=i.cy,l=i.getRadial(t),u=i.id+"title",c=0;if(l.title){var f=x8.bBox(i.layers["radial-axis"].node()).height,h=l.title.font.size,p=l.side;c=p==="top"?h:p==="counterclockwise"?-(f+h*.4):f+h*.8}var d=r!==void 0?r:i.radialAxisAngle,v=kx(d),m=Math.cos(v),g=Math.sin(v),w=o+a/2*m+c*g,_=s-a/2*g+c*m;i.layers["radial-axis-title"]=BPr.draw(n,u,{propContainer:l,propName:i.id+".radialaxis.title.text",placeholder:GPr(n,"Click to enter radial axis title"),attributes:{x:w,y:_,"text-anchor":"middle"},transform:{rotate:-d}})}};gc.updateAngularAxis=function(e,t){var r=this,i=r.gd,n=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(y){var E=bN(r,xN([0,y.x]));return Math.atan2(E[0]-s,E[1]-l)-Math.PI/2}:function(y){return c.t2g(y.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=O3(c.tick0),c.dtick=O3(c.dtick));var p=function(y){return Yu(s+a*Math.cos(y),l-a*Math.sin(y))},d=f?function(y){var E=bN(r,xN([0,y.x]));return Yu(E[0],E[1])}:function(y){return p(h(y))},v=f?function(y){var E=bN(r,xN([0,y.x])),S=Math.atan2(E[0]-s,E[1]-l)-Math.PI/2;return Yu(E[0],E[1])+yg(-O3(S))}:function(y){var E=h(y);return p(E)+yg(-O3(E))},m=f?function(y){return UPr(r,y.x,0,1/0)}:function(y){var E=h(y),S=Math.cos(E),C=Math.sin(E);return"M"+[s+o*S,l-o*C]+"L"+[s+a*S,l-a*C]},g=bh.makeLabelFns(c,0),w=g.labelStandoff,_={};_.xFn=function(y){var E=h(y);return Math.cos(E)*w},_.yFn=function(y){var E=h(y),S=Math.sin(E)>0?.2:1;return-Math.sin(E)*(w+y.fontSize*S)+Math.abs(Math.cos(E))*(y.fontSize*NPr)},_.anchorFn=function(y){var E=h(y),S=Math.cos(E);return Math.abs(S)<.1?"middle":S>0?"start":"end"},_.heightFn=function(y,E,S){var C=h(y);return-.5*(1+Math.sin(C))*S};var b=Ppt(u);r.angularTickLayout!==b&&(n["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=b);var M=f?[1/0].concat(c.tickvals||[]).map(function(y){return bh.tickText(c,y,!0,!1)}):bh.calcTicks(c);f&&(M[0].text="\u221E",M[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=M.map(h),gs.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(M=M.filter(function(y){return gs.isAngleInsideSector(h(y),r.sectorInRad)})),c.visible){var A=c.ticks==="inside"?-1:1,T=(c.linewidth||1)/2;bh.drawTicks(i,c,{vals:M,layer:n["angular-axis"],path:"M"+A*T+",0h"+A*c.ticklen,transFn:v,crisp:!1}),bh.drawGrid(i,c,{vals:M,layer:n["angular-grid"],path:m,transFn:gs.noop,crisp:!1}),bh.drawLabels(i,c,{vals:M,layer:n["angular-axis"],repositionOnUpdate:!0,transFn:d,labelFns:_})}b8(n["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:Yu(s,l)}).attr("stroke-width",u.linewidth).call(wN.stroke,u.linecolor)};gc.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};gc.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,i=t.gd,n=t.layers,a=e._zoomlayer,o=Ex.MINZOOM,s=Ex.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,p=t.cyy,d=t.sectorInRad,v=t.vangles,m=t.radialAxis,g=ty.clampTiny,w=ty.findXYatLength,_=ty.findEnclosingVertexAngles,b=Ex.cornerHalfWidth,M=Ex.cornerLen/2,x,A,T=ey.makeDragger(n,"path","maindrag",e.dragmode===!1?"none":"crosshair");q3.select(T).attr("d",t.pathSubplot()).attr("transform",Yu(c,f)),T.onmousemove=function(te){Ept.hover(i,te,t.id),i._fullLayout._lasthover=T,i._fullLayout._hoversubplot=t.id},T.onmouseout=function(te){i._dragging||_N.unhover(i,te)};var y={element:T,gd:i,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},E,S,C,k,D,F,P,R,L;function I(te,ue){return Math.sqrt(te*te+ue*ue)}function B(te,ue){return I(te-h,ue-p)}function O(te,ue){return Math.atan2(p-ue,te-h)}function $(te,ue){return[te*Math.cos(ue),te*Math.sin(-ue)]}function X(te,ue){if(te===0)return t.pathSector(2*b);var ge=M/te,Ee=ue-ge,xe=ue+ge,ce=Math.max(0,Math.min(te,l)),oe=ce-b,Se=ce+b;return"M"+$(oe,Ee)+"A"+[oe,oe]+" 0,0,0 "+$(oe,xe)+"L"+$(Se,xe)+"A"+[Se,Se]+" 0,0,1 "+$(Se,Ee)+"Z"}function K(te,ue,ge){if(te===0)return t.pathSector(2*b);var Ee=$(te,ue),xe=$(te,ge),ce=g((Ee[0]+xe[0])/2),oe=g((Ee[1]+xe[1])/2),Se,be;if(ce&&oe){var fe=oe/ce,ee=-1/fe,ae=w(b,fe,ce,oe);Se=w(M,ee,ae[0][0],ae[0][1]),be=w(M,ee,ae[1][0],ae[1][1])}else{var _e,re;oe?(_e=M,re=b):(_e=b,re=M),Se=[[ce-_e,oe-re],[ce+_e,oe-re]],be=[[ce-_e,oe+re],[ce+_e,oe+re]]}return"M"+Se.join("L")+"L"+be.reverse().join("L")+"Z"}function G(){C=null,k=null,D=t.pathSubplot(),F=!1;var te=i._fullLayout[t.id];P=wN.luminosity(te.bgcolor),R=ey.makeZoombox(a,P,c,f,D),R.attr("fill-rule","evenodd"),L=ey.makeCorners(a,c,f),ale(i)}function q(te,ue){return ue=Math.max(Math.min(ue,l),u),teo?(te-1&&te===1&&OPr(ue,i,[t.xaxis],[t.yaxis],t.id,y),ge.indexOf("event")>-1&&Ept.click(i,ue,t.id)}y.prepFn=function(te,ue,ge){var Ee=i._fullLayout.dragmode,xe=T.getBoundingClientRect();i._fullLayout._calcInverseTransform(i);var ce=i._fullLayout._invTransform;x=i._fullLayout._invScaleX,A=i._fullLayout._invScaleY;var oe=gs.apply3DTransform(ce)(ue-xe.left,ge-xe.top);if(E=oe[0],S=oe[1],v){var Se=ty.findPolygonOffset(l,d[0],d[1],v);E+=h+Se[0],S+=p+Se[1]}switch(Ee){case"zoom":y.clickFn=Q,r||(v?y.moveFn=Y:y.moveFn=N,y.doneFn=H,G(te,ue,ge));break;case"select":case"lasso":qPr(te,ue,ge,y,Ee);break}},_N.init(y)};gc.updateRadialDrag=function(e,t,r){var i=this,n=i.gd,a=i.layers,o=i.radius,s=i.innerRadius,l=i.cx,u=i.cy,c=i.radialAxis,f=Ex.radialDragBoxSize,h=f/2;if(!c.visible)return;var p=kx(i.radialAxisAngle),d=c._rl,v=d[0],m=d[1],g=d[r],w=.75*(d[1]-d[0])/(1-i.getHole(t))/o,_,b,M;r?(_=l+(o+h)*Math.cos(p),b=u-(o+h)*Math.sin(p),M="radialdrag"):(_=l+(s-h)*Math.cos(p),b=u-(s-h)*Math.sin(p),M="radialdrag-inner");var x=ey.makeRectDragger(a,M,"crosshair",-h,-h,f,f),A={element:x,gd:n};e.dragmode===!1&&(A.dragmode=!1),b8(q3.select(x),c.visible&&s0!=(r?E>v:E=90||n>90&&a>=450?p=1:s<=0&&u<=0?p=0:p=Math.max(s,u),n<=180&&a>=180||n>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),n<=270&&a>=270||n>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,p]}function Ipt(e,t){var r=function(n){return gs.angleDist(e,n)},i=gs.findIndexOfMin(t,r);return t[i]}function b8(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var sle=W((Qci,Upt)=>{"use strict";var jPr=Yl(),Bn=ac(),$Pr=ds().attributes,J0=tt().extendFlat,zpt=hs().overrideAll,Bpt=zpt({color:Bn.color,showline:J0({},Bn.showline,{dflt:!0}),linecolor:Bn.linecolor,linewidth:Bn.linewidth,showgrid:J0({},Bn.showgrid,{dflt:!0}),gridcolor:Bn.gridcolor,gridwidth:Bn.gridwidth,griddash:Bn.griddash},"plot","from-root"),qpt=zpt({tickmode:Bn.minor.tickmode,nticks:Bn.nticks,tick0:Bn.tick0,dtick:Bn.dtick,tickvals:Bn.tickvals,ticktext:Bn.ticktext,ticks:Bn.ticks,ticklen:Bn.ticklen,tickwidth:Bn.tickwidth,tickcolor:Bn.tickcolor,ticklabelstep:Bn.ticklabelstep,showticklabels:Bn.showticklabels,labelalias:Bn.labelalias,minorloglabels:Bn.minorloglabels,showtickprefix:Bn.showtickprefix,tickprefix:Bn.tickprefix,showticksuffix:Bn.showticksuffix,ticksuffix:Bn.ticksuffix,showexponent:Bn.showexponent,exponentformat:Bn.exponentformat,minexponent:Bn.minexponent,separatethousands:Bn.separatethousands,tickfont:Bn.tickfont,tickangle:Bn.tickangle,tickformat:Bn.tickformat,tickformatstops:Bn.tickformatstops,layer:Bn.layer},"plot","from-root"),Opt={visible:J0({},Bn.visible,{dflt:!0}),type:J0({},Bn.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Bn.autotypenumbers,autorangeoptions:{minallowed:Bn.autorangeoptions.minallowed,maxallowed:Bn.autorangeoptions.maxallowed,clipmin:Bn.autorangeoptions.clipmin,clipmax:Bn.autorangeoptions.clipmax,include:Bn.autorangeoptions.include,editType:"plot"},autorange:J0({},Bn.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:J0({},Bn.minallowed,{editType:"plot"}),maxallowed:J0({},Bn.maxallowed,{editType:"plot"}),range:J0({},Bn.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Bn.categoryorder,categoryarray:Bn.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Bn.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:J0({},Bn.title.text,{editType:"plot",dflt:""}),font:J0({},Bn.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Bn.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};J0(Opt,Bpt,qpt);var Npt={visible:J0({},Bn.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Bn.autotypenumbers,categoryorder:Bn.categoryorder,categoryarray:Bn.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:Bn.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};J0(Npt,Bpt,qpt);Upt.exports={domain:$Pr({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:jPr.background},radialaxis:Opt,angularaxis:Npt,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var jpt=W((efi,Hpt)=>{"use strict";var AN=tt(),WPr=ti(),YPr=Ra(),XPr=Kb(),ZPr=Mc().getSubplotData,KPr=ub(),JPr=Cw(),QPr=Py(),e9r=Iy(),t9r=rL(),r9r=FM(),i9r=FH(),n9r=Rw(),Gpt=sle(),a9r=tle(),MN=(gN(),Pt(vN)),Vpt=MN.axisNames;function o9r(e,t,r,i){var n=r("bgcolor");i.bgColor=WPr.combine(n,i.paper_bgcolor);var a=r("sector");r("hole");var o=ZPr(i.fullData,MN.name,i.id),s=i.layoutOut,l;function u(R,L){return r(l+"."+R,L)}for(var c=0;c{"use strict";var l9r=Mc().getSubplotCalcData,u9r=tt().counterRegex,c9r=ole(),Wpt=(gN(),Pt(vN)),Ypt=Wpt.attr,U3=Wpt.name,$pt=u9r(U3),Xpt={};Xpt[Ypt]={valType:"subplotid",dflt:U3,editType:"calc"};function f9r(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[U3],n=0;n{"use strict";var{hovertemplateAttrs:d9r,texttemplateAttrs:p9r,templatefallbackAttrs:Kpt}=Wa(),EN=an().extendFlat,v9r=C1(),Q0=Ws(),g9r=Ja(),E6=Q0.line;Jpt.exports={mode:Q0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:Q0.text,texttemplate:p9r({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:Kpt({editType:"plot"}),hovertext:Q0.hovertext,line:{color:E6.color,width:E6.width,dash:E6.dash,backoff:E6.backoff,shape:EN({},E6.shape,{values:["linear","spline"]}),smoothing:E6.smoothing,editType:"calc"},connectgaps:Q0.connectgaps,marker:Q0.marker,cliponaxis:EN({},Q0.cliponaxis,{dflt:!1}),textposition:Q0.textposition,textfont:Q0.textfont,fill:EN({},Q0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v9r(),hoverinfo:EN({},g9r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:Q0.hoveron,hovertemplate:d9r(),hovertemplatefallback:Kpt(),selected:Q0.selected,unselected:Q0.unselected}});var CN=W((ifi,tvt)=>{"use strict";var kN=tt(),k6=Wo(),m9r=Dd(),y9r=tv(),Qpt=Jw(),x9r=rv(),b9r=F1(),_9r=(k1(),Pt(E1)).PTS_LINESONLY,w9r=_8();function T9r(e,t,r,i){function n(s,l){return kN.coerce(e,t,w9r,s,l)}var a=evt(e,t,i,n);if(!a){t.visible=!1;return}n("thetaunit"),n("mode",a<_9r?"lines+markers":"lines"),n("text"),n("hovertext"),t.hoveron!=="fills"&&(n("hovertemplate"),n("hovertemplatefallback")),k6.hasMarkers(t)&&m9r(e,t,r,i,n,{gradient:!0}),k6.hasLines(t)&&(y9r(e,t,r,i,n,{backoff:!0}),Qpt(e,t,n),n("connectgaps")),k6.hasText(t)&&(n("texttemplate"),n("texttemplatefallback"),x9r(e,t,i,n));var o=[];(k6.hasMarkers(t)||k6.hasText(t))&&(n("cliponaxis"),n("marker.maxdisplayed"),o.push("points")),n("fill"),t.fill!=="none"&&(b9r(e,t,r,n),k6.hasLines(t)||Qpt(e,t,n)),(t.fill==="tonext"||t.fill==="toself")&&o.push("fills"),n("hoveron",o.join("+")||"points"),kN.coerceSelectionMarkerOpacity(t,n)}function evt(e,t,r,i){var n=i("r"),a=i("theta");kN.isTypedArray(n)&&(t.r=n=Array.from(n)),kN.isTypedArray(a)&&(t.theta=a=Array.from(a));var o;if(n)a?o=Math.min(n.length,a.length):(o=n.length,i("theta0"),i("dtheta"));else{if(!a)return 0;o=t.theta.length,i("r0"),i("dr")}return t._length=o,o}tvt.exports={handleRThetaDefaults:evt,supplyDefaults:T9r}});var DN=W((nfi,ivt)=>{"use strict";var A9r=tt(),rvt=Yi();ivt.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=i[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);n.rLabel=rvt.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?A9r.rad2deg(t.theta):t.theta;return n.thetaLabel=rvt.tickText(s,u,!0).text,n}});var ovt=W((afi,avt)=>{"use strict";var nvt=hn(),M9r=(ra(),Pt(ia)).BADNUM,S9r=Yi(),E9r=Fd(),k9r=L1(),C9r=C0(),D9r=Ld().calcMarkerSize;avt.exports=function(t,r){for(var i=t._fullLayout,n=r.subplot,a=i[n].radialaxis,o=i[n].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var F9r=n5(),svt=(ra(),Pt(ia)).BADNUM;lvt.exports=function(t,r,i){for(var n=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var L9r=l5();function P9r(e,t,r,i){var n=L9r(e,t,r,i);if(!(!n||n[0].index===!1)){var a=n[0];if(a.index===void 0)return n;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,cvt(s,l,o,a),a.hovertemplate=l.hovertemplate,n}}function cvt(e,t,r,i){var n=r.radialAxis,a=r.angularAxis;n._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);i.rLabel=s.rLabel,i.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,p){u.push(h._hovertitle+": "+p)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(n,i.rLabel),f.indexOf("theta")!==-1&&c(a,i.thetaLabel),f.indexOf("text")!==-1&&i.text&&(u.push(i.text),delete i.text),i.extraText=u.join("
")}}fvt.exports={hoverPoints:P9r,makeHoverPointText:cvt}});var dvt=W((lfi,hvt)=>{"use strict";hvt.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:SN(),categories:["polar","symbols","showLegend","scatter-like"],attributes:_8(),supplyDefaults:CN().supplyDefaults,colorbar:Cc(),formatLabels:DN(),calc:ovt(),plot:uvt(),style:lh().style,styleOnSelect:lh().styleOnSelect,hoverPoints:FN().hoverPoints,selectPoints:Rb(),meta:{}}});var vvt=W((ufi,pvt)=>{"use strict";pvt.exports=dvt()});var lle=W((hfi,mvt)=>{"use strict";var gvt=_8(),{cliponaxis:cfi,hoveron:ffi}=gvt,I9r=F8(gvt,["cliponaxis","hoveron"]),{connectgaps:R9r,line:{color:z9r,dash:B9r,width:q9r},fill:O9r,fillcolor:N9r,marker:U9r,textfont:V9r,textposition:G9r}=UE();mvt.exports=da(fn({},I9r),{connectgaps:R9r,fill:O9r,fillcolor:N9r,line:{color:z9r,dash:B9r,editType:"calc",width:q9r},marker:U9r,textfont:V9r,textposition:G9r})});var bvt=W((pfi,xvt)=>{"use strict";var yvt=tt(),ule=Wo(),H9r=CN().handleRThetaDefaults,j9r=Dd(),$9r=tv(),W9r=rv(),Y9r=F1(),X9r=(k1(),Pt(E1)).PTS_LINESONLY,Z9r=lle();xvt.exports=function(t,r,i,n){function a(s,l){return yvt.coerce(t,r,Z9r,s,l)}var o=H9r(t,r,n,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var K9r=DN();_vt.exports=function(t,r,i){var n=t.i;return"r"in t||(t.r=r._r[n]),"theta"in t||(t.theta=r._theta[n]),K9r(t,r,i)}});var Avt=W((gfi,Tvt)=>{"use strict";var J9r=Fd(),Q9r=Ld().calcMarkerSize,eIr=j_(),tIr=Yi(),rIr=(N_(),Pt(O_)).TOO_MANY_POINTS;Tvt.exports=function(t,r){var i=t._fullLayout,n=r.subplot,a=i[n].radialaxis,o=i[n].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var iIr=HR(),nIr=FN().makeHoverPointText;function aIr(e,t,r,i){var n=e.cd,a=n[0].t,o=a.r,s=a.theta,l=iIr.hoverPoints(e,t,r,i);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,nIr(f,h,c,u),l}}Mvt.exports={hoverPoints:aIr}});var kvt=W((yfi,Evt)=>{"use strict";Evt.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:SN(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:lle(),supplyDefaults:bvt(),colorbar:Cc(),formatLabels:wvt(),calc:Avt(),hoverPoints:Svt().hoverPoints,selectPoints:Oee(),meta:{}}});var Cvt=W((xfi,cle)=>{"use strict";var oIr=YR(),sIr=hn(),lIr=Ute(),uIr=zee(),LN=j_(),PN=tt(),cIr=(N_(),Pt(O_)).TOO_MANY_POINTS,fIr={};cle.exports=function(t,r,i){if(i.length){var n=r.radialAxis,a=r.angularAxis,o=uIr(t,r);return i.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,p=c.theta,d=c.opts,v,m=h.slice(),g=p.slice();for(v=0;v=cIr&&(d.marker.cluster=c.tree),d.marker&&(d.markerSel.positions=d.markerUnsel.positions=d.marker.positions=w),d.line&&w.length>1&&PN.extendFlat(d.line,LN.linePositions(t,u,w)),d.text&&(PN.extendFlat(d.text,{positions:w},LN.textPosition(t,u,d.text,d.marker)),PN.extendFlat(d.textSel,{positions:w},LN.textPosition(t,u,d.text,d.markerSel)),PN.extendFlat(d.textUnsel,{positions:w},LN.textPosition(t,u,d.text,d.markerUnsel))),d.fill&&!o.fill2d&&(o.fill2d=!0),d.marker&&!o.scatter2d&&(o.scatter2d=!0),d.line&&!o.line2d&&(o.line2d=!0),d.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(d.line),o.fillOptions.push(d.fill),o.markerOptions.push(d.marker),o.markerSelectedOptions.push(d.markerSel),o.markerUnselectedOptions.push(d.markerUnsel),o.textOptions.push(d.text),o.textSelectedOptions.push(d.textSel),o.textUnselectedOptions.push(d.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=_,c.y=b,c.rawx=_,c.rawy=b,c.r=h,c.theta=p,c.positions=w,c._scene=o,c.index=o.count,o.count++}}),lIr(t,r,i)}};cle.exports.reglPrecompiled=fIr});var Lvt=W((bfi,Fvt)=>{"use strict";var Dvt=kvt();Dvt.plot=Cvt();Fvt.exports=Dvt});var Ivt=W((_fi,Pvt)=>{"use strict";Pvt.exports=Lvt()});var fle=W((wfi,Rvt)=>{"use strict";var{hovertemplateAttrs:hIr,templatefallbackAttrs:dIr}=Wa(),C6=an().extendFlat,Cx=_8(),Dx=R1();Rvt.exports={r:Cx.r,theta:Cx.theta,r0:Cx.r0,dr:Cx.dr,theta0:Cx.theta0,dtheta:Cx.dtheta,thetaunit:Cx.thetaunit,base:C6({},Dx.base,{}),offset:C6({},Dx.offset,{}),width:C6({},Dx.width,{}),text:C6({},Dx.text,{}),hovertext:C6({},Dx.hovertext,{}),marker:pIr(),hoverinfo:Cx.hoverinfo,hovertemplate:hIr(),hovertemplatefallback:dIr(),selected:Dx.selected,unselected:Dx.unselected};function pIr(){var e=C6({},Dx.marker);return delete e.cornerradius,e}});var hle=W((Tfi,zvt)=>{"use strict";zvt.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Ovt=W((Afi,qvt)=>{"use strict";var Bvt=tt(),vIr=CN().handleRThetaDefaults,gIr=NL(),mIr=fle();qvt.exports=function(t,r,i,n){function a(s,l){return Bvt.coerce(t,r,mIr,s,l)}var o=vIr(t,r,n,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),gIr(t,r,a,i,n),Bvt.coerceSelectionMarkerOpacity(r,a)}});var Uvt=W((Mfi,Nvt)=>{"use strict";var yIr=tt(),xIr=hle();Nvt.exports=function(e,t,r){var i={},n;function a(l,u){return yIr.coerce(e[n]||{},t[n],xIr,l,u)}for(var o=0;o{"use strict";var Vvt=Sc().hasColorscale,Gvt=rf(),bIr=tt().isArrayOrTypedArray,_Ir=WM(),wIr=Ib().setGroupPositions,TIr=C0(),AIr=xi().traceIs,MIr=tt().extendFlat;function SIr(e,t){for(var r=e._fullLayout,i=t.subplot,n=r[i].radialaxis,a=r[i].angularaxis,o=n.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h{"use strict";var jvt=gi(),IN=hn(),D6=tt(),kIr=Qi(),ple=yN();$vt.exports=function(t,r,i){var n=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=CIr(r),c=r.layers.frontplot.select("g.barlayer");D6.makeTraceGroups(c,i,"trace bars").each(function(){var f=jvt.select(this),h=D6.ensureSingle(f,"g","points"),p=h.selectAll("g.point").data(D6.identity);p.enter().append("g").style("vector-effect",n?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),p.exit().remove(),p.each(function(d){var v=jvt.select(this),m=d.rp0=s.c2p(d.s0),g=d.rp1=s.c2p(d.s1),w=d.thetag0=l.c2g(d.p0),_=d.thetag1=l.c2g(d.p1),b;if(!IN(m)||!IN(g)||!IN(w)||!IN(_)||m===g||w===_)b="M0,0Z";else{var M=s.c2g(d.s1),x=(w+_)/2;d.ct=[a.c2p(M*Math.cos(x)),o.c2p(M*Math.sin(x))],b=u(m,g,w,_)}D6.ensureSingle(v,"path").attr("d",b)}),kIr.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function CIr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(i,n,a,o){var s,l;D6.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=ple.findEnclosingVertexAngles(s,e.vangles)[0],c=ple.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return ple.pathPolygonAnnulus(i,n,s,l,f,t,r)}:function(i,n,a,o){return D6.pathAnnulus(i,n,a,o,t,r)}}});var Xvt=W((kfi,Yvt)=>{"use strict";var DIr=Is(),vle=tt(),FIr=w5().getTraceColor,LIr=vle.fillText,PIr=FN().makeHoverPointText,IIr=yN().isPtInsidePolygon;Yvt.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?IIr:vle.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,p=Math.abs(s.g2p(Math.sqrt(r*r+i*i))),d=Math.atan2(i,r);s.range[0]>s.range[1]&&(d+=Math.PI);var v=function(_){return c(p,d,[_.rp0,_.rp1],[_.thetag0,_.thetag1],u)?f+Math.min(1,Math.abs(_.thetag1-_.thetag0)/h)-1+(_.rp1-p)/(_.rp1-_.rp0)-1:1/0};if(DIr.getClosest(n,v,t),t.index!==!1){var m=t.index,g=n[m];t.x0=t.x1=g.ct[0],t.y0=t.y1=g.ct[1];var w=vle.extendFlat({},g,{r:g.s,theta:g.p});return LIr(g,a,t),PIr(w,a,o,t),t.hovertemplate=a.hovertemplate,t.color=FIr(a,g),t.xLabelVal=t.yLabelVal=void 0,g.s<0&&(t.idealAlign="left"),[t]}}});var Kvt=W((Cfi,Zvt)=>{"use strict";Zvt.exports={moduleType:"trace",name:"barpolar",basePlotModule:SN(),categories:["polar","bar","showLegend"],attributes:fle(),layoutAttributes:hle(),supplyDefaults:Ovt(),supplyLayoutDefaults:Uvt(),calc:dle().calc,crossTraceCalc:dle().crossTraceCalc,plot:Wvt(),colorbar:Cc(),formatLabels:DN(),style:zd().style,styleOnSelect:zd().styleOnSelect,hoverPoints:Xvt(),selectPoints:T5(),meta:{}}});var Qvt=W((Dfi,Jvt)=>{"use strict";Jvt.exports=Kvt()});var gle={};Jn(gle,{attr:()=>RIr,axisName2dataArray:()=>qIr,axisNames:()=>BIr,name:()=>zIr});var RIr,zIr,BIr,qIr,mle=Ci(()=>{"use strict";RIr="subplot",zIr="smith",BIr=["realaxis","imaginaryaxis"],qIr={imaginaryaxis:"imag",realaxis:"real"}});var yle=W((Ffi,i1t)=>{"use strict";var OIr=Yl(),hl=ac(),NIr=ds().attributes,Fx=tt().extendFlat,e1t=hs().overrideAll,t1t=e1t({color:hl.color,showline:Fx({},hl.showline,{dflt:!0}),linecolor:hl.linecolor,linewidth:hl.linewidth,showgrid:Fx({},hl.showgrid,{dflt:!0}),gridcolor:hl.gridcolor,gridwidth:hl.gridwidth,griddash:hl.griddash},"plot","from-root"),r1t=e1t({ticklen:hl.ticklen,tickwidth:Fx({},hl.tickwidth,{dflt:2}),tickcolor:hl.tickcolor,showticklabels:hl.showticklabels,labelalias:hl.labelalias,showtickprefix:hl.showtickprefix,tickprefix:hl.tickprefix,showticksuffix:hl.showticksuffix,ticksuffix:hl.ticksuffix,tickfont:hl.tickfont,tickformat:hl.tickformat,hoverformat:hl.hoverformat,layer:hl.layer},"plot","from-root"),UIr=Fx({visible:Fx({},hl.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Fx({},hl.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t1t,r1t),VIr=Fx({visible:Fx({},hl.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:hl.ticks,editType:"calc"},t1t,r1t);i1t.exports={domain:NIr({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:OIr.background},realaxis:UIr,imaginaryaxis:VIr,editType:"calc"}});var o1t=W((Lfi,a1t)=>{"use strict";var F6=tt(),GIr=ti(),HIr=Ra(),jIr=Kb(),$Ir=Mc().getSubplotData,WIr=Iy(),YIr=Py(),XIr=FM(),ZIr=g1(),L6=yle(),xle=(mle(),Pt(gle)),n1t=xle.axisNames,KIr=QIr(function(e){return F6.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function JIr(e,t,r,i){var n=r("bgcolor");i.bgColor=GIr.combine(n,i.paper_bgcolor);var a=$Ir(i.fullData,xle.name,i.id),o=i.layoutOut,s;function l(M,x){return r(s+"."+M,x)}for(var u=0;u{"use strict";var eRr=Mc().getSubplotCalcData,tRr=tt().counterRegex,rRr=ole(),l1t=(mle(),Pt(gle)),u1t=l1t.attr,V3=l1t.name,s1t=tRr(V3),c1t={};c1t[u1t]={valType:"subplotid",dflt:V3,editType:"calc"};function iRr(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[V3],n=0;n{"use strict";var{hovertemplateAttrs:aRr,texttemplateAttrs:oRr,templatefallbackAttrs:d1t}=Wa(),RN=an().extendFlat,sRr=C1(),ed=Ws(),lRr=Ja(),P6=ed.line;p1t.exports={mode:ed.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:ed.text,texttemplate:oRr({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:d1t({editType:"plot"}),hovertext:ed.hovertext,line:{color:P6.color,width:P6.width,dash:P6.dash,backoff:P6.backoff,shape:RN({},P6.shape,{values:["linear","spline"]}),smoothing:P6.smoothing,editType:"calc"},connectgaps:ed.connectgaps,marker:ed.marker,cliponaxis:RN({},ed.cliponaxis,{dflt:!1}),textposition:ed.textposition,textfont:ed.textfont,fill:RN({},ed.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:sRr(),hoverinfo:RN({},lRr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:ed.hoveron,hovertemplate:aRr(),hovertemplatefallback:d1t(),selected:ed.selected,unselected:ed.unselected}});var m1t=W((Rfi,g1t)=>{"use strict";var zN=tt(),I6=Wo(),uRr=Dd(),cRr=tv(),v1t=Jw(),fRr=rv(),hRr=F1(),dRr=(k1(),Pt(E1)).PTS_LINESONLY,pRr=ble();g1t.exports=function(t,r,i,n){function a(l,u){return zN.coerce(t,r,pRr,l,u)}var o=vRr(t,r,n,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var y1t=Yi();x1t.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot;return n.realLabel=y1t.tickText(a.radialAxis,t.real,!0).text,n.imagLabel=y1t.tickText(a.angularAxis,t.imag,!0).text,n}});var T1t=W((Bfi,w1t)=>{"use strict";var _1t=hn(),gRr=(ra(),Pt(ia)).BADNUM,mRr=Fd(),yRr=L1(),xRr=C0(),bRr=Ld().calcMarkerSize;w1t.exports=function(t,r){for(var i=t._fullLayout,n=r.subplot,a=i[n].realaxis,o=i[n].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var _Rr=n5(),A1t=(ra(),Pt(ia)).BADNUM,wRr=nle(),TRr=wRr.smith;M1t.exports=function(t,r,i){for(var n=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var ARr=l5();function MRr(e,t,r,i){var n=ARr(e,t,r,i);if(!(!n||n[0].index===!1)){var a=n[0];if(a.index===void 0)return n;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,E1t(s,l,o,a),a.hovertemplate=l.hovertemplate,n}}function E1t(e,t,r,i){var n=r.radialAxis,a=r.angularAxis;n._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);i.realLabel=s.realLabel,i.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,p){u.push(h._hovertitle+": "+p)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(n,i.realLabel),f.indexOf("imag")!==-1&&c(a,i.imagLabel),f.indexOf("text")!==-1&&i.text&&(u.push(i.text),delete i.text),i.extraText=u.join("
")}}k1t.exports={hoverPoints:MRr,makeHoverPointText:E1t}});var F1t=W((Nfi,D1t)=>{"use strict";D1t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:h1t(),categories:["smith","symbols","showLegend","scatter-like"],attributes:ble(),supplyDefaults:m1t(),colorbar:Cc(),formatLabels:b1t(),calc:T1t(),plot:S1t(),style:lh().style,styleOnSelect:lh().styleOnSelect,hoverPoints:C1t().hoverPoints,selectPoints:Rb(),meta:{}}});var P1t=W((Ufi,L1t)=>{"use strict";L1t.exports=F1t()});var wle=W((Vfi,I1t)=>{"use strict";var SRr=Ja(),ERr=Wa().hovertemplateAttrs,BN=Ts().axisHoverFormat,_le=an().extendFlat,kRr=Fo(),CRr=zu().dash,DRr=Xy(),G3=Ws(),FRr={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:G3.x0,dx:G3.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:G3.y0,dy:G3.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:BN("x"),yhoverformat:BN("y"),uhoverformat:BN("u","noDate"),vhoverformat:BN("v","noDate"),hoverinfo:_le({},SRr.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:ERr({},{keys:["x","y","u","v","text","name"]}),text:G3.text,textposition:G3.textposition,textfont:G3.textfont,marker:_le({arrowsize:_le({},DRr.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:CRr,editType:"style"},editType:"calc"},kRr("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"}};I1t.exports=FRr});var z1t=W((Gfi,R1t)=>{"use strict";var w8=tt(),LRr=wle(),PRr=Lb(),IRr=Sc().hasColorscale,RRr=Bu();R1t.exports=function(t,r,i,n){function a(d,v){return w8.coerce(t,r,LRr,d,v)}var o=PRr(t,r,n,a);if(!o){r.visible=!1;return}var s=a("u"),l=a("v");if(!w8.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u{"use strict";var ry=tt(),R6=Yi(),T8=hn(),B1t=(ra(),Pt(ia)).BADNUM,zRr=rf(),BRr=C0(),qRr=.97;q1t.exports=function(t,r){let i=r._xA=R6.getFromId(t,r.xaxis||"x","x"),n=r._yA=R6.getFromId(t,r.yaxis||"y","y"),a=i.makeCalcdata(r,"x"),o=n.makeCalcdata(r,"y"),s=Math.min(a.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,h=-1/0;let p=r.marker.color,d=ry.isArrayOrTypedArray(p),v=r.u||[],m=r.v||[],{anchor:g,lengthmode:w,arrowref:_}=r,b=g==="tip",M=g==="center";for(var x=1/0,A=-1/0,T=1/0,y=-1/0,E=1/0,S=-1/0,C=1/0,k=-1/0,D=0,F=0;FA&&(A=a[F]),o[F]y&&(y=o[F]),IS&&(S=I),Bk&&(k=B);var O=Math.sqrt(I*I+B*B);if(O>c&&(c=O),Oh&&(h=$))}}else P.x=B1t,P.y=B1t}if(r._maxNorm=c,w==="scaled"||_==="paper"){let H=A-x,j=y-T;var X;H===0&&j===0?X=1:X=(H+j+Math.sqrt((H-j)*(H-j)+4*D*H*j))/(2*(D-1)),X*=qRr,r._scaleFactor=X/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.lengthfactor;let K=new Array(s),G=new Array(s),q=new Array(s),J=new Array(s);for(var N,V,F=0;F{"use strict";N1t.exports=function(t,r){}});var qN=W(($fi,H1t)=>{"use strict";var Tle=gi(),Mle=tt(),A8=Qi(),ORr=es(),NRr=ti(),URr=(Ng(),Pt(Og)).DESELECTDIM;function V1t(e,t){var r=t.marker||{},i=ORr.makeColorScaleFuncFromTrace(r);e.style("stroke",function(n){var a=r.color,o;if(Mle.isArrayOrTypedArray(a)&&a.length>n.i&&isFinite(a[n.i]))o=a[n.i];else{var s=t.u&&t.u[n.i]||0,l=t.v&&t.v[n.i]||0;o=Math.sqrt(s*s+l*l)}return n.mcc=i(o),n.mcc})}var Ale=(e,t)=>{if(t._hasColorscale){V1t(e,t);return}let r=(t.marker||{}).color;Mle.isArrayOrTypedArray(r)&&e.style("stroke",function(i){if(r.length>i.i){let n=r[i.i];if(NRr.isValid(n))return i.mcc=n,n}return this.style.stroke})};function VRr(e){var t=Tle.select(e).selectAll("g.trace.quiver");t.each(function(r){G1t(e,r,Tle.select(this))})}function GRr(e,t,r){G1t(e,t,r)}function G1t(e,t,r){var i=t[0].trace,n=i.marker||{},a=n.line||{},o=Mle.isArrayOrTypedArray(n.color)?void 0:n.color;if(r)if(i.selectedpoints){var s=(i.selected||{}).marker||{},l=(i.unselected||{}).marker||{},u=s.line||{},c=l.line||{};r.selectAll("path.js-line").each(function(h){var p=Tle.select(this),d=!h.selected,v=d?l.color:s.color,m=d?c.width!==void 0?c.width:a.width:u.width!==void 0?u.width:a.width;v?(A8.lineGroupStyle(p,m,v,a.dash),p.style("stroke-opacity",1)):(A8.lineGroupStyle(p,m,o,a.dash),Ale(p,i),p.style("stroke-opacity",d?URr:1))}),A8.selectedTextStyle(r.selectAll("text"),i)}else{var f=r.selectAll("path.js-line");f.call(A8.lineGroupStyle,a.width,o,a.dash),Ale(f,i),f.style("stroke-opacity",1),A8.textPointStyle(r.selectAll("text"),i,e)}}H1t.exports={style:VRr,styleOnSelect:GRr,colorscaleStroke:V1t,strokeArrowColors:Ale}});var W1t=W((Wfi,$1t)=>{"use strict";var Nv=gi(),HRr=tt(),M8=Qi(),{strokeArrowColors:jRr}=qN(),ON=Math.PI/12,$Rr=5.8,WRr=1.5,YRr=.7;$1t.exports=function(t,r,i,n,a,o){var s,l,u=!a,c=!!a&&a.duration>0;if(s=n.selectAll("g.trace").data(i,function(h){return h[0].trace.uid}),s.enter().append("g").attr("class",function(h){return"trace quiver trace"+h[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=Nv.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){n.selectAll("g.trace").each(function(h,p){j1t(t,p,r,h,i,this,a)})})}else s.each(function(h,p){j1t(t,p,r,h,i,this,a)});u&&s.exit().remove()};function j1t(e,t,r,i,n,a,o){var s=i[0].trace,l=r.xaxis,u=r.yaxis;i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=Nv.select(a);var c=Nv.select(a).selectAll("g.lines").data([i]);c.enter().append("g").classed("lines",!0),M8.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(i);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let{anchor:h,maxNorm:p=0,arrowref:d}=s,v=d==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,m=s.marker.arrowsize;f.each(function(A){let T=Nv.select(this);if(A.x===void 0||A.y===void 0){T.attr("d",null);return}let y=(d==="paper"?A._u*Math.sign(l._m):Nv.round(l._m*A._u))*v,E=(d==="paper"?A._v*Math.sign(u._m):Nv.round(u._m*A._v))*v,S=(s._input.marker||{}).arrowsize!==void 0;var C,k,D,F;h==="tip"?(C=l.c2p(A.x)-y,D=u.c2p(A.y)-E,k=l.c2p(A.x),F=u.c2p(A.y)):h==="center"?(C=l.c2p(A.x)-y/2,D=u.c2p(A.y)-E/2,k=l.c2p(A.x)+y/2,F=u.c2p(A.y)+E/2):(C=l.c2p(A.x),D=u.c2p(A.y),k=l.c2p(A.x)+y,F=u.c2p(A.y)+E),A._px0=C,A._py0=D,A._px1=k,A._py1=F;var P=s.marker.line.width;S||(P=Math.max(P,WRr));let R=Math.sqrt((k-C)*(k-C)+(F-D)*(F-D)),L=YRr*R,I=Math.min($Rr*m*P,L),B=Math.atan2(F-D,k-C),O=k-I*Math.cos(B-ON),$=F-I*Math.sin(B-ON),X=k-I*Math.cos(B+ON),K=F-I*Math.sin(B+ON),G="M"+C+","+D+"L"+k+","+F+"L"+O+","+$+"L"+k+","+F+"L"+X+","+K;T.attr("d",G)});var g=s.marker||{},w=g.line||{};let _=HRr.isArrayOrTypedArray(g.color)?void 0:g.color;M8.lineGroupStyle(f,w.width,_,w.dash),jRr(f,s);var b=Nv.select(a).selectAll("g.text").data([i]);b.enter().append("g").classed("text",!0),M8.setClipUrl(b,r.layerClipId,e);var M=b.selectAll("g.textpoint").data(i);if(M.enter().append("g").classed("textpoint",!0).append("text"),M.exit().remove(),M.each(function(A){var T=Nv.select(this),y=M8.translatePoint(A,T.select("text"),l,u);y||T.remove()}),M.selectAll("text").call(M8.textPointStyle,s,e).each(function(A){var T=l.c2p(A.x),y=u.c2p(A.y);Nv.select(this).selectAll("tspan.line").each(function(){Nv.select(this).attr({x:T,y})})}),o&&o.duration>0){var x=Nv.transition().duration(o.duration).ease(o.easing);f.transition(x).style("opacity",1)}}});var Z1t=W((Yfi,X1t)=>{"use strict";var Y1t=tt(),XRr=Is(),ZRr=s5();function KRr(e,t,r,i,n,a){let o=n-r,s=a-i,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-i)*(t-i));var u=((e-r)*o+(t-i)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=i+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}X1t.exports=function(t,r,i,n){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(i),f=function(_){return _._px0===void 0?1/0:KRr(u,c,_._px0,_._py0,_._px1,_._py1)};if(XRr.getClosest(a,f,t),t.index!==!1){var h=a[t.index],p=s.c2p(h.x,!0),d=l.c2p(h.y,!0),v=Math.sqrt((u-p)*(u-p)+(c-d)*(c-d));t.index=h.i;var m=o.u?o.u[h.i]:0,g=o.v?o.v[h.i]:0,w="u: "+m+", v: "+g;return Y1t.extendFlat(t,{color:ZRr(o,h),x0:p-3,x1:p+3,xLabelVal:h.x,y0:d-3,y1:d+3,yLabelVal:h.y,uLabelVal:m,vLabelVal:g,extraText:w,spikeDistance:v,hovertemplate:o.hovertemplate}),Y1t.fillText(h,o,t),[t]}}});var Q1t=W((Xfi,J1t)=>{"use strict";var NN=Yi(),K1t=tt();J1t.exports=function(t,r,i){var n={},a={_fullLayout:i},o=NN.getFromTrace(a,r,"x"),s=NN.getFromTrace(a,r,"y"),l=t.x,u=t.y;n.xLabel=NN.tickText(o,o.c2l(l),!0).text,n.yLabel=NN.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,h=r.uhoverformat,p=r.vhoverformat;return n.uLabel=h?K1t.numberFormat(h)(c):String(c),n.vLabel=p?K1t.numberFormat(p)(f):String(f),n}});var tgt=W((Zfi,egt)=>{"use strict";egt.exports=function(t,r,i,n,a){return t.x=r.x,t.y=r.y,t.u=i.u?i.u[a]:void 0,t.v=i.v?i.v[a]:void 0,t}});var igt=W((Kfi,rgt)=>{"use strict";rgt.exports={moduleType:"trace",name:"quiver",basePlotModule:xl(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:wle(),supplyDefaults:z1t(),calc:O1t(),crossTraceCalc:U1t(),plot:W1t(),style:qN().style,styleOnSelect:qN().styleOnSelect,hoverPoints:Z1t(),formatLabels:Q1t(),eventData:tgt(),selectPoints:Rb(),colorbar:Cc(),animatable:!0,meta:{}}});var agt=W((Jfi,ngt)=>{"use strict";ngt.exports=igt()});var gf=W((Qfi,sgt)=>{var VN=Hu();function ogt(){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={}}VN(ogt.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,i,n){return i=(e!=null&&e.year?e.calendar():typeof i=="string"?this.instance(i,n):i)||this.instance(),i.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var i="",n=0;r>0;){var a=r%10;i=(a===0?"":e[a]+t[n])+i,n++,r=Math.floor(r/10)}return i.indexOf(e[1]+t[1])===0&&(i=i.substr(1)),i||e[0]}}});function Sle(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(ga.local.invalidDate||ga.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function UN(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}VN(Sle.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(ga.local.invalidDate||ga.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(ga.local.differentCalendars||ga.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+UN(Math.abs(this.year()),4)+"-"+UN(this.month(),2)+"-"+UN(this.day(),2)}});function Ele(){this.shortYearCutoff="+10"}VN(Ele.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,ga.local.invalidDate||ga.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new Sle(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,ga.local.invalidYear||ga.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ga.local.invalidYear||ga.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+UN(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ga.local.invalidYear||ga.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,ga.local.invalidMonth||ga.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,ga.local.invalidMonth||ga.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ga.local.invalidYear||ga.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,ga.local.invalidDate||ga.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,ga.local.invalidDate||ga.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,ga.local.invalidDate||ga.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,ga.local.invalidDate||ga.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var i=e.toJD()+t*(r==="w"?this.daysInWeek():1),n=e.calendar().fromJD(i);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),n=e.day(),s=function(c){for(;of-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r==="y"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r==="m"&&(s(this),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),n];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],a=r<0?-1:1;t=this._add(e,r*n[0]+a*n[1],n[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,ga.local.invalidDate||ga.regionalOptions[""].invalidDate);var i=r==="y"?t:e.year(),n=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(i,n))),e.date(i,n,a)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||e!==0;if(i){var n=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=n-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,ga.local.invalidDate||ga.regionalOptions[""].invalidDate),n=new Date(i.year(),i.month()-1,i.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var ga=sgt.exports=new ogt;ga.cdate=Sle;ga.baseCalendar=Ele;ga.calendars.gregorian=kle});var lgt=W(()=>{var Cle=Hu(),mc=gf();Cle(mc.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"});mc.local=mc.regionalOptions[""];Cle(mc.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});Cle(mc.baseCalendar.prototype,{UNIX_EPOCH:mc.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:mc.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw mc.local.invalidFormat||mc.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var i=r.dayNamesShort||this.local.dayNamesShort,n=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(b,M){for(var x=1;_+x1},c=function(b,M,x,A){var T=""+M;if(u(b,A))for(;T.length1},w=function(C,k){var D=g(C,k),F=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(C)+1],P=new RegExp("^-?\\d{1,"+F+"}"),R=t.substring(T).match(P);if(!R)throw(mc.local.missingNumberAt||mc.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=R[0].length,parseInt(R[0],10)},_=this,b=function(){if(typeof s=="function"){g("m");var C=s.call(_,t.substring(T));return T+=C.length,C}return w("m")},M=function(C,k,D,F){for(var P=g(C,F)?D:k,R=0;R-1){h=1,p=d;for(var S=this.daysInMonth(f,h);p>S;S=this.daysInMonth(f,h))h++,p-=S}return c>-1?this.fromJD(c):this.newDate(f,h,p)},determineDate:function(e,t,r,i,n){r&&typeof r!="object"&&(n=i,i=r,r=null),typeof i!="string"&&(n=i,i="");var a=this,o=function(s){try{return a.parseDate(i,s,n)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e),e}})});var ugt=W(()=>{var Lx=gf(),JRr=Hu(),Dle=Lx.instance();function GN(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}GN.prototype=new Lx.baseCalendar;JRr(GN.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(ezr);return r?r[0]:""}var i=this._validateYear(e),n=e.month(),a=""+this.toChineseMonth(i,n);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(i,n)&&(a+="i"),a},monthNames:function(e){if(typeof e=="string"){var t=e.match(tzr);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=this.toChineseMonth(r,i),a=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(r,i)&&(a="\u95F0"+a),a},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(rzr);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=this.toChineseMonth(r,i),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(r,i)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),i;if(isNaN(r))t[0]==="\u95F0"&&(i=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var n=t[t.length-1];i=n==="i"||n==="I"}var a=this.toMonthIndex(e,r,i);return a},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var i=this.intercalaryMonth(e),n=r&&t!==i;if(n||t<1||t>12)throw Lx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return i?!r&&t<=i?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),i=r?12:11;if(t<0||t>i)throw Lx.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var i=this._validateYear(e,Lx.local.invalidyear),n=Ix[i-Ix[0]],a=n>>9&4095,o=n>>5&15,s=n&31,l;l=Dle.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=Px[e-Px[0]],i=r>>13,n=i?12:11;if(t>n)throw Lx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,a,r,Lx.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),r=i.day();var n=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=nzr(e,a,r,n);return Dle.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=Dle.fromJD(e),r=izr(t.year(),t.month(),t.day()),i=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,i,r.day)},fromString:function(e){var t=e.match(QRr),r=this._validateYear(+t[1]),i=+t[2],n=!!t[3],a=this.toMonthIndex(r,i,n),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var i=e.year(),n=e.month(),a=this.isIntercalaryMonth(i,n),o=this.toChineseMonth(i,n),s=Object.getPrototypeOf(GN.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var QRr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,ezr=/^\d?\d[iI]?/m,tzr=/^闰?十?[一二三四五六七八九]?月/m,rzr=/^闰?十?[一二三四五六七八九]?/m;Lx.calendars.chinese=GN;var Px=[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],Ix=[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 izr(e,t,r,i){var n,a;if(typeof e=="object")n=e,a=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");n={year:e,month:t,day:r},a=i||{}}var u=Ix[n.year-Ix[0]],c=n.year<<9|n.month<<5|n.day;a.year=c>=u?n.year:n.year-1,u=Ix[a.year-Ix[0]];var f=u>>9&4095,h=u>>5&15,p=u&31,d,v=new Date(f,h-1,p),m=new Date(n.year,n.month-1,n.day);d=Math.round((m-v)/(24*3600*1e3));var g=Px[a.year-Px[0]],w;for(w=0;w<13;w++){var _=g&1<<12-w?30:29;if(d<_)break;d-=_}var b=g>>13;return!b||w=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof i=="object"?(c=!1,a=i):(c=!!i,a=n||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=Px[o.year-Px[0]],p=h>>13,d;p&&(o.month>p||o.isIntercalary)?d=o.month:d=o.month-1;for(var v=0;v>9&4095,_=g>>5&15,b=g&31,M=new Date(w,_-1,b+f);return a.year=M.getFullYear(),a.month=1+M.getMonth(),a.day=M.getDate(),a}});var cgt=W(()=>{var H3=gf(),azr=Hu();function Fle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Fle.prototype=new H3.baseCalendar;azr(Fle.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,H3.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,H3.local.invalidYear||H3.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,H3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,H3.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}});H3.calendars.coptic=Fle});var fgt=W(()=>{var iy=gf(),ozr=Hu();function Lle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Lle.prototype=new iy.baseCalendar;ozr(Lle.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,iy.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,iy.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,iy.local.invalidYear),400},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,iy.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,iy.local.invalidDate);return(i.day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,iy.local.invalidDate);return{century:szr[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,r){var i=this._validate(e,t,r,iy.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),r=i.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var szr={20:"Fruitbat",21:"Anchovy"};iy.calendars.discworld=Lle});var hgt=W(()=>{var j3=gf(),lzr=Hu();function Ple(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ple.prototype=new j3.baseCalendar;lzr(Ple.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,j3.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,j3.local.invalidYear||j3.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,j3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,j3.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}});j3.calendars.ethiopian=Ple});var dgt=W(()=>{var Rx=gf(),uzr=Hu();function Ile(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ile.prototype=new Rx.baseCalendar;uzr(Ile.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Rx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,HN(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Rx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Rx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Rx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&HN(this.daysInYear(e),10)===5?30:t===9&&HN(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,Rx.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,r){var i=this._validate(e,t,r,Rx.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=e<=0?e+1:e,a=this.jdEpoch+this._delay1(n)+this._delay2(n)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});function HN(e,t){return e-t*Math.floor(e/t)}Rx.calendars.hebrew=Ile});var pgt=W(()=>{var S8=gf(),czr=Hu();function Rle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Rle.prototype=new S8.baseCalendar;czr(Rle.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,S8.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,S8.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,S8.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});S8.calendars.islamic=Rle});var vgt=W(()=>{var E8=gf(),fzr=Hu();function zle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}zle.prototype=new E8.baseCalendar;fzr(zle.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,E8.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,E8.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,E8.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,i=Math.floor((r-122.1)/365.25),n=Math.floor(365.25*i),a=Math.floor((r-n)/30.6001),o=a-Math.floor(a<14?1:13),s=i-Math.floor(o>2?4716:4715),l=r-n-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});E8.calendars.julian=zle});var mgt=W(()=>{var yp=gf(),hzr=Hu();function qle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}qle.prototype=new yp.baseCalendar;hzr(qle.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,yp.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,yp.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var i=Math.floor(e/20);return r+"."+i+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&i<0)throw"Invalid Mayan year";t=t*20+i}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,yp.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,yp.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,yp.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,yp.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,yp.local.invalidDate);return i.day()},weekDay:function(e,t,r){return this._validate(e,t,r,yp.local.invalidDate),!0},extraInfo:function(e,t,r){var i=this._validate(e,t,r,yp.local.invalidDate),n=i.toJD(),a=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=Ble(e+8+340,365);return[Math.floor(t/20)+1,Ble(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[ggt(e+20,20),ggt(e+4,13)]},toJD:function(e,t,r){var i=this._validate(e,t,r,yp.local.invalidDate);return i.day()+i.month()*20+i.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),i=e%20;return this.newDate(t,r,i)}});function Ble(e,t){return e-t*Math.floor(e/t)}function ggt(e,t){return Ble(e-1,t)+1}yp.calendars.mayan=qle});var xgt=W(()=>{var $3=gf(),dzr=Hu();function Ole(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ole.prototype=new $3.baseCalendar;var ygt=$3.instance("gregorian");dzr(Ole.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,$3.local.invalidYear||$3.regionalOptions[""].invalidYear);return ygt.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,$3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(n,t,r){var i=this._validate(n,t,r,$3.local.invalidMonth),n=i.year();n<0&&n++;for(var a=i.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,i=1;r>this.daysInMonth(t,i);)r-=this.daysInMonth(t,i),i++;return this.newDate(t,i,r)}});$3.calendars.nanakshahi=Ole});var bgt=W(()=>{var W3=gf(),pzr=Hu();function Nle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Nle.prototype=new W3.baseCalendar;pzr(Nle.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,W3.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[e][i];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,W3.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var i=this._validate(e,t,r,W3.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=W3.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=n.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],n.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=W3.instance(),r=t.fromJD(e),i=r.year(),n=r.dayOfYear(),a=i+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;n>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var z6=gf(),vzr=Hu();function $N(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function jN(e){var t=e-475;e<0&&t++;var r=.242197,i=r*t,n=r*(t+1),a=i-Math.floor(i),o=n-Math.floor(n);return a>o}$N.prototype=new z6.baseCalendar;vzr($N.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,z6.local.invalidYear);return jN(t.year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-((i.dayOfWeek()+1)%7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,z6.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,z6.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=0;if(e>0)for(var a=1;a0?e-1:e)*365+n+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,jN(r)?30:29)&&(r++,r===0&&r++);var i=e-this.toJD(r,1,1)+1,n=i<=186?Math.ceil(i/31):Math.ceil((i-6)/30),a=e-this.toJD(r,n,1)+1;return this.newDate(r,n,a)}});z6.calendars.persian=$N;z6.calendars.jalali=$N});var wgt=W(()=>{var Y3=gf(),gzr=Hu(),WN=Y3.instance();function Ule(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ule.prototype=new Y3.baseCalendar;gzr(Ule.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Y3.local.invalidYear),r=this._t2gYear(t.year());return WN.leapYear(r)},weekOfYear:function(n,t,r){var i=this._validate(n,this.minMonth,this.minDay,Y3.local.invalidYear),n=this._t2gYear(i.year());return WN.weekOfYear(n,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Y3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(n,t,r){var i=this._validate(n,t,r,Y3.local.invalidDate),n=this._t2gYear(i.year());return WN.toJD(n,i.month(),i.day())},fromJD:function(e){var t=WN.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});Y3.calendars.taiwan=Ule});var Tgt=W(()=>{var X3=gf(),mzr=Hu(),YN=X3.instance();function Vle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Vle.prototype=new X3.baseCalendar;mzr(Vle.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,X3.local.invalidYear),r=this._t2gYear(t.year());return YN.leapYear(r)},weekOfYear:function(n,t,r){var i=this._validate(n,this.minMonth,this.minDay,X3.local.invalidYear),n=this._t2gYear(i.year());return YN.weekOfYear(n,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,X3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(n,t,r){var i=this._validate(n,t,r,X3.local.invalidDate),n=this._t2gYear(i.year());return YN.toJD(n,i.month(),i.day())},fromJD:function(e){var t=YN.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});X3.calendars.thai=Vle});var Agt=W(()=>{var Z3=gf(),yzr=Hu();function Gle(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Gle.prototype=new Z3.baseCalendar;yzr(Gle.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Z3.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,Z3.local.invalidMonth),i=r.toJD()-24e5+.5,n=0,a=0;ai)return zx[n]-zx[n-1];n++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,Z3.local.invalidDate),n=12*(i.year()-1)+i.month()-15292,a=i.day()+zx[n-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;it);i++)r++;var n=r+15292,a=Math.floor((n-1)/12),o=a+1,s=n-12*a,l=t-zx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var i=Z3.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(e=e.year!=null?e.year:e,i=e>=1276&&e<=1500),i},_validate:function(e,t,r,i){var n=Z3.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw i.replace(/\{0\}/,this.local.name);return n}});Z3.calendars.ummalqura=Gle;var zx=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]});var Sgt=W((Dhi,Mgt)=>{"use strict";Mgt.exports=gf();lgt();ugt();cgt();fgt();hgt();dgt();pgt();vgt();mgt();xgt();bgt();_gt();wgt();Tgt();Agt()});var Pgt=W((Fhi,Lgt)=>{"use strict";var kgt=Sgt(),k8=tt(),Cgt=(ra(),Pt(ia)),xzr=Cgt.EPOCHJD,bzr=Cgt.ONEDAY,$le={valType:"enumerated",values:k8.sortObjectKeys(kgt.calendars),editType:"calc",dflt:"gregorian"},Dgt=function(e,t,r,i){var n={};return n[r]=$le,k8.coerce(e,t,n,r,i)},_zr=function(e,t,r,i){for(var n=0;n{"use strict";Igt.exports=Pgt()});var Ezr=W((Phi,Bgt)=>{var zgt=ETe();zgt.register([C6e(),gAe(),LMe(),QMe(),dSe(),sEe(),bEe(),uke(),qke(),bCe(),o8e(),LIe(),_Re(),fBe(),JBe(),Cqe(),Qqe(),fNe(),DNe(),YNe(),oUe(),bUe(),RUe(),KUe(),IGe(),eHe(),xZe(),xKe(),_Je(),WJe(),mut(),Lut(),rct(),pft(),Bft(),mht(),O0t(),cdt(),Fdt(),ipt(),mpt(),vvt(),Ivt(),Qvt(),P1t(),agt(),Rgt()]);Bgt.exports=zgt});return Ezr();})(); /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ /*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. */ /*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ /*! Bundled license information: native-promise-only/lib/npo.src.js: (*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org *) polybooljs/index.js: (* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs *) ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) buffer/index.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) safe-buffer/index.js: (*! safe-buffer. MIT License. Feross Aboukhadijeh *) assert/build/internal/util/comparisons.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) object-assign/index.js: (* object-assign (c) Sindre Sorhus @license MIT *) maplibre-gl/dist/maplibre-gl-shared.mjs: maplibre-gl/dist/maplibre-gl.mjs: (** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.11.2/LICENSE.txt *) */ window.Plotly = Plotly; return Plotly; }));