/** * plotly.js v3.3.1 * Copyright 2012-2025, 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 ctt=Object.create;var LS=Object.defineProperty,ftt=Object.defineProperties,htt=Object.getOwnPropertyDescriptor,dtt=Object.getOwnPropertyDescriptors,vtt=Object.getOwnPropertyNames,s6=Object.getOwnPropertySymbols,ptt=Object.getPrototypeOf,xO=Object.prototype.hasOwnProperty,lee=Object.prototype.propertyIsEnumerable;var see=(e,t,r)=>t in e?LS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mg=(e,t)=>{for(var r in t||(t={}))xO.call(t,r)&&see(e,r,t[r]);if(s6)for(var r of s6(t))lee.call(t,r)&&see(e,r,t[r]);return e},q1=(e,t)=>ftt(e,dtt(t));var uee=(e,t)=>{var r={};for(var n in e)xO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&s6)for(var n of s6(e))t.indexOf(n)<0&&lee.call(e,n)&&(r[n]=e[n]);return r};var gu=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),cee=(e,t)=>{for(var r in t)LS(e,r,{get:t[r],enumerable:!0})},fee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vtt(t))!xO.call(e,i)&&i!==r&&LS(e,i,{get:()=>t[i],enumerable:!(n=htt(t,i))||n.enumerable});return e};var gtt=(e,t,r)=>(r=e!=null?ctt(ptt(e)):{},fee(t||!e||!e.__esModule?LS(r,"default",{value:e,enumerable:!0}):r,e)),ob=e=>fee(LS({},"__esModule",{value:!0}),e);var l6=ye(hee=>{"use strict";hee.version="3.3.1"});var vee=ye((dee,u6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof u6!="undefined"&&u6.exports&&(u6.exports=r[t])})("Promise",typeof window!="undefined"?window:dee,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(k,E,S,L){return Object.defineProperty(k,E,{value:S,writable:!0,configurable:L!==!1})}}catch(p){t=function(E,S,L){return E[S]=L,E}}n=function(){var k,E,S;function L(x,C){this.fn=x,this.self=C,this.next=void 0}return{add:function(C,M){S=new L(C,M),E?E.next=S:k=S,E=S,S=void 0},drain:function(){var C=k;for(k=E=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(p,k){n.add(p,k),r||(r=a(n.drain))}function s(p){var k,E=typeof p;return p!=null&&(E=="object"||E=="function")&&(k=p.then),typeof k=="function"?k:!1}function l(){for(var p=0;p0&&o(l,E))}catch(S){f.call(new d(E),S)}}}function f(p){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=p,k.state=2,k.chain.length>0&&o(l,k))}function h(p,k,E,S){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(X){return t.call(X)},n=self.document;function i(X){return X&&(X.ownerDocument||X.document||X).documentElement}function a(X){return X&&(X.ownerDocument&&X.ownerDocument.defaultView||X.document&&X||X.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(X){r=function(se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=se[Te];return Ne}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(X){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(se,Te){s.call(this,se,Te+"")},o.setAttributeNS=function(se,Te,Ne){l.call(this,se,Te,Ne+"")},u.setProperty=function(se,Te,Ne){c.call(this,se,Te+"",Ne)}}e.ascending=f;function f(X,se){return Xse?1:X>=se?0:NaN}e.descending=function(X,se){return seX?1:se>=X?0:NaN},e.min=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te=Ye){He=Ye;break}for(;++TeYe&&(He=Ye)}else{for(;++Te=Ye){He=Ye;break}for(;++TeYe&&(He=Ye)}return He},e.max=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te=Ye){He=Ye;break}for(;++TeHe&&(He=Ye)}else{for(;++Te=Ye){He=Ye;break}for(;++TeHe&&(He=Ye)}return He},e.extent=function(X,se){var Te=-1,Ne=X.length,He,Ye,kt;if(arguments.length===1){for(;++Te=Ye){He=kt=Ye;break}for(;++TeYe&&(He=Ye),kt=Ye){He=kt=Ye;break}for(;++TeYe&&(He=Ye),kt1)return kt/(jt-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function v(X){return{left:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne>>1;X(se[Ye],Te)<0?Ne=Ye+1:He=Ye}return Ne},right:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne>>1;X(se[Ye],Te)>0?He=Ye:Ne=Ye+1}return Ne}}}var _=v(f);e.bisectLeft=_.left,e.bisect=e.bisectRight=_.right,e.bisector=function(X){return v(X.length===1?function(se,Te){return f(X(se),Te)}:X)},e.shuffle=function(X,se,Te){(Ne=arguments.length)<3&&(Te=X.length,Ne<2&&(se=0));for(var Ne=Te-se,He,Ye;Ne;)Ye=Math.random()*Ne--|0,He=X[Ne+se],X[Ne+se]=X[Ye+se],X[Ye+se]=He;return X},e.permute=function(X,se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=X[se[Te]];return Ne},e.pairs=function(X){for(var se=0,Te=X.length-1,Ne,He=X[0],Ye=new Array(Te<0?0:Te);se=0;)for(kt=X[se],Te=kt.length;--Te>=0;)Ye[--He]=kt[Te];return Ye};var p=Math.abs;e.range=function(X,se,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(se=X,X=0)),(se-X)/Te===1/0)throw new Error("infinite range");var Ne=[],He=k(p(Te)),Ye=-1,kt;if(X*=He,se*=He,Te*=He,Te<0)for(;(kt=X+Te*++Ye)>se;)Ne.push(kt/He);else for(;(kt=X+Te*++Ye)=se.length)return He?He.call(X,jt):Ne?jt.sort(Ne):jt;for(var yr=-1,Hr=jt.length,qr=se[gr++],_i,bi,Zr,ai=new S,gi;++yr=se.length)return nt;var gr=[],yr=Te[jt++];return nt.forEach(function(Hr,qr){gr.push({key:Hr,values:kt(qr,jt)})}),yr?gr.sort(function(Hr,qr){return yr(Hr.key,qr.key)}):gr}return X.map=function(nt,jt){return Ye(jt,nt,0)},X.entries=function(nt){return kt(Ye(e.map,nt,0),0)},X.key=function(nt){return se.push(nt),X},X.sortKeys=function(nt){return Te[se.length-1]=nt,X},X.sortValues=function(nt){return Ne=nt,X},X.rollup=function(nt){return He=nt,X},X},e.set=function(X){var se=new V;if(X)for(var Te=0,Ne=X.length;Te=0&&(Ne=X.slice(Te+1),X=X.slice(0,Te)),X)return arguments.length<2?this[X].on(Ne):this[X].on(Ne,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(Ne,null);return this}};function oe(X){var se=[],Te=new S;function Ne(){for(var He=se,Ye=-1,kt=He.length,nt;++Ye=0&&(Te=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),Ze.hasOwnProperty(Te)?{space:Ze[Te],local:X}:X}},Pe.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node();return X=e.ns.qualify(X),X.local?Te.getAttributeNS(X.space,X.local):Te.getAttribute(X)}for(se in X)this.each(ut(se,X[se]));return this}return this.each(ut(X,se))};function ut(X,se){X=e.ns.qualify(X);function Te(){this.removeAttribute(X)}function Ne(){this.removeAttributeNS(X.space,X.local)}function He(){this.setAttribute(X,se)}function Ye(){this.setAttributeNS(X.space,X.local,se)}function kt(){var jt=se.apply(this,arguments);jt==null?this.removeAttribute(X):this.setAttribute(X,jt)}function nt(){var jt=se.apply(this,arguments);jt==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,jt)}return se==null?X.local?Ne:Te:typeof se=="function"?X.local?nt:kt:X.local?Ye:He}function pt(X){return X.trim().replace(/\s+/g," ")}Pe.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node(),Ne=(X=st(X)).length,He=-1;if(se=Te.classList){for(;++He=0;)(Ye=Te[Ne])&&(He&&He!==Ye.nextSibling&&He.parentNode.insertBefore(Ye,He),He=Ye);return this},Pe.sort=function(X){X=St.apply(this,arguments);for(var se=-1,Te=this.length;++se=se&&(se=He+1);!(jt=kt[se])&&++se0&&(X=X.slice(0,He));var kt=er.get(X);kt&&(X=kt,Ye=Tr);function nt(){var yr=this[Ne];yr&&(this.removeEventListener(X,yr,yr.$),delete this[Ne])}function jt(){var yr=Ye(se,r(arguments));nt.call(this),this.addEventListener(X,this[Ne]=yr,yr.$=Te),yr._=se}function gr(){var yr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),Hr;for(var qr in this)if(Hr=qr.match(yr)){var _i=this[qr];this.removeEventListener(Hr[1],_i,_i.$),delete this[qr]}}return He?se?jt:nt:se?H:gr}var er=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&er.forEach(function(X){"on"+X in n&&er.remove(X)});function lr(X,se){return function(Te){var Ne=e.event;e.event=Te,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=Ne}}}function Tr(X,se){var Te=lr(X,se);return function(Ne){var He=this,Ye=Ne.relatedTarget;(!Ye||Ye!==He&&!(Ye.compareDocumentPosition(He)&8))&&Te.call(He,Ne)}}var Lr,ti=0;function Br(X){var se=".dragsuppress-"+ ++ti,Te="click"+se,Ne=e.select(a(X)).on("touchmove"+se,_e).on("dragstart"+se,_e).on("selectstart"+se,_e);if(Lr==null&&(Lr="onselectstart"in X?!1:j(X.style,"userSelect")),Lr){var He=i(X).style,Ye=He[Lr];He[Lr]="none"}return function(kt){if(Ne.on(se,null),Lr&&(He[Lr]=Ye),kt){var nt=function(){Ne.on(Te,null)};Ne.on(Te,function(){_e(),nt()},!0),setTimeout(nt,0)}}}e.mouse=function(X){return dt(X,Ee())};var Vr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function dt(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Te=X.ownerSVGElement||X;if(Te.createSVGPoint){var Ne=Te.createSVGPoint();if(Vr<0){var He=a(X);if(He.scrollX||He.scrollY){Te=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ye=Te[0][0].getScreenCTM();Vr=!(Ye.f||Ye.e),Te.remove()}}return Vr?(Ne.x=se.pageX,Ne.y=se.pageY):(Ne.x=se.clientX,Ne.y=se.clientY),Ne=Ne.matrixTransform(X.getScreenCTM().inverse()),[Ne.x,Ne.y]}var kt=X.getBoundingClientRect();return[se.clientX-kt.left-X.clientLeft,se.clientY-kt.top-X.clientTop]}e.touch=function(X,se,Te){if(arguments.length<3&&(Te=se,se=Ee().changedTouches),se){for(var Ne=0,He=se.length,Ye;Ne0?1:X<0?-1:0}function ar(X,se,Te){return(se[0]-X[0])*(Te[1]-X[1])-(se[1]-X[1])*(Te[0]-X[0])}function vr(X){return X>1?0:X<-1?tt:Math.acos(X)}function ii(X){return X>1?xe:X<-1?-xe:Math.asin(X)}function pi(X){return((X=Math.exp(X))-1/X)/2}function $r(X){return((X=Math.exp(X))+1/X)/2}function di(X){return((X=Math.exp(2*X))-1)/(X+1)}function ji(X){return(X=Math.sin(X/2))*X}var In=Math.SQRT2,wi=2,On=4;e.interpolateZoom=function(X,se){var Te=X[0],Ne=X[1],He=X[2],Ye=se[0],kt=se[1],nt=se[2],jt=Ye-Te,gr=kt-Ne,yr=jt*jt+gr*gr,Hr,qr;if(yr0&&(Gn=Gn.transition().duration(kt)),Gn.call(Si.event)}function Ea(){ai&&ai.domain(Zr.range().map(function(Gn){return(Gn-X.x)/X.k}).map(Zr.invert)),Ii&&Ii.domain(gi.range().map(function(Gn){return(Gn-X.y)/X.k}).map(gi.invert))}function Ia(Gn){nt++||Gn({type:"zoomstart"})}function yo(Gn){Ea(),Gn({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Da(Gn){--nt||(Gn({type:"zoomend"}),Te=null)}function go(){var Gn=this,ja=bi.of(Gn,arguments),Fo=0,Uo=e.select(a(Gn)).on(gr,bu).on(yr,dl),$s=ei(e.mouse(Gn)),Sl=Br(Gn);fa.call(Gn),Ia(ja);function bu(){Fo=1,Un(e.mouse(Gn),$s),yo(ja)}function dl(){Uo.on(gr,null).on(yr,null),Sl(Fo),Da(ja)}}function Is(){var Gn=this,ja=bi.of(Gn,arguments),Fo={},Uo=0,$s,Sl=".zoom-"+e.event.changedTouches[0].identifier,bu="touchmove"+Sl,dl="touchend"+Sl,Sc=[],Me=e.select(Gn),bt=Br(Gn);Rr(),Ia(ja),Me.on(jt,null).on(qr,Rr);function zt(){var Gr=e.touches(Gn);return $s=X.k,Gr.forEach(function(mi){mi.identifier in Fo&&(Fo[mi.identifier]=ei(mi))}),Gr}function Rr(){var Gr=e.event.target;e.select(Gr).on(bu,jr).on(dl,Nr),Sc.push(Gr);for(var mi=e.event.changedTouches,Ui=0,qi=mi.length;Ui1){var en=Ei[0],Wi=Ei[1],si=en[0]-Wi[0],Mr=en[1]-Wi[1];Uo=si*si+Mr*Mr}}function jr(){var Gr=e.touches(Gn),mi,Ui,qi,Ei;fa.call(Gn);for(var Hn=0,en=Gr.length;Hn1?1:se,Te=Te<0?0:Te>1?1:Te,He=Te<=.5?Te*(1+se):Te+se-Te*se,Ne=2*Te-He;function Ye(nt){return nt>360?nt-=360:nt<0&&(nt+=360),nt<60?Ne+(He-Ne)*nt/60:nt<180?He:nt<240?Ne+(He-Ne)*(240-nt)/60:Ne}function kt(nt){return Math.round(Ye(nt)*255)}return new Wa(kt(X+120),kt(X),kt(X-120))}e.hcl=nr;function nr(X,se,Te){return this instanceof nr?(this.h=+X,this.c=+se,void(this.l=+Te)):arguments.length<2?X instanceof nr?new nr(X.h,X.c,X.l):X instanceof ri?Sn(X.l,X.a,X.b):Sn((X=jn((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new nr(X,se,Te)}var Er=nr.prototype=new la;Er.brighter=function(X){return new nr(this.h,this.c,Math.min(100,this.l+Qr*(arguments.length?X:1)))},Er.darker=function(X){return new nr(this.h,this.c,Math.max(0,this.l-Qr*(arguments.length?X:1)))},Er.rgb=function(){return Xr(this.h,this.c,this.l).rgb()};function Xr(X,se,Te){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new ri(Te,Math.cos(X*=ke)*se,Math.sin(X)*se)}e.lab=ri;function ri(X,se,Te){return this instanceof ri?(this.l=+X,this.a=+se,void(this.b=+Te)):arguments.length<2?X instanceof ri?new ri(X.l,X.a,X.b):X instanceof nr?Xr(X.h,X.c,X.l):jn((X=Wa(X)).r,X.g,X.b):new ri(X,se,Te)}var Qr=18,Oi=.95047,$i=1,tn=1.08883,fn=ri.prototype=new la;fn.brighter=function(X){return new ri(Math.min(100,this.l+Qr*(arguments.length?X:1)),this.a,this.b)},fn.darker=function(X){return new ri(Math.max(0,this.l-Qr*(arguments.length?X:1)),this.a,this.b)},fn.rgb=function(){return yn(this.l,this.a,this.b)};function yn(X,se,Te){var Ne=(X+16)/116,He=Ne+se/500,Ye=Ne-Te/200;return He=Ba(He)*Oi,Ne=Ba(Ne)*$i,Ye=Ba(Ye)*tn,new Wa(ma(3.2404542*He-1.5371385*Ne-.4985314*Ye),ma(-.969266*He+1.8760108*Ne+.041556*Ye),ma(.0556434*He-.2040259*Ne+1.0572252*Ye))}function Sn(X,se,Te){return X>0?new nr(Math.atan2(Te,se)*vt,Math.sqrt(se*se+Te*Te),X):new nr(NaN,NaN,X)}function Ba(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function ua(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ma(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=Wa;function Wa(X,se,Te){return this instanceof Wa?(this.r=~~X,this.g=~~se,void(this.b=~~Te)):arguments.length<2?X instanceof Wa?new Wa(X.r,X.g,X.b):Ha(""+X,Wa,rr):new Wa(X,se,Te)}function Fa(X){return new Wa(X>>16,X>>8&255,X&255)}function Wo(X){return Fa(X)+""}var da=Wa.prototype=new la;da.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Te=this.g,Ne=this.b,He=30;return!se&&!Te&&!Ne?new Wa(He,He,He):(se&&se>4,Ne=Ne>>4|Ne,He=jt&240,He=He>>4|He,Ye=jt&15,Ye=Ye<<4|Ye):X.length===7&&(Ne=(jt&16711680)>>16,He=(jt&65280)>>8,Ye=jt&255)),se(Ne,He,Ye))}function vo(X,se,Te){var Ne=Math.min(X/=255,se/=255,Te/=255),He=Math.max(X,se,Te),Ye=He-Ne,kt,nt,jt=(He+Ne)/2;return Ye?(nt=jt<.5?Ye/(He+Ne):Ye/(2-He-Ne),X==He?kt=(se-Te)/Ye+(se0&&jt<1?0:kt),new Ut(kt,nt,jt)}function jn(X,se,Te){X=Mt(X),se=Mt(se),Te=Mt(Te);var Ne=ua((.4124564*X+.3575761*se+.1804375*Te)/Oi),He=ua((.2126729*X+.7151522*se+.072175*Te)/$i),Ye=ua((.0193339*X+.119192*se+.9503041*Te)/tn);return ri(116*He-16,500*(Ne-He),200*(He-Ye))}function Mt(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function kr(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var Jr=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Jr.forEach(function(X,se){Jr.set(X,Fa(se))});function vi(X){return typeof X=="function"?X:function(){return X}}e.functor=vi,e.xhr=hn(G);function hn(X){return function(se,Te,Ne){return arguments.length===2&&typeof Te=="function"&&(Ne=Te,Te=null),An(se,Te,X,Ne)}}function An(X,se,Te,Ne){var He={},Ye=e.dispatch("beforesend","progress","load","error"),kt={},nt=new XMLHttpRequest,jt=null;self.XDomainRequest&&!("withCredentials"in nt)&&/^(http(s)?:)?\/\//.test(X)&&(nt=new XDomainRequest),"onload"in nt?nt.onload=nt.onerror=gr:nt.onreadystatechange=function(){nt.readyState>3&&gr()};function gr(){var yr=nt.status,Hr;if(!yr&&Li(nt)||yr>=200&&yr<300||yr===304){try{Hr=Te.call(He,nt)}catch(qr){Ye.error.call(He,qr);return}Ye.load.call(He,Hr)}else Ye.error.call(He,nt)}return nt.onprogress=function(yr){var Hr=e.event;e.event=yr;try{Ye.progress.call(He,nt)}finally{e.event=Hr}},He.header=function(yr,Hr){return yr=(yr+"").toLowerCase(),arguments.length<2?kt[yr]:(Hr==null?delete kt[yr]:kt[yr]=Hr+"",He)},He.mimeType=function(yr){return arguments.length?(se=yr==null?null:yr+"",He):se},He.responseType=function(yr){return arguments.length?(jt=yr,He):jt},He.response=function(yr){return Te=yr,He},["get","post"].forEach(function(yr){He[yr]=function(){return He.send.apply(He,[yr].concat(r(arguments)))}}),He.send=function(yr,Hr,qr){if(arguments.length===2&&typeof Hr=="function"&&(qr=Hr,Hr=null),nt.open(yr,X,!0),se!=null&&!("accept"in kt)&&(kt.accept=se+",*/*"),nt.setRequestHeader)for(var _i in kt)nt.setRequestHeader(_i,kt[_i]);return se!=null&&nt.overrideMimeType&&nt.overrideMimeType(se),jt!=null&&(nt.responseType=jt),qr!=null&&He.on("error",qr).on("load",function(bi){qr(null,bi)}),Ye.beforesend.call(He,nt),nt.send(Hr==null?null:Hr),He},He.abort=function(){return nt.abort(),He},e.rebind(He,Ye,"on"),Ne==null?He:He.get(Mn(Ne))}function Mn(X){return X.length===1?function(se,Te){X(se==null?Te:null)}:X}function Li(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Te=new RegExp('["'+X+` ]`),Ne=X.charCodeAt(0);function He(gr,yr,Hr){arguments.length<3&&(Hr=yr,yr=null);var qr=An(gr,se,yr==null?Ye:kt(yr),Hr);return qr.row=function(_i){return arguments.length?qr.response((yr=_i)==null?Ye:kt(_i)):yr},qr}function Ye(gr){return He.parse(gr.responseText)}function kt(gr){return function(yr){return He.parse(yr.responseText,gr)}}He.parse=function(gr,yr){var Hr;return He.parseRows(gr,function(qr,_i){if(Hr)return Hr(qr,_i-1);var bi=function(Zr){for(var ai={},gi=qr.length,Ii=0;Ii=bi)return qr;if(Ii)return Ii=!1,Hr;var Ln=Zr;if(gr.charCodeAt(Ln)===34){for(var En=Ln;En++24?(isFinite(se)&&(clearTimeout(Ma),Ma=setTimeout(po,se)),Jn=0):(Jn=1,_o(po))}e.timer.flush=function(){Lo(),ko()};function Lo(){for(var X=Date.now(),se=_n;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function ko(){for(var X,se=_n,Te=1/0;se;)se.c?(se.t=0;--nt)Zr.push(He[gr[Hr[nt]][2]]);for(nt=+_i;nt1&&ar(X[Te[Ne-2]],X[Te[Ne-1]],X[He])<=0;)--Ne;Te[Ne++]=He}return Te.slice(0,Ne)}function ul(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return ie(X,zl),X};var zl=e.geom.polygon.prototype=[];zl.area=function(){for(var X=-1,se=this.length,Te,Ne=this[se-1],He=0;++XJe)nt=nt.L;else if(kt=se-xo(nt,Te),kt>Je){if(!nt.R){Ne=nt;break}nt=nt.R}else{Ye>-Je?(Ne=nt.P,He=nt):kt>-Je?(Ne=nt,He=nt.N):Ne=He=nt;break}var jt=bs(X);if(zs.insert(Ne,jt),!(!Ne&&!He)){if(Ne===He){Oo(Ne),He=bs(Ne.site),zs.insert(jt,He),jt.edge=He.edge=rf(Ne.site,jt.site),aa(Ne),aa(He);return}if(!He){jt.edge=rf(Ne.site,jt.site);return}Oo(Ne),Oo(He);var gr=Ne.site,yr=gr.x,Hr=gr.y,qr=X.x-yr,_i=X.y-Hr,bi=He.site,Zr=bi.x-yr,ai=bi.y-Hr,gi=2*(qr*ai-_i*Zr),Ii=qr*qr+_i*_i,Si=Zr*Zr+ai*ai,ei={x:(ai*Ii-_i*Si)/gi+yr,y:(qr*Si-Zr*Ii)/gi+Hr};pl(He.edge,gr,bi,ei),jt.edge=rf(gr,X,null,ei),He.edge=rf(X,bi,null,ei),aa(Ne),aa(He)}}function Ol(X,se){var Te=X.site,Ne=Te.x,He=Te.y,Ye=He-se;if(!Ye)return Ne;var kt=X.P;if(!kt)return-1/0;Te=kt.site;var nt=Te.x,jt=Te.y,gr=jt-se;if(!gr)return nt;var yr=nt-Ne,Hr=1/Ye-1/gr,qr=yr/gr;return Hr?(-qr+Math.sqrt(qr*qr-2*Hr*(yr*yr/(-2*gr)-jt+gr/2+He-Ye/2)))/Hr+Ne:(Ne+nt)/2}function xo(X,se){var Te=X.N;if(Te)return Ol(Te,se);var Ne=X.site;return Ne.y===se?Ne.x:1/0}function Yl(X){this.site=X,this.edges=[]}Yl.prototype.prepare=function(){for(var X=this.edges,se=X.length,Te;se--;)Te=X[se].edge,(!Te.b||!Te.a)&&X.splice(se,1);return X.sort(Hl),X.length};function Ns(X){for(var se=X[0][0],Te=X[1][0],Ne=X[0][1],He=X[1][1],Ye,kt,nt,jt,gr=Ks,yr=gr.length,Hr,qr,_i,bi,Zr,ai;yr--;)if(Hr=gr[yr],!(!Hr||!Hr.prepare()))for(_i=Hr.edges,bi=_i.length,qr=0;qrJe||p(jt-kt)>Je)&&(_i.splice(qr,0,new Zc(Uf(Hr.site,ai,p(nt-se)Je?{x:se,y:p(Ye-se)Je?{x:p(kt-He)Je?{x:Te,y:p(Ye-Te)Je?{x:p(kt-Ne)=-je)){var qr=jt*jt+gr*gr,_i=yr*yr+ai*ai,bi=(ai*qr-gr*_i)/Hr,Zr=(jt*_i-yr*qr)/Hr,ai=Zr+nt,gi=Su.pop()||new ac;gi.arc=X,gi.site=He,gi.x=bi+kt,gi.y=ai+Math.sqrt(bi*bi+Zr*Zr),gi.cy=ai,X.circle=gi;for(var Ii=null,Si=Zl._;Si;)if(gi.y0)){if(Zr/=_i,_i<0){if(Zr0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}if(Zr=Te-nt,!(!_i&&Zr<0)){if(Zr/=_i,_i<0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}else if(_i>0){if(Zr0)){if(Zr/=bi,bi<0){if(Zr0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}if(Zr=Ne-jt,!(!bi&&Zr<0)){if(Zr/=bi,bi<0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}else if(bi>0){if(Zr0&&(He.a={x:nt+Hr*_i,y:jt+Hr*bi}),qr<1&&(He.b={x:nt+qr*_i,y:jt+qr*bi}),He}}}}}}function ql(X){for(var se=cl,Te=qo(X[0][0],X[0][1],X[1][0],X[1][1]),Ne=se.length,He;Ne--;)He=se[Ne],(!Pc(He,X)||!Te(He)||p(He.a.x-He.b.x)=Ye)return;if(yr>qr){if(!Ne)Ne={x:bi,y:kt};else if(Ne.y>=nt)return;Te={x:bi,y:nt}}else{if(!Ne)Ne={x:bi,y:nt};else if(Ne.y1)if(yr>qr){if(!Ne)Ne={x:(kt-gi)/ai,y:kt};else if(Ne.y>=nt)return;Te={x:(nt-gi)/ai,y:nt}}else{if(!Ne)Ne={x:(nt-gi)/ai,y:nt};else if(Ne.y=Ye)return;Te={x:Ye,y:ai*Ye+gi}}else{if(!Ne)Ne={x:Ye,y:ai*Ye+gi};else if(Ne.x=yr&&gi.x<=qr&&gi.y>=Hr&&gi.y<=_i?[[yr,_i],[qr,_i],[qr,Hr],[yr,Hr]]:[];Ii.point=jt[Zr]}),gr}function nt(jt){return jt.map(function(gr,yr){return{x:Math.round(Ne(gr,yr)/Je)*Je,y:Math.round(He(gr,yr)/Je)*Je,i:yr}})}return kt.links=function(jt){return sc(nt(jt)).edges.filter(function(gr){return gr.l&&gr.r}).map(function(gr){return{source:jt[gr.l.i],target:jt[gr.r.i]}})},kt.triangles=function(jt){var gr=[];return sc(nt(jt)).cells.forEach(function(yr,Hr){for(var qr=yr.site,_i=yr.edges.sort(Hl),bi=-1,Zr=_i.length,ai,gi,Ii=_i[Zr-1].edge,Si=Ii.l===qr?Ii.r:Ii.l;++biSi&&(Si=yr.x),yr.y>ei&&(ei=yr.y),_i.push(yr.x),bi.push(yr.y);else for(Zr=0;ZrSi&&(Si=Ln),En>ei&&(ei=En),_i.push(Ln),bi.push(En)}var Un=Si-gi,ia=ei-Ii;Un>ia?ei=Ii+Un:Si=gi+ia;function Ea(Da,go,Is,Ms,Xs,Gn,ja,Fo){if(!(isNaN(Is)||isNaN(Ms)))if(Da.leaf){var Uo=Da.x,$s=Da.y;if(Uo!=null)if(p(Uo-Is)+p($s-Ms)<.01)Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo);else{var Sl=Da.point;Da.x=Da.y=Da.point=null,Ia(Da,Sl,Uo,$s,Xs,Gn,ja,Fo),Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo)}else Da.x=Is,Da.y=Ms,Da.point=go}else Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo)}function Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo){var Uo=(Xs+ja)*.5,$s=(Gn+Fo)*.5,Sl=Is>=Uo,bu=Ms>=$s,dl=bu<<1|Sl;Da.leaf=!1,Da=Da.nodes[dl]||(Da.nodes[dl]=Jl()),Sl?Xs=Uo:ja=Uo,bu?Gn=$s:Fo=$s,Ea(Da,go,Is,Ms,Xs,Gn,ja,Fo)}var yo=Jl();if(yo.add=function(Da){Ea(yo,Da,+Hr(Da,++Zr),+qr(Da,Zr),gi,Ii,Si,ei)},yo.visit=function(Da){fl(Da,yo,gi,Ii,Si,ei)},yo.find=function(Da){return lc(yo,Da[0],Da[1],gi,Ii,Si,ei)},Zr=-1,se==null){for(;++ZrYe||qr>kt||_i=Ln,ia=Te>=En,Ea=ia<<1|Un,Ia=Ea+4;EaTe&&(Ye=se.slice(Te,Ye),nt[kt]?nt[kt]+=Ye:nt[++kt]=Ye),(Ne=Ne[0])===(He=He[0])?nt[kt]?nt[kt]+=He:nt[++kt]=He:(nt[++kt]=null,jt.push({i:kt,x:Hs(Ne,He)})),Te=uc.lastIndex;return Te=0&&!(Ne=e.interpolators[Te](X,se)););return Ne}e.interpolators=[function(X,se){var Te=typeof se;return(Te==="string"?Jr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?Fu:Go:se instanceof la?Fu:Array.isArray(se)?Gu:Te==="object"&&isNaN(se)?Es:Hs)(X,se)}],e.interpolateArray=Gu;function Gu(X,se){var Te=[],Ne=[],He=X.length,Ye=se.length,kt=Math.min(X.length,se.length),nt;for(nt=0;nt=0?X.slice(0,se):X,Ne=se>=0?X.slice(se+1):"in";return Te=ad.get(Te)||qs,Ne=Po.get(Ne)||G,od(Ne(Te.apply(null,t.call(arguments,1))))};function od(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function Yo(X){return function(se){return 1-X(1-se)}}function Pa(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function af(X){return X*X}function Hu(X){return X*X*X}function bl(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Te=se*X;return 4*(X<.5?Te:3*(X-se)+Te-.75)}function Gf(X){return function(se){return Math.pow(se,X)}}function Ic(X){return 1-Math.cos(X*xe)}function yf(X){return Math.pow(2,10*(X-1))}function Bl(X){return 1-Math.sqrt(1-X*X)}function wh(X,se){var Te;return arguments.length<2&&(se=.45),arguments.length?Te=se/xt*Math.asin(1/X):(X=1,Te=se/4),function(Ne){return 1+X*Math.pow(2,-10*Ne)*Math.sin((Ne-Te)*xt/se)}}function Qf(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function _f(X){return X<1/2.75?7.5625*X*X:X<2/2.75?7.5625*(X-=1.5/2.75)*X+.75:X<2.5/2.75?7.5625*(X-=2.25/2.75)*X+.9375:7.5625*(X-=2.625/2.75)*X+.984375}e.interpolateHcl=Yc;function Yc(X,se){X=e.hcl(X),se=e.hcl(se);var Te=X.h,Ne=X.c,He=X.l,Ye=se.h-Te,kt=se.c-Ne,nt=se.l-He;return isNaN(kt)&&(kt=0,Ne=isNaN(Ne)?se.c:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return Xr(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+""}}e.interpolateHsl=eh;function eh(X,se){X=e.hsl(X),se=e.hsl(se);var Te=X.h,Ne=X.s,He=X.l,Ye=se.h-Te,kt=se.s-Ne,nt=se.l-He;return isNaN(kt)&&(kt=0,Ne=isNaN(Ne)?se.s:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return rr(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+""}}e.interpolateLab=th;function th(X,se){X=e.lab(X),se=e.lab(se);var Te=X.l,Ne=X.a,He=X.b,Ye=se.l-Te,kt=se.a-Ne,nt=se.b-He;return function(jt){return yn(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+""}}e.interpolateRound=ju;function ju(X,se){return se-=X,function(Te){return Math.round(X+se*Te)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Te){if(Te!=null){se.setAttribute("transform",Te);var Ne=se.transform.baseVal.consolidate()}return new Hf(Ne?Ne.matrix:Kc)})(X)};function Hf(X){var se=[X.a,X.b],Te=[X.c,X.d],Ne=of(se),He=cc(se,Te),Ye=of(Nl(Te,se,-He))||0;se[0]*Te[1]180?se+=360:se-X>180&&(X+=360),Ne.push({i:Te.push(Rc(Te)+"rotate(",null,")")-2,x:Hs(X,se)})):se&&Te.push(Rc(Te)+"rotate("+se+")")}function Gh(X,se,Te,Ne){X!==se?Ne.push({i:Te.push(Rc(Te)+"skewX(",null,")")-2,x:Hs(X,se)}):se&&Te.push(Rc(Te)+"skewX("+se+")")}function rh(X,se,Te,Ne){if(X[0]!==se[0]||X[1]!==se[1]){var He=Te.push(Rc(Te)+"scale(",null,",",null,")");Ne.push({i:He-4,x:Hs(X[0],se[0])},{i:He-2,x:Hs(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Te.push(Rc(Te)+"scale("+se+")")}function sf(X,se){var Te=[],Ne=[];return X=e.transform(X),se=e.transform(se),gs(X.translate,se.translate,Te,Ne),jf(X.rotate,se.rotate,Te,Ne),Gh(X.skew,se.skew,Te,Ne),rh(X.scale,se.scale,Te,Ne),X=se=null,function(He){for(var Ye=-1,kt=Ne.length,nt;++Ye0?Ye=ei:(Te.c=null,Te.t=NaN,Te=null,se.end({type:"end",alpha:Ye=0})):ei>0&&(se.start({type:"start",alpha:Ye=ei}),Te=No(X.tick)),X):Ye},X.start=function(){var ei,Ln=_i.length,En=bi.length,Un=Ne[0],ia=Ne[1],Ea,Ia;for(ei=0;ei=0;)Ye.push(yr=gr[jt]),yr.parent=nt,yr.depth=nt.depth+1;Te&&(nt.value=0),nt.children=gr}else Te&&(nt.value=+Te.call(Ne,nt,nt.depth)||0),delete nt.children;return wc(He,function(Hr){var qr,_i;X&&(qr=Hr.children)&&qr.sort(X),Te&&(_i=Hr.parent)&&(_i.value+=Hr.value)}),kt}return Ne.sort=function(He){return arguments.length?(X=He,Ne):X},Ne.children=function(He){return arguments.length?(se=He,Ne):se},Ne.value=function(He){return arguments.length?(Te=He,Ne):Te},Ne.revalue=function(He){return Te&&(Fc(He,function(Ye){Ye.children&&(Ye.value=0)}),wc(He,function(Ye){var kt;Ye.children||(Ye.value=+Te.call(Ne,Ye,Ye.depth)||0),(kt=Ye.parent)&&(kt.value+=Ye.value)})),He},Ne};function zu(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=Ou,X}function Fc(X,se){for(var Te=[X];(X=Te.pop())!=null;)if(se(X),(He=X.children)&&(Ne=He.length))for(var Ne,He;--Ne>=0;)Te.push(He[Ne])}function wc(X,se){for(var Te=[X],Ne=[];(X=Te.pop())!=null;)if(Ne.push(X),(kt=X.children)&&(Ye=kt.length))for(var He=-1,Ye,kt;++HeHe&&(He=nt),Ne.push(nt)}for(kt=0;ktNe&&(Te=se,Ne=He);return Te}function Us(X){return X.reduce(wf,0)}function wf(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Te=Rf,Ne=zc;function He(Ye,qr){for(var nt=[],jt=Ye.map(se,this),gr=Te.call(this,jt,qr),yr=Ne.call(this,gr,jt,qr),Hr,qr=-1,_i=jt.length,bi=yr.length-1,Zr=X?1:1/_i,ai;++qr0)for(qr=-1;++qr<_i;)ai=jt[qr],ai>=gr[0]&&ai<=gr[1]&&(Hr=nt[e.bisect(yr,ai,1,bi)-1],Hr.y+=Zr,Hr.push(Ye[qr]));return nt}return He.value=function(Ye){return arguments.length?(se=Ye,He):se},He.range=function(Ye){return arguments.length?(Te=vi(Ye),He):Te},He.bins=function(Ye){return arguments.length?(Ne=typeof Ye=="number"?function(kt){return Wu(kt,Ye)}:vi(Ye),He):Ne},He.frequency=function(Ye){return arguments.length?(X=!!Ye,He):X},He};function zc(X,se){return Wu(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function Wu(X,se){for(var Te=-1,Ne=+X[0],He=(X[1]-Ne)/se,Ye=[];++Te<=se;)Ye[Te]=He*Te+Ne;return Ye}function Rf(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(Xu),se=0,Te=[1,1],Ne;function He(Ye,kt){var nt=X.call(this,Ye,kt),jt=nt[0],gr=Te[0],yr=Te[1],Hr=Ne==null?Math.sqrt:typeof Ne=="function"?Ne:function(){return Ne};if(jt.x=jt.y=0,wc(jt,function(_i){_i.r=+Hr(_i.value)}),wc(jt,ah),se){var qr=se*(Ne?1:Math.max(2*jt.r/gr,2*jt.r/yr))/2;wc(jt,function(_i){_i.r+=qr}),wc(jt,ah),wc(jt,function(_i){_i.r-=qr})}return Tc(jt,gr/2,yr/2,Ne?1:1/Math.max(2*jt.r/gr,2*jt.r/yr)),nt}return He.size=function(Ye){return arguments.length?(Te=Ye,He):Te},He.radius=function(Ye){return arguments.length?(Ne=Ye==null||typeof Ye=="function"?Ye:+Ye,He):Ne},He.padding=function(Ye){return arguments.length?(se=+Ye,He):se},zu(He,X)};function Xu(X,se){return X.value-se.value}function uf(X,se){var Te=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Te,Te._pack_prev=se}function Xf(X,se){X._pack_next=se,se._pack_prev=X}function Wl(X,se){var Te=se.x-X.x,Ne=se.y-X.y,He=X.r+se.r;return .999*He*He>Te*Te+Ne*Ne}function ah(X){if(!(se=X.children)||!(qr=se.length))return;var se,Te=1/0,Ne=-1/0,He=1/0,Ye=-1/0,kt,nt,jt,gr,yr,Hr,qr;function _i(ei){Te=Math.min(ei.x-ei.r,Te),Ne=Math.max(ei.x+ei.r,Ne),He=Math.min(ei.y-ei.r,He),Ye=Math.max(ei.y+ei.r,Ye)}if(se.forEach(Zu),kt=se[0],kt.x=-kt.r,kt.y=0,_i(kt),qr>1&&(nt=se[1],nt.x=nt.r,nt.y=0,_i(nt),qr>2))for(jt=se[2],wl(kt,nt,jt),_i(jt),uf(kt,jt),kt._pack_prev=jt,uf(jt,nt),nt=kt._pack_next,gr=3;grai.x&&(ai=Ln),Ln.depth>gi.depth&&(gi=Ln)});var Ii=se(Zr,ai)/2-Zr.x,Si=Te[0]/(ai.x+se(ai,Zr)/2+Ii),ei=Te[1]/(gi.depth||1);Fc(_i,function(Ln){Ln.x=(Ln.x+Ii)*Si,Ln.y=Ln.depth*ei})}return qr}function Ye(yr){for(var Hr={A:null,children:[yr]},qr=[Hr],_i;(_i=qr.pop())!=null;)for(var bi=_i.children,Zr,ai=0,gi=bi.length;ai0&&(fc(At(Zr,yr,qr),yr,Ln),gi+=Ln,Ii+=Ln),Si+=Zr.m,gi+=_i.m,ei+=ai.m,Ii+=bi.m;Zr&&!cf(bi)&&(bi.t=Zr,bi.m+=Si-Ii),_i&&!qc(ai)&&(ai.t=_i,ai.m+=gi-ei,qr=yr)}return qr}function gr(yr){yr.x*=Te[0],yr.y=yr.depth*Te[1]}return He.separation=function(yr){return arguments.length?(se=yr,He):se},He.size=function(yr){return arguments.length?(Ne=(Te=yr)==null?gr:null,He):Ne?null:Te},He.nodeSize=function(yr){return arguments.length?(Ne=(Te=yr)==null?null:gr,He):Ne?Te:null},zu(He,X)};function vu(X,se){return X.parent==se.parent?1:2}function qc(X){var se=X.children;return se.length?se[0]:X.t}function cf(X){var se=X.children,Te;return(Te=se.length)?se[Te-1]:X.t}function fc(X,se,Te){var Ne=Te/(se.i-X.i);se.c-=Ne,se.s+=Te,X.c+=Ne,se.z+=Te,se.m+=Te}function Bc(X){for(var se=0,Te=0,Ne=X.children,He=Ne.length,Ye;--He>=0;)Ye=Ne[He],Ye.z+=se,Ye.m+=se,se+=Ye.s+(Te+=Ye.c)}function At(X,se,Te){return X.a.parent===se.parent?X.a:Te}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Ne=!1;function He(Ye,kt){var nt=X.call(this,Ye,kt),jt=nt[0],gr,yr=0;wc(jt,function(Zr){var ai=Zr.children;ai&&ai.length?(Zr.x=Cr(ai),Zr.y=Wt(ai)):(Zr.x=gr?yr+=se(Zr,gr):0,Zr.y=0,gr=Zr)});var Hr=Ar(jt),qr=Kr(jt),_i=Hr.x-se(Hr,qr)/2,bi=qr.x+se(qr,Hr)/2;return wc(jt,Ne?function(Zr){Zr.x=(Zr.x-jt.x)*Te[0],Zr.y=(jt.y-Zr.y)*Te[1]}:function(Zr){Zr.x=(Zr.x-_i)/(bi-_i)*Te[0],Zr.y=(1-(jt.y?Zr.y/jt.y:1))*Te[1]}),nt}return He.separation=function(Ye){return arguments.length?(se=Ye,He):se},He.size=function(Ye){return arguments.length?(Ne=(Te=Ye)==null,He):Ne?null:Te},He.nodeSize=function(Ye){return arguments.length?(Ne=(Te=Ye)!=null,He):Ne?Te:null},zu(He,X)};function Wt(X){return 1+e.max(X,function(se){return se.y})}function Cr(X){return X.reduce(function(se,Te){return se+Te.x},0)/X.length}function Ar(X){var se=X.children;return se&&se.length?Ar(se[0]):X}function Kr(X){var se=X.children,Te;return se&&(Te=se.length)?Kr(se[Te-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Te=[1,1],Ne=null,He=ki,Ye=!1,kt,nt="squarify",jt=.5*(1+Math.sqrt(5));function gr(Zr,ai){for(var gi=-1,Ii=Zr.length,Si,ei;++gi0;)Ii.push(ei=Si[ia-1]),Ii.area+=ei.area,nt!=="squarify"||(En=qr(Ii,Un))<=Ln?(Si.pop(),Ln=En):(Ii.area-=Ii.pop().area,_i(Ii,Un,gi,!1),Un=Math.min(gi.dx,gi.dy),Ii.length=Ii.area=0,Ln=1/0);Ii.length&&(_i(Ii,Un,gi,!0),Ii.length=Ii.area=0),ai.forEach(yr)}}function Hr(Zr){var ai=Zr.children;if(ai&&ai.length){var gi=He(Zr),Ii=ai.slice(),Si,ei=[];for(gr(Ii,gi.dx*gi.dy/Zr.value),ei.area=0;Si=Ii.pop();)ei.push(Si),ei.area+=Si.area,Si.z!=null&&(_i(ei,Si.z?gi.dx:gi.dy,gi,!Ii.length),ei.length=ei.area=0);ai.forEach(Hr)}}function qr(Zr,ai){for(var gi=Zr.area,Ii,Si=0,ei=1/0,Ln=-1,En=Zr.length;++LnSi&&(Si=Ii));return gi*=gi,ai*=ai,gi?Math.max(ai*Si*jt/gi,gi/(ai*ei*jt)):1/0}function _i(Zr,ai,gi,Ii){var Si=-1,ei=Zr.length,Ln=gi.x,En=gi.y,Un=ai?se(Zr.area/ai):0,ia;if(ai==gi.dx){for((Ii||Un>gi.dy)&&(Un=gi.dy);++Sigi.dx)&&(Un=gi.dx);++Si1);return X+se*Ne*Math.sqrt(-2*Math.log(Ye)/Ye)}},logNormal:function(){var X=e.random.normal.apply(e,arguments);return function(){return Math.exp(X())}},bates:function(X){var se=e.random.irwinHall(X);return function(){return se()/X}},irwinHall:function(X){return function(){for(var se=0,Te=0;Te2?Fi:Nn,gr=Ne?Mu:Th;return He=jt(X,se,gr,Te),Ye=jt(se,X,gr,xl),nt}function nt(jt){return He(jt)}return nt.invert=function(jt){return Ye(jt)},nt.domain=function(jt){return arguments.length?(X=jt.map(Number),kt()):X},nt.range=function(jt){return arguments.length?(se=jt,kt()):se},nt.rangeRound=function(jt){return nt.range(jt).interpolate(ju)},nt.clamp=function(jt){return arguments.length?(Ne=jt,kt()):Ne},nt.interpolate=function(jt){return arguments.length?(Te=jt,kt()):Te},nt.ticks=function(jt){return Na(X,jt)},nt.tickFormat=function(jt,gr){return d3_scale_linearTickFormat(X,jt,gr)},nt.nice=function(jt){return Ra(X,jt),kt()},nt.copy=function(){return $n(X,se,Te,Ne)},kt()}function Ca(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Ra(X,se){return Yi(X,Qi(La(X,se)[2])),Yi(X,Qi(La(X,se)[2])),X}function La(X,se){se==null&&(se=10);var Te=dn(X),Ne=Te[1]-Te[0],He=Math.pow(10,Math.floor(Math.log(Ne/se)/Math.LN10)),Ye=se/Ne*He;return Ye<=.15?He*=10:Ye<=.35?He*=5:Ye<=.75&&(He*=2),Te[0]=Math.ceil(Te[0]/He)*He,Te[1]=Math.floor(Te[1]/He)*He+He*.5,Te[2]=He,Te}function Na(X,se){return e.range.apply(e,La(X,se))}var Yn={s:1,g:1,p:1,r:1,e:1};function Dn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Ka(X,se){var Te=Dn(se[2]);return X in Yn?Math.abs(Te-Dn(Math.max(p(se[0]),p(se[1]))))+ +(X!=="e"):Te-(X==="%")*2}e.scale.log=function(){return bo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function bo(X,se,Te,Ne){function He(nt){return(Te?Math.log(nt<0?0:nt):-Math.log(nt>0?0:-nt))/Math.log(se)}function Ye(nt){return Te?Math.pow(se,nt):-Math.pow(se,-nt)}function kt(nt){return X(He(nt))}return kt.invert=function(nt){return Ye(X.invert(nt))},kt.domain=function(nt){return arguments.length?(Te=nt[0]>=0,X.domain((Ne=nt.map(Number)).map(He)),kt):Ne},kt.base=function(nt){return arguments.length?(se=+nt,X.domain(Ne.map(He)),kt):se},kt.nice=function(){var nt=Yi(Ne.map(He),Te?Math:Xo);return X.domain(nt),Ne=nt.map(Ye),kt},kt.ticks=function(){var nt=dn(Ne),jt=[],gr=nt[0],yr=nt[1],Hr=Math.floor(He(gr)),qr=Math.ceil(He(yr)),_i=se%1?2:se;if(isFinite(qr-Hr)){if(Te){for(;Hr0;bi--)jt.push(Ye(Hr)*bi);for(Hr=0;jt[Hr]yr;qr--);jt=jt.slice(Hr,qr)}return jt},kt.copy=function(){return bo(X.copy(),se,Te,Ne)},Ca(kt,X)}var Xo={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Ss(e.scale.linear(),1,[0,1])};function Ss(X,se,Te){var Ne=as(se),He=as(1/se);function Ye(kt){return X(Ne(kt))}return Ye.invert=function(kt){return He(X.invert(kt))},Ye.domain=function(kt){return arguments.length?(X.domain((Te=kt.map(Number)).map(Ne)),Ye):Te},Ye.ticks=function(kt){return Na(Te,kt)},Ye.tickFormat=function(kt,nt){return d3_scale_linearTickFormat(Te,kt,nt)},Ye.nice=function(kt){return Ye.domain(Ra(Te,kt))},Ye.exponent=function(kt){return arguments.length?(Ne=as(se=kt),He=as(1/se),X.domain(Te.map(Ne)),Ye):se},Ye.copy=function(){return Ss(X.copy(),se,Te)},Ca(Ye,X)}function as(X){return function(se){return se<0?-Math.pow(-se,X):Math.pow(se,X)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ws([],{t:"range",a:[[]]})};function ws(X,se){var Te,Ne,He;function Ye(nt){return Ne[((Te.get(nt)||(se.t==="range"?Te.set(nt,X.push(nt)):NaN))-1)%Ne.length]}function kt(nt,jt){return e.range(X.length).map(function(gr){return nt+jt*gr})}return Ye.domain=function(nt){if(!arguments.length)return X;X=[],Te=new S;for(var jt=-1,gr=nt.length,yr;++jt0?Te[Ye-1]:X[0],Yeqr?0:1;if(yr=Ie)return jt(yr,bi)+(gr?jt(gr,1-bi):"")+"Z";var Zr,ai,gi,Ii,Si=0,ei=0,Ln,En,Un,ia,Ea,Ia,yo,Da,go=[];if((Ii=(+kt.apply(this,arguments)||0)/2)&&(gi=Ne===Cu?Math.sqrt(gr*gr+yr*yr):+Ne.apply(this,arguments),bi||(ei*=-1),yr&&(ei=ii(gi/yr*Math.sin(Ii))),gr&&(Si=ii(gi/gr*Math.sin(Ii)))),yr){Ln=yr*Math.cos(Hr+ei),En=yr*Math.sin(Hr+ei),Un=yr*Math.cos(qr-ei),ia=yr*Math.sin(qr-ei);var Is=Math.abs(qr-Hr-2*ei)<=tt?0:1;if(ei&&Ac(Ln,En,Un,ia)===bi^Is){var Ms=(Hr+qr)/2;Ln=yr*Math.cos(Ms),En=yr*Math.sin(Ms),Un=ia=null}}else Ln=En=0;if(gr){Ea=gr*Math.cos(qr-Si),Ia=gr*Math.sin(qr-Si),yo=gr*Math.cos(Hr+Si),Da=gr*Math.sin(Hr+Si);var Xs=Math.abs(Hr-qr+2*Si)<=tt?0:1;if(Si&&Ac(Ea,Ia,yo,Da)===1-bi^Xs){var Gn=(Hr+qr)/2;Ea=gr*Math.cos(Gn),Ia=gr*Math.sin(Gn),yo=Da=null}}else Ea=Ia=0;if(_i>Je&&(Zr=Math.min(Math.abs(yr-gr)/2,+Te.apply(this,arguments)))>.001){ai=gr0?0:1}function Ua(X,se,Te,Ne,He){var Ye=X[0]-se[0],kt=X[1]-se[1],nt=(He?Ne:-Ne)/Math.sqrt(Ye*Ye+kt*kt),jt=nt*kt,gr=-nt*Ye,yr=X[0]+jt,Hr=X[1]+gr,qr=se[0]+jt,_i=se[1]+gr,bi=(yr+qr)/2,Zr=(Hr+_i)/2,ai=qr-yr,gi=_i-Hr,Ii=ai*ai+gi*gi,Si=Te-Ne,ei=yr*_i-qr*Hr,Ln=(gi<0?-1:1)*Math.sqrt(Math.max(0,Si*Si*Ii-ei*ei)),En=(ei*gi-ai*Ln)/Ii,Un=(-ei*ai-gi*Ln)/Ii,ia=(ei*gi+ai*Ln)/Ii,Ea=(-ei*ai+gi*Ln)/Ii,Ia=En-bi,yo=Un-Zr,Da=ia-bi,go=Ea-Zr;return Ia*Ia+yo*yo>Da*Da+go*go&&(En=ia,Un=Ea),[[En-jt,Un-gr],[En*Te/Si,Un*Te/Si]]}function oo(){return!0}function Vc(X){var se=Ds,Te=Fs,Ne=oo,He=Ku,Ye=He.key,kt=.7;function nt(jt){var gr=[],yr=[],Hr=-1,qr=jt.length,_i,bi=vi(se),Zr=vi(Te);function ai(){gr.push("M",He(X(yr),kt))}for(;++Hr1?X.join("L"):X+"Z"}function ue(X){return X.join("L")+"Z"}function w(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],",",Ne[1]];++se1&&He.push("H",Ne[0]),He.join("")}function B(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],",",Ne[1]];++se1){nt=se[1],Ye=X[jt],jt++,Ne+="C"+(He[0]+kt[0])+","+(He[1]+kt[1])+","+(Ye[0]-nt[0])+","+(Ye[1]-nt[1])+","+Ye[0]+","+Ye[1];for(var gr=2;gr9&&(Ye=Te*3/Math.sqrt(Ye),kt[nt]=Ye*Ne,kt[nt+1]=Ye*He));for(nt=-1;++nt<=jt;)Ye=(X[Math.min(jt,nt+1)][0]-X[Math.max(0,nt-1)][0])/(6*(1+kt[nt]*kt[nt])),se.push([Ye||0,kt[nt]*Ye||0]);return se}function Ft(X){return X.length<3?Ku(X):X[0]+Xe(X,it(X))}e.svg.line.radial=function(){var X=Vc(Ht);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Ht(X){for(var se,Te=-1,Ne=X.length,He,Ye;++Tett)+",1 "+Hr}function gr(yr,Hr,qr,_i){return"Q 0,0 "+_i}return Ye.radius=function(yr){return arguments.length?(Te=vi(yr),Ye):Te},Ye.source=function(yr){return arguments.length?(X=vi(yr),Ye):X},Ye.target=function(yr){return arguments.length?(se=vi(yr),Ye):se},Ye.startAngle=function(yr){return arguments.length?(Ne=vi(yr),Ye):Ne},Ye.endAngle=function(yr){return arguments.length?(He=vi(yr),Ye):He},Ye};function Or(X){return X.radius}e.svg.diagonal=function(){var X=dr,se=Sr,Te=Wr;function Ne(He,Ye){var kt=X.call(this,He,Ye),nt=se.call(this,He,Ye),jt=(kt.y+nt.y)/2,gr=[kt,{x:kt.x,y:jt},{x:nt.x,y:jt},nt];return gr=gr.map(Te),"M"+gr[0]+"C"+gr[1]+" "+gr[2]+" "+gr[3]}return Ne.source=function(He){return arguments.length?(X=vi(He),Ne):X},Ne.target=function(He){return arguments.length?(se=vi(He),Ne):se},Ne.projection=function(He){return arguments.length?(Te=He,Ne):Te},Ne};function Wr(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=Wr,Te=X.projection;return X.projection=function(Ne){return arguments.length?Te(ni(se=Ne)):se},X};function ni(X){return function(){var se=X.apply(this,arguments),Te=se[0],Ne=se[1]-xe;return[Te*Math.cos(Ne),Te*Math.sin(Ne)]}}e.svg.symbol=function(){var X=cn,se=Pi;function Te(Ne,He){return(Cn.get(X.call(this,Ne,He))||ln)(se.call(this,Ne,He))}return Te.type=function(Ne){return arguments.length?(X=vi(Ne),Te):X},Te.size=function(Ne){return arguments.length?(se=vi(Ne),Te):se},Te};function Pi(){return 64}function cn(){return"circle"}function ln(X){var se=Math.sqrt(X/tt);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var Cn=e.map({circle:ln,cross:function(X){var se=Math.sqrt(X/5)/2;return"M"+-3*se+","+-se+"H"+-se+"V"+-3*se+"H"+se+"V"+-se+"H"+3*se+"V"+se+"H"+se+"V"+3*se+"H"+-se+"V"+se+"H"+-3*se+"Z"},diamond:function(X){var se=Math.sqrt(X/(2*Ta)),Te=se*Ta;return"M0,"+-se+"L"+Te+",0 0,"+se+" "+-Te+",0Z"},square:function(X){var se=Math.sqrt(X)/2;return"M"+-se+","+-se+"L"+se+","+-se+" "+se+","+se+" "+-se+","+se+"Z"},"triangle-down":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return"M0,"+Te+"L"+se+","+-Te+" "+-se+","+-Te+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return"M0,"+-Te+"L"+se+","+Te+" "+-se+","+Te+"Z"}});e.svg.symbolTypes=Cn.keys();var Kn=Math.sqrt(3),Ta=Math.tan(30*ke);Pe.transition=function(X){for(var se=Bo||++mo,Te=To(X),Ne=[],He,Ye,kt=Ps||{time:Date.now(),ease:bl,delay:0,duration:250},nt=-1,jt=this.length;++nt0;)Hr[--Ii].call(X,gi);if(ai>=1)return kt.event&&kt.event.end.call(X,X.__data__,se),--Ye.count?delete Ye[Ne]:delete X[Te],1}kt||(nt=He.time,jt=No(qr,0,nt),kt=Ye[Ne]={tween:new S,time:nt,timer:jt,delay:He.delay,duration:He.duration,ease:He.ease,index:se},He=null,++Ye.count)}e.svg.axis=function(){var X=e.scale.linear(),se=Ul,Te=6,Ne=6,He=3,Ye=[10],kt=null,nt;function jt(gr){gr.each(function(){var yr=e.select(this),Hr=this.__chart__||X,qr=this.__chart__=X.copy(),_i=kt==null?qr.ticks?qr.ticks.apply(qr,Ye):qr.domain():kt,bi=nt==null?qr.tickFormat?qr.tickFormat.apply(qr,Ye):G:nt,Zr=yr.selectAll(".tick").data(_i,qr),ai=Zr.enter().insert("g",".domain").attr("class","tick").style("opacity",Je),gi=e.transition(Zr.exit()).style("opacity",Je).remove(),Ii=e.transition(Zr.order()).style("opacity",1),Si=Math.max(Te,0)+He,ei,Ln=wn(qr),En=yr.selectAll(".domain").data([0]),Un=(En.enter().append("path").attr("class","domain"),e.transition(En));ai.append("line"),ai.append("text");var ia=ai.select("line"),Ea=Ii.select("line"),Ia=Zr.select("text").text(bi),yo=ai.select("text"),Da=Ii.select("text"),go=se==="top"||se==="left"?-1:1,Is,Ms,Xs,Gn;if(se==="bottom"||se==="top"?(ei=au,Is="x",Xs="y",Ms="x2",Gn="y2",Ia.attr("dy",go<0?"0em":".71em").style("text-anchor","middle"),Un.attr("d","M"+Ln[0]+","+go*Ne+"V0H"+Ln[1]+"V"+go*Ne)):(ei=Js,Is="y",Xs="x",Ms="y2",Gn="x2",Ia.attr("dy",".32em").style("text-anchor",go<0?"end":"start"),Un.attr("d","M"+go*Ne+","+Ln[0]+"H0V"+Ln[1]+"H"+go*Ne)),ia.attr(Gn,go*Te),yo.attr(Xs,go*Si),Ea.attr(Ms,0).attr(Gn,go*Te),Da.attr(Is,0).attr(Xs,go*Si),qr.rangeBand){var ja=qr,Fo=ja.rangeBand()/2;Hr=qr=function(Uo){return ja(Uo)+Fo}}else Hr.rangeBand?Hr=qr:gi.call(ei,qr,Hr);ai.call(ei,Hr,qr),Ii.call(ei,qr,qr)})}return jt.scale=function(gr){return arguments.length?(X=gr,jt):X},jt.orient=function(gr){return arguments.length?(se=gr in Lu?gr+"":Ul,jt):se},jt.ticks=function(){return arguments.length?(Ye=r(arguments),jt):Ye},jt.tickValues=function(gr){return arguments.length?(kt=gr,jt):kt},jt.tickFormat=function(gr){return arguments.length?(nt=gr,jt):nt},jt.tickSize=function(gr){var yr=arguments.length;return yr?(Te=+gr,Ne=+arguments[yr-1],jt):Te},jt.innerTickSize=function(gr){return arguments.length?(Te=+gr,jt):Te},jt.outerTickSize=function(gr){return arguments.length?(Ne=+gr,jt):Ne},jt.tickPadding=function(gr){return arguments.length?(He=+gr,jt):He},jt.tickSubdivide=function(){return arguments.length&&jt},jt};var Ul="bottom",Lu={top:1,right:1,bottom:1,left:1};function au(X,se,Te){X.attr("transform",function(Ne){var He=se(Ne);return"translate("+(isFinite(He)?He:Te(Ne))+",0)"})}function Js(X,se,Te){X.attr("transform",function(Ne){var He=se(Ne);return"translate(0,"+(isFinite(He)?He:Te(Ne))+")"})}e.svg.brush=function(){var X=Ce(yr,"brushstart","brush","brushend"),se=null,Te=null,Ne=[0,0],He=[0,0],Ye,kt,nt=!0,jt=!0,gr=dc[0];function yr(Zr){Zr.each(function(){var ai=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",bi).on("touchstart.brush",bi),gi=ai.selectAll(".background").data([0]);gi.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ai.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ii=ai.selectAll(".resize").data(gr,G);Ii.exit().remove(),Ii.enter().append("g").attr("class",function(En){return"resize "+En}).style("cursor",function(En){return Ql[En]}).append("rect").attr("x",function(En){return/[ew]$/.test(En)?-3:null}).attr("y",function(En){return/^[ns]/.test(En)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ii.style("display",yr.empty()?"none":null);var Si=e.transition(ai),ei=e.transition(gi),Ln;se&&(Ln=wn(se),ei.attr("x",Ln[0]).attr("width",Ln[1]-Ln[0]),qr(Si)),Te&&(Ln=wn(Te),ei.attr("y",Ln[0]).attr("height",Ln[1]-Ln[0]),_i(Si)),Hr(Si)})}yr.event=function(Zr){Zr.each(function(){var ai=X.of(this,arguments),gi={x:Ne,y:He,i:Ye,j:kt},Ii=this.__chart__||gi;this.__chart__=gi,Bo?e.select(this).transition().each("start.brush",function(){Ye=Ii.i,kt=Ii.j,Ne=Ii.x,He=Ii.y,ai({type:"brushstart"})}).tween("brush:brush",function(){var Si=Gu(Ne,gi.x),ei=Gu(He,gi.y);return Ye=kt=null,function(Ln){Ne=gi.x=Si(Ln),He=gi.y=ei(Ln),ai({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ye=gi.i,kt=gi.j,ai({type:"brush",mode:"resize"}),ai({type:"brushend"})}):(ai({type:"brushstart"}),ai({type:"brush",mode:"resize"}),ai({type:"brushend"}))})};function Hr(Zr){Zr.selectAll(".resize").attr("transform",function(ai){return"translate("+Ne[+/e$/.test(ai)]+","+He[+/^s/.test(ai)]+")"})}function qr(Zr){Zr.select(".extent").attr("x",Ne[0]),Zr.selectAll(".extent,.n>rect,.s>rect").attr("width",Ne[1]-Ne[0])}function _i(Zr){Zr.select(".extent").attr("y",He[0]),Zr.selectAll(".extent,.e>rect,.w>rect").attr("height",He[1]-He[0])}function bi(){var Zr=this,ai=e.select(e.event.target),gi=X.of(Zr,arguments),Ii=e.select(Zr),Si=ai.datum(),ei=!/^(n|s)$/.test(Si)&&se,Ln=!/^(e|w)$/.test(Si)&&Te,En=ai.classed("extent"),Un=Br(Zr),ia,Ea=e.mouse(Zr),Ia,yo=e.select(a(Zr)).on("keydown.brush",Is).on("keyup.brush",Ms);if(e.event.changedTouches?yo.on("touchmove.brush",Xs).on("touchend.brush",ja):yo.on("mousemove.brush",Xs).on("mouseup.brush",ja),Ii.interrupt().selectAll("*").interrupt(),En)Ea[0]=Ne[0]-Ea[0],Ea[1]=He[0]-Ea[1];else if(Si){var Da=+/w$/.test(Si),go=+/^n/.test(Si);Ia=[Ne[1-Da]-Ea[0],He[1-go]-Ea[1]],Ea[0]=Ne[Da],Ea[1]=He[go]}else e.event.altKey&&(ia=Ea.slice());Ii.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",ai.style("cursor")),gi({type:"brushstart"}),Xs();function Is(){e.event.keyCode==32&&(En||(ia=null,Ea[0]-=Ne[1],Ea[1]-=He[1],En=2),_e())}function Ms(){e.event.keyCode==32&&En==2&&(Ea[0]+=Ne[1],Ea[1]+=He[1],En=0,_e())}function Xs(){var Fo=e.mouse(Zr),Uo=!1;Ia&&(Fo[0]+=Ia[0],Fo[1]+=Ia[1]),En||(e.event.altKey?(ia||(ia=[(Ne[0]+Ne[1])/2,(He[0]+He[1])/2]),Ea[0]=Ne[+(Fo[0]{(function(e,t){typeof f6=="object"&&typeof pee!="undefined"?t(f6):(e=e||self,t(e.d3=e.d3||{}))})(f6,function(e){"use strict";var t=new Date,r=new Date;function n($e,St,Qt,Vt){function _t(It){return $e(It=arguments.length===0?new Date:new Date(+It)),It}return _t.floor=function(It){return $e(It=new Date(+It)),It},_t.ceil=function(It){return $e(It=new Date(It-1)),St(It,1),$e(It),It},_t.round=function(It){var mt=_t(It),er=_t.ceil(It);return It-mt0))return lr;do lr.push(Tr=new Date(+It)),St(It,er),$e(It);while(Tr=mt)for(;$e(mt),!It(mt);)mt.setTime(mt-1)},function(mt,er){if(mt>=mt)if(er<0)for(;++er<=0;)for(;St(mt,-1),!It(mt););else for(;--er>=0;)for(;St(mt,1),!It(mt););})},Qt&&(_t.count=function(It,mt){return t.setTime(+It),r.setTime(+mt),$e(t),$e(r),Math.floor(Qt(t,r))},_t.every=function(It){return It=Math.floor(It),!isFinite(It)||!(It>0)?null:It>1?_t.filter(Vt?function(mt){return Vt(mt)%It===0}:function(mt){return _t.count(0,mt)%It===0}):_t}),_t}var i=n(function(){},function($e,St){$e.setTime(+$e+St)},function($e,St){return St-$e});i.every=function($e){return $e=Math.floor($e),!isFinite($e)||!($e>0)?null:$e>1?n(function(St){St.setTime(Math.floor(St/$e)*$e)},function(St,Qt){St.setTime(+St+Qt*$e)},function(St,Qt){return(Qt-St)/$e}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function($e){$e.setTime($e-$e.getMilliseconds())},function($e,St){$e.setTime(+$e+St*o)},function($e,St){return(St-$e)/o},function($e){return $e.getUTCSeconds()}),h=f.range,d=n(function($e){$e.setTime($e-$e.getMilliseconds()-$e.getSeconds()*o)},function($e,St){$e.setTime(+$e+St*s)},function($e,St){return(St-$e)/s},function($e){return $e.getMinutes()}),v=d.range,_=n(function($e){$e.setTime($e-$e.getMilliseconds()-$e.getSeconds()*o-$e.getMinutes()*s)},function($e,St){$e.setTime(+$e+St*l)},function($e,St){return(St-$e)/l},function($e){return $e.getHours()}),b=_.range,p=n(function($e){$e.setHours(0,0,0,0)},function($e,St){$e.setDate($e.getDate()+St)},function($e,St){return(St-$e-(St.getTimezoneOffset()-$e.getTimezoneOffset())*s)/u},function($e){return $e.getDate()-1}),k=p.range;function E($e){return n(function(St){St.setDate(St.getDate()-(St.getDay()+7-$e)%7),St.setHours(0,0,0,0)},function(St,Qt){St.setDate(St.getDate()+Qt*7)},function(St,Qt){return(Qt-St-(Qt.getTimezoneOffset()-St.getTimezoneOffset())*s)/c})}var S=E(0),L=E(1),x=E(2),C=E(3),M=E(4),g=E(5),P=E(6),T=S.range,z=L.range,O=x.range,V=C.range,G=M.range,Z=g.range,j=P.range,N=n(function($e){$e.setDate(1),$e.setHours(0,0,0,0)},function($e,St){$e.setMonth($e.getMonth()+St)},function($e,St){return St.getMonth()-$e.getMonth()+(St.getFullYear()-$e.getFullYear())*12},function($e){return $e.getMonth()}),H=N.range,te=n(function($e){$e.setMonth(0,1),$e.setHours(0,0,0,0)},function($e,St){$e.setFullYear($e.getFullYear()+St)},function($e,St){return St.getFullYear()-$e.getFullYear()},function($e){return $e.getFullYear()});te.every=function($e){return!isFinite($e=Math.floor($e))||!($e>0)?null:n(function(St){St.setFullYear(Math.floor(St.getFullYear()/$e)*$e),St.setMonth(0,1),St.setHours(0,0,0,0)},function(St,Qt){St.setFullYear(St.getFullYear()+Qt*$e)})};var oe=te.range,_e=n(function($e){$e.setUTCSeconds(0,0)},function($e,St){$e.setTime(+$e+St*s)},function($e,St){return(St-$e)/s},function($e){return $e.getUTCMinutes()}),Ee=_e.range,Ce=n(function($e){$e.setUTCMinutes(0,0,0)},function($e,St){$e.setTime(+$e+St*l)},function($e,St){return(St-$e)/l},function($e){return $e.getUTCHours()}),me=Ce.range,ie=n(function($e){$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCDate($e.getUTCDate()+St)},function($e,St){return(St-$e)/u},function($e){return $e.getUTCDate()-1}),Se=ie.range;function Le($e){return n(function(St){St.setUTCDate(St.getUTCDate()-(St.getUTCDay()+7-$e)%7),St.setUTCHours(0,0,0,0)},function(St,Qt){St.setUTCDate(St.getUTCDate()+Qt*7)},function(St,Qt){return(Qt-St)/c})}var Ae=Le(0),Fe=Le(1),Pe=Le(2),ge=Le(3),Re=Le(4),ce=Le(5),Ze=Le(6),ut=Ae.range,pt=Fe.range,Zt=Pe.range,st=ge.range,lt=Re.range,Gt=ce.range,Nt=Ze.range,Jt=n(function($e){$e.setUTCDate(1),$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCMonth($e.getUTCMonth()+St)},function($e,St){return St.getUTCMonth()-$e.getUTCMonth()+(St.getUTCFullYear()-$e.getUTCFullYear())*12},function($e){return $e.getUTCMonth()}),sr=Jt.range,wr=n(function($e){$e.setUTCMonth(0,1),$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCFullYear($e.getUTCFullYear()+St)},function($e,St){return St.getUTCFullYear()-$e.getUTCFullYear()},function($e){return $e.getUTCFullYear()});wr.every=function($e){return!isFinite($e=Math.floor($e))||!($e>0)?null:n(function(St){St.setUTCFullYear(Math.floor(St.getUTCFullYear()/$e)*$e),St.setUTCMonth(0,1),St.setUTCHours(0,0,0,0)},function(St,Qt){St.setUTCFullYear(St.getUTCFullYear()+Qt*$e)})};var cr=wr.range;e.timeDay=p,e.timeDays=k,e.timeFriday=g,e.timeFridays=Z,e.timeHour=_,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=z,e.timeMonth=N,e.timeMonths=H,e.timeSaturday=P,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=S,e.timeSundays=T,e.timeThursday=M,e.timeThursdays=G,e.timeTuesday=x,e.timeTuesdays=O,e.timeWednesday=C,e.timeWednesdays=V,e.timeWeek=S,e.timeWeeks=T,e.timeYear=te,e.timeYears=oe,e.utcDay=ie,e.utcDays=Se,e.utcFriday=ce,e.utcFridays=Gt,e.utcHour=Ce,e.utcHours=me,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=Ee,e.utcMonday=Fe,e.utcMondays=pt,e.utcMonth=Jt,e.utcMonths=sr,e.utcSaturday=Ze,e.utcSaturdays=Nt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=Ae,e.utcSundays=ut,e.utcThursday=Re,e.utcThursdays=lt,e.utcTuesday=Pe,e.utcTuesdays=Zt,e.utcWednesday=ge,e.utcWednesdays=st,e.utcWeek=Ae,e.utcWeeks=ut,e.utcYear=wr,e.utcYears=cr,Object.defineProperty(e,"__esModule",{value:!0})})});var r3=ye((h6,gee)=>{(function(e,t){typeof h6=="object"&&typeof gee!="undefined"?t(h6,bO()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(h6,function(e,t){"use strict";function r(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L);return Je.setFullYear(Ge.y),Je}return new Date(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L)}function n(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(Date.UTC(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L));return Je.setUTCFullYear(Ge.y),Je}return new Date(Date.UTC(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L))}function i(Ge,Je,je){return{y:Ge,m:Je,d:je,H:0,M:0,S:0,L:0}}function a(Ge){var Je=Ge.dateTime,je=Ge.date,tt=Ge.time,xt=Ge.periods,Ie=Ge.days,xe=Ge.shortDays,ke=Ge.months,vt=Ge.shortMonths,ir=h(xt),ar=d(xt),vr=h(Ie),ii=d(Ie),pi=h(xe),$r=d(xe),di=h(ke),ji=d(ke),In=h(vt),wi=d(vt),On={a:$i,A:tn,b:fn,B:yn,c:null,d:N,e:N,f:Ee,H,I:te,j:oe,L:_e,m:Ce,M:me,p:Sn,q:Ba,Q:mt,s:er,S:ie,u:Se,U:Le,V:Ae,w:Fe,W:Pe,x:null,X:null,y:ge,Y:Re,Z:ce,"%":It},qn={a:ua,A:ma,b:Wa,B:Fa,c:null,d:Ze,e:Ze,f:lt,H:ut,I:pt,j:Zt,L:st,m:Gt,M:Nt,p:Wo,q:da,Q:mt,s:er,S:Jt,u:sr,U:wr,V:cr,w:$e,W:St,x:null,X:null,y:Qt,Y:Vt,Z:_t,"%":It},Fn={a:rr,A:nr,b:Er,B:Xr,c:ri,d:M,e:M,f:V,H:P,I:P,j:g,L:O,m:C,M:T,p:wt,q:x,Q:Z,s:j,S:z,u:_,U:b,V:p,w:v,W:k,x:Qr,X:Oi,y:S,Y:E,Z:L,"%":G};On.x=ra(je,On),On.X=ra(tt,On),On.c=ra(Je,On),qn.x=ra(je,qn),qn.X=ra(tt,qn),qn.c=ra(Je,qn);function ra(Wn,Ha){return function(vo){var jn=[],Mt=-1,kr=0,Jr=Wn.length,vi,hn,An;for(vo instanceof Date||(vo=new Date(+vo));++Mt53)return null;"w"in jn||(jn.w=1),"Z"in jn?(kr=n(i(jn.y,0,1)),Jr=kr.getUTCDay(),kr=Jr>4||Jr===0?t.utcMonday.ceil(kr):t.utcMonday(kr),kr=t.utcDay.offset(kr,(jn.V-1)*7),jn.y=kr.getUTCFullYear(),jn.m=kr.getUTCMonth(),jn.d=kr.getUTCDate()+(jn.w+6)%7):(kr=r(i(jn.y,0,1)),Jr=kr.getDay(),kr=Jr>4||Jr===0?t.timeMonday.ceil(kr):t.timeMonday(kr),kr=t.timeDay.offset(kr,(jn.V-1)*7),jn.y=kr.getFullYear(),jn.m=kr.getMonth(),jn.d=kr.getDate()+(jn.w+6)%7)}else("W"in jn||"U"in jn)&&("w"in jn||(jn.w="u"in jn?jn.u%7:"W"in jn?1:0),Jr="Z"in jn?n(i(jn.y,0,1)).getUTCDay():r(i(jn.y,0,1)).getDay(),jn.m=0,jn.d="W"in jn?(jn.w+6)%7+jn.W*7-(Jr+5)%7:jn.w+jn.U*7-(Jr+6)%7);return"Z"in jn?(jn.H+=jn.Z/100|0,jn.M+=jn.Z%100,n(jn)):r(jn)}}function Ut(Wn,Ha,vo,jn){for(var Mt=0,kr=Ha.length,Jr=vo.length,vi,hn;Mt=Jr)return-1;if(vi=Ha.charCodeAt(Mt++),vi===37){if(vi=Ha.charAt(Mt++),hn=Fn[vi in o?Ha.charAt(Mt++):vi],!hn||(jn=hn(Wn,vo,jn))<0)return-1}else if(vi!=vo.charCodeAt(jn++))return-1}return jn}function wt(Wn,Ha,vo){var jn=ir.exec(Ha.slice(vo));return jn?(Wn.p=ar[jn[0].toLowerCase()],vo+jn[0].length):-1}function rr(Wn,Ha,vo){var jn=pi.exec(Ha.slice(vo));return jn?(Wn.w=$r[jn[0].toLowerCase()],vo+jn[0].length):-1}function nr(Wn,Ha,vo){var jn=vr.exec(Ha.slice(vo));return jn?(Wn.w=ii[jn[0].toLowerCase()],vo+jn[0].length):-1}function Er(Wn,Ha,vo){var jn=In.exec(Ha.slice(vo));return jn?(Wn.m=wi[jn[0].toLowerCase()],vo+jn[0].length):-1}function Xr(Wn,Ha,vo){var jn=di.exec(Ha.slice(vo));return jn?(Wn.m=ji[jn[0].toLowerCase()],vo+jn[0].length):-1}function ri(Wn,Ha,vo){return Ut(Wn,Je,Ha,vo)}function Qr(Wn,Ha,vo){return Ut(Wn,je,Ha,vo)}function Oi(Wn,Ha,vo){return Ut(Wn,tt,Ha,vo)}function $i(Wn){return xe[Wn.getDay()]}function tn(Wn){return Ie[Wn.getDay()]}function fn(Wn){return vt[Wn.getMonth()]}function yn(Wn){return ke[Wn.getMonth()]}function Sn(Wn){return xt[+(Wn.getHours()>=12)]}function Ba(Wn){return 1+~~(Wn.getMonth()/3)}function ua(Wn){return xe[Wn.getUTCDay()]}function ma(Wn){return Ie[Wn.getUTCDay()]}function Wa(Wn){return vt[Wn.getUTCMonth()]}function Fa(Wn){return ke[Wn.getUTCMonth()]}function Wo(Wn){return xt[+(Wn.getUTCHours()>=12)]}function da(Wn){return 1+~~(Wn.getUTCMonth()/3)}return{format:function(Wn){var Ha=ra(Wn+="",On);return Ha.toString=function(){return Wn},Ha},parse:function(Wn){var Ha=la(Wn+="",!1);return Ha.toString=function(){return Wn},Ha},utcFormat:function(Wn){var Ha=ra(Wn+="",qn);return Ha.toString=function(){return Wn},Ha},utcParse:function(Wn){var Ha=la(Wn+="",!0);return Ha.toString=function(){return Wn},Ha}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ge,Je,je){var tt=Ge<0?"-":"",xt=(tt?-Ge:Ge)+"",Ie=xt.length;return tt+(Ie68?1900:2e3),je+tt[0].length):-1}function L(Ge,Je,je){var tt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(je,je+6));return tt?(Ge.Z=tt[1]?0:-(tt[2]+(tt[3]||"00")),je+tt[0].length):-1}function x(Ge,Je,je){var tt=s.exec(Je.slice(je,je+1));return tt?(Ge.q=tt[0]*3-3,je+tt[0].length):-1}function C(Ge,Je,je){var tt=s.exec(Je.slice(je,je+2));return tt?(Ge.m=tt[0]-1,je+tt[0].length):-1}function M(Ge,Je,je){var tt=s.exec(Je.slice(je,je+2));return tt?(Ge.d=+tt[0],je+tt[0].length):-1}function g(Ge,Je,je){var tt=s.exec(Je.slice(je,je+3));return tt?(Ge.m=0,Ge.d=+tt[0],je+tt[0].length):-1}function P(Ge,Je,je){var tt=s.exec(Je.slice(je,je+2));return tt?(Ge.H=+tt[0],je+tt[0].length):-1}function T(Ge,Je,je){var tt=s.exec(Je.slice(je,je+2));return tt?(Ge.M=+tt[0],je+tt[0].length):-1}function z(Ge,Je,je){var tt=s.exec(Je.slice(je,je+2));return tt?(Ge.S=+tt[0],je+tt[0].length):-1}function O(Ge,Je,je){var tt=s.exec(Je.slice(je,je+3));return tt?(Ge.L=+tt[0],je+tt[0].length):-1}function V(Ge,Je,je){var tt=s.exec(Je.slice(je,je+6));return tt?(Ge.L=Math.floor(tt[0]/1e3),je+tt[0].length):-1}function G(Ge,Je,je){var tt=l.exec(Je.slice(je,je+1));return tt?je+tt[0].length:-1}function Z(Ge,Je,je){var tt=s.exec(Je.slice(je));return tt?(Ge.Q=+tt[0],je+tt[0].length):-1}function j(Ge,Je,je){var tt=s.exec(Je.slice(je));return tt?(Ge.s=+tt[0],je+tt[0].length):-1}function N(Ge,Je){return c(Ge.getDate(),Je,2)}function H(Ge,Je){return c(Ge.getHours(),Je,2)}function te(Ge,Je){return c(Ge.getHours()%12||12,Je,2)}function oe(Ge,Je){return c(1+t.timeDay.count(t.timeYear(Ge),Ge),Je,3)}function _e(Ge,Je){return c(Ge.getMilliseconds(),Je,3)}function Ee(Ge,Je){return _e(Ge,Je)+"000"}function Ce(Ge,Je){return c(Ge.getMonth()+1,Je,2)}function me(Ge,Je){return c(Ge.getMinutes(),Je,2)}function ie(Ge,Je){return c(Ge.getSeconds(),Je,2)}function Se(Ge){var Je=Ge.getDay();return Je===0?7:Je}function Le(Ge,Je){return c(t.timeSunday.count(t.timeYear(Ge)-1,Ge),Je,2)}function Ae(Ge,Je){var je=Ge.getDay();return Ge=je>=4||je===0?t.timeThursday(Ge):t.timeThursday.ceil(Ge),c(t.timeThursday.count(t.timeYear(Ge),Ge)+(t.timeYear(Ge).getDay()===4),Je,2)}function Fe(Ge){return Ge.getDay()}function Pe(Ge,Je){return c(t.timeMonday.count(t.timeYear(Ge)-1,Ge),Je,2)}function ge(Ge,Je){return c(Ge.getFullYear()%100,Je,2)}function Re(Ge,Je){return c(Ge.getFullYear()%1e4,Je,4)}function ce(Ge){var Je=Ge.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+c(Je/60|0,"0",2)+c(Je%60,"0",2)}function Ze(Ge,Je){return c(Ge.getUTCDate(),Je,2)}function ut(Ge,Je){return c(Ge.getUTCHours(),Je,2)}function pt(Ge,Je){return c(Ge.getUTCHours()%12||12,Je,2)}function Zt(Ge,Je){return c(1+t.utcDay.count(t.utcYear(Ge),Ge),Je,3)}function st(Ge,Je){return c(Ge.getUTCMilliseconds(),Je,3)}function lt(Ge,Je){return st(Ge,Je)+"000"}function Gt(Ge,Je){return c(Ge.getUTCMonth()+1,Je,2)}function Nt(Ge,Je){return c(Ge.getUTCMinutes(),Je,2)}function Jt(Ge,Je){return c(Ge.getUTCSeconds(),Je,2)}function sr(Ge){var Je=Ge.getUTCDay();return Je===0?7:Je}function wr(Ge,Je){return c(t.utcSunday.count(t.utcYear(Ge)-1,Ge),Je,2)}function cr(Ge,Je){var je=Ge.getUTCDay();return Ge=je>=4||je===0?t.utcThursday(Ge):t.utcThursday.ceil(Ge),c(t.utcThursday.count(t.utcYear(Ge),Ge)+(t.utcYear(Ge).getUTCDay()===4),Je,2)}function $e(Ge){return Ge.getUTCDay()}function St(Ge,Je){return c(t.utcMonday.count(t.utcYear(Ge)-1,Ge),Je,2)}function Qt(Ge,Je){return c(Ge.getUTCFullYear()%100,Je,2)}function Vt(Ge,Je){return c(Ge.getUTCFullYear()%1e4,Je,4)}function _t(){return"+0000"}function It(){return"%"}function mt(Ge){return+Ge}function er(Ge){return Math.floor(+Ge/1e3)}var lr;Tr({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 Tr(Ge){return lr=a(Ge),e.timeFormat=lr.format,e.timeParse=lr.parse,e.utcFormat=lr.utcFormat,e.utcParse=lr.utcParse,lr}var Lr="%Y-%m-%dT%H:%M:%S.%LZ";function ti(Ge){return Ge.toISOString()}var Br=Date.prototype.toISOString?ti:e.utcFormat(Lr);function Vr(Ge){var Je=new Date(Ge);return isNaN(Je)?null:Je}var dt=+new Date("2000-01-01T00:00:00.000Z")?Vr:e.utcParse(Lr);e.isoFormat=Br,e.isoParse=dt,e.timeFormatDefaultLocale=Tr,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var wO=ye((d6,mee)=>{(function(e,t){typeof d6=="object"&&typeof mee!="undefined"?t(d6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(d6,function(e){"use strict";function t(C){return Math.abs(C=Math.round(C))>=1e21?C.toLocaleString("en").replace(/,/g,""):C.toString(10)}function r(C,M){if((g=(C=M?C.toExponential(M-1):C.toExponential()).indexOf("e"))<0)return null;var g,P=C.slice(0,g);return[P.length>1?P[0]+P.slice(2):P,+C.slice(g+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(g,P){for(var T=g.length,z=[],O=0,V=C[0],G=0;T>0&&V>0&&(G+V+1>P&&(V=Math.max(1,P-G)),z.push(g.substring(T-=V,T+V)),!((G+=V+1)>P));)V=C[O=(O+1)%C.length];return z.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(g){return C[+g]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(C){if(!(M=o.exec(C)))throw new Error("invalid format: "+C);var M;return new l({fill:M[1],align:M[2],sign:M[3],symbol:M[4],zero:M[5],width:M[6],comma:M[7],precision:M[8]&&M[8].slice(1),trim:M[9],type:M[10]})}s.prototype=l.prototype;function l(C){this.fill=C.fill===void 0?" ":C.fill+"",this.align=C.align===void 0?">":C.align+"",this.sign=C.sign===void 0?"-":C.sign+"",this.symbol=C.symbol===void 0?"":C.symbol+"",this.zero=!!C.zero,this.width=C.width===void 0?void 0:+C.width,this.comma=!!C.comma,this.precision=C.precision===void 0?void 0:+C.precision,this.trim=!!C.trim,this.type=C.type===void 0?"":C.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(C){e:for(var M=C.length,g=1,P=-1,T;g0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(T+1):C}var c;function f(C,M){var g=r(C,M);if(!g)return C+"";var P=g[0],T=g[1],z=T-(c=Math.max(-8,Math.min(8,Math.floor(T/3)))*3)+1,O=P.length;return z===O?P:z>O?P+new Array(z-O+1).join("0"):z>0?P.slice(0,z)+"."+P.slice(z):"0."+new Array(1-z).join("0")+r(C,Math.max(0,M+z-1))[0]}function h(C,M){var g=r(C,M);if(!g)return C+"";var P=g[0],T=g[1];return T<0?"0."+new Array(-T).join("0")+P:P.length>T+1?P.slice(0,T+1)+"."+P.slice(T+1):P+new Array(T-P.length+2).join("0")}var d={"%":function(C,M){return(C*100).toFixed(M)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+""},d:t,e:function(C,M){return C.toExponential(M)},f:function(C,M){return C.toFixed(M)},g:function(C,M){return C.toPrecision(M)},o:function(C){return Math.round(C).toString(8)},p:function(C,M){return h(C*100,M)},r:h,s:f,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function v(C){return C}var _=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function p(C){var M=C.grouping===void 0||C.thousands===void 0?v:i(_.call(C.grouping,Number),C.thousands+""),g=C.currency===void 0?"":C.currency[0]+"",P=C.currency===void 0?"":C.currency[1]+"",T=C.decimal===void 0?".":C.decimal+"",z=C.numerals===void 0?v:a(_.call(C.numerals,String)),O=C.percent===void 0?"%":C.percent+"",V=C.minus===void 0?"-":C.minus+"",G=C.nan===void 0?"NaN":C.nan+"";function Z(N){N=s(N);var H=N.fill,te=N.align,oe=N.sign,_e=N.symbol,Ee=N.zero,Ce=N.width,me=N.comma,ie=N.precision,Se=N.trim,Le=N.type;Le==="n"?(me=!0,Le="g"):d[Le]||(ie===void 0&&(ie=12),Se=!0,Le="g"),(Ee||H==="0"&&te==="=")&&(Ee=!0,H="0",te="=");var Ae=_e==="$"?g:_e==="#"&&/[boxX]/.test(Le)?"0"+Le.toLowerCase():"",Fe=_e==="$"?P:/[%p]/.test(Le)?O:"",Pe=d[Le],ge=/[defgprs%]/.test(Le);ie=ie===void 0?6:/[gprs]/.test(Le)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function Re(ce){var Ze=Ae,ut=Fe,pt,Zt,st;if(Le==="c")ut=Pe(ce)+ut,ce="";else{ce=+ce;var lt=ce<0||1/ce<0;if(ce=isNaN(ce)?G:Pe(Math.abs(ce),ie),Se&&(ce=u(ce)),lt&&+ce==0&&oe!=="+"&&(lt=!1),Ze=(lt?oe==="("?oe:V:oe==="-"||oe==="("?"":oe)+Ze,ut=(Le==="s"?b[8+c/3]:"")+ut+(lt&&oe==="("?")":""),ge){for(pt=-1,Zt=ce.length;++ptst||st>57){ut=(st===46?T+ce.slice(pt+1):ce.slice(pt))+ut,ce=ce.slice(0,pt);break}}}me&&!Ee&&(ce=M(ce,1/0));var Gt=Ze.length+ce.length+ut.length,Nt=Gt>1)+Ze+ce+ut+Nt.slice(Gt);break;default:ce=Nt+Ze+ce+ut;break}return z(ce)}return Re.toString=function(){return N+""},Re}function j(N,H){var te=Z((N=s(N),N.type="f",N)),oe=Math.max(-8,Math.min(8,Math.floor(n(H)/3)))*3,_e=Math.pow(10,-oe),Ee=b[8+oe/3];return function(Ce){return te(_e*Ce)+Ee}}return{format:Z,formatPrefix:j}}var k;E({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function E(C){return k=p(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function S(C){return Math.max(0,-n(Math.abs(C)))}function L(C,M){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(M)/3)))*3-n(Math.abs(C)))}function x(C,M){return C=Math.abs(C),M=Math.abs(M)-C,Math.max(0,n(M)-n(C))+1}e.FormatSpecifier=l,e.formatDefaultLocale=E,e.formatLocale=p,e.formatSpecifier=s,e.precisionFixed=S,e.precisionPrefix=L,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})})});var _ee=ye((orr,yee)=>{"use strict";yee.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Eo=ye((srr,xee)=>{"use strict";var mtt=_ee();xee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&mtt(r))return!1}else if(t!=="number")return!1;return e-e<1}});var fs=ye((lrr,bee)=>{"use strict";bee.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var TO=ye((v6,wee)=>{(function(e,t){typeof v6=="object"&&typeof wee!="undefined"?t(v6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(v6,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,v;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var _=new ArrayBuffer(s),b=new Uint8Array(_);for(u=0;u>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return _};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var my=ye((urr,Tee)=>{"use strict";Tee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var vv=ye(yg=>{"use strict";var ytt=TO().decode,_tt=my(),AO=Array.isArray,xtt=ArrayBuffer,btt=DataView;function Aee(e){return xtt.isView(e)&&!(e instanceof btt)}yg.isTypedArray=Aee;function p6(e){return AO(e)||Aee(e)}yg.isArrayOrTypedArray=p6;function wtt(e){return!p6(e[0])}yg.isArray1D=wtt;yg.ensureArray=function(e,t){return AO(e)||(e=[]),e.length=t,e};var Ld={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};Ld.uint8c=Ld.u1c;Ld.uint8=Ld.u1;Ld.int8=Ld.i1;Ld.uint16=Ld.u2;Ld.int16=Ld.i2;Ld.uint32=Ld.u4;Ld.int32=Ld.i4;Ld.float32=Ld.f4;Ld.float64=Ld.f8;function SO(e){return e.constructor===ArrayBuffer}yg.isArrayBuffer=SO;yg.decodeTypedArraySpec=function(e){var t=[],r=Ttt(e),n=r.dtype,i=Ld[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;SO(o)||(o=ytt(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new i(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Mee=Eo(),EO=vv().isArrayOrTypedArray;Lee.exports=function(t,r){if(Mee(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var i3=PS(),ktt=/^\w*$/,Ctt=0,Pee=1,g6=2,Iee=3,sb=4;Ree.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,l={};r&&r.length?(s=i3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[d]=l[d]|g6,f.set(h,null);if(c){for(a=d;a{"use strict";var Ltt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Ptt=/^[^\.\[\]]+$/;Fee.exports=function(e,t){for(;t;){var r=e.match(Ltt);if(r)e=r[1];else if(e.match(Ptt))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 m6=ye((vrr,Oee)=>{"use strict";var Itt=Eo();Oee.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Itt(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var Nee=ye((prr,Bee)=>{"use strict";var qee=vv().isArrayOrTypedArray,IS=my();Bee.exports=function e(t,r){for(var n in r){var i=r[n],a=t[n];if(a!==i)if(n.charAt(0)==="_"||typeof i=="function"){if(n in t)continue;t[n]=i}else if(qee(i)&&qee(a)&&IS(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function Rtt(e,t){var r=e%t;return r<0?r+t:r}function Dtt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Uee.exports={mod:Rtt,modHalf:Dtt}});var cd=ye((mrr,y6)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(ge,Re){if(ge=ge||"",Re=Re||{},ge instanceof l)return ge;if(!(this instanceof l))return new l(ge,Re);var ce=u(ge);this._originalInput=ge,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=Re.format||ce.format,this._gradientType=Re.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ge=this.toRgb();return(ge.r*299+ge.g*587+ge.b*114)/1e3},getLuminance:function(){var ge=this.toRgb(),Re,ce,Ze,ut,pt,Zt;return Re=ge.r/255,ce=ge.g/255,Ze=ge.b/255,Re<=.03928?ut=Re/12.92:ut=e.pow((Re+.055)/1.055,2.4),ce<=.03928?pt=ce/12.92:pt=e.pow((ce+.055)/1.055,2.4),Ze<=.03928?Zt=Ze/12.92:Zt=e.pow((Ze+.055)/1.055,2.4),.2126*ut+.7152*pt+.0722*Zt},setAlpha:function(ge){return this._a=N(ge),this._roundA=i(100*this._a)/100,this},toHsv:function(){var ge=d(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,v:ge.v,a:this._a}},toHsvString:function(){var ge=d(this._r,this._g,this._b),Re=i(ge.h*360),ce=i(ge.s*100),Ze=i(ge.v*100);return this._a==1?"hsv("+Re+", "+ce+"%, "+Ze+"%)":"hsva("+Re+", "+ce+"%, "+Ze+"%, "+this._roundA+")"},toHsl:function(){var ge=f(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,l:ge.l,a:this._a}},toHslString:function(){var ge=f(this._r,this._g,this._b),Re=i(ge.h*360),ce=i(ge.s*100),Ze=i(ge.l*100);return this._a==1?"hsl("+Re+", "+ce+"%, "+Ze+"%)":"hsla("+Re+", "+ce+"%, "+Ze+"%, "+this._roundA+")"},toHex:function(ge){return _(this._r,this._g,this._b,ge)},toHexString:function(ge){return"#"+this.toHex(ge)},toHex8:function(ge){return b(this._r,this._g,this._b,this._a,ge)},toHex8String:function(ge){return"#"+this.toHex8(ge)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(H(this._r,255)*100)+"%",g:i(H(this._g,255)*100)+"%",b:i(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%)":"rgba("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Z[_(this._r,this._g,this._b,!0)]||!1},toFilter:function(ge){var Re="#"+p(this._r,this._g,this._b,this._a),ce=Re,Ze=this._gradientType?"GradientType = 1, ":"";if(ge){var ut=l(ge);ce="#"+p(ut._r,ut._g,ut._b,ut._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ze+"startColorstr="+Re+",endColorstr="+ce+")"},toString:function(ge){var Re=!!ge;ge=ge||this._format;var ce=!1,Ze=this._a<1&&this._a>=0,ut=!Re&&Ze&&(ge==="hex"||ge==="hex6"||ge==="hex3"||ge==="hex4"||ge==="hex8"||ge==="name");return ut?ge==="name"&&this._a===0?this.toName():this.toRgbString():(ge==="rgb"&&(ce=this.toRgbString()),ge==="prgb"&&(ce=this.toPercentageRgbString()),(ge==="hex"||ge==="hex6")&&(ce=this.toHexString()),ge==="hex3"&&(ce=this.toHexString(!0)),ge==="hex4"&&(ce=this.toHex8String(!0)),ge==="hex8"&&(ce=this.toHex8String()),ge==="name"&&(ce=this.toName()),ge==="hsl"&&(ce=this.toHslString()),ge==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(ge,Re){var ce=ge.apply(null,[this].concat([].slice.call(Re)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(ge,Re){return ge.apply(null,[this].concat([].slice.call(Re)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(V,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},l.fromRatio=function(ge,Re){if(typeof ge=="object"){var ce={};for(var Ze in ge)ge.hasOwnProperty(Ze)&&(Ze==="a"?ce[Ze]=ge[Ze]:ce[Ze]=me(ge[Ze]));ge=ce}return l(ge,Re)};function u(ge){var Re={r:0,g:0,b:0},ce=1,Ze=null,ut=null,pt=null,Zt=!1,st=!1;return typeof ge=="string"&&(ge=Fe(ge)),typeof ge=="object"&&(Ae(ge.r)&&Ae(ge.g)&&Ae(ge.b)?(Re=c(ge.r,ge.g,ge.b),Zt=!0,st=String(ge.r).substr(-1)==="%"?"prgb":"rgb"):Ae(ge.h)&&Ae(ge.s)&&Ae(ge.v)?(Ze=me(ge.s),ut=me(ge.v),Re=v(ge.h,Ze,ut),Zt=!0,st="hsv"):Ae(ge.h)&&Ae(ge.s)&&Ae(ge.l)&&(Ze=me(ge.s),pt=me(ge.l),Re=h(ge.h,Ze,pt),Zt=!0,st="hsl"),ge.hasOwnProperty("a")&&(ce=ge.a)),ce=N(ce),{ok:Zt,format:ge.format||st,r:a(255,o(Re.r,0)),g:a(255,o(Re.g,0)),b:a(255,o(Re.b,0)),a:ce}}function c(ge,Re,ce){return{r:H(ge,255)*255,g:H(Re,255)*255,b:H(ce,255)*255}}function f(ge,Re,ce){ge=H(ge,255),Re=H(Re,255),ce=H(ce,255);var Ze=o(ge,Re,ce),ut=a(ge,Re,ce),pt,Zt,st=(Ze+ut)/2;if(Ze==ut)pt=Zt=0;else{var lt=Ze-ut;switch(Zt=st>.5?lt/(2-Ze-ut):lt/(Ze+ut),Ze){case ge:pt=(Re-ce)/lt+(Re1&&(Jt-=1),Jt<1/6?Gt+(Nt-Gt)*6*Jt:Jt<1/2?Nt:Jt<2/3?Gt+(Nt-Gt)*(2/3-Jt)*6:Gt}if(Re===0)Ze=ut=pt=ce;else{var st=ce<.5?ce*(1+Re):ce+Re-ce*Re,lt=2*ce-st;Ze=Zt(lt,st,ge+1/3),ut=Zt(lt,st,ge),pt=Zt(lt,st,ge-1/3)}return{r:Ze*255,g:ut*255,b:pt*255}}function d(ge,Re,ce){ge=H(ge,255),Re=H(Re,255),ce=H(ce,255);var Ze=o(ge,Re,ce),ut=a(ge,Re,ce),pt,Zt,st=Ze,lt=Ze-ut;if(Zt=Ze===0?0:lt/Ze,Ze==ut)pt=0;else{switch(Ze){case ge:pt=(Re-ce)/lt+(Re>1)+720)%360;--Re;)Ze.h=(Ze.h+ut)%360,pt.push(l(Ze));return pt}function V(ge,Re){Re=Re||6;for(var ce=l(ge).toHsv(),Ze=ce.h,ut=ce.s,pt=ce.v,Zt=[],st=1/Re;Re--;)Zt.push(l({h:Ze,s:ut,v:pt})),pt=(pt+st)%1;return Zt}l.mix=function(ge,Re,ce){ce=ce===0?0:ce||50;var Ze=l(ge).toRgb(),ut=l(Re).toRgb(),pt=ce/100,Zt={r:(ut.r-Ze.r)*pt+Ze.r,g:(ut.g-Ze.g)*pt+Ze.g,b:(ut.b-Ze.b)*pt+Ze.b,a:(ut.a-Ze.a)*pt+Ze.a};return l(Zt)},l.readability=function(ge,Re){var ce=l(ge),Ze=l(Re);return(e.max(ce.getLuminance(),Ze.getLuminance())+.05)/(e.min(ce.getLuminance(),Ze.getLuminance())+.05)},l.isReadable=function(ge,Re,ce){var Ze=l.readability(ge,Re),ut,pt;switch(pt=!1,ut=Pe(ce),ut.level+ut.size){case"AAsmall":case"AAAlarge":pt=Ze>=4.5;break;case"AAlarge":pt=Ze>=3;break;case"AAAsmall":pt=Ze>=7;break}return pt},l.mostReadable=function(ge,Re,ce){var Ze=null,ut=0,pt,Zt,st,lt;ce=ce||{},Zt=ce.includeFallbackColors,st=ce.level,lt=ce.size;for(var Gt=0;Gtut&&(ut=pt,Ze=l(Re[Gt]));return l.isReadable(ge,Ze,{level:st,size:lt})||!Zt?Ze:(ce.includeFallbackColors=!1,l.mostReadable(ge,["#fff","#000"],ce))};var G=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Z=l.hexNames=j(G);function j(ge){var Re={};for(var ce in ge)ge.hasOwnProperty(ce)&&(Re[ge[ce]]=ce);return Re}function N(ge){return ge=parseFloat(ge),(isNaN(ge)||ge<0||ge>1)&&(ge=1),ge}function H(ge,Re){_e(ge)&&(ge="100%");var ce=Ee(ge);return ge=a(Re,o(0,parseFloat(ge))),ce&&(ge=parseInt(ge*Re,10)/100),e.abs(ge-Re)<1e-6?1:ge%Re/parseFloat(Re)}function te(ge){return a(1,o(0,ge))}function oe(ge){return parseInt(ge,16)}function _e(ge){return typeof ge=="string"&&ge.indexOf(".")!=-1&&parseFloat(ge)===1}function Ee(ge){return typeof ge=="string"&&ge.indexOf("%")!=-1}function Ce(ge){return ge.length==1?"0"+ge:""+ge}function me(ge){return ge<=1&&(ge=ge*100+"%"),ge}function ie(ge){return e.round(parseFloat(ge)*255).toString(16)}function Se(ge){return oe(ge)/255}var Le=function(){var ge="[-\\+]?\\d+%?",Re="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+Re+")|(?:"+ge+")",Ze="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",ut="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+Ze),rgba:new RegExp("rgba"+ut),hsl:new RegExp("hsl"+Ze),hsla:new RegExp("hsla"+ut),hsv:new RegExp("hsv"+Ze),hsva:new RegExp("hsva"+ut),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ae(ge){return!!Le.CSS_UNIT.exec(ge)}function Fe(ge){ge=ge.replace(t,"").replace(r,"").toLowerCase();var Re=!1;if(G[ge])ge=G[ge],Re=!0;else if(ge=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=Le.rgb.exec(ge))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Le.rgba.exec(ge))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Le.hsl.exec(ge))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Le.hsla.exec(ge))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Le.hsv.exec(ge))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Le.hsva.exec(ge))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Le.hex8.exec(ge))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),a:Se(ce[4]),format:Re?"name":"hex8"}:(ce=Le.hex6.exec(ge))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),format:Re?"name":"hex"}:(ce=Le.hex4.exec(ge))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),a:Se(ce[4]+""+ce[4]),format:Re?"name":"hex8"}:(ce=Le.hex3.exec(ge))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),format:Re?"name":"hex"}:!1}function Pe(ge){var Re,ce;return ge=ge||{level:"AA",size:"small"},Re=(ge.level||"AA").toUpperCase(),ce=(ge.size||"small").toLowerCase(),Re!=="AA"&&Re!=="AAA"&&(Re="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:Re,size:ce}}typeof y6!="undefined"&&y6.exports?y6.exports=l:window.tinycolor=l})(Math)});var Ao=ye(FS=>{"use strict";var Vee=my(),RS=Array.isArray;function Ftt(e,t){var r,n;for(r=0;r{"use strict";Gee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var zS=ye((xrr,Hee)=>{"use strict";Hee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var B1=ye((brr,Xee)=>{"use strict";var jee=zS(),Wee=ec(),kO=Wee({editType:"none"});kO.family.dflt=jee.HOVERFONT;kO.size.dflt=jee.HOVERFONTSIZE;Xee.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:kO,grouptitlefont:Wee({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 a3=ye((wrr,Zee)=>{"use strict";var ztt=ec(),OS=B1().hoverlabel,qS=Ao().extendFlat;Zee.exports={hoverlabel:{bgcolor:qS({},OS.bgcolor,{arrayOk:!0}),bordercolor:qS({},OS.bordercolor,{arrayOk:!0}),font:ztt({arrayOk:!0,editType:"none"}),align:qS({},OS.align,{arrayOk:!0}),namelength:qS({},OS.namelength,{arrayOk:!0}),showarrow:qS({},OS.showarrow),editType:"none"}}});var Gl=ye((Trr,Yee)=>{"use strict";var Ott=ec(),qtt=a3();Yee.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:Ott({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:qtt.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}});var lb=ye((Arr,$ee)=>{"use strict";var Btt=cd(),_6={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)"]]},Kee=_6.RdBu;function Ntt(e,t){if(t||(t=Kee),!e)return t;function r(){try{e=_6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Jee(e)?e:t}function Jee(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";ub.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];ub.defaultLine="#444";ub.lightLine="#eee";ub.background="#fff";ub.borderLine="#BEC8D9";ub.lightFraction=100*10/11});var ka=ye((Mrr,Qee)=>{"use strict";var bp=cd(),Vtt=Eo(),Gtt=vv().isTypedArray,fd=Qee.exports={},x6=Lh();fd.defaults=x6.defaults;var Htt=fd.defaultLine=x6.defaultLine;fd.lightLine=x6.lightLine;var LO=fd.background=x6.background;fd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};fd.rgb=function(e){return fd.tinyRGB(bp(e))};fd.opacity=function(e){return e?bp(e).getAlpha():0};fd.addOpacity=function(e,t){var r=bp(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};fd.combine=function(e,t){var r=bp(e).toRgb();if(r.a===1)return bp(e).toRgbString();var n=bp(t||LO).toRgb(),i=n.a===1?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},a={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return bp(a).toRgbString()};fd.interpolate=function(e,t,r){var n=bp(e).toRgb(),i=bp(t).toRgb(),a={r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b};return bp(a).toRgbString()};fd.contrast=function(e,t,r){var n=bp(e);n.getAlpha()!==1&&(n=bp(fd.combine(e,LO)));var i=n.isDark()?t?n.lighten(t):LO:r?n.darken(r):Htt;return i.toString()};fd.stroke=function(e,t){var r=bp(t);e.style({stroke:fd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};fd.fill=function(e,t){var r=bp(t);e.style({fill:fd.tinyRGB(r),"fill-opacity":r.getAlpha()})};fd.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,n,i,a;for(r=0;r=0)))return e;if(a===3)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var o=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return i?"rgba("+o+", "+n[3]+")":"rgb("+o+")"}});var N1=ye((Err,ete)=>{"use strict";ete.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var o3=ye(tte=>{"use strict";tte.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),a=n===!1?"":"^";return e==="xy"?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+e+"([2-9]|[1-9][0-9]+)?"+i)}});var ate=ye(wp=>{"use strict";var PO=Eo(),rte=cd(),ite=Ao().extendFlat,jtt=Gl(),Wtt=lb(),Xtt=ka(),Ztt=N1().DESELECTDIM,s3=PS(),nte=o3().counter,Ytt=n3().modHalf,_g=vv().isArrayOrTypedArray,U1=vv().isTypedArraySpec,V1=vv().decodeTypedArraySpec;wp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(_g(e)?e:U1(e)?V1(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;na===!0||a===!1;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){U1(e)&&(e=V1(e)),!PO(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}U1(e)&&(e=V1(e)),e%1||!PO(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var i=typeof e=="number";n.strict===!0||!i?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),rte(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return rte(i).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(n)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(Wtt.get(e,r))}},angle:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),e==="auto"?t.set("auto"):PO(e)?t.set(Ytt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||nte(r);let a=o=>typeof o=="string"&&i.test(o);a(e)||n.arrayOk&&_g(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:!!nte(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var i=e.split("+"),a=0;a{"use strict";var ote={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},ste={};function lte(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),lte(n,t[r]))}}lte(ote,ste);ute.exports={configAttributes:ote,dfltConfig:ste}});var RO=ye((Prr,cte)=>{"use strict";var IO=Oa(),Ktt=Eo(),BS=[];cte.exports=function(e,t){if(BS.indexOf(e)!==-1)return;BS.push(e);var r=1e3;Ktt(t)?r=t:t==="long"&&(r=3e3);var n=IO.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var i=n.selectAll(".notifier-note").data(BS);function a(o){o.duration(700).style("opacity",0).each("end",function(s){var l=BS.indexOf(s);l!==-1&&BS.splice(l,1),IO.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var s=IO.select(this);s.append("button").classed("notifier-close",!0).html("×").on("click",function(){s.transition().call(a)});for(var l=s.append("p"),u=o.split(//g),c=0;c{"use strict";var l3=cb().dfltConfig,DO=RO(),FO=fte.exports={};FO.log=function(){var e;if(l3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};FO.warn=function(){var e;if(l3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};FO.error=function(){var e;if(l3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var w6=ye((Rrr,hte)=>{"use strict";hte.exports=function(){}});var zO=ye((Drr,dte)=>{"use strict";dte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{vte.exports=Jtt;function Jtt(){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 mte=ye((zrr,gte)=>{gte.exports=$tt;function $tt(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 _te=ye((Orr,yte)=>{yte.exports=Qtt;function Qtt(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 OO=ye((qrr,xte)=>{xte.exports=ert;function ert(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 wte=ye((Brr,bte)=>{bte.exports=trt;function trt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Ate=ye((Nrr,Tte)=>{Tte.exports=rrt;function rrt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],_=t[13],b=t[14],p=t[15],k=r*s-n*o,E=r*l-i*o,S=r*u-a*o,L=n*l-i*s,x=n*u-a*s,C=i*u-a*l,M=c*_-f*v,g=c*b-h*v,P=c*p-d*v,T=f*b-h*_,z=f*p-d*_,O=h*p-d*b,V=k*O-E*z+S*T+L*P-x*g+C*M;return V?(V=1/V,e[0]=(s*O-l*z+u*T)*V,e[1]=(i*z-n*O-a*T)*V,e[2]=(_*C-b*x+p*L)*V,e[3]=(h*x-f*C-d*L)*V,e[4]=(l*P-o*O-u*g)*V,e[5]=(r*O-i*P+a*g)*V,e[6]=(b*S-v*C-p*E)*V,e[7]=(c*C-h*S+d*E)*V,e[8]=(o*z-s*P+u*M)*V,e[9]=(n*P-r*z-a*M)*V,e[10]=(v*x-_*S+p*k)*V,e[11]=(f*S-c*x-d*k)*V,e[12]=(s*g-o*T-l*M)*V,e[13]=(r*T-n*g+i*M)*V,e[14]=(_*E-v*L-b*k)*V,e[15]=(c*L-f*E+h*k)*V,e):null}});var Mte=ye((Urr,Ste)=>{Ste.exports=irt;function irt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],_=t[13],b=t[14],p=t[15];return e[0]=s*(h*p-d*b)-f*(l*p-u*b)+_*(l*d-u*h),e[1]=-(n*(h*p-d*b)-f*(i*p-a*b)+_*(i*d-a*h)),e[2]=n*(l*p-u*b)-s*(i*p-a*b)+_*(i*u-a*l),e[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),e[4]=-(o*(h*p-d*b)-c*(l*p-u*b)+v*(l*d-u*h)),e[5]=r*(h*p-d*b)-c*(i*p-a*b)+v*(i*d-a*h),e[6]=-(r*(l*p-u*b)-o*(i*p-a*b)+v*(i*u-a*l)),e[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),e[8]=o*(f*p-d*_)-c*(s*p-u*_)+v*(s*d-u*f),e[9]=-(r*(f*p-d*_)-c*(n*p-a*_)+v*(n*d-a*f)),e[10]=r*(s*p-u*_)-o*(n*p-a*_)+v*(n*u-a*s),e[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*b-h*_)-c*(s*b-l*_)+v*(s*h-l*f)),e[13]=r*(f*b-h*_)-c*(n*b-i*_)+v*(n*h-i*f),e[14]=-(r*(s*b-l*_)-o*(n*b-i*_)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var kte=ye((Vrr,Ete)=>{Ete.exports=nrt;function nrt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],v=e[13],_=e[14],b=e[15],p=t*o-r*a,k=t*s-n*a,E=t*l-i*a,S=r*s-n*o,L=r*l-i*o,x=n*l-i*s,C=u*v-c*d,M=u*_-f*d,g=u*b-h*d,P=c*_-f*v,T=c*b-h*v,z=f*b-h*_;return p*z-k*T+E*P+S*g-L*M+x*C}});var Lte=ye((Grr,Cte)=>{Cte.exports=art;function art(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],v=t[11],_=t[12],b=t[13],p=t[14],k=t[15],E=r[0],S=r[1],L=r[2],x=r[3];return e[0]=E*n+S*s+L*f+x*_,e[1]=E*i+S*l+L*h+x*b,e[2]=E*a+S*u+L*d+x*p,e[3]=E*o+S*c+L*v+x*k,E=r[4],S=r[5],L=r[6],x=r[7],e[4]=E*n+S*s+L*f+x*_,e[5]=E*i+S*l+L*h+x*b,e[6]=E*a+S*u+L*d+x*p,e[7]=E*o+S*c+L*v+x*k,E=r[8],S=r[9],L=r[10],x=r[11],e[8]=E*n+S*s+L*f+x*_,e[9]=E*i+S*l+L*h+x*b,e[10]=E*a+S*u+L*d+x*p,e[11]=E*o+S*c+L*v+x*k,E=r[12],S=r[13],L=r[14],x=r[15],e[12]=E*n+S*s+L*f+x*_,e[13]=E*i+S*l+L*h+x*b,e[14]=E*a+S*u+L*d+x*p,e[15]=E*o+S*c+L*v+x*k,e}});var Ite=ye((Hrr,Pte)=>{Pte.exports=ort;function ort(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,_,b,p;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],v=t[8],_=t[9],b=t[10],p=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=_,e[10]=b,e[11]=p,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+_*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+p*a+t[15]),e}});var Dte=ye((jrr,Rte)=>{Rte.exports=srt;function srt(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var zte=ye((Wrr,Fte)=>{Fte.exports=lrt;function lrt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),l,u,c,f,h,d,v,_,b,p,k,E,S,L,x,C,M,g,P,T,z,O,V,G;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],v=t[3],_=t[4],b=t[5],p=t[6],k=t[7],E=t[8],S=t[9],L=t[10],x=t[11],C=i*i*c+u,M=a*i*c+o*l,g=o*i*c-a*l,P=i*a*c-o*l,T=a*a*c+u,z=o*a*c+i*l,O=i*o*c+a*l,V=a*o*c-i*l,G=o*o*c+u,e[0]=f*C+_*M+E*g,e[1]=h*C+b*M+S*g,e[2]=d*C+p*M+L*g,e[3]=v*C+k*M+x*g,e[4]=f*P+_*T+E*z,e[5]=h*P+b*T+S*z,e[6]=d*P+p*T+L*z,e[7]=v*P+k*T+x*z,e[8]=f*O+_*V+E*G,e[9]=h*O+b*V+S*G,e[10]=d*O+p*V+L*G,e[11]=v*O+k*V+x*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var qte=ye((Xrr,Ote)=>{Ote.exports=urt;function urt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+h*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=h*i-l*n,e}});var Nte=ye((Zrr,Bte)=>{Bte.exports=crt;function crt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-h*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+h*i,e}});var Vte=ye((Yrr,Ute)=>{Ute.exports=frt;function frt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+h*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=h*i-l*n,e}});var Hte=ye((Krr,Gte)=>{Gte.exports=hrt;function hrt(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Wte=ye((Jrr,jte)=>{jte.exports=drt;function drt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,v=i*u,_=a*u,b=o*s,p=o*l,k=o*u;return e[0]=1-(d+_),e[1]=f+k,e[2]=h-p,e[3]=0,e[4]=f-k,e[5]=1-(c+_),e[6]=v+b,e[7]=0,e[8]=h+p,e[9]=v-b,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Zte=ye(($rr,Xte)=>{Xte.exports=vrt;function vrt(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 Kte=ye((Qrr,Yte)=>{Yte.exports=prt;function prt(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 $te=ye((eir,Jte)=>{Jte.exports=grt;function grt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ere=ye((tir,Qte)=>{Qte.exports=mrt;function mrt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var rre=ye((rir,tre)=>{tre.exports=yrt;function yrt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var nre=ye((iir,ire)=>{ire.exports=_rt;function _rt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,v=i*l,_=a*o,b=a*s,p=a*l;return e[0]=1-f-v,e[1]=c+p,e[2]=h-b,e[3]=0,e[4]=c-p,e[5]=1-u-v,e[6]=d+_,e[7]=0,e[8]=h+b,e[9]=d-_,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ore=ye((nir,are)=>{are.exports=xrt;function xrt(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var lre=ye((air,sre)=>{sre.exports=brt;function brt(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}});var cre=ye((oir,ure)=>{ure.exports=wrt;function wrt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var hre=ye((sir,fre)=>{fre.exports=Trt;function Trt(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}});var vre=ye((lir,dre)=>{var Art=OO();dre.exports=Srt;function Srt(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],_=t[1],b=t[2],p=n[0],k=n[1],E=n[2],S=r[0],L=r[1],x=r[2];return Math.abs(v-S)<1e-6&&Math.abs(_-L)<1e-6&&Math.abs(b-x)<1e-6?Art(e):(c=v-S,f=_-L,h=b-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=k*h-E*f,a=E*c-p*h,o=p*f-k*c,d=Math.sqrt(i*i+a*a+o*o),d?(d=1/d,i*=d,a*=d,o*=d):(i=0,a=0,o=0),s=f*o-h*a,l=h*i-c*o,u=c*a-f*i,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=i,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+a*_+o*b),e[13]=-(s*v+l*_+u*b),e[14]=-(c*v+f*_+h*b),e[15]=1,e)}});var gre=ye((uir,pre)=>{pre.exports=Mrt;function Mrt(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 qO=ye((cir,mre)=>{mre.exports={create:pte(),clone:mte(),copy:_te(),identity:OO(),transpose:wte(),invert:Ate(),adjoint:Mte(),determinant:kte(),multiply:Lte(),translate:Ite(),scale:Dte(),rotate:zte(),rotateX:qte(),rotateY:Nte(),rotateZ:Vte(),fromRotation:Hte(),fromRotationTranslation:Wte(),fromScaling:Zte(),fromTranslation:Kte(),fromXRotation:$te(),fromYRotation:ere(),fromZRotation:rre(),fromQuat:nre(),frustum:ore(),perspective:lre(),perspectiveFromFieldOfView:cre(),ortho:hre(),lookAt:vre(),str:gre()}});var T6=ye(fh=>{"use strict";var Ert=qO();fh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var krt=Oa(),yre=G1(),Crt=T6(),Lrt=qO();function Prt(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 Irt(e){var t=krt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function _re(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function Rrt(e,t){xre("global",e,t)}function xre(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);if(!(i&&i.matches(".no-inline-styles"))){i||(i=document.createElement("style"),i.setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var a=i.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):yre.warn("addStyleRule failed"):yre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Drt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&_re(r)}function Frt(e,t,r,n,i,a){var o=n.split(":"),s=i.split(":"),l="data-btn-style-event-added";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function zrt(e){var t=wre(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var i=bre(n);if(i){var a=Crt.convertCssMatrix(i);r=Lrt.multiply(r,r,a)}}),r}function bre(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function wre(e){for(var t=[];Ort(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Ort(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function qrt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}Tre.exports={getGraphDiv:Prt,isPlotDiv:Irt,removeElement:_re,addStyleRule:Rrt,addRelatedStyleRule:xre,deleteRelatedStyleRule:Drt,setStyleOnHover:Frt,getFullTransformMatrix:zrt,getElementTransformMatrix:bre,getElementAndAncestors:wre,equalDomRects:qrt}});var US=ye((dir,Are)=>{"use strict";Are.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var mc=ye((vir,Pre)=>{"use strict";var Mre=Ao().extendFlat,Brt=my(),Ere={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},kre={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Nrt=Ere.flags.slice().concat(["fullReplot"]),Urt=kre.flags.slice().concat("layoutReplot");Pre.exports={traces:Ere,layout:kre,traceFlags:function(){return Sre(Nrt)},layoutFlags:function(){return Sre(Urt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";BO.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};BO.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 NO=ye((gir,Ire)=>{"use strict";Ire.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Ll=ye(u3=>{"use strict";var{DATE_FORMAT_LINK:Vrt,FORMAT_LINK:Grt}=NO(),Hrt=["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 jrt({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}".`,Grt,"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}".`,Vrt,"for details on the date formatting syntax.",Hrt].join(" ")}u3.templateFormatStringDescription=jrt;u3.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>mg({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});u3.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>mg({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});u3.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});u3.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var M6=ye((_ir,qre)=>{"use strict";function H1(e,t){return t?t.d2l(e):e}function Rre(e,t){return t?t.l2d(e):e}function Wrt(e){return e.x0}function Xrt(e){return e.x1}function Zrt(e){return e.y0}function Yrt(e){return e.y1}function Dre(e){return e.x0shift||0}function Fre(e){return e.x1shift||0}function zre(e){return e.y0shift||0}function Ore(e){return e.y1shift||0}function A6(e,t){return H1(e.x1,t)+Fre(e)-H1(e.x0,t)-Dre(e)}function S6(e,t,r){return H1(e.y1,r)+Ore(e)-H1(e.y0,r)-zre(e)}function Krt(e,t){return Math.abs(A6(e,t))}function Jrt(e,t,r){return Math.abs(S6(e,t,r))}function $rt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(A6(e,t),2)+Math.pow(S6(e,t,r),2))}function Qrt(e,t){return Rre((H1(e.x1,t)+Fre(e)+H1(e.x0,t)+Dre(e))/2,t)}function eit(e,t,r){return Rre((H1(e.y1,r)+Ore(e)+H1(e.y0,r)+zre(e))/2,r)}function tit(e,t,r){return e.type!=="line"?void 0:S6(e,t,r)/A6(e,t)}qre.exports={x0:Wrt,x1:Xrt,y0:Zrt,y1:Yrt,slope:tit,dx:A6,dy:S6,width:Krt,height:Jrt,length:$rt,xcenter:Qrt,ycenter:eit}});var Ure=ye((xir,Nre)=>{"use strict";var rit=mc().overrideAll,fb=Gl(),Bre=ec(),iit=Pd().dash,j1=Ao().extendFlat,{shapeTexttemplateAttrs:nit,templatefallbackAttrs:ait}=Ll(),oit=M6();Nre.exports=rit({newshape:{visible:j1({},fb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:j1({},fb.legend,{}),legendgroup:j1({},fb.legendgroup,{}),legendgrouptitle:{text:j1({},fb.legendgrouptitle.text,{}),font:Bre({})},legendrank:j1({},fb.legendrank,{}),legendwidth:j1({},fb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:j1({},iit,{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:j1({},fb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:nit({newshape:!0},{keys:Object.keys(oit)}),texttemplatefallback:ait({editType:"arraydraw"}),font:Bre({}),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 Gre=ye((bir,Vre)=>{"use strict";var sit=Pd().dash,lit=Ao().extendFlat;Vre.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:lit({},sit,{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 E6=ye((wir,Hre)=>{"use strict";Hre.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 c3=ye((Tir,Zre)=>{"use strict";var UO=ec(),uit=US(),k6=Lh(),jre=Ure(),Wre=Gre(),cit=E6(),Xre=Ao().extendFlat,C6=UO({editType:"calc"});C6.family.dflt='"Open Sans", verdana, arial, sans-serif';C6.size.dflt=12;C6.color.dflt=k6.defaultLine;Zre.exports={font:C6,title:{text:{valType:"string",editType:"layoutstyle"},font:UO({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:UO({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:Xre(cit({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:k6.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:k6.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:k6.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:jre.newshape,activeshape:jre.activeshape,newselection:Wre.newselection,activeselection:Wre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Xre({},uit.transition,{editType:"none"})}});var Yre=ye(()=>{(function(){if(!document.getElementById("696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97")){var e=document.createElement("style");e.id="696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var qa=ye(el=>{"use strict";var f3=G1(),Kre=w6(),Jre=zO(),fit=my(),hit=NS().addStyleRule,$re=Ao(),dit=Gl(),vit=c3(),pit=$re.extendFlat,VO=$re.extendDeepAll;el.modules={};el.allCategories={};el.allTypes=[];el.subplotsRegistry={};el.componentsRegistry={};el.layoutArrayContainers=[];el.layoutArrayRegexes=[];el.traceLayoutAttributes={};el.localeRegistry={};el.apiMethodRegistry={};el.collectableSubplotTypes=null;el.register=function(t){if(el.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var bit=r3().timeFormat,uie=Eo(),GO=G1(),X1=n3().mod,v3=fs(),y0=v3.BADNUM,Tp=v3.ONEDAY,VS=v3.ONEHOUR,W1=v3.ONEMIN,d3=v3.ONESEC,GS=v3.EPOCHJD,yy=qa(),iie=r3().utcFormat,wit=/^\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,Tit=/^\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,nie=new Date().getFullYear()-70;function _y(e){return e&&yy.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}hh.dateTick0=function(e,t){var r=Ait(e,!!t);if(t<2)return r;var n=hh.dateTime2ms(r,e);return n+=Tp*(t-1),hh.ms2DateTime(n,0,e)};function Ait(e,t){return _y(e)?t?yy.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:yy.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}hh.dfltRange=function(e){return _y(e)?yy.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};hh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var P6,I6;hh.dateTime2ms=function(e,t){if(hh.isJSDate(e)){var r=e.getTimezoneOffset()*W1,n=(e.getUTCMinutes()-e.getMinutes())*W1+(e.getUTCSeconds()-e.getSeconds())*d3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*W1;r=r-i/2+X1(n-r+i/2,i)}return e=Number(e)-r,e>=P6&&e<=I6?e:y0}if(typeof e!="string"&&typeof e!="number")return y0;e=String(e);var a=_y(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?Tit:wit);if(!l)return y0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return y0;u=Number(u);var _;try{var b=yy.getComponentMethod("calendars","getCal")(t);if(s){var p=c.charAt(c.length-1)==="i";c=parseInt(c,10),_=b.newDate(u,b.toMonthIndex(u,c,p),f)}else _=b.newDate(u,Number(c),f)}catch(E){return y0}return _?(_.toJD()-GS)*Tp+h*VS+d*W1+v*d3:y0}u.length===2?u=(Number(u)+2e3-nie)%100+nie:u=Number(u),c-=1;var k=new Date(Date.UTC(2e3,c,f,h,d));return k.setUTCFullYear(u),k.getUTCMonth()!==c||k.getUTCDate()!==f?y0:k.getTime()+v*d3};P6=hh.MIN_MS=hh.dateTime2ms("-9999");I6=hh.MAX_MS=hh.dateTime2ms("9999-12-31 23:59:59.9999");hh.isDateTime=function(e,t){return hh.dateTime2ms(e,t)!==y0};function h3(e,t){return String(e+Math.pow(10,t)).slice(1)}var L6=90*Tp,aie=3*VS,oie=5*W1;hh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=P6&&e<=I6))return y0;t||(t=0);var n=Math.floor(X1(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(_y(r)){var f=Math.floor(i/Tp)+GS,h=Math.floor(X1(e,Tp));try{a=yy.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=iie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t=P6+Tp&&e<=I6-Tp))return y0;var t=Math.floor(X1(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=bit("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return cie(n,i,a,o,s)};function cie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+h3(t,2)+":"+h3(r,2),(n||i)&&(e+=":"+h3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+h3(i,a)}return e}hh.cleanDate=function(e,t,r){if(e===y0)return t;if(hh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(_y(r))return GO.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=hh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!hh.isDateTime(e,r))return GO.error("unrecognized date",e),t;return e};var Sit=/%\d?f/g,Mit=/%h/g,Eit={1:"1",2:"1",3:"2",4:"2"};function sie(e,t,r,n){e=e.replace(Sit,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Mit,function(){return Eit[r("%q")(i)]}),_y(n))try{e=yy.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var kit=[59,59.9,59.99,59.999,59.9999];function Cit(e,t){var r=X1(e+.05,Tp),n=h3(Math.floor(r/VS),2)+":"+h3(X1(Math.floor(r/W1),60),2);if(t!=="M"){uie(t)||(t=0);var i=Math.min(X1(e/d3,60),kit[t]),a=(100+i).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}hh.formatDate=function(e,t,r,n,i,a){if(i=_y(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` `+a.year;else return Cit(e,r)+` `+sie(a.dayMonthYear,e,n,i);return sie(t,e,n,i)};var lie=3*Tp;hh.incrementMonth=function(e,t,r){r=_y(r)&&r;var n=X1(e,Tp);if(e=Math.round(e-n),r)try{var i=Math.round(e/Tp)+GS,a=yy.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-GS)*Tp+n}catch(l){GO.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+lie);return s.setUTCMonth(s.getUTCMonth()+t)+n-lie};hh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=_y(t)&&yy.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";hie.exports=function(t){return t}});var R6=ye(xy=>{"use strict";var Lit=Eo(),Pit=G1(),Iit=HS(),Rit=fs().BADNUM,HO=1e-9;xy.findBin=function(e,t,r){if(Lit(t.start))return r?Math.ceil((e-t.start)/t.size-HO)-1:Math.floor((e-t.start)/t.size+HO);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,l;for(o>=0?l=r?Dit:Fit:l=r?Oit:zit,e+=o*HO*(r?-1:1)*(o>=0?1:-1);n90&&Pit.log("Long binary search..."),n-1};function Dit(e,t){return et}function Oit(e,t){return e>=t}xy.sorterAsc=function(e,t){return e-t};xy.sorterDes=function(e,t){return t-e};xy.distinctVals=function(e){var t=e.slice();t.sort(xy.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Rit;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>i&&(n=Math.min(n,u),a.push(l),o=l)}return{vals:a,minDiff:n}};xy.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};xy.findIndexOfMin=function(e,t){t=t||Iit;for(var r=1/0,n,i=0;i{"use strict";die.exports=function(t){return Object.keys(t).sort()}});var vie=ye(dh=>{"use strict";var jS=Eo(),qit=vv().isArrayOrTypedArray;dh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),jS(t)||(t=!1),qit(r[0])){for(a=new Array(n),i=0;ie.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var _ie=ye((Iir,yie)=>{"use strict";var pie=n3(),jO=pie.mod,Bit=pie.modHalf,WS=Math.PI,Y1=2*WS;function Nit(e){return e/180*WS}function Uit(e){return e/WS*180}function WO(e){return Math.abs(e[1]-e[0])>Y1-1e-14}function gie(e,t){return Bit(t-e,Y1)}function Vit(e,t){return Math.abs(gie(e,t))}function mie(e,t){if(WO(t))return!0;var r,n;t[0]n&&(n+=Y1);var i=jO(e,Y1),a=i+Y1;return i>=r&&i<=n||a>=r&&a<=n}function Git(e,t,r,n){if(!mie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function XO(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=WO([r,n]),l,u,c,f,h;s?(l=0,u=WS,c=Y1):r{"use strict";hb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};hb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};hb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};hb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};hb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};hb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var Tie=ye(db=>{"use strict";var ZO=n3().mod;db.segmentsIntersect=wie;function wie(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,h=a-t,d=s-a,v=l*d-c*f;if(v===0)return null;var _=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||_<0||_>1?null:{x:e+l*_,y:t+f*_}}db.segmentDistance=function(t,r,n,i,a,o,s,l){if(wie(t,r,n,i,a,o,s,l))return 0;var u=n-t,c=i-r,f=s-a,h=l-o,d=u*u+c*c,v=f*f+h*h,_=Math.min(D6(u,c,d,a-t,o-r),D6(u,c,d,s-t,l-r),D6(f,h,v,t-a,r-o),D6(f,h,v,n-a,i-o));return Math.sqrt(_)};function D6(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}else{var l=n*t-i*e;return l*l/r}}var F6,YO,bie;db.getTextLocation=function(t,r,n,i){if((t!==YO||i!==bie)&&(F6={},YO=t,bie=i),F6[n])return F6[n];var a=t.getPointAtLength(ZO(n-i/2,r)),o=t.getPointAtLength(ZO(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(ZO(n,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return F6[n]=f,f};db.clearLocationCache=function(){YO=null};db.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(_){var b=t.getPointAtLength(_);_===0?f=b:_===u&&(h=b);var p=b.xa?b.x-a:0,k=b.ys?b.y-s:0;return Math.sqrt(p*p+k*k)}for(var v=d(l);v;){if(l+=v+n,l>c)return;v=d(l)}for(v=d(c);v;){if(c-=v+n,l>c)return;v=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};db.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,u=0,c=0,f=a,h,d,v;u0?f=h:c=h,u++}return d}});var z6=ye(XS=>{"use strict";var by={};XS.throttle=function(t,r,n){var i=by[t],a=Date.now();if(!i){for(var o in by)by[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};XS.done=function(e){var t=by[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};XS.clear=function(e){if(e)Aie(by[e]),delete by[e];else for(var t in by)XS.clear(t)};function Aie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Mie=ye((zir,Sie)=>{"use strict";Sie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Eie=ye((Oir,O6)=>{"use strict";O6.exports=KO;O6.exports.isMobile=KO;O6.exports.default=KO;var Xit=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,Zit=/CrOS/,Yit=/android|ipad|playbook|silk/i;function KO(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=Xit.test(t)&&!Zit.test(t)||!!e.tablet&&Yit.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Cie=ye((qir,kie)=>{"use strict";var Kit=Eo(),Jit=Eie();kie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=$it(),typeof r!="string")return!0;var n=Jit({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(" "),a=1;a-1;s--){var l=i[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(Kit(u)&&(u=+u),u>=13)return!0}}}return n};function $it(){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 Pie=ye((Bir,Lie)=>{"use strict";var Qit=Oa();Lie.exports=function(t,r,n){var i=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(o){o[0][a]=Qit.select(this)}),i}});var Rie=ye((Nir,Iie)=>{"use strict";var ent=qa();Iie.exports=function(t,r){for(var n=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=ent.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var JO=ye((Uir,Die)=>{"use strict";Die.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";Fie.exports=function(t){for(var r=int(t)?rnt:tnt,n=[],i=0;i{"use strict";Oie.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),i=n>1?(n*t+n*r)/n:t+r,a=String(i).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(i).toPrecision(12);l.indexOf("e+")===-1&&(i=+l)}}return i}});var Nie=ye((Hir,Bie)=>{"use strict";var nnt=Eo(),ant=fs().BADNUM,ont=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Bie.exports=function(t){return typeof t=="string"&&(t=t.replace(ont,"")),nnt(t)?Number(t):ant}});var Dr=ye((jir,Qie)=>{"use strict";var ZS=Oa(),snt=r3().utcFormat,lnt=wO().format,Wie=Eo(),Xie=fs(),Zie=Xie.FP_SAFE,unt=-Zie,Uie=Xie.BADNUM,Mi=Qie.exports={};Mi.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:t==="0.f"?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var Vie={};Mi.warnBadFormat=function(e){var t=String(e);Vie[t]||(Vie[t]=1,Mi.warn('encountered bad format: "'+t+'"'))};Mi.noFormat=function(e){return String(e)};Mi.numberFormat=function(e){var t;try{t=lnt(Mi.adjustFormat(e))}catch(r){return Mi.warnBadFormat(e),Mi.noFormat}return t};Mi.nestedProperty=PS();Mi.keyedContainer=Dee();Mi.relativeAttr=zee();Mi.isPlainObject=my();Mi.toLogRange=m6();Mi.relinkPrivateKeys=Nee();var K1=vv();Mi.isArrayBuffer=K1.isArrayBuffer;Mi.isTypedArray=K1.isTypedArray;Mi.isArrayOrTypedArray=K1.isArrayOrTypedArray;Mi.isArray1D=K1.isArray1D;Mi.ensureArray=K1.ensureArray;Mi.concat=K1.concat;Mi.maxRowLength=K1.maxRowLength;Mi.minRowLength=K1.minRowLength;var Yie=n3();Mi.mod=Yie.mod;Mi.modHalf=Yie.modHalf;var J1=ate();Mi.valObjectMeta=J1.valObjectMeta;Mi.coerce=J1.coerce;Mi.coerce2=J1.coerce2;Mi.coerceFont=J1.coerceFont;Mi.coercePattern=J1.coercePattern;Mi.coerceHoverinfo=J1.coerceHoverinfo;Mi.coerceSelectionMarkerOpacity=J1.coerceSelectionMarkerOpacity;Mi.validate=J1.validate;var jp=fie();Mi.dateTime2ms=jp.dateTime2ms;Mi.isDateTime=jp.isDateTime;Mi.ms2DateTime=jp.ms2DateTime;Mi.ms2DateTimeLocal=jp.ms2DateTimeLocal;Mi.cleanDate=jp.cleanDate;Mi.isJSDate=jp.isJSDate;Mi.formatDate=jp.formatDate;Mi.incrementMonth=jp.incrementMonth;Mi.dateTick0=jp.dateTick0;Mi.dfltRange=jp.dfltRange;Mi.findExactDates=jp.findExactDates;Mi.MIN_MS=jp.MIN_MS;Mi.MAX_MS=jp.MAX_MS;var vb=R6();Mi.findBin=vb.findBin;Mi.sorterAsc=vb.sorterAsc;Mi.sorterDes=vb.sorterDes;Mi.distinctVals=vb.distinctVals;Mi.roundUp=vb.roundUp;Mi.sort=vb.sort;Mi.findIndexOfMin=vb.findIndexOfMin;Mi.sortObjectKeys=Z1();var wy=vie();Mi.aggNums=wy.aggNums;Mi.len=wy.len;Mi.mean=wy.mean;Mi.geometricMean=wy.geometricMean;Mi.median=wy.median;Mi.midRange=wy.midRange;Mi.variance=wy.variance;Mi.stdev=wy.stdev;Mi.interp=wy.interp;var xg=T6();Mi.init2dArray=xg.init2dArray;Mi.transposeRagged=xg.transposeRagged;Mi.dot=xg.dot;Mi.translationMatrix=xg.translationMatrix;Mi.rotationMatrix=xg.rotationMatrix;Mi.rotationXYMatrix=xg.rotationXYMatrix;Mi.apply3DTransform=xg.apply3DTransform;Mi.apply2DTransform=xg.apply2DTransform;Mi.apply2DTransform2=xg.apply2DTransform2;Mi.convertCssMatrix=xg.convertCssMatrix;Mi.inverseTransformMatrix=xg.inverseTransformMatrix;var vm=_ie();Mi.deg2rad=vm.deg2rad;Mi.rad2deg=vm.rad2deg;Mi.angleDelta=vm.angleDelta;Mi.angleDist=vm.angleDist;Mi.isFullCircle=vm.isFullCircle;Mi.isAngleInsideSector=vm.isAngleInsideSector;Mi.isPtInsideSector=vm.isPtInsideSector;Mi.pathArc=vm.pathArc;Mi.pathSector=vm.pathSector;Mi.pathAnnulus=vm.pathAnnulus;var g3=xie();Mi.isLeftAnchor=g3.isLeftAnchor;Mi.isCenterAnchor=g3.isCenterAnchor;Mi.isRightAnchor=g3.isRightAnchor;Mi.isTopAnchor=g3.isTopAnchor;Mi.isMiddleAnchor=g3.isMiddleAnchor;Mi.isBottomAnchor=g3.isBottomAnchor;var m3=Tie();Mi.segmentsIntersect=m3.segmentsIntersect;Mi.segmentDistance=m3.segmentDistance;Mi.getTextLocation=m3.getTextLocation;Mi.clearLocationCache=m3.clearLocationCache;Mi.getVisibleSegment=m3.getVisibleSegment;Mi.findPointOnPath=m3.findPointOnPath;var N6=Ao();Mi.extendFlat=N6.extendFlat;Mi.extendDeep=N6.extendDeep;Mi.extendDeepAll=N6.extendDeepAll;Mi.extendDeepNoArrays=N6.extendDeepNoArrays;var $O=G1();Mi.log=$O.log;Mi.warn=$O.warn;Mi.error=$O.error;var cnt=o3();Mi.counterRegex=cnt.counter;var QO=z6();Mi.throttle=QO.throttle;Mi.throttleDone=QO.done;Mi.clearThrottle=QO.clear;var bg=NS();Mi.getGraphDiv=bg.getGraphDiv;Mi.isPlotDiv=bg.isPlotDiv;Mi.removeElement=bg.removeElement;Mi.addStyleRule=bg.addStyleRule;Mi.addRelatedStyleRule=bg.addRelatedStyleRule;Mi.deleteRelatedStyleRule=bg.deleteRelatedStyleRule;Mi.setStyleOnHover=bg.setStyleOnHover;Mi.getFullTransformMatrix=bg.getFullTransformMatrix;Mi.getElementTransformMatrix=bg.getElementTransformMatrix;Mi.getElementAndAncestors=bg.getElementAndAncestors;Mi.equalDomRects=bg.equalDomRects;Mi.clearResponsive=Mie();Mi.preserveDrawingBuffer=Cie();Mi.makeTraceGroups=Pie();Mi._=Rie();Mi.notifier=RO();Mi.filterUnique=JO();Mi.filterVisible=zie();Mi.pushUnique=zO();Mi.increment=qie();Mi.cleanNumber=Nie();Mi.ensureNumber=function(t){return Wie(t)?(t=Number(t),t>Zie||t=t?!1:Wie(e)&&e>=0&&e%1===0};Mi.noop=w6();Mi.identity=HS();Mi.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Mi.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};Mi.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(Mi.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};Mi.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Mi.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,i=2*t-1,a=new Array(i),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*a[l];o[s]=c}return o};Mi.syncOrAsync=function(e,t,r){var n,i;function a(){return Mi.syncOrAsync(e,t,r)}for(;e.length;)if(i=e.splice(0,1)[0],n=i(t),n&&n.then)return n.then(a);return r&&r(t)};Mi.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Mi.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};Mi.fillArray=function(e,t,r,n){if(n=n||Mi.identity,Mi.isArrayOrTypedArray(e))for(var i=0;idnt.test(window.navigator.userAgent);var vnt=/Firefox\/(\d+)\.\d+/;Mi.getFirefoxVersion=function(){var e=vnt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Mi.isD3Selection=function(e){return e instanceof ZS.selection};Mi.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?"."+r:""));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a};Mi.ensureSingleById=function(e,t,r,n){var i=e.select(t+"#"+r);if(i.size())return i;var a=e.append(t).attr("id",r);return n&&a.call(n),a};Mi.objectFromPath=function(e,t){for(var r=e.split("."),n,i=n={},a=0;a1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l};Mi.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var $ie=/^\w*$/;Mi.templateString=function(e,t){var r={};return e.replace(Mi.TEMPLATE_STRING_REGEX,function(n,i){var a;return $ie.test(i)?a=t[i]:(r[i]=r[i]||Mi.nestedProperty(t,i).get,a=r[i](!0)),a!==void 0?a:""})};var mnt={max:10,count:0,name:"hovertemplate"};Mi.hovertemplateString=e=>eq(q1(mg({},e),{opts:mnt}));var ynt={max:10,count:0,name:"texttemplate"};Mi.texttemplateString=e=>eq(q1(mg({},e),{opts:ynt}));var _nt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function xnt(e){var t=e.match(_nt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var bnt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Mi.texttemplateStringForShapes=e=>eq(q1(mg({},e),{opts:bnt}));var Gie=/^[:|\|]/;function eq({data:e=[],locale:t,fallback:r,labels:n={},opts:i,template:a}){return a.replace(Mi.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let v=null,_=null;if(i.parseMultDiv){var b=xnt(s);s=b.key,v=b.op,_=b.number}let p;if(d){if(n[s]===void 0)return"";p=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){p=L[s];break}if($ie.test(s)||(p=Mi.nestedProperty(L,s).get(!0)),p!==void 0)break}if(p===void 0){let{count:L,max:x,name:C}=i,M=r===!1?o:r;return L=B6&&o<=Hie,u=s>=B6&&s<=Hie;if(l&&(n=10*n+o-B6),u&&(i=10*i+s-B6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var p3=2e9;Mi.seedPseudoRandom=function(){p3=2e9};Mi.pseudoRandom=function(){var e=p3;return p3=(69069*p3+1)%4294967296,Math.abs(p3-e)<429496729?Mi.pseudoRandom():p3/4294967296};Mi.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=Mi.extractOption(e,t,"htx","hovertext");if(Mi.isValidTextValue(i))return n(i);var a=Mi.extractOption(e,t,"tx","text");if(Mi.isValidTextValue(a))return n(a)};Mi.isValidTextValue=function(e){return e||e===0};Mi.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Mi.strTranslate(i-u*(r+o),a-u*(n+s))+Mi.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Mi.setTransormAndDisplay=function(e,t){e.attr("transform",Mi.getTextTransform(t)),e.style("display",t.scale?null:"none")};Mi.ensureUniformFontSize=function(e,t){var r=Mi.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Mi.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Mi.bigFont=function(e){return Math.round(1.2*e)};var jie=Mi.getFirefoxVersion(),wnt=jie!==null&&jie<86;Mi.getPositionFromD3Event=function(){return wnt?[ZS.event.layerX,ZS.event.layerY]:[ZS.event.offsetX,ZS.event.offsetY]}});var rne=ye(()=>{"use strict";var Tnt=Dr(),ene={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(tq in ene)tne=tq.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Tnt.addStyleRule(tne,ene[tq]);var tne,tq});var rq=ye((Yir,ine)=>{ine.exports=!0});var nq=ye((Kir,nne)=>{"use strict";var Ant=rq(),iq;typeof window.matchMedia=="function"?iq=!window.matchMedia("(hover: none)").matches:iq=Ant;nne.exports=iq});var pb=ye((Jir,aq)=>{"use strict";var y3=typeof Reflect=="object"?Reflect:null,ane=y3&&typeof y3.apply=="function"?y3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},U6;y3&&typeof y3.ownKeys=="function"?U6=y3.ownKeys:Object.getOwnPropertySymbols?U6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:U6=function(t){return Object.getOwnPropertyNames(t)};function Snt(e){console&&console.warn&&console.warn(e)}var sne=Number.isNaN||function(t){return t!==t};function Jc(){Jc.init.call(this)}aq.exports=Jc;aq.exports.once=Cnt;Jc.EventEmitter=Jc;Jc.prototype._events=void 0;Jc.prototype._eventsCount=0;Jc.prototype._maxListeners=void 0;var one=10;function V6(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Jc,"defaultMaxListeners",{enumerable:!0,get:function(){return one},set:function(e){if(typeof e!="number"||e<0||sne(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");one=e}});Jc.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Jc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||sne(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 lne(e){return e._maxListeners===void 0?Jc.defaultMaxListeners:e._maxListeners}Jc.prototype.getMaxListeners=function(){return lne(this)};Jc.prototype.emit=function(t){for(var r=[],n=1;n0&&(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")ane(l,this,r);else for(var u=l.length,c=dne(l,u),n=0;n0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Snt(s)}return e}Jc.prototype.addListener=function(t,r){return une(this,t,r,!1)};Jc.prototype.on=Jc.prototype.addListener;Jc.prototype.prependListener=function(t,r){return une(this,t,r,!0)};function Mnt(){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 cne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Mnt.bind(n);return i.listener=r,n.wrapFn=i,i}Jc.prototype.once=function(t,r){return V6(r),this.on(t,cne(this,t,r)),this};Jc.prototype.prependOnceListener=function(t,r){return V6(r),this.prependListener(t,cne(this,t,r)),this};Jc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(V6(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():Ent(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Jc.prototype.off=Jc.prototype.removeListener;Jc.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i=0;i--)this.removeListener(t,r[i]);return this};function fne(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?knt(i):dne(i,i.length)}Jc.prototype.listeners=function(t){return fne(this,t,!0)};Jc.prototype.rawListeners=function(t){return fne(this,t,!1)};Jc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):hne.call(e,t)};Jc.prototype.listenerCount=hne;function hne(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Jc.prototype.eventNames=function(){return this._eventsCount>0?U6(this._events):[]};function dne(e,t){for(var r=new Array(t),n=0;n{"use strict";var oq=pb().EventEmitter,Pnt={init:function(e){if(e._ev instanceof oq)return e;var t=new oq,r=new oq;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){t.emit(n,i),r.emit(n,i)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(l){if(l.listener){if(i.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(i,[r])}else return l.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var gne=Dr(),Int=cb().dfltConfig;function Rnt(e,t){for(var r=[],n,i=0;iInt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Ty.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Ty.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Ty.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";_ne.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var w3=ye(Jh=>{"use strict";var _0=qa(),YS=Dr(),H6=Gl(),lq=c3(),Dnt=sq(),Fnt=US(),znt=cb().configAttributes,xne=mc(),wg=YS.extendDeepAll,x3=YS.isPlainObject,Ont=YS.isArrayOrTypedArray,j6=YS.nestedProperty,qnt=YS.valObjectMeta,uq="_isSubplotObj",W6="_isLinkedToArray",Bnt="_arrayAttrRegexps",wne="_deprecated",cq=[uq,W6,Bnt,wne];Jh.IS_SUBPLOT_OBJ=uq;Jh.IS_LINKED_TO_ARRAY=W6;Jh.DEPRECATED=wne;Jh.UNDERSCORE_ATTRS=cq;Jh.get=function(){var e={};return _0.allTypes.forEach(function(t){e[t]=Unt(t)}),{defs:{valObjects:qnt,metaKeys:cq.concat(["description","role","editType","impliedEdits"]),editType:{traces:xne.traces,layout:xne.layout},impliedEdits:{}},traces:e,layout:Vnt(),frames:Gnt(),animation:b3(Fnt),config:b3(znt)}};Jh.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(cq.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!Jh.isValObject(o)&&x3(o)&&a!=="impliedEdits"&&Jh.crawl(o,t,i+1,s)}})};Jh.isValObject=function(e){return e&&e.valType!==void 0};Jh.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(i,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)Ont(f)&&t.push(a+h);else if(n[u]){if(Array.isArray(f))for(var d=0;d=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!G6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function G6(e){return e===Math.round(e)&&e>=0}function Unt(e){var t,r;t=_0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=wg({},H6),a=wg({},t.attributes);Jh.crawl(a,function(l,u,c,f,h){j6(i,h).set(void 0),l===void 0&&j6(a,h).set(void 0)}),wg(n,i),_0.traceIs(e,"noOpacity")&&delete n.opacity,_0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),_0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,wg(n,a),r.attributes&&wg(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:b3(n)};if(t.layoutAttributes){var s={};wg(s,t.layoutAttributes),o.layoutAttributes=b3(s)}return t.animatable||Jh.crawl(o,function(l){Jh.isValObject(l)&&"anim"in l&&delete l.anim}),o}function Vnt(){var e={},t,r;wg(e,lq);for(t in _0.subplotsRegistry)if(r=_0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var T3=Dr(),Znt=Gl(),$1="templateitemname",fq={name:{valType:"string",editType:"none"}};fq[$1]={valType:"string",editType:"calc"};gb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=fq.name,t[$1]=fq[$1],t};gb.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function i(a){r=T3.coerce(a,{},Znt,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:i}};gb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);T3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};gb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Sne(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[$1]=u[$1];if(!Ane(f))return c._template=i,c;for(var h=0;h=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function l(){s={},a&&(s[o]={},s[o][$1]=a)}l();function u(d,v){s[d]=v}function c(d,v){a?T3.nestedProperty(s[o],d).set(v):s[o+"."+d]=v}function f(){var d=s;return l(),d}function h(d,v){d&&c(d,v);var _=f();for(var b in _)T3.nestedProperty(e,b).set(_[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var hd=ye((inr,Mne)=>{"use strict";var KS=o3().counter;Mne.exports={idRegex:{x:KS("x","( domain)?"),y:KS("y","( domain)?")},attrRegex:KS("[xy]axis"),xAxisMatch:KS("xaxis"),yAxisMatch:KS("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}});var hf=ye(Ap=>{"use strict";var Ynt=qa(),hq=hd();Ap.id2name=function(t){if(!(typeof t!="string"||!t.match(hq.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Ap.name2id=function(t){if(t.match(hq.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Ap.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(hq.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Ap.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Ap.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Ap.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Ene(e,t){if(t&&t.length){for(var r=0;r{"use strict";function Knt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function Jnt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}kne.exports={clearOutlineControllers:Knt,clearOutline:Jnt}});var X6=ye((onr,Cne)=>{"use strict";Cne.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Id=ye(Y6=>{"use strict";var Z6=qa(),snr=hd().SUBPLOT_PATTERN;Y6.getSubplotCalcData=function(e,t,r){var n=Z6.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var $nt=qa(),A3=Dr();mb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=mb.hasSimpleAPICommandBindings(e,r,i.lookupTable);if(t&&t._commandObserver){if(o)return i;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,i}if(o){Lne(e,o,i.cache),i.check=function(){if(a){var c=Lne(e,o,i.cache);return c.changed&&n&&i.lookupTable[c.value]!==void 0&&(i.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[c.value]})).then(i.enable,i.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+i;A3.isPlainObject(a)?dq(a,t,o,n+1):t(o,i,a)}})}});var Mc=ye((cnr,Xne)=>{"use strict";var Nne=Oa(),eat=r3().timeFormatLocale,tat=wO().formatLocale,JS=Eo(),rat=TO(),Xl=qa(),Une=w3(),iat=vl(),Ga=Dr(),Vne=ka(),Dne=fs().BADNUM,Sp=hf(),nat=Q1().clearOutline,aat=X6(),vq=US(),oat=sq(),sat=Id().getModuleCalcData,Fne=Ga.relinkPrivateKeys,yb=Ga._,xa=Xne.exports={};Ga.extendFlat(xa,Xl);xa.attributes=Gl();xa.attributes.type.values=xa.allTypes;xa.fontAttrs=ec();xa.layoutAttributes=c3();var J6=Rne();xa.executeAPICommand=J6.executeAPICommand;xa.computeAPICommandBindings=J6.computeAPICommandBindings;xa.manageCommandObserver=J6.manageCommandObserver;xa.hasSimpleAPICommandBindings=J6.hasSimpleAPICommandBindings;xa.redrawText=function(e){return e=Ga.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Xl.getComponentMethod("annotations","draw")(e),Xl.getComponentMethod("legend","draw")(e),Xl.getComponentMethod("colorbar","draw")(e),t(xa.previousPromises(e)))},300)})};xa.resize=function(e){e=Ga.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Ga.isHidden(e))&&i(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ga.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Xl.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};xa.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};xa.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Ga.ensureSingle(t._paper,"text","js-plot-link-container",function(l){l.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Vne.defaultLine,"pointer-events":"all"}).each(function(){var u=Nne.select(this);u.append("tspan").classed("js-link-to-tool",!0),u.append("tspan").classed("js-link-spacer",!0),u.append("tspan").classed("js-sourcelinks",!0)})}),n=r.node(),i={y:t._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var a=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&lat(e,a),o.text(a.text()&&s.text()?" - ":"")}};function lat(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)r.on("click",function(){xa.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}xa.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Nne.select(e).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"}),i=n.append("input").attr({type:"text",name:"data"});return i.node().value=xa.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var uat=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],cat=["year","month","dayMonth","dayMonthYear"];xa.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||xa.createTransitionData(e),i._dfltTitle={plot:yb(e,"Click to enter Plot title"),subtitle:yb(e,"Click to enter Plot subtitle"),x:yb(e,"Click to enter X axis title"),y:yb(e,"Click to enter Y axis title"),colorbar:yb(e,"Click to enter Colorscale title"),annotation:yb(e,"new text")},i._traceWord=yb(e,"trace");var h=zne(e,uat);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;xa.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),xa.sanitizeMargins(i)}else{xa.supplyLayoutGlobalDefaults(a,i,h);var _=!a.width||!a.height,b=i.autosize,p=c.autosizable,k=_&&(b||p);k?xa.plotAutoSize(e,a,i):_&&xa.sanitizeMargins(i),!b&&_&&(a.width=i.width,a.height=i.height)}i._d3locale=dat(h,i.separators),i._extraFormat=zne(e,cat),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var E=i._subplots=hat(),S=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=fat(o,l),xa.supplyDataDefaults(l,s,a,i);var x=Object.keys(S.x),C=Object.keys(S.y);if(x.length>1&&C.length>1){for(Xl.getComponentMethod("grid","sizeDefaults")(a,i),f=0;f15&&C.length>15&&i.shapes.length===0&&i.images.length===0,xa.linkSubplots(s,i,o,n),xa.cleanPlot(s,i,o,n);var z=!!(n._has&&n._has("cartesian")),O=!!(i._has&&i._has("cartesian")),V=z,G=O;V&&!G?n._bgLayer.remove():G&&!V&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&nat({_fullLayout:n}),vat(s,i),Fne(i,n),Xl.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var Z=i._tracePreGUI,j={},N;for(N in Z)j[N]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=xa.layoutAttributes.width.min,h=xa.layoutAttributes.height.min;o1,v=!r.height&&Math.abs(n.height-s)>1;(v||d)&&(d&&(n.width=o),v&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),xa.sanitizeMargins(n)};xa.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Xl.componentsRegistry,a=t._basePlotModules,o,s,l,u=Xl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Xl.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ga.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var p=(r.t+r.b)/h;p>1&&(r.t/=p,r.b/=p)}var k=r.xl!==void 0?r.xl:r.x,E=r.xr!==void 0?r.xr:r.x,S=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:k,size:r.l+_},r:{val:E,size:r.r+_},b:{val:L,size:r.b+_},t:{val:S,size:r.t+_}},v[t]=1}if(!n._replotting)return xa.doAutoMargin(e)}};function gat(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Sp.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}xa.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Gne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ga.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,_=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var p=e._fullLayout._reservedMargin;for(var k in p)for(var E in p[k]){var S=p[k][E];o[E]=Math.max(o[E],S)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var x=0;for(var C in h)C!=="base"&&JS(h[C][L].size)&&(x=h[C][L].size>x?h[C][L].size:x);var M=Math.max(0,a[L]-x);o[L]=Math.max(0,o[L]-M)}for(var g in h){var P=h[g].l||{},T=h[g].b||{},z=P.val,O=P.size,V=T.val,G=T.size,Z=r-o.r-o.l,j=n-o.t-o.b;for(var N in h){if(JS(O)&&h[N].r){var H=h[N].r.val,te=h[N].r.size;if(H>z){var oe=(O*H+(te-Z)*z)/(H-z),_e=(te*(1-z)+(O-Z)*(1-H))/(H-z);oe+_e>l+u&&(l=oe,u=_e)}}if(JS(G)&&h[N].t){var Ee=h[N].t.val,Ce=h[N].t.size;if(Ee>V){var me=(G*Ee+(Ce-j)*V)/(Ee-V),ie=(Ce*(1-V)+(G-j)*(1-Ee))/(Ee-V);me+ie>f+c&&(f=me,c=ie)}}}}}var Se=Ga.constrain(r-a.l-a.r,Hne,v),Le=Ga.constrain(n-a.t-a.b,jne,_),Ae=Math.max(0,r-Se),Fe=Math.max(0,n-Le);if(Ae){var Pe=(l+u)/Ae;Pe>1&&(l/=Pe,u/=Pe)}if(Fe){var ge=(f+c)/Fe;ge>1&&(f/=ge,c/=ge)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(xa.didMarginChange(s,i)||gat(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Re=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};xa.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&xa.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Ga.isPlainObject(h)){var v={},_;return Object.keys(h).sort().forEach(function(E){if(["_","["].indexOf(E.charAt(0))===-1){if(typeof h[E]=="function"){d&&(v[E]="_function");return}if(r==="keepdata"){if(E.slice(-3)==="src")return}else if(r==="keepstream"){if(_=h[E+"src"],typeof _=="string"&&_.indexOf(":")>0&&!Ga.isPlainObject(h.stream))return}else if(r!=="keepall"&&(_=h[E+"src"],typeof _=="string"&&_.indexOf(":")>0))return;v[E]=u(h[E],d)}}),v}var b=Array.isArray(h),p=Ga.isTypedArray(h);if((b||p)&&h.dtype&&h.shape){var k=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Ga.isArrayBuffer(k)?rat.encode(k):k},d)}return b?h.map(function(E){return u(E,d)}):p?Ga.simpleMap(h,Ga.identity):Ga.isJSDate(h)?Ga.ms2DateTimeLocal(+h):h}var c={data:(o||[]).map(function(h){var d=u(h);return t&&delete d.fit,d})};if(!t&&(c.layout=u(s),i)){var f=s._size;c.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(c.frames=u(l)),a&&(c.config=u(e._context,!0)),n==="object"?c:JSON.stringify(c)};xa.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xl.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function v(){return h++,function(){d++,!n&&d===h&&s(f)}}r.runFn(v),setTimeout(v())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Xl.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[xa.previousPromises,l,r.prepareFn,xa.rehover,xa.reselect,o],c=Ga.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}xa.doCalcdata=function(e,t){var r=Sp.list(e),n=e._fullData,i=e._fullLayout,a,o,s,l,u=new Array(n.length),c=(e.calcdata||[]).slice();for(e.calcdata=u,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s=0;l--)if(L[l].enabled){a._indexToPoints=L[l]._indexToPoints;break}o&&o.calc&&(S=o.calc(e,a))}(!Array.isArray(S)||!S[0])&&(S=[{x:Dne,y:Dne}]),S[0].t||(S[0].t={}),S[0].trace=a,u[k]=S}}for(qne(r,n,i),s=0;s{"use strict";_b.xmlns="http://www.w3.org/2000/xmlns/";_b.svg="http://www.w3.org/2000/svg";_b.xlink="http://www.w3.org/1999/xlink";_b.svgAttrs={xmlns:_b.svg,"xmlns:xlink":_b.xlink}});var $h=ye((hnr,Zne)=>{"use strict";Zne.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}});var ru=ye(x0=>{"use strict";var Ph=Oa(),Ay=Dr(),xat=Ay.strTranslate,pq=Wp(),bat=$h().LINE_SPACING,wat=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;x0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(wat),a=Ph.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=Fat(e.node(),n);l&&e.style("pointer-events","all"),x0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};Mat(i[2],c,function(f,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=f&&f.select("svg");if(!v||!v.node()){s(),l();return}var _=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});_.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,p=d.height;v.attr({class:o,height:p,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",E=v.select("g");E.attr({fill:k,stroke:k});var S=E.node().getBoundingClientRect(),L=S.width,x=S.height;(L>b||x>p)&&(v.style("overflow","hidden"),S=v.node().getBoundingClientRect(),L=S.width,x=S.height);var C=+e.attr("x"),M=+e.attr("y"),g=u||e.node().getBoundingClientRect().height,P=-g/4;if(o[0]==="y")_.attr({transform:"rotate("+[-90,C,M]+")"+xat(-L/2,P-x/2)});else if(o[0]==="l")M=P-x/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,M=P;else{var T=e.attr("text-anchor");C=C-L*(T==="middle"?.5:T==="end"?1:0),M=M+P-x/2}v.attr({x:C,y:M}),r&&r.call(e,_),l(_)})})):s(),e};var Tat=/(<|<|<)/g,Aat=/(>|>|>)/g;function Sat(e){return e.replace(Tat,"\\lt ").replace(Aat,"\\gt ")}var Yne=[["$","$"],["\\(","\\)"]];function Mat(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Ay.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,l=function(){return a=Ay.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:Yne},displayAlign:"left"})},u=function(){a=Ay.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=Yne},c=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},f=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var k="math-output-"+Ay.randstr({},64);s=Ph.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Sat(e));var E=s.node();return n===2?MathJax.Hub.Typeset(E):MathJax.typeset([E])},d=function(){var k=s.select(n===2?".MathJax_SVG":".MathJax"),E=!k.empty()&&s.select("svg").node();if(!E)Ay.log("There was an error in the tex syntax.",e),r();else{var S=E.getBoundingClientRect(),L;n===2?L=Ph.select("body").select("#MathJax_SVG_glyphs"):L=k.select("defs"),r(k,L,S)}s.remove()},v=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},_=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},p=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(l,c,h,d,v,b):n===3&&(u(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),_(),p()}))}var Qne={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"},Eat={sub:"0.3em",sup:"-0.6em"},kat={sub:"-0.21em",sup:"0.42em"},Kne="\u200B",Jne=["http:","https:","mailto:","",void 0,":"],eae=x0.NEWLINES=/(\r\n?|\n)/g,mq=/(<[^<>]*>)/,yq=/<(\/?)([^ >]*)(\s+(.*))?>/i,Cat=//i;x0.BR_TAG_ALL=//gi;var tae=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,rae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,iae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,Lat=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function xb(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&$6(n)}var Pat=/(^|;)\s*color:/;x0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(mq),s=[],l="",u=0,c=0;ca?s.push(f.slice(0,Math.max(0,_-a))+i):s.push(f.slice(0,_));break}l=""}}return s.join("")};var Iat={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Rat=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function $6(e){return e.replace(Rat,function(t,r){var n;return r.charAt(0)==="#"?n=Dat(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=Iat[r],n||t})}x0.convertEntities=$6;function Dat(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 Fat(e,t){t=t.replace(eae," ");var r=!1,n=[],i,a=-1;function o(){a++;var x=document.createElementNS(pq.svg,"tspan");Ph.select(x).attr({class:"line",dy:a*bat+"em"}),e.appendChild(x),i=x;var C=n;if(n=[{node:x}],C.length>1)for(var M=1;M.",t);return}var C=n.pop();x!==C.type&&Ay.log("Start tag <"+C.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),i=n[n.length-1].node}var c=Cat.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(mq),h=0;h{"use strict";var zat=Oa(),eL=cd(),QS=Eo(),Q6=Dr(),aae=ka(),Oat=lb().isValid;function qat(e,t,r){var n=t?Q6.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(Q6.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function fae(e,t){t=t||{};for(var r=e.domain,n=e.range,i=n.length,a=new Array(i),o=0;o{"use strict";var dae=NO(),Nat=dae.FORMAT_LINK,Uat=dae.DATE_FORMAT_LINK;function Vat(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?_q:vae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function _q(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: "+Nat+"."].join(" ")}function vae(e,t){return _q(e,t)+[" And for dates see: "+Uat+".","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(" ")}pae.exports={axisHoverFormat:Vat,descriptionOnlyNumbers:_q,descriptionWithDates:vae}});var Rd=ye((mnr,Iae)=>{"use strict";var gae=ec(),S3=Lh(),Pae=Pd().dash,bq=Ao().extendFlat,mae=vl().templatedArray,gnr=Ll().templateFormatStringDescription,yae=df().descriptionWithDates,Gat=fs().ONEDAY,pm=hd(),Hat=pm.HOUR_PATTERN,jat=pm.WEEKDAY_PATTERN,xq={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},Wat=bq({},xq,{values:xq.values.slice().concat(["sync"])});function _ae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var xae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},bae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},wae={valType:"data_array",editType:"ticks"},Tae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Aae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Sae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Mae={valType:"color",dflt:S3.defaultLine,editType:"ticks"},Eae={valType:"color",dflt:S3.lightLine,editType:"ticks"};function kae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Cae=bq({},Pae,{editType:"ticks"}),Lae={valType:"boolean",editType:"ticks"};Iae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:S3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:gae({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[pm.idRegex.x.toString(),pm.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:[pm.idRegex.x.toString(),pm.idRegex.y.toString()],editType:"calc"},rangebreaks:mae("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:[jat,Hat,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:Gat},editType:"calc"}),tickmode:Wat,nticks:_ae(),tick0:xae,dtick:bae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:wae,ticktext:{valType:"data_array",editType:"ticks"},ticks:Tae,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:Aae(),tickwidth:Sae(),tickcolor:Mae,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:bq({},Pae,{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:gae({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:yae("tick label")},tickformatstops:mae("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:yae("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:S3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:Lae,gridcolor:Eae,gridwidth:kae(),griddash:Cae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:S3.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:S3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",pm.idRegex.x.toString(),pm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",pm.idRegex.x.toString(),pm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:xq,nticks:_ae("minor"),tick0:xae,dtick:bae,tickvals:wae,ticks:Tae,ticklen:Aae("minor"),tickwidth:Sae("minor"),tickcolor:Mae,gridcolor:Eae,gridwidth:kae("minor"),griddash:Cae,showgrid:Lae,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var tL=ye((ynr,Fae)=>{"use strict";var $c=Rd(),Rae=ec(),Dae=Ao().extendFlat,Xat=mc().overrideAll;Fae.exports=Xat({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:$c.linecolor,outlinewidth:$c.linewidth,bordercolor:$c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:$c.minor.tickmode,nticks:$c.nticks,tick0:$c.tick0,dtick:$c.dtick,tickvals:$c.tickvals,ticktext:$c.ticktext,ticks:Dae({},$c.ticks,{dflt:""}),ticklabeloverflow:Dae({},$c.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:$c.ticklen,tickwidth:$c.tickwidth,tickcolor:$c.tickcolor,ticklabelstep:$c.ticklabelstep,showticklabels:$c.showticklabels,labelalias:$c.labelalias,tickfont:Rae({}),tickangle:$c.tickangle,tickformat:$c.tickformat,tickformatstops:$c.tickformatstops,tickprefix:$c.tickprefix,showtickprefix:$c.showtickprefix,ticksuffix:$c.ticksuffix,showticksuffix:$c.showticksuffix,separatethousands:$c.separatethousands,exponentformat:$c.exponentformat,minexponent:$c.minexponent,showexponent:$c.showexponent,title:{text:{valType:"string"},font:Rae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Tu=ye((xnr,Oae)=>{"use strict";var Zat=tL(),Yat=o3().counter,Kat=Z1(),zae=lb().scales,_nr=Kat(zae);function rL(e){return"`"+e+"`"}Oae.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?zae[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+rL(u+c));var h=i?" Has an effect only if "+f+" is set to a numerical array.":"",d=n+"auto",v=n+"min",_=n+"max",b=n+"mid",p=rL(u+d),k=rL(u+v),E=rL(u+_),S=k+" and "+E,L={};L[v]=L[_]=void 0;var x={};x[d]=!1;var C={};return c==="color"&&(C.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[_]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},C.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},a||(C.showscale={valType:"boolean",dflt:o,editType:"calc"},C.colorbar=Zat),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:Yat("coloraxis"),dflt:null,editType:"calc"}),C}});var Tq=ye((bnr,qae)=>{"use strict";var Jat=Ao().extendFlat,$at=Tu(),wq=lb().scales;qae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:wq.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:wq.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:wq.RdBu,editType:"calc"}},coloraxis:Jat({_isSubplotObj:!0,editType:"calc"},$at("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var Aq=ye((wnr,Bae)=>{"use strict";var Qat=Dr();Bae.exports=function(t){return Qat.isPlainObject(t.colorbar)}});var Eq=ye(Mq=>{"use strict";var Sq=Eo(),Nae=Dr(),Uae=fs(),eot=Uae.ONEDAY,tot=Uae.ONEWEEK;Mq.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?eot:1;if(!e)return a;if(Sq(e))return e=Number(e),e<=0?a:i?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return a;var o=e.charAt(0),s=e.slice(1);return s=Sq(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?a:e};Mq.tick0=function(e,t,r,n){if(t==="date")return Nae.cleanDate(e,Nae.dateTick0(r,n%tot===0?1:0));if(!(n==="D1"||n==="D2"))return Sq(e)?Number(e):0}});var bb=ye((Anr,Gae)=>{"use strict";var Vae=Eq(),rot=Dr().isArrayOrTypedArray,iot=vv().isTypedArraySpec,not=vv().decodeTypedArraySpec;Gae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(k){var E=s[k];return iot(E)&&(E=not(E)),E!==void 0?E:(l._template||{})[k]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),v=rot(d)?"array":h?"linear":"auto",_=n(u+"tickmode",v);if(_==="auto"||_==="sync")n(u+"nticks");else if(_==="linear"){var b=l.dtick=Vae.dtick(h,i);l.tick0=Vae.tick0(f,i,r.calendar,b)}else if(i!=="multicategory"){var p=n(u+"tickvals");p===void 0?l.tickmode="auto":o||n("ticktext")}}});var M3=ye((Snr,jae)=>{"use strict";var kq=Dr(),Hae=Rd();jae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Hae.minor:Hae,u=a?"minor.":"",c=kq.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=kq.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=kq.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(u+"ticks",!a&&i.outerTicks||c||f||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var Cq=ye((Mnr,Wae)=>{"use strict";Wae.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Yd=ye((Enr,Xae)=>{"use strict";var iL=Dr(),aot=vl();Xae.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=iL.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=aot.arrayTemplater(r,i,a),c,f;for(c=0;c{"use strict";var Lq=Dr(),oot=ka().contrast,Zae=Rd(),sot=Cq(),lot=Yd();Yae.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");Lq.isPlainObject(o)||delete r.labelalias;var s=sot(t),l=n("showticklabels");if(l){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?oot(a.bgColor):c&&c!==Zae.color.dflt?c:u.color;if(Lq.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&n("ticklabelstep"),!a.noAng){var d=n("tickangle");!a.noAutotickangles&&d==="auto"&&n("autotickangles")}if(i!=="category"){var v=n("tickformat");lot(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:uot}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!a.noMinorloglabels&&i==="log"&&n("minorloglabels")}};function uot(e,t){function r(i,a){return Lq.coerce(e,t,Zae.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var t_=ye((Cnr,Kae)=>{"use strict";var cot=Cq();Kae.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=cot(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var Pq=ye((Lnr,Jae)=>{"use strict";var r_=Dr(),fot=vl(),hot=bb(),dot=M3(),vot=e_(),pot=t_(),got=tL();Jae.exports=function(t,r,n){var i=fot.newContainer(r,"colorbar"),a=t.colorbar||{};function o(T,z){return r_.coerce(a,i,got,T,z)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var d=o("lenmode");o("len",d==="fraction"?1:f?u:l);var v=o("yref"),_=o("xref"),b=v==="paper",p=_==="paper",k,E,S,L="left";f?(S="middle",L=p?"left":"right",k=p?1.02:1,E=.5):(S=b?"bottom":"top",L="center",k=.5,E=b?1.02:1),r_.coerce(a,i,{x:{valType:"number",min:p?-2:0,max:p?3:1,dflt:k}},"x"),r_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:E}},"y"),o("xanchor",L),o("xpad"),o("yanchor",S),o("ypad"),r_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=r_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),hot(a,i,o,"linear");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};x.indexOf("inside")!==-1&&(M.bgColor="black"),pot(a,i,o,"linear",M),vot(a,i,o,"linear",M),dot(a,i,o,"linear",M),o("title.text",n._dfltTitle.colorbar);var g=i.showticklabels?i.tickfont:C,P=r_.extendFlat({},C,{family:g.family,size:r_.bigFont(g.size)});r_.coerceFont(o,"title.font",P),o("title.side",f?"top":"right")}});var Qh=ye((Pnr,eoe)=>{"use strict";var $ae=Eo(),Rq=Dr(),mot=Aq(),yot=Pq(),Qae=lb().isValid,_ot=qa().traceIs;function Iq(e,t){var r=t.slice(0,t.length-1);return t?Rq.nestedProperty(e,r).get()||{}:e}eoe.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=Iq(t,o),c=Iq(r,o),f=Iq(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(l){var d=n._colorAxes||{},v=i(o+"coloraxis");if(v){var _=_ot(r,"contour")&&Rq.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[v];b?(b[2].push(h),b[0]!==_&&(b[0]=!1,Rq.warn(["Ignoring coloraxis:",v,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[v]=[_,r,[h]];return}}var p=u[s+"min"],k=u[s+"max"],E=$ae(p)&&$ae(k)&&p{"use strict";var toe=Dr(),xot=vl(),roe=Tq(),bot=Qh();ioe.exports=function(t,r){function n(f,h){return toe.coerce(t,r,roe,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(f,h){return toe.coerce(a,o,roe.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=xot.newContainer(r,l,"coloraxis"),o._name=l,bot(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var wot=Dr(),Tot=pv().hasColorscale,Aot=pv().extractOpts;aoe.exports=function(t,r){function n(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function i(c,f){var h=f.container?wot.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Aot(h),v=d.auto;(v||d.min===void 0)&&n(h,f.min),(v||d.max===void 0)&&n(h,f.max),d.autocolorscale&&n(h,"colorscale")}}for(var a=0;a{"use strict";var soe=Eo(),Dq=Dr(),Sot=pv().extractOpts;loe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?Dq.nestedProperty(r,o).get():r,l=Sot(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return Dq.aggNums(Math.min,null,a)},v=function(){return Dq.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&soe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&soe(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?_=i.colorscale.sequential:_=i.colorscale.sequentialminus,l._sync("colorscale",_)}}});var tc=ye((Fnr,uoe)=>{"use strict";var nL=lb(),E3=pv();uoe.exports={moduleType:"component",name:"colorscale",attributes:Tu(),layoutAttributes:Tq(),supplyLayoutDefaults:noe(),handleDefaults:Qh(),crossTraceDefaults:ooe(),calc:gv(),scales:nL.scales,defaultScale:nL.defaultScale,getScale:nL.get,isValidScale:nL.isValid,hasColorscale:E3.hasColorscale,extractOpts:E3.extractOpts,extractScale:E3.extractScale,flipScale:E3.flipScale,makeColorScaleFunc:E3.makeColorScaleFunc,makeColorScaleFuncFromTrace:E3.makeColorScaleFuncFromTrace}});var Ru=ye((znr,foe)=>{"use strict";var coe=Dr(),Mot=vv().isTypedArraySpec;foe.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 coe.isPlainObject(t)&&(coe.isArrayOrTypedArray(t.size)||Mot(t.size))}}});var k3=ye((Onr,hoe)=>{"use strict";var Eot=Eo();hoe.exports=function(t,r){r||(r=2);var n=t.marker,i=n.sizeref||1,a=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/i)}:function(s){return s/i};return function(s){var l=o(s/r);return Eot(l)&&l>0?Math.max(l,a):0}}});var ip=ye(mv=>{"use strict";var aL=Dr();mv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mv.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{poe.exports=Iot;var Fq={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Pot=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Iot(e){var t=[];return e.replace(Pot,function(r,n,i){var a=n.toLowerCase();for(i=Dot(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==Fq[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var Fot=eM(),ca=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},hs="M0,0Z",goe=Math.sqrt(2),i_=Math.sqrt(3),zq=Math.PI,Oq=Math.cos,qq=Math.sin;boe.exports={circle:{n:0,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?vs(t,r,i):i}},square:{n:1,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.4,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.8/goe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return vs(t,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/i_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.951,2),i=ca(e*.588,2),a=ca(-e,2),o=ca(e*-.309,2),s=ca(e*.809,2);return vs(t,r,"M"+n+","+o+"L"+i+","+s+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*i_/2,2);return vs(t,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*i_/2,2);return vs(t,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.924,2),i=ca(e*.383,2);return vs(t,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(e,t,r){if(ds(t))return hs;var n=e*1.4,i=ca(n*.225,2),a=ca(n*.951,2),o=ca(n*.363,2),s=ca(n*.588,2),l=ca(-n,2),u=ca(n*-.309,2),c=ca(n*.118,2),f=ca(n*.809,2),h=ca(n*.382,2);return vs(t,r,"M"+i+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+i+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.66,2),i=ca(e*.38,2),a=ca(e*.76,2);return vs(t,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*i_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*i_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.1,2),i=ca(e*2,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.7,2),i=ca(e*1.4,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*.7,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/goe,2);return vs(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2),i=ca(e*.65,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*.85,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(ds(t))return hs;var n=ca(e/2,2),i=ca(e,2);return vs(t,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+i+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(ds(t))return hs;var n=zq/2.5,i=2*e*Oq(n),a=2*e*qq(n);return vs(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(ds(t))return hs;var n=zq/4,i=2*e*Oq(n),a=2*e*qq(n);return vs(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function ds(e){return e===null}var moe,yoe,_oe,xoe;function vs(e,t,r){if((!e||e%360===0)&&!t)return r;if(_oe===e&&xoe===t&&moe===r)return yoe;_oe=e,xoe=t,moe=r;function n(b,p){var k=Oq(b),E=qq(b),S=p[0],L=p[1]+(t||0);return[S*k-L*E,S*E+L*k]}for(var i=e/180*zq,a=0,o=0,s=Fot(r),l="",u=0;u{"use strict";var dd=Oa(),Du=Dr(),zot=Du.numberFormat,Sb=Eo(),Hq=cd(),sL=qa(),Kd=ka(),Oot=tc(),rM=Du.strTranslate,lL=ru(),qot=Wp(),Bot=$h(),Not=Bot.LINE_SPACING,Ioe=N1().DESELECTDIM,Uot=Ru(),Vot=k3(),Got=ip().appendArrayPointValue,Aa=Voe.exports={};Aa.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(Kd.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",Bq(jot(c))),l&&e.style("text-shadow",l==="auto"?lL.makeTextShadow(Kd.contrast(a)):Bq(l)),u&&e.style("text-decoration-line",Bq(Wot(u)))};function Bq(e){return e==="none"?void 0:e}var Hot={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function jot(e){return Hot[e]}function Wot(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Aa.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};Aa.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};Aa.setRect=function(e,t,r,n,i){e.call(Aa.setPosition,t,r).call(Aa.setSize,n,i)};Aa.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Sb(i)&&Sb(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",rM(i,a));else return!1;return!0};Aa.translatePoints=function(e,t,r){e.each(function(n){var i=dd.select(this);Aa.translatePoint(n,i,t,r)})};Aa.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};Aa.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(i){var a=i[0].trace,o=a.xcalendar,s=a.ycalendar,l=sL.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){Aa.hideOutsideRangePoint(u,dd.select(this),r,n,o,s)})})}};Aa.crispRound=function(e,t,r){return!t||!Sb(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Aa.singleLineStyle=function(e,t,r,n,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";Kd.stroke(t,n||a.color),Aa.dashLine(t,s,o)};Aa.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(i){var a=(((i||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=n||a.dash||"";dd.select(this).call(Kd.stroke,r||a.color).call(Aa.dashLine,s,o)})};Aa.dashLine=function(e,t,r){r=+r||0,t=Aa.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};Aa.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 Roe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=Aa.getPatternAttr,s=i&&(o(i.shape,0,"")||o(i.path,0,""));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),c=i.fgopacity,f=o(i.size,0,8),h=o(i.solidity,0,.3),d=t.uid;Aa.pattern(e,"point",r,d,s,f,h,void 0,i.fillmode,l,u,c)}else if(a&&a.type!=="none"){var v=a.type,_="scatterfill-"+t.uid;if(n&&(_="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var b,p;v==="horizontal"?(b={x:a.start,y:0},p={x:a.stop,y:0}):v==="vertical"&&(b={x:0,y:a.start},p={x:0,y:a.stop}),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.min[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.min[0].val:b.y,!0),p.x=t._xA.c2p(p.x===void 0?t._extremes.x.max[0].val:p.x,!0),p.y=t._yA.c2p(p.y===void 0?t._extremes.y.max[0].val:p.y,!0),e.call(zoe,r,_,"linear",a.colorscale,"fill",b,p,!0,!1)}else v==="horizontal"&&(v=v+"reversed"),e.call(Aa.gradient,r,_,v,a.colorscale,"fill")}else t.fillcolor&&e.call(Kd.fill,t.fillcolor)}Aa.singleFillStyle=function(e,t){var r=dd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Roe(e,i,t,!1)};Aa.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=dd.select(this);n[0].trace&&Roe(i,n[0].trace,t,r)})};var Toe=woe();Aa.symbolNames=[];Aa.symbolFuncs=[];Aa.symbolBackOffs=[];Aa.symbolNeedLines={};Aa.symbolNoDot={};Aa.symbolNoFill={};Aa.symbolList=[];Object.keys(Toe).forEach(function(e){var t=Toe[e],r=t.n;Aa.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),Aa.symbolNames[r]=e,Aa.symbolFuncs[r]=t.f,Aa.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Aa.symbolNeedLines[r]=!0),t.noDot?Aa.symbolNoDot[r]=!0:Aa.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(Aa.symbolNoFill[r]=!0)});var Xot=Aa.symbolNames.length,Zot="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Aa.symbolNumber=function(e){if(Sb(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=Aa.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=Xot||e>=400?0:Math.floor(Math.max(e,0))};function Doe(e,t,r,n){var i=e%100;return Aa.symbolFuncs[i](t,r,n)+(e>=200?Zot:"")}var Aoe=zot("~f"),Foe={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}};Aa.gradient=function(e,t,r,n,i,a){var o=Foe[n];return zoe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function zoe(e,t,r,n,i,a,o,s,l,u){var c=i.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),d=0;d=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Aa.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=Xq(e,r),f=Wq(e,r);t.attr("d",Doe(u,l,c,f))}var h=!1,d,v,_;if(e.so)_=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;_=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?v=e.mlcc=n.lineScale(e.mlc):Du.isArrayOrTypedArray(s.color)?v=Kd.defaultLine:v=s.color,Du.isArrayOrTypedArray(o.color)&&(d=Kd.defaultLine,h=!0),"mc"in e?d=e.mcc=n.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}if(e.om)t.call(Kd.stroke,d).style({"stroke-width":(_||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:_)+"px");var p=o.gradient,k=e.mgt;k?h=!0:k=p&&p.type,Du.isArrayOrTypedArray(k)&&(k=k[0],Foe[k]||(k=0));var E=o.pattern,S=Aa.getPatternAttr,L=E&&(S(E.shape,e.i,"")||S(E.path,e.i,""));if(k&&k!=="none"){var x=e.mgc;x?h=!0:x=p.color;var C=r.uid;h&&(C+="-"+e.i),Aa.gradient(t,i,C,k,[[0,x],[1,d]],"fill")}else if(L){var M=!1,g=E.fgcolor;!g&&a&&a.color&&(g=a.color,M=!0);var P=S(g,e.i,a&&a.color||null),T=S(E.bgcolor,e.i,null),z=E.fgopacity,O=S(E.size,e.i,8),V=S(E.solidity,e.i,.3);M=M||e.mcc||Du.isArrayOrTypedArray(E.shape)||Du.isArrayOrTypedArray(E.path)||Du.isArrayOrTypedArray(E.bgcolor)||Du.isArrayOrTypedArray(E.fgcolor)||Du.isArrayOrTypedArray(E.size)||Du.isArrayOrTypedArray(E.solidity);var G=r.uid;M&&(G+="-"+e.i),Aa.pattern(t,"point",i,G,L,O,V,e.mcc,E.fillmode,T,P,z)}else Du.isArrayOrTypedArray(d)?Kd.fill(t,d[e.i]):Kd.fill(t,d);_&&Kd.stroke(t,v)}};Aa.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Aa.tryColorscale(r,""),t.lineScale=Aa.tryColorscale(r,"line"),sL.traceIs(e,"symbols")&&(t.ms2mrc=Uot.isBubble(e)?Vot(e):function(){return(r.size||6)/2}),e.selectedpoints&&Du.extendFlat(t,Aa.makeSelectedPointStyleFns(e)),t};Aa.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(Du.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(S){var L=S.mo===void 0?i.opacity:S.mo;return S.selected?c?l:L:f?u:Ioe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(S){var L=S.mcc||h;return S.selected?d||L:v||L});var _=i.size,b=a.size,p=o.size,k=b!==void 0,E=p!==void 0;return sL.traceIs(e,"symbols")&&(k||E)&&(t.selectedSizeFn=function(S){var L=S.mrc||_/2;return S.selected?k?b/2:L:E?p/2:L}),t};Aa.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Kd.addOpacity(f,Ioe))},t};Aa.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Aa.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(a,o){Kd.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);a.attr("d",Doe(Aa.symbolNumber(s),l,Xq(o,t),Wq(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=dd.select(this),s=0;s0?r:0}Aa.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=Aa.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=dd.select(this),u=a?Du.extractOption(s,t,"txt","texttemplate"):Du.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};Got(h,t,s.i),u=Du.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,v=qoe(s,t),_=n?n(s):s.tc||t.textfont.color;l.call(Aa.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:v,color:_}).text(u).call(lL.convertToTspans,r).call(Ooe,d,v,s.mrc)})}};Aa.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Aa.makeSelectedTextStyleFns(t);e.each(function(n){var i=dd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=qoe(n,t);Kd.fill(i,a);var l=sL.traceIs(t,"bar-like");Ooe(i,o,s,n.mrc2||n.mrc,l)})}};var Soe=.5;Aa.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],i;for(i=1;i=l||S>=c&&S<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[S,L])}return e}Aa.applyBackoff=Uoe;Aa.makeTester=function(){var e=Du.ensureSingleById(dd.select("body"),"svg","js-plotly-tester",function(r){r.attr(qot.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=Du.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Aa.tester=e,Aa.testref=t};Aa.savedBBoxes={};var Uq=0,Jot=1e4;Aa.bBox=function(e,t,r){r||(r=Moe(e));var n;if(r){if(n=Aa.savedBBoxes[r],n)return Du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Moe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var l=Aa.bBox(i,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,n=Aa.savedBBoxes[r],n)return Du.extendFlat({},n)}}var u,c;t?u=e:(c=Aa.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),dd.select(u).attr("transform",null).call(lL.positionText,0,0);var f=u.getBoundingClientRect(),h=Aa.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return Uq>=Jot&&(Aa.savedBBoxes={},Uq=0),r&&(Aa.savedBBoxes[r]=d),Uq++,Du.extendFlat({},d)};function Moe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Aa.setClipUrl=function(e,t,r){e.attr("clip-path",jq(t,r))};function jq(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Aa.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};Aa.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=rM(t,r),o=o.trim(),e[a]("transform",o),o};Aa.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};Aa.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var $ot=/\s*sc.*/;Aa.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var i=(this.getAttribute("transform")||"").replace($ot,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var Qot=/translate\([^)]*\)\s*$/;Aa.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=dd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(Qot);t===1&&r===1?n=[]:n=[rM(o,s),"scale("+t+","+r+")",rM(-o,-s)],l&&n.push(l),i.attr("transform",n.join(""))}})};function Wq(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}Aa.getMarkerStandoff=Wq;var tM=Math.atan2,wb=Math.cos,L3=Math.sin;function Eoe(e,t){var r=t[0],n=t[1];return[r*wb(e)-n*L3(e),r*L3(e)+n*wb(e)]}var koe,Coe,Loe,Poe,Vq,Gq;function Xq(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||Du.isArrayOrTypedArray(r))&&(r=0));var n,i,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],i=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),i=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=tM(h[1]-i,h[0]-n),v=tM(f[1]-i,f[0]-n),_;if(a==="north")_=r/180*Math.PI;else if(a==="previous"){var b=u/180*Math.PI,p=c/180*Math.PI,k=koe/180*Math.PI,E=Coe/180*Math.PI,S=k-b,L=wb(E)*L3(S),x=L3(E)*wb(p)-wb(E)*L3(p)*wb(S);_=-tM(L,x)-Math.PI,koe=u,Coe=c}var C=Eoe(d,[wb(_),0]),M=Eoe(v,[L3(_),0]);r=tM(C[1]+M[1],C[0]+M[0])/Math.PI*180,a==="previous"&&!(Gq===t.uid&&e.i===Vq+1)&&(r=null)}if(a==="previous"&&!t._geo)if(Gq===t.uid&&e.i===Vq+1&&Sb(n)&&Sb(i)){var g=n-Loe,P=i-Poe,T=t.line&&t.line.shape||"",z=T.slice(T.length-1);z==="h"&&(P=0),z==="v"&&(g=0),r+=tM(P,g)/Math.PI*180+90}else r=null}return Loe=n,Poe=i,Vq=e.i,Gq=t.uid,r}Aa.getMarkerAngle=Xq});var Eb=ye((Vnr,Woe)=>{"use strict";var P3=Oa(),est=Eo(),tst=Mc(),Zq=qa(),Mb=Dr(),Goe=Mb.strTranslate,uL=So(),cL=ka(),I3=ru(),Hoe=N1(),rst=$h().OPPOSITE_SIDE,joe=/ [XY][0-9]* /,Yq=1.6,Kq=1.6;function ist(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=i.title,v=(d&&d.text?d.text:"").trim(),_=!1,b=d&&d.font?d.font:{},p=b.family,k=b.size,E=b.color,S=b.weight,L=b.style,x=b.variant,C=b.textcase,M=b.lineposition,g=b.shadow,P=r.subtitlePropName,T=!!P,z=r.subtitlePlaceholder,O=(i.title||{}).subtitle||{text:"",font:{}},V=(O.text||"").trim(),G=!1,Z=1,j=O.font,N=j.family,H=j.size,te=j.color,oe=j.weight,_e=j.style,Ee=j.variant,Ce=j.textcase,me=j.lineposition,ie=j.shadow,Se;a==="title.text"?Se="titleText":a.indexOf("axis")!==-1?Se="axisTitleText":a.indexOf("colorbar")!==-1&&(Se="colorbarTitleText");var Le=e._context.edits[Se];function Ae(Nt,Jt){return Nt===void 0||Jt===void 0?!1:Nt.replace(joe," % ")===Jt.replace(joe," % ")}v===""?h=0:Ae(v,o)&&(Le||(v=""),h=.2,_=!0),T&&(V===""?Z=0:Ae(V,z)&&(Le||(V=""),Z=.2,G=!0)),r._meta?v=Mb.templateString(v,r._meta):n._meta&&(v=Mb.templateString(v,n._meta));var Fe=v||V||Le,Pe;f||(f=Mb.ensureSingle(n._infolayer,"g","g-"+t),Pe=n._hColorbarMoveTitle);var ge=f.selectAll("text."+t).data(Fe?[0]:[]);ge.enter().append("text"),ge.text(v).attr("class",t),ge.exit().remove();var Re=null,ce=t+"-subtitle",Ze=V||Le;if(T&&(Re=f.selectAll("text."+ce).data(Ze?[0]:[]),Re.enter().append("text"),Re.text(V).attr("class",ce),Re.exit().remove()),!Fe)return f;function ut(Nt,Jt){Mb.syncOrAsync([pt,Zt],{title:Nt,subtitle:Jt})}function pt(Nt){var Jt=Nt.title,sr=Nt.subtitle,wr;!c&&Pe&&(c={}),c?(wr="",c.rotate&&(wr+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||Pe)&&(wr+=Goe(0,(c.offset||0)-(Pe||0)))):wr=null,Jt.attr("transform",wr);function cr(It){if(It){var mt=P3.select(It.node().parentNode).select("."+ce);if(!mt.empty()){var er=It.node().getBBox();if(er.height){var lr=er.y+er.height+Yq*H;mt.attr("y",lr)}}}}if(Jt.style("opacity",h*cL.opacity(E)).call(uL.font,{color:cL.rgb(E),size:P3.round(k,2),family:p,weight:S,style:L,variant:x,textcase:C,shadow:g,lineposition:M}).attr(u).call(I3.convertToTspans,e,cr),sr&&!sr.empty()){var $e=f.select("."+t+"-math-group"),St=Jt.node().getBBox(),Qt=$e.node()?$e.node().getBBox():void 0,Vt=Qt?Qt.y+Qt.height+Yq*H:St.y+St.height+Kq*H,_t=Mb.extendFlat({},u,{y:Vt});sr.attr("transform",wr),sr.style("opacity",Z*cL.opacity(te)).call(uL.font,{color:cL.rgb(te),size:P3.round(H,2),family:N,weight:oe,style:_e,variant:Ee,textcase:Ce,shadow:ie,lineposition:me}).attr(_t).call(I3.convertToTspans,e)}return tst.previousPromises(e)}function Zt(Nt){var Jt=Nt.title,sr=P3.select(Jt.node().parentNode);if(l&&l.selection&&l.side&&v){sr.attr("transform",null);var wr=rst[l.side],cr=l.side==="left"||l.side==="top"?-1:1,$e=est(l.pad)?l.pad:2,St=uL.bBox(sr.node()),Qt={t:0,b:0,l:0,r:0},Vt=e._fullLayout._reservedMargin;for(var _t in Vt)for(var It in Vt[_t]){var mt=Vt[_t][It];Qt[It]=Math.max(Qt[It],mt)}var er={left:Qt.l,top:Qt.t,right:n.width-Qt.r,bottom:n.height-Qt.b},lr=l.maxShift||cr*(er[l.side]-St[l.side]),Tr=0;if(lr<0)Tr=lr;else{var Lr=l.offsetLeft||0,ti=l.offsetTop||0;St.left-=Lr,St.right-=Lr,St.top-=ti,St.bottom-=ti,l.selection.each(function(){var Vr=uL.bBox(this);Mb.bBoxIntersect(St,Vr,$e)&&(Tr=Math.max(Tr,cr*(Vr[l.side]-St[wr])+$e))}),Tr=Math.min(lr,Tr),i._titleScoot=Math.abs(Tr)}if(Tr>0||lr<0){var Br={left:[-Tr,0],right:[Tr,0],top:[0,-Tr],bottom:[0,Tr]}[l.side];sr.attr("transform",Goe(Br[0],Br[1]))}}}ge.call(ut,Re);function st(Nt,Jt){Nt.text(Jt).on("mouseover.opacity",function(){P3.select(this).transition().duration(Hoe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){P3.select(this).transition().duration(Hoe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Le&&(v?ge.on(".opacity",null):(st(ge,o),_=!0),ge.call(I3.makeEditable,{gd:e}).on("edit",function(Nt){s!==void 0?Zq.call("_guiRestyle",e,a,Nt,s):Zq.call("_guiRelayout",e,a,Nt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ut)}).on("input",function(Nt){this.text(Nt||" ").call(I3.positionText,u.x,u.y)}),T)){if(T&&!v){var lt=ge.node().getBBox(),Gt=lt.y+lt.height+Kq*H;Re.attr("y",Gt)}V?Re.on(".opacity",null):(st(Re,z),G=!0),Re.call(I3.makeEditable,{gd:e}).on("edit",function(Nt){Zq.call("_guiRelayout",e,"title.subtitle.text",Nt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ut)}).on("input",function(Nt){this.text(Nt||" ").call(I3.positionText,Re.attr("x"),Re.attr("y"))})}return ge.classed("js-placeholder",_),Re&&!Re.empty()&&Re.classed("js-placeholder",G),f}Woe.exports={draw:ist,SUBTITLE_PADDING_EM:Kq,SUBTITLE_PADDING_MATHJAX_EM:Yq}});var ym=ye((Gnr,Joe)=>{"use strict";var nst=Oa(),ast=r3().utcFormat,yc=Dr(),ost=yc.numberFormat,gm=Eo(),n_=yc.cleanNumber,sst=yc.ms2DateTime,Xoe=yc.dateTime2ms,mm=yc.ensureNumber,Zoe=yc.isArrayOrTypedArray,a_=fs(),fL=a_.FP_SAFE,Tg=a_.BADNUM,lst=a_.LOG_CLIP,ust=a_.ONEWEEK,hL=a_.ONEDAY,dL=a_.ONEHOUR,Yoe=a_.ONEMIN,Koe=a_.ONESEC,vL=hf(),mL=hd(),pL=mL.HOUR_PATTERN,gL=mL.WEEKDAY_PATTERN;function iM(e){return Math.pow(10,e)}function Jq(e){return e!=null}Joe.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(S,L){if(S>0)return Math.log(S)/Math.LN10;if(S<=0&&L&&t.range&&t.range.length===2){var x=t.range[0],C=t.range[1];return .5*(x+C-2*lst*Math.abs(x-C))}else return Tg}function o(S,L,x,C){if((C||{}).msUTC&&gm(S))return+S;var M=Xoe(S,x||t.calendar);if(M===Tg)if(gm(S)){S=+S;var g=Math.floor(yc.mod(S+.05,1)*10),P=Math.round(S-g/10);M=Xoe(new Date(P))+g/10}else return Tg;return M}function s(S,L,x){return sst(S,L,x||t.calendar)}function l(S){return t._categories[Math.round(S)]}function u(S){if(Jq(S)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[S]!==void 0)return t._categoriesMap[S];t._categories.push(typeof S=="number"?String(S):S);var L=t._categories.length-1;return t._categoriesMap[S]=L,L}return Tg}function c(S,L){for(var x=new Array(L),C=0;Ct.range[1]&&(x=!x);for(var C=x?-1:1,M=C*S,g=0,P=0;Pz)g=P+1;else{g=M<(T+z)/2?P:P+1;break}}var O=t._B[g]||0;return isFinite(O)?v(S,t._m2,O):0},p=function(S){var L=t._rangebreaks.length;if(!L)return _(S,t._m,t._b);for(var x=0,C=0;Ct._rangebreaks[C].pmax&&(x=C+1);return _(S,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:mm,t.l2c=t.type==="log"?iM:mm,t.l2p=b,t.p2l=p,t.c2p=t.type==="log"?function(S,L){return b(a(S,L))}:b,t.p2c=t.type==="log"?function(S){return iM(p(S))}:p,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=n_,t.c2d=t.c2r=t.l2d=t.l2r=mm,t.d2p=t.r2p=function(S){return t.l2p(n_(S))},t.p2d=t.p2r=p,t.cleanPos=mm):t.type==="log"?(t.d2r=t.d2l=function(S,L){return a(n_(S),L)},t.r2d=t.r2c=function(S){return iM(n_(S))},t.d2c=t.r2l=n_,t.c2d=t.l2r=mm,t.c2r=a,t.l2d=iM,t.d2p=function(S,L){return t.l2p(t.d2r(S,L))},t.p2d=function(S){return iM(p(S))},t.r2p=function(S){return t.l2p(n_(S))},t.p2r=p,t.cleanPos=mm):t.type==="date"?(t.d2r=t.r2d=yc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(S,L,x){return t.l2p(o(S,0,x))},t.p2d=t.p2r=function(S,L,x){return s(p(S),L,x)},t.cleanPos=function(S){return yc.cleanDate(S,Tg,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(S){var L=d(S);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=mm,t.r2l=d,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(p(S))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(S){return typeof S=="string"&&S!==""?S:mm(S)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(S){var L=h(S);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=mm,t.r2l=h,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(p(S))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(S){return Array.isArray(S)||typeof S=="string"&&S!==""?S:mm(S)},t.setupMultiCategory=function(S){var L=t._traceIndices,x,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var g in M)if(g!==n){var P=r[vL.id2name(g)];L=L.concat(P._traceIndices)}}var T=[[0,{}],[0,{}]],z=[];for(x=0;xP[1]&&(C[g?0:1]=x),C[0]===C[1]){var T=t.l2r(L),z=t.l2r(x);if(L!==void 0){var O=T+1;x!==void 0&&(O=Math.min(O,z)),C[g?1:0]=O}if(x!==void 0){var V=z+1;L!==void 0&&(V=Math.max(V,T)),C[g?0:1]=V}}}},t.cleanRange=function(S,L){t._cleanRange(S,L),t.limitRange(S)},t._cleanRange=function(S,L){L||(L={}),S||(S="range");var x=yc.nestedProperty(t,S).get(),C,M;if(t.type==="date"?M=yc.dfltRange(t.calendar):i==="y"?M=mL.DFLTRANGEY:t._name==="realaxis"?M=[0,1]:M=L.dfltRange||mL.DFLTRANGEX,M=M.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(M[0]=0),!x||x.length!==2){yc.nestedProperty(t,S).set(M);return}var g=x[0]===null,P=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=yc.cleanDate(x[0],Tg,t.calendar),x[1]=yc.cleanDate(x[1],Tg,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!yc.isDateTime(x[C],t.calendar)){t[S]=M;break}if(t.r2l(x[0])===t.r2l(x[1])){var T=yc.constrain(t.r2l(x[0]),yc.MIN_MS+1e3,yc.MAX_MS-1e3);x[0]=t.l2r(T-1e3),x[1]=t.l2r(T+1e3);break}}else{if(!gm(x[C]))if(!(g||P)&&gm(x[1-C]))x[C]=x[1-C]*(C?10:.1);else{t[S]=M;break}if(x[C]<-fL?x[C]=-fL:x[C]>fL&&(x[C]=fL),x[0]===x[1]){var z=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=z,x[1]+=z}}},t.setScale=function(S){var L=r._size;if(t.overlaying){var x=vL.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var C=S&&t._r?"_r":"range",M=t.calendar;t.cleanRange(C);var g=t.r2l(t[C][0],M),P=t.r2l(t[C][1],M),T=i==="y";if(T?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(g-P),t._b=-t._m*P):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(P-g),t._b=-t._m*g),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var z,O;if(t._rangebreaks=t.locateBreaks(Math.min(g,P),Math.max(g,P)),t._rangebreaks.length){for(z=0;zP&&(V=!V),V&&t._rangebreaks.reverse();var G=V?-1:1;for(t._m2=G*t._length/(Math.abs(P-g)-t._lBreaks),t._B.push(-t._m2*(T?P:g)),z=0;zM&&(M+=7,gM&&(M+=24,g=C&&g=C&&S=ie.min&&(_eie.max&&(ie.max=Ee),Ce=!1)}Ce&&P.push({min:_e,max:Ee})}};for(x=0;x{"use strict";var $oe=Eo(),$q=Dr(),cst=fs().BADNUM,yL=$q.isArrayOrTypedArray,fst=$q.isDateTime,hst=$q.cleanNumber,Qoe=Math.round;tse.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(yL(i)&&!i.length)return"-";if(!a&&mst(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function ese(e){return Math.max(1,(e-1)/1e3)}function gst(e,t){for(var r=e.length,n=ese(r),i=0,a=0,o={},s=0;si*2}function mst(e){return yL(e[0])&&yL(e[1])}});var Ag=ye((jnr,use)=>{"use strict";var yst=Oa(),ase=Eo(),o_=Dr(),_L=fs().FP_SAFE,_st=qa(),xst=So(),ose=hf(),bst=ose.getFromId,wst=ose.isLinked;use.exports={applyAutorangeOptions:lse,getAutoRange:Qq,makePadFn:eB,doAutoRange:Ast,findExtremes:Sst,concatExtremes:iB};function Qq(e,t){var r,n,i=[],a=e._fullLayout,o=eB(a,t,0),s=eB(a,t,1),l=iB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return o_.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r0&&(P=E-o(x)-s(C),P>S?T/P>L&&(M=x,g=C,L=T/P):T/E>L&&(M={val:x.val,nopad:1},g={val:C.val,nopad:1},L=T/E));function z(j,N){return Math.max(j,s(N))}if(f===h){var O=f-1,V=f+1;if(p)if(f===0)i=[0,1];else{var G=(f>0?c:u).reduce(z,0),Z=f/(1-Math.min(.5,G/E));i=f>0?[0,Z]:[Z,0]}else k?i=[Math.max(0,O),Math.max(1,V)]:i=[O,V]}else p?(M.val>=0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:0,nopad:1})):k&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:1,nopad:1})),L=(g.val-M.val-rse(t,x.val,C.val))/(E-o(M)-s(g)),i=[M.val-L*o(M),g.val+L*s(g)];return i=lse(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),o_.simpleMap(i,t.l2r||Number)}function rse(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),x=S((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=S(r.vpadplus||r.vpad),M=S(r.vpadminus||r.vpad);if(!u){if(k=1/0,E=-1/0,l)for(f=0;f0&&(k=h),h>E&&h<_L&&(E=h);else for(f=0;f-_L&&(k=h),h>E&&h<_L&&(E=h);t=[k,E],a=2}var g={tozero:s,extrapad:o};function P(z){d=t[z],ase(d)&&(b=L(z),p=x(z),c?(v=e.c2l(d)-M(z),_=e.c2l(d)+C(z)):(k=d-M(z),E=d+C(z),l&&k=T;f--)P(f);return{min:n,max:i,opts:r}}function tB(e,t,r,n){sse(e,t,r,n,Mst)}function rB(e,t,r,n){sse(e,t,r,n,Est)}function sse(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function nse(e){return ase(e)&&Math.abs(e)<_L}function Mst(e,t){return e<=t}function Est(e,t){return e>=t}function kst(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&xL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&xL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Cst(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&xL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&xL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function xL(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,n=l)}}return r=kst(r,t),n=Cst(n,t),[r,n]}});var ho=ye((Wnr,Ise)=>{"use strict";var b0=Oa(),Ih=Eo(),D3=Mc(),aM=qa(),Jo=Dr(),F3=Jo.strTranslate,kb=ru(),Lst=Eb(),oM=ka(),Xp=So(),Pst=Rd(),cse=Eq(),Jd=fs(),Ist=Jd.ONEMAXYEAR,TL=Jd.ONEAVGYEAR,AL=Jd.ONEMINYEAR,Rst=Jd.ONEMAXQUARTER,sB=Jd.ONEAVGQUARTER,SL=Jd.ONEMINQUARTER,Dst=Jd.ONEMAXMONTH,z3=Jd.ONEAVGMONTH,ML=Jd.ONEMINMONTH,Zp=Jd.ONEWEEK,Ov=Jd.ONEDAY,s_=Ov/2,xm=Jd.ONEHOUR,sM=Jd.ONEMIN,EL=Jd.ONESEC,Fst=Jd.ONEMILLI,zst=Jd.ONEMICROSEC,Cb=Jd.MINUS_SIGN,CL=Jd.BADNUM,lB={K:"zeroline"},uB={K:"gridline",L:"path"},cB={K:"minor-gridline",L:"path"},bse={K:"tick",L:"path"},fse={K:"tick",L:"text"},hse={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},LL=$h(),nM=LL.MID_SHIFT,Lb=LL.CAP_SHIFT,lM=LL.LINE_SPACING,Ost=LL.OPPOSITE_SIDE,kL=3,Qn=Ise.exports={};Qn.setConvert=ym();var qst=R3(),Sy=hf(),Bst=Sy.idSort,Nst=Sy.isLinked;Qn.id2name=Sy.id2name;Qn.name2id=Sy.name2id;Qn.cleanId=Sy.cleanId;Qn.list=Sy.list;Qn.listIds=Sy.listIds;Qn.getFromId=Sy.getFromId;Qn.getFromTrace=Sy.getFromTrace;var wse=Ag();Qn.getAutoRange=wse.getAutoRange;Qn.findExtremes=wse.findExtremes;var Ust=1e-4;function vB(e){var t=(e[1]-e[0])*Ust;return[e[0]-t,e[1]+t]}Qn.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],l=n+"ref",u={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(c){return c+" domain"})),u[l]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},Jo.coerce(e,t,u,l)};Qn.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Qn.coercePosition=function(e,t,r,n,i,a){var o,s,l=Qn.getRefType(n);if(l!=="range")o=Jo.ensureNumber,s=r(i,a);else{var u=Qn.getFromId(t,n);a=u.fraction2r(a),s=r(i,a),o=u.cleanPos}e[i]=o(s)};Qn.cleanPosition=function(e,t,r){var n=r==="paper"||r==="pixel"?Jo.ensureNumber:Qn.getFromId(t,r).cleanPos;return n(e)};Qn.redrawComponents=function(e,t){t=t||Qn.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var l=aM.getComponentMethod(i,a),u={},c=0;c2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Qn.saveRangeInitial=function(e,t){for(var r=Qn.list(e,"",!0),n=!1,i=0;if*.3||u(n)||u(i))){var h=r.dtick/2;e+=e+ho){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=Qn.tickIncrement(e,"M6","reverse")+Ov*1.5:a.exactMonths>o?e=Qn.tickIncrement(e,"M1","reverse")+Ov*15.5:e-=s_;var l=Qn.tickIncrement(e,r);if(l<=n)return l}return e}Qn.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&Ih(t._tmin),i;if(n){var a=Qn.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Jo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Jo.simpleMap(i,t.l2r),e._isMinor=!0,Qn.prepTicks(e,r),n){var s=Ih(t.dtick),l=Ih(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?nB(u,c)?u===2*Zp&&c===2*Ov&&(e.dtick=Zp):u===2*Zp&&c===3*Ov?e.dtick=Zp:u===Zp&&!(t._input.minor||{}).nticks?e.dtick=Ov:pse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":nB(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"?nB(u,c)||(e.dtick=pse(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}t.minor._tick0Init===void 0&&(e.tick0=t.tick0)};function nB(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function pse(e,t){return Math.abs(e/t-1)<.001}Qn.prepTicks=function(e,t){var r=Jo.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,i;n||(e.type==="category"||e.type==="multicategory"?(i=e.tickfont?Jo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=Jo.constrain(e._length/i,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Qn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=AL?u>=AL&&u<=Ist?f=u:f=TL:r===sB&&c>=SL?u>=SL&&u<=Rst?f=u:f=sB:c>=ML?u>=ML&&u<=Dst?f=u:f=z3:r===Zp&&c>=Zp?f=Zp:c>=Ov?f=Ov:r===s_&&c>=s_?f=s_:r===xm&&c>=xm&&(f=xm);var h;f>=u&&(f=u,h=!0);var d=i+f;if(t.rangebreaks&&f>0){for(var v=84,_=0,b=0;bZp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}Qn.calcTicks=function(t,r){for(var n=t.type,i=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Jo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Jo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(E?0:1);S--){var L=!S;S?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var x=S?t:Jo.extendFlat({},t,t.minor);if(L?Qn.prepMinorTicks(x,t,r):Qn.prepTicks(x,r),x.tickmode==="array"){S?(b=[],v=gse(t,!L)):(p=[],_=gse(t,!L));continue}if(x.tickmode==="sync"){b=[],v=Xst(t);continue}var C=vB(u),M=C[0],g=C[1],P=Ih(x.dtick),T=n==="log"&&!(P||x.dtick.charAt(0)==="L"),z=Qn.tickFirst(x,r);if(S){if(t._tmin=z,z=g:V<=g;V=Qn.tickIncrement(V,j,c,i)){if(S&&G++,x.rangebreaks&&!c){if(V=h)break}if(b.length>d||V===O)break;O=V;var N={value:V};S?(T&&V!==(V|0)&&(N.simpleLabel=!0),a>1&&G%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,p.push(N))}}if(!p||p.length<2)l=!1;else{var H=(p[1].value-p[0].value)*(s?-1:1);ylt(H,t.tickformat)||(l=!1)}if(!l)k=b;else{var te=b.concat(p);o&&b.length&&(te=te.slice(1)),te=te.sort(function(Gt,Nt){return Gt.value-Nt.value}).filter(function(Gt,Nt,Jt){return Nt===0||Gt.value!==Jt[Nt-1].value});var oe=te.map(function(Gt,Nt){return Gt.minor===void 0&&!Gt.skipLabel?Nt:null}).filter(function(Gt){return Gt!==null});oe.forEach(function(Gt){l.map(function(Nt){var Jt=Gt+Nt;Jt>=0&&Jt-1;Fe--){if(b[Fe].drop){b.splice(Fe,1);continue}b[Fe].value=oB(b[Fe].value,t);var ce=t.c2p(b[Fe].value);(Pe?Re>ce-ge:Reh||srh&&(Jt.periodX=h),sri&&hTL)t/=TL,n=i(10),e.dtick="M"+12*_m(t,n,bL);else if(a>z3)t/=z3,e.dtick="M"+_m(t,1,mse);else if(a>Ov){if(e.dtick=_m(t,Ov,e._hasDayOfWeekBreaks?[1,2,7,14]:Zst),!r){var o=Qn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Jo.dateTick0(e.calendar,2):e.tick0=Jo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>xm?e.dtick=_m(t,xm,mse):a>sM?e.dtick=_m(t,sM,yse):a>EL?e.dtick=_m(t,EL,yse):(n=i(10),e.dtick=_m(t,n,bL))}else if(e.type==="log"){e.tick0=0;var l=Jo.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=i(10),e.dtick="L"+_m(t,n,bL)}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))):yB(e)?(e.tick0=0,n=1,e.dtick=_m(t,n,Yst)):(e.tick0=0,n=i(10),e.dtick=_m(t,n,bL));if(e.dtick===0&&(e.dtick=1),!Ih(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Mse(e){var t=e.dtick;if(e._tickexponent=0,!Ih(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if(String(t).charAt(0)==="M")i>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=Ov&&i<=10||t>=Ov*15)e._tickround="d";else if(t>=sM&&i<=16||t>=xm)e._tickround="M";else if(t>=EL&&i<=19||t>=sM)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,a)-20,e._tickround<0&&(e._tickround=4)}}else if(Ih(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Ih(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&&(O3(e.exponentformat)&&e.exponentformat!=="SI extended"&&!pB(l)||O3(e.exponentformat)&&e.exponentformat==="SI extended"&&!gB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Qn.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(Ih(t))return Jo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.slice(1));if(a==="M")return Jo.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Sse:Ase,l=e+i*.01,u=Jo.roundUp(Jo.mod(l,1),s,r);return Math.floor(l)+Math.log(b0.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Qn.tickFirst=function(e,t){var r=e.r2l||Number,n=Jo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&p<=e._length?b:null};if(a&&Jo.isArrayOrTypedArray(e.ticktext)){var f=Jo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u"+s;else{var u=cM(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function Jst(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=uM(Math.pow(10,o),e,i,n);else if(Ih(a)||l==="D"&&(e.minorloglabels==="complete"||Jo.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(Jo.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],d=Math.abs(h),v=e.exponentformat;v==="power"||O3(v)&&v!=="SI extended"&&pB(h)||O3(v)&&v==="SI extended"&&gB(h)?(t.text=f[0],d>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+=""+(h>0?"":Cb)+d+""),t.fontSize*=1.25):(v==="e"||v==="E")&&d>2?t.text=f[0]+v+(h>0?"+":Cb)+d:(t.text=uM(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,Jo.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var _=String(t.text).charAt(0);(_==="0"||_==="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 $st(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function Qst(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}function elt(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=uM(t.x,e,i,n)}function tlt(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=rlt(a);if(o[1]>=100)t.text=uM(Jo.deg2rad(t.x),e,i,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=Cb+t.text)}}}else t.text=uM(t.x,e,i,n)}function rlt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var kse=["f","p","n","\u03BC","m","","k","M","G","T"],ilt=["q","r","y","z","a",...kse,"P","E","Z","Y","R","Q"],O3=e=>["SI","SI extended","B"].includes(e);function pB(e){return e>14||e<-15}function gB(e){return e>32||e<-30}function nlt(e,t){return O3(t)?!!(t==="SI extended"&&gB(e)||t!=="SI extended"&&pB(e)):!1}function uM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Qn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Ih(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Mse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Cb);var f=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+v+"":o==="B"&&s===9?e+="B":O3(o)&&(e+=o==="SI extended"?ilt[s/3+10]:kse[s/3+5])}return i?Cb+e:e}Qn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*z3}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function i(l,u,c){var f=c||function(v){return v},h=u[0],d=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!d&&typeof d!="number"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,d=n(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&i.unshift(i.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Jo.syncOrAsync(i.map(function(l){return function(){if(l){var u=Qn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Qn.drawOne(e,u,r);return u._shiftPusher&&dB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Jo.simpleMap(u._r,u.r2l),c}}}))};Qn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Qn.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var v=t.linewidth/2||0;t.ticks==="inside"&&(v+=t.ticklen),dB(t,v,n,!0),dB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=mlt(t,n));var _=h[c+"axislayer"],b=t._mainLinePosition,p=b+=t._shift,k=t._mainMirrorPosition,E=t._vals=Qn.calcTicks(t),S=[t.mirror,p,k].join("_");for(a=0;a0?sr.bottom-Nt:0,Jt))));var St=0,Qt=0;if(t._shiftPusher&&(St=Math.max(Jt,sr.height>0?lt==="l"?Nt-sr.left:sr.right-Nt:0),t.title.text!==l._dfltTitle[c]&&(Qt=(t._titleStandoff||0)+(t._titleScoot||0),lt==="l"&&(Qt+=xse(t))),t._fullDepth=Math.max(St,Qt)),t.automargin){wr={x:0,y:0,r:0,l:0,t:0,b:0};var Vt=[0,1],_t=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(lt==="b"?wr[lt]=t._depth:(wr[lt]=t._depth=Math.max(sr.width>0?Nt-sr.top:0,Jt),Vt.reverse()),sr.width>0){var It=sr.right-(t._offset+t._length);It>0&&(wr.xr=1,wr.r=It);var mt=t._offset-sr.left;mt>0&&(wr.xl=0,wr.l=mt)}}else if(lt==="l"?(t._depth=Math.max(sr.height>0?Nt-sr.left:0,Jt),wr[lt]=t._depth-_t):(t._depth=Math.max(sr.height>0?sr.right-Nt:0,Jt),wr[lt]=t._depth+_t,Vt.reverse()),sr.height>0){var er=sr.bottom-(t._offset+t._length);er>0&&(wr.yb=0,wr.b=er);var lr=t._offset-sr.top;lr>0&&(wr.yt=1,wr.t=lr)}wr[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Vt[0]],t.title.text!==l._dfltTitle[c]&&(wr[lt]+=xse(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(cr={x:0,y:0,r:0,l:0,t:0,b:0},cr[Gt]=t.linewidth,t.mirror&&t.mirror!==!0&&(cr[Gt]+=Jt),t.mirror===!0||t.mirror==="ticks"?cr[f]=t._anchorAxis.domain[Vt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(cr[f]=[t._counterDomainMin,t._counterDomainMax][Vt[1]]))}st&&($e=aM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(_se(wr,t.automargin),_se(cr,t.automargin)),D3.autoMargin(e,mB(t),wr),D3.autoMargin(e,Lse(t),cr),D3.autoMargin(e,Pse(t),$e)}),Jo.syncOrAsync(pt)}};function _se(e,t){if(e){var r=Object.keys(hse).reduce(function(n,i){return t.indexOf(i)!==-1&&hse[i].forEach(function(a){n[a]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function alt(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Jo.extendFlat({},a,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(h){return F3(i+e._offset+e.l2p(fB(h))+r,a+n)}:function(h){return F3(a+n,i+e._offset+e.l2p(fB(h))+r)}};function fB(e){return e.periodX!==void 0?e.periodX:e.x}function ult(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(v){return t.indexOf(v)!==-1},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||a||i||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=kL,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(f+=d*Lb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=kL),l&&c==="top"&&(h-=d*(1-Lb)),(a||i)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}Qn.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=n.len!==void 0?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r};Qn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=e.tickson||"",a=function(O){return n.indexOf(O)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=i!=="boundaries"&&(u||s||o||l),f=a("inside"),h=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&i!=="boundaries",d=0,v=0,_=h?e.ticklen:0;if(f?_*=-1:c&&(_=0),h&&(d+=_,r)){var b=Jo.deg2rad(r);d=_*Math.cos(b)+1,v=_*Math.sin(b)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var p={labelStandoff:d,labelShift:v},k,E,S,L,x=0,C=e.side,M=e._id.charAt(0),g=e.tickangle,P;if(M==="x")P=!f&&C==="bottom"||f&&C==="top",L=P?1:-1,f&&(L*=-1),k=v*L,E=t+d*L,S=P?1:-.2,Math.abs(g)===90&&(f?S+=nM:g===-90&&C==="bottom"?S=Lb:g===90&&C==="top"?S=nM:S=.5,x=nM/2*(g/90)),p.xFn=function(O){return O.dx+k+x*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*S},p.anchorFn=function(O,V){if(c){if(s)return"end";if(l)return"start"}return!Ih(V)||V===0||V===180?"middle":V*L<0!==f?"end":"start"},p.heightFn=function(O,V,G){return V<-60||V>60?-.5*G:e.side==="top"!==f?-G:0};else if(M==="y"){if(P=!f&&C==="left"||f&&C==="right",L=P?1:-1,f&&(L*=-1),k=d,E=v*L,S=0,!f&&Math.abs(g)===90&&(g===-90&&C==="left"||g===90&&C==="right"?S=Lb:S=.5),f){var T=Ih(g)?+g:0;if(T!==0){var z=Jo.deg2rad(T);x=Math.abs(Math.sin(z))*Lb*L,S=0}}p.xFn=function(O){return O.dx+t-(k+O.fontSize*S)*L+x*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*nM},p.anchorFn=function(O,V){return Ih(V)&&Math.abs(V)===90?"middle":P?"end":"start"},p.heightFn=function(O,V,G){return e.side==="right"&&(V*=-1),V<-30?-G:V<30?-.5*G:0}}return p};function PL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Qn.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll("path."+n).data(i,PL);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return oM.stroke(b0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),IL(t,[bse]),a.attr("transform",r.transFn)};Qn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",i=t.minor&&t.minor.showgrid,a=i?r.vals.filter(function(p){return p.minor}):[],o=t.showgrid?r.vals.filter(function(p){return!p.minor}):[],s=r.counterAxis;if(s&&Qn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;v--){var _=v?h:d;if(_){var b=_.selectAll("path."+n).data(v?o:a,PL);b.exit().remove(),b.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),b.attr("transform",r.transFn).attr("d",r.path).each(function(p){return oM.stroke(b0.select(this),p.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(p){return Xp.dashStyle(p.minor?t.minor.griddash:t.griddash,p.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(p){return(p.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}IL(t,[uB,cB])}};Qn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=Qn.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return Bst(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(oM.stroke,t.zerolinecolor||oM.defaultLine).style("stroke-width",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),IL(t,[lB])};Qn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=t.zerolinelayer==="above traces",o=r.cls||i+"tick",s=r.vals.filter(function(H){return H.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],PL),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(H){var te=b0.select(this),oe=e._promises.length;te.call(kb.positionText,l.xFn(H),l.yFn(H)).call(Xp.font,{family:H.font,size:H.fontSize,color:H.fontColor,weight:H.fontWeight,style:H.fontStyle,variant:H.fontVariant,textcase:H.fontTextcase,lineposition:H.fontLineposition,shadow:H.fontShadow}).text(H.text).call(kb.convertToTspans,e),e._promises[oe]?h.push(e._promises.pop().then(function(){d(te,u)})):d(te,u)}),IL(t,[fse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(H){b0.select(this).select("text").call(kb.positionText,l.xFn(H),l.yFn(H))});function d(H,te){H.each(function(oe){var _e=b0.select(this),Ee=_e.select(".text-math-group"),Ce=l.anchorFn(oe,te),me=r.transFn.call(_e.node(),oe)+(Ih(te)&&+te!=0?" rotate("+te+","+l.xFn(oe)+","+(l.yFn(oe)-oe.fontSize/2)+")":""),ie=kb.lineCount(_e),Se=lM*oe.fontSize,Le=l.heightFn(oe,Ih(te)?+te:0,(ie-1)*Se);if(Le&&(me+=F3(0,Le)),Ee.empty()){var Ae=_e.select("text");Ae.attr({transform:me,"text-anchor":Ce}),Ae.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Fe=Xp.bBox(Ee.node()).width,Pe=Fe*{end:-.5,start:.5}[Ce];Ee.attr("transform",me+F3(Pe,0))}})}t._adjustTickLabelsOverflow=function(){var H=t.ticklabeloverflow;if(!(!H||H==="allow")){var te=H.indexOf("hide")!==-1,oe=t._id.charAt(0)==="x",_e=0,Ee=oe?e._fullLayout.width:e._fullLayout.height;if(H.indexOf("domain")!==-1){var Ce=Jo.simpleMap(t.range,t.r2l);_e=t.l2p(Ce[0])+t._offset,Ee=t.l2p(Ce[1])+t._offset}var me=Math.min(_e,Ee),ie=Math.max(_e,Ee),Se=t.side,Le=1/0,Ae=-1/0;f.each(function(Re){var ce=b0.select(this),Ze=ce.select(".text-math-group");if(Ze.empty()){var ut=Xp.bBox(ce.node()),pt=0;oe?(ut.right>ie||ut.leftie||ut.top+(t.tickangle?0:Re.fontSize/4)t["_visibleLabelMin_"+Ce._id]?ce.style("display","none"):ie.K==="tick"&&!me&&ce.node().style.display!=="none"&&ce.style("display",null)})})})})},d(f,c+1?c:u);function v(){return h.length&&Promise.all(h)}var _=null;function b(){if(d(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){_=t.autotickangles[0];var H=0,te=[],oe,_e=1;f.each(function(wr){H=Math.max(H,wr.fontSize);var cr=t.l2p(wr.x),$e=hB(this),St=Xp.bBox($e.node());_e=Math.max(_e,kb.lineCount($e)),te.push({top:0,bottom:10,height:10,left:cr-St.width/2,right:cr+St.width/2+2,width:St.width+2})});var Ee=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,Ce=s.length,me=Math.abs((s[Ce-1].x-s[0].x)*t._m)/(Ce-1),ie=Ee?me/2:me,Se=Ee?t.ticklen:H*1.25*_e,Le=Math.sqrt(Math.pow(ie,2)+Math.pow(Se,2)),Ae=ie/Le,Fe=t.autotickangles.map(function(wr){return wr*Math.PI/180}),Pe=Fe.find(function(wr){return Math.abs(Math.cos(wr))<=Ae});Pe===void 0&&(Pe=Fe.reduce(function(wr,cr){return Math.abs(Math.cos(wr))Z*G&&(z=G,g[M]=P[M]=O[M])}var j=Math.abs(z-T);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),g[C]=E.p2r(E.r2p(P[C])+x*L),E.autorange==="min"||E.autorange==="max reversed"?(g[0]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0):(E.autorange==="max"||E.autorange==="min reversed")&&(g[1]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[E._name+".range"]=g}var N=Jo.syncOrAsync(p);return N&&N.then&&e._promises.push(N),N};function clt(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,PL);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(oM.stroke,t.dividercolor).style("stroke-width",Xp.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Qn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),i=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:n==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),i==="top"||i==="left")return a._offset;if(i==="bottom"||i==="right")return a._offset+a._length};function xse(e){var t=e.title.font.size,r=(e.title.text.match(kb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Lb+r*lM):r?t*(r+1)*lM:t}function flt(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(kb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Lb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(nM+s*lM));else{var l=cM(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(i==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=Qn.getPxPosition(e,t),f,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?c-o:c+o):(d=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var v;if(t.type!=="multicategory"){var _=t._selections[t._id+"tick"];if(v={selection:_,side:t.side},_&&_.node()&&_.node().parentNode){var b=Xp.getTranslate(_.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(v.pad=0)}return t._titleStandoff=o,Lst.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:v,transform:f,attributes:{x:h,y:d,"text-anchor":"middle"}})}Qn.shouldShowZeroLine=function(e,t,r){var n=Jo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===CL)&&(Cse(t,0)||!hlt(e,t,r,n)||dlt(e,t))};Qn.clipEnds=function(e,t){return t.filter(function(r){return Cse(e,r.x)})};function Cse(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=zst:/%L/.test(t)?e>=Fst:/%[SX]/.test(t)?e>=EL:/%M/.test(t)?e>=sM:/%[HI]/.test(t)?e>=xm:/%p/.test(t)?e>=s_:/%[Aadejuwx]/.test(t)?e>=Ov:/%[UVW]/.test(t)?e>=Zp:/%[Bbm]/.test(t)?e>=ML:/%[q]/.test(t)?e>=SL:/%[Yy]/.test(t)?e>=AL:!0}});var _B=ye((Xnr,Rse)=>{"use strict";Rse.exports=function(t,r,n){var i,a;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";i=n[o?1:0],a=n[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?i:void 0),l=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var xB=ye((Znr,Dse)=>{"use strict";var _lt=_B();Dse.exports=function(t,r,n,i){var a=r._template||{},o=r.type||a.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!i.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,i),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,i),c=n("autorange",u)),c&&(_lt(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var zse=ye((Ynr,Fse)=>{var xlt={left:0,top:0};Fse.exports=blt;function blt(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,i=e.clientY||0,a=wlt(t);return r[0]=n-a.left,r[1]=i-a.top,r}function wlt(e){return e===window||e===document||e===document.body?xlt:e.getBoundingClientRect()}});var RL=ye((Knr,Ose)=>{"use strict";var Tlt=rq();function Alt(){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}Ose.exports=Tlt&&Alt()});var Bse=ye((Jnr,qse)=>{"use strict";qse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var Vse=ye(($nr,Use)=>{"use strict";var Nse=Dr(),Slt=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Use.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Nse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Nse.constrain(Math.floor(r*3),0,2),Slt[r][t]}});var Hse=ye((Qnr,Gse)=>{"use strict";var Mlt=_3(),Elt=z6(),klt=NS().getGraphDiv,Clt=zS(),bB=Gse.exports={};bB.wrapped=function(e,t,r){e=klt(e),e._fullLayout&&Elt.clear(e._fullLayout._uid+Clt.HOVERID),bB.raw(e,t,r)};bB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Mlt.triggerHandler(t,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&i&&t.emit("plotly_unhover",{event:r,points:i}))}});var yv=ye((ear,Zse)=>{"use strict";var Llt=zse(),wB=nq(),Plt=RL(),Ilt=Dr().removeElement,Rlt=hd(),Pb=Zse.exports={};Pb.align=Bse();Pb.getCursor=Vse();var Wse=Hse();Pb.unhover=Wse.wrapped;Pb.unhoverRaw=Wse.raw;Pb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,Plt?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function v(E,S,L){return Math.abs(E)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var S;f.target===h?S=f:(S={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var x=f[L];!S[L]&&typeof x!="function"&&(S[L]=x)})),t.clickFn&&t.clickFn(n,S),d||h.dispatchEvent(new MouseEvent("click",E))}r._dragging=!1,r._dragged=!1}};function Xse(){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}Pb.coverSlip=Xse;function jse(e){return Llt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Sg=ye((tar,Yse)=>{"use strict";Yse.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var $se=ye((rar,Jse)=>{"use strict";var TB=Sg(),fM="data-savedcursor",Kse="!!";Jse.exports=function(t,r){var n=t.attr(fM);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var AB=ec(),Dlt=Lh();Qse.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Dlt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:AB({editType:"legend"}),grouptitlefont:AB({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:AB({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var FL=ye(DL=>{"use strict";DL.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};DL.isVertical=function(t){return t.orientation!=="h"};DL.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var EB=ye((aar,ele)=>{"use strict";var zL=qa(),Yp=Dr(),Flt=vl(),zlt=Gl(),Olt=SB(),qlt=c3(),MB=FL();function Blt(e,t,r,n){var i=t[e]||{},a=Flt.newContainer(r,e);function o(N,H){return Yp.coerce(i,a,Olt,N,H)}var s=Yp.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var l=o("visible");if(!l)return;var u,c=function(N,H){var te=u._input,oe=u;return Yp.coerce(te,oe,zlt,N,H)},f=r.font||{},h=Yp.coerceFont(o,"grouptitlefont",f,{overrideDflt:{size:Math.round(f.size*1.1)}}),d=0,v=!1,_="normal",b=(r.shapes||[]).filter(function(N){return N.showlegend});function p(N){return zL.traceIs(N,"pie-like")&&N._length!=null&&(Array.isArray(N.legend)||Array.isArray(N.showlegend))}n.filter(p).forEach(function(N){N.visible&&d++;for(var H=0;HN.legend.length)for(var oe=N.legend.length;oe(e==="legend"?1:0));if(L===!1&&(r[e]=void 0),!(L===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),L!==!1)){o("borderwidth");var x=o("orientation"),C=o("yref"),M=o("xref"),g=x==="h",P=C==="paper",T=M==="paper",z,O,V,G="left";g?(z=0,zL.getComponentMethod("rangeslider","isVisible")(t.xaxis)?P?(O=1.1,V="bottom"):(O=1,V="top"):P?(O=-.1,V="top"):(O=0,V="bottom")):(O=1,V="auto",T?z=1.02:(z=1,G="right")),Yp.coerce(i,a,{x:{valType:"number",editType:"legend",min:T?-2:0,max:T?3:1,dflt:z}},"x"),Yp.coerce(i,a,{y:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:O}},"y"),o("traceorder",_),MB.isGrouped(r[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",G),o("yanchor",V),o("maxheight"),o("valign"),Yp.noneOrAll(i,a,["x","y"]);var Z=o("title.text");if(Z){o("title.side",g?"left":"top");var j=Yp.extendFlat({},s,{size:Yp.bigFont(s.size)});Yp.coerceFont(o,"title.font",j)}}}ele.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var q3=qa(),CB=Dr(),Nlt=CB.pushUnique,kB=!0;tle.exports=function(t,r,n){var i=r._fullLayout;if(r._dragged||r._editing)return;var a=i.legend.itemclick,o=i.legend.itemdoubleclick,s=i.legend.groupclick;n===1&&a==="toggle"&&o==="toggleothers"&&kB&&r.data&&r._context.showTips&&CB.notifier(CB._(r,"Double-click on legend to isolate one trace"),"long"),kB=!1;var l;if(n===1?l=a:n===2&&(l=o),!l)return;var u=s==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],f=t.data()[0][0];if(f.groupTitle&&f.noClick)return;var h=r._fullData,d=(i.shapes||[]).filter(function(Gt){return Gt.showlegend}),v=h.concat(d),_=f.trace;_._isShape&&(_=_._fullInput);var b=_.legendgroup,p,k,E,S,L,x,C={},M=[],g=[],P=[];function T(Gt,Nt){var Jt=M.indexOf(Gt),sr=C.visible;return sr||(sr=C.visible=[]),M.indexOf(Gt)===-1&&(M.push(Gt),Jt=M.length-1),sr[Jt]=Nt,Jt}var z=(i.shapes||[]).map(function(Gt){return Gt._input}),O=!1;function V(Gt,Nt){z[Gt].visible=Nt,O=!0}function G(Gt,Nt){if(!(f.groupTitle&&!u)){var Jt=Gt._fullInput||Gt,sr=Jt._isShape,wr=Jt.index;wr===void 0&&(wr=Jt._index);var cr=Jt.visible===!1?!1:Nt;sr?V(wr,cr):T(wr,cr)}}var Z=_.legend,j=_._fullInput,N=j&&j._isShape;if(!N&&q3.traceIs(_,"pie-like")){var H=f.label,te=c.indexOf(H);if(l==="toggle")te===-1?c.push(H):c.splice(te,1);else if(l==="toggleothers"){var oe=te!==-1,_e=[];for(p=0;p{"use strict";ile.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var ole=ye((lar,ale)=>{"use strict";var nle=qa(),PB=FL();ale.exports=function(t,r,n){var i=r._inHover,a=PB.isGrouped(r),o=PB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function _(H,te,oe){if(r.visible!==!1&&!(n&&H!==r._id))if(te===""||!PB.isGrouped(r)){var _e="~~i"+f;l.push(_e),s[_e]=[oe],f++}else l.indexOf(te)===-1?(l.push(te),u=!0,s[te]=[oe]):s[te].push(oe)}for(d=0;dz&&(T=z)}g[d][0]._groupMinRank=T,g[d][0]._preGroupSort=d}var O=function(H,te){return H[0]._groupMinRank-te[0]._groupMinRank||H[0]._preGroupSort-te[0]._preGroupSort},V=function(H,te){return H.trace.legendrank-te.trace.legendrank||H._preSort-te._preSort};for(g.forEach(function(H,te){H[0]._preGroupSort=te}),g.sort(O),d=0;d{"use strict";var OL=Dr();function sle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Ib.formatPiePercent=function(t,r){var n=sle((t*100).toPrecision(3));return OL.numSeparate(n,r)+"%"};Ib.formatPieValue=function(t,r){var n=sle(t.toPrecision(10));return OL.numSeparate(n,r)};Ib.getFirstFilled=function(t,r){if(OL.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var Ult=So(),Vlt=ka();lle.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?Ult.pointStyle(t,n,i,r):Vlt.fill(t,r.color)}});var B3=ye((far,hle)=>{"use strict";var cle=ka(),fle=l_().castOption,Glt=ule();hle.exports=function(t,r,n,i){var a=n.marker.line,o=fle(a.color,r.pts)||cle.defaultLine,s=fle(a.width,r.pts)||0;t.call(Glt,r,n,i).style("stroke-width",s).call(cle.stroke,o)}});var FB=ye((har,yle)=>{"use strict";var qv=Oa(),IB=qa(),_v=Dr(),dle=_v.strTranslate,Kp=So(),w0=ka(),RB=pv().extractOpts,qL=Ru(),Hlt=B3(),jlt=l_().castOption,Wlt=LB(),vle=12,ple=5,Rb=2,Xlt=10,N3=5;yle.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+Wlt.itemGap*2)/2,l=dle(s,0),u=function(C,M,g,P){var T;if(C+1)T=C;else if(M&&M.width>0)T=M.width;else return 0;return a?P:Math.min(T,g)};t.each(function(C){var M=qv.select(this),g=_v.ensureSingle(M,"g","layers");g.style("opacity",C[0].trace.opacity);var P=n.indentation,T=n.valign,z=C[0].lineHeight,O=C[0].height;if(T==="middle"&&P===0||!z||!O)g.attr("transform",null);else{var V={top:1,bottom:-1}[T],G=V*(.5*(z-O+3))||0,Z=n.indentation;g.attr("transform",dle(Z,G))}var j=g.selectAll("g.legendfill").data([C]);j.enter().append("g").classed("legendfill",!0);var N=g.selectAll("g.legendlines").data([C]);N.enter().append("g").classed("legendlines",!0);var H=g.selectAll("g.legendsymbols").data([C]);H.enter().append("g").classed("legendsymbols",!0),H.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(x).each(h).each(v).each(d).each(b).each(S).each(E).each(c).each(f).each(p).each(k);function c(C){var M=gle(C),g=M.showFill,P=M.showLine,T=M.showGradientLine,z=M.showGradientFill,O=M.anyFill,V=M.anyLine,G=C[0],Z=G.trace,j,N,H=RB(Z),te=H.colorscale,oe=H.reversescale,_e=function(Ae){if(Ae.size())if(g)Kp.fillGroupStyle(Ae,r,!0);else{var Fe="legendfill-"+Z.uid;Kp.gradient(Ae,r,Fe,DB(oe),te,"fill")}},Ee=function(Ae){if(Ae.size()){var Fe="legendline-"+Z.uid;Kp.lineGroupStyle(Ae),Kp.gradient(Ae,r,Fe,DB(oe),te,"stroke")}},Ce=qL.hasMarkers(Z)||!O?"M5,0":V?"M5,-2":"M5,-3",me=qv.select(this),ie=me.select(".legendfill").selectAll("path").data(g||z?[C]:[]);if(ie.enter().append("path").classed("js-fill",!0),ie.exit().remove(),ie.attr("d",Ce+"h"+o+"v6h-"+o+"z").call(_e),P||T){var Se=u(void 0,Z.line,Xlt,ple);N=_v.minExtend(Z,{line:{width:Se}}),j=[_v.minExtend(G,{trace:N})]}var Le=me.select(".legendlines").selectAll("path").data(P||T?[j]:[]);Le.enter().append("path").classed("js-line",!0),Le.exit().remove(),Le.attr("d",Ce+(T?"l"+o+",0.0001":"h"+o)).call(P?Kp.lineGroupStyle:Ee)}function f(C){var M=gle(C),g=M.anyFill,P=M.anyLine,T=M.showLine,z=M.showMarker,O=C[0],V=O.trace,G=!z&&!P&&!g&&qL.hasText(V),Z,j;function N(ie,Se,Le,Ae){var Fe=_v.nestedProperty(V,ie).get(),Pe=_v.isArrayOrTypedArray(Fe)&&Se?Se(Fe):Fe;if(a&&Pe&&Ae!==void 0&&(Pe=Ae),Le){if(PeLe[1])return Le[1]}return Pe}function H(ie){return O._distinct&&O.index&&ie[O.index]?ie[O.index]:ie[0]}if(z||G||T){var te={},oe={};if(z){te.mc=N("marker.color",H),te.mx=N("marker.symbol",H),te.mo=N("marker.opacity",_v.mean,[.2,1]),te.mlc=N("marker.line.color",H),te.mlw=N("marker.line.width",_v.mean,[0,5],Rb),oe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _e=N("marker.size",_v.mean,[2,16],vle);te.ms=_e,oe.marker.size=_e}T&&(oe.line={width:N("line.width",H,[0,10],ple)}),G&&(te.tx="Aa",te.tp=N("textposition",H),te.ts=10,te.tc=N("textfont.color",H),te.tf=N("textfont.family",H),te.tw=N("textfont.weight",H),te.ty=N("textfont.style",H),te.tv=N("textfont.variant",H),te.tC=N("textfont.textcase",H),te.tE=N("textfont.lineposition",H),te.tS=N("textfont.shadow",H)),Z=[_v.minExtend(O,te)],j=_v.minExtend(V,oe),j.selectedpoints=null,j.texttemplate=null}var Ee=qv.select(this).select("g.legendpoints"),Ce=Ee.selectAll("path.scatterpts").data(z?Z:[]);Ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),Ce.exit().remove(),Ce.call(Kp.pointStyle,j,r),z&&(Z[0].mrc=3);var me=Ee.selectAll("g.pointtext").data(G?Z:[]);me.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),me.exit().remove(),me.selectAll("text").call(Kp.textPointStyle,j,r)}function h(C){var M=C[0].trace,g=M.type==="waterfall";if(C[0]._distinct&&g){var P=C[0].trace[C[0].dir].marker;return C[0].mc=P.color,C[0].mlw=P.line.width,C[0].mlc=P.line.color,_(C,this,"waterfall")}var T=[];M.visible&&g&&(T=C[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var z=qv.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(T);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(O){var V=qv.select(this),G=M[O[0]].marker,Z=u(void 0,G.line,N3,Rb);V.attr("d",O[1]).style("stroke-width",Z+"px").call(w0.fill,G.color),Z&&V.call(w0.stroke,G.line.color)})}function d(C){_(C,this)}function v(C){_(C,this,"funnel")}function _(C,M,g){var P=C[0].trace,T=P.marker||{},z=T.line||{},O=T.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",V=g?P.visible&&P.type===g:IB.traceIs(P,"bar"),G=qv.select(M).select("g.legendpoints").selectAll("path.legend"+g).data(V?[C]:[]);G.enter().append("path").classed("legend"+g,!0).attr("d",O).attr("transform",l),G.exit().remove(),G.each(function(Z){var j=qv.select(this),N=Z[0],H=u(N.mlw,T.line,N3,Rb);j.style("stroke-width",H+"px");var te=N.mcc;if(!n._inHover&&"mc"in N){var oe=RB(T),_e=oe.mid;_e===void 0&&(_e=(oe.max+oe.min)/2),te=Kp.tryColorscale(T,"")(_e)}var Ee=te||N.mc||T.color,Ce=T.pattern,me=Kp.getPatternAttr,ie=Ce&&(me(Ce.shape,0,"")||me(Ce.path,0,""));if(ie){var Se=me(Ce.bgcolor,0,null),Le=me(Ce.fgcolor,0,null),Ae=Ce.fgopacity,Fe=mle(Ce.size,8,10),Pe=mle(Ce.solidity,.5,1),ge="legend-"+P.uid;j.call(Kp.pattern,"legend",r,ge,ie,Fe,Pe,te,Ce.fillmode,Se,Le,Ae)}else j.call(w0.fill,Ee);H&&w0.stroke(j,N.mlc||z.color)})}function b(C){var M=C[0].trace,g=qv.select(this).select("g.legendpoints").selectAll("path.legendbox").data(M.visible&&IB.traceIs(M,"box-violin")?[C]:[]);g.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),g.exit().remove(),g.each(function(){var P=qv.select(this);if((M.boxpoints==="all"||M.points==="all")&&w0.opacity(M.fillcolor)===0&&w0.opacity((M.line||{}).color)===0){var T=_v.minExtend(M,{marker:{size:a?vle:_v.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});g.call(Kp.pointStyle,T,r)}else{var z=u(void 0,M.line,N3,Rb);P.style("stroke-width",z+"px").call(w0.fill,M.fillcolor),z&&w0.stroke(P,M.line.color)}})}function p(C){var M=C[0].trace,g=qv.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(M.visible&&M.type==="candlestick"?[C,C]:[]);g.enter().append("path").classed("legendcandle",!0).attr("d",function(P,T){return T?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,T){var z=qv.select(this),O=M[T?"increasing":"decreasing"],V=u(void 0,O.line,N3,Rb);z.style("stroke-width",V+"px").call(w0.fill,O.fillcolor),V&&w0.stroke(z,O.line.color)})}function k(C){var M=C[0].trace,g=qv.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(M.visible&&M.type==="ohlc"?[C,C]:[]);g.enter().append("path").classed("legendohlc",!0).attr("d",function(P,T){return T?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,T){var z=qv.select(this),O=M[T?"increasing":"decreasing"],V=u(void 0,O.line,N3,Rb);z.style("fill","none").call(Kp.dashLine,O.line.dash,V),V&&w0.stroke(z,O.line.color)})}function E(C){L(C,this,"pie")}function S(C){L(C,this,"funnelarea")}function L(C,M,g){var P=C[0],T=P.trace,z=g?T.visible&&T.type===g:IB.traceIs(T,g),O=qv.select(M).select("g.legendpoints").selectAll("path.legend"+g).data(z?[C]:[]);if(O.enter().append("path").classed("legend"+g,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),O.exit().remove(),O.size()){var V=T.marker||{},G=u(jlt(V.line.width,P.pts),V.line,N3,Rb),Z="pieLike",j=_v.minExtend(T,{marker:{line:{width:G}}},Z),N=_v.minExtend(P,{trace:j},Z);Hlt(O,N,j,r)}}function x(C){var M=C[0].trace,g,P=[];if(M.visible)switch(M.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],g=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],g=!0;break;case"densitymapbox":case"densitymap":P=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],g="radial";break;case"cone":P=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],g=!1;break;case"streamtube":P=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],g=!1;break;case"surface":P=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],g=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!0;break;case"isosurface":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],g=!1;break}var T=qv.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);T.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),T.exit().remove(),T.each(function(z,O){var V=qv.select(this),G=RB(M),Z=G.colorscale,j=G.reversescale,N=function(_e){if(_e.size()){var Ee="legendfill-"+M.uid;Kp.gradient(_e,r,Ee,DB(j,g==="radial"),Z,"fill")}},H;if(Z){if(!g){var oe=Z.length;H=O===0?Z[j?oe-1:0][1]:O===1?Z[j?0:oe-1][1]:Z[Math.floor((oe-1)/2)][1]}}else{var te=M.vertexcolor||M.facecolor||M.color;H=_v.isArrayOrTypedArray(te)?te[O]||te[0]:te}V.attr("d",z[0]),H?V.call(w0.fill,H):V.call(N)})}};function DB(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function gle(e){var t=e[0].trace,r=t.contours,n=qL.hasLines(t),i=qL.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function mle(e,t,r){return e&&_v.isArrayOrTypedArray(e)?t:e>r?r:e}});var BB=ye((dar,kle)=>{"use strict";var Mp=Oa(),Rh=Dr(),OB=Mc(),G3=qa(),_le=_3(),zB=yv(),Dh=So(),NL=ka(),Db=ru(),xle=rle(),ed=LB(),qB=$h(),Mle=qB.LINE_SPACING,V3=qB.FROM_TL,ble=qB.FROM_BR,wle=ole(),Zlt=FB(),Tle=FL(),U3=1,Ylt=/^legend[0-9]*$/;kle.exports=function(t,r){if(r)Ale(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=Mp.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(Ylt)&&i.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var v=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),OB.autoMargin(e,i);var _=Rh.ensureSingle(o,"g",i,function(M){s||M.attr("pointer-events","all")}),b=Rh.ensureSingleById(n._topdefs,"clipPath",a,function(M){M.append("rect")}),p=Rh.ensureSingle(_,"rect","bg",function(M){M.attr("shape-rendering","crispEdges")});p.call(NL.stroke,r.bordercolor).call(NL.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var k=Rh.ensureSingle(_,"g","scrollbox"),E=r.title;r._titleWidth=0,r._titleHeight=0;var S;E.text?(S=Rh.ensureSingle(k,"text",i+"titletext"),S.attr("text-anchor","start").call(Dh.font,E.font).text(E.text),UL(S,k,e,r,U3)):k.selectAll("."+i+"titletext").remove();var L=Rh.ensureSingle(_,"rect","scrollbar",function(M){M.attr(ed.scrollBarEnterAttrs).call(NL.fill,ed.scrollBarColor)}),x=k.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var C=x.selectAll("g.traces").data(Rh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(M){var g=M[0].trace;return G3.traceIs(g,"pie-like")?v.indexOf(M[0].label)!==-1?.5:1:g.visible==="legendonly"?.5:1}).each(function(){Mp.select(this).call(Jlt,e,r)}).call(Zlt,e,r).each(function(){s||Mp.select(this).call($lt,e,i)}),Rh.syncOrAsync([OB.previousPromises,function(){return tut(e,x,C,r)},function(){var M=n._size,g=r.borderwidth,P=r.xref==="paper",T=r.yref==="paper";if(E.text&&Klt(S,r,g),!s){var z,O;P?z=M.l+M.w*r.x-V3[VL(r)]*r._width:z=n.width*r.x-V3[VL(r)]*r._width,T?O=M.t+M.h*(1-r.y)-V3[GL(r)]*r._effHeight:O=n.height*(1-r.y)-V3[GL(r)]*r._effHeight;var V=rut(e,i,z,O);if(V)return;if(n.margin.autoexpand){var G=z,Z=O;z=P?Rh.constrain(z,0,n.width-r._width):G,O=T?Rh.constrain(O,0,n.height-r._effHeight):Z,z!==G&&Rh.log("Constrain "+i+".x to make legend fit inside graph"),O!==Z&&Rh.log("Constrain "+i+".y to make legend fit inside graph")}Dh.setTranslate(_,z,O)}if(L.on(".drag",null),_.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),p.attr({width:r._width-g,height:j-g,x:g/2,y:g/2}),Dh.setTranslate(k,0,0),b.select("rect").attr({width:r._width-2*g,height:j-2*g,x:g,y:g}),Dh.setClipUrl(k,a,e),Dh.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(ed.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),H=r._effHeight-N-2*ed.scrollBarMargin,te=r._height-r._effHeight,oe=H/te,_e=Math.min(r._scrollY||0,te);p.attr({width:r._width-2*g+ed.scrollBarWidth+ed.scrollBarMargin,height:r._effHeight-g,x:g/2,y:g/2}),b.select("rect").attr({width:r._width-2*g+ed.scrollBarWidth+ed.scrollBarMargin,height:r._effHeight-2*g,x:g,y:g+_e}),Dh.setClipUrl(k,a,e),Fe(_e,N,oe),_.on("wheel",function(){_e=Rh.constrain(r._scrollY+Mp.event.deltaY/te*H,0,te),Fe(_e,N,oe),_e!==0&&_e!==te&&Mp.event.preventDefault()});var Ee,Ce,me,ie=function(Ze,ut,pt){var Zt=(pt-ut)/oe+Ze;return Rh.constrain(Zt,0,te)},Se=function(Ze,ut,pt){var Zt=(ut-pt)/oe+Ze;return Rh.constrain(Zt,0,te)},Le=Mp.behavior.drag().on("dragstart",function(){var Ze=Mp.event.sourceEvent;Ze.type==="touchstart"?Ee=Ze.changedTouches[0].clientY:Ee=Ze.clientY,me=_e}).on("drag",function(){var Ze=Mp.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(Ze.type==="touchmove"?Ce=Ze.changedTouches[0].clientY:Ce=Ze.clientY,_e=ie(me,Ee,Ce),Fe(_e,N,oe))});L.call(Le);var Ae=Mp.behavior.drag().on("dragstart",function(){var Ze=Mp.event.sourceEvent;Ze.type==="touchstart"&&(Ee=Ze.changedTouches[0].clientY,me=_e)}).on("drag",function(){var Ze=Mp.event.sourceEvent;Ze.type==="touchmove"&&(Ce=Ze.changedTouches[0].clientY,_e=Se(me,Ee,Ce),Fe(_e,N,oe))});k.call(Ae)}function Fe(Ze,ut,pt){r._scrollY=e._fullLayout[i]._scrollY=Ze,Dh.setTranslate(k,0,-Ze),Dh.setRect(L,r._width,ed.scrollBarMargin+Ze*pt,ed.scrollBarWidth,ut),b.select("rect").attr("y",g+Ze)}if(e._context.edits.legendPosition){var Pe,ge,Re,ce;_.classed("cursor-move",!0),zB.init({element:_.node(),gd:e,prepFn:function(Ze){if(Ze.target!==L.node()){var ut=Dh.getTranslate(_);Re=ut.x,ce=ut.y}},moveFn:function(Ze,ut){if(Re!==void 0&&ce!==void 0){var pt=Re+Ze,Zt=ce+ut;Dh.setTranslate(_,pt,Zt),Pe=zB.align(pt,r._width,M.l,M.l+M.w,r.xanchor),ge=zB.align(Zt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Pe!==void 0&&ge!==void 0){var Ze={};Ze[i+".x"]=Pe,Ze[i+".y"]=ge,G3.call("_guiRelayout",e,Ze)}},clickFn:function(Ze,ut){var pt=o.selectAll("g.traces").filter(function(){var Zt=this.getBoundingClientRect();return ut.clientX>=Zt.left&&ut.clientX<=Zt.right&&ut.clientY>=Zt.top&&ut.clientY<=Zt.bottom});pt.size()>0&&Ele(e,_,pt,Ze,ut)}})}}],e)}}function BL(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||i)}function Ele(e,t,r,n,i){var a=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};a._group&&(o.group=a._group),G3.traceIs(a,"pie-like")&&(o.label=r.datum()[0].label);var s=_le.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(s===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&xle(r,e,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var l=_le.triggerHandler(e,"plotly_legenddoubleclick",o);l!==!1&&s!==!1&&xle(r,e,n)}}function Jlt(e,t,r){var n=HL(r),i=e.data()[0][0],a=i.trace,o=G3.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;i.groupTitle?(u=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?u=i.text:(u=o?i.label:a.name,a._meta&&(u=Rh.templateString(u,a._meta))));var f=Rh.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(Dh.font,c).text(s?Sle(u,l):u);var h=r.indentation+r.itemwidth+ed.itemGap*2;Db.positionText(f,h,0),s?f.call(Db.makeEditable,{gd:t,text:u}).call(UL,e,t,r).on("edit",function(d){this.text(Sle(d,l)).call(UL,e,t,r);var v=i.trace._fullInput||{},_={};return _.name=d,v._isShape?G3.call("_guiRelayout",t,"shapes["+a.index+"].name",_.name):G3.call("_guiRestyle",t,_,a.index)}):UL(f,e,t,r)}function Sle(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function $lt(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=Rh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(NL.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){i=new Date().getTime(),i-t._legendMouseDownTimen&&(a=Math.max(a-1,1)),Ele(t,s,e,a,Mp.event)}}))}function UL(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Db.convertToTspans(e,r,function(){Qlt(t,r,n,i)})}function Qlt(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=a[i.i]!==!1),!r._inHover&&i&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=HL(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===U3?c=r.title.font:i.groupTitle?c=i.groupTitle.font:c=r.font;var f=c.size*Mle,h,d;if(s){var v=Dh.bBox(s);h=v.height,d=v.width,n===U3?Dh.setTranslate(o,u,u+h*.75):Dh.setTranslate(o,0,h*.25)}else{var _="."+l+(n===U3?"title":"")+"text",b=e.select(_),p=Db.lineCount(b),k=b.node();if(h=f*p,d=k?Dh.bBox(k).width:0,n===U3)r.title.side==="left"&&(d+=ed.itemGap*2),Db.positionText(b,u+ed.titlePad,u+f);else{var E=ed.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(E=ed.itemGap,d-=r.indentation+r.itemwidth),Db.positionText(b,E,-f*((p-1)/2-.3))}}n===U3?(r._titleWidth=d,r._titleHeight=h):(i.lineHeight=f,i.height=Math.max(h,16)+3,i.width=d)}function eut(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function tut(e,t,r,n){var i=e._fullLayout,a=HL(n);n||(n=i[a]);var o=i._size,s=Tle.isVertical(n),l=Tle.isGrouped(n),u=n.entrywidthmode==="fraction",c=n.borderwidth,f=2*c,h=ed.itemGap,d=n.indentation+n.itemwidth+h*2,v=2*(c+h),_=GL(n),b=n.y<0||n.y===0&&_==="top",p=n.y>1||n.y===1&&_==="bottom",k=n.tracegroupgap,E={};let{orientation:S,yref:L}=n,{maxheight:x}=n,C=b||p||S!=="v"||L!=="paper";x||(x=C?.5:1);let M=C?i.height:o.h;n._maxHeight=Math.max(x>1?x:x*M,30);var g=0;n._width=0,n._height=0;var P=eut(n);if(s)r.each(function(Fe){var Pe=Fe[0].height;Dh.setTranslate(this,c+P[0],c+P[1]+n._height+Pe/2+h),n._height+=Pe,n._width=Math.max(n._width,Fe[0].width)}),g=d+n._width,n._width+=h+d+f,n._height+=v,l&&(t.each(function(Fe,Pe){Dh.setTranslate(this,0,Pe*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var T=VL(n),z=n.x<0||n.x===0&&T==="right",O=n.x>1||n.x===1&&T==="left",V=p||b,G=i.width/2;n._maxWidth=Math.max(z?V&&T==="left"?o.l+o.w:G:O?V&&T==="right"?o.r+o.w:G:o.w,2*d);var Z=0,j=0;r.each(function(Fe){var Pe=BL(Fe,n,d);Z=Math.max(Z,Pe),j+=Pe}),g=null;var N=0;if(l){var H=0,te=0,oe=0;t.each(function(){var Fe=0,Pe=0;Mp.select(this).selectAll("g.traces").each(function(Re){var ce=BL(Re,n,d),Ze=Re[0].height;Dh.setTranslate(this,P[0],P[1]+c+h+Ze/2+Pe),Pe+=Ze,Fe=Math.max(Fe,ce),E[Re[0].trace.legendgroup]=Fe});var ge=Fe+h;te>0&&ge+c+te>n._maxWidth?(N=Math.max(N,te),te=0,oe+=H+k,H=Pe):H=Math.max(H,Pe),Dh.setTranslate(this,te,oe),te+=ge}),n._width=Math.max(N,te)+c,n._height=oe+H+v}else{var _e=r.size(),Ee=j+f+(_e-1)*h=n._maxWidth&&(N=Math.max(N,Se),me=0,ie+=Ce,n._height+=Ce,Ce=0),Dh.setTranslate(this,P[0]+c+me,P[1]+c+ie+Pe/2+h),Se=me+ge+h,me+=Re,Ce=Math.max(Ce,Pe)}),Ee?(n._width=me+f,n._height=Ce+v):(n._width=Math.max(N,Se)+f,n._height+=Ce+v)}}n._width=Math.ceil(Math.max(n._width+P[0],n._titleWidth+2*(c+ed.titlePad))),n._height=Math.ceil(Math.max(n._height+P[1],n._titleHeight+2*(c+ed.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Le=e._context.edits,Ae=Le.legendText||Le.legendPosition;r.each(function(Fe){var Pe=Mp.select(this).select("."+a+"toggle"),ge=Fe[0].height,Re=Fe[0].trace.legendgroup,ce=BL(Fe,n,d);l&&Re!==""&&(ce=E[Re]);var Ze=Ae?d:g||ce;!s&&!u&&(Ze+=h/2),Dh.setRect(Pe,0,-ge/2,Ze,ge)})}function rut(e,t,r,n){var i=e._fullLayout,a=i[t],o=VL(a),s=GL(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(l&&u)return OB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*V3[o],r:a._width*ble[o],b:a._effHeight*ble[s],t:a._effHeight*V3[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 VL(e){return Rh.isRightAnchor(e)?"right":Rh.isCenterAnchor(e)?"center":"left"}function GL(e){return Rh.isBottomAnchor(e)?"bottom":Rh.isMiddleAnchor(e)?"middle":"top"}function HL(e){return e._id||"legend"}});var GB=ye(VB=>{"use strict";var Fb=Oa(),My=Eo(),Cle=cd(),zf=Dr(),iut=zf.pushUnique,NB=zf.strTranslate,nut=zf.strRotate,aut=_3(),T0=ru(),out=$se(),bm=So(),vd=ka(),jL=yv(),wm=ho(),sut=hd().zindexSeparator,j3=qa(),Mg=ip(),zb=zS(),lut=EB(),uut=BB(),Ole=zb.YANGLE,UB=Math.PI*Ole/180,cut=1/Math.sin(UB),fut=Math.cos(UB),hut=Math.sin(UB),Qc=zb.HOVERARROWSIZE,sl=zb.HOVERTEXTPAD,Lle={box:!0,ohlc:!0,violin:!0,candlestick:!0},dut={scatter:!0,scattergl:!0,splom:!0};function Ple(e,t){return e.distance-t.distance}VB.hover=function(t,r,n,i){t=zf.getGraphDiv(t);var a=r.target;zf.throttle(t._fullLayout._uid+zb.HOVERID,zb.HOVERMINTIME,function(){vut(t,r,n,i,a)})};VB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Vle(i),o=Gle(i),s=t.map(function(b){var p=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,E=b._y0||b.y0||b.y||0,S=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var x=Math.min(p,k),C=Math.max(p,k),M=Math.min(E,S),g=Math.max(E,S),P=b.trace;if(j3.traceIs(P,"gl3d")){var T=i._fullLayout[P.scene]._scene.container,z=T.offsetLeft,O=T.offsetTop;x+=z,C+=z,M+=O,g+=O}L.bbox={x0:x+o,x1:C+o,y0:M+a,y1:g+a},r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||vd.defaultLine,x0:b.x0||b.x||0,x1:b.x1||b.x||0,y0:b.y0||b.y||0,y1:b.y1||b.y||0,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:b.text,name:b.name,idealAlign:b.idealAlign,borderColor:b.borderColor,fontFamily:b.fontFamily,fontSize:b.fontSize,fontColor:b.fontColor,fontWeight:b.fontWeight,fontStyle:b.fontStyle,fontVariant:b.fontVariant,nameLength:b.nameLength,textAlign:b.textAlign,trace:b.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:b.hovertemplate||!1,hovertemplateLabels:b.hovertemplateLabels||!1,eventData:L}}),l=!1,u=Ble(s,{gd:i,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||vd.background,container:Fb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,p){return b.y0-p.y0}).each(function(b,p){var k=b.y0-b.by/2;k-fC[0]._length||ce<0||ce>M[0]._length)return jL.unhoverRaw(e,t)}if(t.pointerX=Re+C[0]._offset,t.pointerY=ce+M[0]._offset,"xval"in t?Z=Mg.flat(a,t.xval):Z=Mg.p2c(C,Re),"yval"in t?j=Mg.flat(a,t.yval):j=Mg.p2c(M,ce),!My(Z[0])||!My(j[0]))return zf.warn("Fx.hover failed",t,e),jL.unhoverRaw(e,t)}var pt=1/0;function Zt(wi,On){for(H=0;HLe&&(V.splice(0,Le),pt=V[0].distance),f&&O!==0&&V.length===0){Se.distance=O,Se.index=!1;var Ut=oe._module.hoverPoints(Se,me,ie,"closest",{hoverLayer:s._hoverlayer});if(Ut&&(Ut=Ut.filter(function(ri){return ri.spikeDistance<=O})),Ut&&Ut.length){var wt,rr=Ut.filter(function(ri){return ri.xa.showspikes&&ri.xa.spikesnap!=="hovered data"});if(rr.length){var nr=rr[0];My(nr.x0)&&My(nr.y0)&&(wt=lt(nr),(!Ae.vLinePoint||Ae.vLinePoint.spikeDistance>wt.spikeDistance)&&(Ae.vLinePoint=wt))}var Er=Ut.filter(function(ri){return ri.ya.showspikes&&ri.ya.spikesnap!=="hovered data"});if(Er.length){var Xr=Er[0];My(Xr.x0)&&My(Xr.y0)&&(wt=lt(Xr),(!Ae.hLinePoint||Ae.hLinePoint.spikeDistance>wt.spikeDistance)&&(Ae.hLinePoint=wt))}}}}}Zt();function st(wi,On,qn){for(var Fn=null,ra=1/0,la,Ut=0;Utwi.trace.index===It.trace.index):V=[It];var mt=V.length,er=zle("x",It,s),lr=zle("y",It,s);Zt(er,lr);var Tr=[],Lr={},ti=0,Br=function(wi){var On=Lle[wi.trace.type]?qle(wi):wi.trace.index;if(!Lr[On])ti++,Lr[On]=ti,Tr.push(wi);else{var qn=Lr[On]-1,Fn=Tr[qn];qn>0&&Math.abs(wi.distance)mt-1;Vr--)Br(V[Vr]);V=Tr,sr()}var dt=e._hoverdata,Ge=[],Je=Vle(e),je=Gle(e);for(let wi of V){var tt=Mg.makeEventData(wi,wi.trace,wi.cd);if(wi.hovertemplate!==!1){var xt=!1;wi.cd[wi.index]&&wi.cd[wi.index].ht&&(xt=wi.cd[wi.index].ht),wi.hovertemplate=xt||wi.trace.hovertemplate||!1}if(wi.xa&&wi.ya){var Ie=wi.x0+wi.xa._offset,xe=wi.x1+wi.xa._offset,ke=wi.y0+wi.ya._offset,vt=wi.y1+wi.ya._offset,ir=Math.min(Ie,xe),ar=Math.max(Ie,xe),vr=Math.min(ke,vt),ii=Math.max(ke,vt);tt.bbox={x0:ir+je,x1:ar+je,y0:vr+Je,y1:ii+Je}}wi.eventData=[tt],Ge.push(tt)}e._hoverdata=Ge;var pi=h==="y"&&(G.length>1||V.length>1)||h==="closest"&&Fe&&V.length>1,$r=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),di=Ble(V,{gd:e,hovermode:h,rotateLabels:pi,bgColor:$r,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),ji=di.hoverLabels;if(Mg.isUnifiedHover(h)||(gut(ji,pi,s,di.commonLabelBoundingBox),Ule(ji,pi,s._invScaleX,s._invScaleY)),i&&i.tagName){var In=j3.getComponentMethod("annotations","hasClickToShow")(e,Ge);out(Fb.select(i),In?"pointer":"")}!i||n||!_ut(e,t,dt)||(dt&&e.emit("plotly_unhover",{event:t,points:dt}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:Z,yvals:j}))}function qle(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 put=/([\s\S]*)<\/extra>/;function Ble(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||zb.HOVERFONT,f=t.fontSize||zb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,v=t.fontVariant||n.font.variant,_=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,p=t.fontShadow||n.font.shadow,k=e[0],E=k.xa,S=k.ya,L=i.charAt(0),x=L+"Label",C=k[x];if(C===void 0&&E.type==="multicategory")for(var M=0;Mn.width-Je&&(je=n.width-Je),It.attr("d","M"+(Vr-je)+",0L"+(Vr-je+Qc)+","+Ge+Qc+"H"+Je+"v"+Ge+(sl*2+Br.height)+"H"+-Je+"V"+Ge+Qc+"H"+(Vr-je-Qc)+"Z"),Vr=je,H.minX=Vr-Je,H.maxX=Vr+Je,E.side==="top"?(H.minY=dt-(sl*2+Br.height),H.maxY=dt-sl):(H.minY=dt+sl,H.maxY=dt+(sl*2+Br.height))}else{var tt,xt,Ie;S.side==="right"?(tt="start",xt=1,Ie="",Vr=E._offset+E._length):(tt="end",xt=-1,Ie="-",Vr=E._offset),dt=S._offset+(k.y0+k.y1)/2,mt.attr("text-anchor",tt),It.attr("d","M0,0L"+Ie+Qc+","+Qc+"V"+(sl+Br.height/2)+"h"+Ie+(sl*2+Br.width)+"V-"+(sl+Br.height/2)+"H"+Ie+Qc+"V-"+Qc+"Z"),H.minY=dt-(sl+Br.height/2),H.maxY=dt+(sl+Br.height/2),S.side==="right"?(H.minX=Vr+Qc,H.maxX=Vr+Qc+(sl*2+Br.width)):(H.minX=Vr-Qc-(sl*2+Br.width),H.maxX=Vr-Qc);var xe=Br.height/2,ke=P-Br.top-xe,vt="clip"+n._uid+"commonlabel"+S._id,ir;if(VrIt.hoverinfo!=="none");if(_t.length===0)return[];var te=n.hoverlabel,oe=te.font,_e=_t[0],Ee=((i==="x unified"?_e.xa:_e.ya).unifiedhovertitle||{}).text,Ce=Ee?zf.hovertemplateString({data:i==="x unified"?[{xa:_e.xa,x:_e.xVal}]:[{ya:_e.ya,y:_e.yVal}],fallback:_e.trace.hovertemplatefallback,locale:n._d3locale,template:Ee}):C,me={showlegend:!0,legend:{title:{text:Ce,font:oe},font:oe,bgcolor:te.bgcolor,bordercolor:te.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},ie={font:oe};lut(me,ie,r._fullData);var Se=ie.legend;Se.entries=[];for(var Le=0;Le<_t.length;Le++){var Ae=_t[Le];if(Ae.hoverinfo!=="none"){var Fe=Ile(Ae,!0,i,n,C),Pe=Fe[0],ge=Fe[1];Ae.name=ge,ge!==""?Ae.text=ge+" : "+Pe:Ae.text=Pe;var Re=Ae.cd[Ae.index];Re&&(Re.mc&&(Ae.mc=Re.mc),Re.mcc&&(Ae.mc=Re.mcc),Re.mlc&&(Ae.mlc=Re.mlc),Re.mlcc&&(Ae.mlc=Re.mlcc),Re.mlw&&(Ae.mlw=Re.mlw),Re.mrc&&(Ae.mrc=Re.mrc),Re.dir&&(Ae.dir=Re.dir)),Ae._distinct=!0,Se.entries.push([Ae])}}Se.entries.sort(function(It,mt){return It[0].trace.index-mt[0].trace.index}),Se.layer=s,Se._inHover=!0,Se._groupTitleFont=te.grouptitlefont,uut(r,Se);var ce=s.select("g.legend"),Ze=H3(r,ce.node()),ut=Ze.width+2*sl,pt=Ze.height+2*sl,Zt=_t[0],st=(Zt.x0+Zt.x1)/2,lt=(Zt.y0+Zt.y1)/2,Gt=!(j3.traceIs(Zt.trace,"bar-like")||j3.traceIs(Zt.trace,"box-violin")),Nt,Jt;L==="y"?Gt?(Jt=lt-sl,Nt=lt+sl):(Jt=Math.min.apply(null,_t.map(function(It){return Math.min(It.y0,It.y1)})),Nt=Math.max.apply(null,_t.map(function(It){return Math.max(It.y0,It.y1)}))):Jt=Nt=zf.mean(_t.map(function(It){return(It.y0+It.y1)/2}))-pt/2;var sr,wr;L==="x"?Gt?(sr=st+sl,wr=st-sl):(sr=Math.max.apply(null,_t.map(function(It){return Math.max(It.x0,It.x1)})),wr=Math.min.apply(null,_t.map(function(It){return Math.min(It.x0,It.x1)}))):sr=wr=zf.mean(_t.map(function(It){return(It.x0+It.x1)/2}))-ut/2;var cr=E._offset,$e=S._offset;Nt+=$e,sr+=cr,wr+=cr-ut,Jt+=$e-pt;var St,Qt;return sr+ut=0?St=sr:wr+ut=0?St=wr:cr+ut=0?Qt=Nt:Jt+pt=0?Qt=Jt:$e+pt=0,(_t.idealAlign==="top"||!ii)&&pi?(Ie-=ke/2,_t.anchor="end"):ii?(Ie+=ke/2,_t.anchor="start"):_t.anchor="middle",_t.crossPos=Ie;else{if(_t.pos=Ie,ii=xt+xe/2+vr<=T,pi=xt-xe/2-vr>=0,(_t.idealAlign==="left"||!ii)&&pi)xt-=xe/2,_t.anchor="end";else if(ii)xt+=xe/2,_t.anchor="start";else{_t.anchor="middle";var $r=vr/2,di=xt+$r-T,ji=xt-$r;di>0&&(xt-=di),ji<0&&(xt+=-ji)}_t.crossPos=xt}dt.attr("text-anchor",_t.anchor),Je&&Ge.attr("text-anchor",_t.anchor),It.attr("transform",NB(xt,Ie)+(a?nut(Ole):""))}),{hoverLabels:Vt,commonLabelBoundingBox:H}}function Ile(e,t,r,n,i,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=zf.templateString(e.name,e.trace._meta)),o=Fle(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!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===i?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+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 d=e.hovertemplateLabels||e;e[l+"Label"]!==i&&(d[l+"other"]=d[l+"Val"],d[l+"otherLabel"]=d[l+"Label"]),s=zf.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:n._d3locale,template:c}),s=s.replace(put,(v,_)=>(o=Fle(_,e.nameLength),""))}return[s,o]}function gut(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,d=n.minY,v=n.maxY,_=function(Z){return Z*r._invScaleX},b=function(Z){return Z*r._invScaleY};e.each(function(Z){var j=Z[i],N=Z[a],H=j._id.charAt(0)==="x",te=j.range;c===0&&te&&te[0]>te[1]!==H&&(s=-1);var oe=0,_e=H?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var Ee=Nle(Z,t),Ce=Z.anchor,me=Ce==="end"?-1:1,ie,Se;if(Ce==="middle")ie=Z.crossPos+(H?b(Ee.y-Z.by/2):_(Z.bx/2+Z.tx2width/2)),Se=ie+(H?b(Z.by):_(Z.bx));else if(H)ie=Z.crossPos+b(Qc+Ee.y)-b(Z.by/2-Qc),Se=ie+b(Z.by);else{var Le=_(me*Qc+Ee.x),Ae=Le+_(me*Z.bx);ie=Z.crossPos+Math.min(Le,Ae),Se=Z.crossPos+Math.max(Le,Ae)}H?d!==void 0&&v!==void 0&&Math.min(Se,v)-Math.max(ie,d)>1&&(N.side==="left"?(oe=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Se,h)-Math.max(ie,f)>1&&(N.side==="top"?(oe=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:Z,traceIndex:Z.trace.index,dp:0,pos:Z.pos,posref:Z.posref,size:Z.by*(H?cut:1)/2,pmin:oe,pmax:_e}]}),u.sort(function(Z,j){return Z[0].posref-j[0].posref||s*(j[0].traceIndex-Z[0].traceIndex)});var p,k,E,S,L,x,C;function M(Z){var j=Z[0],N=Z[Z.length-1];if(k=j.pmin-j.pos-j.dp+j.size,E=N.pos+N.dp+N.size-j.pmax,k>.01){for(L=Z.length-1;L>=0;L--)Z[L].dp+=k;p=!1}if(!(E<.01)){if(k<-.01){for(L=Z.length-1;L>=0;L--)Z[L].dp-=E;p=!1}if(p){var H=0;for(S=0;Sj.pmax&&H++;for(S=Z.length-1;S>=0&&!(H<=0);S--)x=Z[S],x.pos>j.pmax-1&&(x.del=!0,H--);for(S=0;S=0;L--)Z[L].dp-=E;for(S=Z.length-1;S>=0&&!(H<=0);S--)x=Z[S],x.pos+x.dp+x.size>j.pmax&&(x.del=!0,H--)}}}for(;!p&&o<=l;){for(o++,p=!0,S=0;S.01){for(L=P.length-1;L>=0;L--)P[L].dp+=k;for(g.push.apply(g,P),u.splice(S+1,1),C=0,L=g.length-1;L>=0;L--)C+=g[L].dp;for(E=C/g.length,L=g.length-1;L>=0;L--)g[L].dp-=E;p=!1}else S++}u.forEach(M)}for(S=u.length-1;S>=0;S--){var O=u[S];for(L=O.length-1;L>=0;L--){var V=O[L],G=V.datum;G.offset=V.dp,G.del=V.del}}}function Nle(e,t){var r=0,n=e.offset;return t&&(n*=-hut,r=e.offset*fut),{x:r,y:n}}function mut(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Qc+sl),n=r+t*(e.txwidth+sl),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+sl),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Ule(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Fb.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=mut(o),h=Nle(o,t),d=h.x,v=h.y,_=u==="middle",b="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,p;_?p="M-"+i(o.bx/2+o.tx2width/2)+","+a(v-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":b?p="M0,0L"+i(c*Qc+d)+","+a(Qc+v)+"v"+a(o.by/2-Qc)+"h"+i(c*o.bx)+"v-"+a(o.by)+"H"+i(c*Qc+d)+"V"+a(v-Qc)+"Z":p="M"+i(c*Qc+d)+","+a(v-o.by/2)+"h"+i(c*o.bx)+"v"+a(o.by)+"h"+i(-c*o.bx)+"Z",s.select("path").attr("d",p);var k=d+f.textShiftX,E=v+o.ty0-o.by/2+sl,S=o.textAlign||"auto";S!=="auto"&&(S==="left"&&u!=="start"?(l.attr("text-anchor","start"),k=_?-o.bx/2-o.tx2width/2+sl:-o.bx-sl):S==="right"&&u!=="end"&&(l.attr("text-anchor","end"),k=_?o.bx/2-o.tx2width/2-sl:o.bx+sl)),l.call(T0.positionText,i(k),a(E)),o.tx2width&&(s.select("text.name").call(T0.positionText,i(f.text2ShiftX+f.alignShift*sl+d),a(v+o.ty0-o.by/2+sl)),s.select("rect").call(bm.setRect,i(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(v-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function yut(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||My(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=zf.castOption(i,r,h);return o(v)?v:zf.extractOption({},n,"",d)}:function(h,d){return zf.extractOption(a,n,h,d)};function l(h,d,v){var _=s(d,v);o(_)&&(e[h]=_)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=zf.constrain(e.x0,0,e.xa._length),e.x1=zf.constrain(e.x1,0,e.xa._length),e.y0=zf.constrain(e.y0,0,e.ya._length),e.y1=zf.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:wm.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:wm.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=wm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+wm.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=wm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+wm.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 Rle(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var _=c.spikesnap;_==="cursor"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=Cle.readability(h.color,f)<1.5?vd.contrast(f):h.color,p=c.spikemode,k=c.spikethickness,E=c.spikecolor||b,S=wm.getPxPosition(e,c),L,x;if(p.indexOf("toaxis")!==-1||p.indexOf("across")!==-1){if(p.indexOf("toaxis")!==-1&&(L=S,x=d),p.indexOf("across")!==-1){var C=c._counterDomainMin,M=c._counterDomainMax;c.anchor==="free"&&(C=Math.min(C,c.position),M=Math.max(M,c.position)),L=a.l+C*a.w,x=a.l+M*a.w}n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k,stroke:E,"stroke-dasharray":bm.dashStyle(c.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}p.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:S+(c.side!=="right"?k:-k),cy:v,r:k,fill:E}).classed("spikeline",!0)}if(l){var g=t.vLinePoint,P,T;u=g&&g.xa,c=g&&g.ya;var z=u.spikesnap;z==="cursor"?(P=o.pointerX,T=o.pointerY):(P=u._offset+g.x,T=c._offset+g.y);var O=Cle.readability(g.color,f)<1.5?vd.contrast(f):g.color,V=u.spikemode,G=u.spikethickness,Z=u.spikecolor||O,j=wm.getPxPosition(e,u),N,H;if(V.indexOf("toaxis")!==-1||V.indexOf("across")!==-1){if(V.indexOf("toaxis")!==-1&&(N=j,H=T),V.indexOf("across")!==-1){var te=u._counterDomainMin,oe=u._counterDomainMax;u.anchor==="free"&&(te=Math.min(te,u.position),oe=Math.max(oe,u.position)),N=a.t+(1-oe)*a.h,H=a.t+(1-te)*a.h}n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G,stroke:Z,"stroke-dasharray":bm.dashStyle(u.spikedash,G)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}V.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:P,cy:j-(u.side!=="top"?G:-G),r:G,fill:Z}).classed("spikeline",!0)}}}function _ut(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function Dle(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Fle(e,t){return T0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function xut(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;oe.offsetTop+e.clientTop,Gle=e=>e.offsetLeft+e.clientLeft;function H3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,l=zf.apply3DTransform(r._invTransform)(i,a),u=zf.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var hM=ye((gar,Hle)=>{"use strict";var but=Dr(),wut=ka(),Tut=ip().isUnifiedHover;Hle.exports=function(t,r,n,i){i=i||{};var a=r.legend;function o(s){i.font[s]||(i.font[s]=a?r.legend.font[s]:r.font[s])}r&&Tut(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=wut.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",i.bgcolor),n("hoverlabel.bordercolor",i.bordercolor),n("hoverlabel.namelength",i.namelength),n("hoverlabel.showarrow",i.showarrow),but.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Wle=ye((mar,jle)=>{"use strict";var Aut=Dr(),Sut=hM(),Mut=B1();jle.exports=function(t,r){function n(i,a){return Aut.coerce(t,r,Mut,i,a)}Sut(t,r,n)}});var Yle=ye((yar,Zle)=>{"use strict";var Xle=Dr(),Eut=a3(),kut=hM();Zle.exports=function(t,r,n,i){function a(s,l){return Xle.coerce(t,r,Eut,s,l)}var o=Xle.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),kut(t,r,a,o)}});var HB=ye((_ar,Kle)=>{"use strict";var Cut=Dr(),Lut=B1();Kle.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Cut.coerce(t,r,Lut,i,a)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var Qle=ye((xar,$le)=>{"use strict";var Jle=Dr(),Put=B1(),Iut=HB(),Rut=hM();$le.exports=function(t,r){function n(c,f){return Jle.coerce(t,r,Put,c,f)}var i=Iut(t,r);i&&(n("hoverdistance"),n("spikedistance"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),l=r._has("geo"),u=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||l)&&u===1||(o||s)&&l&&u===2)&&(r.dragmode="pan"),Rut(t,r,n),Jle.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var rue=ye((bar,tue)=>{"use strict";var jB=Dr(),eue=qa();tue.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return jB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a{"use strict";var Fut=qa(),zut=GB().hover;iue.exports=function(t,r,n){var i=Fut.getComponentMethod("annotations","onClick")(t,t._hoverdata);n!==void 0&&zut(t,r,n,!0);function a(){t.emit("plotly_click",{points:t._hoverdata,event:r})}t._hoverdata&&r&&r.target&&(i&&i.then?i.then(a):a(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var vf=ye((Tar,sue)=>{"use strict";var Out=Oa(),WL=Dr(),qut=yv(),dM=ip(),aue=B1(),oue=GB();sue.exports={moduleType:"component",name:"fx",constants:zS(),schema:{layout:aue},attributes:a3(),layoutAttributes:aue,supplyLayoutGlobalDefaults:Wle(),supplyDefaults:Yle(),supplyLayoutDefaults:Qle(),calc:rue(),getDistanceFunction:dM.getDistanceFunction,getClosest:dM.getClosest,inbox:dM.inbox,quadrature:dM.quadrature,appendArrayPointValue:dM.appendArrayPointValue,castHoverOption:Nut,castHoverinfo:Uut,hover:oue.hover,unhover:qut.unhover,loneHover:oue.loneHover,loneUnhover:But,click:nue()};function But(e){var t=WL.isD3Selection(e)?e:Out.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function Nut(e,t,r){return WL.castOption(e,t,"hoverlabel."+r)}function Uut(e,t,r){function n(i){return WL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return WL.castOption(e,r,"hoverinfo",n)}});var Eg=ye(Ey=>{"use strict";Ey.selectMode=function(e){return e==="lasso"||e==="select"};Ey.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ey.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Ey.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ey.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Ey.selectingOrDrawing=function(e){return Ey.freeMode(e)||Ey.rectMode(e)}});var vM=ye((Sar,lue)=>{"use strict";lue.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var XL=ye((Mar,uue)=>{"use strict";uue.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var YL=ye((Ear,cue)=>{"use strict";var ZL=32;cue.exports={CIRCLE_SIDES:ZL,i000:0,i090:ZL/4,i180:ZL/2,i270:ZL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var KL=ye((kar,hue)=>{"use strict";var Vut=Dr().strTranslate;function fue(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 Gut(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 Hut(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return fue(e,r[t])}}function jut(e){return Vut(e.xaxis._offset,e.yaxis._offset)}hue.exports={p2r:fue,r2p:Gut,axValue:Hut,getTransform:jut}});var u_=ye(ky=>{"use strict";var Wut=eM(),pue=YL(),W3=pue.CIRCLE_SIDES,WB=pue.SQRT2,gue=KL(),due=gue.p2r,vue=gue.r2p,Xut=[0,3,4,5,6,1,2],Zut=[0,3,4,1,2];ky.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var mue=hf(),wue=Eg(),Yut=wue.drawMode,Kut=wue.openMode,X3=YL(),yue=X3.i000,_ue=X3.i090,xue=X3.i180,bue=X3.i270,Jut=X3.cos45,$ut=X3.sin45,Tue=KL(),$L=Tue.p2r,c_=Tue.r2p,Qut=Q1(),ect=Qut.clearOutline,QL=u_(),tct=QL.readPaths,rct=QL.writePaths,ict=QL.ellipseOver,nct=QL.fixDatesForPaths;function act(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,i=t.isActiveShape,a=t.dragmode,o=(n.layout||{}).shapes||[];if(!Yut(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var oct=Eg(),sct=oct.selectMode,lct=Q1(),uct=lct.clearOutline,XB=u_(),cct=XB.readPaths,fct=XB.writePaths,hct=XB.fixDatesForPaths;Mue.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var i=n.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!sct(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";Eue.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var f_=ye(Dd=>{"use strict";var Ob=gM(),kue=Dr(),tP=ho();Dd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Dd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Dd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Dd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Dd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Ob.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(Ob.paramRE);if(!(!s||s.lengthd&&(_="X"),_});return u>d&&(v=v.replace(/[\s,]*X.*/,""),kue.log("Ignoring extra params in segment "+l)),c+v})}function mM(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 KB=ye((Dar,Iue)=>{"use strict";var vct=Dr(),Z3=ho(),Cue=ru(),Lue=So(),pct=u_().readPaths,YB=f_(),gct=YB.getPathString,Pue=M6(),mct=$h().FROM_TL;Iue.exports=function(t,r,n,i){if(i.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var a;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Z3.getFromId(t,n.xref),l=Z3.getFromId(t,n.yref);for(var u in Pue){var c=Pue[u](n,s,l);c!==void 0&&(o[u]=c)}}a=vct.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else a=n.label.text;var f={"data-index":r},h=n.label.font,d={"data-notex":1},v=i.append("g").attr(f).classed("shape-label",!0),_=v.append("text").attr(d).classed("shape-label-text",!0).text(a),b,p,k,E;if(n.path){var S=gct(t,n),L=pct(S,t);b=1/0,k=1/0,p=-1/0,E=-1/0;for(var x=0;x=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function _ct(e,t,r,n,i,a,o){var s=i.label.textposition,l=i.label.textangle,u=i.label.padding,c=i.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),v=i.label.xanchor,_=i.label.yanchor,b,p,k,E;if(c==="line"){s==="start"?(b=e,p=t):s==="end"?(b=r,p=n):(b=(e+r)/2,p=(t+n)/2),v==="auto"&&(s==="start"?l==="auto"?r>e?v="left":re?v="right":re?v="right":re?v="left":r{"use strict";var xct=Dr(),bct=xct.strTranslate,Rue=yv(),zue=Eg(),wct=zue.drawMode,Oue=zue.selectMode,que=qa(),Due=ka(),iP=YL(),Tct=iP.i000,Act=iP.i090,Sct=iP.i180,Mct=iP.i270,Ect=Q1(),Bue=Ect.clearOutlineControllers,$B=u_(),rP=$B.pointsOnRectangle,JB=$B.pointsOnEllipse,kct=$B.writePaths,Cct=eP().newShapes,Lct=eP().createShapeObj,Pct=ZB(),Ict=KB();Nue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(JB(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=Cct(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=Pct(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&que.call((j||{}).redrawing?"relayout":"_guiRelayout",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=wct(c),h=Oue(c);(f||h)&&(a._fullLayout._outlining=!0),Bue(a),r.attr("d",kct(t));var d,v,_,b,p;if(!i&&(n.isActiveShape||n.isActiveSelection)){p=Rct([],t);var k=u.append("g").attr("class","outline-controllers");P(k),Z()}if(f&&n.hasText){var E=u.select(".label-temp"),S=Lct(r,n,n.dragmode);Ict(a,"label-temp",S,E)}function L(j){_=+j.srcElement.getAttribute("data-i"),b=+j.srcElement.getAttribute("data-j"),d[_][b].moveFn=x}function x(j,N){if(t.length){var H=p[_][b][1],te=p[_][b][2],oe=t[_],_e=oe.length;if(rP(oe)){var Ee=j,Ce=N;if(n.isActiveSelection){var me=Fue(oe,b);me[1]===oe[b][1]?Ce=0:Ee=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Se=oe[ie];Se[1]===oe[b][1]&&(Se[1]=H+Ee),Se[2]===oe[b][2]&&(Se[2]=te+Ce)}if(oe[b][1]=H+Ee,oe[b][2]=te+Ce,!rP(oe))for(var Le=0;Le<_e;Le++)for(var Ae=0;Ae1&&!(j.length===2&&j[1][0]==="Z")&&(b===0&&(j[0][0]="M"),t[_]=j,o(),s())}}function g(j,N){if(j===2){_=+N.srcElement.getAttribute("data-i"),b=+N.srcElement.getAttribute("data-j");var H=t[_];!rP(H)&&!JB(H)&&M()}}function P(j){d=[];for(var N=0;N{"use strict";var Fct=Oa(),Wue=qa(),Uue=Dr(),Y3=ho(),zct=u_().readPaths,Oct=nP(),oP=KB(),Xue=Q1().clearOutlineControllers,QB=ka(),tN=So(),qct=vl().arrayEditor,Vue=yv(),Gue=Sg(),qb=gM(),Ep=f_(),eN=Ep.getPathString;Kue.exports={draw:rN,drawOne:Zue,eraseActiveShape:Uct,drawLabel:oP};function rN(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;io&&Nt>s&&!st.shiftKey?Vue.getCursor(Jt/Gt,1-sr/Nt):"move";Gue(t,wr),Se=wr.split("-")[0]}}function Pe(st){aP(e)||(l&&(p=oe(r.xanchor)),u&&(k=_e(r.yanchor)),r.type==="path"?T=r.path:(d=l?r.x0:oe(r.x0),v=u?r.y0:_e(r.y0),_=l?r.x1:oe(r.x1),b=u?r.y1:_e(r.y1)),d<_?(L=d,g="x0",x=_,P="x1"):(L=_,g="x1",x=d,P="x0"),!u&&vb?(E=v,C="y0",S=b,M="y1"):(E=b,C="y1",S=v,M="y0"),Fe(st),ut(i,r),Zt(t,r,e),ie.moveFn=Se==="move"?ce:Ze,ie.altKey=st.altKey)}function ge(){aP(e)||(Gue(t),pt(i),Yue(t,e,r),Wue.call("_guiRelayout",e,a.getUpdateObj()))}function Re(){aP(e)||pt(i)}function ce(st,lt){if(r.type==="path"){var Gt=function(sr){return sr},Nt=Gt,Jt=Gt;l?h("xanchor",r.xanchor=Ee(p+st)):(Nt=function(wr){return Ee(oe(wr)+st)},O&&O.type==="date"&&(Nt=Ep.encodeDate(Nt))),u?h("yanchor",r.yanchor=Ce(k+lt)):(Jt=function(wr){return Ce(_e(wr)+lt)},G&&G.type==="date"&&(Jt=Ep.encodeDate(Jt))),h("path",r.path=Hue(T,Nt,Jt))}else l?h("xanchor",r.xanchor=Ee(p+st)):(h("x0",r.x0=Ee(d+st)),h("x1",r.x1=Ee(_+st))),u?h("yanchor",r.yanchor=Ce(k+lt)):(h("y0",r.y0=Ce(v+lt)),h("y1",r.y1=Ce(b+lt)));t.attr("d",eN(e,r)),ut(i,r),oP(e,n,r,z)}function Ze(st,lt){if(f){var Gt=function(Lr){return Lr},Nt=Gt,Jt=Gt;l?h("xanchor",r.xanchor=Ee(p+st)):(Nt=function(ti){return Ee(oe(ti)+st)},O&&O.type==="date"&&(Nt=Ep.encodeDate(Nt))),u?h("yanchor",r.yanchor=Ce(k+lt)):(Jt=function(ti){return Ce(_e(ti)+lt)},G&&G.type==="date"&&(Jt=Ep.encodeDate(Jt))),h("path",r.path=Hue(T,Nt,Jt))}else if(c){if(Se==="resize-over-start-point"){var sr=d+st,wr=u?v-lt:v+lt;h("x0",r.x0=l?sr:Ee(sr)),h("y0",r.y0=u?wr:Ce(wr))}else if(Se==="resize-over-end-point"){var cr=_+st,$e=u?b-lt:b+lt;h("x1",r.x1=l?cr:Ee(cr)),h("y1",r.y1=u?$e:Ce($e))}}else{var St=function(Lr){return Se.indexOf(Lr)!==-1},Qt=St("n"),Vt=St("s"),_t=St("w"),It=St("e"),mt=Qt?E+lt:E,er=Vt?S+lt:S,lr=_t?L+st:L,Tr=It?x+st:x;u&&(Qt&&(mt=E-lt),Vt&&(er=S-lt)),(!u&&er-mt>s||u&&mt-er>s)&&(h(C,r[C]=u?mt:Ce(mt)),h(M,r[M]=u?er:Ce(er))),Tr-lr>o&&(h(g,r[g]=l?lr:Ee(lr)),h(P,r[P]=l?Tr:Ee(Tr)))}t.attr("d",eN(e,r)),ut(i,r),oP(e,n,r,z)}function ut(st,lt){(l||u)&&Gt();function Gt(){var Nt=lt.type!=="path",Jt=st.selectAll(".visual-cue").data([0]),sr=1;Jt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":sr}).classed("visual-cue",!0);var wr=oe(l?lt.xanchor:Uue.midRange(Nt?[lt.x0,lt.x1]:Ep.extractPathCoords(lt.path,qb.paramIsX))),cr=_e(u?lt.yanchor:Uue.midRange(Nt?[lt.y0,lt.y1]:Ep.extractPathCoords(lt.path,qb.paramIsY)));if(wr=Ep.roundPositionForSharpStrokeRendering(wr,sr),cr=Ep.roundPositionForSharpStrokeRendering(cr,sr),l&&u){var $e="M"+(wr-1-sr)+","+(cr-1-sr)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Jt.attr("d",$e)}else if(l){var St="M"+(wr-1-sr)+","+(cr-9-sr)+"v18 h2 v-18 Z";Jt.attr("d",St)}else{var Qt="M"+(wr-9-sr)+","+(cr-1-sr)+"h18 v2 h-18 Z";Jt.attr("d",Qt)}}}function pt(st){st.selectAll(".visual-cue").remove()}function Zt(st,lt,Gt){var Nt=lt.xref,Jt=lt.yref,sr=Y3.getFromId(Gt,Nt),wr=Y3.getFromId(Gt,Jt),cr="";Nt!=="paper"&&!sr.autorange&&(cr+=Nt),Jt!=="paper"&&!wr.autorange&&(cr+=Jt),tN.setClipUrl(st,cr?"clip"+Gt._fullLayout._uid+cr:null,Gt)}}function Hue(e,t,r){return e.replace(qb.segmentRE,function(n){var i=0,a=n.charAt(0),o=qb.paramIsX[a],s=qb.paramIsY[a],l=qb.numParams[a],u=n.slice(1).replace(qb.paramRE,function(c){return i>=l||(o[i]?c=t(c):s[i]&&(c=r(c)),i++),c});return a+u})}function Nct(e,t){if(sP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){jue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=jue,rN(e)}}}function jue(e){if(sP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Xue(e),delete e._fullLayout._activeShapeIndex,rN(e))}}function Uct(e){if(sP(e)){Xue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var A0=qa(),Jue=Mc(),$ue=hf(),Pl=XL(),Vct=lP().eraseActiveShape,uP=Dr(),tl=uP._,Il=ace.exports={};Il.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?tl(e,"Download plot as a PNG"):tl(e,"Download plot")},icon:Pl.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};uP.notifier(tl(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),A0.call("downloadImage",e,r).then(function(n){uP.notifier(tl(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){uP.notifier(tl(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Il.sendDataToCloud={name:"sendDataToCloud",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.disk,click:function(e){Jue.sendDataToCloud(e)}};Il.editInChartStudio={name:"editInChartStudio",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.pencil,click:function(e){Jue.sendDataToCloud(e)}};Il.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return tl(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Pl.zoombox,click:Bv};Il.pan2d={name:"pan2d",_cat:"pan",title:function(e){return tl(e,"Pan")},attr:"dragmode",val:"pan",icon:Pl.pan,click:Bv};Il.select2d={name:"select2d",_cat:"select",title:function(e){return tl(e,"Box Select")},attr:"dragmode",val:"select",icon:Pl.selectbox,click:Bv};Il.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return tl(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Pl.lasso,click:Bv};Il.drawclosedpath={name:"drawclosedpath",title:function(e){return tl(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Pl.drawclosedpath,click:Bv};Il.drawopenpath={name:"drawopenpath",title:function(e){return tl(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Pl.drawopenpath,click:Bv};Il.drawline={name:"drawline",title:function(e){return tl(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Pl.drawline,click:Bv};Il.drawrect={name:"drawrect",title:function(e){return tl(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Pl.drawrect,click:Bv};Il.drawcircle={name:"drawcircle",title:function(e){return tl(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Pl.drawcircle,click:Bv};Il.eraseshape={name:"eraseshape",title:function(e){return tl(e,"Erase active shape")},icon:Pl.eraseshape,click:Vct};Il.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:Bv};Il.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:Bv};Il.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return tl(e,"Autoscale")},attr:"zoom",val:"auto",icon:Pl.autoscale,click:Bv};Il.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return tl(e,"Reset axes")},attr:"zoom",val:"reset",icon:Pl.home,click:Bv};Il.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return tl(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Pl.tooltip_basic,gravity:"ne",click:Bv};Il.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return tl(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Pl.tooltip_compare,gravity:"ne",click:Bv};function Bv(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=$ue.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=i==="in"?.5:2,h=(1+f)/2,d=(1-f)/2,v,_;for(c=0;c{"use strict";var oce=aN(),jct=Object.keys(oce),sce=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],lce=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(sce),J3=[],Wct=function(e){if(lce.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();J3.indexOf(t)===-1&&J3.push(t),J3.indexOf(r)===-1&&J3.push(r)}};jct.forEach(function(e){Wct(oce[e])});J3.sort();uce.exports={DRAW_MODES:sce,backButtons:lce,foreButtons:J3}});var sN=ye((Nar,cce)=>{"use strict";var Bar=oN();cce.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}});var hce=ye((Uar,fce)=>{"use strict";var Xct=Dr(),yM=ka(),Zct=vl(),Yct=sN();fce.exports=function(t,r){var n=t.modebar||{},i=Zct.newContainer(r,"modebar");function a(s,l){return Xct.coerce(n,i,Yct,s,l)}a("orientation"),a("bgcolor",yM.addOpacity(r.paper_bgcolor,.5));var o=yM.contrast(yM.rgb(r.modebar.bgcolor));a("color",yM.addOpacity(o,.3)),a("activecolor",yM.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var gce=ye((Var,pce)=>{"use strict";var lN=Oa(),Kct=Eo(),fP=Dr(),dce=XL(),Jct=l6().version,$ct=new DOMParser;function vce(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Tm=vce.prototype;Tm.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this.element.setAttribute("role","toolbar"),this._uid=i,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=n.modebar,o="#"+i+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),fP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};Tm.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(i){var a=i.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(i);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};Tm.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};Tm.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var i=e.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var a=e.click;if(typeof a!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&lN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||dce.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Tm.createIcon=function(e){var t=Kct(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):e.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(i)}if(e.svg){var a=$ct.parseFromString(e.svg,"application/xml");n=a.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};Tm.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var i=n.getAttribute("data-val")||!0,a=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=lN.select(n),l=function(f,h){var d=t.modebar,v=f.querySelector(".icon path");v&&(h||f.matches(":hover")?v.style.fill=d.activecolor:v.style.fill=d.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=a===null?a:fP.nestedProperty(t,a).get();s.classed("active",c===i),l(n,c===i)}})};Tm.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var tft=hf(),mce=Ru(),uN=qa(),rft=ip().isUnifiedHover,ift=gce(),hP=aN(),nft=oN().DRAW_MODES,aft=Dr().extendDeep;yce.exports=function(t){var r=t._fullLayout,n=t._context,i=r._modeBar;if(!n.displayModeBar&&!n.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=n.modeBarButtons,o;Array.isArray(a)&&a.length?o=fft(a):!n.displayModeBar&&n.watermark?o=[]:o=oft(t),i?i.update(t,o):r._modeBar=ift(t,o)};function oft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,H){if(typeof H=="string"){if(H.toLowerCase()===N.toLowerCase())return!0}else{var te=H.name,oe=H._cat||H.name;if(te===N||oe===N.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(a.filter(function(N){for(var H=0;H1?(P=["toggleHover"],T=["resetViews"]):f?(g=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],T=["resetGeo"]):c?(P=["hoverClosest3d"],T=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(g=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],T=["resetViewMapbox"]):b?(g=["zoomInMap","zoomOutMap"],P=["toggleHover"],T=["resetViewMap"]):h?P=["hoverClosestPie"]:E?(P=["hoverClosestCartesian","hoverCompareCartesian"],T=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(uft(r)||L)&&(P=[]),u&&!S&&(g=["zoomIn2d","zoomOut2d","autoScale2d"],T[0]!=="resetViews"&&(T=["resetScale2d"])),c?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!S||v?z=["zoom2d","pan2d"]:_||b||f?z=["pan2d"]:p&&(z=["zoom2d"]),lft(r)&&z.push("select2d","lasso2d");var O=[],V=function(N){O.indexOf(N)===-1&&P.indexOf(N)!==-1&&O.push(N)};if(Array.isArray(s)){for(var G=[],Z=0;Z{"use strict";xce.exports={moduleType:"component",name:"modebar",layoutAttributes:sN(),supplyLayoutDefaults:hce(),manage:_ce()}});var fN=ye((jar,bce)=>{"use strict";var hft=$h().FROM_BL;bce.exports=function(t,r,n){n===void 0&&(n=hft[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*n;t.range=t._input.range=[t.l2r(a+(i[0]-a)*r),t.l2r(a+(i[1]-a)*r)],t.setScale()}});var Nb=ye(_M=>{"use strict";var Bb=Dr(),hN=Ag(),kg=hf().id2name,dft=Rd(),wce=fN(),vft=ym(),pft=fs().ALMOST_EQUAL,gft=$h().FROM_BL;_M.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,v;for(s=0;sa?r.slice(a):n.slice(i))+o}function yft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;opft*v&&!k)){for(a=0;az&&teP&&(P=te);var _e=(P-g)/(2*T);f/=_e,g=l.l2r(g),P=l.l2r(P),l.range=l._input.range=x{"use strict";var vP=Oa(),Nv=qa(),Jp=Mc(),S0=Dr(),pN=ru(),gN=vM(),xM=ka(),$3=So(),Mce=Eb(),Pce=cN(),bM=ho(),Cy=$h(),Ice=Nb(),_ft=Ice.enforce,xft=Ice.clean,Ece=Ag().doAutoRange,Rce="start",bft="middle",Dce="end",wft=hd().zindexSeparator;pd.layoutStyles=function(e){return S0.syncOrAsync([Jp.doAutoMargin,Aft],e)};function Tft(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function Aft(e){var t=e._fullLayout,r=t._size,n=r.p,i=bM.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($3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),pd.drawMainTitle(e),Pce.manage(e),!t._has("cartesian"))return Jp.previousPromises(e);function f(Pe,ge,Re){var ce=Pe._lw/2;if(Pe._id.charAt(0)==="x"){if(ge){if(Re==="top")return ge._offset-n-ce}else return r.t+r.h*(1-(Pe.position||0))+ce%1;return ge._offset+ge._length+n+ce}if(ge){if(Re==="right")return ge._offset+ge._length+n+ce}else return r.l+r.w*(Pe.position||0)+ce%1;return ge._offset-n-ce}for(a=0;a0){kft(e,a,u,l),s.attr({x:o,y:a,"text-anchor":n,dy:Lce(t.yanchor)}).call(pN.positionText,o,a);var c=(t.text.match(pN.BR_TAG_ALL)||[]).length;if(c){var f=Cy.LINE_SPACING*c+Cy.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",b)})}var h=vP.select(e).selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,_=v+Mce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:_,"text-anchor":n,dy:Lce(t.yanchor)}).call(pN.positionText,o,_)}}}};function Sft(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=S0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return S0.isTopAnchor(t)&&r==="t"||S0.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=Mft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function kft(e,t,r,n){var i="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&Sft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[i]=l),Jp.allowAutoMargin(e,i),Jp.autoMargin(e,i,s)}function Cft(e,t){var r=e.title,n=e._size,i=0;switch(t===Rce?i=r.pad.l:t===Dce&&(i=-r.pad.r),r.xref){case"paper":return n.l+n.w*r.x+i;case"container":default:return e.width*r.x+i}}function Lft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===Cy.CAP_SHIFT+"em"&&(i=r.pad.t),r.y==="auto")return n.t/2;switch(r.yref){case"paper":return n.t+n.h-n.h*r.y+i;case"container":default:return e.height-e.height*r.y+i}}function Lce(e){return e==="top"?Cy.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Cy.MID_SHIFT+"em"}function Pft(e){var t=e.title,r=bft;return S0.isRightAnchor(t)?r=Dce:S0.isLeftAnchor(t)&&(r=Rce),r}function Ift(e){var t=e.title,r="0em";return S0.isTopAnchor(t)?r=Cy.CAP_SHIFT+"em":S0.isMiddleAnchor(t)&&(r=Cy.MID_SHIFT+"em"),r}pd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var Rft=u_().readPaths,Dft=nP(),Fce=Q1().clearOutlineControllers,mN=ka(),zce=So(),Fft=vl().arrayEditor,Oce=f_(),zft=Oce.getPathString;Bce.exports={draw:pP,drawOne:qce,activateLastSelection:Bft};function pP(e){var t=e._fullLayout;Fce(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;b--){var p=o.append("path").attr(l).style("opacity",b?.1:u).call(mN.stroke,f).call(mN.fill,c).call(zce.dashLine,b?"solid":d,b?4+h:h);if(Oft(p,e,n),v){var k=Fft(e.layout,"selections",n);p.style({cursor:"move"});var E={element:p.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},S=Rft(s,e);Dft(S,p,E)}else p.style("pointer-events",b?"all":"none");_[b]=p}var L=_[0],x=_[1];x.node().addEventListener("click",function(){return qft(e,L)})}}function Oft(e,t,r){var n=r.xref+r.yref;zce.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function qft(e,t){if(gP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){yN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=yN,pP(e)}}}function Bft(e){if(gP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=yN,pP(e)}}function yN(e){if(gP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Fce(e),delete e._fullLayout._activeSelectionIndex,pP(e))}}});var Uce=ye((Yar,Nce)=>{function Nft(){var e,t=0,r=!1;function n(i,a){return e.list.push({type:i,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(i,a){return n("check",{seg1:i,seg2:a})},segmentChop:function(i,a){return n("div_seg",{seg:i,pt:a}),n("chop",{seg:i,pt:a})},statusRemove:function(i){return n("pop_seg",{seg:i})},segmentUpdate:function(i){return n("seg_update",{seg:i})},segmentNew:function(i,a){return n("new_seg",{seg:i,primary:a})},segmentRemove:function(i){return n("rem_seg",{seg:i})},tempStatus:function(i,a,o){return n("temp_status",{seg:i,above:a,below:o})},rewind:function(i){return n("rewind",{seg:i})},status:function(i,a,o){return n("status",{seg:i,above:a,below:o})},vert:function(i){return i===r?e:(r=i,n("vert",{x:i}))},log:function(i){return typeof i!="string"&&(i=JSON.stringify(i,!1," ")),n("log",{txt:i})},reset:function(){return n("reset")},selected:function(i){return n("selected",{segs:i})},chainStart:function(i){return n("chain_start",{seg:i})},chainRemoveHead:function(i,a){return n("chain_rem_head",{index:i,pt:a})},chainRemoveTail:function(i,a){return n("chain_rem_tail",{index:i,pt:a})},chainNew:function(i,a){return n("chain_new",{pt1:i,pt2:a})},chainMatch:function(i){return n("chain_match",{index:i})},chainClose:function(i){return n("chain_close",{index:i})},chainAddHead:function(i,a){return n("chain_add_head",{index:i,pt:a})},chainAddTail:function(i,a){return n("chain_add_tail",{index:i,pt:a})},chainConnect:function(i,a){return n("chain_con",{index1:i,index2:a})},chainReverse:function(i){return n("chain_rev",{index:i})},chainJoin:function(i,a){return n("chain_join",{index1:i,index2:a})},done:function(){return n("done")}},e}Nce.exports=Nft});var Gce=ye((Kar,Vce)=>{function Uft(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,i){var a=n[0],o=n[1],s=i[0],l=i[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],l=i[1]-n[1],u=s*o+a*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-i>e&&(l=!l),o=c,s=f}return l}};return t}Vce.exports=Uft});var jce=ye((Jar,Hce)=>{var Vft={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;i!==null;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(i){return i.prev=r,i.next=n,r.next=i,n!==null&&(n.prev=i),i}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};Hce.exports=Vft});var Xce=ye(($ar,Wce)=>{var TM=jce();function Gft(e,t,r){function n(v,_){return{id:r?r.segmentId():-1,start:v,end:_,myFill:{above:null,below:null},otherFill:null}}function i(v,_,b){return{id:r?r.segmentId():-1,start:v,end:_,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=TM.create();function o(v,_,b,p,k,E){var S=t.pointsCompare(_,k);return S!==0?S:t.pointsSame(b,E)?0:v!==p?v?1:-1:t.pointAboveOrOnLine(b,p?k:E,p?E:k)?1:-1}function s(v,_){a.insertBefore(v,function(b){var p=o(v.isStart,v.pt,_,b.isStart,b.pt,b.other.pt);return p<0})}function l(v,_){var b=TM.node({isStart:!0,pt:v.start,seg:v,primary:_,other:null,status:null});return s(b,v.end),b}function u(v,_,b){var p=TM.node({isStart:!1,pt:_.end,seg:_,primary:b,other:v,status:null});v.other=p,s(p,v.pt)}function c(v,_){var b=l(v,_);return u(b,v,_),b}function f(v,_){r&&r.segmentChop(v.seg,_),v.other.remove(),v.seg.end=_,v.other.pt=_,s(v.other,v.pt)}function h(v,_){var b=i(_,v.seg.end,v.seg);return f(v,_),c(b,v.primary)}function d(v,_){var b=TM.create();function p(G,Z){var j=G.seg.start,N=G.seg.end,H=Z.seg.start,te=Z.seg.end;return t.pointsCollinear(j,H,te)?t.pointsCollinear(N,H,te)||t.pointAboveOrOnLine(N,H,te)?1:-1:t.pointAboveOrOnLine(j,H,te)?1:-1}function k(G){return b.findTransition(function(Z){var j=p(G,Z.ev);return j>0})}function E(G,Z){var j=G.seg,N=Z.seg,H=j.start,te=j.end,oe=N.start,_e=N.end;r&&r.checkIntersection(j,N);var Ee=t.linesIntersect(H,te,oe,_e);if(Ee===!1){if(!t.pointsCollinear(H,te,oe)||t.pointsSame(H,_e)||t.pointsSame(te,oe))return!1;var Ce=t.pointsSame(H,oe),me=t.pointsSame(te,_e);if(Ce&&me)return Z;var ie=!Ce&&t.pointBetween(H,oe,_e),Se=!me&&t.pointBetween(te,oe,_e);if(Ce)return Se?h(Z,te):h(G,_e),Z;ie&&(me||(Se?h(Z,te):h(G,_e)),h(Z,H))}else Ee.alongA===0&&(Ee.alongB===-1?h(G,oe):Ee.alongB===0?h(G,Ee.pt):Ee.alongB===1&&h(G,_e)),Ee.alongB===0&&(Ee.alongA===-1?h(Z,H):Ee.alongA===0?h(Z,Ee.pt):Ee.alongA===1&&h(Z,te));return!1}for(var S=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let G=function(){if(C){var Z=E(L,C);if(Z)return Z}return M?E(L,M):!1};var V=G;r&&r.segmentNew(L.seg,L.primary);var x=k(L),C=x.before?x.before.ev:null,M=x.after?x.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var g=G();if(g){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(g.seg.myFill.above=!g.seg.myFill.above)}else g.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(g.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,M?L.seg.myFill.below=M.seg.myFill.above:L.seg.myFill.below=v,P?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var T;M?L.primary===M.primary?T=M.seg.otherFill.above:T=M.seg.myFill.above:T=L.primary?_:v,L.seg.otherFill={above:T,below:T}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=x.insert(TM.node({ev:L}))}else{var z=L.status;if(z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(z.prev)&&b.exists(z.next)&&E(z.prev.ev,z.next.ev),r&&r.statusRemove(z.ev.seg),z.remove(),!L.primary){var O=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=O}S.push(L.seg)}a.getHead().remove()}return r&&r.done(),S}return e?{addRegion:function(v){for(var _,b=v[v.length-1],p=0;p{function Hft(e,t,r){var n=[],i=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(V,G,Z){return c.index=V,c.matches_head=G,c.matches_pt1=Z,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function AM(e,t,r){var n=[];return e.forEach(function(i){var a=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);t[a]!==0&&n.push({id:r?r.segmentId():-1,start:i.start,end:i.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(n),n}var jft={union:function(e,t){return AM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return AM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return AM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return AM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return AM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Kce.exports=jft});var Qce=ye((tor,$ce)=>{var Wft={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 Xft=Uce(),Zft=Gce(),efe=Xce(),Yft=Yce(),SM=Jce(),tfe=Qce(),M0=!1,MM=Zft(),kp;kp={buildLog:function(e){return e===!0?M0=Xft():e===!1&&(M0=!1),M0===!1?!1:M0.list},epsilon:function(e){return MM.epsilon(e)},segments:function(e){var t=efe(!0,MM,M0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=efe(!1,MM,M0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:SM.union(e.combined,M0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:SM.intersect(e.combined,M0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:SM.difference(e.combined,M0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:SM.differenceRev(e.combined,M0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:SM.xor(e.combined,M0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Yft(e.segments,MM,M0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return tfe.toPolygon(kp,e)},polygonToGeoJSON:function(e){return tfe.fromPolygon(kp,MM,e)},union:function(e,t){return EM(e,t,kp.selectUnion)},intersect:function(e,t){return EM(e,t,kp.selectIntersect)},difference:function(e,t){return EM(e,t,kp.selectDifference)},differenceRev:function(e,t){return EM(e,t,kp.selectDifferenceRev)},xor:function(e,t){return EM(e,t,kp.selectXor)}};function EM(e,t,r){var n=kp.segments(e),i=kp.segments(t),a=kp.combine(n,i),o=r(a);return kp.polygon(o)}typeof window=="object"&&(window.PolyBool=kp);rfe.exports=kp});var afe=ye((ior,nfe)=>{nfe.exports=function(t,r,n,i){var a=t[0],o=t[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=r.length);for(var l=i-n,u=0,c=l-1;uo!=v>o&&a<(d-f)*(o-h)/(v-h)+f;_&&(s=!s)}return s}});var kM=ye((nor,ofe)=>{"use strict";var xN=T6().dot,mP=fs().BADNUM,yP=ofe.exports={};yP.tester=function(t){var r=t.slice(),n=r[0][0],i=n,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;si||p===mP||po||_&&u(v))}function f(v,_){var b=v[0],p=v[1];if(b===mP||bi||p===mP||po)return!1;var k=r.length,E=r[0][0],S=r[0][1],L=0,x,C,M,g,P;for(x=1;xMath.max(C,E)||p>Math.max(M,S)))if(ps||Math.abs(xN(f,u))>i)return!0;return!1};yP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(l){t.push(l);var u=n.length,c=i;n.splice(a+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var lfe=ye((aor,sfe)=>{"use strict";sfe.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Lfe=ye((oor,Cfe)=>{"use strict";var ufe=ife(),Kft=afe(),PM=qa(),Jft=So().dashStyle,CM=ka(),$ft=vf(),Qft=ip().makeEventData,zM=Eg(),eht=zM.freeMode,tht=zM.rectMode,IM=zM.drawMode,AN=zM.openMode,SN=zM.selectMode,cfe=f_(),ffe=gM(),gfe=nP(),mfe=Q1().clearOutline,yfe=u_(),bN=yfe.handleEllipse,rht=yfe.readPaths,iht=eP().newShapes,nht=ZB(),aht=_N().activateLastSelection,xP=Dr(),oht=xP.sorterAsc,_fe=kM(),LM=z6(),E0=hf().getFromId,sht=vM(),lht=wM().redrawReglTraces,bP=lfe(),Am=bP.MINSELECT,uht=_fe.filter,MN=_fe.tester,EN=KL(),hfe=EN.p2r,cht=EN.axValue,fht=EN.getTransform;function kN(e){return e.subplot!==void 0}function hht(e,t,r,n,i){var a=!kN(n),o=eht(i),s=tht(i),l=AN(i),u=IM(i),c=SN(i),f=i==="drawline",h=i==="drawcircle",d=f||h,v=n.gd,_=v._fullLayout,b=c&&_.newselection.mode==="immediate"&&a,p=_._zoomlayer,k=n.element.getBoundingClientRect(),E=n.plotinfo,S=fht(E),L=t-k.left,x=r-k.top;_._calcInverseTransform(v);var C=xP.apply3DTransform(_._invTransform)(L,x);L=C[0],x=C[1];var M=_._invScaleX,g=_._invScaleY,P=L,T=x,z="M"+L+","+x,O=n.xaxes[0],V=n.yaxes[0],G=O._length,Z=V._length,j=e.altKey&&!(IM(i)&&l),N,H,te,oe,_e,Ee,Ce;bfe(e,v,n),o&&(N=uht([[L,x]],bP.BENDPX));var me=p.selectAll("path.select-outline-"+E.id).data([1]),ie=u?_.newshape:_.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Se=u&&!l?ie.fillcolor:"rgba(0,0,0,0)",Le=ie.line.color||(a?CM.contrast(v._fullLayout.plot_bgcolor):"#7f7f7f");me.enter().append("path").attr("class","select-outline select-outline-"+E.id).style({opacity:u?ie.opacity/2:1,"stroke-dasharray":Jft(ie.line.dash,ie.line.width),"stroke-width":ie.line.width+"px","shape-rendering":"crispEdges"}).call(CM.stroke,Le).call(CM.fill,Se).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",S).attr("d",z+"Z");var Ae=p.append("path").attr("class","zoombox-corners").style({fill:CM.background,stroke:CM.defaultLine,"stroke-width":1}).attr("transform",S).attr("d","M0,0Z");if(u&&n.hasText){var Fe=p.select(".label-temp");Fe.empty()&&(Fe=p.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Pe=_._uid+bP.SELECTID,ge=[],Re=wP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var Ze=O._id,ut=V._id;Mfe(v,Ze,ut,Re);for(var pt=(v.layout||{}).selections||[],Zt=[],st=!1,lt=0;lt=0){v._fullLayout._deactivateShape(v);return}if(!u){var pt=_.clickmode;LM.done(Pe).then(function(){if(LM.clear(Pe),Ze===2){for(me.remove(),_e=0;_e-1&&xfe(ut,v,n.xaxes,n.yaxes,n.subplot,n,me),pt==="event"&&FM(v,void 0);$ft.click(v,ut,E.id)}).catch(xP.error)}},n.doneFn=function(){Ae.remove(),LM.done(Pe).then(function(){LM.clear(Pe),!b&&oe&&n.selectionDefs&&(oe.subtract=j,n.selectionDefs.push(oe),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,te)),(b||u)&&RM(n,b),n.doneFnCompleted&&n.doneFnCompleted(ge),c&&FM(v,Ce)}).catch(xP.error)}}function xfe(e,t,r,n,i,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,d,v,_,b,p,k,E,S,L;if(mht(s)){bfe(e,t,a),h=wP(t,r,n,i);var x=yht(s,h),C=x.pointNumbers.length>0;if(C?_ht(h,x):xht(h)&&(k=vfe(x))){for(o&&o.remove(),L=0;L=0}function ght(e){return e._fullLayout._activeSelectionIndex>=0}function RM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;pht(i)&&i._fullLayout._deactivateShape(i),ght(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=IM(r),l=SN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=iht(u,e)),c&&PM.call("_guiRelayout",i,{shapes:c});var f;l&&!kN(e)&&(f=nht(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,PM.call("_guiRelayout",i,{selections:f}).then(function(){t&&aht(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function dfe(e){return e._id}function wP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(dfe),o=r.map(dfe),s,l,u;for(u=0;u0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function _ht(e,t){var r=[],n,i,a,o;for(o=0;o0&&r.push(n);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(i=t.searchInfo.cd[0].trace,i.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function DM(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var Ze=pfe(e,!0);if(Ze.length){var ut=Ze[0].xref,pt=Ze[0].yref;if(ut&&pt){var Zt=Efe(Ze),st=kfe([E0(e,ut,"x"),E0(e,pt,"y")]);st(ge,Zt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&FM(e,ge),h._reselect=!1}if(!o&&h._deselect){var lt=h._deselect;s=lt.xref,l=lt.yref,Tht(s,l,c)||Mfe(e,s,l,n),ce&&(ge.points.length?FM(e,ge):PN(e)),h._deselect=!1}return{eventData:ge,selectionTesters:r}}function wht(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";Pfe.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 OM=ye((lor,Ife)=>{"use strict";Ife.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Ub=ye((cor,Ffe)=>{"use strict";var Rfe=IN(),Dfe=ec(),TP=hd(),kht=vl().templatedArray,uor=OM();Ffe.exports=kht("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Dfe({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:Rfe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Rfe.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",TP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",TP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",TP.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",TP.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:Dfe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Sm=ye((hor,zfe)=>{"use strict";zfe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Cg=ye((dor,Ofe)=>{"use strict";Ofe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var pf=ye((vor,Hfe)=>{"use strict";var qfe=df().axisHoverFormat,{hovertemplateAttrs:Cht,texttemplateAttrs:Lht,templatefallbackAttrs:Bfe}=Ll(),Nfe=Tu(),Pht=ec(),Iht=Pd().dash,Rht=Pd().pattern,Dht=So(),Fht=Sm(),AP=Ao().extendFlat,zht=Cg();function Ufe(e){return{valType:"any",dflt:0,editType:"calc"}}function Vfe(e){return{valType:"any",editType:"calc"}}function Gfe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Hfe.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:Ufe("x"),yperiod:Ufe("y"),xperiod0:Vfe("x0"),yperiod0:Vfe("y0"),xperiodalignment:Gfe("x"),yperiodalignment:Gfe("y"),xhoverformat:qfe("x"),yhoverformat:qfe("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:Lht(),texttemplatefallback:Bfe({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:Cht({},{keys:Fht.eventDataKeys}),hovertemplatefallback:Bfe(),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:AP({},Iht,{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:zht(!0),fillgradient:AP({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:Rht,marker:AP({symbol:{valType:"enumerated",values:Dht.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:AP({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Nfe("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"},Nfe("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:Pht({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var RN=ye((gor,Xfe)=>{"use strict";var jfe=Ub(),Wfe=pf().line,Oht=Pd().dash,SP=Ao().extendFlat,qht=mc().overrideAll,Bht=vl().templatedArray,por=OM();Xfe.exports=qht(Bht("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:SP({},jfe.xref,{}),yref:SP({},jfe.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:Wfe.color,width:SP({},Wfe.width,{min:1,dflt:1}),dash:SP({},Oht,{dflt:"dot"})}}),"arraydraw","from-root")});var Jfe=ye((mor,Kfe)=>{"use strict";var Zfe=Dr(),MP=ho(),Nht=Yd(),Uht=RN(),Yfe=f_();Kfe.exports=function(t,r){Nht(t,r,{name:"selections",handleItemDefaults:Vht});for(var n=r.selections,i=0;i{"use strict";$fe.exports=function(t,r,n){n("newselection.mode");var i=n("newselection.line.width");i&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var qM=ye((_or,rhe)=>{"use strict";var Ght=qa(),ehe=Dr(),the=hf();rhe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=Ght.subplotsRegistry.cartesian,s=o.idRegex,l=i._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=i._has("cartesian"),d=0;d{"use strict";var ihe=_N(),BM=Lfe();nhe.exports={moduleType:"component",name:"selections",layoutAttributes:RN(),supplyLayoutDefaults:Jfe(),supplyDrawNewSelectionDefaults:Qfe(),includeBasePlot:qM()("selections"),draw:ihe.draw,drawOne:ihe.drawOne,reselect:BM.reselect,prepSelect:BM.prepSelect,clearOutline:BM.clearOutline,clearSelectionsCache:BM.clearSelectionsCache,selectOnClick:BM.selectOnClick}});var NN=ye((bor,Ahe)=>{"use strict";var qN=Oa(),k0=Dr(),ahe=k0.numberFormat,Hht=cd(),jht=RL(),EP=qa(),vhe=k0.strTranslate,Wht=ru(),ohe=ka(),d_=So(),Xht=vf(),she=ho(),Zht=Sg(),Yht=yv(),phe=Eg(),kP=phe.selectingOrDrawing,Kht=phe.freeMode,Jht=$h().FROM_TL,$ht=vM(),Qht=wM().redrawReglTraces,edt=Mc(),FN=hf().getFromId,tdt=Of().prepSelect,rdt=Of().clearOutline,idt=Of().selectOnClick,DN=fN(),BN=hd(),lhe=BN.MINDRAG,np=BN.MINZOOM,uhe=!0;function ndt(e,t,r,n,i,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,d,v,_,b,p,k,E,S,L,x,C,M,g,P,T,z,O,V,G,Z,j;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,E=f._length,S=h._length,p=f._offset,k=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var It=t.overlays,mt=0;mt=0){er._fullLayout._deactivateShape(er);return}var lr=er._fullLayout.clickmode;if(ON(er),It===2&&!c&&cr(),u)lr.indexOf("select")>-1&&idt(mt,er,_,b,t.id,oe),lr.indexOf("event")>-1&&Xht.click(er,mt,t.id);else if(It===1&&c){var Tr=o?h:f,Lr=o==="s"||s==="w"?0:1,ti=Tr._name+".range["+Lr+"]",Br=adt(Tr,Lr),Vr="left",dt="middle";if(Tr.fixedrange)return;o?(dt=o==="n"?"top":"bottom",Tr.side==="right"&&(Vr="right")):s==="e"&&(Vr="right"),er._context.showAxisRangeEntryBoxes&&qN.select(te).call(Wht.makeEditable,{gd:er,immediate:!0,background:er._fullLayout.paper_bgcolor,text:String(Br),fill:Tr.tickfont?Tr.tickfont.color:"#444",horizontalAlign:Vr,verticalAlign:dt}).on("edit",function(Ge){var Je=Tr.d2r(Ge);Je!==void 0&&EP.call("_guiRelayout",er,ti,Je)})}}Yht.init(oe);var Ce,me,ie,Se,Le,Ae,Fe,Pe,ge,Re;function ce(It,mt,er){var lr=te.getBoundingClientRect();Ce=mt-lr.left,me=er-lr.top,e._fullLayout._calcInverseTransform(e);var Tr=k0.apply3DTransform(e._fullLayout._invTransform)(Ce,me);Ce=Tr[0],me=Tr[1],ie={l:Ce,r:Ce,w:0,t:me,b:me,h:0},Se=e._hmpixcount?e._hmlumcount/e._hmpixcount:Hht(e._fullLayout.plot_bgcolor).getLuminance(),Le="M0,0H"+E+"V"+S+"H0V0",Ae=!1,Fe="xy",Re=!1,Pe=yhe(l,Se,p,k,Le),ge=_he(l,p,k)}function Ze(It,mt){if(e._transitioningWithDuration)return!1;var er=Math.max(0,Math.min(E,Z*It+Ce)),lr=Math.max(0,Math.min(S,j*mt+me)),Tr=Math.abs(er-Ce),Lr=Math.abs(lr-me);ie.l=Math.min(Ce,er),ie.r=Math.max(Ce,er),ie.t=Math.min(me,lr),ie.b=Math.max(me,lr);function ti(){Fe="",ie.r=ie.l,ie.t=ie.b,ge.attr("d","M0,0Z")}if(L.isSubplotConstrained)Tr>np||Lr>np?(Fe="xy",Tr/E>Lr/S?(Lr=Tr*S/E,me>lr?ie.t=me-Lr:ie.b=me+Lr):(Tr=Lr*E/S,Ce>er?ie.l=Ce-Tr:ie.r=Ce+Tr),ge.attr("d",CP(ie))):ti();else if(x.isSubplotConstrained)if(Tr>np||Lr>np){Fe="xy";var Br=Math.min(ie.l/E,(S-ie.b)/S),Vr=Math.max(ie.r/E,(S-ie.t)/S);ie.l=Br*E,ie.r=Vr*E,ie.b=(1-Br)*S,ie.t=(1-Vr)*S,ge.attr("d",CP(ie))}else ti();else!M||Lr0){var Ge;if(x.isSubplotConstrained||!C&&M.length===1){for(Ge=0;Ge<_.length;Ge++)_[Ge].range=_[Ge]._r.slice(),DN(_[Ge],1-mt/S);It=mt*E/S,Vr=It/2}if(x.isSubplotConstrained||!M&&C.length===1){for(Ge=0;Ge1&&(ti.maxallowed!==void 0&&P===(ti.range[0]1&&(Br.maxallowed!==void 0&&T===(Br.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function sdt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function yhe(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",vhe(r,n)).attr("d",i+"Z")}function _he(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:ohe.background,stroke:ohe.defaultLine,"stroke-width":1,opacity:0}).attr("transform",vhe(t,r)).attr("d","M0,0Z")}function xhe(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),bhe(e,t,i,a)}function bhe(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function ON(e){qN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function whe(e){uhe&&e.data&&e._context.showTips&&(k0.notifier(k0._(e,"Double-click to zoom back out"),"long"),uhe=!1)}function ldt(e,t){return"M"+(e.l-.5)+","+(t-np-.5)+"h-3v"+(2*np+1)+"h3ZM"+(e.r+.5)+","+(t-np-.5)+"h3v"+(2*np+1)+"h-3Z"}function udt(e,t){return"M"+(t-np-.5)+","+(e.t-.5)+"v-3h"+(2*np+1)+"v3ZM"+(t-np-.5)+","+(e.b+.5)+"v3h"+(2*np+1)+"v-3Z"}function CP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,np)/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 hhe(e,t,r,n,i){for(var a=!1,o={},s={},l,u,c,f,h=(i||{}).xaHash,d=(i||{}).yaHash,v=0;v{"use strict";var cdt=Oa(),LP=vf(),fdt=yv(),hdt=Sg(),Lg=NN().makeDragBox,gd=hd().DRAGGERSIZE;PP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){cdt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Lg(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]&&LP.hover(t,h,a)},LP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,fdt.unhover(t,h))},t._context.showAxisDragHandles&&(Lg(t,o,s._offset-gd,l._offset-gd,gd,gd,"n","w"),Lg(t,o,s._offset+s._length,l._offset-gd,gd,gd,"n","e"),Lg(t,o,s._offset-gd,l._offset+l._length,gd,gd,"s","w"),Lg(t,o,s._offset+s._length,l._offset+l._length,gd,gd,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=gd),Lg(t,o,s._offset+s._length*.1,c,s._length*.8,gd,"","ew"),Lg(t,o,s._offset,c,s._length*.1,gd,"","w"),Lg(t,o,s._offset+s._length*.9,c,s._length*.1,gd,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=gd),Lg(t,o,f,l._offset+l._length*.1,gd,l._length*.8,"ns",""),Lg(t,o,f,l._offset+l._length*.9,gd,l._length*.1,"s",""),Lg(t,o,f,l._offset,gd,l._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,LP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,LP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},PP.updateFx(t)}};PP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";hdt(t._draggers,r)}});var Ehe=ye((Tor,Mhe)=>{"use strict";var She=qa();Mhe.exports=function(t){for(var r=She.layoutArrayContainers,n=She.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var ddt=my(),VN=w6(),NM=G1(),vdt=R6().sorterAsc,GN=qa();UM.containerArrayMatch=Ehe();var pdt=UM.isAddVal=function(t){return t==="add"||ddt(t)},khe=UM.isRemoveVal=function(t){return t===null||t==="remove"};UM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=GN.getComponentMethod(o,"supplyLayoutDefaults"),l=GN.getComponentMethod(o,"draw"),u=GN.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||s===VN||l===VN,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&NM.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(khe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return NM.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var v=Object.keys(n).map(Number).sort(vdt),_=r.get(),b=_||[],p=a(h,o).get(),k=[],E=-1,S=b.length,L,x,C,M,g,P,T,z;for(L=0;Lb.length-(T?0:1)){NM.warn("index out of range",o,C);continue}if(P!==void 0)g.length>1&&NM.warn("Insertion & removal are incompatible with edits to the same index.",o,C),khe(P)?k.push(C):T?(P==="add"&&(P={}),b.splice(C,0,P),p&&p.splice(C,0,{})):NM.warn("Unrecognized full object edit value",o,C,P),E===-1&&(E=C);else for(x=0;x=0;L--)b.splice(k[L],1),p&&p.splice(k[L],1);if(b.length?_||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==VN){var O;if(E===-1)O=v;else{for(S=Math.max(b.length,S),O=[],L=0;L=E));L++)O.push(C);for(L=E;L{"use strict";var Rhe=Eo(),Dhe=qa(),Uv=Dr(),VM=Mc(),Fhe=hf(),zhe=ka(),GM=Fhe.cleanId,gdt=Fhe.getFromTrace,HN=Dhe.traceIs,mdt=["x","y","z"];C0.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Uv.log("Clearing previous rejected promises from queue."),e._promises=[]};C0.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(VM.subplotsRegistry.cartesian||{}).attrRegex,i=(VM.subplotsRegistry.polar||{}).attrRegex,a=(VM.subplotsRegistry.ternary||{}).attrRegex,o=(VM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(b.x=1.02,b.xanchor="left"):b.x<-2&&(b.x=-.02,b.xanchor="right"),b.y>3?(b.y=1.02,b.yanchor="bottom"):b.y<-2&&(b.y=-.02,b.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),zhe.clean(e),e.template&&e.template.layout&&C0.cleanLayout(e.template.layout),e};function Q3(e,t){var r=e[t],n=t.charAt(0);r&&r!=="paper"&&(e[t]=GM(r,n,!0))}C0.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}C0.hasParent=function(e,t){for(var r=Ihe(t);r;){if(r in e)return!0;r=Ihe(r)}return!1};C0.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(i=>Uv.isPlainObject(i))||n.every(i=>Array.isArray(i));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nUv.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?jN(i,a):!1))return!1}return!0}return!1};C0.collectionsAreEqual=jN});var HP=ye(_l=>{"use strict";var FP=Oa(),xdt=Eo(),bdt=nq(),Sa=Dr(),Ec=Sa.nestedProperty,ZN=_3(),ap=yne(),L0=qa(),VP=w3(),Qo=Mc(),Vv=ho(),wdt=xB(),Tdt=Rd(),WN=So(),Adt=ka(),Sdt=UN().initInteractions,Mdt=Wp(),Edt=Of().clearOutline,Vhe=cb().dfltConfig,RP=Che(),vh=Ohe(),Au=wM(),v_=mc(),kdt=hd().AX_NAME_PATTERN,XN=0,qhe=5;function Cdt(e,t,r,n){var i;if(e=Sa.getGraphDiv(e),ZN.init(e),Sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=ZN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Sa.isPlotDiv(e)&&Sa.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return _l.addFrames(e,i)}Hhe(e,n),r||(r={}),FP.select(e).classed("js-plotly-plot",!0),WN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(vh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=vh.cleanLayout(r)),Qo.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&($dt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),WN.initGradients(e),WN.initPatterns(e),l&&Vv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Qo.doCalcdata(e);for(var h=0;h=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function jhe(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]),OP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&OP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Ddt(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof M.parts[T]!="string";)T--;var z=M.parts[T],O=M.parts[T-1]+"."+z,V=M.parts.slice(0,T).join("."),G=Ec(e.layout,V).get(),Z=Ec(n,V).get(),j=M.get();if(g!==void 0){p[C]=g,k[C]=z==="reverse"?g:Ly(j);var N=VP.getLayoutValObject(n,M.parts);if(N&&N.impliedEdits&&g!==null)for(var H in N.impliedEdits)E(Sa.relativeAttr(C,H),N.impliedEdits[H]);if(["width","height"].indexOf(C)!==-1)if(g){E("autosize",null);var te=C==="height"?"width":"height";E(te,n[te])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")E("width",g?null:n.width),E("height",g?null:n.height);else if(O.match(ede))x(O),Ec(n,V+"._inputRange").set(null);else if(O.match(tde)){x(O),Ec(n,V+"._inputRange").set(null);var oe=Ec(n,V).get();oe._inputDomain&&(oe._input.domain=oe._inputDomain.slice())}else O.match(qdt)&&Ec(n,V+"._inputDomain").set(null);if(z==="type"){L=G;var _e=Z.type==="linear"&&g==="log",Ee=Z.type==="log"&&g==="linear";if(_e||Ee){if(!L||!L.range)E(V+".autorange",!0);else if(Z.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Ce=L.range[0],me=L.range[1];_e?(Ce<=0&&me<=0&&E(V+".autorange",!0),Ce<=0?Ce=me/1e6:me<=0&&(me=Ce/1e6),E(V+".range[0]",Math.log(Ce)/Math.LN10),E(V+".range[1]",Math.log(me)/Math.LN10)):(E(V+".range[0]",Math.pow(10,Ce)),E(V+".range[1]",Math.pow(10,me)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[M.parts[0]]&&M.parts[1]==="radialaxis"&&delete n[M.parts[0]]._subplot.viewInitial["radialaxis.range"],L0.getComponentMethod("annotations","convertCoords")(e,Z,g,E),L0.getComponentMethod("images","convertCoords")(e,Z,g,E)}else E(V+".autorange",!0),E(V+".range",null);Ec(n,V+"._inputRange").set(null)}else if(z.match(kdt)){var ie=Ec(n,C).get(),Se=(g||{}).type;(!Se||Se==="-")&&(Se="linear"),L0.getComponentMethod("annotations","convertCoords")(e,ie,Se,E),L0.getComponentMethod("images","convertCoords")(e,ie,Se,E)}var Le=RP.containerArrayMatch(C);if(Le){c=Le.array,f=Le.index;var Ae=Le.property,Fe=N||{editType:"calc"};f!==""&&Ae===""&&(RP.isAddVal(g)?k[C]=null:RP.isRemoveVal(g)?k[C]=(Ec(r,c).get()||[])[f]:Sa.warn("unrecognized full object value",t)),v_.update(b,Fe),u[c]||(u[c]={});var Pe=u[c][f];Pe||(Pe=u[c][f]={}),Pe[Ae]=g,delete t[C]}else z==="reverse"?(G.range?G.range.reverse():(E(V+".autorange",!0),G.range=[1,0]),Z.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(g===!1&&j!==!1||g!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(g==="lasso"||g==="select")&&!(j==="lasso"||j==="select")?b.plot=!0:N?v_.update(b,N):b.calc=!0,M.set(g))}}for(c in u){var ge=RP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);ge||(b.plot=!0)}for(var Re in S){L=Vv.getFromId(e,Re);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var Ze in ce)S[Ze]||(Vv.getFromId(e,Ze)._constraintShrinkable=!0)}}(ide(e)||t.height||t.width)&&(b.plot=!0);var ut=n.shapes;for(f=0;f1;)if(n.pop(),r=Ec(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function Udt(e,t){for(var r=0;r[V,e._ev.listeners(V)]);a=_l.newPlot(e,t,r,n).then(()=>{for(let[V,G]of O)G.forEach(Z=>e.on(V,Z));return _l.react(e,t,r,n)})}else{e.data=t||[],vh.cleanData(e.data),e.layout=r||{},vh.cleanLayout(e.layout),Gdt(e.data,e.layout,s,l),Qo.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,v=h.transition,_=Wdt(e,l,h,d,v),b=_.newDataRevision,p=jdt(e,s,f,d,v,b);if(ide(e)&&(_.layoutReplot=!0),p.calc||_.calc){e.calcdata=void 0;for(var k=Object.getOwnPropertyNames(h),E=0;E(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function jdt(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=v_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var v=VP.getTraceValObject(u,d);return!u._module.animatable&&v.anim&&(v.anim=!1),v}var f={getValObject:c,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(l=0;l=i.length?i[0]:i[u]:i}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var z=n._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(z){if(z.length!==0){for(var O=0;On._timeToNext&&v()};z()}var b=0;function p(z){return Array.isArray(i)?b>=i.length?z.transitionOpts=i[b]:z.transitionOpts=i[0]:z.transitionOpts=i,b++,z}var k,E,S=[],L=t==null,x=Array.isArray(t),C=!L&&!x&&Sa.isPlainObject(t);if(C)S.push({type:"object",data:p(Sa.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(k=0;k0&&PP)&&T.push(E);S=T}}S.length>0?h(S):(e.emit("plotly_animated"),u())})}function Zdt(e,t,r){if(e=Sa.getGraphDiv(e),t==null)return Promise.resolve();if(!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(Sa.isPlainObject(t[n])){var h=t[n].name,d=(l[h]||f[h]||{}).name,v=t[n].name,_=l[d]||f[d];d&&v&&typeof v=="number"&&_&&XNM.index?-1:C.index=0;n--){if(i=c[n].frame,typeof i.name=="number"&&Sa.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;l[i.name="frame "+e._transitionData._counter++];);if(l[i.name]){for(a=0;a=0;r--)n=t[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=Qo.modifyFrames,l=Qo.modifyFrames,u=[e,o],c=[e,a];return ap&&ap.add(e,s,u,l,c),Qo.modifyFrames(e,a)}function Kdt(e){e=Sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Qo.cleanPlot([],{},r,t),Qo.purge(e),ZN.purge(e),t._container&&t._container.remove(),delete e._context,e}function Jdt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Sa.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Sa.inverseTransformMatrix(Sa.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function $dt(e){var t=FP.select(e),r=e._fullLayout;if(r._calcInverseTransform=Jdt,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};FP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Sa.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Mdt.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}_l.animate=Xdt;_l.addFrames=Zdt;_l.deleteFrames=Ydt;_l.addTraces=Khe;_l.deleteTraces=Jhe;_l.extendTraces=Zhe;_l.moveTraces=YN;_l.prependTraces=Yhe;_l.newPlot=Rdt;_l._doPlot=Cdt;_l.purge=Kdt;_l.react=Hdt;_l.redraw=Idt;_l.relayout=HM;_l.restyle=qP;_l.setPlotConfig=Ldt;_l.update=NP;_l._guiRelayout=KN(HM);_l._guiRestyle=KN(qP);_l._guiUpdate=KN(NP);_l._storeDirectGUIEdit=Odt});var Py=ye(Mm=>{"use strict";var Qdt=qa();Mm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Mm.getRedrawFunc=function(e){return function(){Qdt.getComponentMethod("colorbar","draw")(e)}};Mm.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Mm.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var nde=window.URL||window.webkitURL;Mm.createObjectURL=function(e){return nde.createObjectURL(e)};Mm.revokeObjectURL=function(e){return nde.revokeObjectURL(e)};Mm.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=evt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Mm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function evt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var $N=Oa(),kor=Dr(),tvt=So(),rvt=ka(),Cor=Wp(),JN=/"/g,WM="TOBESTRIPPED",ivt=new RegExp('("'+WM+")|("+WM+'")',"g");function nvt(e){var t=$N.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":t.html(n).text()});return t.remove(),r}function avt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}ade.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,l=i.height,u;a.insert("rect",":first-child").call(tvt.setRect,0,0,s,l).call(rvt.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u{"use strict";var ovt=Dr(),svt=pb().EventEmitter,XM=Py();function lvt(e){var t=e.emitter||new svt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,v=l.getContext("2d",{willReadFrequently:!0}),_=new a,b,p;s==="svg"||ovt.isSafari()?p=XM.encodeSVG(o):(b=XM.createBlob(o,"svg"),p=XM.createObjectURL(b)),l.width=h,l.height=d,_.onload=function(){var k;switch(b=null,XM.revokeObjectURL(p),s!=="svg"&&v.drawImage(_,0,0,h,d),s){case"jpeg":k=l.toDataURL("image/jpeg");break;case"png":k=l.toDataURL("image/png");break;case"webp":k=l.toDataURL("image/webp");break;case"svg":k=p;break;default:var E="Image format is not jpeg, png, svg or webp.";if(i(new Error(E)),!e.promise)return t.emit("error",E)}n(k),e.promise||t.emit("success",k)},_.onerror=function(k){if(b=null,XM.revokeObjectURL(p),i(k),!e.promise)return t.emit("error",k)},_.src=p});return e.promise?r:t}ode.exports=lvt});var eU=ye((Ior,ude)=>{"use strict";var sde=Eo(),lde=HP(),uvt=Mc(),Em=Dr(),ZM=Py(),cvt=jP(),fvt=WP(),hvt=l6().version,QN={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function dvt(e,t){t=t||{};var r,n,i,a;Em.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Em.getGraphDiv(e),r=Em.extendDeep([],e.data),n=Em.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||Em.validate(t[x],QN[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 "+Em.join2(QN.format.values,", "," or ")+".");var s={};function l(x,C){return Em.coerce(t,s,QN,x,C)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),v=l("imageDataOnly"),_=document.createElement("div");_.style.position="absolute",_.style.left="-5000px",document.body.appendChild(_);var b=Em.extendFlat({},n);c?b.width=c:t.width===null&&sde(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&sde(a.height)&&(b.height=a.height);var p=Em.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=ZM.getRedrawFunc(_);function E(){return new Promise(function(x){setTimeout(x,ZM.getDelay(_._fullLayout))})}function S(){return new Promise(function(x,C){var M=cvt(_,u,h),g=_._fullLayout.width,P=_._fullLayout.height;function T(){lde.purge(_),document.body.removeChild(_)}if(u==="full-json"){var z=uvt.graphJson(_,!1,"keepdata","object",!0,!0);return z.version=hvt,z=JSON.stringify(z),T(),x(v?z:ZM.encodeJSON(z))}if(T(),u==="svg")return x(v?M:ZM.encodeSVG(M));var O=document.createElement("canvas");O.id=Em.randstr(),fvt({format:u,width:g,height:P,scale:h,canvas:O,svg:M,promise:!0}).then(x).catch(C)})}function L(x){return v?x.replace(ZM.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,C){lde.newPlot(_,r,b,p).then(k).then(E).then(S).then(function(M){x(L(M))}).catch(function(M){C(M)})})}ude.exports=dvt});var hde=ye((Ror,fde)=>{"use strict";var P0=Dr(),vvt=Mc(),pvt=w3(),gvt=cb().dfltConfig,Pg=P0.isPlainObject,Gb=Array.isArray,tU=P0.isArrayOrTypedArray;fde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=pvt.get(),i=[],a={_context:P0.extendFlat({},gvt)},o,s;Gb(t)?(a.data=P0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(md("array","data"))),Pg(r)?(a.layout=P0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(md("object","layout"))),vvt.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&n.push(md("unused",i,u.concat(f.length)));var p=f.length,k=Array.isArray(b);k&&(p=Math.min(p,b.length));var E,S,L,x,C;if(h.dimensions===2)for(S=0;Sf[S].length&&n.push(md("unused",i,u.concat(S,f[S].length)));var M=f[S].length;for(E=0;E<(k?Math.min(M,b[S].length):M);E++)L=k?b[S][E]:b,x=c[S][E],C=f[S][E],P0.validate(x,L)?C!==x&&C!==+x&&n.push(md("dynamic",i,u.concat(S,E),x,C)):n.push(md("value",i,u.concat(S,E),x))}else n.push(md("array",i,u.concat(S),c[S]));else for(S=0;S{"use strict";var Tvt=Dr(),ZP=Py();function Avt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var l,u;if(i)return l=ZP.createBlob(e,r),u=ZP.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),ZP.revokeObjectURL(u),l=null,o(t);if(Tvt.isSafari()){var c=r==="svg"?",":";base64,";return ZP.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}dde.exports=Avt});var rU=ye((zor,gde)=>{"use strict";var pde=Dr(),Svt=eU(),Mvt=vde(),For=Py();function Evt(e,t){var r;return pde.isPlainObject(e)||(r=pde.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var a=Svt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Mvt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}gde.exports=Evt});var bde=ye(iU=>{"use strict";var Cp=Dr(),Lp=Cp.isPlainObject,mde=w3(),yde=Mc(),kvt=Gl(),_de=vl(),xde=cb().dfltConfig;iU.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:xde},{data:e.data,layout:e.layout}),yde.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(d){var v={};YM(d,v,Lvt.bind(null,d));var _=Cp.coerce(d,{},kvt,"type"),b=n.data[_];b||(b=n.data[_]=[]),b.push(v)}),YM(r,n.layout,Cvt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lp(i)){var a=i.layout,o,s,l,u,c,f;Lp(a)&&YP(a,n.layout);var h=i.data;if(Lp(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;op?o.push({code:"unused",traceType:d,templateCount:b,dataCount:p}):p>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:p})}}function k(E,S){for(var L in E)if(L.charAt(0)!=="_"){var x=E[L],C=I0(E,L,S);Lp(x)?(Array.isArray(E)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:C,templateitemname:x.templateitemname}),k(x,C)):Array.isArray(x)&&Pvt(x)&&k(x,C)}}if(k({data:l,layout:s},""),o.length)return o.map(Ivt)};function Pvt(e){for(var t=0;t{"use strict";var td=HP();ef._doPlot=td._doPlot;ef.newPlot=td.newPlot;ef.restyle=td.restyle;ef.relayout=td.relayout;ef.redraw=td.redraw;ef.update=td.update;ef._guiRestyle=td._guiRestyle;ef._guiRelayout=td._guiRelayout;ef._guiUpdate=td._guiUpdate;ef._storeDirectGUIEdit=td._storeDirectGUIEdit;ef.react=td.react;ef.extendTraces=td.extendTraces;ef.prependTraces=td.prependTraces;ef.addTraces=td.addTraces;ef.deleteTraces=td.deleteTraces;ef.moveTraces=td.moveTraces;ef.purge=td.purge;ef.addFrames=td.addFrames;ef.deleteFrames=td.deleteFrames;ef.animate=td.animate;ef.setPlotConfig=td.setPlotConfig;var Rvt=NS().getGraphDiv,Dvt=lP().eraseActiveShape;ef.deleteActiveShape=function(e){return Dvt(Rvt(e))};ef.toImage=eU();ef.validate=hde();ef.downloadImage=rU();var wde=bde();ef.makeTemplate=wde.makeTemplate;ef.validateTemplate=wde.validateTemplate});var eT=ye((Bor,Ade)=>{"use strict";var nU=Dr(),Fvt=qa();Ade.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,l=Fvt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),a){var u=nU.minRowLength(a);o?s=Math.min(u,nU.minRowLength(o)):(s=u,i("y0"),i("dy"))}else{if(!o)return 0;s=nU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var Ig=ye((Nor,Ede)=>{"use strict";var Sde=Dr().dateTick0,zvt=fs(),Ovt=zvt.ONEWEEK;function Mde(e,t){return e%Ovt===0?Sde(t,1):Sde(t,0)}Ede.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",Mde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",Mde(s,r.ycalendar)),i("yperiodalignment"))}}});var Lde=ye((Uor,Cde)=>{"use strict";var kde=["orientation","groupnorm","stackgaps"];Cde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var Pde=ka(),Ide=pv().hasColorscale,Rde=Qh(),qvt=Ru();Dde.exports=function(t,r,n,i,a,o){var s=qvt.isBubble(t),l=(t.line||{}).color,u;if(o=o||{},l&&(n=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",n),Ide(t,"marker")&&Rde(t,r,i,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=Pde.background:u=Pde.defaultLine,a("marker.line.color",u),Ide(t,"marker.line")&&Rde(t,r,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0)),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var R0=ye((Gor,Fde)=>{"use strict";var Bvt=Dr().isArrayOrTypedArray,Nvt=pv().hasColorscale,Uvt=Qh();Fde.exports=function(t,r,n,i,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",n),Nvt(t,"line"))Uvt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var l=(Bvt(s)?!1:s)||n;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var tT=ye((Hor,zde)=>{"use strict";zde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var D0=ye((jor,Ode)=>{"use strict";var Vvt=Dr();Ode.exports=function(e,t,r,n,i){i=i||{},n("textposition"),Vvt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Rg=ye((Wor,Bde)=>{"use strict";var JP=ka(),qde=Dr().isArrayOrTypedArray;function Gvt(e){for(var t=JP.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var Nde=Dr(),Hvt=qa(),jvt=pf(),Wvt=Sm(),rT=Ru(),Xvt=eT(),Zvt=Ig(),Yvt=Lde(),Kvt=$p(),Jvt=R0(),Ude=tT(),$vt=D0(),Qvt=Rg(),ept=Dr().coercePattern;Vde.exports=function(t,r,n,i){function a(d,v){return Nde.coerce(t,r,jvt,d,v)}var o=Xvt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){Zvt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=Yvt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var tpt=Nb().getAxisGroup;Hde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=tpt(n,s)+o,u=n._alignmentOpts||{},c=i("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=i("offsetgroup")||"",v=h.offsetGroups,_=v[d];r._offsetIndex=0,(a!=="group"||d)&&(_||(_=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=_.offsetIndex)}});var aU=ye((Yor,jde)=>{"use strict";var rpt=Dr(),ipt=Hb(),npt=pf();jde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return rpt.coerce(i._input,i,npt,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 Xde=ye((Kor,Wde)=>{"use strict";var apt=Dr(),opt=X6();Wde.exports=function(e,t){function r(i,a){return apt.coerce(e,t,opt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var Dg=ye((Jor,Yde)=>{"use strict";var spt=Eo(),Zde=Dr(),lpt=Zde.dateTime2ms,$P=Zde.incrementMonth,upt=fs(),cpt=upt.ONEAVGMONTH;Yde.exports=function(t,r,n,i){if(r.type!=="date")return{vals:i};var a=t[n+"periodalignment"];if(!a)return{vals:i};var o=t[n+"period"],s;if(spt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:i}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[n+"period0"],d=lpt(h,u)||0,v=[],_=[],b=[],p=i.length,k=0;kE;)x=$P(x,-s,u);for(;x<=E;)x=$P(x,s,u);L=$P(x,-s,u)}else{for(S=Math.round((E-d)/o),x=d+S*o;x>E;)x-=o;for(;x<=E;)x+=o;L=x-o}v[k]=c?L:f?x:(L+x)/2,_[k]=L,b[k]=x}return{vals:v,starts:_,ends:b}}});var F0=ye(($or,Jde)=>{"use strict";var oU=pv().hasColorscale,sU=gv(),Kde=Ru();Jde.exports=function(t,r){Kde.hasLines(r)&&oU(r,"line")&&sU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),Kde.hasMarkers(r)&&(oU(r,"marker")&&sU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),oU(r,"marker.line")&&sU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var km=ye((Qor,$de)=>{"use strict";var Yf=Dr();$de.exports=function(t,r){for(var n=0;n{"use strict";var Qde=Dr();eve.exports=function(t,r){Qde.isArrayOrTypedArray(r.selectedpoints)&&Qde.tagSelected(t,r)}});var O0=ye((tsr,sve)=>{"use strict";var tve=Eo(),uU=Dr(),KM=ho(),rve=Dg(),lU=fs().BADNUM,cU=Ru(),fpt=F0(),hpt=km(),dpt=z0();function vpt(e,t){var r=e._fullLayout,n=t._xA=KM.getFromId(e,t.xaxis||"x","x"),i=t._yA=KM.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=rve(t,n,"x",a),l=rve(t,i,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=fU(t,r,n,i),_=!1,b,p,k,E,S,L;ave(r,t);var x="x",C="y",M;if(v)uU.pushUnique(v.traceIndices,t.index),b=v.orientation==="v",b?(C="s",M="x"):(x="s",M="y"),S=v.stackgaps==="interpolate";else{var g=nve(t,f);ive(e,t,n,i,u,c,g)}var P=!!t.xperiodalignment,T=!!t.yperiodalignment;for(p=0;pp&&h[E].gap;)E--;for(L=h[E].s,k=h.length-1;k>E;k--)h[k].s=L;for(;p{"use strict";lve.exports=QP;var ppt=Dr().distinctVals;function QP(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),i=[],a=0;a{"use strict";var q0=Eo(),p_=Dr().isArrayOrTypedArray,iT=fs().BADNUM,gpt=qa(),JM=ho(),mpt=Nb().getAxisGroup,eI=uve();function ypt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!q0(s))}for(var c=0;c{"use strict";var vve=O0(),pve=jb().setGroupPositions;function Lpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ug[c]&&c{"use strict";var Ipt=So(),bve=fs(),$M=bve.BADNUM,wve=bve.LOG_CLIP,yve=wve+.5,_ve=wve-.5,tI=Dr(),Rpt=tI.segmentsIntersect,xve=tI.constrain,mU=Sm();Tve.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",l=i._length,u=a._length,c=r.backoff,f=n.marker,h=r.connectGaps,d=r.baseTolerance,v=r.shape,_=v==="linear",b=n.fill&&n.fill!=="none",p=[],k=mU.minTolerance,E=t.length,S=new Array(E),L=0,x,C,M,g,P,T,z,O,V,G,Z,j,N,H,te,oe;function _e(dt){var Ge=t[dt];if(!Ge)return!1;var Je=r.linearized?i.l2p(Ge.x):i.c2p(Ge.x),je=r.linearized?a.l2p(Ge.y):a.c2p(Ge.y);if(Je===$M){if(o&&(Je=i.c2p(Ge.x,!0)),Je===$M)return!1;s&&je===$M&&(Je*=Math.abs(i._m*u*(i._m>0?yve:_ve)/(a._m*l*(a._m>0?yve:_ve)))),Je*=1e3}if(je===$M){if(s&&(je=a.c2p(Ge.y,!0)),je===$M)return!1;je*=1e3}return[Je,je]}function Ee(dt,Ge,Je,je){var tt=Je-dt,xt=je-Ge,Ie=.5-dt,xe=.5-Ge,ke=tt*tt+xt*xt,vt=tt*Ie+xt*xe;if(vt>0&&vt1||Math.abs(Ie.y-Je[0][1])>1)&&(Ie=[Ie.x,Ie.y],je&&Se(Ie,dt)Fe||dt[1]ge)return[xve(dt[0],Ae,Fe),xve(dt[1],Pe,ge)]}function Nt(dt,Ge){if(dt[0]===Ge[0]&&(dt[0]===Ae||dt[0]===Fe)||dt[1]===Ge[1]&&(dt[1]===Pe||dt[1]===ge))return!0}function Jt(dt,Ge){var Je=[],je=Gt(dt),tt=Gt(Ge);return je&&tt&&Nt(je,tt)||(je&&Je.push(je),tt&&Je.push(tt)),Je}function sr(dt,Ge,Je){return function(je,tt){var xt=Gt(je),Ie=Gt(tt),xe=[];if(xt&&Ie&&Nt(xt,Ie))return xe;xt&&xe.push(xt),Ie&&xe.push(Ie);var ke=2*tI.constrain((je[dt]+tt[dt])/2,Ge,Je)-((xt||je)[dt]+(Ie||tt)[dt]);if(ke){var vt;xt&&Ie?vt=ke>0==xt[dt]>Ie[dt]?xt:Ie:vt=xt||Ie,vt[dt]+=ke}return xe}}var wr;v==="linear"||v==="spline"?wr=lt:v==="hv"||v==="vh"?wr=Jt:v==="hvh"?wr=sr(0,Ae,Fe):v==="vhv"&&(wr=sr(1,Pe,ge));function cr(dt,Ge){var Je=Ge[0]-dt[0],je=(Ge[1]-dt[1])/Je,tt=(dt[1]*Ge[0]-Ge[1]*dt[0])/Je;return tt>0?[je>0?Ae:Fe,ge]:[je>0?Fe:Ae,Pe]}function $e(dt){var Ge=dt[0],Je=dt[1],je=Ge===S[L-1][0],tt=Je===S[L-1][1];if(!(je&&tt))if(L>1){var xt=Ge===S[L-2][0],Ie=Je===S[L-2][1];je&&(Ge===Ae||Ge===Fe)&&xt?Ie?L--:S[L-1]=dt:tt&&(Je===Pe||Je===ge)&&Ie?xt?L--:S[L-1]=dt:S[L++]=dt}else S[L++]=dt}function St(dt){S[L-1][0]!==dt[0]&&S[L-1][1]!==dt[1]&&$e([ut,pt]),$e(dt),Zt=null,ut=pt=0}var Qt=tI.isArrayOrTypedArray(f);function Vt(dt){if(dt&&c&&(dt.i=x,dt.d=t,dt.trace=n,dt.marker=Qt?f[dt.i]:f,dt.backoff=c),Ce=dt[0]/l,me=dt[1]/u,ce=dt[0]Fe?Fe:0,Ze=dt[1]ge?ge:0,ce||Ze){if(!L)S[L++]=[ce||dt[0],Ze||dt[1]];else if(Zt){var Ge=wr(Zt,dt);Ge.length>1&&(St(Ge[0]),S[L++]=Ge[1])}else st=wr(S[L-1],dt)[0],S[L++]=st;var Je=S[L-1];ce&&Ze&&(Je[0]!==ce||Je[1]!==Ze)?(Zt&&(ut!==ce&&pt!==Ze?$e(ut&&pt?cr(Zt,dt):[ut||ce,pt||Ze]):ut&&pt&&$e([ut,pt])),$e([ce,Ze])):ut-ce&&pt-Ze&&$e([ce||ut,Ze||pt]),Zt=dt,ut=ce,pt=Ze}else Zt&&St(wr(Zt,dt)[0]),S[L++]=dt}for(x=0;xie(T,_t))break;M=T,N=V[0]*O[0]+V[1]*O[1],N>Z?(Z=N,g=T,z=!1):N=t.length||!T)break;Vt(T),C=T}}Zt&&$e([ut||Zt[0],pt||Zt[1]]),p.push(S.slice(0,L))}var It=v.slice(v.length-1);if(c&&It!=="h"&&It!=="v"){for(var mt=!1,er=-1,lr=[],Tr=0;Tr{"use strict";var Ave={tonextx:1,tonexty:1,tonext:1};Sve.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a=0?l=d:(l=d=h,h++),l{"use strict";var Fg=Oa(),Dpt=qa(),QM=Dr(),aT=QM.ensureSingle,Eve=QM.identity,Kf=So(),oT=Ru(),Fpt=yU(),zpt=_U(),rI=kM().tester;kve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=zpt(t,r,n);if(s=i.selectAll("g.trace").data(f,function(d){return d[0].trace.uid}),s.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),s.order(),Opt(t,s,r),c){o&&(l=o());var h=Fg.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){i.selectAll("g.trace").each(function(d,v){Mve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){Mve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function Opt(e,t,r){t.each(function(n){var i=aT(Fg.select(this),"g","fills");Kf.setClipUrl(i,r.layerClipId,e);var a=n[0].trace,o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=i.selectAll("g").data(o,Eve);s.enter().append("g"),s.exit().each(function(l){a[l]=null}).remove(),s.order().each(function(l){a[l]=aT(Fg.select(this),"path","js-fill")})})}function Mve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;qpt(e,t,r,n,i);var u=!!o&&o.duration>0;function c(sr){return u?sr.transition():sr}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,_=Fg.select(a),b=aT(_,"g","errorbars"),p=aT(_,"g","lines"),k=aT(_,"g","points"),E=aT(_,"g","text");if(Dpt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;c(_).style("opacity",d.opacity);var S,L,x=d.fill.charAt(d.fill.length-1);x!=="x"&&x!=="y"&&(x="");var C,M;x==="y"?(C=1,M=h.c2p(0,!0)):x==="x"&&(C=0,M=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=_;var g="",P=[],T=d._prevtrace,z=null,O=null;T&&(g=T._prevRevpath||"",L=T._nextFill,P=T._ownPolygons,z=T._fillsegments,O=T._fillElement);var V,G,Z="",j="",N,H,te,oe,_e,Ee,Ce=[];d._polygons=[];var me=[],ie=[],Se=QM.noop;if(S=d._ownFill,oT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(v.shape)!==-1?(N=Kf.steps(v.shape),H=Kf.steps(v.shape.split("").reverse().join(""))):v.shape==="spline"?N=H=function(sr){var wr=sr[sr.length-1];return sr.length>1&&sr[0][0]===wr[0]&&sr[0][1]===wr[1]?Kf.smoothclosed(sr.slice(1),v.smoothing):Kf.smoothopen(sr,v.smoothing)}:N=H=function(sr){return"M"+sr.join("L")},te=function(sr){return H(sr.reverse())},ie=Fpt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),me=new Array(ie.length);var Le=0;for(l=0;l=s[0]&&_.x<=s[1]&&_.y>=l[0]&&_.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(_,b){var p=_[0].trace;oT.hasMarkers(p)&&p.marker.maxdisplayed>0&&b{"use strict";Cve.exports={container:"marker",min:"cmin",max:"cmax"}});var nI=ye((usr,Lve)=>{"use strict";var iI=ho();Lve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=iI.getFromTrace(a,r,"x"),s=iI.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),i.xLabel=iI.tickText(o,o.c2l(l),!0).text,i.yLabel=iI.tickText(s,s.c2l(u),!0).text,i}});var op=ye((csr,Pve)=>{"use strict";var xU=Oa(),lT=So(),Bpt=qa();function Npt(e){var t=xU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=xU.select(this),i=r.trace||r[0].trace;bU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=xU.select(this),i=r.trace||r[0].trace;wU(n,i,e)}),t.selectAll("g.trace path.js-line").call(lT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(lT.fillGroupStyle,e,!1),Bpt.getComponentMethod("errorbars","style")(t)}function bU(e,t,r){lT.pointStyle(e.selectAll("path.point"),t,r)}function wU(e,t,r){lT.textPointStyle(e.selectAll("text"),t,r)}function Upt(e,t,r){var n=t[0].trace;n.selectedpoints?(lT.selectedPointStyle(r.selectAll("path.point"),n),lT.selectedTextStyle(r.selectAll("text"),n)):(bU(r,n,e),wU(r,n,e))}Pve.exports={style:Npt,stylePoints:bU,styleText:wU,styleOnSelect:Upt}});var cT=ye((fsr,Ive)=>{"use strict";var uT=ka(),Vpt=Ru();Ive.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&uT.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var a=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return i=a&&uT.opacity(a)?a:o&&uT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?uT.opacity(i)<.3?uT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&uT.opacity(n)&&Vpt.hasLines(t)&&t.line.width?n:t.fillcolor)}});var fT=ye((hsr,Dve)=>{"use strict";var aI=Dr(),Rve=vf(),Gpt=qa(),Hpt=cT(),TU=ka(),jpt=aI.fillText;Dve.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,v=!!o.xperiodalignment,_=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(j){if(v){var N=s.c2p(j.xStart),H=s.c2p(j.xEnd);return u>=Math.min(N,H)&&u<=Math.max(N,H)?0:1/0}var te=Math.max(3,j.mrc||0),oe=1-1/te,_e=Math.abs(s.c2p(j.x)-u);return _e=Math.min(N,H)&&c<=Math.max(N,H)?0:1/0}var te=Math.max(3,j.mrc||0),oe=1-1/te,_e=Math.abs(l.c2p(j.y)-c);return _eCe!=ge>=Ce&&(Ae=Se[ie-1][0],Fe=Se[ie][0],ge-Pe&&(Le=Ae+(Fe-Ae)*(Ce-Pe)/(ge-Pe),te=Math.min(te,Le),oe=Math.max(oe,Le)));return te=Math.max(te,0),oe=Math.min(oe,s._length),{x0:te,x1:oe,y0:Ce,y1:Ce}}if(h.indexOf("fills")!==-1&&o._fillElement){var V=z(o._fillElement)&&!z(o._fillExclusionElement);if(V){var G=O(o._polygons);G===null&&(G={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var Z=TU.defaultLine;return TU.opacity(o.fillcolor)?Z=o.fillcolor:TU.opacity((o.line||{}).color)&&(Z=o.line.color),aI.extendFlat(t,{distance:t.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:Z,hovertemplate:!1}),delete t.index,o.text&&!aI.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var hT=ye((dsr,zve)=>{"use strict";var Fve=Ru();zve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!Fve.hasMarkers(s)&&!Fve.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";Ove.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var SU=ye((psr,Uve)=>{"use strict";var e4=qa().traceIs,AU=R3();Uve.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&(Wpt(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function Wpt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=Xpt(t,r,n);if(a){if(a.type==="histogram"&&n==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=a[o],l={noMultiCategory:!e4(a,"cartesian")||e4(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,Nve(a,n)){var u=Bve(a),c=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(Nve(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Bve(e){return{v:"x",h:"y"}[e.orientation||"v"]}function Nve(e,t){var r=Bve(e),n=e4(e,"box-violin"),i=e4(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var oI=ye((gsr,Vve)=>{"use strict";var Zpt=vv().isTypedArraySpec;function Ypt(e,t){var r=t.dataAttr||e._id.charAt(0),n={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a0||Zpt(a),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=Ypt(r,i).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var t4=ye((msr,Hve)=>{"use strict";var Gve=cd().mix,Kpt=Lh(),Jpt=Dr();Hve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(M,g){return Jpt.coerce2(t,r,i.attributes,M,g)}var s=o("linecolor",a),l=o("linewidth"),u=n("showline",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=Gve(a,i.bgColor,i.blend||Kpt.lightFraction).toRgbString(),f=o("gridcolor",c),h=o("gridwidth"),d=o("griddash"),v=n("showgrid",i.showGrid||!!f||!!h||!!d);if(v||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var _=Gve(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",_),p=o("minor.gridwidth",r.gridwidth||1),k=o("minor.griddash",r.griddash||"solid"),E=n("minor.showgrid",!!b||!!p||!!k);E||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var S=o("zerolinelayer"),L=o("zerolinecolor",a),x=o("zerolinewidth"),C=n("zeroline",i.showGrid||!!L||!!x);C||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var i4=ye((ysr,Kve)=>{"use strict";var jve=Eo(),$pt=qa(),r4=Dr(),Qpt=vl(),e0t=Yd(),MU=Rd(),Wve=bb(),Xve=M3(),t0t=e_(),r0t=t_(),i0t=oI(),n0t=t4(),a0t=xB(),Zve=ym(),sI=hd().WEEKDAY_PATTERN,o0t=hd().HOUR_PATTERN;Kve.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},l=i.splomStash||{},u=n("visible",!i.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var d=$pt.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var v="";(!i.noTicklabelposition||f==="multicategory")&&(v=r4.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||n("ticklabeloverflow",v.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),Zve(r,a),a0t(t,r,n,i),i0t(t,r,n,i),i.noHover||(f!=="category"&&n("hoverformat"),i.noUnifiedhovertitle||n("unifiedhovertitle.text"));var _=n("color"),b=_!==MU.color.dflt?_:s.color,p=l.label||a._dfltTitle[o];if(r0t(t,r,n,f,i),!u)return r;n("title.text",p),r4.coerceFont(n,"title.font",s,{overrideDflt:{size:r4.bigFont(s.size),color:b}}),Wve(t,r,n,f);var k=i.hasMinor;if(k&&(Qpt.newContainer(r,"minor"),Wve(t,r,n,f,{isMinor:!0})),t0t(t,r,n,f,i),Xve(t,r,n,i),k){var E=i.isMinor;i.isMinor=!0,Xve(t,r,n,i),i.isMinor=E}n0t(t,r,n,{dfltColor:_,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:MU}),k&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var S=f==="multicategory";if(!i.noTickson&&(f==="category"||S)&&(r.ticks||r.showgrid)&&(S?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),S){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(e0t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:s0t}),!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=Yve(a[s]),l){o=sI;break}}var u=n("pattern",o);if(u===sI)for(s=0;s<2;s++)l=Yve(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case sI:if(!jve(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 o0t:if(!jve(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 u0t=Eo(),lI=Dr();Jve.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,l=i.grid,u=i.overlayingDomain,c,f,h,d,v,_;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],d=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(u0t(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,v=0,_=!1;var b=lI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),p=lI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var k=n("autoshift");k&&(d=p==="left"?u[0]:u[1],_=r.automargin?r.automargin:!0,v=p==="left"?-3:3),n("shift",v)}n("position",d)}n("automargin",_);var E=!1;if(o.length&&(E=lI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!E){var S=n("domain",f);S[0]>S[1]-1/4096&&(r.domain=f),lI.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var ope=ye((xsr,ape)=>{"use strict";var Wb=Dr(),$ve=ka(),c0t=ip().isUnifiedHover,f0t=HB(),Qve=vl(),h0t=c3(),epe=Rd(),d0t=SU(),tpe=i4(),v0t=Nb(),rpe=uI(),kU=hf(),Cm=kU.id2name,ipe=kU.name2id,p0t=hd().AX_ID_PATTERN,npe=qa(),cI=npe.traceIs,EU=npe.getComponentMethod;function fI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}ape.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},_,b;for(_=0;_{"use strict";var g0t=Oa(),spe=qa(),hI=Dr(),Qp=So(),dI=ho();lpe.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){dI.redrawComponents(t);return}function o(b){var p=b.xaxis,k=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,p._offset,k._offset).call(Qp.setScale,1,1);var E=b.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(Qp.setPointGroupScale,1,1),E.selectAll(".textpoint").call(Qp.setTextPointsScale,1,1),E.call(Qp.hideOutsideRangePoints,b)}function s(b,p){var k=b.plotinfo,E=k.xaxis,S=k.yaxis,L=E._length,x=S._length,C=!!b.xr1,M=!!b.yr1,g=[];if(C){var P=hI.simpleMap(b.xr0,E.r2l),T=hI.simpleMap(b.xr1,E.r2l),z=P[1]-P[0],O=T[1]-T[0];g[0]=(P[0]*(1-p)+p*T[0]-P[0])/(P[1]-P[0])*L,g[2]=L*(1-p+p*O/z),E.range[0]=E.l2r(P[0]*(1-p)+p*T[0]),E.range[1]=E.l2r(P[1]*(1-p)+p*T[1])}else g[0]=0,g[2]=L;if(M){var V=hI.simpleMap(b.yr0,S.r2l),G=hI.simpleMap(b.yr1,S.r2l),Z=V[1]-V[0],j=G[1]-G[0];g[1]=(V[1]*(1-p)+p*G[1]-V[1])/(V[0]-V[1])*x,g[3]=x*(1-p+p*j/Z),S.range[0]=E.l2r(V[0]*(1-p)+p*G[0]),S.range[1]=S.l2r(V[1]*(1-p)+p*G[1])}else g[1]=0,g[3]=x;dI.drawOne(t,E,{skipTitle:!0}),dI.drawOne(t,S,{skipTitle:!0}),dI.redrawComponents(t,[E._id,S._id]);var N=C?L/g[2]:1,H=M?x/g[3]:1,te=C?g[0]:0,oe=M?g[1]:0,_e=C?g[0]/g[2]*L:0,Ee=M?g[1]/g[3]*x:0,Ce=E._offset-_e,me=S._offset-Ee;k.clipRect.call(Qp.setTranslate,te,oe).call(Qp.setScale,1/N,1/H),k.plot.call(Qp.setTranslate,Ce,me).call(Qp.setScale,N,H),Qp.setPointGroupScale(k.zoomScalePts,1/N,1/H),Qp.setTextPointsScale(k.zoomScaleTxt,1/N,1/H)}var l;i&&(l=i());function u(){for(var b={},p=0;pn.duration?(u(),d=window.cancelAnimationFrame(_)):d=window.requestAnimationFrame(_)}return f=Date.now(),d=window.requestAnimationFrame(_),Promise.resolve()}});var ph=ye(xv=>{"use strict";var pI=Oa(),cpe=qa(),Xb=Dr(),m0t=Mc(),y0t=So(),fpe=Id().getModuleCalcData,g_=hf(),zg=hd(),_0t=Wp(),iu=Xb.ensureSingle;function vI(e,t,r){return Xb.ensureSingle(e,t,r,function(n){n.datum(r)})}var Zb=zg.zindexSeparator;xv.name="cartesian";xv.attr=["xaxis","yaxis"];xv.idRoot=["x","y"];xv.idRegex=zg.idRegex;xv.attrRegex=zg.attrRegex;xv.attributes=qve();xv.layoutAttributes=Rd();xv.supplyLayoutDefaults=ope();xv.transitionAxes=upe();xv.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u0){var d=h.id;if(d.indexOf(Zb)!==-1)continue;d+=Zb+(u+1),h=Xb.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var v=[],_,b=0;b1&&(L+=Zb+S),E.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.xaxislayer=iu(n,"g","xaxislayer-above"),t.yaxislayer=iu(n,"g","yaxislayer-above");else{if(!o){var h=iu(n,"g","layer-subplot");t.shapelayer=iu(h,"g","shapelayer"),t.imagelayer=iu(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=iu(n,"g","minor-gridlayer"),t.gridlayer=iu(n,"g","gridlayer"),t.zerolinelayer=iu(n,"g","zerolinelayer"));var d=iu(n,"g","layer-between");t.shapelayerBetween=iu(d,"g","shapelayer"),t.imagelayerBetween=iu(d,"g","imagelayer"),iu(n,"path","xlines-below"),iu(n,"path","ylines-below"),t.overlinesBelow=iu(n,"g","overlines-below"),iu(n,"g","xaxislayer-below"),iu(n,"g","yaxislayer-below"),t.overaxesBelow=iu(n,"g","overaxes-below")}t.overplot=iu(n,"g","overplot"),t.plot=iu(t.overplot,"g",i),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=iu(n,"g","zerolinelayer-above"),o||(t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.overlinesAbove=iu(n,"g","overlines-above"),iu(n,"g","xaxislayer-above"),iu(n,"g","yaxislayer-above"),t.overaxesAbove=iu(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var v=f.plotgroup,_=i+"-x",b=i+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,iu(f.overlinesBelow,"path",_),iu(f.overlinesBelow,"path",b),iu(f.overaxesBelow,"g",_),iu(f.overaxesBelow,"g",b),t.plot=iu(f.overplot,"g",i),iu(f.overlinesAbove,"path",_),iu(f.overlinesAbove,"path",b),iu(f.overaxesAbove,"g",_),iu(f.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+s).select("."+_),t.ylines=v.select(".overlines-"+l).select("."+b),t.xaxislayer=v.select(".overaxes-"+s).select("."+_),t.yaxislayer=v.select(".overaxes-"+l).select("."+b)}o||(u||(vI(t.minorGridlayer,"g",t.xaxis._id),vI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(p){return p[0]}).sort(g_.idSort),vI(t.gridlayer,"g",t.xaxis._id),vI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(p){return p[0]}).sort(g_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function vpe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=pI.select(this);c.remove(),ppe(u,t),r[u]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o{"use strict";var gI=Ru();gpe.exports={hasLines:gI.hasLines,hasMarkers:gI.hasMarkers,hasText:gI.hasText,isBubble:gI.isBubble,attributes:pf(),layoutAttributes:X6(),supplyDefaults:Gde(),crossTraceDefaults:aU(),supplyLayoutDefaults:Xde(),calc:O0().calc,crossTraceCalc:mve(),arraysToCalcdata:km(),plot:sT(),colorbar:$d(),formatLabels:nI(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:fT(),selectPoints:hT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:ph(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var xpe=ye((Asr,_pe)=>{"use strict";var b0t=Oa(),w0t=ka(),ype=IN(),CU=Dr(),T0t=CU.strScale,A0t=CU.strRotate,S0t=CU.strTranslate;_pe.exports=function(t,r,n){var i=t.node(),a=ype[n.arrowhead||0],o=ype[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,d,v,_,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},v={x:+t.attr("x2"),y:+t.attr("y2")};var p=d.x-v.x,k=d.y-v.y;if(_=Math.atan2(k,p),b=_+Math.PI,f&&h&&f+h>Math.sqrt(p*p+k*k)){V();return}if(f){if(f*f>p*p+k*k){V();return}var E=f*Math.cos(_),S=f*Math.sin(_);v.x+=E,v.y+=S,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>p*p+k*k){V();return}var L=h*Math.cos(_),x=h*Math.sin(_);d.x-=L,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),M="";if(C{"use strict";var bpe=Oa(),LU=qa(),M0t=Mc(),y_=Dr(),PU=y_.strTranslate,a4=ho(),Yb=ka(),Iy=So(),wpe=vf(),IU=ru(),RU=Sg(),n4=yv(),E0t=vl().arrayEditor,k0t=xpe();Spe.exports={draw:C0t,drawOne:Tpe,drawRaw:Ape};function C0t(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?tt="right":tt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[tt]}for(var Pe=!1,ge=["x","y"],Re=0;Re1)&&(ut===Ze?(_t=pt.r2fraction(t["a"+ce]),(_t<0||_t>1)&&(Pe=!0)):Pe=!0),wr=pt._offset+pt.r2p(t[ce]),St=.5}else{var It=Vt==="domain";ce==="x"?($e=t[ce],wr=It?pt._offset+pt._length*$e:wr=s.l+s.w*$e):($e=1-t[ce],wr=It?pt._offset+pt._length*$e:wr=s.t+s.h*$e),St=t.showarrow?.5:$e}if(t.showarrow){sr.head=wr;var mt=t["a"+ce];if(Qt=st*Fe(.5,t.xanchor)-lt*Fe(.5,t.yanchor),ut===Ze){var er=a4.getRefType(ut);er==="domain"?(ce==="y"&&(mt=1-mt),sr.tail=pt._offset+pt._length*mt):er==="paper"?ce==="y"?(mt=1-mt,sr.tail=s.t+s.h*mt):sr.tail=s.l+s.w*mt:sr.tail=pt._offset+pt.r2p(mt),cr=Qt}else sr.tail=wr+mt,cr=Qt+mt;sr.text=sr.tail+Qt;var lr=o[ce==="x"?"width":"height"];if(Ze==="paper"&&(sr.head=y_.constrain(sr.head,1,lr-1)),ut==="pixel"){var Tr=-Math.max(sr.tail-3,sr.text),Lr=Math.min(sr.tail+3,sr.text)-lr;Tr>0?(sr.tail+=Tr,sr.text+=Tr):Lr>0&&(sr.tail-=Lr,sr.text-=Lr)}sr.tail+=Jt,sr.head+=Jt}else Qt=Gt*Fe(St,Nt),cr=Qt,sr.text=wr+Qt;sr.text+=Jt,Qt+=Jt,cr+=Jt,t["_"+ce+"padplus"]=Gt/2+cr,t["_"+ce+"padminus"]=Gt/2-cr,t["_"+ce+"size"]=Gt,t["_"+ce+"shift"]=Qt}if(Pe){C.remove();return}var ti=0,Br=0;if(t.align!=="left"&&(ti=(ie-Ce)*(t.align==="center"?.5:1)),t.valign!=="top"&&(Br=(Se-me)*(t.valign==="middle"?.5:1)),_e)oe.select("svg").attr({x:P+ti-1,y:P+Br}).call(Iy.setClipUrl,z?_:null,e);else{var Vr=P+Br-Ee.top,dt=P+ti-Ee.left;Z.call(IU.positionText,dt,Vr).call(Iy.setClipUrl,z?_:null,e)}O.select("rect").call(Iy.setRect,P,P,ie,Se),T.call(Iy.setRect,M/2,M/2,Le-M,Ae-M),C.call(Iy.setTranslate,Math.round(b.x.text-Le/2),Math.round(b.y.text-Ae/2)),E.attr({transform:"rotate("+p+","+b.x.text+","+b.y.text+")"});var Ge=function(je,tt){k.selectAll(".annotation-arrow-g").remove();var xt=b.x.head,Ie=b.y.head,xe=b.x.tail+je,ke=b.y.tail+tt,vt=b.x.text+je,ir=b.y.text+tt,ar=y_.rotationXYMatrix(p,vt,ir),vr=y_.apply2DTransform(ar),ii=y_.apply2DTransform2(ar),pi=+T.attr("width"),$r=+T.attr("height"),di=vt-.5*pi,ji=di+pi,In=ir-.5*$r,wi=In+$r,On=[[di,In,di,wi],[di,wi,ji,wi],[ji,wi,ji,In],[ji,In,di,In]].map(ii);if(!On.reduce(function(Qr,Oi){return Qr^!!y_.segmentsIntersect(xt,Ie,xt+1e6,Ie+1e6,Oi[0],Oi[1],Oi[2],Oi[3])},!1)){On.forEach(function(Qr){var Oi=y_.segmentsIntersect(xe,ke,xt,Ie,Qr[0],Qr[1],Qr[2],Qr[3]);Oi&&(xe=Oi.x,ke=Oi.y)});var qn=t.arrowwidth,Fn=t.arrowcolor,ra=t.arrowside,la=k.append("g").style({opacity:Yb.opacity(Fn)}).classed("annotation-arrow-g",!0),Ut=la.append("path").attr("d","M"+xe+","+ke+"L"+xt+","+Ie).style("stroke-width",qn+"px").call(Yb.stroke,Yb.rgb(Fn));if(k0t(Ut,ra,t),l.annotationPosition&&Ut.node().parentNode&&!n){var wt=xt,rr=Ie;if(t.standoff){var nr=Math.sqrt(Math.pow(xt-xe,2)+Math.pow(Ie-ke,2));wt+=t.standoff*(xe-xt)/nr,rr+=t.standoff*(ke-Ie)/nr}var Er=la.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(xe-wt)+","+(ke-rr),transform:PU(wt,rr)}).style("stroke-width",qn+6+"px").call(Yb.stroke,"rgba(0,0,0,0)").call(Yb.fill,"rgba(0,0,0,0)"),Xr,ri;n4.init({element:Er.node(),gd:e,prepFn:function(){var Qr=Iy.getTranslate(C);Xr=Qr.x,ri=Qr.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(Qr,Oi){var $i=vr(Xr,ri),tn=$i[0]+Qr,fn=$i[1]+Oi;C.call(Iy.setTranslate,tn,fn),d("x",m_(i,Qr,"x",s,t)),d("y",m_(a,Oi,"y",s,t)),t.axref===t.xref&&d("ax",m_(i,Qr,"ax",s,t)),t.ayref===t.yref&&d("ay",m_(a,Oi,"ay",s,t)),la.attr("transform",PU(Qr,Oi)),E.attr({transform:"rotate("+p+","+tn+","+fn+")"})},doneFn:function(){LU.call("_guiRelayout",e,v());var Qr=document.querySelector(".js-notes-box-panel");Qr&&Qr.redraw(Qr.selectedObj)}})}}};if(t.showarrow&&Ge(0,0),S){var Je;n4.init({element:C.node(),gd:e,prepFn:function(){Je=E.attr("transform")},moveFn:function(je,tt){var xt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",m_(i,je,"ax",s,t)):d("ax",t.ax+je),t.ayref===t.yref?d("ay",m_(a,tt,"ay",s.w,t)):d("ay",t.ay+tt),Ge(je,tt);else{if(n)return;var Ie,xe;if(i)Ie=m_(i,je,"x",s,t);else{var ke=t._xsize/s.w,vt=t.x+(t._xshift-t.xshift)/s.w-ke/2;Ie=n4.align(vt+je/s.w,ke,0,1,t.xanchor)}if(a)xe=m_(a,tt,"y",s,t);else{var ir=t._ysize/s.h,ar=t.y-(t._yshift+t.yshift)/s.h-ir/2;xe=n4.align(ar-tt/s.h,ir,0,1,t.yanchor)}d("x",Ie),d("y",xe),(!i||!a)&&(xt=n4.getCursor(i?.5:Ie,a?.5:xe,t.xanchor,t.yanchor))}E.attr({transform:PU(je,tt)+Je}),RU(C,xt)},clickFn:function(je,tt){t.captureevents&&e.emit("plotly_clickannotation",x(tt))},doneFn:function(){RU(C),LU.call("_guiRelayout",e,v());var je=document.querySelector(".js-notes-box-panel");je&&je.redraw(je.selectedObj)}})}}l.annotationText?Z.call(IU.makeEditable,{delegate:C,gd:e}).call(j).on("edit",function(H){t.text=H,this.call(j),d("text",H),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),LU.call("_guiRelayout",e,v())}):Z.call(j)}});var Ppe=ye((Msr,Lpe)=>{"use strict";var Mpe=Dr(),L0t=qa(),Epe=vl().arrayEditor;Lpe.exports={hasClickToShow:P0t,onClick:I0t};function P0t(e,t){var r=Cpe(e,t);return r.on.length>0||r.explicitOff.length>0}function I0t(e,t){var r=Cpe(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(n.length||i.length){for(s=0;s{"use strict";var DU=Dr(),dT=ka();Ipe.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=dT.opacity(o);i("borderpad");var l=i("borderwidth"),u=i("showarrow");i("text",u?" ":n._dfltTitle.annotation),i("textangle"),DU.coerceFont(i,"font",n.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),u){var f=i("arrowside"),h,d;f.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),f.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:dT.defaultLine),i("arrowwidth",(s&&l||1)*2),i("standoff"),i("startstandoff")}var v=i("hovertext"),_=n.hoverlabel||{};if(v){var b=i("hoverlabel.bgcolor",_.bgcolor||(dT.opacity(a)?dT.rgb(a):dT.defaultLine)),p=i("hoverlabel.bordercolor",_.bordercolor||dT.contrast(b)),k=DU.extendFlat({},_.font);k.color||(k.color=p),DU.coerceFont(i,"hoverlabel.font",k)}i("captureevents",!!v)}});var Dpe=ye((ksr,Rpe)=>{"use strict";var zU=Dr(),Kb=ho(),R0t=Yd(),D0t=FU(),F0t=Ub();Rpe.exports=function(t,r){R0t(t,r,{name:"annotations",handleItemDefaults:z0t})};function z0t(e,t,r){function n(E,S){return zU.coerce(e,t,F0t,E,S)}var i=n("visible"),a=n("clicktoshow");if(i||a){D0t(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=Kb.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=Kb.getFromId(u,h);d._annIndices.push(t._index)}if(Kb.coercePosition(t,u,n,h,f,.5),o){var v="a"+f,_=Kb.coerceRef(e,t,u,v,"pixel",["pixel","paper"]);_!=="pixel"&&_!==h&&(_=t[v]="pixel");var b=_==="pixel"?l[c]:.4;Kb.coercePosition(t,u,n,_,v,b)}n(f+"anchor"),n(f+"shift")}if(zU.noneOrAll(e,t,["x","y"]),o&&zU.noneOrAll(e,t,["ax","ay"]),a){var p=n("xclick"),k=n("yclick");t._xclick=p===void 0?t.x:Kb.cleanPosition(p,u,t.xref),t._yclick=k===void 0?t.y:Kb.cleanPosition(k,u,t.yref)}}}});var Ope=ye((Csr,zpe)=>{"use strict";var OU=Dr(),Jb=ho(),O0t=mI().draw;zpe.exports=function(t){var r=t._fullLayout,n=OU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return OU.syncOrAsync([O0t,q0t],t)};function q0t(e){var t=e._fullLayout;OU.filterVisible(t.annotations).forEach(function(r){var n=Jb.getFromId(e,r.xref),i=Jb.getFromId(e,r.yref),a=Jb.getRefType(r.xref),o=Jb.getRefType(r.yref);r._extremes={},a==="range"&&Fpe(r,n),o==="range"&&Fpe(r,i)})}function Fpe(e,t){var r=t._id,n=r.charAt(0),i=e[n],a=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,v=3*e.startarrowsize*e.arrowwidth||0,_=v+c,b=v-c,p;if(s===o){var k=Jb.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),E=Jb.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,_),ppadminus:Math.max(u,b)});p={min:[k.min[0],E.min[0]],max:[k.max[0],E.max[0]]}}else _=a?_+a:_,b=a?b-a:b,p=Jb.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,_),ppadminus:Math.max(u,d,b)});e._extremes[r]=p}});var Bpe=ye((Lsr,qpe)=>{"use strict";var B0t=Eo(),N0t=m6();qpe.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var v=u[d],_=null;a?_=N0t(v,r.range):_=Math.pow(10,v),B0t(_)||(_=null),i(c+d,_)}for(var h=0;h{"use strict";var qU=mI(),Npe=Ppe();Upe.exports={moduleType:"component",name:"annotations",layoutAttributes:Ub(),supplyLayoutDefaults:Dpe(),includeBasePlot:qM()("annotations"),calcAutorange:Ope(),draw:qU.draw,drawOne:qU.drawOne,drawRaw:qU.drawRaw,hasClickToShow:Npe.hasClickToShow,onClick:Npe.onClick,convertCoords:Bpe()}});var yI=ye((Isr,Gpe)=>{"use strict";var kc=Ub(),U0t=mc().overrideAll,V0t=vl().templatedArray;Gpe.exports=U0t(V0t("annotation",{visible:kc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:kc.xanchor,xshift:kc.xshift,yanchor:kc.yanchor,yshift:kc.yshift,text:kc.text,textangle:kc.textangle,font:kc.font,width:kc.width,height:kc.height,opacity:kc.opacity,align:kc.align,valign:kc.valign,bgcolor:kc.bgcolor,bordercolor:kc.bordercolor,borderpad:kc.borderpad,borderwidth:kc.borderwidth,showarrow:kc.showarrow,arrowcolor:kc.arrowcolor,arrowhead:kc.arrowhead,startarrowhead:kc.startarrowhead,arrowside:kc.arrowside,arrowsize:kc.arrowsize,startarrowsize:kc.startarrowsize,arrowwidth:kc.arrowwidth,standoff:kc.standoff,startstandoff:kc.startstandoff,hovertext:kc.hovertext,hoverlabel:kc.hoverlabel,captureevents:kc.captureevents}),"calc","from-root")});var jpe=ye((Rsr,Hpe)=>{"use strict";var BU=Dr(),G0t=ho(),H0t=Yd(),j0t=FU(),W0t=yI();Hpe.exports=function(t,r,n){H0t(t,r,{name:"annotations",handleItemDefaults:X0t,fullLayout:n.fullLayout})};function X0t(e,t,r,n){function i(s,l){return BU.coerce(e,t,W0t,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],G0t.coercePosition(t,u,i,s,s,.5)}var o=i("visible");o&&(j0t(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),BU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",i("ax",-10),i("ay",-30),BU.noneOrAll(e,t,["ax","ay"])))}});var Ype=ye((Dsr,Zpe)=>{"use strict";var Wpe=Dr(),Xpe=ho();Zpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function NU(e,t){var r=[0,0,0,0],n,i;for(n=0;n<4;++n)for(i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}function Y0t(e,t){var r=NU(e.projection,NU(e.view,NU(e.model,[t[0],t[1],t[2],1])));return r}Kpe.exports=Y0t});var $pe=ye((zsr,Jpe)=>{"use strict";var K0t=mI().drawRaw,J0t=UU(),$0t=["x","y","z"];Jpe.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,i=r.annotations,a=0;a1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=J0t(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),K0t(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var t0e=ye((Osr,e0e)=>{"use strict";var Q0t=qa(),Qpe=Dr();e0e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:yI()}}},layoutAttributes:yI(),handleDefaults:jpe(),includeBasePlot:egt,convert:Ype(),draw:$pe()};function egt(e,t){var r=Q0t.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var r0e=Ub(),i0e=ec(),n0e=pf().line,tgt=Pd().dash,Og=Ao().extendFlat,rgt=vl().templatedArray,qsr=OM(),vT=Gl(),{shapeTexttemplateAttrs:igt,templatefallbackAttrs:ngt}=Ll(),agt=M6();a0e.exports=rgt("shape",{visible:Og({},vT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Og({},vT.legend,{editType:"calc+arraydraw"}),legendgroup:Og({},vT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Og({},vT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i0e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Og({},vT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Og({},vT.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:Og({},r0e.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:Og({},r0e.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:Og({},n0e.color,{editType:"arraydraw"}),width:Og({},n0e.width,{editType:"calc+arraydraw"}),dash:Og({},tgt,{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:igt({},{keys:Object.keys(agt)}),texttemplatefallback:ngt({editType:"arraydraw"}),font:i0e({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 l0e=ye((Nsr,s0e)=>{"use strict";var o4=Dr(),pT=ho(),ogt=Yd(),sgt=VU(),o0e=f_();s0e.exports=function(t,r){ogt(t,r,{name:"shapes",handleItemDefaults:ugt})};function lgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function ugt(e,t,r){function n(H,te){return o4.coerce(e,t,sgt,H,te)}t._isShape=!0;var i=n("visible");if(i){var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),o4.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));for(var f=n("xsizemode"),h=n("ysizemode"),d=["x","y"],v=0;v<2;v++){var _=d[v],b=_+"anchor",p=_==="x"?f:h,k={_fullLayout:r},E,S,L,x=pT.coerceRef(e,t,k,_,void 0,"paper"),C=pT.getRefType(x);if(C==="range"?(E=pT.getFromId(k,x),E._shapeIndices.push(t._index),L=o0e.rangeToShapePosition(E),S=o0e.shapePositionToRange(E),(E.type==="category"||E.type==="multicategory")&&(n(_+"0shift"),n(_+"1shift"))):S=L=o4.identity,u){var M=.25,g=.75,P=_+"0",T=_+"1",z=e[P],O=e[T];e[P]=S(e[P],!0),e[T]=S(e[T],!0),p==="pixel"?(n(P,0),n(T,10)):(pT.coercePosition(t,k,n,x,P,M),pT.coercePosition(t,k,n,x,T,g)),t[P]=L(t[P]),t[T]=L(t[T]),e[P]=z,e[T]=O}if(p==="pixel"){var V=e[b];e[b]=S(e[b],!0),pT.coercePosition(t,k,n,x,b,.25),t[b]=L(t[b]),e[b]=V}}u&&o4.noneOrAll(e,t,["x0","x1","y0","y1"]);var G=l==="line",Z,j;if(u&&(Z=n("label.texttemplate"),n("label.texttemplatefallback")),Z||(j=n("label.text")),j||Z){n("label.textangle");var N=n("label.textposition",G?"middle":"middle center");n("label.xanchor"),n("label.yanchor",lgt(G,N)),n("label.padding"),o4.coerceFont(n,"label.font",r.font)}}}});var f0e=ye((Usr,c0e)=>{"use strict";var cgt=ka(),u0e=Dr();function fgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}c0e.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),u0e.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var i=n("newshape.line.width");if(i){var a=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",cgt.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",fgt(o,u)),n("newshape.label.padding"),u0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var g0e=ye((Vsr,p0e)=>{"use strict";var GU=Dr(),gT=ho(),mT=gM(),d0e=f_();p0e.exports=function(t){var r=t._fullLayout,n=GU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function h0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=i?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],l=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(mT.segmentRE),v,_,b,p,k;for(e.type==="date"&&(u=d0e.decodeDate(u)),v=0;vh&&(h=k)));if(h>=f)return[f,h]}}});var _0e=ye((Gsr,y0e)=>{"use strict";var m0e=lP();y0e.exports={moduleType:"component",name:"shapes",layoutAttributes:VU(),supplyLayoutDefaults:l0e(),supplyDrawNewShapeDefaults:f0e(),includeBasePlot:qM()("shapes"),calcAutorange:g0e(),draw:m0e.draw,drawOne:m0e.drawOne}});var HU=ye((jsr,b0e)=>{"use strict";var x0e=hd(),vgt=vl().templatedArray,Hsr=OM();b0e.exports=vgt("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",x0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",x0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var T0e=ye((Wsr,w0e)=>{"use strict";var pgt=Dr(),jU=ho(),ggt=Yd(),mgt=HU(),ygt="images";w0e.exports=function(t,r){var n={name:ygt,handleItemDefaults:_gt};ggt(t,r,n)};function _gt(e,t,r){function n(h,d){return pgt.coerce(e,t,mgt,h,d)}var i=n("source"),a=n("visible",!!i);if(!a)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=jU.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=jU.getFromId(o,c);f._imgIndices.push(t._index)}jU.coercePosition(t,o,n,c,u,0)}return t}});var E0e=ye((Xsr,M0e)=>{"use strict";var A0e=Oa(),xgt=So(),yT=ho(),S0e=hf(),bgt=Wp();M0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var k0e=Eo(),wgt=m6();C0e.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";P0e.exports={moduleType:"component",name:"images",layoutAttributes:HU(),supplyLayoutDefaults:T0e(),includeBasePlot:qM()("images"),draw:E0e(),convertCoords:L0e()}});var _I=ye((Ksr,R0e)=>{"use strict";R0e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var WU=ye((Jsr,F0e)=>{"use strict";var Tgt=ec(),Agt=Lh(),Sgt=Ao().extendFlat,Mgt=mc().overrideAll,Egt=E6(),D0e=vl().templatedArray,kgt=D0e("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}});F0e.exports=Mgt(D0e("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:kgt,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:Sgt(Egt({editType:"arraydraw"}),{}),font:Tgt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Agt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var B0e=ye(($sr,q0e)=>{"use strict";var xI=Dr(),z0e=Yd(),O0e=WU(),Cgt=_I(),Lgt=Cgt.name,Pgt=O0e.buttons;q0e.exports=function(t,r){var n={name:Lgt,handleItemDefaults:Igt};z0e(t,r,n)};function Igt(e,t,r){function n(o,s){return xI.coerce(e,t,O0e,o,s)}var i=z0e(e,t,{name:"buttons",handleItemDefaults:Rgt}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),xI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),xI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function Rgt(e,t){function r(i,a){return xI.coerce(e,t,Pgt,i,a)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var V0e=ye((Qsr,U0e)=>{"use strict";U0e.exports=Mf;var qg=Oa(),N0e=ka(),_T=So(),bI=Dr();function Mf(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Mf.barWidth=2;Mf.barLength=20;Mf.barRadius=2;Mf.barPad=1;Mf.barColor="#808BA4";Mf.prototype.enable=function(t,r,n){var i=this.gd._fullLayout,a=i.width,o=i.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",d=f==="left",v=f==="right",_=f==="up",b=l,p=c,k,E,S,L;!h&&!d&&!v&&!_&&(this.position.direction="down",h=!0);var x=h||_;x?(k=s,E=k+b,h?(S=u,L=Math.min(S+p,o),p=L-S):(L=u+p,S=Math.max(L-p,0),p=L-S)):(S=u,L=S+p,d?(E=s+b,k=Math.max(E-b,0),b=E-k):(k=s,E=Math.min(k+b,a),b=E-k)),this._box={l:k,t:S,w:b,h:p};var C=l>b,M=Mf.barLength+2*Mf.barPad,g=Mf.barWidth+2*Mf.barPad,P=s,T=u+c;T+g>o&&(T=o-g);var z=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(N0e.fill,Mf.barColor),C?(this.hbar=z.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:P,y:T,width:M,height:g}),this._hbarXMin=P+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=c>p,V=Mf.barWidth+2*Mf.barPad,G=Mf.barLength+2*Mf.barPad,Z=s+l,j=u;Z+V>a&&(Z=a-V);var N=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(N0e.fill,Mf.barColor),O?(this.vbar=N.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:Z,y:j,width:V,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=p-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,te=k-.5,oe=O?E+V+.5:E+.5,_e=S-.5,Ee=C?L+g+.5:L+.5,Ce=i._topdefs.selectAll("#"+H).data(C||O?[0]:[]);if(Ce.exit().remove(),Ce.enter().append("clipPath").attr("id",H).append("rect"),C||O?(this._clipRect=Ce.select("rect").attr({x:Math.floor(te),y:Math.floor(_e),width:Math.ceil(oe)-Math.floor(te),height:Math.ceil(Ee)-Math.floor(_e)}),this.container.call(_T.setClipUrl,H,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(_T.setClipUrl,null),delete this._clipRect),C||O){var me=qg.behavior.drag().on("dragstart",function(){qg.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(me);var ie=qg.behavior.drag().on("dragstart",function(){qg.event.sourceEvent.preventDefault(),qg.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(ie),O&&this.vbar.on(".drag",null).call(ie)}this.setTranslate(r,n)};Mf.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(_T.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Mf.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=qg.event.dx),this.vbar&&(r-=qg.event.dy),this.setTranslate(t,r)};Mf.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=qg.event.deltaY),this.vbar&&(r+=qg.event.deltaY),this.setTranslate(t,r)};Mf.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=bI.constrain(qg.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=bI.constrain(qg.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Mf.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=bI.constrain(t||0,0,n),r=bI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(_T.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/n;this.hbar.call(_T.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(_T.setTranslate,t,r+o*this._vbarTranslateMax)}}});var $0e=ye((elr,J0e)=>{"use strict";var xT=Oa(),s4=Mc(),l4=ka(),bT=So(),e0=Dr(),wI=ru(),Dgt=vl().arrayEditor,H0e=$h().LINE_SPACING,es=_I(),Fgt=V0e();J0e.exports=function(t){var r=t._fullLayout,n=e0.filterVisible(r[es.name]);function i(h){s4.autoMargin(t,Y0e(h))}var a=r._menulayer.selectAll("g."+es.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(es.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){xT.select(this).selectAll("g."+es.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+es.headerGroupClassName).data(n,zgt);o.enter().append("g").classed(es.headerGroupClassName,!0);for(var s=e0.ensureSingle(a,"g",es.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var Ggt=_I();Q0e.exports={moduleType:"component",name:Ggt.name,layoutAttributes:WU(),supplyLayoutDefaults:B0e(),draw:$0e()}});var c4=ye((rlr,tge)=>{"use strict";tge.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var KU=ye((ilr,nge)=>{"use strict";var rge=ec(),Hgt=E6(),jgt=Ao().extendDeepAll,Wgt=mc().overrideAll,Xgt=US(),ige=vl().templatedArray,$b=c4(),Zgt=ige("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}});nge.exports=Wgt(ige("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Zgt,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:jgt(Hgt({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:Xgt.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:rge({})},font:rge({}),activebgcolor:{valType:"color",dflt:$b.gripBgActiveColor},bgcolor:{valType:"color",dflt:$b.railBgColor},bordercolor:{valType:"color",dflt:$b.railBorderColor},borderwidth:{valType:"number",min:0,dflt:$b.railBorderWidth},ticklen:{valType:"number",min:0,dflt:$b.tickLength},tickcolor:{valType:"color",dflt:$b.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:$b.minorTickLength}}),"arraydraw","from-root")});var lge=ye((nlr,sge)=>{"use strict";var wT=Dr(),age=Yd(),oge=KU(),Ygt=c4(),Kgt=Ygt.name,Jgt=oge.steps;sge.exports=function(t,r){age(t,r,{name:Kgt,handleItemDefaults:$gt})};function $gt(e,t,r){function n(f,h){return wT.coerce(e,t,oge,f,h)}for(var i=age(e,t,{name:"steps",handleItemDefaults:Qgt}),a=0,o=0;o{"use strict";var Bg=Oa(),TI=Mc(),__=ka(),Ng=So(),t0=Dr(),emt=t0.strTranslate,f4=ru(),tmt=vl().arrayEditor,Rs=c4(),QU=$h(),fge=QU.LINE_SPACING,JU=QU.FROM_TL,$U=QU.FROM_BR;mge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=rmt(n,t),a=n._infolayer.selectAll("g."+Rs.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(Rs.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),TI.autoMargin(t,hge(c))}if(a.exit().each(function(){Bg.select(this).selectAll("g."+Rs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+Rs.groupClassName).data(i,imt);s.enter().append("g").classed(Rs.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",emt(o-Rs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function eV(e,t){var r=e._dims;return r.inputAreaStart+Rs.stepInset+(r.inputAreaLength-2*Rs.stepInset)*Math.min(1,Math.max(0,t))}function cge(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Rs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Rs.stepInset-2*r.inputAreaStart)))}function cmt(e,t,r){var n=r._dims,i=t0.ensureSingle(e,"rect",Rs.railTouchRectClass,function(a){a.call(pge,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Rs.tickOffset+r.ticklen+n.labelHeight)}).call(__.fill,r.bgcolor).attr("opacity",0),Ng.setTranslate(i,0,n.currentValueTotalHeight)}function fmt(e,t){var r=t._dims,n=r.inputAreaLength-Rs.railInset*2,i=t0.ensureSingle(e,"rect",Rs.railRectClass);i.attr({width:n,height:Rs.railWidth,rx:Rs.railRadius,ry:Rs.railRadius,"shape-rendering":"crispEdges"}).call(__.stroke,t.bordercolor).call(__.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Ng.setTranslate(i,Rs.railInset,(r.inputAreaWidth-Rs.railWidth)*.5+r.currentValueTotalHeight)}});var xge=ye((olr,_ge)=>{"use strict";var hmt=c4();_ge.exports={moduleType:"component",name:hmt.name,layoutAttributes:KU(),supplyLayoutDefaults:lge(),draw:yge()}});var SI=ye((slr,wge)=>{"use strict";var bge=Lh();wge.exports={bgcolor:{valType:"color",dflt:bge.background,editType:"plot"},bordercolor:{valType:"color",dflt:bge.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 tV=ye((llr,Tge)=>{"use strict";Tge.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 MI=ye((ulr,Age)=>{"use strict";Age.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Ege=ye(kI=>{"use strict";var dmt=hf(),vmt=ru(),Sge=MI(),pmt=$h().LINE_SPACING,EI=Sge.name;function Mge(e){var t=e&&e[EI];return t&&t.visible}kI.isVisible=Mge;kI.makeData=function(e){for(var t=dmt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var CI=Dr(),kge=vl(),Cge=hf(),gmt=SI(),mmt=tV();Lge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;CI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=kge.newContainer(a,"rangeslider");function l(L,x){return CI.coerce(o,s,gmt,L,x)}var u,c;function f(L,x){return CI.coerce(u,c,mmt,L,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var d=r._subplots;if(d)for(var v=d.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===Cge.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),_=CI.simpleMap(v,Cge.id2name),b=0;b<_.length;b++){var p=_[b];u=o[p]||{},c=kge.newContainer(s,p,"yaxis");var k=r[p],E;u.range&&k.isValidRange(u.range)&&(E="fixed");var S=f("rangemode",E);S!=="match"&&f("range",k.range.slice())}s._input=o}}});var Rge=ye((hlr,Ige)=>{"use strict";var ymt=hf().list,_mt=Ag().getAutoRange,xmt=MI();Ige.exports=function(t){for(var r=ymt(t,"x",!0),n=0;n{"use strict";var LI=Oa(),bmt=qa(),wmt=Mc(),Jf=Dr(),PI=Jf.strTranslate,Fge=So(),x_=ka(),Tmt=Eb(),Amt=ph(),rV=hf(),Smt=yv(),Mmt=Sg(),rl=MI();zge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=N.max)Z=T[j+1];else if(G=N.pmax)Z=T[j+1];else if(G0?e.touches[0].clientX:0}function Emt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+rl.slideBoxClassName).node(),a=e.select("rect."+rl.grabAreaMinClassName).node(),o=e.select("rect."+rl.grabAreaMaxClassName).node();function s(){var l=LI.event,u=l.target,c=Dge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=Smt.coverSlip();this.addEventListener("touchmove",_),this.addEventListener("touchend",b),v.addEventListener("mousemove",_),v.addEventListener("mouseup",b);function _(p){var k=Dge(p),E=+k-c,S,L,x;switch(u){case i:if(x="ew-resize",h+E>r._length||d+E<0)return;S=h+E,L=d+E;break;case a:if(x="col-resize",h+E>r._length)return;S=h+E,L=d;break;case o:if(x="col-resize",d+E<0)return;S=h,L=d+E;break;default:x="ew-resize",S=f,L=f+E;break}if(L{"use strict";var Omt=Dr(),qmt=SI(),Bmt=tV(),iV=Ege();qge.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Omt.extendFlat({},qmt,{yaxis:Bmt})}}},layoutAttributes:SI(),handleDefaults:Pge(),calcAutorange:Rge(),draw:Oge(),isVisible:iV.isVisible,makeData:iV.makeData,autoMarginOpts:iV.autoMarginOpts}});var II=ye((plr,Uge)=>{"use strict";var Nmt=ec(),Nge=Lh(),Umt=vl().templatedArray,Vmt=Umt("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"});Uge.exports={visible:{valType:"boolean",editType:"plot"},buttons:Vmt,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:Nmt({editType:"plot"}),bgcolor:{valType:"color",dflt:Nge.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Nge.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var nV=ye((glr,Vge)=>{"use strict";Vge.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var jge=ye((mlr,Hge)=>{"use strict";var RI=Dr(),Gmt=ka(),Hmt=vl(),jmt=Yd(),Gge=II(),aV=nV();Hge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=Hmt.newContainer(r,"rangeselector");function l(d,v){return RI.coerce(o,s,Gge,d,v)}var u=jmt(o,s,{name:"buttons",handleItemDefaults:Wmt,calendar:a}),c=l("visible",u.length>0);if(c){var f=Xmt(r,n,i);l("x",f[0]),l("y",f[1]),RI.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),RI.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",Gmt.contrast(h,aV.lightAmount,aV.darkAmount)),l("bordercolor"),l("borderwidth")}};function Wmt(e,t,r,n){var i=n.calendar;function a(l,u){return RI.coerce(e,t,Gge.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(i&&i!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function Xmt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var Zmt=bO(),Ymt=Dr().titleCase;Wge.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=Kmt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function Kmt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=Zmt["utc"+Ymt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var l=a.offset(n,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var tme=ye((_lr,eme)=>{"use strict";var FI=Oa(),Jmt=qa(),$mt=Mc(),Zge=ka(),Qge=So(),Ry=Dr(),Yge=Ry.strTranslate,DI=ru(),Qmt=hf(),lV=$h(),Kge=lV.LINE_SPACING,Jge=lV.FROM_TL,$ge=lV.FROM_BR,sV=nV(),eyt=Xge();eme.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(tyt(t),ryt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=FI.select(this),o=i,s=o.rangeselector,l=a.selectAll("g.button").data(Ry.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=FI.select(this),f=eyt(o,u);u._isActive=iyt(o,u,f),c.call(oV,s,u),c.call(ayt,s,u,t),c.on("click",function(){t._dragged||Jmt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(oV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(oV,s,u)})}),syt(t,l,s,o._name,a)})};function tyt(e){for(var t=Qmt.list(e,"x",!0),r=[],n=0;n{"use strict";rme.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:II()}}},layoutAttributes:II(),handleDefaults:jge(),draw:tme()}});var Cc=ye(uV=>{"use strict";var nme=Ao().extendFlat;uV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",i=e.trace?"trace ":"subplot ",a=t.description?" "+t.description:"",o={x:nme({},r,{}),y:nme({},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};uV.defaults=function(e,t,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var lyt=Dr(),uyt=o3().counter,cyt=Cc().attributes,ame=hd().idRegex,fyt=vl(),cV={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:[uyt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[ame.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[ame.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:cyt({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 zI(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(i.length)return i}function hyt(e,t){var r=e.grid||{},n=zI(t,r,"x"),i=zI(t,r,"y");if(!e.grid&&!n&&!i)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(i),l=o&&n!==r.xaxes&&s&&i!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=i.length),o&&(c=n.length));var f=fyt.newContainer(t,"grid");function h(x,C){return lyt.coerce(r,f,cV,x,C)}var d=h("rows",u),v=h("columns",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var _=h("pattern")==="independent";_&&(a=!0)}f._hasSubplotGrid=a;var b=h("roworder"),p=b==="top to bottom",k=a?.2:.1,E=a?.3:.1,S,L;l&&t._splomGridDflt&&(S=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:ome("x",h,k,S,v),y:ome("y",h,E,L,d,p)}}function ome(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h{"use strict";ume.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 hme=ye((Alr,fme)=>{"use strict";var cme=Eo(),vyt=qa(),pyt=Dr(),gyt=vl(),myt=hV();fme.exports=function(e,t,r,n){var i="error_"+n.axis,a=gyt.newContainer(t,i),o=e[i]||{};function s(v,_){return pyt.coerce(o,a,myt,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_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||cme(o.thickness)||cme(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",vyt.traceIs(t,"gl3d")?0:4))}}});var dV=ye((Slr,vme)=>{"use strict";vme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(u,c){var f=+i[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+i[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=dme(r,t.value),s=dme(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function dme(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 mme=ye((Mlr,gme)=>{"use strict";var vV=Eo(),yyt=qa(),pV=ho(),_yt=Dr(),xyt=dV();gme.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var yme=Oa(),b_=Eo(),byt=So(),wyt=Ru();_me.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,l=i&&i.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},v;f.ids&&(v=function(k){return k.id});var _=wyt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=yme.select(this).selectAll("g.errorbar").data(c,v);if(b.exit().remove(),!!c.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var p=b.enter().append("g").classed("errorbar",!0);l&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),byt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var E=yme.select(this),S=Tyt(k,o,s);if(!(_&&!k.vis)){var L,x=E.select("path.yerror");if(d.visible&&b_(S.x)&&b_(S.yh)&&b_(S.ys)){var C=d.width;L="M"+(S.x-C)+","+S.yh+"h"+2*C+"m-"+C+",0V"+S.ys,S.noYS||(L+="m-"+C+",0h"+2*C),a=!x.size(),a?x=E.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(i.duration).ease(i.easing)),x.attr("d",L)}else x.remove();var M=E.select("path.xerror");if(h.visible&&b_(S.y)&&b_(S.xh)&&b_(S.xs)){var g=(h.copy_ystyle?d:h).width;L="M"+S.xh+","+(S.y-g)+"v"+2*g+"m0,-"+g+"H"+S.xs,S.noXS||(L+="m0,-"+g+"v"+2*g),a=!M.size(),a?M=E.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(M=M.transition().duration(i.duration).ease(i.easing)),M.attr("d",L)}else M.remove()}})}})};function Tyt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),b_(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),b_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Tme=ye((klr,wme)=>{"use strict";var Ayt=Oa(),bme=ka();wme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Ayt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(bme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(bme.stroke,a.color)})}});var Mme=ye((Clr,Sme)=>{"use strict";var h4=Dr(),Ame=mc().overrideAll,d4=hV(),Qb={error_x:h4.extendFlat({},d4),error_y:h4.extendFlat({},d4)};delete Qb.error_x.copy_zstyle;delete Qb.error_y.copy_zstyle;delete Qb.error_y.copy_ystyle;var v4={error_x:h4.extendFlat({},d4),error_y:h4.extendFlat({},d4),error_z:h4.extendFlat({},d4)};delete v4.error_x.copy_ystyle;delete v4.error_y.copy_ystyle;delete v4.error_z.copy_ystyle;delete v4.error_z.copy_zstyle;Sme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Qb,bar:Qb,histogram:Qb,scatter3d:Ame(v4,"calc","nested"),scattergl:Ame(Qb,"calc","nested")}},supplyDefaults:hme(),calc:mme(),makeComputeError:dV(),plot:xme(),style:Tme(),hoverInfo:Syt};function Syt(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 kme=ye((Llr,Eme)=>{"use strict";Eme.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}});var Fme=ye((Plr,Dme)=>{"use strict";var w_=Oa(),gV=cd(),qI=Mc(),Cme=qa(),Dy=ho(),OI=yv(),B0=Dr(),Vg=B0.strTranslate,Rme=Ao().extendFlat,mV=Sg(),Ug=So(),yV=ka(),Myt=Eb(),Eyt=ru(),kyt=pv().flipScale,Cyt=i4(),Lyt=uI(),Pyt=Rd(),_V=$h(),Lme=_V.LINE_SPACING,Pme=_V.FROM_TL,Ime=_V.FROM_BR,gf=kme().cn;function Iyt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+gf.colorbar).data(Ryt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(gf.colorbar,!0),r.each(function(n){var i=w_.select(this);B0.ensureSingle(i,"rect",gf.cbbg),B0.ensureSingle(i,"g",gf.cbfills),B0.ensureSingle(i,"g",gf.cblines),B0.ensureSingle(i,"g",gf.cbaxis,function(o){o.classed(gf.crisp,!0)}),B0.ensureSingle(i,"g",gf.cbtitleunshift,function(o){o.append("g").classed(gf.cbtitle,!0)}),B0.ensureSingle(i,"rect",gf.cboutline);var a=Dyt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Fyt(i,n,e)}),r.exit().each(function(n){qI.autoMargin(e,n._id)}).remove(),r.order()}function Ryt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(E){return Rme(E,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?kyt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c1){var Re=Math.pow(10,Math.floor(Math.log(ge)/Math.LN10));Fe*=Re*B0.roundUp(ge/Re,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(Le.tick0=0)}Le.dtick=Fe}Le.domain=n?[ie+v/S.h,ie+H-v/S.h]:[ie+d/S.w,ie+H-d/S.w],Le.setScale(),e.attr("transform",Vg(Math.round(S.l),Math.round(S.t)));var ce=e.select("."+gf.cbtitleunshift).attr("transform",Vg(-Math.round(S.l),-Math.round(S.t))),Ze=Le.ticklabelposition,ut=Le.title.font.size,pt=e.select("."+gf.cbaxis),Zt,st=0,lt=0;function Gt(cr,$e){var St={propContainer:Le,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:E._dfltTitle.colorbar,containerGroup:e.select("."+gf.cbtitle)},Qt=cr.charAt(0)==="h"?cr.slice(1):"h"+cr;e.selectAll("."+Qt+",."+Qt+"-math-group").remove(),Myt.draw(r,cr,Rme(St,$e||{}))}function Nt(){if(n&&Ae||!n&&!Ae){var cr,$e;M==="top"&&(cr=d+S.l+te*_,$e=v+S.t+oe*(1-ie-H)+3+ut*.75),M==="bottom"&&(cr=d+S.l+te*_,$e=v+S.t+oe*(1-ie)-3-ut*.25),M==="right"&&($e=v+S.t+oe*b+3+ut*.75,cr=d+S.l+te*ie),Gt(Le._id+"title",{attributes:{x:cr,y:$e,"text-anchor":n?"start":"middle"}})}}function Jt(){if(n&&!Ae||!n&&Ae){var cr=Le.position||0,$e=Le._offset+Le._length/2,St,Qt;if(M==="right")Qt=$e,St=S.l+te*cr+10+ut*(Le.showticklabels?1:.5);else if(St=$e,M==="bottom"&&(Qt=S.t+oe*cr+10+(Ze.indexOf("inside")===-1?Le.tickfont.size:0)+(Le.ticks!=="inside"&&t.ticklen||0)),M==="top"){var Vt=C.text.split("
").length;Qt=S.t+oe*cr+10-Z-Lme*ut*Vt}Gt((n?"h":"v")+Le._id+"title",{avoid:{selection:w_.select(r).selectAll("g."+Le._id+"tick"),side:M,offsetTop:n?0:S.t,offsetLeft:n?S.l:0,maxShift:n?E.width:E.height},attributes:{x:St,y:Qt,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function sr(){if(!n&&!Ae||n&&Ae){var cr=e.select("."+gf.cbtitle),$e=cr.select("text"),St=[-l/2,l/2],Qt=cr.select(".h"+Le._id+"title-math-group").node(),Vt=15.6;$e.node()&&(Vt=parseInt($e.node().style.fontSize,10)*Lme);var _t;if(Qt?(_t=Ug.bBox(Qt),lt=_t.width,st=_t.height,st>Vt&&(St[1]-=(st-Vt)/2)):$e.node()&&!$e.classed(gf.jsPlaceholder)&&(_t=Ug.bBox($e.node()),lt=_t.width,st=_t.height),n){if(st){if(st+=5,M==="top")Le.domain[1]-=st/S.h,St[1]*=-1;else{Le.domain[0]+=st/S.h;var It=Eyt.lineCount($e);St[1]+=(1-It)*Vt}cr.attr("transform",Vg(St[0],St[1])),Le.setScale()}}else lt&&(M==="right"&&(Le.domain[0]+=(lt+ut/2)/S.w),cr.attr("transform",Vg(St[0],St[1])),Le.setScale())}e.selectAll("."+gf.cbfills+",."+gf.cblines).attr("transform",n?Vg(0,Math.round(S.h*(1-Le.domain[1]))):Vg(Math.round(S.w*Le.domain[0]),0)),pt.attr("transform",n?Vg(0,Math.round(-S.t)):Vg(Math.round(-S.l),0));var mt=e.select("."+gf.cbfills).selectAll("rect."+gf.cbfill).attr("style","").data(V);mt.enter().append("rect").classed(gf.cbfill,!0).attr("style",""),mt.exit().remove();var er=g.map(Le.c2p).map(Math.round).sort(function(Br,Vr){return Br-Vr});mt.each(function(Br,Vr){var dt=[Vr===0?g[0]:(V[Vr]+V[Vr-1])/2,Vr===V.length-1?g[1]:(V[Vr]+V[Vr+1])/2].map(Le.c2p).map(Math.round);n&&(dt[1]=B0.constrain(dt[1]+(dt[1]>dt[0])?1:-1,er[0],er[1]));var Ge=w_.select(this).attr(n?"x":"y",_e).attr(n?"y":"x",w_.min(dt)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(w_.max(dt)-w_.min(dt),2));if(t._fillgradient)Ug.gradient(Ge,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Je=T(Br).replace("e-","");Ge.attr("fill",gV(Je).toHexString())}});var lr=e.select("."+gf.cblines).selectAll("path."+gf.cbline).data(x.color&&x.width?G:[]);lr.enter().append("path").classed(gf.cbline,!0),lr.exit().remove(),lr.each(function(Br){var Vr=_e,dt=Math.round(Le.c2p(Br))+x.width/2%1;w_.select(this).attr("d","M"+(n?Vr+","+dt:dt+","+Vr)+(n?"h":"v")+Z).call(Ug.lineGroupStyle,x.width,P(Br),x.dash)}),pt.selectAll("g."+Le._id+"tick,path").remove();var Tr=_e+Z+(l||0)/2-(t.ticks==="outside"?1:0),Lr=Dy.calcTicks(Le),ti=Dy.getTickSigns(Le)[2];return Dy.drawTicks(r,Le,{vals:Le.ticks==="inside"?Dy.clipEnds(Le,Lr):Lr,layer:pt,path:Dy.makeTickPath(Le,Tr,ti),transFn:Dy.makeTransTickFn(Le)}),Dy.drawLabels(r,Le,{vals:Lr,layer:pt,transFn:Dy.makeTransTickLabelFn(Le),labelFns:Dy.makeLabelFns(Le,Tr)})}function wr(){var cr,$e=Z+l/2;Ze.indexOf("inside")===-1&&(cr=Ug.bBox(pt.node()),$e+=n?cr.width:cr.height),Zt=ce.select("text");var St=0,Qt=n&&M==="top",Vt=!n&&M==="right",_t=0;if(Zt.node()&&!Zt.classed(gf.jsPlaceholder)){var It,mt=ce.select(".h"+Le._id+"title-math-group").node();mt&&(n&&Ae||!n&&!Ae)?(cr=Ug.bBox(mt),St=cr.width,It=cr.height):(cr=Ug.bBox(ce.node()),St=cr.right-S.l-(n?_e:Se),It=cr.bottom-S.t-(n?Se:_e),!n&&M==="top"&&($e+=cr.height,_t=cr.height)),Vt&&(Zt.attr("transform",Vg(St/2+ut/2,0)),St*=2),$e=Math.max($e,n?St:It)}var er=(n?d:v)*2+$e+u+l/2,lr=0;!n&&C.text&&h==="bottom"&&b<=0&&(lr=er/2,er+=lr,_t+=lr),E._hColorbarMoveTitle=lr,E._hColorbarMoveCBTitle=_t;var Tr=u+l,Lr=(n?_e:Se)-Tr/2-(n?d:0),ti=(n?Se:_e)-(n?N:v+_t-lr);e.select("."+gf.cbbg).attr("x",Lr).attr("y",ti).attr(n?"width":"height",Math.max(er-lr,2)).attr(n?"height":"width",Math.max(N+Tr,2)).call(yV.fill,c).call(yV.stroke,t.bordercolor).style("stroke-width",u);var Br=Vt?Math.max(St-10,0):0;e.selectAll("."+gf.cboutline).attr("x",(n?_e:Se+d)+Br).attr("y",(n?Se+v-N:_e)+(Qt?st:0)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(N-(n?2*v+st:2*d+Br),2)).call(yV.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Vr=n?Ee*er:0,dt=n?0:(1-Ce)*er-_t;if(Vr=k?S.l-Vr:-Vr,dt=p?S.t-dt:-dt,e.attr("transform",Vg(Vr,dt)),!n&&(u||gV(c).getAlpha()&&!gV.equals(E.paper_bgcolor,c))){var Ge=pt.selectAll("text"),Je=Ge[0].length,je=e.select("."+gf.cbbg).node(),tt=Ug.bBox(je),xt=Ug.getTranslate(e),Ie=2;Ge.each(function(di,ji){var In=0,wi=Je-1;if(ji===In||ji===wi){var On=Ug.bBox(this),qn=Ug.getTranslate(this),Fn;if(ji===wi){var ra=On.right+qn.x,la=tt.right+xt.x+Se-u-Ie+_;Fn=la-ra,Fn>0&&(Fn=0)}else if(ji===In){var Ut=On.left+qn.x,wt=tt.left+xt.x+Se+u+Ie;Fn=wt-Ut,Fn<0&&(Fn=0)}Fn&&(Je<3?this.setAttribute("transform","translate("+Fn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var xe={},ke=Pme[f],vt=Ime[f],ir=Pme[h],ar=Ime[h],vr=er-Z;n?(a==="pixels"?(xe.y=b,xe.t=N*ir,xe.b=N*ar):(xe.t=xe.b=0,xe.yt=b+i*ir,xe.yb=b-i*ar),s==="pixels"?(xe.x=_,xe.l=er*ke,xe.r=er*vt):(xe.l=vr*ke,xe.r=vr*vt,xe.xl=_-o*ke,xe.xr=_+o*vt)):(a==="pixels"?(xe.x=_,xe.l=N*ke,xe.r=N*vt):(xe.l=xe.r=0,xe.xl=_+i*ke,xe.xr=_-i*vt),s==="pixels"?(xe.y=1-b,xe.t=er*ir,xe.b=er*ar):(xe.t=vr*ir,xe.b=vr*ar,xe.yt=b-o*ir,xe.yb=b+o*ar));var ii=t.y<.5?"b":"t",pi=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var $r={r:E.width-Lr-Vr,l:Lr+xe.r,b:E.height-ti-dt,t:ti+xe.b};k&&p?qI.autoMargin(r,t._id,xe):k?r._fullLayout._reservedMargin[t._id][ii]=$r[ii]:p||n?r._fullLayout._reservedMargin[t._id][pi]=$r[pi]:r._fullLayout._reservedMargin[t._id][ii]=$r[ii]}return B0.syncOrAsync([qI.previousPromises,Nt,sr,Jt,qI.previousPromises,wr],r)}function Fyt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,l;OI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),mV(e)},moveFn:function(u,c){e.attr("transform",o+Vg(u,c)),s=OI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=OI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=OI.getCursor(s,l,t.xanchor,t.yanchor);mV(e,f)},doneFn:function(){if(mV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?Cme.call("_guiRestyle",r,u,t._traceIndex):Cme.call("_guiRelayout",r,u)}}})}function zyt(e,t,r){var n=t._levels,i=[],a=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";zme.exports={moduleType:"component",name:"colorbar",attributes:tL(),supplyDefaults:Pq(),draw:Fme().draw,hasColorbar:Aq()}});var Bme=ye((Rlr,qme)=>{"use strict";qme.exports={moduleType:"component",name:"legend",layoutAttributes:SB(),supplyLayoutDefaults:EB(),draw:BB(),style:FB()}});var Ume=ye((Dlr,Nme)=>{"use strict";Nme.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 Gme=ye((Flr,Vme)=>{"use strict";Vme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var bV=ye((zlr,Xme)=>{"use strict";var qyt=qa(),Wme=Dr(),xV=Wme.extendFlat,Hme=Wme.extendDeep;function jme(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function Byt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Xme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Hme([],i),s=Hme({},a,jme(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var Nyt=pb().EventEmitter,Uyt=qa(),Vyt=Dr(),Zme=Py(),Gyt=bV(),Hyt=jP(),jyt=WP();function Wyt(e,t){var r=new Nyt,n=Gyt(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=Zme.getDelay(i._fullLayout);setTimeout(function(){var l=Hyt(i),u=document.createElement("canvas");u.id=Vyt.randstr(),r=jyt({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=Zme.getRedrawFunc(i);return Uyt.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}Yme.exports=Wyt});var Qme=ye((qlr,$me)=>{"use strict";var Jme=Py(),Xyt={getDelay:Jme.getDelay,getRedrawFunc:Jme.getRedrawFunc,clone:bV(),toSVG:jP(),svgToImg:WP(),toImage:Kme(),downloadImage:rU()};$me.exports=Xyt});var tye=ye(Fy=>{"use strict";Fy.version=l6().version;vee();rne();var Zyt=qa(),p4=Fy.register=Zyt.register,TV=Tde(),eye=Object.keys(TV);for(BI=0;BI{"use strict";rye.exports=tye()});var e2=ye((Ulr,nye)=>{"use strict";nye.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Lm=ye((Vlr,uye)=>{"use strict";var qf=pf(),aye=df().axisHoverFormat,{hovertemplateAttrs:Yyt,texttemplateAttrs:Kyt,templatefallbackAttrs:oye}=Ll(),lye=Tu(),Jyt=ec(),sye=e2(),$yt=Pd().pattern,t2=Ao().extendFlat,AV=Jyt({editType:"calc",arrayOk:!0,colorEditType:"style"}),Qyt=qf.marker,e1t=Qyt.line,t1t=t2({},e1t.width,{dflt:0}),r1t=t2({width:t1t,editType:"calc"},lye("marker.line")),i1t=t2({line:r1t,editType:"calc"},lye("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:$yt,cornerradius:{valType:"any",editType:"calc"}});uye.exports={x:qf.x,x0:qf.x0,dx:qf.dx,y:qf.y,y0:qf.y0,dy:qf.dy,xperiod:qf.xperiod,yperiod:qf.yperiod,xperiod0:qf.xperiod0,yperiod0:qf.yperiod0,xperiodalignment:qf.xperiodalignment,yperiodalignment:qf.yperiodalignment,xhoverformat:aye("x"),yhoverformat:aye("y"),text:qf.text,texttemplate:Kyt({editType:"plot"},{keys:sye.eventDataKeys}),texttemplatefallback:oye({editType:"plot"}),hovertext:qf.hovertext,hovertemplate:Yyt({},{keys:sye.eventDataKeys}),hovertemplatefallback:oye(),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:t2({},AV,{}),insidetextfont:t2({},AV,{}),outsidetextfont:t2({},AV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:t2({},qf.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:i1t,offsetgroup:qf.offsetgroup,alignmentgroup:qf.alignmentgroup,selected:{marker:{opacity:qf.selected.marker.opacity,color:qf.selected.marker.color,editType:"style"},textfont:qf.selected.textfont,editType:"style"},unselected:{marker:{opacity:qf.unselected.marker.opacity,color:qf.unselected.marker.color,editType:"style"},textfont:qf.unselected.textfont,editType:"style"},zorder:qf.zorder}});var UI=ye((Glr,cye)=>{"use strict";cye.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 VI=ye((Hlr,dye)=>{"use strict";var n1t=ka(),fye=pv().hasColorscale,hye=Qh(),a1t=Dr().coercePattern;dye.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=fye(t,"marker");s&&hye(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",n1t.defaultLine),fye(t,"marker.line")&&hye(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),a1t(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var r0=ye((jlr,_ye)=>{"use strict";var vye=Eo(),AT=Dr(),pye=ka(),o1t=qa(),s1t=eT(),l1t=Ig(),u1t=VI(),c1t=Hb(),gye=Lm(),GI=AT.coerceFont;function f1t(e,t,r,n){function i(u,c){return AT.coerce(e,t,gye,u,c)}var a=s1t(e,t,n,i);if(!a){t.visible=!1;return}l1t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");yye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u1t(e,t,i,r,n);var s=(t.marker.line||{}).color,l=o1t.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||pye.defaultLine,{axis:"y"}),l(e,t,s||pye.defaultLine,{axis:"x",inherit:"y"}),AT.coerceSelectionMarkerOpacity(t,i)}function h1t(e,t){var r,n;function i(s,l){return AT.coerce(n._input,n,gye,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&vye(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function yye(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",v=d||i==="inside",_=d||i==="outside";if(v||_){var b=GI(n,"textfont",r.font),p=AT.extendFlat({},b),k=e.textfont&&e.textfont.color,E=!k;if(E&&delete p.color,GI(n,"insidetextfont",p),h){var S=AT.extendFlat({},b);E&&delete S.color,GI(n,"pathbar.textfont",S)}_&&GI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}v&&f&&n("insidetextanchor")}_ye.exports={supplyDefaults:f1t,crossTraceDefaults:h1t,handleText:yye,validateCornerradius:mye}});var SV=ye((Wlr,xye)=>{"use strict";var d1t=qa(),v1t=ho(),p1t=Dr(),g1t=UI(),m1t=r0().validateCornerradius;xye.exports=function(e,t,r){function n(_,b){return p1t.coerce(e,t,g1t,_,b)}for(var i=!1,a=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var d=v1t.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var v=n("barcornerradius");t.barcornerradius=m1t(v)}});var g4=ye((Xlr,bye)=>{"use strict";var ST=Dr();bye.exports=function(t,r){for(var n=0;n{"use strict";var wye=ho(),Tye=Dg(),Aye=pv().hasColorscale,Sye=gv(),y1t=g4(),_1t=z0();Mye.exports=function(t,r){var n=wye.getFromId(t,r.xaxis||"x"),i=wye.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",f),s=i.makeCalcdata(r,"y"),l=Tye(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=Tye(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),v=0;v{"use strict";var x1t=Oa(),b1t=Dr();function w1t(e,t,r){var n=e._fullLayout,i=n["_"+r+"Text_minsize"];if(i){var a=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:i/l.fontSize;var u=x1t.select(this).select("text");b1t.setTransormAndDisplay(u,l)}})}}function T1t(e,t,r){if(r.uniformtext.mode){var n=kye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var S1t=Eo(),M1t=cd(),Lye=Dr().isArrayOrTypedArray;r2.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};r2.coerceNumber=function(e,t,r){if(S1t(t)){t=+t;var n=e.min,i=e.max,a=n!==void 0&&ti;if(!a)return t}return r!==void 0?r:e.dflt};r2.coerceColor=function(e,t,r){return M1t(t).isValid()?t:r!==void 0?r:e.dflt};r2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};r2.getValue=function(e,t){var r;return Lye(e)?t{"use strict";var m4=Oa(),E1t=ka(),y4=So(),Pye=Dr(),Iye=qa(),Rye=bv().resizeText,MV=Lm(),k1t=MV.textfont,C1t=MV.insidetextfont,L1t=MV.outsidetextfont,Qd=HI();function P1t(e){var t=m4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Rye(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!i[0].trace.marker.line.width)&&m4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=m4.select(this),o=i[0].trace;Dye(a,o,e)}),Iye.getComponentMethod("errorbars","style")(t)}function Dye(e,t,r){y4.pointStyle(e.selectAll("path"),t,r),Fye(e,t,r)}function Fye(e,t,r){e.selectAll("text").each(function(n){var i=m4.select(this),a=Pye.ensureUniformFontSize(r,zye(i,n,t,r));y4.font(i,a)})}function I1t(e,t,r){var n=t[0].trace;n.selectedpoints?R1t(r,n,e):(Dye(r,n,e),Iye.getComponentMethod("errorbars","style")(r))}function R1t(e,t,r){y4.selectedPointStyle(e.selectAll("path"),t),D1t(e.selectAll("text"),t,r)}function D1t(e,t,r){e.each(function(n){var i=m4.select(this),a;if(n.selected){a=Pye.ensureUniformFontSize(r,zye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),y4.font(i,a)}else y4.selectedTextStyle(i,t)})}function zye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=Nye(t,r);a=qye(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Bye(r,t.i,i));return a}function Oye(e,t,r){return EV(k1t,e.textfont,t,r)}function qye(e,t,r,n){var i=Oye(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(i={color:E1t.contrast(n),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),EV(C1t,e.insidetextfont,t,i)}function Bye(e,t,r){var n=Oye(e,t,r);return EV(L1t,e.outsidetextfont,t,n)}function EV(e,t,r,n){t=t||{};var i=Qd.getValue(t.family,r),a=Qd.getValue(t.size,r),o=Qd.getValue(t.color,r),s=Qd.getValue(t.weight,r),l=Qd.getValue(t.style,r),u=Qd.getValue(t.variant,r),c=Qd.getValue(t.textcase,r),f=Qd.getValue(t.lineposition,r),h=Qd.getValue(t.shadow,r);return{family:Qd.coerceString(e.family,i,n.family),size:Qd.coerceNumber(e.size,a,n.size),color:Qd.coerceColor(e.color,o,n.color),weight:Qd.coerceString(e.weight,s,n.weight),style:Qd.coerceString(e.style,l,n.style),variant:Qd.coerceString(e.variant,u,n.variant),textcase:Qd.coerceString(e.variant,c,n.textcase),lineposition:Qd.coerceString(e.variant,f,n.lineposition),shadow:Qd.coerceString(e.variant,h,n.shadow)}}function Nye(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Uye.exports={style:P1t,styleTextPoints:Fye,styleOnSelect:I1t,getInsideTextFont:qye,getOutsideTextFont:Bye,getBarColor:Nye,resizeText:Rye}});var n2=ye(($lr,Yye)=>{"use strict";var jI=Oa(),WI=Eo(),Fd=Dr(),F1t=ru(),z1t=ka(),T_=So(),O1t=qa(),XI=ho().tickText,Vye=bv(),q1t=Vye.recordMinTextSize,B1t=Vye.clearMinTextSize,kV=N0(),MT=HI(),N1t=e2(),Gye=Lm(),U1t=Gye.text,V1t=Gye.textposition,G1t=ip().appendArrayPointValue,Gv=N1t.TEXTPAD;function H1t(e){return e.id}function j1t(e){if(e.ids)return H1t}function CV(e){return(e>0)-(e<0)}function Pm(e,t){return e0}function X1t(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;i||(i={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},B1t("bar",l));var c=Fd.makeTraceGroups(n,r,"trace bars").each(function(f){var h=jI.select(this),d=f[0].trace,v=f[0].t,_=d.type==="waterfall",b=d.type==="funnel",p=d.type==="histogram",k=d.type==="bar",E=k||b,S=0;_&&d.connector.visible&&d.connector.mode==="between"&&(S=d.connector.line.width/2);var L=d.orientation==="h",x=jye(i),C=Fd.ensureSingle(h,"g","points"),M=j1t(d),g=C.selectAll("g.point").data(Fd.identity,M);g.enter().append("g").classed("point",!0),g.exit().remove(),g.each(function(T,z){var O=jI.select(this),V=W1t(T,o,s,L),G=V[0][0],Z=V[0][1],j=V[1][0],N=V[1][1],H=(L?Z-G:N-j)===0;H&&E&&MT.getLineWidth(d,T)&&(H=!1),H||(H=!WI(G)||!WI(Z)||!WI(j)||!WI(N)),T.isBlank=H,H&&(L?Z=G:N=j),S&&!H&&(L?(G-=Pm(G,Z)*S,Z+=Pm(G,Z)*S):(j-=Pm(j,N)*S,N+=Pm(j,N)*S));var te,oe;if(d.type==="waterfall"){if(!H){var _e=d[T.dir].marker;te=_e.line.width,oe=_e.color}}else te=MT.getLineWidth(d,T),oe=T.mc||d.marker.color;function Ee($e){var St=jI.round(te/2%1,2);return i.gap===0&&i.groupgap===0?jI.round(Math.round($e)-St,2):$e}function Ce($e,St,Qt){return Qt&&$e===St?$e:Math.abs($e-St)>=2?Ee($e):$e>St?Math.ceil($e):Math.floor($e)}var me=z1t.opacity(oe),ie=me<1||te>.01?Ee:Ce;e._context.staticPlot||(G=ie(G,Z,L),Z=ie(Z,G,L),j=ie(j,N,!L),N=ie(N,j,!L));var Se=L?o.c2p:s.c2p,Le;T.s0>0?Le=T._sMax:T.s0<0?Le=T._sMin:Le=T.s1>0?T._sMax:T._sMin;function Ae($e,St){if(!$e)return 0;var Qt=Math.abs(L?N-j:Z-G),Vt=Math.abs(L?Z-G:N-j),_t=ie(Math.abs(Se(Le,!0)-Se(0,!0))),It=T.hasB?Math.min(Qt/2,Vt/2):Math.min(Qt/2,_t),mt;if(St==="%"){var er=Math.min(50,$e);mt=Qt*(er/100)}else mt=$e;return ie(Math.max(Math.min(mt,It),0))}var Fe=k||p?Ae(v.cornerradiusvalue,v.cornerradiusform):0,Pe,ge,Re="M"+G+","+j+"V"+N+"H"+Z+"V"+j+"Z",ce=0;if(Fe&&T.s){var Ze=CV(T.s0)===0||CV(T.s)===CV(T.s0)?T.s1:T.s0;if(ce=ie(T.hasB?0:Math.abs(Se(Le,!0)-Se(Ze,!0))),ce0?Math.sqrt(ce*(2*Fe-ce)):0,Gt=ut>0?Math.max:Math.min;Pe="M"+G+","+j+"V"+(N-st*pt)+"H"+Gt(Z-(Fe-ce)*ut,G)+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+Z+","+(N-Fe*pt-lt)+"V"+(j+Fe*pt+lt)+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+Gt(Z-(Fe-ce)*ut,G)+","+(j+st*pt)+"Z"}else if(T.hasB)Pe="M"+(G+Fe*ut)+","+j+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+G+","+(j+Fe*pt)+"V"+(N-Fe*pt)+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+(G+Fe*ut)+","+N+"H"+(Z-Fe*ut)+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+Z+","+(N-Fe*pt)+"V"+(j+Fe*pt)+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+(Z-Fe*ut)+","+j+"Z";else{ge=Math.abs(N-j)+ce;var Nt=ge0?Math.sqrt(ce*(2*Fe-ce)):0,sr=pt>0?Math.max:Math.min;Pe="M"+(G+Nt*ut)+","+j+"V"+sr(N-(Fe-ce)*pt,j)+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+(G+Fe*ut-Jt)+","+N+"H"+(Z-Fe*ut+Jt)+"A "+Fe+","+Fe+" 0 0 "+Zt+" "+(Z-Nt*ut)+","+sr(N-(Fe-ce)*pt,j)+"V"+j+"Z"}}else Pe=Re}else Pe=Re;var wr=Hye(Fd.ensureSingle(O,"path"),l,i,a);if(wr.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((Z-G)*(N-j))||H&&e._context.staticPlot?"M0,0Z":Pe).call(T_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var cr=T_.makePointStyleFns(d);T_.singlePointStyle(T,wr,d,cr,e)}Z1t(e,t,O,f,z,G,Z,j,N,Fe,ce,i,a),t.layerClipId&&T_.hideOutsideRangePoint(T,O.select("text"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;T_.setClipUrl(h,P?null:t.layerClipId,e)});O1t.getComponentMethod("errorbars","plot")(e,c,t,i)}function Z1t(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,_=e._fullLayout,b;function p(ge,Re,ce){var Ze=Fd.ensureSingle(ge,"text").text(Re).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(T_.font,ce).call(F1t.convertToTspans,e);return Ze}var k=n[0].trace,E=k.orientation==="h",S=J1t(_,n,i,d,v);b=$1t(k,i);var L=f.mode==="stack"||f.mode==="relative",x=n[i],C=!L||x._outmost,M=x.hasB,g=u&&u-c>Gv;if(!S||b==="none"||(x.isBlank||a===o||s===l)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var P=_.font,T=kV.getBarColor(n[i],k),z=kV.getInsideTextFont(k,i,P,T),O=kV.getOutsideTextFont(k,i,P),V=k.insidetextanchor||"end",G=r.datum();E?d.type==="log"&&G.s0<=0&&(d.range[0]0&&Ee>0,ie;g?M?ie=i2(N-2*u,H,_e,Ee,E)||i2(N,H-2*u,_e,Ee,E):E?ie=i2(N-(u-c),H,_e,Ee,E)||i2(N,H-2*(u-c),_e,Ee,E):ie=i2(N,H-(u-c),_e,Ee,E)||i2(N-2*(u-c),H,_e,Ee,E):ie=i2(N,H,_e,Ee,E),me&&ie?b="inside":(b="outside",te.remove(),te=null)}else b="inside";if(!te){Ce=Fd.ensureUniformFontSize(e,b==="outside"?O:z),te=p(r,S,Ce);var Se=te.attr("transform");if(te.attr("transform",""),oe=T_.bBox(te.node()),_e=oe.width,Ee=oe.height,te.attr("transform",Se),_e<=0||Ee<=0){te.remove();return}}var Le=k.textangle,Ae,Fe;b==="outside"?(Fe=k.constraintext==="both"||k.constraintext==="outside",Ae=K1t(a,o,s,l,oe,{isHorizontal:E,constrained:Fe,angle:Le})):(Fe=k.constraintext==="both"||k.constraintext==="inside",Ae=Zye(a,o,s,l,oe,{isHorizontal:E,constrained:Fe,angle:Le,anchor:V,hasB:M,r:u,overhead:c})),Ae.fontSize=Ce.size,q1t(k.type==="histogram"?"bar":k.type,Ae,_),x.transform=Ae;var Pe=Hye(te,_,f,h);Fd.setTransormAndDisplay(Pe,Ae)}function i2(e,t,r,n,i){if(e<0||t<0)return!1;var a=r<=e&&n<=t,o=r<=t&&n<=e,s=i?e>=r*(t/n):t>=n*(e/r);return a||o||s}function Wye(e){return e==="auto"?0:e}function Xye(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function Zye(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,d=(h+1)/2,v=1-d,_=a.hasB,b=a.r,p=a.overhead,k=i.width,E=i.height,S=Math.abs(t-e),L=Math.abs(n-r),x=S>2*Gv&&L>2*Gv?Gv:0;S-=2*x,L-=2*x;var C=Wye(l);l==="auto"&&!(k<=S&&E<=L)&&(k>S||E>L)&&(!(k>L||E>S)||kGv){var T=Y1t(e,t,r,n,M,b,p,o,_);g=T.scale,P=T.pad}else g=1,s&&(g=Math.min(1,S/M.x,L/M.y)),P=0;var z=i.left*v+i.right*d,O=(i.top+i.bottom)/2,V=(e+Gv)*v+(t-Gv)*d,G=(r+n)/2,Z=0,j=0;if(f||c){var N=(o?M.x:M.y)/2;b&&(c||_)&&(x+=P);var H=o?Pm(e,t):Pm(r,n);o?f?(V=e+H*x,Z=-H*N):(V=t-H*x,Z=H*N):f?(G=r+H*x,j=-H*N):(G=n-H*x,j=H*N)}return{textX:z,textY:O,targetX:V,targetY:G,anchorX:Z,anchorY:j,scale:g,rotate:C}}function Y1t(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Gv),c=Math.max(0,Math.abs(n-r)-2*Gv),f=a-Gv,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,v=l?f*2:s?2*h:f-o,_,b,p,k,E;return i.y/i.x>=c/(u-d)?k=c/i.y:i.y/i.x<=(c-v)/u?k=u/i.x:!l&&s?(_=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),p=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)):l?(_=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),p=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)):(_=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),p=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)),k=Math.min(1,k),s?E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*k)/2)*(f-(c-i.y*k)/2)))-o):E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*k)/2)*(f-(u-i.x*k)/2)))-o),{scale:k,pad:E}}function K1t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=i.width,c=i.height,f=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Gv?Gv:0:d=f>2*Gv?Gv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var _=Wye(l),b=Xye(i,_),p=(o?b.x:b.y)/2,k=(i.left+i.right)/2,E=(i.top+i.bottom)/2,S=(e+t)/2,L=(r+n)/2,x=0,C=0,M=o?Pm(t,e):Pm(r,n);return o?(S=t-M*d,x=M*p):(L=n+M*d,C=-M*p),{textX:k,textY:E,targetX:S,targetY:L,anchorX:x,anchorY:C,scale:v,rotate:_}}function J1t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=Q1t(e,t,r,n,i):a.textinfo?s=e_t(t,r,n,i):s=MT.getValue(a.text,r),MT.coerceString(U1t,s)}function $1t(e,t){var r=MT.getValue(e.textposition,t);return MT.coerceEnumerated(V1t,r)}function Q1t(e,t,r,n,i){var a=t[0].trace,o=Fd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,d,v;c?(f="y",h=i,d="x",v=n):(f="x",h=n,d="y",v=i);function _(x){return XI(h,h.c2l(x),!0).text}function b(x){return XI(v,v.c2l(x),!0).text}var p=t[r],k={};k.label=p.p,k.labelLabel=k[f+"Label"]=_(p.p);var E=Fd.castOption(a,p.i,"text");(E===0||E)&&(k.text=E),k.value=p.s,k.valueLabel=k[d+"Label"]=b(p.s);var S={};G1t(S,a,p.i),(s||S.x===void 0)&&(S.x=c?k.value:k.label),(s||S.y===void 0)&&(S.y=c?k.label:k.value),(s||S.xLabel===void 0)&&(S.xLabel=c?k.valueLabel:k.labelLabel),(s||S.yLabel===void 0)&&(S.yLabel=c?k.labelLabel:k.valueLabel),l&&(k.delta=+p.rawS||p.s,k.deltaLabel=b(k.delta),k.final=p.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),u&&(k.value=p.s,k.valueLabel=b(k.value),k.percentInitial=p.begR,k.percentInitialLabel=Fd.formatPercent(p.begR),k.percentPrevious=p.difR,k.percentPreviousLabel=Fd.formatPercent(p.difR),k.percentTotal=p.sumR,k.percenTotalLabel=Fd.formatPercent(p.sumR));var L=Fd.castOption(a,p.i,"customdata");return L&&(k.customdata=L),Fd.texttemplateString({data:[S,k,a._meta],fallback:a.texttemplatefallback,labels:k,locale:e._d3locale,template:o})}function e_t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function l(L){var x=a?n:r;return XI(x,L,!0).text}function u(L){var x=a?r:n;return XI(x,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split("+"),d=[],v,_=function(L){return h.indexOf(L)!==-1};if(_("label")&&d.push(l(e[t].p)),_("text")&&(v=Fd.castOption(i,f.i,"text"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,p=f.v,k=p-b;_("initial")&&d.push(u(k)),_("delta")&&d.push(u(b)),_("final")&&d.push(u(p))}if(s){_("value")&&d.push(u(f.s));var E=0;_("percent initial")&&E++,_("percent previous")&&E++,_("percent total")&&E++;var S=E>1;_("percent initial")&&(v=Fd.formatPercent(f.begR),S&&(v+=" of initial"),d.push(v)),_("percent previous")&&(v=Fd.formatPercent(f.difR),S&&(v+=" of previous"),d.push(v)),_("percent total")&&(v=Fd.formatPercent(f.sumR),S&&(v+=" of total"),d.push(v))}return d.join("
")}Yye.exports={plot:X1t,toMoveInsideBar:Zye}});var ET=ye((Qlr,Qye)=>{"use strict";var _4=vf(),t_t=qa(),Kye=ka(),r_t=Dr().fillText,i_t=HI().getLineWidth,LV=ho().hoverLabelText,n_t=fs().BADNUM;function a_t(e,t,r,n,i){var a=Jye(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=$ye(s,l),t_t.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function Jye(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,v,_,b,p,k;o.orientation==="h"?(h=r,d=t,v="y",_="x",b=G,p=z):(h=t,d=r,v="x",_="y",p=G,b=z);var E=o[v+"period"],S=l||E;function L(ie){return C(ie,-1)}function x(ie){return C(ie,1)}function C(ie,Se){var Le=ie.w;return ie[v]+Se*Le/2}function M(ie){return ie[v+"End"]-ie[v+"Start"]}var g=l?L:E?function(ie){return ie.p-M(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?x:E?function(ie){return ie.p+M(ie)/2}:function(ie){return Math.max(x(ie),ie.p+s.bardelta/2)};function T(ie,Se,Le){return i.finiteRange&&(Le=0),_4.inbox(ie-h,Se-h,Le+Math.min(1,Math.abs(Se-ie)/k)-1)}function z(ie){return T(g(ie),P(ie),c)}function O(ie){return T(L(ie),x(ie),f)}function V(ie){var Se=ie[_];if(u){var Le=Math.abs(ie.rawS)||0;d>0?Se+=Le:d<0&&(Se-=Le)}return Se}function G(ie){var Se=d,Le=ie.b,Ae=V(ie);return _4.inbox(Le-Se,Ae-Se,c+(Ae-Se)/(Ae-Le)-1)}function Z(ie){var Se=d,Le=ie.b,Ae=V(ie);return _4.inbox(Le-Se,Ae-Se,f+(Ae-Se)/(Ae-Le)-1)}var j=e[v+"a"],N=e[_+"a"];k=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function H(ie){return(b(ie)+p(ie))/2}var te=_4.getDistanceFunction(n,b,p,H);if(_4.getClosest(a,te,e),e.index!==!1&&a[e.index].p!==n_t){S||(g=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(x(ie),ie.p+s.bargroupwidth/2)});var oe=e.index,_e=a[oe],Ee=o.base?_e.b+_e.s:_e.s;e[_+"0"]=e[_+"1"]=N.c2p(_e[_],!0),e[_+"LabelVal"]=Ee;var Ce=s.extents[s.extents.round(_e.p)];e[v+"0"]=j.c2p(l?g(_e):Ce[0],!0),e[v+"1"]=j.c2p(l?P(_e):Ce[1],!0);var me=_e.orig_p!==void 0;return e[v+"LabelVal"]=me?_e.orig_p:_e.p,e.labelLabel=LV(j,e[v+"LabelVal"],o[v+"hoverformat"]),e.valueLabel=LV(N,e[_+"LabelVal"],o[_+"hoverformat"]),e.baseLabel=LV(N,_e.b,o[_+"hoverformat"]),e.spikeDistance=(Z(_e)+O(_e))/2,e[v+"Spike"]=j.c2p(_e.p,!0),r_t(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function $ye(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=i_t(e,t);if(Kye.opacity(r))return r;if(Kye.opacity(n)&&i)return n}Qye.exports={hoverPoints:a_t,hoverOnBars:Jye,getTraceColor:$ye}});var t1e=ye((eur,e1e)=>{"use strict";e1e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var kT=ye((tur,r1e)=>{"use strict";r1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";i1e.exports={attributes:Lm(),layoutAttributes:UI(),supplyDefaults:r0().supplyDefaults,crossTraceDefaults:r0().crossTraceDefaults,supplyLayoutDefaults:SV(),calc:Eye(),crossTraceCalc:jb().crossTraceCalc,colorbar:$d(),arraysToCalcdata:g4(),plot:n2().plot,style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:ET().hoverPoints,eventData:t1e(),selectPoints:kT(),moduleType:"trace",name:"bar",basePlotModule:ph(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var o1e=ye((iur,a1e)=>{"use strict";a1e.exports=n1e()});var x4=ye((nur,c1e)=>{"use strict";var s_t=Cg(),U0=pf(),s1e=Lm(),l_t=Lh(),l1e=df().axisHoverFormat,{hovertemplateAttrs:u_t,templatefallbackAttrs:c_t}=Ll(),zy=Ao().extendFlat,CT=U0.marker,u1e=CT.line;c1e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:U0.xperiod,yperiod:U0.yperiod,xperiod0:U0.xperiod0,yperiod0:U0.yperiod0,xperiodalignment:U0.xperiodalignment,yperiodalignment:U0.yperiodalignment,xhoverformat:l1e("x"),yhoverformat:l1e("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:zy({},CT.symbol,{arrayOk:!1,editType:"plot"}),opacity:zy({},CT.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:zy({},CT.angle,{arrayOk:!1,editType:"calc"}),size:zy({},CT.size,{arrayOk:!1,editType:"calc"}),color:zy({},CT.color,{arrayOk:!1,editType:"style"}),line:{color:zy({},u1e.color,{arrayOk:!1,dflt:l_t.defaultLine,editType:"style"}),width:zy({},u1e.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:s_t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:s1e.offsetgroup,alignmentgroup:s1e.alignmentgroup,selected:{marker:U0.selected.marker,editType:"style"},unselected:{marker:U0.unselected.marker,editType:"style"},text:zy({},U0.text,{}),hovertext:zy({},U0.hovertext,{}),hovertemplate:u_t({}),hovertemplatefallback:c_t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:U0.zorder}});var b4=ye((aur,f1e)=>{"use strict";f1e.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 T4=ye((our,p1e)=>{"use strict";var V0=Dr(),f_t=qa(),h_t=ka(),d_t=Ig(),v_t=Hb(),h1e=R3(),w4=x4();function p_t(e,t,r,n){function i(v,_){return V0.coerce(e,t,w4,v,_)}if(d1e(e,t,i,n),t.visible!==!1){d_t(e,t,n,i),i("xhoverformat"),i("yhoverformat");var a=t._hasPreCompStats;a&&(i("lowerfence"),i("upperfence")),i("line.color",(e.marker||{}).color||r),i("line.width"),i("fillcolor",h_t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),l=i("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}i("whiskerwidth");var u=i("sizemode"),c;u==="quartiles"&&(c=i("boxmean",o)),i("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var f=!1;if(a){var h=i("notchspan");h&&h.length&&(f=!0)}else V0.validate(e.notchwidth,w4.notchwidth)&&(f=!0);var d=i("notched",f);d&&i("notchwidth"),v1e(e,t,i,{prefix:"box"}),i("zorder")}}function d1e(e,t,r,n){function i(P){var T=0;return P&&P.length&&(T+=1,V0.isArrayOrTypedArray(P[0])&&P[0].length&&(T+=1)),T}function a(P){return V0.validate(e[P],w4[P])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(V0.minRowLength(u),V0.minRowLength(c),V0.minRowLength(f))}var h=i(o),d=i(s),v=h&&V0.minRowLength(o),_=d&&V0.minRowLength(s),b=n.calendar,p={autotypenumbers:n.autotypenumbers},k,E;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var S=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!S?k="h":k="v",E=l;break;case"10":k="v",E=Math.min(l,_);break;case"20":k="h",E=Math.min(l,s.length);break;case"01":k="h",E=Math.min(l,v);break;case"02":k="v",E=Math.min(l,o.length);break;case"12":k="v",E=Math.min(l,_,o.length);break;case"21":k="h",E=Math.min(l,s.length,v);break;case"11":E=0;break;case"22":var x=!1,C;for(C=0;C0?(k="v",d>0?E=Math.min(_,v):E=Math.min(v)):d>0?(k="h",E=Math.min(_)):E=0;if(!E){t.visible=!1;return}t._length=E;var M=r("orientation",k);t._hasPreCompStats?M==="v"&&d===0?(r("x0",0),r("dx",1)):M==="h"&&h===0&&(r("y0",0),r("dy",1)):M==="v"&&d===0?r("x0"):M==="h"&&h===0&&r("y0");var g=f_t.getComponentMethod("calendars","handleTraceDefaults");g(e,t,["x","y"],n)}function v1e(e,t,r,n){var i=n.prefix,a=V0.coerce2(e,t,w4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(i+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),V0.coerceSelectionMarkerOpacity(t,r)}function g_t(e,t){var r,n;function i(l){return V0.coerce(n._input,n,w4,l)}for(var a=0;a{"use strict";var m_t=qa(),y_t=Dr(),__t=b4();function g1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var IV=Eo(),YI=ho(),b_t=Dg(),gh=Dr(),i0=fs().BADNUM,Oy=gh._;M1e.exports=function(t,r){var n=t._fullLayout,i=YI.getFromId(t,r.xaxis||"x"),a=YI.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,d,v;r.orientation==="h"?(c=i,f="x",h=a,d="y",v=!!r.yperiodalignment):(c=a,f="y",h=i,d="x",v=!!r.xperiodalignment);var _=w_t(r,d,h,n[s]),b=_[0],p=_[1],k=gh.distinctVals(b,h),E=k.vals,S=k.minDiff/2,L,x,C,M,g,P,T=(r.boxpoints||r.points)==="all"?gh.identity:function(Zt){return Zt.vL.uf};if(r._hasPreCompStats){var z=r[f],O=function(Zt){return c.d2c((r[Zt]||[])[l])},V=1/0,G=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=O("lowerfence");L.lf=j!==i0&&j<=L.q1?j:b1e(L,C,M);var N=O("upperfence");L.uf=N!==i0&&N>=L.q3?N:w1e(L,C,M);var H=O("mean");L.mean=H!==i0?H:M?gh.mean(C,M):(L.q1+L.q3)/2;var te=O("sd");L.sd=H!==i0&&te>=0?te:M?gh.stdev(C,M,L.mean):L.q3-L.q1,L.lo=T1e(L),L.uo=A1e(L);var oe=O("notchspan");oe=oe!==i0&&oe>0?oe:S1e(L,M),L.ln=L.med-oe,L.un=L.med+oe;var _e=L.lf,Ee=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),Ee=Math.max(Ee,C[M-1])),r.notched&&(_e=Math.min(_e,L.ln),Ee=Math.max(Ee,L.un)),L.min=_e,L.max=Ee}else{gh.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` `));var Ce;L.med!==i0?Ce=L.med:L.q1!==i0?L.q3!==i0?Ce=(L.q1+L.q3)/2:Ce=L.q1:L.q3!==i0?Ce=L.q3:Ce=0,L.med=Ce,L.q1=L.q3=Ce,L.lf=L.uf=Ce,L.mean=L.sd=Ce,L.ln=L.un=Ce,L.min=L.max=Ce}V=Math.min(V,L.min),G=Math.max(G,L.max),L.pts2=x.filter(T),o.push(L)}}r._extremes[c._id]=YI.findExtremes(c,[V,G],{padded:!0})}else{var me=c.makeCalcdata(r,f),ie=T_t(E,S),Se=E.length,Le=A_t(Se);for(l=0;l=0&&Ae0){if(L={},L.pos=L[d]=E[l],x=L.pts=Le[l].sort(_1e),C=L[f]=x.map(x1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=gh.mean(C,M),L.sd=gh.stdev(C,M,L.mean)*r.sdmultiple,L.med=gh.interp(C,.5),M%2&&(Re||ce)){var Ze,ut;Re?(Ze=C.slice(0,M/2),ut=C.slice(M/2+1)):ce&&(Ze=C.slice(0,M/2+1),ut=C.slice(M/2)),L.q1=gh.interp(Ze,.5),L.q3=gh.interp(ut,.5)}else L.q1=gh.interp(C,.25),L.q3=gh.interp(C,.75);L.lf=b1e(L,C,M),L.uf=w1e(L,C,M),L.lo=T1e(L),L.uo=A1e(L);var pt=S1e(L,M);L.ln=L.med-pt,L.un=L.med+pt,Fe=Math.min(Fe,L.ln),Pe=Math.max(Pe,L.un),L.pts2=x.filter(T),o.push(L)}r.notched&&gh.isTypedArray(me)&&(me=Array.from(me)),r._extremes[c._id]=YI.findExtremes(c,r.notched?me.concat([Fe,Pe]):me,{padded:!0})}return S_t(o,r),o.length>0?(o[0].t={num:n[s],dPos:S,posLetter:d,valLetter:f,labels:{med:Oy(t,"median:"),min:Oy(t,"min:"),q1:Oy(t,"q1:"),q3:Oy(t,"q3:"),max:Oy(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Oy(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Oy(t,"mean:"),lf:Oy(t,"lower fence:"),uf:Oy(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function w_t(e,t,r,n){var i=t in e,a=t+"0"in e,o="d"+t in e;if(i||a&&o){var s=r.makeCalcdata(e,t),l=b_t(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||IV(e.name)&&["linear","log"].indexOf(r.type)!==-1||gh.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d{"use strict";var E1e=ho(),M_t=Dr(),E_t=Nb().getAxisGroup,k1e=["v","h"];function k_t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a1,k=1-a[e+"gap"],E=1-a[e+"groupgap"];for(l=0;l0;if(C==="positive"?(N=M*(x?1:.5),oe=te,H=oe=P):C==="negative"?(N=oe=P,H=M*(x?1:.5),_e=te):(N=H=M,oe=_e=te),Le){var Ae=S.pointpos,Fe=S.jitter,Pe=S.marker.size/2,ge=0;Ae+Fe>=0&&(ge=te*(Ae+Fe),ge>N?(Se=!0,me=Pe,Ee=ge):ge>oe&&(me=Pe,Ee=N)),ge<=N&&(Ee=N);var Re=0;Ae-Fe<=0&&(Re=-te*(Ae-Fe),Re>H?(Se=!0,ie=Pe,Ce=Re):Re>_e&&(ie=Pe,Ce=H)),Re<=H&&(Ce=H)}else Ee=N,Ce=H;var ce=new Array(c.length);for(u=0;u{"use strict";var LT=Oa(),a2=Dr(),C_t=So(),P1e=5,L_t=.01;function P_t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;a2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=LT.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation==="h"?(h=o,d=a):(h=a,d=o),I1e(l,{pos:h,val:d},f,c,i),R1e(l,{x:a,y:o},f,c),D1e(l,{pos:h,val:d},f,c)})}function I1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,v=r.notched||!1,_=v?1-2*r.notchwidth:1,b,p;Array.isArray(n.bdPos)?(b=n.bdPos[0],p=n.bdPos[1]):(b=n.bdPos,p=n.bdPos);var k=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?a2.identity:[]);k.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),k.exit().remove(),k.each(function(E){if(E.empty)return LT.select(this).attr("d","M0,0Z");var S=s.c2l(E.pos+u,!0),L=s.l2p(S-b)+f,x=s.l2p(S+p)+f,C=l?(L+x)/2:s.l2p(S)+f,M=r.whiskerwidth,g=l?L*M+(1-M)*C:s.l2p(S-c)+f,P=l?x*M+(1-M)*C:s.l2p(S+c)+f,T=s.l2p(S-b*_)+f,z=s.l2p(S+p*_)+f,O=r.sizemode==="sd",V=o.c2p(O?E.mean-E.sd:E.q1,!0),G=O?o.c2p(E.mean+E.sd,!0):o.c2p(E.q3,!0),Z=a2.constrain(O?o.c2p(E.mean,!0):o.c2p(E.med,!0),Math.min(V,G)+1,Math.max(V,G)-1),j=E.lf===void 0||r.boxpoints===!1||O,N=o.c2p(j?E.min:E.lf,!0),H=o.c2p(j?E.max:E.uf,!0),te=o.c2p(E.ln,!0),oe=o.c2p(E.un,!0);a?LT.select(this).attr("d","M"+Z+","+T+"V"+z+"M"+V+","+L+"V"+x+(v?"H"+te+"L"+Z+","+z+"L"+oe+","+x:"")+"H"+G+"V"+L+(v?"H"+oe+"L"+Z+","+T+"L"+te+","+L:"")+"Z"+(d?"M"+V+","+C+"H"+N+"M"+G+","+C+"H"+H+(h===0?"":"M"+N+","+g+"V"+P+"M"+H+","+g+"V"+P):"")):LT.select(this).attr("d","M"+T+","+Z+"H"+z+"M"+L+","+V+"H"+x+(v?"V"+te+"L"+z+","+Z+"L"+x+","+oe:"")+"V"+G+"H"+L+(v?"V"+oe+"L"+T+","+Z+"L"+L+","+te:"")+"Z"+(d?"M"+C+","+V+"V"+N+"M"+C+","+G+"V"+H+(h===0?"":"M"+g+","+N+"H"+P+"M"+g+","+H+"H"+P):""))})}function R1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;a2.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var d,v=h.pts2,_=Math.max((h.max-h.min)/10,h.q3-h.q1),b=_*1e-9,p=_*L_t,k=[],E=0,S;if(r.jitter){if(_===0)for(E=1,k=new Array(v.length),d=0;dh.lo&&(P.so=!0)}return v});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(C_t.translatePoints,i,a)}function D1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?a2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var v=a.c2l(d.pos+s,!0),_=a.l2p(v-c)+l,b=a.l2p(v+f)+l,p=o?(_+b)/2:a.l2p(v)+l,k=i.c2p(d.mean,!0),E=i.c2p(d.mean-d.sd,!0),S=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?LT.select(this).attr("d","M"+k+","+_+"V"+b+(u==="sd"?"m0,0L"+E+","+p+"L"+k+","+_+"L"+S+","+p+"Z":"")):LT.select(this).attr("d","M"+_+","+k+"H"+b+(u==="sd"?"m0,0L"+p+","+E+"L"+_+","+k+"L"+p+","+S+"Z":""))})}F1e.exports={plot:P_t,plotBoxAndWhiskers:I1e,plotPoints:R1e,plotBoxMean:D1e}});var $I=ye((fur,z1e)=>{"use strict";var DV=Oa(),FV=ka(),zV=So();function I_t(e,t,r){var n=r||DV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=DV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style("stroke-width",h+"px").call(FV.stroke,d).call(FV.fill,v)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=DV.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(FV.stroke,o.line.color);var c=a.selectAll("path.point");zV.pointStyle(c,o,e)}})}function R_t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?zV.selectedPointStyle(i,n):zV.pointStyle(i,n,e)}z1e.exports={style:I_t,styleOnSelect:R_t}});var qV=ye((hur,N1e)=>{"use strict";var D_t=ho(),OV=Dr(),A_=vf(),O1e=ka(),F_t=OV.fillText;function z_t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(q1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=B1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function q1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,l=i[0].t,u=s.type==="violin",c,f,h,d,v,_,b,p,k,E,S,L=l.bdPos,x,C,M=l.wHover,g=function(Pe){return h.c2l(Pe.pos)+l.bPos-h.c2l(_)};u&&s.side!=="both"?(s.side==="positive"&&(k=function(Pe){var ge=g(Pe);return A_.inbox(ge,ge+M,E)},x=L,C=0),s.side==="negative"&&(k=function(Pe){var ge=g(Pe);return A_.inbox(ge-M,ge,E)},x=0,C=L)):(k=function(Pe){var ge=g(Pe);return A_.inbox(ge-M,ge+M,E)},x=C=L);var P;u?P=function(Pe){return A_.inbox(Pe.span[0]-v,Pe.span[1]-v,E)}:P=function(Pe){return A_.inbox(Pe.min-v,Pe.max-v,E)},s.orientation==="h"?(v=t,_=r,b=P,p=k,c="y",h=o,f="x",d=a):(v=r,_=t,b=k,p=P,c="x",h=a,f="y",d=o);var T=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));E=e.maxHoverDistance-T,S=e.maxSpikeDistance-T;function z(Pe){return(b(Pe)+p(Pe))/2}var O=A_.getDistanceFunction(n,b,p,z);if(A_.getClosest(i,O,e),e.index===!1)return[];var V=i[e.index],G=s.line.color,Z=(s.marker||{}).color;O1e.opacity(G)&&s.line.width?e.color=G:O1e.opacity(Z)&&s.boxpoints?e.color=Z:e.color=s.fillcolor,e[c+"0"]=h.c2p(V.pos+l.bPos-C,!0),e[c+"1"]=h.c2p(V.pos+l.bPos+x,!0),e[c+"LabelVal"]=V.orig_p!==void 0?V.orig_p:V.pos;var j=c+"Spike";e.spikeDistance=z(V)*S/E,e[j]=h.c2p(V.pos,!0);var N=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,H=s.boxpoints||s.points,te=H&&N?["max","uf","q3","med","mean","q1","lf","min"]:H&&!N?["max","uf","q3","med","q1","lf","min"]:!H&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],oe=d.range[1]{"use strict";U1e.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 BV=ye((vur,G1e)=>{"use strict";G1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";H1e.exports={attributes:x4(),layoutAttributes:b4(),supplyDefaults:T4().supplyDefaults,crossTraceDefaults:T4().crossTraceDefaults,supplyLayoutDefaults:ZI().supplyLayoutDefaults,calc:RV(),crossTraceCalc:KI().crossTraceCalc,plot:JI().plot,style:$I().style,styleOnSelect:$I().styleOnSelect,hoverPoints:qV().hoverPoints,eventData:V1e(),selectPoints:BV(),moduleType:"trace",name:"box",basePlotModule:ph(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var X1e=ye((gur,W1e)=>{"use strict";W1e.exports=j1e()});var PT=ye((mur,Y1e)=>{"use strict";var O_t=Tu(),{extendFlat:Pp}=Ao(),q_t=Gl(),{axisHoverFormat:NV}=df(),B_t=ec(),{hovertemplateAttrs:N_t,templatefallbackAttrs:Z1e,texttemplateAttrs:U_t}=Ll(),n0=pf();Y1e.exports=Pp({z:{valType:"data_array",editType:"calc"},x:Pp({},n0.x,{impliedEdits:{xtype:"array"}}),x0:Pp({},n0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Pp({},n0.dx,{impliedEdits:{xtype:"scaled"}}),y:Pp({},n0.y,{impliedEdits:{ytype:"array"}}),y0:Pp({},n0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Pp({},n0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Pp({},n0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Pp({},n0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Pp({},n0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Pp({},n0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Pp({},n0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Pp({},n0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:NV("x"),yhoverformat:NV("y"),zhoverformat:NV("z",1),hovertemplate:N_t(),hovertemplatefallback:Z1e(),texttemplate:U_t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:Z1e({editType:"plot"}),textfont:B_t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Pp({},q_t.showlegend,{dflt:!1}),zorder:n0.zorder},O_t("",{cLetter:"z",autoColorDflt:!1}))});var e8=ye((yur,J1e)=>{"use strict";var V_t=Eo(),QI=Dr(),G_t=qa();J1e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(QI.isArray1D(s)){l=n(a),u=n(o);var c=QI.minRowLength(l),f=QI.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=K1e(a,n),u=K1e(o,n),!H_t(s))return 0;n("transpose"),r._length=null}var h=G_t.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function K1e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function H_t(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var $1e=Dr();Q1e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=$1e.extendFlat({},r.font,{color:"auto",size:"auto"});$1e.coerceFont(t,"textfont",n)}});var UV=ye((xur,e_e)=>{"use strict";e_e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var i_e=ye((bur,r_e)=>{"use strict";var t_e=Dr(),j_t=e8(),W_t=A4(),X_t=Ig(),Z_t=UV(),Y_t=Qh(),K_t=PT();r_e.exports=function(t,r,n,i){function a(s,l){return t_e.coerce(t,r,K_t,s,l)}var o=j_t(t,r,a,i);if(!o){r.visible=!1;return}X_t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),W_t(a,i),Z_t(t,r,a,i),a("hoverongaps"),a("connectgaps",t_e.isArray1D(r.z)&&r.zsmooth!==!1),Y_t(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var VV=ye((wur,n_e)=>{"use strict";var IT=Eo();n_e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return IT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return IT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(IT(i))if(i=Number(i),IT(r[e])){if(r[e]>i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0},max:function(e,t,r,n){var i=n[t];if(IT(i))if(i=Number(i),IT(r[e])){if(r[e]{"use strict";a_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";o_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var RT=fs(),o2=RT.ONEAVGYEAR,s_e=RT.ONEAVGMONTH,r8=RT.ONEDAY,l_e=RT.ONEHOUR,u_e=RT.ONEMIN,c_e=RT.ONESEC,f_e=ho().tickIncrement;v_e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(t8(u+s,u+l,i,a),t8(c+s,c+l,i,a)),h=Math.min(t8(u+o,u+s,i,a),t8(c+o,c+s,i,a)),d,v;if(f>h&&hr8){var _=d===o2?1:6,b=d===o2?"M12":"M1";return function(p,k){var E=i.c2d(p,o2,a),S=E.indexOf("-",_);S>0&&(E=E.slice(0,S));var L=i.d2c(E,0,a);if(Lc_e?e>r8?e>o2*1.1?o2:e>s_e*1.1?s_e:r8:e>l_e?l_e:e>u_e?u_e:c_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function J_t(e,t,r,n,i,a){if(n&&e>r8){var o=d_e(t,i,a),s=d_e(r,i,a),l=e===o2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function d_e(e,t,r){var n=t.c2d(e,o2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var ZV=ye((Mur,__e)=>{"use strict";var WV=Eo(),Hv=Dr(),p_e=qa(),G0=ho(),{hasColorscale:g_e}=pv(),m_e=gv(),$_t=g4(),y_e=VV(),Q_t=GV(),ext=HV(),txt=jV();function rxt(e,t){var r=[],n=[],i=t.orientation==="h",a=G0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=XV(e,t,a,o),h=f[0],d=f[1],v=typeof h.size=="string",_=[],b=v?_:h,p=[],k=[],E=[],S=0,L=t.histnorm,x=t.histfunc,C=L.indexOf("density")!==-1,M,g,P;u.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var T=x==="max"||x==="min",z=T?null:0,O=y_e.count,V=Q_t[L],G=!1,Z=function(ge){return a.r2c(ge,0,l)},j;for(Hv.isArrayOrTypedArray(t[s])&&x!=="count"&&(j=t[s],G=x==="avg",O=y_e[x]),c=Z(h.start),g=Z(h.end)+(c-G0.tickIncrement(c,h.size,!1,l))/1e6;c=0&&P=Ae;c--)if(n[c]){Fe=c;break}for(c=Ae;c<=Fe;c++)if(WV(r[c])&&WV(n[c])){var Pe={p:r[c],s:n[c],b:0};u.enabled||(Pe.pts=E[c],oe?Pe.ph0=Pe.ph1=E[c].length?d[E[c][0]]:r[c]:(t._computePh=!0,Pe.ph0=ie(_[c]),Pe.ph1=ie(_[c+1],!0))),Le.push(Pe)}return Le.length===1&&(Le[0].width1=G0.tickIncrement(Le[0].p,h.size,!1,l)-Le[0].p),g_e(t,"marker")&&m_e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),g_e(t,"marker.line")&&m_e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),$_t(Le,t),Hv.isArrayOrTypedArray(t.selectedpoints)&&Hv.tagSelected(Le,t,Ce),Le}function XV(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,d,v,_,b,p=function(me){return r.r2c(me,0,d)},k=function(me){return r.c2r(me,0,d)},E=r.type==="date"?function(me){return me||me===0?Hv.cleanDate(me,null,d):null}:function(me){return WV(me)?Number(me):null};function S(me,ie,Se){ie[me+"Found"]?(ie[me]=E(ie[me]),ie[me]===null&&(ie[me]=Se[me])):(_[me]=ie[me]=Se[me],Hv.nestedProperty(f[0],a+"."+me).set(Se[me]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],x=!0,C=!1,M=!1;for(c=0;cr.r2l(j)&&(H=G0.tickIncrement(H,l.size,!0,d)),O.start=r.l2r(H),Z||Hv.nestedProperty(t,a+".start").set(O.start)}var te=l.end,oe=r.r2l(z.end),_e=oe!==void 0;if((l.endFound||_e)&&oe!==r.r2l(te)){var Ee=_e?oe:Hv.aggNums(Math.max,null,v);O.end=r.l2r(Ee),_e||Hv.nestedProperty(t,a+".start").set(O.end)}var Ce="autobin"+n;return t._input[Ce]===!1&&(t._input[a]=Hv.extendFlat({},t[a]||{}),delete t._input[Ce],delete t[Ce]),[O,v]}function ixt(e,t,r,n,i){var a=e._fullLayout,o=nxt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}__e.exports={calc:rxt,calcAllAutoBins:XV}});var E_e=ye((Eur,M_e)=>{"use strict";var x_e=Dr(),DT=ho(),b_e=VV(),oxt=GV(),sxt=HV(),lxt=jV(),w_e=ZV().calcAllAutoBins;M_e.exports=function(t,r){var n=DT.getFromId(t,r.xaxis),i=DT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(It){return n.r2c(It,0,a)},l=function(It){return i.r2c(It,0,o)},u=function(It){return n.c2r(It,0,a)},c=function(It){return i.c2r(It,0,o)},f,h,d,v,_=w_e(t,r,n,"x"),b=_[0],p=_[1],k=w_e(t,r,i,"y"),E=k[0],S=k[1],L=r._length;p.length>L&&p.splice(L,p.length-L),S.length>L&&S.splice(L,S.length-L);var x=[],C=[],M=[],g=typeof b.size=="string",P=typeof E.size=="string",T=[],z=[],O=g?T:b,V=P?z:E,G=0,Z=[],j=[],N=r.histnorm,H=r.histfunc,te=N.indexOf("density")!==-1,oe=H==="max"||H==="min",_e=oe?null:0,Ee=b_e.count,Ce=oxt[N],me=!1,ie=[],Se=[],Le="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Le&&H!=="count"&&(me=H==="avg",Ee=b_e[H]);var Ae=b.size,Fe=s(b.start),Pe=s(b.end)+(Fe-DT.tickIncrement(Fe,Ae,!1,a))/1e6;for(f=Fe;f=0&&d=0&&v{"use strict";var Im=Dr(),k_e=fs().BADNUM,C_e=Dg();L_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=C_e(t,r,i,l).vals,u=C_e(t,n,a,u).vals;var c=t.text,f=c!==void 0&&Im.isArray1D(c),h=t.hovertext,d=h!==void 0&&Im.isArray1D(h),v,_,b=Im.distinctVals(l),p=b.vals,k=Im.distinctVals(u),E=k.vals,S=[],L,x,C=E.length,M=p.length;for(v=0;v{"use strict";var uxt=Eo(),cxt=Dr(),n8=fs().BADNUM;P_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(p){if(uxt(p))return+p}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var fxt=Dr(),I_e=.01,hxt=[[-1,0],[1,0],[0,-1],[0,1]];function dxt(e){return .5-.25*Math.min(1,e*.5)}D_e.exports=function(t,r){var n=1,i;for(R_e(t,r),i=0;iI_e;i++)n=R_e(t,r,dxt(n));return n>I_e&&fxt.log("interp2d didn't converge quickly",n),t};function R_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,_,b;for(s=0;s_&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-_))))}return n}});var s8=ye((Pur,F_e)=>{"use strict";var vxt=Dr().maxRowLength;F_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=vxt(t),u,c,f,h,d,v,_,b;for(c=0;c=0;d--)h=i[d],c=h[0],f=h[1],v=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,v&&(_[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in _)n[h]=_[h],r.push(_[h])}return r.sort(function(p,k){return k[2]-p[2]})}});var YV=ye((Iur,q_e)=>{"use strict";var z_e=qa(),O_e=Dr().isArrayOrTypedArray;q_e.exports=function(t,r,n,i,a,o){var s=[],l=z_e.traceIs(t,"contour"),u=z_e.traceIs(t,"histogram"),c,f,h,d=O_e(r)&&r.length>1;if(d&&!u&&o.type!=="category"){var v=r.length;if(v<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h{"use strict";var B_e=qa(),KV=Dr(),l8=ho(),N_e=Dg(),pxt=E_e(),gxt=gv(),mxt=i8(),yxt=a8(),_xt=o8(),xxt=s8(),u8=YV(),JV=fs().BADNUM;V_e.exports=function(t,r){var n=l8.getFromId(t,r.xaxis||"x"),i=l8.getFromId(t,r.yaxis||"y"),a=B_e.traceIs(r,"contour"),o=B_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,v,_,b,p,k;if(n._minDtick=0,i._minDtick=0,o)k=pxt(t,r),f=k.orig_x,l=k.x,u=k.x0,c=k.dx,_=k.orig_y,h=k.y,d=k.y0,v=k.dy,b=k.z;else{var E=r.z;KV.isArray1D(E)?(mxt(r,n,i,"x","y",["z"]),l=r._x,h=r._y,E=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],_=r.y?i.makeCalcdata(r,"y"):[],l=N_e(r,n,"x",f).vals,h=N_e(r,i,"y",_).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=yxt(E,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=bxt(l,h,b),o||(l=U_e(l),h=U_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=xxt(b),_xt(b,r._emptypoints));function S(O){s=r._input.zsmooth=r.zsmooth=!1,KV.warn('cannot use zsmooth: "fast": '+O)}function L(O){if(O.length>1){var V=(O[O.length-1]-O[0])/(O.length-1),G=Math.abs(V/100);for(p=0;pG)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&S("log axis found"):L(l)?L(h)?r._islinear=!0:s==="fast"&&S("y scale is not linear"):s==="fast"&&S("x scale is not linear");var x=KV.maxRowLength(b),C=r.xtype==="scaled"?"":l,M=u8(r,C,u,c,x,n),g=r.ytype==="scaled"?"":h,P=u8(r,g,d,v,b.length,i);r._extremes[n._id]=l8.findExtremes(n,M),r._extremes[i._id]=l8.findExtremes(i,P);var T={x:M,y:P,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(T.orig_x=f),r.yperiodalignment&&_&&(T.orig_y=_),C&&C.length===M.length-1&&(T.xCenter=C),g&&g.length===P.length-1&&(T.yCenter=g),o&&(T.xRanges=k.xRanges,T.yRanges=k.yRanges,T.pts=k.pts),a||gxt(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var z={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};T.xfill=u8(z,C,u,c,x,n),T.yfill=u8(z,g,d,v,b.length,i)}return[T]};function U_e(e){for(var t=[],r=e.length,n=0;n{"use strict";f8.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]];f8.STYLE=f8.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var QV=ye((Fur,H_e)=>{"use strict";var G_e=h8(),wxt=So(),$V=Dr(),FT=null;function Txt(){if(FT!==null)return FT;FT=!1;var e=$V.isSafari()||$V.isMacWKWebView()||$V.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(G_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")FT=t.some(function(o){return r.apply(null,o)});else{var n=wxt.tester.append("image").attr("style",G_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;FT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return FT}H_e.exports=Txt});var d8=ye((zur,Q_e)=>{"use strict";var j_e=Oa(),Axt=cd(),Sxt=qa(),Mxt=So(),Ext=ho(),H0=Dr(),W_e=ru(),kxt=nI(),Cxt=ka(),Lxt=tc().extractOpts,Pxt=tc().makeColorScaleFuncFromTrace,Ixt=Wp(),Rxt=$h(),eG=Rxt.LINE_SPACING,Dxt=QV(),Fxt=h8().STYLE,J_e="heatmap-label";function $_e(e){return e.selectAll("g."+J_e)}function X_e(e){$_e(e).remove()}Q_e.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;H0.makeTraceGroups(n,r,"hm").each(function(o){var s=j_e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,v=l.y,_=l.xCenter,b=l.yCenter,p=Sxt.traceIs(u,"contour"),k=p?"best":u.zsmooth,E=h.length,S=H0.maxRowLength(h),L=!1,x=!1,C,M,g,P,T,z,O,V;for(z=0;C===void 0&&z0;)M=i.c2p(d[z]),z--;for(M0;)T=a.c2p(v[z]),z--;T=i._length||M<=0||P>=a._length||T<=0;if(H){var te=s.selectAll("image").data([]);te.exit().remove(),X_e(s);return}var oe,_e;G==="fast"?(oe=S,_e=E):(oe=j,_e=N);var Ee=document.createElement("canvas");Ee.width=oe,Ee.height=_e;var Ce=Ee.getContext("2d",{willReadFrequently:!0}),me=Pxt(u,{noNumericCheck:!0,returnArray:!0}),ie,Se;G==="fast"?(ie=L?function(fn){return S-1-fn}:H0.identity,Se=x?function(fn){return E-1-fn}:H0.identity):(ie=function(fn){return H0.constrain(Math.round(i.c2p(d[fn])-C),0,j)},Se=function(fn){return H0.constrain(Math.round(a.c2p(v[fn])-P),0,N)});var Le=Se(0),Ae=[Le,Le],Fe=L?0:1,Pe=x?0:1,ge=0,Re=0,ce=0,Ze=0,ut,pt,Zt,st,lt;function Gt(fn,yn){if(fn!==void 0){var Sn=me(fn);return Sn[0]=Math.round(Sn[0]),Sn[1]=Math.round(Sn[1]),Sn[2]=Math.round(Sn[2]),ge+=yn,Re+=Sn[0]*yn,ce+=Sn[1]*yn,Ze+=Sn[2]*yn,Sn}return[0,0,0,0]}function Nt(fn,yn,Sn,Ba){var ua=fn[Sn.bin0];if(ua===void 0)return Gt(void 0,1);var ma=fn[Sn.bin1],Wa=yn[Sn.bin0],Fa=yn[Sn.bin1],Wo=ma-ua||0,da=Wa-ua||0,Wn;return ma===void 0?Fa===void 0?Wn=0:Wa===void 0?Wn=2*(Fa-ua):Wn=(2*Fa-Wa-ua)*2/3:Fa===void 0?Wa===void 0?Wn=0:Wn=(2*ua-ma-Wa)*2/3:Wa===void 0?Wn=(2*Fa-ma-ua)*2/3:Wn=Fa+ua-ma-Wa,Gt(ua+Sn.frac*Wo+Ba.frac*(da+Sn.frac*Wn))}if(G!=="default"){var Jt=0,sr;try{sr=new Uint8Array(oe*_e*4)}catch(fn){sr=new Array(oe*_e*4)}if(G==="smooth"){var wr=_||d,cr=b||v,$e=new Array(wr.length),St=new Array(cr.length),Qt=new Array(j),Vt=_?Y_e:Z_e,_t=b?Y_e:Z_e,It,mt,er;for(z=0;zvr||vr>a._length))for(O=ke;Opi||pi>i._length)){var $r=kxt({x:ii,y:ar},u,e._fullLayout);$r.x=ii,$r.y=ar;var di=l.z[z][O];di===void 0?($r.z="",$r.zLabel=""):($r.z=di,$r.zLabel=Ext.tickText(je,di,"hover").text);var ji=l.text&&l.text[z]&&l.text[z][O];(ji===void 0||ji===!1)&&(ji=""),$r.text=ji;var In=H0.texttemplateString({data:[$r,u._meta],fallback:u.texttemplatefallback,labels:$r,locale:e._fullLayout._d3locale,template:Ge});if(In){var wi=In.split("
"),On=wi.length,qn=0;for(V=0;V{"use strict";exe.exports={min:"zmin",max:"zmax"}});var v8=ye((qur,txe)=>{"use strict";var zxt=Oa();txe.exports=function(t){zxt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var g8=ye((Bur,ixe)=>{"use strict";var rxe=vf(),S4=Dr(),p8=S4.isArrayOrTypedArray,Oxt=ho(),qxt=tc().extractOpts;ixe.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,v=s.xCenter,_=s.yCenter,b=s.zmask,p=l.zhoverformat,k=f,E=h,S,L,x,C;if(t.index!==!1){try{x=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(te){S4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=d[0].length||C<0||C>d.length)return}else{if(rxe.inbox(r-f[0],r-f[f.length-1],0)>0||rxe.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(k=[2*f[0]-f[1]],M=1;M{"use strict";nxe.exports={attributes:PT(),supplyDefaults:i_e(),calc:c8(),plot:d8(),colorbar:S_(),style:v8(),hoverPoints:g8(),moduleType:"trace",name:"heatmap",basePlotModule:ph(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var sxe=ye((Uur,oxe)=>{"use strict";oxe.exports=axe()});var tG=ye((Vur,lxe)=>{"use strict";lxe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var cxe=ye((Gur,uxe)=>{"use strict";uxe.exports={eventDataKeys:["binNumber"]}});var m8=ye((Hur,vxe)=>{"use strict";var Ip=Lm(),fxe=df().axisHoverFormat,{hovertemplateAttrs:Bxt,texttemplateAttrs:Nxt,templatefallbackAttrs:hxe}=Ll(),rG=ec(),dxe=tG(),Uxt=cxe(),iG=Ao().extendFlat;vxe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:fxe("x"),yhoverformat:fxe("y"),text:iG({},Ip.text,{}),hovertext:iG({},Ip.hovertext,{}),orientation:Ip.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:dxe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:dxe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:Bxt({},{keys:Uxt.eventDataKeys}),hovertemplatefallback:hxe(),texttemplate:Nxt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:hxe({editType:"plot"}),textposition:iG({},Ip.textposition,{arrayOk:!1}),textfont:rG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:rG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:rG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Ip.insidetextanchor,textangle:Ip.textangle,cliponaxis:Ip.cliponaxis,constraintext:Ip.constraintext,marker:Ip.marker,offsetgroup:Ip.offsetgroup,alignmentgroup:Ip.alignmentgroup,selected:Ip.selected,unselected:Ip.unselected,zorder:Ip.zorder}});var yxe=ye((jur,mxe)=>{"use strict";var pxe=qa(),M4=Dr(),gxe=ka(),Vxt=r0().handleText,Gxt=VI(),Hxt=m8();mxe.exports=function(t,r,n,i){function a(k,E){return M4.coerce(t,r,Hxt,k,E)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");Vxt(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",d=o&&s?Math.min(M4.minRowLength(o)&&M4.minRowLength(s)):M4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=pxe.getComponentMethod("calendars","handleTraceDefaults");v(t,r,["x","y"],i);var _=r[h];_&&a("histfunc"),a("histnorm"),a("autobin"+f),Gxt(t,r,a,n,i),M4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,p=pxe.getComponentMethod("errorbars","supplyDefaults");p(t,r,b||gxe.defaultLine,{axis:"y"}),p(t,r,b||gxe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var _8=ye((Wur,bxe)=>{"use strict";var E4=Dr(),jxt=hf(),y8=qa().traceIs,Wxt=Hb(),Xxt=r0().validateCornerradius,_xe=E4.nestedProperty,nG=Nb().getAxisGroup,xxe=[{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"}],Zxt=["x","y"];bxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(G,Z){return E4.coerce(s._input,s,s._module.attributes,G,Z)}function _(G){return G.orientation==="v"?"x":"y"}function b(G,Z){var j=jxt.getFromTrace({_fullLayout:r},G,Z);return j.type}function p(G,Z,j){var N=G.uid+"__"+j;Z||(Z=N);var H=b(G,j),te=G[j+"calendar"]||"",oe=n[Z],_e=!0;oe&&(H===oe.axType&&te===oe.calendar?(_e=!1,oe.traces.push(G),oe.dirs.push(j)):(Z=N,H!==oe.axType&&E4.warn(["Attempted to group the bins of trace",G.index,"set on a","type:"+H,"axis","with bins on","type:"+oe.axType,"axis."].join(" ")),te!==oe.calendar&&E4.warn(["Attempted to group the bins of trace",G.index,"set with a",te,"calendar","with bins",oe.calendar?"on a "+oe.calendar+" calendar":"w/o a set calendar"].join(" ")))),_e&&(n[Z]={traces:[G],dirs:[j],axType:H,calendar:G[j+"calendar"]||""}),G["_"+j+"bingroup"]=Z}for(f=0;f{"use strict";var Yxt=ET().hoverPoints,Kxt=ho().hoverLabelText;wxe.exports=function(t,r,n,i,a){var o=Yxt(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=Kxt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var aG=ye((Zur,Axe)=>{"use strict";Axe.exports=function(t,r,n,i,a){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(a)?i[0].pts[a[0]][a[1]]:i[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var s;if(n._indexToPoints){s=[];for(var l=0;l{"use strict";Sxe.exports={attributes:m8(),layoutAttributes:UI(),supplyDefaults:yxe(),crossTraceDefaults:_8(),supplyLayoutDefaults:SV(),calc:ZV().calc,crossTraceCalc:jb().crossTraceCalc,plot:n2().plot,layerName:"barlayer",style:N0().style,styleOnSelect:N0().styleOnSelect,colorbar:$d(),hoverPoints:Txe(),selectPoints:kT(),eventData:aG(),moduleType:"trace",name:"histogram",basePlotModule:ph(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var kxe=ye((Kur,Exe)=>{"use strict";Exe.exports=Mxe()});var b8=ye((Jur,Pxe)=>{"use strict";var Gg=m8(),Cxe=tG(),x8=PT(),Jxt=Gl(),oG=df().axisHoverFormat,{hovertemplateAttrs:$xt,texttemplateAttrs:Qxt,templatefallbackAttrs:Lxe}=Ll(),ebt=Tu(),k4=Ao().extendFlat;Pxe.exports=k4({x:Gg.x,y:Gg.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:Gg.histnorm,histfunc:Gg.histfunc,nbinsx:Gg.nbinsx,xbins:Cxe("x"),nbinsy:Gg.nbinsy,ybins:Cxe("y"),autobinx:Gg.autobinx,autobiny:Gg.autobiny,bingroup:k4({},Gg.bingroup,{}),xbingroup:k4({},Gg.bingroup,{}),ybingroup:k4({},Gg.bingroup,{}),xgap:x8.xgap,ygap:x8.ygap,zsmooth:x8.zsmooth,xhoverformat:oG("x"),yhoverformat:oG("y"),zhoverformat:oG("z",1),hovertemplate:$xt({},{keys:["z"]}),hovertemplatefallback:Lxe(),texttemplate:Qxt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:Lxe({editType:"plot"}),textfont:x8.textfont,showlegend:k4({},Jxt.showlegend,{dflt:!1})},ebt("",{cLetter:"z",autoColorDflt:!1}))});var sG=ye(($ur,Rxe)=>{"use strict";var tbt=qa(),Ixe=Dr();Rxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=Ixe.minRowLength(a),l=Ixe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=tbt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],i);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Fxe=ye((Qur,Dxe)=>{"use strict";var rbt=Dr(),ibt=sG(),nbt=UV(),abt=Qh(),obt=A4(),sbt=b8();Dxe.exports=function(t,r,n,i){function a(o,s){return rbt.coerce(t,r,sbt,o,s)}ibt(t,r,a,i),r.visible!==!1&&(nbt(t,r,a,i),abt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),obt(a,i),a("xhoverformat"),a("yhoverformat"))}});var qxe=ye((ecr,Oxe)=>{"use strict";var lbt=g8(),zxe=ho().hoverLabelText;Oxe.exports=function(t,r,n,i,a){var o=lbt(t,r,n,i,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=zxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=zxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var Nxe=ye((tcr,Bxe)=>{"use strict";Bxe.exports={attributes:b8(),supplyDefaults:Fxe(),crossTraceDefaults:_8(),calc:c8(),plot:d8(),layerName:"heatmaplayer",colorbar:S_(),style:v8(),hoverPoints:qxe(),eventData:aG(),moduleType:"trace",name:"histogram2d",basePlotModule:ph(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Vxe=ye((rcr,Uxe)=>{"use strict";Uxe.exports=Nxe()});var w8=ye((icr,Gxe)=>{"use strict";Gxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var C4=ye((ncr,Xxe)=>{"use strict";var mh=PT(),T8=pf(),jxe=df(),lG=jxe.axisHoverFormat,ubt=jxe.descriptionOnlyNumbers,cbt=Tu(),fbt=Pd().dash,hbt=ec(),zT=Ao().extendFlat,Wxe=w8(),dbt=Wxe.COMPARISON_OPS2,vbt=Wxe.INTERVAL_OPS,Hxe=T8.line;Xxe.exports=zT({z:mh.z,x:mh.x,x0:mh.x0,dx:mh.dx,y:mh.y,y0:mh.y0,dy:mh.dy,xperiod:mh.xperiod,yperiod:mh.yperiod,xperiod0:T8.xperiod0,yperiod0:T8.yperiod0,xperiodalignment:mh.xperiodalignment,yperiodalignment:mh.yperiodalignment,text:mh.text,hovertext:mh.hovertext,transpose:mh.transpose,xtype:mh.xtype,ytype:mh.ytype,xhoverformat:lG("x"),yhoverformat:lG("y"),zhoverformat:lG("z",1),hovertemplate:mh.hovertemplate,hovertemplatefallback:mh.hovertemplatefallback,texttemplate:zT({},mh.texttemplate,{}),texttemplatefallback:mh.texttemplatefallback,textfont:zT({},mh.textfont,{}),hoverongaps:mh.hoverongaps,connectgaps:zT({},mh.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:hbt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:ubt("contour label")},operation:{valType:"enumerated",values:[].concat(dbt).concat(vbt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:zT({},Hxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:fbt,smoothing:zT({},Hxe.smoothing,{}),editType:"plot"},zorder:T8.zorder},cbt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var cG=ye((acr,Yxe)=>{"use strict";var wv=b8(),Rm=C4(),pbt=Tu(),uG=df().axisHoverFormat,Zxe=Ao().extendFlat;Yxe.exports=Zxe({x:wv.x,y:wv.y,z:wv.z,marker:wv.marker,histnorm:wv.histnorm,histfunc:wv.histfunc,nbinsx:wv.nbinsx,xbins:wv.xbins,nbinsy:wv.nbinsy,ybins:wv.ybins,autobinx:wv.autobinx,autobiny:wv.autobiny,bingroup:wv.bingroup,xbingroup:wv.xbingroup,ybingroup:wv.ybingroup,autocontour:Rm.autocontour,ncontours:Rm.ncontours,contours:Rm.contours,line:{color:Rm.line.color,width:Zxe({},Rm.line.width,{dflt:.5}),dash:Rm.line.dash,smoothing:Rm.line.smoothing,editType:"plot"},xhoverformat:uG("x"),yhoverformat:uG("y"),zhoverformat:uG("z",1),hovertemplate:wv.hovertemplate,hovertemplatefallback:wv.hovertemplatefallback,texttemplate:Rm.texttemplate,texttemplatefallback:Rm.texttemplatefallback,textfont:Rm.textfont},pbt("",{cLetter:"z",editTypeOverride:"calc"}))});var A8=ye((ocr,Kxe)=>{"use strict";Kxe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var fG=ye((scr,Jxe)=>{"use strict";var gbt=Dr();Jxe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;gbt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var S8=ye((lcr,$xe)=>{"use strict";var mbt=Qh(),ybt=fG();$xe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,mbt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),ybt(n,i,l,a)}});var rbe=ye((ucr,tbe)=>{"use strict";var Qxe=Dr(),_bt=sG(),xbt=A8(),bbt=S8(),wbt=A4(),ebe=cG();tbe.exports=function(t,r,n,i){function a(s,l){return Qxe.coerce(t,r,ebe,s,l)}function o(s){return Qxe.coerce2(t,r,ebe,s)}_bt(t,r,a,i),r.visible!==!1&&(xbt(t,r,a,o),bbt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&wbt(a,i))}});var vG=ye((ccr,nbe)=>{"use strict";var dG=ho(),hG=Dr();nbe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=hG.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=hG.aggNums(Math.max,null,r));var o=ibe(i,a,t.ncontours);n.size=o.dtick,n.start=dG.tickFirst(o),o.range.reverse(),n.end=dG.tickFirst(o),n.start===i&&(n.start+=n.size),n.end===a&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),hG.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=ibe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function ibe(e,t,r){var n={type:"linear",range:[e,t]};return dG.autoTicks(n,(t-e)/(r||15)),n}});var L4=ye((fcr,abe)=>{"use strict";abe.exports=function(t){return t.end+t.size/1e6}});var pG=ye((hcr,sbe)=>{"use strict";var obe=tc(),Tbt=c8(),Abt=vG(),Sbt=L4();sbe.exports=function(t,r){var n=Tbt(t,r),i=n[0].z;Abt(r,i);var a=r.contours,o=obe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=Sbt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=i;return obe.calc(t,r,{vals:s,cLetter:"z"}),n}});var P4=ye((dcr,lbe)=>{"use strict";lbe.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}});var gG=ye((vcr,ube)=>{"use strict";var M8=P4();ube.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,l,u,c,f,h,d,v;for(s=0;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 n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var mG=ye((pcr,hbe)=>{"use strict";var E8=Dr(),OT=P4();hbe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=OT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=OT.SADDLEREMAINDER[o]):delete e.crossings[a],s=OT.NEWDELTA[o],!s){E8.log("Found bad marching index:",o,t,e.level);break}l.push(fbe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),I4(l[l.length-1],l[l.length-2],n,i)&&l.pop();var v=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),_=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(_||r&&v)break;o=e.crossings[a]}d===1e4&&E8.log("Infinite loop in contour?");var b=I4(l[0],l[l.length-1],n,i),p=0,k=.2*e.smoothing,E=[],S=0,L,x,C,M,g,P,T,z,O,V,G;for(d=1;d=S;d--)if(L=E[d],L=S&&L+E[x]z&&O--,e.edgepaths[O]=G.concat(l,V));break}H||(e.edgepaths[z]=l.concat(V))}for(z=0;z20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:OT.BOTTOMSTART.indexOf(e)!==-1?i=1:OT.LEFTSTART.indexOf(e)!==-1?n=1:OT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function fbe(e,t,r){var n=t[0]+Math.max(r[0],0),i=t[1]+Math.max(r[1],0),a=e.z[i][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[i][n+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[i],!0),n+l,i]}else{var c=(e.level-a)/(e.z[i+1][n]-a),f=(c!==1?(1-c)*s.c2l(e.y[i]):0)+(c!==0?c*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}}});var gbe=ye((gcr,pbe)=>{"use strict";var yG=w8(),Cbt=Eo();pbe.exports={"[]":dbe("[]"),"][":dbe("]["),">":_G(">"),"<":_G("<"),"=":_G("=")};function vbe(e,t){var r=Array.isArray(t),n;function i(a){return Cbt(a)?+a:null}return yG.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):yG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:yG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function dbe(e){return function(t){t=vbe(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function _G(e){return function(t){return t=vbe(e,t),{start:t,end:1/0,size:1/0}}}});var xG=ye((mcr,ybe)=>{"use strict";var mbe=Dr(),Lbt=gbe(),Pbt=L4();ybe.exports=function(t,r,n){for(var i=t.type==="constraint"?Lbt[t._operation](t.value):t,a=i.size,o=[],s=Pbt(i),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=i.start;c1e3){mbe.warn("Too many contours, clipping at 1000",t);break}return o}});var bG=ye((ycr,xbe)=>{"use strict";var qT=Dr();xbe.exports=function(e,t){var r,n,i,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&qT.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";bbe.exports=function(e,t){var r=e[0],n=r.z,i;switch(t.type){case"levels":var a=Math.min(n[0][0],n[0][1]);for(i=0;io.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(i=0;i":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hu&&(r.prefixBoundary=!0);break}break}}});var k8=ye(jv=>{"use strict";var D4=Oa(),zd=Dr(),qy=So(),Ibt=tc(),Abe=ru(),wbe=ho(),Tbe=ym(),Rbt=d8(),Sbe=gG(),Mbe=mG(),Dbt=xG(),Fbt=bG(),Ebe=wG(),R4=P4(),Dm=R4.LABELOPTIMIZER;jv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;zd.makeTraceGroups(i,n,"contour").each(function(s){var l=D4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=Dbt(d,r,u),_=zd.ensureSingle(l,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),Rbt(t,r,b,_),Sbe(v),Mbe(v);var p=a.c2p(f[0],!0),k=a.c2p(f[f.length-1],!0),E=o.c2p(h[0],!0),S=o.c2p(h[h.length-1],!0),L=[[p,S],[k,S],[k,E],[p,E]],x=v;d.type==="constraint"&&(x=Fbt(v,d._operation)),zbt(l,L,d),Obt(l,x,L,d),qbt(l,v,t,u,d),Nbt(l,r,t,u,L)})};function zbt(e,t,r){var n=zd.ensureSingle(e,"g","contourbg"),i=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function Obt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&Ebe(t,n);var o=zd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+kbe(l,r);u?D4.select(this).attr("d",u).style("stroke","none"):D4.select(this).remove()})}function kbe(e,t){var r="",n=0,i=e.edgepaths.map(function(p,k){return k}),a=!0,o,s,l,u,c,f;function h(p){return Math.abs(p[1]-t[0][1])<.01}function d(p){return Math.abs(p[1]-t[2][1])<.01}function v(p){return Math.abs(p[0]-t[0][0])<.01}function _(p){return Math.abs(p[0]-t[2][0])<.01}for(;i.length;){for(f=qy.smoothopen(e.edgepaths[n],e.smoothing),r+=a?f:f.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){zd.log("Missing end?",n,e);break}for(h(o)&&!_(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:_(o)&&(s=t[2]),c=0;c=0&&(s=b,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-b[1])<.01&&(b[0]-o[0])*(s[0]-b[0])>=0&&(s=b,u=c):zd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){zd.log("unclosed perimeter path");break}n=u,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;nDm.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Dm.MAXCOST)return c};function Bbt(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*i,c=Math.sin(l)*i,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=Dm.EDGECOST*(1/(f-1)+1/(h-1));d+=Dm.ANGLECOST*l*l;for(var v=o-u,_=s-c,b=o+u,p=s+c,k=0;k{"use strict";var Vbt=Oa(),TG=tc(),Gbt=L4();Cbe.exports=function(t){var r=t.contours,n=r.start,i=Gbt(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,l=TG.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?TG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,_=l.min,b=l.max;if(r.coloring==="heatmap"){for(v=0;v=b)&&(n<=_&&(n=_),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;v_&&(f.unshift(_),h.unshift(h[0])),f[f.length-1]{"use strict";var C8=Oa(),Lbe=So(),Hbt=v8(),jbt=AG();Pbe.exports=function(t){var r=C8.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=C8.select(this),a=n[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",d=f||h?jbt(a):null;i.selectAll("g.contourlevel").each(function(b){C8.select(this).selectAll("path").call(Lbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){Lbe.font(C8.select(this),{weight:v.weight,style:v.style,variant:v.variant,textcase:v.textcase,lineposition:v.lineposition,shadow:v.shadow,family:v.family,size:v.size,color:v.color||(f?d(b.level):s.color)})}),c)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var _;i.selectAll("g.contourfill path").style("fill",function(b){return _===void 0&&(_=b.level),d(b.level+.5*l)}),_===void 0&&(_=u),i.selectAll("g.contourbg path").style("fill",d(_-.5*l))}}),Hbt(t)}});var P8=ye((Tcr,Rbe)=>{"use strict";var Ibe=tc(),Wbt=AG(),Xbt=L4();function Zbt(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=Wbt(t,{isColorbar:!0});if(o==="heatmap"){var l=Ibe.extractOpts(t);r._fillgradient=l.reversescale?Ibe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:i.color,width:n.showlines!==!1?i.width:0,dash:i.dash},r._levels={start:n.start,end:Xbt(n),size:a}}Rbe.exports={min:"zmin",max:"zmax",calc:Zbt}});var SG=ye((Acr,Dbe)=>{"use strict";var I8=ka(),Ybt=g8();Dbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=Ybt(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&I8.opacity(l.fillcolor)?s.color=I8.addOpacity(l.fillcolor,1):l.contours.showlines&&I8.opacity(l.line.color)&&(s.color=I8.addOpacity(l.line.color,1)))}),o}});var zbe=ye((Scr,Fbe)=>{"use strict";Fbe.exports={attributes:cG(),supplyDefaults:rbe(),crossTraceDefaults:_8(),calc:pG(),plot:k8().plot,layerName:"contourlayer",style:L8(),colorbar:P8(),hoverPoints:SG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:ph(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var qbe=ye((Mcr,Obe)=>{"use strict";Obe.exports=zbe()});var MG=ye((Ecr,Hbe)=>{"use strict";var Bbe=Eo(),Kbt=fG(),Vbe=ka(),Nbe=Vbe.addOpacity,Jbt=Vbe.opacity,Gbe=w8(),Ube=Dr().isArrayOrTypedArray,$bt=Gbe.CONSTRAINT_REDUCTION,Qbt=Gbe.COMPARISON_OPS2;Hbe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=$bt[f],e2t(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",Nbe((t.line||{}).color||a,.5))),l){var h=c&&Jbt(c)?Nbe(r.fillcolor,1):a;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),Kbt(n,i,u,o)};function e2t(e,t){var r;Qbt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Ube(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])]:Bbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),Bbe(t.value)||(Ube(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var Xbe=ye((kcr,Wbe)=>{"use strict";var EG=Dr(),t2t=e8(),r2t=Ig(),i2t=MG(),n2t=A8(),a2t=S8(),o2t=A4(),jbe=C4();Wbe.exports=function(t,r,n,i){function a(u,c){return EG.coerce(t,r,jbe,u,c)}function o(u){return EG.coerce2(t,r,jbe,u)}var s=t2t(t,r,a,i);if(!s){r.visible=!1;return}r2t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",EG.isArray1D(r.z)),l?i2t(t,r,a,i,n):(n2t(t,r,a,o),a2t(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&o2t(a,i),a("zorder")}});var Ybe=ye((Ccr,Zbe)=>{"use strict";Zbe.exports={attributes:C4(),supplyDefaults:Xbe(),calc:pG(),plot:k8().plot,style:L8(),colorbar:P8(),hoverPoints:SG(),moduleType:"trace",name:"contour",basePlotModule:ph(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var Jbe=ye((Lcr,Kbe)=>{"use strict";Kbe.exports=Ybe()});var kG=ye((Pcr,e2e)=>{"use strict";var{hovertemplateAttrs:s2t,texttemplateAttrs:l2t,templatefallbackAttrs:$be}=Ll(),u2t=Cg(),a0=pf(),c2t=Gl(),Qbe=Tu(),f2t=Pd().dash,M_=Ao().extendFlat,j0=a0.marker,F4=a0.line,h2t=j0.line;e2e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:M_({},a0.mode,{dflt:"markers"}),text:M_({},a0.text,{}),texttemplate:l2t({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:$be({editType:"plot"}),hovertext:M_({},a0.hovertext,{}),line:{color:F4.color,width:F4.width,dash:f2t,backoff:F4.backoff,shape:M_({},F4.shape,{values:["linear","spline"]}),smoothing:F4.smoothing,editType:"calc"},connectgaps:a0.connectgaps,cliponaxis:a0.cliponaxis,fill:M_({},a0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:u2t(),marker:M_({symbol:j0.symbol,opacity:j0.opacity,angle:j0.angle,angleref:j0.angleref,standoff:j0.standoff,maxdisplayed:j0.maxdisplayed,size:j0.size,sizeref:j0.sizeref,sizemin:j0.sizemin,sizemode:j0.sizemode,line:M_({width:h2t.width,editType:"calc"},Qbe("marker.line")),gradient:j0.gradient,editType:"calc"},Qbe("marker")),textfont:a0.textfont,textposition:a0.textposition,selected:a0.selected,unselected:a0.unselected,hoverinfo:M_({},c2t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a0.hoveron,hovertemplate:s2t(),hovertemplatefallback:$be()}});var n2e=ye((Icr,i2e)=>{"use strict";var t2e=Dr(),d2t=Sm(),BT=Ru(),v2t=$p(),p2t=R0(),r2e=tT(),g2t=D0(),m2t=Rg(),y2t=kG();i2e.exports=function(t,r,n,i){function a(h,d){return t2e.coerce(t,r,y2t,h,d)}var o=a("a"),s=a("b"),l=a("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u{"use strict";var CG=ho();a2e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=CG.tickText(a.aaxis,t.a,!0).text,i.bLabel=CG.tickText(a.baxis,t.b,!0).text,i.cLabel=CG.tickText(a.caxis,t.c,!0).text,i}});var c2e=ye((Dcr,u2e)=>{"use strict";var LG=Eo(),_2t=F0(),x2t=km(),b2t=z0(),w2t=O0().calcMarkerSize,s2e=["a","b","c"],l2e={a:["b","c"],b:["a","c"],c:["a","b"]};u2e.exports=function(t,r){var n=t._fullLayout[r.subplot],i=n.sum,a=r.sum||i,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l{"use strict";var T2t=sT();f2e.exports=function(t,r,n){var i=r.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var A2t=fT();d2e.exports=function(t,r,n,i){var a=A2t(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[h.subplot]={_subplot:d};var _=h._module.formatLabels(f,h,v);o.aLabel=_.aLabel,o.bLabel=_.bLabel,o.cLabel=_.cLabel;var b=f.hi||h.hoverinfo,p=[];function k(S,L){p.push(S._hovertitle+": "+L)}if(!h.hovertemplate){var E=b.split("+");E.indexOf("all")!==-1&&(E=["a","b","c"]),E.indexOf("a")!==-1&&k(d.aaxis,o.aLabel),E.indexOf("b")!==-1&&k(d.baxis,o.bLabel),E.indexOf("c")!==-1&&k(d.caxis,o.cLabel)}return o.extraText=p.join("
"),o.hovertemplate=h.hovertemplate,a}});var g2e=ye((Ocr,p2e)=>{"use strict";p2e.exports=function(t,r,n,i,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i[a]){var o=i[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var E2e=ye((qcr,M2e)=>{"use strict";var w2e=Oa(),S2t=cd(),PG=qa(),By=Dr(),Fm=By.strTranslate,R8=By._,UT=ka(),D8=So(),z4=ym(),IG=Ao().extendFlat,M2t=Mc(),E_=ho(),m2e=yv(),y2e=vf(),T2e=Eg(),_2e=T2e.freeMode,E2t=T2e.rectMode,RG=Eb(),k2t=Of().prepSelect,C2t=Of().selectOnClick,L2t=Of().clearOutline,P2t=Of().clearSelectionsCache,A2e=hd();function S2e(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}M2e.exports=S2e;var zm=S2e.prototype;zm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};zm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aNT*u?(p=u,b=p*NT):(b=l,p=b/NT),k=o*b/l,E=s*p/u,v=t.l+t.w*i-b/2,_=t.t+t.h*(1-a)-p/2,r.x0=v,r.y0=_,r.w=b,r.h=p,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[i-k/2,i+k/2],_id:"x"},z4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(V){return V.a>=r.aaxis.range[0]&&V.a<=r.aaxis.range[1]&&V.b>=r.baxis.range[1]&&V.b<=r.baxis.range[0]&&V.c>=r.caxis.range[1]&&V.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-d],domain:[a-E/2,a+E/2],_id:"y"},z4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var S=r.yaxis.domain[0],L=r.aaxis=IG({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[S,S+E*NT],anchor:"free",position:0,_id:"y",_length:b});z4(L,r.graphDiv._fullLayout),L.setScale();var x=r.baxis=IG({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});z4(x,r.graphDiv._fullLayout),x.setScale();var C=r.caxis=IG({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[S,S+E*NT],anchor:"free",position:0,_id:"y",_length:b});z4(C,r.graphDiv._fullLayout),C.setScale();var M="M"+v+","+(_+p)+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDef.select("path").attr("d",M),r.layers.plotbg.select("path").attr("d",M);var g="M0,"+p+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDefRelative.select("path").attr("d",g);var P=Fm(v,_);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),r.clipDefRelative.select("path").attr("transform",null);var T=Fm(v-x._offset,_+p);r.layers.baxis.attr("transform",T),r.layers.bgrid.attr("transform",T);var z=Fm(v+b/2,_)+"rotate(30)"+Fm(0,-L._offset);r.layers.aaxis.attr("transform",z),r.layers.agrid.attr("transform",z);var O=Fm(v+b/2,_)+"rotate(-30)"+Fm(0,-C._offset);r.layers.caxis.attr("transform",O),r.layers.cgrid.attr("transform",O),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+v+","+(_+p)+"l"+b/2+",-"+p:"M0,0").call(UT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+v+","+(_+p)+"h"+b:"M0,0").call(UT.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(v+b/2)+","+_+"l"+b/2+","+p:"M0,0").call(UT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),D8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};zm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=RG.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:R8(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=RG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:R8(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),i["c-title"]=RG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:R8(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"}})}};zm.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),a=e._id,o=t.layers[n],s=30,l=i+"tickLayout",u=I2t(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=E_.calcTicks(e),f=E_.clipEnds(e,c),h=E_.makeTransTickFn(e),d=E_.getTickSigns(e)[2],v=By.deg2rad(s),_=d*(e.linewidth||1)/2,b=d*e.ticklen,p=t.w,k=t.h,E=i==="b"?"M0,"+_+"l"+Math.sin(v)*b+","+Math.cos(v)*b:"M"+_+",0l"+Math.cos(v)*b+","+-Math.sin(v)*b,S={a:"M0,0l"+k+",-"+p/2,b:"M0,0l-"+p/2+",-"+k,c:"M0,0l-"+k+","+p/2}[i];E_.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:E,transFn:h,crisp:!1}),E_.drawGrid(r,e,{vals:f,layer:t.layers[i+"grid"],path:S,transFn:h,crisp:!1}),E_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:E_.makeLabelFns(e,0,s)})};function I2t(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var yd=A2e.MINZOOM/2+.87,R2t="m-0.87,.5h"+yd+"v3h-"+(yd+5.2)+"l"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l2.6,1.5l-"+yd/2+","+yd*.87+"Z",D2t="m0.87,.5h-"+yd+"v3h"+(yd+5.2)+"l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-2.6,1.5l"+yd/2+","+yd*.87+"Z",F2t="m0,1l"+yd/2+","+yd*.87+"l2.6,-1.5l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-"+(yd/2+2.6)+","+(yd*.87+4.5)+"l2.6,1.5l"+yd/2+",-"+yd*.87+"Z",z2t="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",x2e=!0;zm.clearOutline=function(){P2t(this.dragOptions),L2t(this.dragOptions.gd)};zm.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,i,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(T,z,O){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var V=e.dragOptions.dragmode=r._fullLayout.dragmode;_2e(V)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,V==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=p,e.dragOptions.doneFn=C,k(T,z,O)):V==="pan"?(e.dragOptions.moveFn=g,e.dragOptions.clickFn=p,e.dragOptions.doneFn=P,M(),e.clearOutline(r)):(E2t(V)||_2e(V))&&k2t(T,z,O,e.dragOptions,V)}};var o,s,l,u,c,f,h,d,v,_;function b(T){var z={};return z[e.id+".aaxis.min"]=T.a,z[e.id+".baxis.min"]=T.b,z[e.id+".caxis.min"]=T.c,z}function p(T,z){var O=r._fullLayout.clickmode;b2e(r),T===2&&(r.emit("plotly_doubleclick",null),PG.call("_guiRelayout",r,b({a:0,b:0,c:0}))),O.indexOf("select")>-1&&T===1&&C2t(z,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),O.indexOf("event")>-1&&y2e.click(r,z,e.id)}function k(T,z,O){var V=t.getBoundingClientRect();o=z-V.left,s=O-V.top,r._fullLayout._calcInverseTransform(r);var G=r._fullLayout._invTransform,Z=By.apply3DTransform(G)(o,s);o=Z[0],s=Z[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=S2t(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,v=n.append("path").attr("class","zoombox").attr("transform",Fm(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),_=n.append("path").attr("class","zoombox-corners").attr("transform",Fm(e.x0,e.y0)).style({fill:UT.background,stroke:UT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function E(T,z){return 1-z/e.h}function S(T,z){return 1-(T+(e.h-z)/Math.sqrt(3))/e.w}function L(T,z){return(T-(e.h-z)/Math.sqrt(3))/e.w}function x(T,z){var O=o+T*i,V=s+z*a,G=Math.max(0,Math.min(1,E(o,s),E(O,V))),Z=Math.max(0,Math.min(1,S(o,s),S(O,V))),j=Math.max(0,Math.min(1,L(o,s),L(O,V))),N=(G/2+j)*e.w,H=(1-G/2-Z)*e.w,te=(N+H)/2,oe=H-N,_e=(1-G)*e.h,Ee=_e-oe/NT;oe.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(c))}function C(){b2e(r),c!==l&&(PG.call("_guiRelayout",r,b(c)),x2e&&r.data&&r._context.showTips&&(By.notifier(R8(r,"Double-click to zoom back out"),"long"),x2e=!1))}function M(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function g(T,z){var O=T/e.xaxis._m,V=z/e.yaxis._m;c={a:l.a-V,b:l.b+(O+V)/2,c:l.c-(O-V)/2};var G=[c.a,c.b,c.c].sort(By.sorterAsc),Z={a:G.indexOf(c.a),b:G.indexOf(c.b),c:G.indexOf(c.c)};G[0]<0&&(G[1]+G[0]/2<0?(G[2]+=G[0]+G[1],G[0]=G[1]=0):(G[2]+=G[0]/2,G[1]+=G[0]/2,G[0]=0),c={a:G[Z.a],b:G[Z.b],c:G[Z.c]},z=(l.a-c.a)*e.yaxis._m,T=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=Fm(e.x0+T,e.y0+z);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var N=Fm(-T,-z);e.clipDefRelative.select("path").attr("transform",N),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(D8.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(c))}function P(){PG.call("_guiRelayout",r,b(c))}t.onmousemove=function(T){y2e.hover(r,T,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(T){r._dragging||m2e.unhover(r,T)},m2e.init(this.dragOptions)};function b2e(e){w2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var zG=ye((Bcr,k2e)=>{"use strict";var O2t=Lh(),q2t=Cc().attributes,su=Rd(),B2t=mc().overrideAll,DG=Ao().extendFlat,FG={title:{text:su.title.text,font:su.title.font},color:su.color,tickmode:su.minor.tickmode,nticks:DG({},su.nticks,{dflt:6,min:1}),tick0:su.tick0,dtick:su.dtick,tickvals:su.tickvals,ticktext:su.ticktext,ticks:su.ticks,ticklen:su.ticklen,tickwidth:su.tickwidth,tickcolor:su.tickcolor,ticklabelstep:su.ticklabelstep,showticklabels:su.showticklabels,labelalias:su.labelalias,showtickprefix:su.showtickprefix,tickprefix:su.tickprefix,showticksuffix:su.showticksuffix,ticksuffix:su.ticksuffix,showexponent:su.showexponent,exponentformat:su.exponentformat,minexponent:su.minexponent,separatethousands:su.separatethousands,tickfont:su.tickfont,tickangle:su.tickangle,tickformat:su.tickformat,tickformatstops:su.tickformatstops,hoverformat:su.hoverformat,showline:DG({},su.showline,{dflt:!0}),linecolor:su.linecolor,linewidth:su.linewidth,showgrid:DG({},su.showgrid,{dflt:!0}),gridcolor:su.gridcolor,gridwidth:su.gridwidth,griddash:su.griddash,layer:su.layer,min:{valType:"number",dflt:0,min:0}},F8=k2e.exports=B2t({domain:q2t({name:"ternary"}),bgcolor:{valType:"color",dflt:O2t.background},sum:{valType:"number",dflt:1,min:0},aaxis:FG,baxis:FG,caxis:FG},"plot","from-root");F8.uirevision={valType:"any",editType:"none"};F8.aaxis.uirevision=F8.baxis.uirevision=F8.caxis.uirevision={valType:"any",editType:"none"}});var k_=ye((Ncr,C2e)=>{"use strict";var N2t=Dr(),U2t=vl(),V2t=Cc().defaults;C2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,l=i.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,d;function v(k,E){return N2t.coerce(h,d,o,k,E)}for(var _=0;_{"use strict";var G2t=ka(),H2t=vl(),z8=Dr(),j2t=k_(),W2t=e_(),X2t=t_(),Z2t=M3(),Y2t=bb(),K2t=t4(),P2e=zG(),L2e=["aaxis","baxis","caxis"];I2e.exports=function(t,r,n){j2t(t,r,n,{type:"ternary",attributes:P2e,handleDefaults:J2t,font:r.font,paper_bgcolor:r.paper_bgcolor})};function J2t(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=G2t.combine(i,n.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 $2t(e,t,r,n){var i=P2e[t._name];function a(d,v){return z8.coerce(e,t,i,d,v)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=a("title.text",c);t._hovertitle=f===c?f:u,z8.coerceFont(a,"title.font",r.font,{overrideDflt:{size:z8.bigFont(r.font.size),color:s}}),a("min"),Y2t(e,t,a,"linear"),X2t(e,t,a,"linear"),W2t(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),Z2t(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(z8.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),K2t(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var D2e=ye(W0=>{"use strict";var Q2t=E2e(),ewt=Id().getSubplotCalcData,twt=Dr().counterRegex,VT="ternary";W0.name=VT;var rwt=W0.attr="subplot";W0.idRoot=VT;W0.idRegex=W0.attrRegex=twt(VT);var iwt=W0.attributes={};iwt[rwt]={valType:"subplotid",dflt:"ternary",editType:"calc"};W0.layoutAttributes=zG();W0.supplyLayoutDefaults=R2e();W0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[VT],a=0;a{"use strict";F2e.exports={attributes:kG(),supplyDefaults:n2e(),colorbar:$d(),formatLabels:o2e(),calc:c2e(),plot:h2e(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:v2e(),selectPoints:hT(),eventData:g2e(),moduleType:"trace",name:"scatterternary",basePlotModule:D2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var q2e=ye((Hcr,O2e)=>{"use strict";O2e.exports=z2e()});var OG=ye((jcr,N2e)=>{"use strict";var Fh=x4(),GT=Ao().extendFlat,B2e=df().axisHoverFormat;N2e.exports={y:Fh.y,x:Fh.x,x0:Fh.x0,y0:Fh.y0,xhoverformat:B2e("x"),yhoverformat:B2e("y"),name:GT({},Fh.name,{}),orientation:GT({},Fh.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:Fh.fillcolor,points:GT({},Fh.boxpoints,{}),jitter:GT({},Fh.jitter,{}),pointpos:GT({},Fh.pointpos,{}),width:GT({},Fh.width,{}),marker:Fh.marker,text:Fh.text,hovertext:Fh.hovertext,hovertemplate:Fh.hovertemplate,hovertemplatefallback:Fh.hovertemplatefallback,quartilemethod:Fh.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:Fh.offsetgroup,alignmentgroup:Fh.alignmentgroup,selected:Fh.selected,unselected:Fh.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:Fh.zorder}});var NG=ye((Wcr,U2e)=>{"use strict";var qG=b4(),BG=Dr().extendFlat;U2e.exports={violinmode:BG({},qG.boxmode,{}),violingap:BG({},qG.boxgap,{}),violingroupgap:BG({},qG.boxgroupgap,{})}});var W2e=ye((Xcr,j2e)=>{"use strict";var V2e=Dr(),nwt=ka(),G2e=T4(),H2e=OG();j2e.exports=function(t,r,n,i){function a(L,x){return V2e.coerce(t,r,H2e,L,x)}function o(L,x){return V2e.coerce2(t,r,H2e,L,x)}if(G2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||n),f=a("line.width"),h=a("fillcolor",nwt.addOpacity(r.line.color,.5));G2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),v=o("box.fillcolor",h),_=o("box.line.color",c),b=o("box.line.width",f),p=a("box.visible",!!(d||v||_||b));p||(r.box={visible:!1});var k=o("meanline.color",c),E=o("meanline.width",f),S=a("meanline.visible",!!(k||E));S||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var Z2e=ye((Zcr,X2e)=>{"use strict";var awt=Dr(),owt=NG(),swt=ZI();X2e.exports=function(t,r,n){function i(a,o){return awt.coerce(t,r,owt,a,o)}swt._supply(t,r,n,i,"violin")}});var O8=ye(s2=>{"use strict";var lwt=Dr(),uwt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};s2.makeKDE=function(e,t,r){var n=r.length,i=uwt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u{"use strict";var UG=Dr(),VG=ho(),cwt=RV(),Y2e=O8(),fwt=fs().BADNUM;K2e.exports=function(t,r){var n=cwt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=VG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var pwt=KI().setPositionOffset,$2e=["v","h"];Q2e.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o<$2e.length;o++){for(var s=$2e[o],l=s==="h"?a:i,u=[],c=0;c{"use strict";var GG=Oa(),HG=Dr(),gwt=So(),jG=JI(),mwt=yU(),ywt=O8();twe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=mwt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return gwt.smoothopen(h[0],1)}HG.makeTraceGroups(i,n,"trace violins").each(function(c){var f=GG.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var _=d.bPos,b=d.bdPos,p=r[d.valLetter+"axis"],k=r[d.posLetter+"axis"],E=v.side==="both",S=E||v.side==="positive",L=E||v.side==="negative",x=f.selectAll("path.violin").data(HG.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(V){var G=GG.select(this),Z=V.density,j=Z.length,N=k.c2l(V.pos+_,!0),H=k.l2p(N),te;if(v.width)te=d.maxKDE/b;else{var oe=o._violinScaleGroupStats[v.scalegroup];te=v.scalemode==="count"?oe.maxKDE/b*(oe.maxCount/V.pts.length):oe.maxKDE/b}var _e,Ee,Ce,me,ie,Se,Le;if(S){for(Se=new Array(j),me=0;me{"use strict";var iwe=Oa(),HT=ka(),_wt=op().stylePoints;nwe.exports=function(t){var r=iwe.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=n[0].trace,a=iwe.select(this),o=i.box||{},s=o.line||{},l=i.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(HT.stroke,i.line.color).call(HT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(HT.stroke,s.color).call(HT.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(HT.stroke,l.color),a.selectAll("path.meanline").style(c).call(HT.stroke,l.color),_wt(a,i,t)})}});var uwe=ye((efr,lwe)=>{"use strict";var xwt=ka(),WG=Dr(),bwt=ho(),owe=qV(),swe=O8();lwe.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],d,v;if(c||f){var _=owe.hoverOnBoxes(t,r,n,i);if(f&&_.length>0){var b=t.xa,p=t.ya,k,E,S,L,x;l.orientation==="h"?(x=r,k="y",S=p,E="x",L=b):(x=n,k="x",S=b,E="y",L=p);var C=s[t.index];if(x>=C.span[0]&&x<=C.span[1]){var M=WG.extendFlat({},t),g=L.c2p(x,!0),P=swe.getKdeValue(C,l,x),T=swe.getPositionOnKdePath(C,l,g),z=S._offset,O=S._length;M[k+"0"]=T[0],M[k+"1"]=T[1],M[E+"0"]=M[E+"1"]=g,M[E+"Label"]=E+": "+bwt.hoverLabelText(L,x,l[E+"hoverformat"])+", "+s[0].t.labels.kde+" "+P.toFixed(3);for(var V=0,G=0;G<_.length;G++)if(_[G].attr==="med"){V=G;break}M.spikeDistance=_[V].spikeDistance;var Z=k+"Spike";M[Z]=_[V][Z],_[V].spikeDistance=void 0,_[V][Z]=void 0,M.hovertemplate=!1,h.push(M),v={},v[k+"1"]=WG.constrain(z+T[0],z,z+O),v[k+"2"]=WG.constrain(z+T[1],z,z+O),v[E+"1"]=v[E+"2"]=L._offset+g}}c&&(h=h.concat(_))}u.indexOf("points")!==-1&&(d=owe.hoverOnPoints(t,r,n));var j=o.selectAll(".violinline-"+l.uid).data(v?[0]:[]);return j.enter().append("line").classed("violinline-"+l.uid,!0).attr("stroke-width",1.5),j.exit().remove(),j.attr(v).call(xwt.stroke,t.color),i==="closest"?d?[d]:h:(d&&h.push(d),h)}});var fwe=ye((tfr,cwe)=>{"use strict";cwe.exports={attributes:OG(),layoutAttributes:NG(),supplyDefaults:W2e(),crossTraceDefaults:T4().crossTraceDefaults,supplyLayoutDefaults:Z2e(),calc:J2e(),crossTraceCalc:ewe(),plot:rwe(),style:awe(),styleOnSelect:op().styleOnSelect,hoverPoints:uwe(),selectPoints:BV(),moduleType:"trace",name:"violin",basePlotModule:ph(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var dwe=ye((rfr,hwe)=>{"use strict";hwe.exports=fwe()});var pwe=ye((ifr,vwe)=>{"use strict";vwe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var ZG=ye((nfr,_we)=>{"use strict";var jc=Lm(),XG=pf().line,wwt=Gl(),gwe=df().axisHoverFormat,{hovertemplateAttrs:Twt,texttemplateAttrs:Awt,templatefallbackAttrs:mwe}=Ll(),ywe=pwe(),Ny=Ao().extendFlat,Swt=ka();_we.exports={x:jc.x,x0:jc.x0,dx:jc.dx,y:jc.y,y0:jc.y0,dy:jc.dy,xperiod:jc.xperiod,yperiod:jc.yperiod,xperiod0:jc.xperiod0,yperiod0:jc.yperiod0,xperiodalignment:jc.xperiodalignment,yperiodalignment:jc.yperiodalignment,xhoverformat:gwe("x"),yhoverformat:gwe("y"),hovertext:jc.hovertext,hovertemplate:Twt({},{keys:ywe.eventDataKeys}),hovertemplatefallback:mwe(),hoverinfo:Ny({},wwt.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:Awt({editType:"plot"},{keys:ywe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:mwe({editType:"plot"}),text:jc.text,textposition:jc.textposition,insidetextanchor:Ny({},jc.insidetextanchor,{dflt:"middle"}),textangle:Ny({},jc.textangle,{dflt:0}),textfont:jc.textfont,insidetextfont:jc.insidetextfont,outsidetextfont:jc.outsidetextfont,constraintext:jc.constraintext,cliponaxis:jc.cliponaxis,orientation:Ny({},jc.orientation,{}),offset:Ny({},jc.offset,{arrayOk:!1}),width:Ny({},jc.width,{arrayOk:!1}),marker:Mwt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ny({},XG.color,{dflt:Swt.defaultLine}),width:Ny({},XG.width,{dflt:0,editType:"plot"}),dash:XG.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:jc.offsetgroup,alignmentgroup:jc.alignmentgroup,zorder:jc.zorder};function Mwt(){var e=Ny({},jc.marker);return delete e.pattern,delete e.cornerradius,e}});var YG=ye((afr,xwe)=>{"use strict";xwe.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 JG=ye((ofr,wwe)=>{"use strict";var q8=Dr(),Ewt=Hb(),kwt=r0().handleText,Cwt=eT(),Lwt=Ig(),bwe=ZG(),KG=ka();function Pwt(e,t,r,n){function i(f,h){return q8.coerce(e,t,bwe,f,h)}var a=Cwt(e,t,n,i);if(!a){t.visible=!1;return}Lwt(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("orientation",t.y&&!t.x?"v":"h"),i("offset"),i("width");var o=i("text");i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var s=i("textposition");kwt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",q8.isArrayOrTypedArray(o)?"text+value":"value");var l=i("marker.color",r);i("marker.line.color",KG.defaultLine),i("marker.line.width");var u=i("connector.visible");if(u){i("connector.fillcolor",Iwt(l));var c=i("connector.line.width");c&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function Iwt(e){var t=q8.isArrayOrTypedArray(e)?"#000":e;return KG.addOpacity(t,.5*KG.opacity(t))}function Rwt(e,t){var r,n;function i(o){return q8.coerce(n._input,n,bwe,o)}for(var a=0;a{"use strict";var Dwt=Dr(),Fwt=YG();Twe.exports=function(e,t,r){var n=!1;function i(s,l){return Dwt.coerce(e,t,Fwt,s,l)}for(var a=0;a{"use strict";var jT=Dr();Swe.exports=function(t,r){for(var n=0;n{"use strict";var Ewe=ho(),kwe=Dg(),zwt=Mwe(),Owt=z0(),O4=fs().BADNUM;Cwe.exports=function(t,r){var n=Ewe.getFromId(t,r.xaxis||"x"),i=Ewe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=kwe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=kwe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var d=Math.min(o.length,a.length),v=new Array(d);for(r._base=[],f=0;f{"use strict";var Pwe=jb().setGroupPositions;Iwe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var B8=Oa(),L_=Dr(),Dwe=So(),C_=fs().BADNUM,qwt=n2(),Bwt=bv().clearMinTextSize;zwe.exports=function(t,r,n,i){var a=t._fullLayout;Bwt("funnel",a),Nwt(t,r,n,i),Uwt(t,r,n,i),qwt.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function Nwt(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=B8.select(this),l=o[0].trace,u=L_.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(L_.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var _=Fwe(d,i,a,c),b=_[0],p=_[1],k="";b[0]!==C_&&p[0]!==C_&&b[1]!==C_&&p[1]!==C_&&b[2]!==C_&&p[2]!==C_&&b[3]!==C_&&p[3]!==C_&&(c?k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2]+"H"+b[3]+"L"+b[1]+","+p[1]+"Z":k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3]+"V"+p[2]+"L"+b[1]+","+p[0]+"Z"),k===""&&(k="M0,0Z"),L_.ensureSingle(B8.select(this),"path").attr("d",k).call(Dwe.setClipUrl,t.layerClipId,e)}})})}function Uwt(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=B8.select(this),l=o[0].trace,u=L_.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(L_.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var _=Fwe(d,i,a,c),b=_[0],p=_[1],k="";b[3]!==void 0&&p[3]!==void 0&&(c?(k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2],k+="M"+b[1]+","+p[1]+"L"+b[3]+","+p[2]):(k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3],k+="M"+b[1]+","+p[0]+"L"+b[2]+","+p[2])),k===""&&(k="M0,0Z"),L_.ensureSingle(B8.select(this),"path").attr("d",k).call(Dwe.setClipUrl,t.layerClipId,e)}})})}function Fwe(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),n?[i,a]:[a,i]}});var Nwe=ye((hfr,Bwe)=>{"use strict";var q4=Oa(),qwe=So(),QG=ka(),Vwt=N1().DESELECTDIM,Gwt=N0(),Hwt=bv().resizeText,jwt=Gwt.styleTextPoints;function Wwt(e,t,r){var n=r||q4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");Hwt(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=q4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;q4.select(this).call(QG.fill,s.mc||l.color).call(QG.stroke,s.mlc||l.line.color).call(qwe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?Vwt:1)}}),jwt(a,o,e),a.selectAll(".regions").each(function(){q4.select(this).selectAll("path").style("stroke-width",0).call(QG.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;qwe.lineGroupStyle(q4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}Bwe.exports={style:Wwt}});var Gwe=ye((dfr,Vwe)=>{"use strict";var Uwe=ka().opacity,Xwt=ET().hoverOnBars,eH=Dr().formatPercent;Vwe.exports=function(t,r,n,i,a){var o=Xwt(t,r,n,i,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=eH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=eH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=eH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!=="none"&&d!=="skip"){var _=d==="all",b=d.split("+"),p=function(k){return _||b.indexOf(k)!==-1};p("percent initial")&&v.push(o.percentInitialLabel+" of initial"),p("percent previous")&&v.push(o.percentPreviousLabel+" of previous"),p("percent total")&&v.push(o.percentTotalLabel+" of total")}return o.extraText=v.join("
"),o.color=Zwt(l,f),[o]}};function Zwt(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Uwe(n))return n;if(Uwe(i)&&a)return i}});var jwe=ye((vfr,Hwe)=>{"use strict";Hwe.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 Xwe=ye((pfr,Wwe)=>{"use strict";Wwe.exports={attributes:ZG(),layoutAttributes:YG(),supplyDefaults:JG().supplyDefaults,crossTraceDefaults:JG().crossTraceDefaults,supplyLayoutDefaults:Awe(),calc:Lwe(),crossTraceCalc:Rwe(),plot:Owe(),style:Nwe().style,hoverPoints:Gwe(),eventData:jwe(),selectPoints:kT(),moduleType:"trace",name:"funnel",basePlotModule:ph(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Ywe=ye((gfr,Zwe)=>{"use strict";Zwe.exports=Xwe()});var Jwe=ye((mfr,Kwe)=>{"use strict";Kwe.exports={eventDataKeys:["initial","delta","final"]}});var iH=ye((yfr,t3e)=>{"use strict";var _c=Lm(),tH=pf().line,Ywt=Gl(),$we=df().axisHoverFormat,{hovertemplateAttrs:Kwt,texttemplateAttrs:Jwt,templatefallbackAttrs:Qwe}=Ll(),e3e=Jwe(),WT=Ao().extendFlat,$wt=ka();function rH(e){return{marker:{color:WT({},_c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:WT({},_c.marker.line.color,{arrayOk:!1,editType:"style"}),width:WT({},_c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t3e.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:_c.x,x0:_c.x0,dx:_c.dx,y:_c.y,y0:_c.y0,dy:_c.dy,xperiod:_c.xperiod,yperiod:_c.yperiod,xperiod0:_c.xperiod0,yperiod0:_c.yperiod0,xperiodalignment:_c.xperiodalignment,yperiodalignment:_c.yperiodalignment,xhoverformat:$we("x"),yhoverformat:$we("y"),hovertext:_c.hovertext,hovertemplate:Kwt({},{keys:e3e.eventDataKeys}),hovertemplatefallback:Qwe(),hoverinfo:WT({},Ywt.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:Jwt({editType:"plot"},{keys:e3e.eventDataKeys.concat(["label"])}),texttemplatefallback:Qwe({editType:"plot"}),text:_c.text,textposition:_c.textposition,insidetextanchor:_c.insidetextanchor,textangle:_c.textangle,textfont:_c.textfont,insidetextfont:_c.insidetextfont,outsidetextfont:_c.outsidetextfont,constraintext:_c.constraintext,cliponaxis:_c.cliponaxis,orientation:_c.orientation,offset:_c.offset,width:_c.width,increasing:rH("increasing"),decreasing:rH("decreasing"),totals:rH("intermediate sums and total"),connector:{line:{color:WT({},tH.color,{dflt:$wt.defaultLine}),width:WT({},tH.width,{editType:"plot"}),dash:tH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:_c.offsetgroup,alignmentgroup:_c.alignmentgroup,zorder:_c.zorder}});var nH=ye((_fr,r3e)=>{"use strict";r3e.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 XT=ye((xfr,i3e)=>{"use strict";i3e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var oH=ye((bfr,s3e)=>{"use strict";var n3e=Dr(),Qwt=Hb(),e3t=r0().handleText,t3t=eT(),r3t=Ig(),a3e=iH(),i3t=ka(),o3e=XT(),n3t=o3e.INCREASING.COLOR,a3t=o3e.DECREASING.COLOR,o3t="#4499FF";function aH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",i3t.defaultLine),e(t+".marker.line.width")}function s3t(e,t,r,n){function i(u,c){return n3e.coerce(e,t,a3e,u,c)}var a=t3t(e,t,n,i);if(!a){t.visible=!1;return}r3t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("measure"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");e3t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),i("texttemplatefallback"),t.texttemplate||i("textinfo")),aH(i,"increasing",n3t),aH(i,"decreasing",a3t),aH(i,"totals",o3t);var s=i("connector.visible");if(s){i("connector.mode");var l=i("connector.line.width");l&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function l3t(e,t){var r,n;function i(o){return n3e.coerce(n._input,n,a3e,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var u3t=Dr(),c3t=nH();l3e.exports=function(e,t,r){var n=!1;function i(s,l){return u3t.coerce(e,t,c3t,s,l)}for(var a=0;a{"use strict";var c3e=ho(),f3e=Dg(),h3e=Dr().mergeArray,f3t=z0(),d3e=fs().BADNUM;function sH(e){return e==="a"||e==="absolute"}function lH(e){return e==="t"||e==="total"}v3e.exports=function(t,r){var n=c3e.getFromId(t,r.xaxis||"x"),i=c3e.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=f3e(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=f3e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,v,_=!1,b=0;b{"use strict";var g3e=jb().setGroupPositions;m3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var _3e=Oa(),N8=Dr(),h3t=So(),ZT=fs().BADNUM,d3t=n2(),v3t=bv().clearMinTextSize;x3e.exports=function(t,r,n,i){var a=t._fullLayout;v3t("waterfall",a),d3t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),p3t(t,r,n,i)};function p3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;N8.makeTraceGroups(n,r,"trace bars").each(function(o){var s=_3e.select(this),l=o[0].trace,u=N8.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(N8.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(v,_){if(!(_!==d-1&&!v.cNext)){var b=g3t(v,i,a,c),p=b[0],k=b[1],E="";p[0]!==ZT&&k[0]!==ZT&&p[1]!==ZT&&k[1]!==ZT&&(f==="spanning"&&!v.isSum&&_>0&&(c?E+="M"+p[0]+","+k[1]+"V"+k[0]:E+="M"+p[1]+","+k[0]+"H"+p[0]),f!=="between"&&(v.isSum||_{"use strict";var U8=Oa(),w3e=So(),T3e=ka(),m3t=N1().DESELECTDIM,y3t=N0(),_3t=bv().resizeText,x3t=y3t.styleTextPoints;function b3t(e,t,r){var n=r||U8.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");_3t(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=U8.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;U8.select(this).call(T3e.fill,l.color).call(T3e.stroke,l.line.color).call(w3e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?m3t:1)}}),x3t(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;w3e.lineGroupStyle(U8.select(this).selectAll("path"),s.width,s.color,s.dash)})})}A3e.exports={style:b3t}});var L3e=ye((Efr,C3e)=>{"use strict";var w3t=ho().hoverLabelText,M3e=ka().opacity,T3t=ET().hoverOnBars,E3e=XT(),k3e={increasing:E3e.INCREASING.SYMBOL,decreasing:E3e.DECREASING.SYMBOL};C3e.exports=function(t,r,n,i,a){var o=T3t(t,r,n,i,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(x){return w3t(f,x,l[c+"hoverformat"])}var d=o.index,v=s[d],_=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-_,o.delta=_,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=_<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var p=v.hi||l.hoverinfo,k=[];if(p&&p!=="none"&&p!=="skip"){var E=p==="all",S=p.split("+"),L=function(x){return E||S.indexOf(x)!==-1};v.isSum||(L("final")&&(u?!L("x"):!L("y"))&&k.push(o.finalLabel),L("delta")&&(_<0?k.push(o.deltaLabel+" "+k3e.decreasing):k.push(o.deltaLabel+" "+k3e.increasing)),L("initial")&&k.push("Initial: "+o.initialLabel))}return k.length&&(o.extraText=k.join("
")),o.color=A3t(l,v),[o]};function A3t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(M3e(n))return n;if(M3e(i)&&a)return i}});var I3e=ye((kfr,P3e)=>{"use strict";P3e.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 D3e=ye((Cfr,R3e)=>{"use strict";R3e.exports={attributes:iH(),layoutAttributes:nH(),supplyDefaults:oH().supplyDefaults,crossTraceDefaults:oH().crossTraceDefaults,supplyLayoutDefaults:u3e(),calc:p3e(),crossTraceCalc:y3e(),plot:b3e(),style:S3e().style,hoverPoints:L3e(),eventData:I3e(),selectPoints:kT(),moduleType:"trace",name:"waterfall",basePlotModule:ph(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var z3e=ye((Lfr,F3e)=>{"use strict";F3e.exports=D3e()});var YT=ye((Pfr,O3e)=>{"use strict";O3e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var uH=ye((Ifr,B3e)=>{"use strict";var S3t=Gl(),M3t=pf().zorder,{hovertemplateAttrs:E3t,templatefallbackAttrs:k3t}=Ll(),q3e=Ao().extendFlat,C3t=YT().colormodel,N4=["rgb","rgba","rgba256","hsl","hsla"],L3t=[],P3t=[];for(KT=0;KT{"use strict";var I3t=Dr(),R3t=uH(),N3e=YT(),D3t=Py().IMAGE_URL_PREFIX;U3e.exports=function(t,r){function n(o,s){return I3t.coerce(t,r,R3t,o,s)}n("source"),r.source&&!r.source.match(D3t)&&delete r.source,r._hasSource=!!r.source;var i=n("z");if(r._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;r._hasZ?(n("colormodel","rgb"),a=N3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=N3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var Uy=ye((Dfr,cH)=>{typeof Object.create=="function"?cH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:cH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var fH=ye((Ffr,G3e)=>{G3e.exports=pb().EventEmitter});var W3e=ye(V8=>{"use strict";V8.byteLength=z3t;V8.toByteArray=q3t;V8.fromByteArray=U3t;var Om=[],X0=[],F3t=typeof Uint8Array!="undefined"?Uint8Array:Array,hH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(l2=0,H3e=hH.length;l20)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function z3t(e){var t=j3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function O3t(e,t,r){return(t+r)*3/4-r}function q3t(e){var t,r=j3e(e),n=r[0],i=r[1],a=new F3t(O3t(e,n,i)),o=0,s=i>0?n-4:n,l;for(l=0;l>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=X0[e.charCodeAt(l)]<<2|X0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=X0[e.charCodeAt(l)]<<10|X0[e.charCodeAt(l+1)]<<4|X0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function B3t(e){return Om[e>>18&63]+Om[e>>12&63]+Om[e>>6&63]+Om[e&63]}function N3t(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Om[t>>2]+Om[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Om[t>>10]+Om[t>>4&63]+Om[t<<2&63]+"=")),i.join("")}});var X3e=ye(dH=>{dH.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(d?-1:1)*o*Math.pow(2,a-n)};dH.write=function(e,t,r,n,i,a){var o,s,l,u=a*8-i-1,c=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,v=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=v,s/=256,i-=8);for(o=o<0;e[r+d]=o&255,d+=v,o/=256,u-=8);e[r+d-v]|=_*128}});var c2=ye(eA=>{"use strict";var vH=W3e(),$T=X3e(),Z3e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;eA.Buffer=ea;eA.SlowBuffer=X3t;eA.INSPECT_MAX_BYTES=50;var G8=2147483647;eA.kMaxLength=G8;ea.TYPED_ARRAY_SUPPORT=V3t();!ea.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 V3t(){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(ea.prototype,"parent",{enumerable:!0,get:function(){if(ea.isBuffer(this))return this.buffer}});Object.defineProperty(ea.prototype,"offset",{enumerable:!0,get:function(){if(ea.isBuffer(this))return this.byteOffset}});function Vy(e){if(e>G8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,ea.prototype),t}function ea(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 yH(e)}return $3e(e,t,r)}ea.poolSize=8192;function $3e(e,t,r){if(typeof e=="string")return H3t(e,t);if(ArrayBuffer.isView(e))return j3t(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(qm(e,ArrayBuffer)||e&&qm(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(qm(e,SharedArrayBuffer)||e&&qm(e.buffer,SharedArrayBuffer)))return gH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return ea.from(n,t,r);let i=W3t(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return ea.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)}ea.from=function(e,t,r){return $3e(e,t,r)};Object.setPrototypeOf(ea.prototype,Uint8Array.prototype);Object.setPrototypeOf(ea,Uint8Array);function Q3e(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 G3t(e,t,r){return Q3e(e),e<=0?Vy(e):t!==void 0?typeof r=="string"?Vy(e).fill(t,r):Vy(e).fill(t):Vy(e)}ea.alloc=function(e,t,r){return G3t(e,t,r)};function yH(e){return Q3e(e),Vy(e<0?0:_H(e)|0)}ea.allocUnsafe=function(e){return yH(e)};ea.allocUnsafeSlow=function(e){return yH(e)};function H3t(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!ea.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=eTe(e,t)|0,n=Vy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function pH(e){let t=e.length<0?0:_H(e.length)|0,r=Vy(t);for(let n=0;n=G8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G8.toString(16)+" bytes");return e|0}function X3t(e){return+e!=e&&(e=0),ea.alloc(+e)}ea.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==ea.prototype};ea.compare=function(t,r){if(qm(t,Uint8Array)&&(t=ea.from(t,t.offset,t.byteLength)),qm(r,Uint8Array)&&(r=ea.from(r,r.offset,r.byteLength)),!ea.isBuffer(t)||!ea.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,o=Math.min(n,i);ai.length?(ea.isBuffer(o)||(o=ea.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(ea.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function eTe(e,t){if(ea.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||qm(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return mH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return uTe(e).length;default:if(i)return n?-1:mH(e).length;t=(""+t).toLowerCase(),i=!0}}ea.byteLength=eTe;function Z3t(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return nTt(this,t,r);case"utf8":case"utf-8":return rTe(this,t,r);case"ascii":return rTt(this,t,r);case"latin1":case"binary":return iTt(this,t,r);case"base64":return eTt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aTt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}ea.prototype._isBuffer=!0;function u2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}ea.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+=" ... "),""};Z3e&&(ea.prototype[Z3e]=ea.prototype.inspect);ea.prototype.compare=function(t,r,n,i,a){if(qm(t,Uint8Array)&&(t=ea.from(t,t.offset,t.byteLength)),!ea.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let o=a-i,s=n-r,l=Math.min(o,s),u=this.slice(i,a),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,bH(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=ea.from(t,n)),ea.isBuffer(t))return t.length===0?-1:Y3e(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Y3e(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Y3e(e,t,r,n,i){let a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(i){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fi&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return Y3t(this,t,r,n);case"utf8":case"utf-8":return K3t(this,t,r,n);case"ascii":case"latin1":case"binary":return J3t(this,t,r,n);case"base64":return $3t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q3t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};ea.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function eTt(e,t,r){return t===0&&r===e.length?vH.fromByteArray(e):vH.fromByteArray(e.slice(t,r))}function rTe(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:a>223?3:a>191?2:1;if(i+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return tTt(n)}var K3e=4096;function tTt(e){let t=e.length;if(t<=K3e)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}ea.prototype.readUintLE=ea.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};ea.prototype.readUint8=ea.prototype.readUInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]};ea.prototype.readUint16LE=ea.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]|this[t+1]<<8};ea.prototype.readUint16BE=ea.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]<<8|this[t+1]};ea.prototype.readUint32LE=ea.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ea.prototype.readUint32BE=ea.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ea.prototype.readBigUInt64LE=P_(function(t){t=t>>>0,QT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&U4(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,QT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&U4(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};ea.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=r,a=1,o=this[t+--i];for(;i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ea.prototype.readInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ea.prototype.readInt16LE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ea.prototype.readInt16BE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ea.prototype.readInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ea.prototype.readInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ea.prototype.readBigInt64LE=P_(function(t){t=t>>>0,QT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&U4(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,QT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&U4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||ev(t,4,this.length),$T.read(this,t,!0,23,4)};ea.prototype.readFloatBE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),$T.read(this,t,!1,23,4)};ea.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),$T.read(this,t,!0,52,8)};ea.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),$T.read(this,t,!1,52,8)};function Rp(e,t,r,n,i,a){if(!ea.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}ea.prototype.writeUintLE=ea.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=n-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+n};ea.prototype.writeUint8=ea.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,255,0),this[r]=t&255,r+1};ea.prototype.writeUint16LE=ea.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};ea.prototype.writeUint16BE=ea.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};ea.prototype.writeUint32LE=ea.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};ea.prototype.writeUint32BE=ea.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function iTe(e,t,r,n,i){lTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function nTe(e,t,r,n,i){lTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}ea.prototype.writeBigUInt64LE=P_(function(t,r=0){return iTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ea.prototype.writeBigUInt64BE=P_(function(t,r=0){return nTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ea.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+n};ea.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=n-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ea.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};ea.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};ea.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};ea.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};ea.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};ea.prototype.writeBigInt64LE=P_(function(t,r=0){return iTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});ea.prototype.writeBigInt64BE=P_(function(t,r=0){return nTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function aTe(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function oTe(e,t,r,n,i){return t=+t,r=r>>>0,i||aTe(e,t,r,4,34028234663852886e22,-34028234663852886e22),$T.write(e,t,r,n,23,4),r+4}ea.prototype.writeFloatLE=function(t,r,n){return oTe(this,t,r,!0,n)};ea.prototype.writeFloatBE=function(t,r,n){return oTe(this,t,r,!1,n)};function sTe(e,t,r,n,i){return t=+t,r=r>>>0,i||aTe(e,t,r,8,17976931348623157e292,-17976931348623157e292),$T.write(e,t,r,n,52,8),r+8}ea.prototype.writeDoubleLE=function(t,r,n){return sTe(this,t,r,!0,n)};ea.prototype.writeDoubleBE=function(t,r,n){return sTe(this,t,r,!1,n)};ea.prototype.copy=function(t,r,n,i){if(!ea.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?i=J3e(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=J3e(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function J3e(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function oTt(e,t,r){QT(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&U4(t,e.length-(r+1))}function lTe(e,t,r,n,i,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 JT.ERR_OUT_OF_RANGE("value",s,e)}oTt(n,i,a)}function QT(e,t){if(typeof e!="number")throw new JT.ERR_INVALID_ARG_TYPE(t,"number",e)}function U4(e,t,r){throw Math.floor(e)!==e?(QT(e,r),new JT.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new JT.ERR_BUFFER_OUT_OF_BOUNDS:new JT.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var sTt=/[^+/0-9A-Za-z-_]/g;function lTt(e){if(e=e.split("=")[0],e=e.trim().replace(sTt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function mH(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function uTt(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function uTe(e){return vH.toByteArray(lTt(e))}function H8(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function qm(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function bH(e){return e!==e}var fTt=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function P_(e){return typeof BigInt=="undefined"?hTt:e}function hTt(){throw new Error("BigInt not supported")}});var j8=ye((Nfr,cTe)=>{"use strict";cTe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var V4=ye((Ufr,fTe)=>{"use strict";var dTt=j8();fTe.exports=function(){return dTt()&&!!Symbol.toStringTag}});var wH=ye((Vfr,hTe)=>{"use strict";hTe.exports=Object});var vTe=ye((Gfr,dTe)=>{"use strict";dTe.exports=Error});var gTe=ye((Hfr,pTe)=>{"use strict";pTe.exports=EvalError});var yTe=ye((jfr,mTe)=>{"use strict";mTe.exports=RangeError});var xTe=ye((Wfr,_Te)=>{"use strict";_Te.exports=ReferenceError});var TH=ye((Xfr,bTe)=>{"use strict";bTe.exports=SyntaxError});var tA=ye((Zfr,wTe)=>{"use strict";wTe.exports=TypeError});var ATe=ye((Yfr,TTe)=>{"use strict";TTe.exports=URIError});var MTe=ye((Kfr,STe)=>{"use strict";STe.exports=Math.abs});var kTe=ye((Jfr,ETe)=>{"use strict";ETe.exports=Math.floor});var LTe=ye(($fr,CTe)=>{"use strict";CTe.exports=Math.max});var ITe=ye((Qfr,PTe)=>{"use strict";PTe.exports=Math.min});var DTe=ye((ehr,RTe)=>{"use strict";RTe.exports=Math.pow});var zTe=ye((thr,FTe)=>{"use strict";FTe.exports=Math.round});var qTe=ye((rhr,OTe)=>{"use strict";OTe.exports=Number.isNaN||function(t){return t!==t}});var NTe=ye((ihr,BTe)=>{"use strict";var vTt=qTe();BTe.exports=function(t){return vTt(t)||t===0?t:t<0?-1:1}});var VTe=ye((nhr,UTe)=>{"use strict";UTe.exports=Object.getOwnPropertyDescriptor});var f2=ye((ahr,GTe)=>{"use strict";var W8=VTe();if(W8)try{W8([],"length")}catch(e){W8=null}GTe.exports=W8});var G4=ye((ohr,HTe)=>{"use strict";var X8=Object.defineProperty||!1;if(X8)try{X8({},"a",{value:1})}catch(e){X8=!1}HTe.exports=X8});var XTe=ye((shr,WTe)=>{"use strict";var jTe=typeof Symbol!="undefined"&&Symbol,pTt=j8();WTe.exports=function(){return typeof jTe!="function"||typeof Symbol!="function"||typeof jTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:pTt()}});var AH=ye((lhr,ZTe)=>{"use strict";ZTe.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var SH=ye((uhr,YTe)=>{"use strict";var gTt=wH();YTe.exports=gTt.getPrototypeOf||null});var $Te=ye((chr,JTe)=>{"use strict";var mTt="Function.prototype.bind called on incompatible ",yTt=Object.prototype.toString,_Tt=Math.max,xTt="[object Function]",KTe=function(t,r){for(var n=[],i=0;i{"use strict";var TTt=$Te();QTe.exports=Function.prototype.bind||TTt});var Z8=ye((hhr,eAe)=>{"use strict";eAe.exports=Function.prototype.call});var MH=ye((dhr,tAe)=>{"use strict";tAe.exports=Function.prototype.apply});var iAe=ye((vhr,rAe)=>{"use strict";rAe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var aAe=ye((phr,nAe)=>{"use strict";var ATt=rA(),STt=MH(),MTt=Z8(),ETt=iAe();nAe.exports=ETt||ATt.call(MTt,STt)});var sAe=ye((ghr,oAe)=>{"use strict";var kTt=rA(),CTt=tA(),LTt=Z8(),PTt=aAe();oAe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new CTt("a function is required");return PTt(kTt,LTt,t)}});var dAe=ye((mhr,hAe)=>{"use strict";var ITt=sAe(),lAe=f2(),cAe;try{cAe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var EH=!!cAe&&lAe&&lAe(Object.prototype,"__proto__"),fAe=Object,uAe=fAe.getPrototypeOf;hAe.exports=EH&&typeof EH.get=="function"?ITt([EH.get]):typeof uAe=="function"?function(t){return uAe(t==null?t:fAe(t))}:!1});var yAe=ye((yhr,mAe)=>{"use strict";var vAe=AH(),pAe=SH(),gAe=dAe();mAe.exports=vAe?function(t){return vAe(t)}:pAe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return pAe(t)}:gAe?function(t){return gAe(t)}:null});var xAe=ye((_hr,_Ae)=>{"use strict";var RTt=Function.prototype.call,DTt=Object.prototype.hasOwnProperty,FTt=rA();_Ae.exports=FTt.call(RTt,DTt)});var J8=ye((xhr,MAe)=>{"use strict";var lu,zTt=wH(),OTt=vTe(),qTt=gTe(),BTt=yTe(),NTt=xTe(),oA=TH(),aA=tA(),UTt=ATe(),VTt=MTe(),GTt=kTe(),HTt=LTe(),jTt=ITe(),WTt=DTe(),XTt=zTe(),ZTt=NTe(),AAe=Function,kH=function(e){try{return AAe('"use strict"; return ('+e+").constructor;")()}catch(t){}},H4=f2(),YTt=G4(),CH=function(){throw new aA},KTt=H4?function(){try{return arguments.callee,CH}catch(e){try{return H4(arguments,"callee").get}catch(t){return CH}}}():CH,iA=XTe()(),tv=yAe(),JTt=SH(),$Tt=AH(),SAe=MH(),j4=Z8(),nA={},QTt=typeof Uint8Array=="undefined"||!tv?lu:tv(Uint8Array),h2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?lu:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?lu:ArrayBuffer,"%ArrayIteratorPrototype%":iA&&tv?tv([][Symbol.iterator]()):lu,"%AsyncFromSyncIteratorPrototype%":lu,"%AsyncFunction%":nA,"%AsyncGenerator%":nA,"%AsyncGeneratorFunction%":nA,"%AsyncIteratorPrototype%":nA,"%Atomics%":typeof Atomics=="undefined"?lu:Atomics,"%BigInt%":typeof BigInt=="undefined"?lu:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?lu:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?lu:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?lu:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":OTt,"%eval%":eval,"%EvalError%":qTt,"%Float16Array%":typeof Float16Array=="undefined"?lu:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?lu:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?lu:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?lu:FinalizationRegistry,"%Function%":AAe,"%GeneratorFunction%":nA,"%Int8Array%":typeof Int8Array=="undefined"?lu:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?lu:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?lu:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":iA&&tv?tv(tv([][Symbol.iterator]())):lu,"%JSON%":typeof JSON=="object"?JSON:lu,"%Map%":typeof Map=="undefined"?lu:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!iA||!tv?lu:tv(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":zTt,"%Object.getOwnPropertyDescriptor%":H4,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?lu:Promise,"%Proxy%":typeof Proxy=="undefined"?lu:Proxy,"%RangeError%":BTt,"%ReferenceError%":NTt,"%Reflect%":typeof Reflect=="undefined"?lu:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?lu:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!iA||!tv?lu:tv(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?lu:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":iA&&tv?tv(""[Symbol.iterator]()):lu,"%Symbol%":iA?Symbol:lu,"%SyntaxError%":oA,"%ThrowTypeError%":KTt,"%TypedArray%":QTt,"%TypeError%":aA,"%Uint8Array%":typeof Uint8Array=="undefined"?lu:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?lu:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?lu:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?lu:Uint32Array,"%URIError%":UTt,"%WeakMap%":typeof WeakMap=="undefined"?lu:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?lu:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?lu:WeakSet,"%Function.prototype.call%":j4,"%Function.prototype.apply%":SAe,"%Object.defineProperty%":YTt,"%Object.getPrototypeOf%":JTt,"%Math.abs%":VTt,"%Math.floor%":GTt,"%Math.max%":HTt,"%Math.min%":jTt,"%Math.pow%":WTt,"%Math.round%":XTt,"%Math.sign%":ZTt,"%Reflect.getPrototypeOf%":$Tt};if(tv)try{null.error}catch(e){bAe=tv(tv(e)),h2["%Error.prototype%"]=bAe}var bAe,eAt=function e(t){var r;if(t==="%AsyncFunction%")r=kH("async function () {}");else if(t==="%GeneratorFunction%")r=kH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=kH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&tv&&(r=tv(i.prototype))}return h2[t]=r,r},wAe={__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"]},W4=rA(),Y8=xAe(),tAt=W4.call(j4,Array.prototype.concat),rAt=W4.call(SAe,Array.prototype.splice),TAe=W4.call(j4,String.prototype.replace),K8=W4.call(j4,String.prototype.slice),iAt=W4.call(j4,RegExp.prototype.exec),nAt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,aAt=/\\(\\)?/g,oAt=function(t){var r=K8(t,0,1),n=K8(t,-1);if(r==="%"&&n!=="%")throw new oA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new oA("invalid intrinsic syntax, expected opening `%`");var i=[];return TAe(t,nAt,function(a,o,s,l){i[i.length]=s?TAe(l,aAt,"$1"):o||a}),i},sAt=function(t,r){var n=t,i;if(Y8(wAe,n)&&(i=wAe[n],n="%"+i[0]+"%"),Y8(h2,n)){var a=h2[n];if(a===nA&&(a=eAt(n)),typeof a=="undefined"&&!r)throw new aA("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new oA("intrinsic "+t+" does not exist!")};MAe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new aA("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new aA('"allowMissing" argument must be a boolean');if(iAt(/^%?[^%]*%?$/,t)===null)throw new oA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=oAt(t),i=n.length>0?n[0]:"",a=sAt("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],rAt(n,tAt([0,1],u)));for(var c=1,f=!0;c=n.length){var _=H4(s,h);f=!!_,f&&"get"in _&&!("originalValue"in _.get)?s=_.get:s=s[h]}else f=Y8(s,h),s=s[h];f&&!l&&(h2[o]=s)}}return s}});var LAe=ye((bhr,CAe)=>{"use strict";var EAe=G4(),lAt=TH(),sA=tA(),kAe=f2();CAe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new sA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new sA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new sA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new sA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new sA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new sA("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!kAe&&kAe(t,r);if(EAe)EAe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new lAt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var PH=ye((whr,IAe)=>{"use strict";var LH=G4(),PAe=function(){return!!LH};PAe.hasArrayLengthDefineBug=function(){if(!LH)return null;try{return LH([],"length",{value:1}).length!==1}catch(t){return!0}};IAe.exports=PAe});var OAe=ye((Thr,zAe)=>{"use strict";var uAt=J8(),RAe=LAe(),cAt=PH()(),DAe=f2(),FAe=tA(),fAt=uAt("%Math.floor%");zAe.exports=function(t,r){if(typeof t!="function")throw new FAe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||fAt(r)!==r)throw new FAe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&DAe){var o=DAe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(cAt?RAe(t,"length",r,!0,!0):RAe(t,"length",r)),t}});var X4=ye((Ahr,$8)=>{"use strict";var IH=rA(),Q8=J8(),hAt=OAe(),dAt=tA(),NAe=Q8("%Function.prototype.apply%"),UAe=Q8("%Function.prototype.call%"),VAe=Q8("%Reflect.apply%",!0)||IH.call(UAe,NAe),qAe=G4(),vAt=Q8("%Math.max%");$8.exports=function(t){if(typeof t!="function")throw new dAt("a function is required");var r=VAe(IH,UAe,arguments);return hAt(r,1+vAt(0,t.length-(arguments.length-1)),!0)};var BAe=function(){return VAe(IH,NAe,arguments)};qAe?qAe($8.exports,"apply",{value:BAe}):$8.exports.apply=BAe});var lA=ye((Shr,jAe)=>{"use strict";var GAe=J8(),HAe=X4(),pAt=HAe(GAe("String.prototype.indexOf"));jAe.exports=function(t,r){var n=GAe(t,!!r);return typeof n=="function"&&pAt(t,".prototype.")>-1?HAe(n):n}});var ZAe=ye((Mhr,XAe)=>{"use strict";var gAt=V4()(),mAt=lA(),RH=mAt("Object.prototype.toString"),eR=function(t){return gAt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:RH(t)==="[object Arguments]"},WAe=function(t){return eR(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&RH(t)!=="[object Array]"&&RH(t.callee)==="[object Function]"},yAt=function(){return eR(arguments)}();eR.isLegacyArguments=WAe;XAe.exports=yAt?eR:WAe});var JAe=ye((Ehr,KAe)=>{"use strict";var _At=Object.prototype.toString,xAt=Function.prototype.toString,bAt=/^\s*(?:function)?\*/,YAe=V4()(),DH=Object.getPrototypeOf,wAt=function(){if(!YAe)return!1;try{return Function("return function*() {}")()}catch(e){}},FH;KAe.exports=function(t){if(typeof t!="function")return!1;if(bAt.test(xAt.call(t)))return!0;if(!YAe){var r=_At.call(t);return r==="[object GeneratorFunction]"}if(!DH)return!1;if(typeof FH=="undefined"){var n=wAt();FH=n?DH(n):!1}return DH(t)===FH}});var t5e=ye((khr,e5e)=>{"use strict";var QAe=Function.prototype.toString,uA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,OH,tR;if(typeof uA=="function"&&typeof Object.defineProperty=="function")try{OH=Object.defineProperty({},"length",{get:function(){throw tR}}),tR={},uA(function(){throw 42},null,OH)}catch(e){e!==tR&&(uA=null)}else uA=null;var TAt=/^\s*class\b/,qH=function(t){try{var r=QAe.call(t);return TAt.test(r)}catch(n){return!1}},zH=function(t){try{return qH(t)?!1:(QAe.call(t),!0)}catch(r){return!1}},rR=Object.prototype.toString,AAt="[object Object]",SAt="[object Function]",MAt="[object GeneratorFunction]",EAt="[object HTMLAllCollection]",kAt="[object HTML document.all class]",CAt="[object HTMLCollection]",LAt=typeof Symbol=="function"&&!!Symbol.toStringTag,PAt=!(0 in[,]),BH=function(){return!1};typeof document=="object"&&($Ae=document.all,rR.call($Ae)===rR.call(document.all)&&(BH=function(t){if((PAt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=rR.call(t);return(r===EAt||r===kAt||r===CAt||r===AAt)&&t("")==null}catch(n){}return!1}));var $Ae;e5e.exports=uA?function(t){if(BH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{uA(t,null,OH)}catch(r){if(r!==tR)return!1}return!qH(t)&&zH(t)}:function(t){if(BH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(LAt)return zH(t);if(qH(t))return!1;var r=rR.call(t);return r!==SAt&&r!==MAt&&!/^\[object HTML/.test(r)?!1:zH(t)}});var NH=ye((Chr,i5e)=>{"use strict";var IAt=t5e(),RAt=Object.prototype.toString,r5e=Object.prototype.hasOwnProperty,DAt=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),RAt.call(t)==="[object Array]"?DAt(t,r,i):typeof t=="string"?FAt(t,r,i):zAt(t,r,i)};i5e.exports=OAt});var VH=ye((Lhr,n5e)=>{"use strict";var UH=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],qAt=typeof globalThis=="undefined"?window:globalThis;n5e.exports=function(){for(var t=[],r=0;r{"use strict";var nR=NH(),BAt=VH(),a5e=X4(),jH=lA(),iR=f2(),NAt=jH("Object.prototype.toString"),s5e=V4()(),o5e=typeof globalThis=="undefined"?window:globalThis,HH=BAt(),WH=jH("String.prototype.slice"),GH=Object.getPrototypeOf,UAt=jH("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:GAt(t)}return iR?VAt(t):null}});var p5e=ye((Ihr,v5e)=>{"use strict";var c5e=NH(),HAt=VH(),ZH=lA(),jAt=ZH("Object.prototype.toString"),f5e=V4()(),oR=f2(),WAt=typeof globalThis=="undefined"?window:globalThis,h5e=HAt(),XAt=ZH("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return oR?YAt(t):!1}});var JH=ye(uu=>{"use strict";var KAt=ZAe(),JAt=JAe(),Hg=u5e(),g5e=p5e();function cA(e){return e.call.bind(e)}var m5e=typeof BigInt!="undefined",y5e=typeof Symbol!="undefined",Z0=cA(Object.prototype.toString),$At=cA(Number.prototype.valueOf),QAt=cA(String.prototype.valueOf),e5t=cA(Boolean.prototype.valueOf);m5e&&(_5e=cA(BigInt.prototype.valueOf));var _5e;y5e&&(x5e=cA(Symbol.prototype.valueOf));var x5e;function Y4(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}uu.isArgumentsObject=KAt;uu.isGeneratorFunction=JAt;uu.isTypedArray=g5e;function t5t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}uu.isPromise=t5t;function r5t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):g5e(e)||w5e(e)}uu.isArrayBufferView=r5t;function i5t(e){return Hg(e)==="Uint8Array"}uu.isUint8Array=i5t;function n5t(e){return Hg(e)==="Uint8ClampedArray"}uu.isUint8ClampedArray=n5t;function a5t(e){return Hg(e)==="Uint16Array"}uu.isUint16Array=a5t;function o5t(e){return Hg(e)==="Uint32Array"}uu.isUint32Array=o5t;function s5t(e){return Hg(e)==="Int8Array"}uu.isInt8Array=s5t;function l5t(e){return Hg(e)==="Int16Array"}uu.isInt16Array=l5t;function u5t(e){return Hg(e)==="Int32Array"}uu.isInt32Array=u5t;function c5t(e){return Hg(e)==="Float32Array"}uu.isFloat32Array=c5t;function f5t(e){return Hg(e)==="Float64Array"}uu.isFloat64Array=f5t;function h5t(e){return Hg(e)==="BigInt64Array"}uu.isBigInt64Array=h5t;function d5t(e){return Hg(e)==="BigUint64Array"}uu.isBigUint64Array=d5t;function sR(e){return Z0(e)==="[object Map]"}sR.working=typeof Map!="undefined"&&sR(new Map);function v5t(e){return typeof Map=="undefined"?!1:sR.working?sR(e):e instanceof Map}uu.isMap=v5t;function lR(e){return Z0(e)==="[object Set]"}lR.working=typeof Set!="undefined"&&lR(new Set);function p5t(e){return typeof Set=="undefined"?!1:lR.working?lR(e):e instanceof Set}uu.isSet=p5t;function uR(e){return Z0(e)==="[object WeakMap]"}uR.working=typeof WeakMap!="undefined"&&uR(new WeakMap);function g5t(e){return typeof WeakMap=="undefined"?!1:uR.working?uR(e):e instanceof WeakMap}uu.isWeakMap=g5t;function KH(e){return Z0(e)==="[object WeakSet]"}KH.working=typeof WeakSet!="undefined"&&KH(new WeakSet);function m5t(e){return KH(e)}uu.isWeakSet=m5t;function cR(e){return Z0(e)==="[object ArrayBuffer]"}cR.working=typeof ArrayBuffer!="undefined"&&cR(new ArrayBuffer);function b5e(e){return typeof ArrayBuffer=="undefined"?!1:cR.working?cR(e):e instanceof ArrayBuffer}uu.isArrayBuffer=b5e;function fR(e){return Z0(e)==="[object DataView]"}fR.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&fR(new DataView(new ArrayBuffer(1),0,1));function w5e(e){return typeof DataView=="undefined"?!1:fR.working?fR(e):e instanceof DataView}uu.isDataView=w5e;var YH=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function Z4(e){return Z0(e)==="[object SharedArrayBuffer]"}function T5e(e){return typeof YH=="undefined"?!1:(typeof Z4.working=="undefined"&&(Z4.working=Z4(new YH)),Z4.working?Z4(e):e instanceof YH)}uu.isSharedArrayBuffer=T5e;function y5t(e){return Z0(e)==="[object AsyncFunction]"}uu.isAsyncFunction=y5t;function _5t(e){return Z0(e)==="[object Map Iterator]"}uu.isMapIterator=_5t;function x5t(e){return Z0(e)==="[object Set Iterator]"}uu.isSetIterator=x5t;function b5t(e){return Z0(e)==="[object Generator]"}uu.isGeneratorObject=b5t;function w5t(e){return Z0(e)==="[object WebAssembly.Module]"}uu.isWebAssemblyCompiledModule=w5t;function A5e(e){return Y4(e,$At)}uu.isNumberObject=A5e;function S5e(e){return Y4(e,QAt)}uu.isStringObject=S5e;function M5e(e){return Y4(e,e5t)}uu.isBooleanObject=M5e;function E5e(e){return m5e&&Y4(e,_5e)}uu.isBigIntObject=E5e;function k5e(e){return y5e&&Y4(e,x5e)}uu.isSymbolObject=k5e;function T5t(e){return A5e(e)||S5e(e)||M5e(e)||E5e(e)||k5e(e)}uu.isBoxedPrimitive=T5t;function A5t(e){return typeof Uint8Array!="undefined"&&(b5e(e)||T5e(e))}uu.isAnyArrayBuffer=A5t;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(uu,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var $H=ye((Dhr,C5e)=>{C5e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var nj=ye(cu=>{var L5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),rj(t)?r.showHidden=t:t&&cu._extend(r,t),v2(r.showHidden)&&(r.showHidden=!1),v2(r.depth)&&(r.depth=2),v2(r.colors)&&(r.colors=!1),v2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=M5t),pR(r,e,r.depth)}cu.inspect=I_;I_.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]};I_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function M5t(e,t){var r=I_.styles[t];return r?"\x1B["+I_.colors[r][0]+"m"+e+"\x1B["+I_.colors[r][1]+"m":e}function E5t(e,t){return e}function k5t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function pR(e,t,r){if(e.customInspect&&t&&vR(t.inspect)&&t.inspect!==cu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return yR(n)||(n=pR(e,n,r)),n}var i=C5t(e,t);if(i)return i;var a=Object.keys(t),o=k5t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),J4(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return QH(t);if(a.length===0){if(vR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(K4(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(gR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(J4(t))return QH(t)}var l="",u=!1,c=["{","}"];if(I5e(t)&&(u=!0,c=["[","]"]),vR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(K4(t)&&(l=" "+RegExp.prototype.toString.call(t)),gR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),J4(t)&&(l=" "+QH(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return K4(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=L5t(e,t,r,o,a):h=a.map(function(d){return tj(e,t,r,o,d,u)}),e.seen.pop(),P5t(h,l,c)}function C5t(e,t){if(v2(t))return e.stylize("undefined","undefined");if(yR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(R5e(t))return e.stylize(""+t,"number");if(rj(t))return e.stylize(""+t,"boolean");if(mR(t))return e.stylize("null","null")}function QH(e){return"["+Error.prototype.toString.call(e)+"]"}function L5t(e,t,r,n,i){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")),v2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function P5t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` `)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}cu.types=JH();function I5e(e){return Array.isArray(e)}cu.isArray=I5e;function rj(e){return typeof e=="boolean"}cu.isBoolean=rj;function mR(e){return e===null}cu.isNull=mR;function I5t(e){return e==null}cu.isNullOrUndefined=I5t;function R5e(e){return typeof e=="number"}cu.isNumber=R5e;function yR(e){return typeof e=="string"}cu.isString=yR;function R5t(e){return typeof e=="symbol"}cu.isSymbol=R5t;function v2(e){return e===void 0}cu.isUndefined=v2;function K4(e){return fA(e)&&ij(e)==="[object RegExp]"}cu.isRegExp=K4;cu.types.isRegExp=K4;function fA(e){return typeof e=="object"&&e!==null}cu.isObject=fA;function gR(e){return fA(e)&&ij(e)==="[object Date]"}cu.isDate=gR;cu.types.isDate=gR;function J4(e){return fA(e)&&(ij(e)==="[object Error]"||e instanceof Error)}cu.isError=J4;cu.types.isNativeError=J4;function vR(e){return typeof e=="function"}cu.isFunction=vR;function D5t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}cu.isPrimitive=D5t;cu.isBuffer=$H();function ij(e){return Object.prototype.toString.call(e)}function ej(e){return e<10?"0"+e.toString(10):e.toString(10)}var F5t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z5t(){var e=new Date,t=[ej(e.getHours()),ej(e.getMinutes()),ej(e.getSeconds())].join(":");return[e.getDate(),F5t[e.getMonth()],t].join(" ")}cu.log=function(){console.log("%s - %s",z5t(),cu.format.apply(cu,arguments))};cu.inherits=Uy();cu._extend=function(e,t){if(!t||!fA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function D5e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var d2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;cu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(d2&&t[d2]){var r=t[d2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,d2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s{"use strict";function F5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function B5t(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return _R.alloc(0);for(var n=_R.allocUnsafe(r>>>0),i=this.head,a=0;i;)W5t(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return ro.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=_R.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:j5t,value:function(r,n){return aj(this,B5t({},n,{depth:0,customInspect:!1}))}}]),e}()});var sj=ye((Ohr,N5e)=>{"use strict";function X5t(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(oj,this,e)):process.nextTick(oj,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(xR,r):(r._writableState.errorEmitted=!0,process.nextTick(B5e,r,a)):process.nextTick(B5e,r,a):t?(process.nextTick(xR,r),t(a)):process.nextTick(xR,r)}),this)}function B5e(e,t){oj(e,t),xR(e)}function xR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Z5t(){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 oj(e,t){e.emit("error",t)}function Y5t(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}N5e.exports={destroy:X5t,undestroy:Z5t,errorOrDestroy:Y5t}});var p2=ye((qhr,G5e)=>{"use strict";function K5t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var V5e={};function Y0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){K5t(o,a);function o(s,l,u){return a.call(this,n(s,l,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,V5e[e]=i}function U5e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function J5t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function $5t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Q5t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Y0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Y0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&J5t(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if($5t(e," argument"))i="The ".concat(e," ").concat(n," ").concat(U5e(t,"type"));else{var a=Q5t(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(U5e(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);Y0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Y0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Y0("ERR_STREAM_PREMATURE_CLOSE","Premature close");Y0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Y0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Y0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Y0("ERR_STREAM_WRITE_AFTER_END","write after end");Y0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Y0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Y0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");G5e.exports.codes=V5e});var lj=ye((Bhr,H5e)=>{"use strict";var eSt=p2().codes.ERR_INVALID_OPT_VALUE;function tSt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function rSt(e,t,r,n){var i=tSt(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new eSt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}H5e.exports={getHighWaterMark:rSt}});var W5e=ye((Nhr,j5e)=>{j5e.exports=iSt;function iSt(e,t){if(uj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(uj("throwDeprecation"))throw new Error(t);uj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function uj(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 hj=ye((Uhr,$5e)=>{"use strict";$5e.exports=zh;function Z5e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){LSt(t,e)}}var hA;zh.WritableState=Q4;var nSt={deprecate:W5e()},Y5e=fH(),wR=c2().Buffer,aSt=window.Uint8Array||function(){};function oSt(e){return wR.from(e)}function sSt(e){return wR.isBuffer(e)||e instanceof aSt}var fj=sj(),lSt=lj(),uSt=lSt.getHighWaterMark,R_=p2().codes,cSt=R_.ERR_INVALID_ARG_TYPE,fSt=R_.ERR_METHOD_NOT_IMPLEMENTED,hSt=R_.ERR_MULTIPLE_CALLBACK,dSt=R_.ERR_STREAM_CANNOT_PIPE,vSt=R_.ERR_STREAM_DESTROYED,pSt=R_.ERR_STREAM_NULL_VALUES,gSt=R_.ERR_STREAM_WRITE_AFTER_END,mSt=R_.ERR_UNKNOWN_ENCODING,dA=fj.errorOrDestroy;Uy()(zh,Y5e);function ySt(){}function Q4(e,t,r){hA=hA||g2(),e=e||{},typeof r!="boolean"&&(r=t instanceof hA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=uSt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){SSt(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Z5e(this)}Q4.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Q4.prototype,"buffer",{get:nSt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var bR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(bR=Function.prototype[Symbol.hasInstance],Object.defineProperty(zh,Symbol.hasInstance,{value:function(t){return bR.call(this,t)?!0:this!==zh?!1:t&&t._writableState instanceof Q4}})):bR=function(t){return t instanceof this};function zh(e){hA=hA||g2();var t=this instanceof hA;if(!t&&!bR.call(zh,this))return new zh(e);this._writableState=new Q4(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)),Y5e.call(this)}zh.prototype.pipe=function(){dA(this,new dSt)};function _St(e,t){var r=new gSt;dA(e,r),process.nextTick(t,r)}function xSt(e,t,r,n){var i;return r===null?i=new pSt:typeof r!="string"&&!t.objectMode&&(i=new cSt("chunk",["string","Buffer"],r)),i?(dA(e,i),process.nextTick(n,i),!1):!0}zh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&sSt(e);return a&&!wR.isBuffer(e)&&(e=oSt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=ySt),n.ending?_St(this,r):(a||xSt(this,n,e,r))&&(n.pendingcb++,i=wSt(this,n,a,e,t,r)),i};zh.prototype.cork=function(){this._writableState.corked++};zh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&K5e(this,e))};zh.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 mSt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(zh.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function bSt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=wR.from(t,r)),t}Object.defineProperty(zh.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function wSt(e,t,r,n,i,a){if(!r){var o=bSt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var PSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};eSe.exports=Bm;var Q5e=pj(),vj=hj();Uy()(Bm,Q5e);for(dj=PSt(vj.prototype),TR=0;TR{var SR=c2(),Nm=SR.Buffer;function tSe(e,t){for(var r in e)t[r]=e[r]}Nm.from&&Nm.alloc&&Nm.allocUnsafe&&Nm.allocUnsafeSlow?rSe.exports=SR:(tSe(SR,gj),gj.Buffer=m2);function m2(e,t,r){return Nm(e,t,r)}m2.prototype=Object.create(Nm.prototype);tSe(Nm,m2);m2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Nm(e,t,r)};m2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Nm(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};m2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Nm(e)};m2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return SR.SlowBuffer(e)}});var _j=ye(aSe=>{"use strict";var yj=iSe().Buffer,nSe=yj.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 DSt(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 FSt(e){var t=DSt(e);if(typeof t!="string"&&(yj.isEncoding===nSe||!nSe(e)))throw new Error("Unknown encoding: "+e);return t||e}aSe.StringDecoder=eE;function eE(e){this.encoding=FSt(e);var t;switch(this.encoding){case"utf16le":this.text=USt,this.end=VSt,t=4;break;case"utf8":this.fillLast=qSt,t=4;break;case"base64":this.text=GSt,this.end=HSt,t=3;break;default:this.write=jSt,this.end=WSt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=yj.allocUnsafe(t)}eE.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 zSt(e,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function OSt(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 qSt(e){var t=this.lastTotal-this.lastNeed,r=OSt(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 BSt(e,t){var r=zSt(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function NSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function USt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function VSt(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 GSt(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 HSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function jSt(e){return e.toString(this.encoding)}function WSt(e){return e&&e.length?this.write(e):""}});var MR=ye((Hhr,lSe)=>{"use strict";var oSe=p2().codes.ERR_STREAM_PREMATURE_CLOSE;function XSt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";var ER;function D_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var KSt=MR(),F_=Symbol("lastResolve"),y2=Symbol("lastReject"),tE=Symbol("error"),kR=Symbol("ended"),_2=Symbol("lastPromise"),xj=Symbol("handlePromise"),x2=Symbol("stream");function z_(e,t){return{value:e,done:t}}function JSt(e){var t=e[F_];if(t!==null){var r=e[x2].read();r!==null&&(e[_2]=null,e[F_]=null,e[y2]=null,t(z_(r,!1)))}}function $St(e){process.nextTick(JSt,e)}function QSt(e,t){return function(r,n){e.then(function(){if(t[kR]){r(z_(void 0,!0));return}t[xj](r,n)},n)}}var eMt=Object.getPrototypeOf(function(){}),tMt=Object.setPrototypeOf((ER={get stream(){return this[x2]},next:function(){var t=this,r=this[tE];if(r!==null)return Promise.reject(r);if(this[kR])return Promise.resolve(z_(void 0,!0));if(this[x2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[tE]?s(t[tE]):o(z_(void 0,!0))})});var n=this[_2],i;if(n)i=new Promise(QSt(n,this));else{var a=this[x2].read();if(a!==null)return Promise.resolve(z_(a,!1));i=new Promise(this[xj])}return this[_2]=i,i}},D_(ER,Symbol.asyncIterator,function(){return this}),D_(ER,"return",function(){var t=this;return new Promise(function(r,n){t[x2].destroy(null,function(i){if(i){n(i);return}r(z_(void 0,!0))})})}),ER),eMt),rMt=function(t){var r,n=Object.create(tMt,(r={},D_(r,x2,{value:t,writable:!0}),D_(r,F_,{value:null,writable:!0}),D_(r,y2,{value:null,writable:!0}),D_(r,tE,{value:null,writable:!0}),D_(r,kR,{value:t._readableState.endEmitted,writable:!0}),D_(r,xj,{value:function(a,o){var s=n[x2].read();s?(n[_2]=null,n[F_]=null,n[y2]=null,a(z_(s,!1))):(n[F_]=a,n[y2]=o)},writable:!0}),r));return n[_2]=null,KSt(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[y2];a!==null&&(n[_2]=null,n[F_]=null,n[y2]=null,a(i)),n[tE]=i;return}var o=n[F_];o!==null&&(n[_2]=null,n[F_]=null,n[y2]=null,o(z_(void 0,!0))),n[kR]=!0}),t.on("readable",$St.bind(null,n)),n};uSe.exports=rMt});var hSe=ye((Whr,fSe)=>{fSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var pj=ye((Zhr,wSe)=>{"use strict";wSe.exports=Bu;var vA;Bu.ReadableState=gSe;var Xhr=pb().EventEmitter,pSe=function(t,r){return t.listeners(r).length},iE=fH(),CR=c2().Buffer,iMt=window.Uint8Array||function(){};function nMt(e){return CR.from(e)}function aMt(e){return CR.isBuffer(e)||e instanceof iMt}var bj=nj(),nu;bj&&bj.debuglog?nu=bj.debuglog("stream"):nu=function(){};var oMt=q5e(),kj=sj(),sMt=lj(),lMt=sMt.getHighWaterMark,LR=p2().codes,uMt=LR.ERR_INVALID_ARG_TYPE,cMt=LR.ERR_STREAM_PUSH_AFTER_EOF,fMt=LR.ERR_METHOD_NOT_IMPLEMENTED,hMt=LR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pA,wj,Tj;Uy()(Bu,iE);var rE=kj.errorOrDestroy,Aj=["error","close","destroy","pause","resume"];function dMt(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 gSe(e,t,r){vA=vA||g2(),e=e||{},typeof r!="boolean"&&(r=t instanceof vA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=lMt(this,e,"readableHighWaterMark",r),this.buffer=new oMt,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&&(pA||(pA=_j().StringDecoder),this.decoder=new pA(e.encoding),this.encoding=e.encoding)}function Bu(e){if(vA=vA||g2(),!(this instanceof Bu))return new Bu(e);var t=this instanceof vA;this._readableState=new gSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),iE.call(this)}Object.defineProperty(Bu.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Bu.prototype.destroy=kj.destroy;Bu.prototype._undestroy=kj.undestroy;Bu.prototype._destroy=function(e,t){t(e)};Bu.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=CR.from(e,t),t=""),n=!0),mSe(this,e,t,!1,n)};Bu.prototype.unshift=function(e){return mSe(this,e,null,!0,!1)};function mSe(e,t,r,n,i){nu("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,gMt(e,a);else{var o;if(i||(o=vMt(a,t)),o)rE(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==CR.prototype&&(t=nMt(t)),n)a.endEmitted?rE(e,new hMt):Sj(e,a,t,!0);else if(a.ended)rE(e,new cMt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Sj(e,a,t,!1):Ej(e,a)):Sj(e,a,t,!1)}else n||(a.reading=!1,Ej(e,a))}return!a.ended&&(a.length=dSe?e=dSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function vSe(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=pMt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Bu.prototype.read=function(e){nu("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return nu("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Mj(this):PR(this),null;if(e=vSe(e,t),e===0&&t.ended)return t.length===0&&Mj(this),null;var n=t.needReadable;nu("need readable",n),(t.length===0||t.length-e0?i=xSe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Mj(this)),i!==null&&this.emit("data",i),i};function gMt(e,t){if(nu("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?PR(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ySe(e)))}}function PR(e){var t=e._readableState;nu("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(nu("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ySe,e))}function ySe(e){var t=e._readableState;nu("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Cj(e)}function Ej(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(mMt,e,t))}function mMt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&bSe(n.pipes,e)!==-1)&&!u&&(nu("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){nu("onerror",b),_(),e.removeListener("error",h),pSe(e,"error")===0&&rE(e,b)}dMt(e,"error",h);function d(){e.removeListener("finish",v),_()}e.once("close",d);function v(){nu("onfinish"),e.removeListener("close",d),_()}e.once("finish",v);function _(){nu("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(nu("pipe resume"),r.resume()),e};function yMt(e){return function(){var r=e._readableState;nu("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&pSe(e,"data")&&(r.flowing=!0,Cj(e))}}Bu.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,nu("on readable",n.length,n.reading),n.length?PR(this):n.reading||process.nextTick(_Mt,this)),r};Bu.prototype.addListener=Bu.prototype.on;Bu.prototype.removeListener=function(e,t){var r=iE.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(_Se,this),r};Bu.prototype.removeAllListeners=function(e){var t=iE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(_Se,this),t};function _Se(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 _Mt(e){nu("readable nexttick read 0"),e.read(0)}Bu.prototype.resume=function(){var e=this._readableState;return e.flowing||(nu("resume"),e.flowing=!e.readableListening,xMt(this,e)),e.paused=!1,this};function xMt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(bMt,e,t))}function bMt(e,t){nu("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Cj(e),t.flowing&&!t.reading&&e.read(0)}Bu.prototype.pause=function(){return nu("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(nu("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Cj(e){var t=e._readableState;for(nu("flow",t.flowing);t.flowing&&e.read()!==null;);}Bu.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(nu("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(nu("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a=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 Mj(e){var t=e._readableState;nu("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(wMt,t,e))}function wMt(e,t){if(nu("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Bu.from=function(e,t){return Tj===void 0&&(Tj=hSe()),Tj(Bu,e,t)});function bSe(e,t){for(var r=0,n=e.length;r{"use strict";ASe.exports=Gy;var IR=p2().codes,TMt=IR.ERR_METHOD_NOT_IMPLEMENTED,AMt=IR.ERR_MULTIPLE_CALLBACK,SMt=IR.ERR_TRANSFORM_ALREADY_TRANSFORMING,MMt=IR.ERR_TRANSFORM_WITH_LENGTH_0,RR=g2();Uy()(Gy,RR);function EMt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new AMt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";MSe.exports=nE;var SSe=Lj();Uy()(nE,SSe);function nE(e){if(!(this instanceof nE))return new nE(e);SSe.call(this,e)}nE.prototype._transform=function(e,t,r){r(null,e)}});var ISe=ye((Jhr,PSe)=>{"use strict";var Pj;function CMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var LSe=p2().codes,LMt=LSe.ERR_MISSING_ARGS,PMt=LSe.ERR_STREAM_DESTROYED;function kSe(e){if(e)throw e}function IMt(e){return e.setHeader&&typeof e.abort=="function"}function RMt(e,t,r,n){n=CMt(n);var i=!1;e.on("close",function(){i=!0}),Pj===void 0&&(Pj=MR()),Pj(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,IMt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new PMt("pipe"))}}}function CSe(e){e()}function DMt(e,t){return e.pipe(t)}function FMt(e){return!e.length||typeof e[e.length-1]!="function"?kSe:e.pop()}function zMt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return RMt(o,l,u,function(c){i||(i=c),c&&a.forEach(CSe),!l&&(a.forEach(CSe),n(i))})});return t.reduce(DMt)}PSe.exports=zMt});var DSe=ye(($hr,RSe)=>{RSe.exports=K0;var Ij=pb().EventEmitter,OMt=Uy();OMt(K0,Ij);K0.Readable=pj();K0.Writable=hj();K0.Duplex=g2();K0.Transform=Lj();K0.PassThrough=ESe();K0.finished=MR();K0.pipeline=ISe();K0.Stream=K0;function K0(){Ij.call(this)}K0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Ij.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var mA=ye(fu=>{var FSe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),zj(t)?r.showHidden=t:t&&fu._extend(r,t),w2(r.showHidden)&&(r.showHidden=!1),w2(r.depth)&&(r.depth=2),w2(r.colors)&&(r.colors=!1),w2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=BMt),OR(r,e,r.depth)}fu.inspect=O_;O_.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]};O_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function BMt(e,t){var r=O_.styles[t];return r?"\x1B["+O_.colors[r][0]+"m"+e+"\x1B["+O_.colors[r][1]+"m":e}function NMt(e,t){return e}function UMt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function OR(e,t,r){if(e.customInspect&&t&&zR(t.inspect)&&t.inspect!==fu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return NR(n)||(n=OR(e,n,r)),n}var i=VMt(e,t);if(i)return i;var a=Object.keys(t),o=UMt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),oE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Rj(t);if(a.length===0){if(zR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(aE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(qR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(oE(t))return Rj(t)}var l="",u=!1,c=["{","}"];if(OSe(t)&&(u=!0,c=["[","]"]),zR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(aE(t)&&(l=" "+RegExp.prototype.toString.call(t)),qR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),oE(t)&&(l=" "+Rj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return aE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=GMt(e,t,r,o,a):h=a.map(function(d){return Fj(e,t,r,o,d,u)}),e.seen.pop(),HMt(h,l,c)}function VMt(e,t){if(w2(t))return e.stylize("undefined","undefined");if(NR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(qSe(t))return e.stylize(""+t,"number");if(zj(t))return e.stylize(""+t,"boolean");if(BR(t))return e.stylize("null","null")}function Rj(e){return"["+Error.prototype.toString.call(e)+"]"}function GMt(e,t,r,n,i){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")),w2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function HMt(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` `)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}fu.types=JH();function OSe(e){return Array.isArray(e)}fu.isArray=OSe;function zj(e){return typeof e=="boolean"}fu.isBoolean=zj;function BR(e){return e===null}fu.isNull=BR;function jMt(e){return e==null}fu.isNullOrUndefined=jMt;function qSe(e){return typeof e=="number"}fu.isNumber=qSe;function NR(e){return typeof e=="string"}fu.isString=NR;function WMt(e){return typeof e=="symbol"}fu.isSymbol=WMt;function w2(e){return e===void 0}fu.isUndefined=w2;function aE(e){return gA(e)&&Oj(e)==="[object RegExp]"}fu.isRegExp=aE;fu.types.isRegExp=aE;function gA(e){return typeof e=="object"&&e!==null}fu.isObject=gA;function qR(e){return gA(e)&&Oj(e)==="[object Date]"}fu.isDate=qR;fu.types.isDate=qR;function oE(e){return gA(e)&&(Oj(e)==="[object Error]"||e instanceof Error)}fu.isError=oE;fu.types.isNativeError=oE;function zR(e){return typeof e=="function"}fu.isFunction=zR;function XMt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}fu.isPrimitive=XMt;fu.isBuffer=$H();function Oj(e){return Object.prototype.toString.call(e)}function Dj(e){return e<10?"0"+e.toString(10):e.toString(10)}var ZMt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function YMt(){var e=new Date,t=[Dj(e.getHours()),Dj(e.getMinutes()),Dj(e.getSeconds())].join(":");return[e.getDate(),ZMt[e.getMonth()],t].join(" ")}fu.log=function(){console.log("%s - %s",YMt(),fu.format.apply(fu,arguments))};fu.inherits=Uy();fu._extend=function(e,t){if(!t||!gA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function BSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var b2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;fu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(b2&&t[b2]){var r=t[b2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,b2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s{"use strict";function q_(e){"@babel/helpers - typeof";return q_=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},q_(e)}function NSe(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 s4t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function l4t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function u4t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}sE("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);sE("ERR_INVALID_ARG_TYPE",function(e,t,r){yA===void 0&&(yA=lE()),yA(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&s4t(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(l4t(e," argument"))i="The ".concat(e," ").concat(n," ").concat(USe(t,"type"));else{var a=u4t(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(USe(t,"type"))}return i+=". Received type ".concat(q_(r)),i},TypeError);sE("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";qj===void 0&&(qj=mA());var n=qj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);sE("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(q_(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);sE("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 n="The ",i=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments");break}return"".concat(n," must be specified")},TypeError);GSe.exports.codes=VSe});var QSe=ye((tdr,$Se)=>{"use strict";function HSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jSe(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function x4t(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 jg="",uE="",cE="",Tv="",T2={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:"},b4t=10;function ZSe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function fE(e){return Gj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function w4t(e,t,r){var n="",i="",a=0,o="",s=!1,l=fE(e),u=l.split(` `),c=fE(t).split(` `),f=0,h="";if(r==="strictEqual"&&Dp(e)==="object"&&Dp(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=b4t){if((Dp(e)!=="object"||e===null)&&(Dp(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(T2[r],` `)+"".concat(u[0]," !== ").concat(c[0],` `)}else if(r!=="strictEqualObject"){var v=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d2&&(h=` `.concat(x4t(" ",f),"^"),f=0)}}}for(var _=u[u.length-1],b=c[c.length-1];_===b&&(f++<2?o=` `.concat(_).concat(o):n=_,u.pop(),c.pop(),!(u.length===0||c.length===0));)_=u[u.length-1],b=c[c.length-1];var p=Math.max(u.length,c.length);if(p===0){var k=l.split(` `);if(k.length>30)for(k[26]="".concat(jg,"...").concat(Tv);k.length>27;)k.pop();return"".concat(T2.notIdentical,` `).concat(k.join(` `),` `)}f>3&&(o=` `.concat(jg,"...").concat(Tv).concat(o),s=!0),n!==""&&(o=` `.concat(n).concat(o),n="");var E=0,S=T2[r]+` `.concat(uE,"+ actual").concat(Tv," ").concat(cE,"- expected").concat(Tv),L=" ".concat(jg,"...").concat(Tv," Lines skipped");for(f=0;f1&&f>2&&(x>4?(i+=` `.concat(jg,"...").concat(Tv),s=!0):x>3&&(i+=` `.concat(c[f-2]),E++),i+=` `.concat(c[f-1]),E++),a=f,n+=` `.concat(cE,"-").concat(Tv," ").concat(c[f]),E++;else if(c.length1&&f>2&&(x>4?(i+=` `.concat(jg,"...").concat(Tv),s=!0):x>3&&(i+=` `.concat(u[f-2]),E++),i+=` `.concat(u[f-1]),E++),a=f,i+=` `.concat(uE,"+").concat(Tv," ").concat(u[f]),E++;else{var C=c[f],M=u[f],g=M!==C&&(!XSe(M,",")||M.slice(0,-1)!==C);g&&XSe(C,",")&&C.slice(0,-1)===M&&(g=!1,M+=","),g?(x>1&&f>2&&(x>4?(i+=` `.concat(jg,"...").concat(Tv),s=!0):x>3&&(i+=` `.concat(u[f-2]),E++),i+=` `.concat(u[f-1]),E++),a=f,i+=` `.concat(uE,"+").concat(Tv," ").concat(M),n+=` `.concat(cE,"-").concat(Tv," ").concat(C),E+=2):(i+=n,n="",(x===1||f===0)&&(i+=` `.concat(M),E++))}if(E>20&&f30)for(d[26]="".concat(jg,"...").concat(Tv);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,` `).concat(d.join(` `),` `))}else{var v=fE(u),_="",b=T2[s];s==="notDeepEqual"||s==="notEqual"?(v="".concat(T2[s],` `).concat(v),v.length>1024&&(v="".concat(v.slice(0,1021),"..."))):(_="".concat(fE(c)),v.length>512&&(v="".concat(v.slice(0,509),"...")),_.length>512&&(_="".concat(_.slice(0,509),"...")),s==="deepEqual"||s==="equal"?v="".concat(b,` `).concat(v,` should equal `):_=" ".concat(s," ").concat(_)),a=r.call(this,"".concat(v).concat(_))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(Uj(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(Uj(a),l),a.stack,a.name="AssertionError",KSe(a)}return h4t(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return Gj(this,jSe(jSe({},o),{},{customInspect:!1,depth:0}))}}]),n}(Vj(Error),Gj.custom);$Se.exports=T4t});var Hj=ye((rdr,tMe)=>{"use strict";var eMe=Object.prototype.toString;tMe.exports=function(t){var r=eMe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&eMe.call(t.callee)==="[object Function]"),n}});var cMe=ye((idr,uMe)=>{"use strict";var lMe;Object.keys||(vE=Object.prototype.hasOwnProperty,jj=Object.prototype.toString,rMe=Hj(),Wj=Object.prototype.propertyIsEnumerable,iMe=!Wj.call({toString:null},"toString"),nMe=Wj.call(function(){},"prototype"),pE=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],GR=function(e){var t=e.constructor;return t&&t.prototype===e},aMe={$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},oMe=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!aMe["$"+e]&&vE.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{GR(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),sMe=function(e){if(typeof window=="undefined"||!oMe)return GR(e);try{return GR(e)}catch(t){return!1}},lMe=function(t){var r=t!==null&&typeof t=="object",n=jj.call(t)==="[object Function]",i=rMe(t),a=r&&jj.call(t)==="[object String]",o=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=nMe&&n;if(a&&t.length>0&&!vE.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var A4t=Array.prototype.slice,S4t=Hj(),fMe=Object.keys,HR=fMe?function(t){return fMe(t)}:cMe(),hMe=Object.keys;HR.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return S4t(n)?hMe(A4t.call(n)):hMe(n)})}else Object.keys=HR;return Object.keys||HR};dMe.exports=HR});var _Me=ye((adr,yMe)=>{"use strict";var M4t=Xj(),gMe=j8()(),mMe=lA(),vMe=Object,E4t=mMe("Array.prototype.push"),pMe=mMe("Object.prototype.propertyIsEnumerable"),k4t=gMe?Object.getOwnPropertySymbols:null;yMe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=vMe(t);if(arguments.length===1)return n;for(var i=1;i{"use strict";var Zj=_Me(),C4t=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var wMe=function(e){return e!==e};TMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||wMe(t)&&wMe(r))}});var jR=ye((ldr,AMe)=>{"use strict";var P4t=Yj();AMe.exports=function(){return typeof Object.is=="function"?Object.is:P4t}});var gE=ye((udr,kMe)=>{"use strict";var I4t=Xj(),R4t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",D4t=Object.prototype.toString,F4t=Array.prototype.concat,SMe=Object.defineProperty,z4t=function(e){return typeof e=="function"&&D4t.call(e)==="[object Function]"},O4t=PH()(),MMe=SMe&&O4t,q4t=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!z4t(n)||!n())return}MMe?SMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},EMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=I4t(t);R4t&&(n=F4t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{"use strict";var B4t=jR(),N4t=gE();CMe.exports=function(){var t=B4t();return N4t(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var DMe=ye((fdr,RMe)=>{"use strict";var U4t=gE(),V4t=X4(),G4t=Yj(),PMe=jR(),H4t=LMe(),IMe=V4t(PMe(),Object);U4t(IMe,{getPolyfill:PMe,implementation:G4t,shim:H4t});RMe.exports=IMe});var Kj=ye((hdr,FMe)=>{"use strict";FMe.exports=function(t){return t!==t}});var Jj=ye((ddr,zMe)=>{"use strict";var j4t=Kj();zMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:j4t}});var qMe=ye((vdr,OMe)=>{"use strict";var W4t=gE(),X4t=Jj();OMe.exports=function(){var t=X4t();return W4t(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var VMe=ye((pdr,UMe)=>{"use strict";var Z4t=X4(),Y4t=gE(),K4t=Kj(),BMe=Jj(),J4t=qMe(),NMe=Z4t(BMe(),Number);Y4t(NMe,{getPolyfill:BMe,implementation:K4t,shim:J4t});UMe.exports=NMe});var l4e=ye((gdr,s4e)=>{"use strict";function GMe(e,t){return tEt(e)||eEt(e,t)||Q4t(e,t)||$4t()}function $4t(){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 Q4t(e,t){if(e){if(typeof e=="string")return HMe(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 HMe(e,t)}}function HMe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function ZR(e){return Object.keys(e).filter(cEt).concat(KR(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function i4e(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i{"use strict";function Wg(e){"@babel/helpers - typeof";return Wg=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},Wg(e)}function u4e(e,t){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{var bE=1e3,wE=bE*60,TE=wE*60,AE=TE*24,zEt=AE*365.25;E4e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return OEt(e);if(r==="number"&&isNaN(e)===!1)return t.long?BEt(e):qEt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function OEt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*zEt;case"days":case"day":case"d":return r*AE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*TE;case"minutes":case"minute":case"mins":case"min":case"m":return r*wE;case"seconds":case"second":case"secs":case"sec":case"s":return r*bE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function qEt(e){return e>=AE?Math.round(e/AE)+"d":e>=TE?Math.round(e/TE)+"h":e>=wE?Math.round(e/wE)+"m":e>=bE?Math.round(e/bE)+"s":e+"ms"}function BEt(e){return nD(e,AE,"day")||nD(e,TE,"hour")||nD(e,wE,"minute")||nD(e,bE,"second")||e+" ms"}function nD(e,t,r){if(!(e{Lc=C4e.exports=nW.debug=nW.default=nW;Lc.coerce=HEt;Lc.disable=VEt;Lc.enable=UEt;Lc.enabled=GEt;Lc.humanize=k4e();Lc.names=[];Lc.skips=[];Lc.formatters={};var iW;function NEt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Lc.colors[Math.abs(t)%Lc.colors.length]}function nW(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(iW||n);r.diff=i,r.prev=iW,r.curr=n,iW=n;for(var a=new Array(arguments.length),o=0;o{lp=I4e.exports=L4e();lp.log=XEt;lp.formatArgs=WEt;lp.save=ZEt;lp.load=P4e;lp.useColors=jEt;lp.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:YEt();lp.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function jEt(){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+)/)}lp.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function WEt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+lp.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(n++,a==="%c"&&(i=n))}),e.splice(i,0,r)}}function XEt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ZEt(e){try{e==null?lp.storage.removeItem("debug"):lp.storage.debug=e}catch(t){}}function P4e(){var e;try{e=lp.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}lp.enable(P4e());function YEt(){try{return window.localStorage}catch(e){}}});var U4e=ye((_dr,N4e)=>{var xA=lE(),V_=R4e()("stream-parser");N4e.exports=JEt;var F4e=-1,aD=0,KEt=1,z4e=2;function JEt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");V_("extending Parser into stream"),e._bytes=$Et,e._skipBytes=QEt,t&&(e._passthrough=ekt),t?e._transform=rkt:e._write=tkt}function SE(e){V_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=F4e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function $Et(e,t){xA(!this._parserCallback,'there is already a "callback" set!'),xA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||SE(this),V_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=aD}function QEt(e,t){xA(!this._parserCallback,'there is already a "callback" set!'),xA(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||SE(this),V_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=KEt}function ekt(e,t){xA(!this._parserCallback,'There is already a "callback" set!'),xA(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||SE(this),V_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=z4e}function tkt(e,t,r){this._parserInit||SE(this),V_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),q4e(this,e,null,r)}function rkt(e,t,r){this._parserInit||SE(this),V_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),q4e(this,e,t,r)}function O4e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return D4e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return D4e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return O4e(e,t.slice(i.length),r,n)}})}}function D4e(e,t,r,n){if(e._parserBytesLeft-=t.length,V_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===aD?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===z4e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===aD&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==aD&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=F4e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(B4e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var q4e=B4e(O4e);function B4e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var rc=ye(Hy=>{"use strict";var V4e=DSe().Transform,ikt=U4e();function ME(){V4e.call(this,{readableObjectMode:!0})}ME.prototype=Object.create(V4e.prototype);ME.prototype.constructor=ME;ikt(ME.prototype);Hy.ParserStream=ME;Hy.sliceEq=function(e,t,r){for(var n=t,i=0;i{"use strict";var bA=rc().readUInt16BE,oW=rc().readUInt32BE;function EE(e,t){if(e.length<4+t)return null;var r=oW(e,t);return e.length>4&15,n=e[4]&15,i=e[5]>>4&15,a=bA(e,6),o=8,s=0;sa.width||i.width===a.width&&i.height>a.height?i:a}),r=e.reduce(function(i,a){return i.height>a.height||i.height===a.height&&i.width>a.width?i:a}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}sD.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(lkt(e,t),!!t.sizes.length){var r=ukt(t.sizes),n=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type==="imir"&&(a.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),a.type==="irot")for(var l=0;l{"use strict";function lD(e,t){var r=new Error(e);return r.code=t,r}function ckt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function jy(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw lD("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}jy.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)}};jy.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw lD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};jy.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw lD("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};jy.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};jy.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}};jy.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}};jy.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;ithis.input.length)throw lD("unexpected EOF","EBADDATA");for(var h=[],d=c,v=0;v0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};sW.exports.ExifParser=jy;sW.exports.get_orientation=function(e){var t=0;try{return new jy(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var j4e=ye((Tdr,H4e)=>{"use strict";var fkt=rc().str2arr,hkt=rc().sliceEq,dkt=rc().readUInt32BE,cD=G4e(),vkt=uD(),pkt=fkt("ftyp");H4e.exports=function(e){if(hkt(e,4,pkt)){var t=cD.unbox(e,0);if(t){var r=cD.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=cD.unbox(e,i);if(!a)break;if(i=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){n=a.data;break}}if(n){var o=cD.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=dkt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=vkt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var Z4e=ye((Adr,X4e)=>{"use strict";var gkt=rc().str2arr,mkt=rc().sliceEq,W4e=rc().readUInt16LE,ykt=gkt("BM");X4e.exports=function(e){if(!(e.length<26)&&mkt(e,0,ykt))return{width:W4e(e,18),height:W4e(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var Q4e=ye((Sdr,$4e)=>{"use strict";var J4e=rc().str2arr,Y4e=rc().sliceEq,K4e=rc().readUInt16LE,_kt=J4e("GIF87a"),xkt=J4e("GIF89a");$4e.exports=function(e){if(!(e.length<10)&&!(!Y4e(e,0,_kt)&&!Y4e(e,0,xkt)))return{width:K4e(e,6),height:K4e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var rEe=ye((Mdr,tEe)=>{"use strict";var lW=rc().readUInt16LE,bkt=0,wkt=1,eEe=16;tEe.exports=function(e){var t=lW(e,0),r=lW(e,2),n=lW(e,4);if(!(t!==bkt||r!==wkt||!n)){for(var i=[],a={width:0,height:0},o=0;oa.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var nEe=ye((Edr,iEe)=>{"use strict";var uW=rc().readUInt16BE,Tkt=rc().str2arr,Akt=rc().sliceEq,Skt=uD(),Mkt=Tkt("Exif\0\0");iEe.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=uW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&Akt(e,t,Mkt)&&(i=Skt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(a.orientation=i),a}t+=n}}});var uEe=ye((kdr,lEe)=>{"use strict";var sEe=rc().str2arr,aEe=rc().sliceEq,oEe=rc().readUInt32BE,Ekt=sEe(`\x89PNG\r  `),kkt=sEe("IHDR");lEe.exports=function(e){if(!(e.length<24)&&aEe(e,0,Ekt)&&aEe(e,12,kkt))return{width:oEe(e,16),height:oEe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var hEe=ye((Cdr,fEe)=>{"use strict";var Ckt=rc().str2arr,Lkt=rc().sliceEq,cEe=rc().readUInt32BE,Pkt=Ckt("8BPS\0");fEe.exports=function(e){if(!(e.length<22)&&Lkt(e,0,Pkt))return{width:cEe(e,18),height:cEe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var pEe=ye((Ldr,vEe)=>{"use strict";function Ikt(e){return e===32||e===9||e===13||e===10}function wA(e){return typeof e=="number"&&isFinite(e)&&e>0}function Rkt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,Fkt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,zkt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,Okt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,qkt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,dEe=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Bkt(e){var t=e.match(zkt),r=e.match(Okt),n=e.match(qkt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Um(e){return dEe.test(e)?e.match(dEe)[0]:"px"}vEe.exports=function(e){if(Rkt(e)){for(var t="",r=0;r{"use strict";var yEe=rc().str2arr,gEe=rc().sliceEq,Nkt=rc().readUInt16LE,Ukt=rc().readUInt16BE,Vkt=rc().readUInt32LE,Gkt=rc().readUInt32BE,Hkt=yEe("II*\0"),jkt=yEe("MM\0*");function fD(e,t,r){return r?Ukt(e,t):Nkt(e,t)}function cW(e,t,r){return r?Gkt(e,t):Vkt(e,t)}function mEe(e,t,r){var n=fD(e,t+2,r),i=cW(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?fD(e,t+8,r):cW(e,t+8,r)}_Ee.exports=function(e){if(!(e.length<8)&&!(!gEe(e,0,Hkt)&&!gEe(e,0,jkt))){var t=e[0]===77,r=cW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=fD(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var TEe=rc().str2arr,bEe=rc().sliceEq,wEe=rc().readUInt16LE,fW=rc().readUInt32LE,Wkt=uD(),Xkt=TEe("RIFF"),Zkt=TEe("WEBP");function Ykt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:wEe(e,t+6)&16383,height:wEe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function Kkt(e,t){if(e[t]===47){var r=fW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function Jkt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<e.length)){for(;t+8=10?r=r||Ykt(e,t+8):a==="VP8L"&&o>=9?r=r||Kkt(e,t+8):a==="VP8X"&&o>=10?r=r||Jkt(e,t+8):a==="EXIF"&&(n=Wkt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var EEe=ye((Rdr,MEe)=>{"use strict";MEe.exports={avif:j4e(),bmp:Z4e(),gif:Q4e(),ico:rEe(),jpeg:nEe(),png:uEe(),psd:hEe(),svg:pEe(),tiff:xEe(),webp:SEe()}});var kEe=ye((Ddr,dW)=>{"use strict";var hW=EEe();function $kt(e){for(var t=Object.keys(hW),r=0;r{"use strict";var Qkt=kEe(),eCt=Py().IMAGE_URL_PREFIX,tCt=c2().Buffer;CEe.getImageSize=function(e){var t=e.replace(eCt,""),r=new tCt(t,"base64");return Qkt(r)}});var REe=ye((zdr,IEe)=>{"use strict";var PEe=Dr(),rCt=YT(),iCt=Eo(),hD=ho(),nCt=Dr().maxRowLength,aCt=LEe().getImageSize;IEe.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=nCt(r.z);else if(r._hasSource){var a=aCt(r.source);n=a.height,i=a.width}var o=hD.getFromId(t,r.xaxis||"x"),s=hD.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+i*r.dx],h=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var uCt=Oa(),A2=Dr(),DEe=A2.strTranslate,cCt=Wp(),fCt=YT(),hCt=QV(),dCt=h8().STYLE;FEe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&hCt();A2.makeTraceGroups(i,n,"im").each(function(l){var u=uCt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var d=c.z,v=c.x0,_=c.y0,b=c.w,p=c.h,k=f.dx,E=f.dy,S,L,x,C,M,g;for(g=0;S===void 0&&g0;)L=a.c2p(v+g*k),g--;for(g=0;C===void 0&&g0;)M=o.c2p(_+g*E),g--;if(LH[0];if(te||oe){var _e=S+T/2,Ee=C+z/2;j+="transform:"+DEe(_e+"px",Ee+"px")+"scale("+(te?-1:1)+","+(oe?-1:1)+")"+DEe(-_e+"px",-Ee+"px")+";"}}Z.attr("style",j);var Ce=new Promise(function(me){if(f._hasZ)me();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===p&&f._canvas.source===f.source)me();else{var ie=document.createElement("canvas");ie.width=b,ie.height=p;var Se=ie.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var Le=f._image;Le.onload=function(){Se.drawImage(Le,0,0),f._canvas={el:ie,source:f.source},me()},Le.setAttribute("src",f.source)}}).then(function(){var me,ie;if(f._hasZ)ie=G(function(Ae,Fe){var Pe=d[Fe][Ae];return A2.isTypedArray(Pe)&&(Pe=Array.from(Pe)),Pe}),me=ie.toDataURL("image/png");else if(f._hasSource)if(h)me=f.source;else{var Se=f._canvas.el.getContext("2d",{willReadFrequently:!0}),Le=Se.getImageData(0,0,b,p).data;ie=G(function(Ae,Fe){var Pe=4*(Fe*b+Ae);return[Le[Pe],Le[Pe+1],Le[Pe+2],Le[Pe+3]]}),me=ie.toDataURL("image/png")}Z.attr({"xlink:href":me,height:z,width:T,x:S,y:C})});t._promises.push(Ce)})}});var qEe=ye((qdr,OEe)=>{"use strict";var vCt=Oa();OEe.exports=function(t){vCt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var VEe=ye((Bdr,UEe)=>{"use strict";var BEe=vf(),NEe=Dr(),dD=NEe.isArrayOrTypedArray,pCt=YT();UEe.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(BEe.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||BEe.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var l=Math.floor((r-i.x0)/a.dx),u=Math.floor(Math.abs(n-i.y0)/a.dy),c;if(a._hasZ?c=i.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=i.hi||a.hoverinfo,h;if(f){var d=f.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var v=pCt.colormodel[a.colormodel],_=v.colormodel||a.colormodel,b=_.length,p=a._scaler(c),k=v.suffix,E=[];(a.hovertemplate||h)&&(E.push("["+[p[0]+k[0],p[1]+k[1],p[2]+k[2]].join(", ")),b===4&&E.push(", "+p[3]+k[3]),E.push("]"),E=E.join(""),t.extraText=_.toUpperCase()+": "+E);var S;dD(a.hovertext)&&dD(a.hovertext[u])?S=a.hovertext[u][l]:dD(a.text)&&dD(a.text[u])&&(S=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),x=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,M="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[NEe.extendFlat(t,{index:[u,l],x0:o.c2p(i.x0+l*a.dx),x1:o.c2p(i.x0+(l+1)*a.dx),y0:L,y1:L,color:p,xVal:x,xLabelVal:x,yVal:C,yLabelVal:C,zLabelVal:M,text:S,hovertemplateLabels:{zLabel:M,colorLabel:E,"color[0]Label":p[0]+k[0],"color[1]Label":p[1]+k[1],"color[2]Label":p[2]+k[2],"color[3]Label":p[3]+k[3]}})]}}}});var HEe=ye((Ndr,GEe)=>{"use strict";GEe.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 WEe=ye((Udr,jEe)=>{"use strict";jEe.exports={attributes:uH(),supplyDefaults:V3e(),calc:REe(),plot:zEe(),style:qEe(),hoverPoints:VEe(),eventData:HEe(),moduleType:"trace",name:"image",basePlotModule:ph(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var ZEe=ye((Vdr,XEe)=>{"use strict";XEe.exports=WEe()});var M2=ye((Gdr,KEe)=>{"use strict";var vW=Gl(),gCt=Cc().attributes,mCt=ec(),yCt=Lh(),{hovertemplateAttrs:_Ct,texttemplateAttrs:xCt,templatefallbackAttrs:YEe}=Ll(),S2=Ao().extendFlat,bCt=Pd().pattern,vD=mCt({editType:"plot",arrayOk:!0,colorEditType:"plot"});KEe.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:yCt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:bCt,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:S2({},vW.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:_Ct({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:YEe(),texttemplate:xCt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:YEe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:S2({},vD,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:S2({},vD,{}),outsidetextfont:S2({},vD,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:S2({},vW.showlegend,{arrayOk:!0}),legend:S2({},vW.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:S2({},vD,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:gCt({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 E2=ye((Hdr,QEe)=>{"use strict";var wCt=Eo(),kE=Dr(),TCt=M2(),ACt=Cc().defaults,SCt=r0().handleText,MCt=Dr().coercePattern;function JEe(e,t){var r=kE.isArrayOrTypedArray(e),n=kE.isArrayOrTypedArray(t),i=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(i)||(i=0),i&&n){for(var a,o=0;o0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function $Ee(e,t,r,n,i){var a=n("marker.line.width");a&&n("marker.line.color",i?void 0:r.paper_bgcolor);var o=n("marker.colors");MCt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function ECt(e,t,r,n){function i(k,E){return kE.coerce(e,t,TCt,k,E)}var a=i("labels"),o=i("values"),s=JEe(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!l){t.visible=!1;return}t._length=l,$Ee(e,t,n,i,!0),i("scalegroup");var u=i("text"),c=i("texttemplate");i("texttemplatefallback");var f;if(c||(f=i("textinfo",kE.isArrayOrTypedArray(u)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),c||f&&f!=="none"){var h=i("textposition");SCt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",v=d||h==="outside";v&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else f==="none"&&i("textposition","none");ACt(t,n,i);var _=i("hole"),b=i("title.text");if(b){var p=i("title.position",_?"middle center":"top center");!_&&p==="middle center"&&(t.title.position="top center"),kE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}QEe.exports={handleLabelsAndValues:JEe,handleMarkerDefaults:$Ee,supplyDefaults:ECt}});var pD=ye((jdr,eke)=>{"use strict";eke.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var rke=ye((Wdr,tke)=>{"use strict";var kCt=Dr(),CCt=pD();tke.exports=function(t,r){function n(i,a){return kCt.coerce(t,r,CCt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var TA=ye((Xdr,ake)=>{"use strict";var LCt=Eo(),pW=cd(),PCt=ka(),ICt={};function RCt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c=0});var S=t.type==="funnelarea"?_:t.sort;return S&&r.sort(function(L,x){return x.v-L.v}),r[0]&&(r[0].vTotal=v),r}function ike(e){return function(r,n){return!r||(r=pW(r),!r.isValid())?!1:(r=PCt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function DCt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,a=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=nke(a,ICt));for(var s=0,l=0;l{"use strict";var FCt=ip().appendArrayMultiPointValues;oke.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),FCt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var _D=ye((Ydr,kke)=>{"use strict";var Fp=Oa(),zCt=Mc(),gD=vf(),dke=ka(),Wy=So(),rv=Dr(),OCt=rv.strScale,lke=rv.strTranslate,gW=ru(),vke=bv(),qCt=vke.recordMinTextSize,BCt=vke.clearMinTextSize,pke=e2().TEXTPAD,ns=l_(),mD=ske(),uke=Dr().isValidTextValue;function NCt(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;BCt("pie",n),yke(t,e),Ske(t,i);var a=rv.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Fp.select(this),l=o[0],u=l.trace;YCt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=Fp.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(S,L){if(S.hidden){Fp.select(this).selectAll("path,g").remove();return}S.pointNumber=S.i,S.curveNumber=u.index,f[S.pxmid[1]<0?0:1][S.pxmid[0]<0?0:1].push(S);var x=l.cx,C=l.cy,M=Fp.select(this),g=M.selectAll("path.surface").data([S]);if(g.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),M.call(gke,e,o),u.pull){var P=+ns.castOption(u.pull,S.pts)||0;P>0&&(x+=P*S.pxmid[0],C+=P*S.pxmid[1])}S.cxFinal=x,S.cyFinal=C;function T(N,H,te,oe){var _e=oe*(H[0]-N[0]),Ee=oe*(H[1]-N[1]);return"a"+oe*l.r+","+oe*l.r+" 0 "+S.largeArc+(te?" 1 ":" 0 ")+_e+","+Ee}var z=u.hole;if(S.v===l.vTotal){var O="M"+(x+S.px0[0])+","+(C+S.px0[1])+T(S.px0,S.pxmid,!0,1)+T(S.pxmid,S.px0,!0,1)+"Z";z?g.attr("d","M"+(x+z*S.px0[0])+","+(C+z*S.px0[1])+T(S.px0,S.pxmid,!1,z)+T(S.pxmid,S.px0,!1,z)+"Z"+O):g.attr("d",O)}else{var V=T(S.px0,S.px1,!0,1);if(z){var G=1-z;g.attr("d","M"+(x+z*S.px1[0])+","+(C+z*S.px1[1])+T(S.px1,S.px0,!1,z)+"l"+G*S.px0[0]+","+G*S.px0[1]+V+"Z")}else g.attr("d","M"+x+","+C+"l"+S.px0[0]+","+S.px0[1]+V+"Z")}Mke(e,S,l);var Z=ns.castOption(u.textposition,S.pts),j=M.selectAll("g.slicetext").data(S.text&&Z!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var N=rv.ensureSingle(Fp.select(this),"text","",function(ie){ie.attr("data-notex",1)}),H=rv.ensureUniformFontSize(e,Z==="outside"?VCt(u,S,n.font):mke(u,S,n.font));N.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Wy.font,H).call(gW.convertToTspans,e);var te=Wy.bBox(N.node()),oe;if(Z==="outside")oe=hke(te,S);else if(oe=_ke(te,S,l),Z==="auto"&&oe.scale<1){var _e=rv.ensureUniformFontSize(e,u.outsidetextfont);N.call(Wy.font,_e),te=Wy.bBox(N.node()),oe=hke(te,S)}var Ee=oe.textPosAngle,Ce=Ee===void 0?S.pxmid:yD(l.r,Ee);if(oe.targetX=x+Ce[0]*oe.rCenter+(oe.x||0),oe.targetY=C+Ce[1]*oe.rCenter+(oe.y||0),Eke(oe,te),oe.outside){var me=oe.targetY;S.yLabelMin=me-te.height/2,S.yLabelMid=me,S.yLabelMax=me+te.height/2,S.labelExtraX=0,S.labelExtraY=0,h=!0}oe.fontSize=H.size,qCt(u.type,oe,n),o[L].transform=oe,rv.setTransormAndDisplay(N,oe)})});var d=Fp.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var S=rv.ensureSingle(Fp.select(this),"text","",function(C){C.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=rv.templateString(L,u._meta)),S.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Wy.font,u.title.font).call(gW.convertToTspans,e);var x;u.title.position==="middle center"?x=jCt(l):x=Tke(l,i),S.attr("transform",lke(x.x,x.y)+OCt(Math.min(1,x.scale))+lke(x.tx,x.ty))}),h&&XCt(f,u),UCt(c,u),h&&u.automargin){var v=Wy.bBox(s.node()),_=u.domain,b=i.w*(_.x[1]-_.x[0]),p=i.h*(_.y[1]-_.y[0]),k=(.5*b-l.r)/i.w,E=(.5*p-l.r)/i.h;zCt.autoMargin(e,"pie."+u.uid+".automargin",{xl:_.x[0]-k,xr:_.x[1]+k,yb:_.y[0]-E,yt:_.y[1]+E,l:Math.max(l.cx-l.r-v.left,0),r:Math.max(v.right-(l.cx+l.r),0),b:Math.max(v.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-v.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Fp.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function UCt(e,t){e.each(function(r){var n=Fp.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var i=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,rv.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;rv.ensureSingle(n,"path","textline").call(dke.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function gke(e,t,r){var n=r[0],i=n.cx,a=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=gD.castHoverinfo({hoverinfo:[ns.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,d=i+l.pxmid[0]*(1-h),v=a+l.pxmid[1]*(1-h),_=u.separators,b=[];if(f&&f.indexOf("label")!==-1&&b.push(l.label),l.text=ns.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var p=l.text;rv.isValidTextValue(p)&&b.push(p)}l.value=l.v,l.valueLabel=ns.formatPieValue(l.v,_),f&&f.indexOf("value")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=ns.formatPiePercent(l.percent,_),f&&f.indexOf("percent")!==-1&&b.push(l.percentLabel);var k=c.hoverlabel,E=k.font,S=[];gD.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:v,_x0:s?i+l.TL[0]:d-h*n.r,_x1:s?i+l.TR[0]:d+h*n.r,_y0:s?a+l.TL[1]:v-h*n.r,_y1:s?a+l.BL[1]:v+h*n.r,text:b.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:ns.castOption(k.bgcolor,l.pts)||l.color,borderColor:ns.castOption(k.bordercolor,l.pts),fontFamily:ns.castOption(E.family,l.pts),fontSize:ns.castOption(E.size,l.pts),fontColor:ns.castOption(E.color,l.pts),nameLength:ns.castOption(k.namelength,l.pts),textAlign:ns.castOption(k.align,l.pts),hovertemplate:ns.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[mD(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:S}),l.bbox=S[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[mD(l,c)],event:Fp.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Fp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Fp.event,t.emit("plotly_unhover",{points:[mD(f,c)],event:Fp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(gD.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=[mD(l,c)],gD.click(t,Fp.event))})}function VCt(e,t,r){var n=ns.castOption(e.outsidetextfont.color,t.pts)||ns.castOption(e.textfont.color,t.pts)||r.color,i=ns.castOption(e.outsidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.outsidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.outsidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.outsidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.outsidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.outsidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.outsidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.outsidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function mke(e,t,r){var n=ns.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=ns.castOption(e._input.textfont.color,t.pts));var i=ns.castOption(e.insidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.insidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.insidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.insidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.insidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.insidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.insidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.insidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||dke.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function yke(e,t){for(var r,n,i=0;i=-4;k-=2)p(Math.PI*k,"tan");for(k=4;k>=-4;k-=2)p(Math.PI*(k+1),"tan")}if(f||d){for(k=4;k>=-4;k-=2)p(Math.PI*(k+1.5),"rad");for(k=4;k>=-4;k-=2)p(Math.PI*(k+.5),"rad")}}if(s||v||f){var E=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/E,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;_.push(b)}(v||d)&&(b=cke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,_.push(b)),(v||h)&&(b=fke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,_.push(b));for(var S=0,L=0,x=0;x<_.length;x++){var C=_[x].scale;if(L=1)break}return _[S]}function GCt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function jCt(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 Tke(e,t){var r=1,n=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=Ake(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*e.r);var l=WCt(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=mW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function WCt(e,t){return e/(t===void 0?1:t)}function mW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function Ake(e){var t=e.pull;if(!t)return 0;var r;if(rv.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function XCt(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function _(E,S){return E.pxmid[1]-S.pxmid[1]}function b(E,S){return S.pxmid[1]-E.pxmid[1]}function p(E,S){S||(S={});var L=S.labelExtraY+(n?S.yLabelMax:S.yLabelMin),x=n?E.yLabelMin:E.yLabelMax,C=n?E.yLabelMax:E.yLabelMin,M=E.cyFinal+o(E.px0[1],E.px1[1]),g=L-x,P,T,z,O,V,G;if(g*l>0&&(E.labelExtraY=g),!!rv.isArrayOrTypedArray(t.pull))for(T=0;T=(ns.castOption(t.pull,z.pts)||0))&&((E.pxmid[1]-z.pxmid[1])*l>0?(O=z.cyFinal+o(z.px0[1],z.px1[1]),g=O-x-E.labelExtraY,g*l>0&&(E.labelExtraY+=g)):(C+E.labelExtraY-M)*l>0&&(P=3*s*Math.abs(T-f.indexOf(E)),V=z.cxFinal+a(z.px0[0],z.px1[0]),G=V+P-(E.cxFinal+E.pxmid[0])-E.labelExtraX,G*s>0&&(E.labelExtraX+=G)))}for(n=0;n<2;n++)for(i=n?_:b,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(i),c=e[1-n][r],f=c.concat(u),d=[],h=0;h1?(u=r.r,c=u/i.aspectratio):(c=r.r,u=c*i.aspectratio),u*=(1+i.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=HCt(u,t))}function yD(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function Mke(e,t,r){var n=e._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(S){return s.indexOf(S)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=n.separators,v;if(v=u?[t.label]:[],c){var _=ns.getFirstFilled(i.text,t.pts);uke(_)&&v.push(_)}f&&v.push(ns.formatPieValue(t.v,d)),h&&v.push(ns.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join("
")}function b(S){return{label:S.label,value:S.v,valueLabel:ns.formatPieValue(S.v,n.separators),percent:S.v/r.vTotal,percentLabel:ns.formatPiePercent(S.v/r.vTotal,n.separators),color:S.color,text:S.text,customdata:rv.castOption(i,S.i,"customdata")}}if(a){var p=rv.castOption(i,t.i,"texttemplate");if(!p)t.text="";else{var k=b(t),E=ns.getFirstFilled(i.text,t.pts);(uke(E)||E==="")&&(k.text=E),t.text=rv.texttemplateString({data:[k,i._meta],fallback:i.texttemplatefallback,labels:k,locale:e._fullLayout._d3locale,template:p})}}}function Eke(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}kke.exports={plot:NCt,formatSliceLabel:Mke,transformInsideText:_ke,determineInsideTextFont:mke,positionTitleOutside:Tke,prerenderTitles:yke,layoutAreas:Ske,attachFxHandlers:gke,computeTransform:Eke}});var Pke=ye((Kdr,Lke)=>{"use strict";var Cke=Oa(),KCt=B3(),JCt=bv().resizeText;Lke.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");JCt(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=Cke.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){Cke.select(this).call(KCt,s,a,t)})})}});var Rke=ye(AA=>{"use strict";var Ike=Mc();AA.name="pie";AA.plot=function(e,t,r,n){Ike.plotBasePlot(AA.name,e,t,r,n)};AA.clean=function(e,t,r,n){Ike.cleanBasePlot(AA.name,e,t,r,n)}});var Fke=ye(($dr,Dke)=>{"use strict";Dke.exports={attributes:M2(),supplyDefaults:E2().supplyDefaults,supplyLayoutDefaults:rke(),layoutAttributes:pD(),calc:TA().calc,crossTraceCalc:TA().crossTraceCalc,plot:_D().plot,style:Pke(),styleOne:B3(),moduleType:"trace",name:"pie",basePlotModule:Rke(),categories:["pie-like","pie","showLegend"],meta:{}}});var Oke=ye((Qdr,zke)=>{"use strict";zke.exports=Fke()});var Bke=ye(SA=>{"use strict";var qke=Mc();SA.name="sunburst";SA.plot=function(e,t,r,n){qke.plotBasePlot(SA.name,e,t,r,n)};SA.clean=function(e,t,r,n){qke.cleanBasePlot(SA.name,e,t,r,n)}});var yW=ye((tvr,Nke)=>{"use strict";Nke.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var LE=ye((rvr,Gke)=>{"use strict";var $Ct=Gl(),{hovertemplateAttrs:QCt,texttemplateAttrs:e6t,templatefallbackAttrs:Uke}=Ll(),t6t=Tu(),r6t=Cc().attributes,Xy=M2(),Vke=yW(),CE=Ao().extendFlat,i6t=Pd().pattern;Gke.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:CE({colors:{valType:"data_array",editType:"calc"},line:{color:CE({},Xy.marker.line.color,{dflt:null}),width:CE({},Xy.marker.line.width,{dflt:1}),editType:"calc"},pattern:i6t,editType:"calc"},t6t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:Xy.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:e6t({editType:"plot"},{keys:Vke.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Uke({editType:"plot"}),hovertext:Xy.hovertext,hoverinfo:CE({},$Ct.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:QCt({},{keys:Vke.eventDataKeys}),hovertemplatefallback:Uke(),textfont:Xy.textfont,insidetextorientation:Xy.insidetextorientation,insidetextfont:Xy.insidetextfont,outsidetextfont:CE({},Xy.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:Xy.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:r6t({name:"sunburst",trace:!0,editType:"calc"})}});var _W=ye((ivr,Hke)=>{"use strict";Hke.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var Zke=ye((nvr,Xke)=>{"use strict";var jke=Dr(),n6t=LE(),a6t=Cc().defaults,o6t=r0().handleText,s6t=E2().handleMarkerDefaults,Wke=tc(),l6t=Wke.hasColorscale,u6t=Wke.handleDefaults;Xke.exports=function(t,r,n,i){function a(h,d){return jke.coerce(t,r,n6t,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),s6t(t,r,i,a);var u=r._hasColorscale=l6t(t,"marker","colors")||(t.marker||{}).coloraxis;u&&u6t(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",jke.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";o6t(t,r,i,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),a6t(r,i,a),r._length=null}});var Kke=ye((avr,Yke)=>{"use strict";var c6t=Dr(),f6t=_W();Yke.exports=function(t,r){function n(i,a){return c6t.coerce(t,r,f6t,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var PE=ye((xD,Jke)=>{(function(e,t){typeof xD=="object"&&typeof Jke!="undefined"?t(xD):(e=e||self,t(e.d3=e.d3||{}))})(xD,function(e){"use strict";function t(je,tt){return je.parent===tt.parent?1:2}function r(je){return je.reduce(n,0)/je.length}function n(je,tt){return je+tt.x}function i(je){return 1+je.reduce(a,0)}function a(je,tt){return Math.max(je,tt.y)}function o(je){for(var tt;tt=je.children;)je=tt[0];return je}function s(je){for(var tt;tt=je.children;)je=tt[tt.length-1];return je}function l(){var je=t,tt=1,xt=1,Ie=!1;function xe(ke){var vt,ir=0;ke.eachAfter(function($r){var di=$r.children;di?($r.x=r(di),$r.y=i(di)):($r.x=vt?ir+=je($r,vt):0,$r.y=0,vt=$r)});var ar=o(ke),vr=s(ke),ii=ar.x-je(ar,vr)/2,pi=vr.x+je(vr,ar)/2;return ke.eachAfter(Ie?function($r){$r.x=($r.x-ke.x)*tt,$r.y=(ke.y-$r.y)*xt}:function($r){$r.x=($r.x-ii)/(pi-ii)*tt,$r.y=(1-(ke.y?$r.y/ke.y:1))*xt})}return xe.separation=function(ke){return arguments.length?(je=ke,xe):je},xe.size=function(ke){return arguments.length?(Ie=!1,tt=+ke[0],xt=+ke[1],xe):Ie?null:[tt,xt]},xe.nodeSize=function(ke){return arguments.length?(Ie=!0,tt=+ke[0],xt=+ke[1],xe):Ie?[tt,xt]:null},xe}function u(je){var tt=0,xt=je.children,Ie=xt&&xt.length;if(!Ie)tt=1;else for(;--Ie>=0;)tt+=xt[Ie].value;je.value=tt}function c(){return this.eachAfter(u)}function f(je){var tt=this,xt,Ie=[tt],xe,ke,vt;do for(xt=Ie.reverse(),Ie=[];tt=xt.pop();)if(je(tt),xe=tt.children,xe)for(ke=0,vt=xe.length;ke=0;--xe)xt.push(Ie[xe]);return this}function d(je){for(var tt=this,xt=[tt],Ie=[],xe,ke,vt;tt=xt.pop();)if(Ie.push(tt),xe=tt.children,xe)for(ke=0,vt=xe.length;ke=0;)xt+=Ie[xe].value;tt.value=xt})}function _(je){return this.eachBefore(function(tt){tt.children&&tt.children.sort(je)})}function b(je){for(var tt=this,xt=p(tt,je),Ie=[tt];tt!==xt;)tt=tt.parent,Ie.push(tt);for(var xe=Ie.length;je!==xt;)Ie.splice(xe,0,je),je=je.parent;return Ie}function p(je,tt){if(je===tt)return je;var xt=je.ancestors(),Ie=tt.ancestors(),xe=null;for(je=xt.pop(),tt=Ie.pop();je===tt;)xe=je,je=xt.pop(),tt=Ie.pop();return xe}function k(){for(var je=this,tt=[je];je=je.parent;)tt.push(je);return tt}function E(){var je=[];return this.each(function(tt){je.push(tt)}),je}function S(){var je=[];return this.eachBefore(function(tt){tt.children||je.push(tt)}),je}function L(){var je=this,tt=[];return je.each(function(xt){xt!==je&&tt.push({source:xt.parent,target:xt})}),tt}function x(je,tt){var xt=new T(je),Ie=+je.value&&(xt.value=je.value),xe,ke=[xt],vt,ir,ar,vr;for(tt==null&&(tt=M);xe=ke.pop();)if(Ie&&(xe.value=+xe.data.value),(ir=tt(xe.data))&&(vr=ir.length))for(xe.children=new Array(vr),ar=vr-1;ar>=0;--ar)ke.push(vt=xe.children[ar]=new T(ir[ar])),vt.parent=xe,vt.depth=xe.depth+1;return xt.eachBefore(P)}function C(){return x(this).eachBefore(g)}function M(je){return je.children}function g(je){je.data=je.data.data}function P(je){var tt=0;do je.height=tt;while((je=je.parent)&&je.height<++tt)}function T(je){this.data=je,this.depth=this.height=0,this.parent=null}T.prototype=x.prototype={constructor:T,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:_,path:b,ancestors:k,descendants:E,leaves:S,links:L,copy:C};var z=Array.prototype.slice;function O(je){for(var tt=je.length,xt,Ie;tt;)Ie=Math.random()*tt--|0,xt=je[tt],je[tt]=je[Ie],je[Ie]=xt;return je}function V(je){for(var tt=0,xt=(je=O(z.call(je))).length,Ie=[],xe,ke;tt0&&xt*xt>Ie*Ie+xe*xe}function N(je,tt){for(var xt=0;xtar?(xe=(vr+ar-ke)/(2*vr),ir=Math.sqrt(Math.max(0,ar/vr-xe*xe)),xt.x=je.x-xe*Ie-ir*vt,xt.y=je.y-xe*vt+ir*Ie):(xe=(vr+ke-ar)/(2*vr),ir=Math.sqrt(Math.max(0,ke/vr-xe*xe)),xt.x=tt.x+xe*Ie-ir*vt,xt.y=tt.y+xe*vt+ir*Ie)):(xt.x=tt.x+xt.r,xt.y=tt.y)}function Ce(je,tt){var xt=je.r+tt.r-1e-6,Ie=tt.x-je.x,xe=tt.y-je.y;return xt>0&&xt*xt>Ie*Ie+xe*xe}function me(je){var tt=je._,xt=je.next._,Ie=tt.r+xt.r,xe=(tt.x*xt.r+xt.x*tt.r)/Ie,ke=(tt.y*xt.r+xt.y*tt.r)/Ie;return xe*xe+ke*ke}function ie(je){this._=je,this.next=null,this.previous=null}function Se(je){if(!(xe=je.length))return 0;var tt,xt,Ie,xe,ke,vt,ir,ar,vr,ii,pi;if(tt=je[0],tt.x=0,tt.y=0,!(xe>1))return tt.r;if(xt=je[1],tt.x=-xt.r,xt.x=tt.r,xt.y=0,!(xe>2))return tt.r+xt.r;Ee(xt,tt,Ie=je[2]),tt=new ie(tt),xt=new ie(xt),Ie=new ie(Ie),tt.next=Ie.previous=xt,xt.next=tt.previous=Ie,Ie.next=xt.previous=tt;e:for(ir=3;ir0)throw new Error("cycle");return ir}return xt.id=function(Ie){return arguments.length?(je=Fe(Ie),xt):je},xt.parentId=function(Ie){return arguments.length?(tt=Fe(Ie),xt):tt},xt}function $e(je,tt){return je.parent===tt.parent?1:2}function St(je){var tt=je.children;return tt?tt[0]:je.t}function Qt(je){var tt=je.children;return tt?tt[tt.length-1]:je.t}function Vt(je,tt,xt){var Ie=xt/(tt.i-je.i);tt.c-=Ie,tt.s+=xt,je.c+=Ie,tt.z+=xt,tt.m+=xt}function _t(je){for(var tt=0,xt=0,Ie=je.children,xe=Ie.length,ke;--xe>=0;)ke=Ie[xe],ke.z+=tt,ke.m+=tt,tt+=ke.s+(xt+=ke.c)}function It(je,tt,xt){return je.a.parent===tt.parent?je.a:xt}function mt(je,tt){this._=je,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=tt}mt.prototype=Object.create(T.prototype);function er(je){for(var tt=new mt(je,0),xt,Ie=[tt],xe,ke,vt,ir;xt=Ie.pop();)if(ke=xt._.children)for(xt.children=new Array(ir=ke.length),vt=ir-1;vt>=0;--vt)Ie.push(xe=xt.children[vt]=new mt(ke[vt],vt)),xe.parent=xt;return(tt.parent=new mt(null,0)).children=[tt],tt}function lr(){var je=$e,tt=1,xt=1,Ie=null;function xe(vr){var ii=er(vr);if(ii.eachAfter(ke),ii.parent.m=-ii.z,ii.eachBefore(vt),Ie)vr.eachBefore(ar);else{var pi=vr,$r=vr,di=vr;vr.eachBefore(function(qn){qn.x$r.x&&($r=qn),qn.depth>di.depth&&(di=qn)});var ji=pi===$r?1:je(pi,$r)/2,In=ji-pi.x,wi=tt/($r.x+ji+In),On=xt/(di.depth||1);vr.eachBefore(function(qn){qn.x=(qn.x+In)*wi,qn.y=qn.depth*On})}return vr}function ke(vr){var ii=vr.children,pi=vr.parent.children,$r=vr.i?pi[vr.i-1]:null;if(ii){_t(vr);var di=(ii[0].z+ii[ii.length-1].z)/2;$r?(vr.z=$r.z+je(vr._,$r._),vr.m=vr.z-di):vr.z=di}else $r&&(vr.z=$r.z+je(vr._,$r._));vr.parent.A=ir(vr,$r,vr.parent.A||pi[0])}function vt(vr){vr._.x=vr.z+vr.parent.m,vr.m+=vr.parent.m}function ir(vr,ii,pi){if(ii){for(var $r=vr,di=vr,ji=ii,In=$r.parent.children[0],wi=$r.m,On=di.m,qn=ji.m,Fn=In.m,ra;ji=Qt(ji),$r=St($r),ji&&$r;)In=St(In),di=Qt(di),di.a=vr,ra=ji.z+qn-$r.z-wi+je(ji._,$r._),ra>0&&(Vt(It(ji,vr,pi),vr,ra),wi+=ra,On+=ra),qn+=ji.m,wi+=$r.m,Fn+=In.m,On+=di.m;ji&&!Qt(di)&&(di.t=ji,di.m+=qn-On),$r&&!St(In)&&(In.t=$r,In.m+=wi-Fn,pi=vr)}return pi}function ar(vr){vr.x*=tt,vr.y=vr.depth*xt}return xe.separation=function(vr){return arguments.length?(je=vr,xe):je},xe.size=function(vr){return arguments.length?(Ie=!1,tt=+vr[0],xt=+vr[1],xe):Ie?null:[tt,xt]},xe.nodeSize=function(vr){return arguments.length?(Ie=!0,tt=+vr[0],xt=+vr[1],xe):Ie?[tt,xt]:null},xe}function Tr(je,tt,xt,Ie,xe){for(var ke=je.children,vt,ir=-1,ar=ke.length,vr=je.value&&(xe-xt)/je.value;++irqn&&(qn=vr),Ut=wi*wi*la,Fn=Math.max(qn/Ut,Ut/On),Fn>ra){wi-=vr;break}ra=Fn}vt.push(ar={value:wi,dice:di1?Ie:1)},xt}(Lr);function Vr(){var je=Br,tt=!1,xt=1,Ie=1,xe=[0],ke=Pe,vt=Pe,ir=Pe,ar=Pe,vr=Pe;function ii($r){return $r.x0=$r.y0=0,$r.x1=xt,$r.y1=Ie,$r.eachBefore(pi),xe=[0],tt&&$r.eachBefore(Zt),$r}function pi($r){var di=xe[$r.depth],ji=$r.x0+di,In=$r.y0+di,wi=$r.x1-di,On=$r.y1-di;wi=$r-1){var qn=ke[pi];qn.x0=ji,qn.y0=In,qn.x1=wi,qn.y1=On;return}for(var Fn=vr[pi],ra=di/2+Fn,la=pi+1,Ut=$r-1;la>>1;vr[wt]On-In){var Er=(ji*nr+wi*rr)/di;ii(pi,la,rr,ji,In,Er,On),ii(la,$r,nr,Er,In,wi,On)}else{var Xr=(In*nr+On*rr)/di;ii(pi,la,rr,ji,In,wi,Xr),ii(la,$r,nr,ji,Xr,wi,On)}}}function Ge(je,tt,xt,Ie,xe){(je.depth&1?Tr:st)(je,tt,xt,Ie,xe)}var Je=function je(tt){function xt(Ie,xe,ke,vt,ir){if((ar=Ie._squarify)&&ar.ratio===tt)for(var ar,vr,ii,pi,$r=-1,di,ji=ar.length,In=Ie.value;++$r1?Ie:1)},xt}(Lr);e.cluster=l,e.hierarchy=x,e.pack=ce,e.packEnclose=V,e.packSiblings=Le,e.partition=lt,e.stratify=cr,e.tree=lr,e.treemap=Vr,e.treemapBinary=dt,e.treemapDice=st,e.treemapResquarify=Je,e.treemapSlice=Tr,e.treemapSliceDice=Ge,e.treemapSquarify=Br,Object.defineProperty(e,"__esModule",{value:!0})})});var RE=ye(IE=>{"use strict";var $ke=PE(),h6t=Eo(),MA=Dr(),d6t=tc().makeColorScaleFuncFromTrace,v6t=TA().makePullColorFn,p6t=TA().generateExtendedColors,g6t=tc().calc,m6t=fs().ALMOST_EQUAL,y6t={},_6t={},x6t={};IE.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=MA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=MA.isArrayOrTypedArray(s),u=[],c={},f={},h=function(j,N){c[j]?c[j].push(N):c[j]=[N],f[N]=1},d=function(j){return j||typeof j=="number"},v=function(j){return!l||h6t(s[j])&&s[j]>=0},_,b,p;i?(_=Math.min(n.length,o.length),b=function(j){return d(n[j])&&v(j)},p=function(j){return String(n[j])}):(_=Math.min(a.length,o.length),b=function(j){return d(a[j])&&v(j)},p=function(j){return String(a[j])}),l&&(_=Math.min(_,s.length));for(var k=0;k<_;k++)if(b(k)){var E=p(k),S=d(o[k])?String(o[k]):"",L={i:k,id:E,pid:S,label:d(a[k])?String(a[k]):""};l&&(L.v=+s[k]),u.push(L),h(S,E)}if(c[""]){if(c[""].length>1){for(var M=MA.randstr(),g=0;g{});function Gm(){}function tCe(){return this.rgb().formatHex()}function k6t(){return this.rgb().formatHex8()}function C6t(){return lCe(this).formatHsl()}function rCe(){return this.rgb().formatRgb()}function j_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=b6t.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?iCe(t):r===3?new _d(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?wD(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?wD(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=w6t.exec(e))?new _d(t[1],t[2],t[3],1):(t=T6t.exec(e))?new _d(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=A6t.exec(e))?wD(t[1],t[2],t[3],t[4]):(t=S6t.exec(e))?wD(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=M6t.exec(e))?oCe(t[1],t[2]/100,t[3]/100,1):(t=E6t.exec(e))?oCe(t[1],t[2]/100,t[3]/100,t[4]):eCe.hasOwnProperty(e)?iCe(eCe[e]):e==="transparent"?new _d(NaN,NaN,NaN,0):null}function iCe(e){return new _d(e>>16&255,e>>8&255,e&255,1)}function wD(e,t,r,n){return n<=0&&(e=t=r=NaN),new _d(e,t,r,n)}function FE(e){return e instanceof Gm||(e=j_(e)),e?(e=e.rgb(),new _d(e.r,e.g,e.b,e.opacity)):new _d}function kA(e,t,r,n){return arguments.length===1?FE(e):new _d(e,t,r,n==null?1:n)}function _d(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function nCe(){return`#${k2(this.r)}${k2(this.g)}${k2(this.b)}`}function L6t(){return`#${k2(this.r)}${k2(this.g)}${k2(this.b)}${k2((isNaN(this.opacity)?1:this.opacity)*255)}`}function aCe(){let e=AD(this.opacity);return`${e===1?"rgb(":"rgba("}${C2(this.r)}, ${C2(this.g)}, ${C2(this.b)}${e===1?")":`, ${e})`}`}function AD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function C2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function k2(e){return e=C2(e),(e<16?"0":"")+e.toString(16)}function oCe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Zg(e,t,r,n)}function lCe(e){if(e instanceof Zg)return new Zg(e.h,e.s,e.l,e.opacity);if(e instanceof Gm||(e=j_(e)),!e)return new Zg;if(e instanceof Zg)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Zg(o,s,l,e.opacity)}function zE(e,t,r,n){return arguments.length===1?lCe(e):new Zg(e,t,r,n==null?1:n)}function Zg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function sCe(e){return e=(e||0)%360,e<0?e+360:e}function TD(e){return Math.max(0,Math.min(1,e||0))}function xW(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 H_,L2,EA,DE,Vm,b6t,w6t,T6t,A6t,S6t,M6t,E6t,eCe,SD=gu(()=>{bD();H_=.7,L2=1/H_,EA="\\s*([+-]?\\d+)\\s*",DE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b6t=/^#([0-9a-f]{3,8})$/,w6t=new RegExp(`^rgb\\(${EA},${EA},${EA}\\)$`),T6t=new RegExp(`^rgb\\(${Vm},${Vm},${Vm}\\)$`),A6t=new RegExp(`^rgba\\(${EA},${EA},${EA},${DE}\\)$`),S6t=new RegExp(`^rgba\\(${Vm},${Vm},${Vm},${DE}\\)$`),M6t=new RegExp(`^hsl\\(${DE},${Vm},${Vm}\\)$`),E6t=new RegExp(`^hsla\\(${DE},${Vm},${Vm},${DE}\\)$`),eCe={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};Zy(Gm,j_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tCe,formatHex:tCe,formatHex8:k6t,formatHsl:C6t,formatRgb:rCe,toString:rCe});Zy(_d,kA,G_(Gm,{brighter(e){return e=e==null?L2:Math.pow(L2,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?H_:Math.pow(H_,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _d(C2(this.r),C2(this.g),C2(this.b),AD(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:nCe,formatHex:nCe,formatHex8:L6t,formatRgb:aCe,toString:aCe}));Zy(Zg,zE,G_(Gm,{brighter(e){return e=e==null?L2:Math.pow(L2,e),new Zg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?H_:Math.pow(H_,e),new Zg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _d(xW(e>=240?e-240:e+120,i,n),xW(e,i,n),xW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Zg(sCe(this.h),TD(this.s),TD(this.l),AD(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=AD(this.opacity);return`${e===1?"hsl(":"hsla("}${sCe(this.h)}, ${TD(this.s)*100}%, ${TD(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var MD,ED,bW=gu(()=>{MD=Math.PI/180,ED=180/Math.PI});function vCe(e){if(e instanceof Hm)return new Hm(e.l,e.a,e.b,e.opacity);if(e instanceof Yy)return pCe(e);e instanceof _d||(e=FE(e));var t=SW(e.r),r=SW(e.g),n=SW(e.b),i=wW((.2225045*t+.7168786*r+.0606169*n)/cCe),a,o;return t===r&&r===n?a=o=i:(a=wW((.4360747*t+.3850649*r+.1430804*n)/uCe),o=wW((.0139322*t+.0971045*r+.7141733*n)/fCe)),new Hm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function LA(e,t,r,n){return arguments.length===1?vCe(e):new Hm(e,t,r,n==null?1:n)}function Hm(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function wW(e){return e>P6t?Math.pow(e,1/3):e/dCe+hCe}function TW(e){return e>CA?e*e*e:dCe*(e-hCe)}function AW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function SW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function I6t(e){if(e instanceof Yy)return new Yy(e.h,e.c,e.l,e.opacity);if(e instanceof Hm||(e=vCe(e)),e.a===0&&e.b===0)return new Yy(NaN,0{bD();SD();bW();kD=18,uCe=.96422,cCe=1,fCe=.82521,hCe=4/29,CA=6/29,dCe=3*CA*CA,P6t=CA*CA*CA;Zy(Hm,LA,G_(Gm,{brighter(e){return new Hm(this.l+kD*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Hm(this.l-kD*(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=uCe*TW(t),e=cCe*TW(e),r=fCe*TW(r),new _d(AW(3.1338561*t-1.6168667*e-.4906146*r),AW(-.9787684*t+1.9161415*e+.033454*r),AW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Zy(Yy,OE,G_(Gm,{brighter(e){return new Yy(this.h,this.c,this.l+kD*(e==null?1:e),this.opacity)},darker(e){return new Yy(this.h,this.c,this.l-kD*(e==null?1:e),this.opacity)},rgb(){return pCe(this).rgb()}}))});function R6t(e){if(e instanceof P2)return new P2(e.h,e.s,e.l,e.opacity);e instanceof _d||(e=FE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(_Ce*n+mCe*t-yCe*r)/(_Ce+mCe-yCe),a=n-i,o=(qE*(r-i)-EW*a)/CD,s=Math.sqrt(o*o+a*a)/(qE*i*(1-i)),l=s?Math.atan2(o,a)*ED-120:NaN;return new P2(l<0?l+360:l,s,i,e.opacity)}function PA(e,t,r,n){return arguments.length===1?R6t(e):new P2(e,t,r,n==null?1:n)}function P2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var xCe,MW,EW,CD,qE,mCe,yCe,_Ce,bCe=gu(()=>{bD();SD();bW();xCe=-.14861,MW=1.78277,EW=-.29227,CD=-.90649,qE=1.97294,mCe=qE*CD,yCe=qE*MW,_Ce=MW*EW-CD*xCe;Zy(P2,PA,G_(Gm,{brighter(e){return e=e==null?L2:Math.pow(L2,e),new P2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?H_:Math.pow(H_,e),new P2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*MD,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new _d(255*(t+r*(xCe*n+MW*i)),255*(t+r*(EW*n+CD*i)),255*(t+r*(qE*n)),this.opacity)}}))});var I2=gu(()=>{SD();gCe();bCe()});function kW(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function LD(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n{});function ID(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return kW((r-n/t)*t,i,a,o,s)}}var CW=gu(()=>{PD()});var IA,LW=gu(()=>{IA=e=>()=>e});function wCe(e,t){return function(r){return e+r*t}}function D6t(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function W_(e,t){var r=t-e;return r?wCe(e,r>180||r<-180?r-360*Math.round(r/360):r):IA(isNaN(e)?t:e)}function TCe(e){return(e=+e)==1?$f:function(t,r){return r-t?D6t(t,r,e):IA(isNaN(t)?r:t)}}function $f(e,t){var r=t-e;return r?wCe(e,r):IA(isNaN(e)?t:e)}var R2=gu(()=>{LW()});function ACe(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;o{I2();PD();CW();R2();BE=function e(t){var r=TCe(t);function n(i,a){var o=r((i=kA(i)).r,(a=kA(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=$f(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);SCe=ACe(LD),MCe=ACe(ID)});function RA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i{});function ECe(e,t){return(RD(t)?RA:IW)(e,t)}function IW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o{NE();DD()});function FD(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var DW=gu(()=>{});function zp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var UE=gu(()=>{});function zD(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=X_(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var FW=gu(()=>{NE()});function F6t(e){return function(){return e}}function z6t(e){return function(t){return e(t)+""}}function OD(e,t){var r=OW.lastIndex=zW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=OW.exec(e))&&(i=zW.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:zp(n,i)})),r=zW.lastIndex;return r{UE();OW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zW=new RegExp(OW.source,"g")});function X_(e,t){var r=typeof t,n;return t==null||r==="boolean"?IA(t):(r==="number"?zp:r==="string"?(n=j_(t))?(t=n,BE):OD:t instanceof j_?BE:t instanceof Date?FD:RD(t)?RA:Array.isArray(t)?IW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?zD:zp)(e,t)}var NE=gu(()=>{I2();PW();RW();DW();UE();FW();qW();LW();DD()});function kCe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var CCe=gu(()=>{});function LCe(e,t){var r=W_(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var PCe=gu(()=>{R2()});function ICe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var RCe=gu(()=>{});function BW(e,t,r,n,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{DCe=180/Math.PI,qD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function zCe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qD:BW(t.a,t.b,t.c,t.d,t.e,t.f)}function OCe(e){return e==null?qD:(BD||(BD=document.createElementNS("http://www.w3.org/2000/svg","g")),BD.setAttribute("transform",e),(e=BD.transform.baseVal.consolidate())?(e=e.matrix,BW(e.a,e.b,e.c,e.d,e.e,e.f)):qD)}var BD,qCe=gu(()=>{FCe()});function BCe(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,d,v){if(u!==f||c!==h){var _=d.push("translate(",null,t,null,r);v.push({i:_-4,x:zp(u,f)},{i:_-2,x:zp(c,h)})}else(f||h)&&d.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,n)-2,x:zp(u,c)})):c&&f.push(i(f)+"rotate("+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,n)-2,x:zp(u,c)}):c&&f.push(i(f)+"skewX("+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var _=d.push(i(d)+"scale(",null,",",null,")");v.push({i:_-4,x:zp(u,f)},{i:_-2,x:zp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var v=-1,_=h.length,b;++v<_;)f[(b=h[v]).i]=b.x(d);return f.join("")}}}var NCe,UCe,VCe=gu(()=>{UE();qCe();NCe=BCe(zCe,"px, ","px)","deg)"),UCe=BCe(OCe,", ",")",")")});function GCe(e){return((e=Math.exp(e))+1/e)/2}function q6t(e){return((e=Math.exp(e))-1/e)/2}function B6t(e){return((e=Math.exp(2*e))-1)/(e+1)}var O6t,HCe,jCe=gu(()=>{O6t=1e-12;HCe=function e(t,r,n){function i(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,v=f-l,_=d*d+v*v,b,p;if(_{I2();R2();XCe=WCe(W_),ZCe=WCe($f)});function NW(e,t){var r=$f((e=LA(e)).l,(t=LA(t)).l),n=$f(e.a,t.a),i=$f(e.b,t.b),a=$f(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=i(o),e.opacity=a(o),e+""}}var KCe=gu(()=>{I2();R2()});function JCe(e){return function(t,r){var n=e((t=OE(t)).h,(r=OE(r)).h),i=$f(t.c,r.c),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}var $Ce,QCe,e6e=gu(()=>{I2();R2();$Ce=JCe(W_),QCe=JCe($f)});function t6e(e){return function t(r){r=+r;function n(i,a){var o=e((i=PA(i)).h,(a=PA(a)).h),s=$f(i.s,a.s),l=$f(i.l,a.l),u=$f(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=l(Math.pow(c,r)),i.opacity=u(c),i+""}}return n.gamma=t,n}(1)}var r6e,i6e,n6e=gu(()=>{I2();R2();r6e=t6e(W_),i6e=t6e($f)});function UW(e,t){t===void 0&&(t=e,e=X_);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{NE()});function o6e(e,t){for(var r=new Array(t),n=0;n{});var D2={};cee(D2,{interpolate:()=>X_,interpolateArray:()=>ECe,interpolateBasis:()=>LD,interpolateBasisClosed:()=>ID,interpolateCubehelix:()=>r6e,interpolateCubehelixLong:()=>i6e,interpolateDate:()=>FD,interpolateDiscrete:()=>kCe,interpolateHcl:()=>$Ce,interpolateHclLong:()=>QCe,interpolateHsl:()=>XCe,interpolateHslLong:()=>ZCe,interpolateHue:()=>LCe,interpolateLab:()=>NW,interpolateNumber:()=>zp,interpolateNumberArray:()=>RA,interpolateObject:()=>zD,interpolateRgb:()=>BE,interpolateRgbBasis:()=>SCe,interpolateRgbBasisClosed:()=>MCe,interpolateRound:()=>ICe,interpolateString:()=>OD,interpolateTransformCss:()=>NCe,interpolateTransformSvg:()=>UCe,interpolateZoom:()=>HCe,piecewise:()=>UW,quantize:()=>o6e});var F2=gu(()=>{NE();RW();PD();CW();DW();CCe();PCe();UE();DD();FW();RCe();qW();VCe();jCe();PW();YCe();KCe();e6e();n6e();a6e();s6e()});var ND=ye((Ypr,l6e)=>{"use strict";var N6t=So(),U6t=ka();l6e.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),N6t.pointStyle(t,n,i,r)}else U6t.fill(t,l)}});var VW=ye((Kpr,d6e)=>{"use strict";var u6e=Oa(),c6e=ka(),f6e=Dr(),V6t=bv().resizeText,G6t=ND();function H6t(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");V6t(e,t,"sunburst"),t.each(function(r){var n=u6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){u6e.select(this).call(h6e,o,a,e)})})}function h6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=f6e.castOption(r,o,"marker.line.color")||c6e.defaultLine,l=f6e.castOption(r,o,"marker.line.width")||0;e.call(G6t,t,r,n).style("stroke-width",l).call(c6e.stroke,s).style("opacity",a?r.leaf.opacity:null)}d6e.exports={style:H6t,styleOne:h6e}});var Ky=ye(Bs=>{"use strict";var z2=Dr(),j6t=ka(),W6t=Sg(),v6e=l_();Bs.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(Bs.getPtId(n)===t)return r=n.copy()}),r||e};Bs.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a0)};Bs.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};Bs.isHeader=function(e,t){return!(Bs.isLeaf(e)||e.depth===t._maxDepth-1)};function p6e(e){return e.data.data.pid}Bs.getParent=function(e,t){return Bs.findEntryWithLevel(e,p6e(t))};Bs.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return Bs.listPath(r,t).concat(n)};Bs.getPath=function(e){return Bs.listPath(e,"label").join("/")+"/"};Bs.formatValue=v6e.formatPieValue;Bs.formatPercent=function(e,t){var r=z2.formatPercent(e,0);return r==="0%"&&(r=v6e.formatPiePercent(e,t)),r}});var HE=ye(($pr,y6e)=>{"use strict";var DA=Oa(),g6e=qa(),Y6t=ip().appendArrayPointValue,VE=vf(),m6e=Dr(),K6t=_3(),rd=Ky(),J6t=l_(),$6t=J6t.formatPieValue;y6e.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(v){var _=n._fullLayout;if(!(n._dragging||_.hovermode===!1)){var b=n._fullData[s.index],p=v.data.data,k=p.i,E=rd.isHierarchyRoot(v),S=rd.getParent(l,v),L=rd.getValue(v),x=function(Ee){return m6e.castOption(b,k,Ee)},C=x("hovertemplate"),M=VE.castHoverinfo(b,_,k),g=_.separators,P;if(C||M&&M!=="none"&&M!=="skip"){var T,z;u&&(T=o.cx+v.pxmid[0]*(1-v.rInscribed),z=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(T=v._hoverX,z=v._hoverY);var O={},V=[],G=[],Z=function(Ee){return V.indexOf(Ee)!==-1};M&&(V=M==="all"?b._module.attributes.hoverinfo.flags:M.split("+")),O.label=p.label,Z("label")&&O.label&&G.push(O.label),p.hasOwnProperty("v")&&(O.value=p.v,O.valueLabel=$6t(O.value,g),Z("value")&&G.push(O.valueLabel)),O.currentPath=v.currentPath=rd.getPath(v.data),Z("current path")&&!E&&G.push(O.currentPath);var j,N=[],H=function(){N.indexOf(j)===-1&&(G.push(j),N.push(j))};O.percentParent=v.percentParent=L/rd.getValue(S),O.parent=v.parentString=rd.getPtLabel(S),Z("percent parent")&&(j=rd.formatPercent(O.percentParent,g)+" of "+O.parent,H()),O.percentEntry=v.percentEntry=L/rd.getValue(r),O.entry=v.entry=rd.getPtLabel(r),Z("percent entry")&&!E&&!v.onPathbar&&(j=rd.formatPercent(O.percentEntry,g)+" of "+O.entry,H()),O.percentRoot=v.percentRoot=L/rd.getValue(l),O.root=v.root=rd.getPtLabel(l),Z("percent root")&&!E&&(j=rd.formatPercent(O.percentRoot,g)+" of "+O.root,H()),O.text=x("hovertext")||x("text"),Z("text")&&(j=O.text,m6e.isValidTextValue(j)&&G.push(j)),P=[GE(v,b,a.eventDataKeys)];var te={trace:b,y:z,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:G.join("
"),name:C||Z("name")?b.name:void 0,color:x("hoverlabel.bgcolor")||p.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:O,eventData:P};u&&(te.x0=T-v.rInscribed*v.rpx1,te.x1=T+v.rInscribed*v.rpx1,te.idealAlign=v.pxmid[0]<0?"left":"right"),c&&(te.x=T,te.idealAlign=T<0?"left":"right");var oe=[];VE.loneHover(te,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:n,inOut_bbox:oe}),P[0].bbox=oe[0],s._hasHoverLabel=!0}if(c){var _e=t.select("path.surface");a.styleOne(_e,v,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:P||[GE(v,b,a.eventDataKeys)],event:DA.event})}},h=function(v){var _=n._fullLayout,b=n._fullData[s.index],p=DA.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=DA.event,n.emit("plotly_unhover",{points:[GE(p,b,a.eventDataKeys)],event:DA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(VE.loneUnhover(_._hoverlayer.node()),s._hasHoverLabel=!1),c){var k=t.select("path.surface");a.styleOne(k,p,b,n,{hovered:!1})}},d=function(v){var _=n._fullLayout,b=n._fullData[s.index],p=u&&(rd.isHierarchyRoot(v)||rd.isLeaf(v)),k=rd.getPtId(v),E=rd.isEntry(v)?rd.findEntryWithChild(l,k):rd.findEntryWithLevel(l,k),S=rd.getPtId(E),L={points:[GE(v,b,a.eventDataKeys)],event:DA.event};p||(L.nextLevel=S);var x=K6t.triggerHandler(n,"plotly_"+s.type+"click",L);if(x!==!1&&_.hovermode&&(n._hoverdata=[GE(v,b,a.eventDataKeys)],VE.click(n,DA.event)),!p&&x!==!1&&!n._dragging&&!n._transitioning){g6e.call("_storeDirectGUIEdit",b,_._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:S}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};VE.loneUnhover(_._hoverlayer.node()),g6e.call("animate",n,C,M)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function GE(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a{"use strict";var jE=Oa(),Q6t=PE(),Yg=(F2(),ob(D2)).interpolate,_6e=So(),Av=Dr(),eLt=ru(),T6e=bv(),x6e=T6e.recordMinTextSize,tLt=T6e.clearMinTextSize,A6e=_D(),rLt=l_().getRotationAngle,iLt=A6e.computeTransform,nLt=A6e.transformInsideText,aLt=VW().styleOne,oLt=N0().resizeText,sLt=HE(),GW=yW(),Rl=Ky();UD.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&Rl.hasTransition(r);if(tLt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=jE.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){b6e(e,f,this,r)})})}else o.each(function(f){b6e(e,f,this,r)}),i.uniformtext.mode&&oLt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function b6e(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Rl.hasTransition(n),s=jE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Rl.findEntryWithLevel(f,c.level),d=Rl.getMaxDepth(c),v=a._size,_=c.domain,b=v.w*(_.x[1]-_.x[0]),p=v.h*(_.y[1]-_.y[0]),k=.5*Math.min(b,p),E=u.cx=v.l+v.w*(_.x[1]+_.x[0])/2,S=u.cy=v.t+v.h*(1-_.y[0])-p/2;if(!h)return l.remove();var L=null,x={};o&&l.each(function(me){x[Rl.getPtId(me)]={rpx0:me.rpx0,rpx1:me.rpx1,x0:me.x0,x1:me.x1,transform:me.transform},!L&&Rl.isEntry(me)&&(L=me)});var C=lLt(h).descendants(),M=h.height+1,g=0,P=d;u.hasMultipleRoots&&Rl.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,g=1,P+=1),C=C.filter(function(me){return me.y1<=P});var T=rLt(c.rotation);T&&C.forEach(function(me){me.x0+=T,me.x1+=T});var z=Math.min(M,d),O=function(me){return(me-g)/z*k},V=function(me,ie){return[me*Math.cos(ie),-me*Math.sin(ie)]},G=function(me){return Av.pathAnnulus(me.rpx0,me.rpx1,me.x0,me.x1,E,S)},Z=function(me){return E+w6e(me)[0]*(me.transform.rCenter||0)+(me.transform.x||0)},j=function(me){return S+w6e(me)[1]*(me.transform.rCenter||0)+(me.transform.y||0)};l=l.data(C,Rl.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var me=jE.select(this),ie=me.select("path.surface");ie.transition().attrTween("d",function(Le){var Ae=oe(Le);return function(Fe){return G(Ae(Fe))}});var Se=me.select("g.slicetext");Se.attr("opacity",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var H=Rl.getPtId(L);l.each(function(me){N===null&&Rl.getPtId(me)===H&&(N=me.x1)})}var te=l;o&&(te=te.transition().each("end",function(){var me=jE.select(this);Rl.setSliceCursor(me,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),te.each(function(me){var ie=jE.select(this),Se=Av.ensureSingle(ie,"path","surface",function(Re){Re.style("pointer-events",i?"none":"all")});me.rpx0=O(me.y0),me.rpx1=O(me.y1),me.xmid=(me.x0+me.x1)/2,me.pxmid=V(me.rpx1,me.xmid),me.midangle=-(me.xmid-Math.PI/2),me.startangle=-(me.x0-Math.PI/2),me.stopangle=-(me.x1-Math.PI/2),me.halfangle=.5*Math.min(Av.angleDelta(me.x0,me.x1)||Math.PI,Math.PI),me.ring=1-me.rpx0/me.rpx1,me.rInscribed=uLt(me,c),o?Se.transition().attrTween("d",function(Re){var ce=_e(Re);return function(Ze){return G(ce(Ze))}}):Se.attr("d",G),ie.call(sLt,h,e,t,{eventDataKeys:GW.eventDataKeys,transitionTime:GW.CLICK_TRANSITION_TIME,transitionEasing:GW.CLICK_TRANSITION_EASING}).call(Rl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Se.call(aLt,me,c,e);var Le=Av.ensureSingle(ie,"g","slicetext"),Ae=Av.ensureSingle(Le,"text","",function(Re){Re.attr("data-notex",1)}),Fe=Av.ensureUniformFontSize(e,Rl.determineTextFont(c,me,a.font));Ae.text(UD.formatSliceLabel(me,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(_6e.font,Fe).call(eLt.convertToTspans,e);var Pe=_6e.bBox(Ae.node());me.transform=nLt(Pe,me,u),me.transform.targetX=Z(me),me.transform.targetY=j(me);var ge=function(Re,ce){var Ze=Re.transform;return iLt(Ze,ce),Ze.fontSize=Fe.size,x6e(c.type,Ze,a),Av.getTextTransform(Ze)};o?Ae.transition().attrTween("transform",function(Re){var ce=Ee(Re);return function(Ze){return ge(ce(Ze),Pe)}}):Ae.attr("transform",ge(me,Pe))});function oe(me){var ie=Rl.getPtId(me),Se=x[ie],Le=x[Rl.getPtId(h)],Ae;if(Le){var Fe=(me.x1>Le.x1?2*Math.PI:0)+T;Ae=me.rpx1N?2*Math.PI:0)+T;Se={x0:Ae,x1:Ae}}else Se={rpx0:k,rpx1:k},Av.extendFlat(Se,Ce(me));else Se={rpx0:0,rpx1:0};else Se={x0:T,x1:T};return Yg(Se,Le)}function Ee(me){var ie=x[Rl.getPtId(me)],Se,Le=me.transform;if(ie)Se=ie;else if(Se={rpx1:me.rpx1,transform:{textPosAngle:Le.textPosAngle,scale:0,rotate:Le.rotate,rCenter:Le.rCenter,x:Le.x,y:Le.y}},L)if(me.parent)if(N){var Ae=me.x1>N?2*Math.PI:0;Se.x0=Se.x1=Ae}else Av.extendFlat(Se,Ce(me));else Se.x0=Se.x1=T;else Se.x0=Se.x1=T;var Fe=Yg(Se.transform.textPosAngle,me.transform.textPosAngle),Pe=Yg(Se.rpx1,me.rpx1),ge=Yg(Se.x0,me.x0),Re=Yg(Se.x1,me.x1),ce=Yg(Se.transform.scale,Le.scale),Ze=Yg(Se.transform.rotate,Le.rotate),ut=Le.rCenter===0?3:Se.transform.rCenter===0?1/3:1,pt=Yg(Se.transform.rCenter,Le.rCenter),Zt=function(st){return pt(Math.pow(st,ut))};return function(st){var lt=Pe(st),Gt=ge(st),Nt=Re(st),Jt=Zt(st),sr=V(lt,(Gt+Nt)/2),wr=Fe(st),cr={pxmid:sr,rpx1:lt,transform:{textPosAngle:wr,rCenter:Jt,x:Le.x,y:Le.y}};return x6e(c.type,Le,a),{transform:{targetX:Z(cr),targetY:j(cr),scale:ce(st),rotate:Ze(st),rCenter:Jt}}}}function Ce(me){var ie=me.parent,Se=x[Rl.getPtId(ie)],Le={};if(Se){var Ae=ie.children,Fe=Ae.indexOf(me),Pe=Ae.length,ge=Yg(Se.x0,Se.x1);Le.x0=ge(Fe/Pe),Le.x1=ge(Fe/Pe)}else Le.x0=Le.x1=0;return Le}}function lLt(e){return Q6t.partition().size([2*Math.PI,e.height+1])(e)}UD.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Rl.isHierarchyRoot(e),h=Rl.getParent(c,e),d=Rl.getValue(e);if(!a){var v=o.split("+"),_=function(g){return v.indexOf(g)!==-1},b=[],p;if(_("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&_("value")&&b.push(Rl.formatValue(u.v,s)),!f){_("current path")&&b.push(Rl.getPath(e.data));var k=0;_("percent parent")&&k++,_("percent entry")&&k++,_("percent root")&&k++;var E=k>1;if(k){var S,L=function(g){p=Rl.formatPercent(S,s),E&&(p+=" of "+g),b.push(p)};_("percent parent")&&!f&&(S=d/Rl.getValue(h),L("parent")),_("percent entry")&&(S=d/Rl.getValue(t),L("entry")),_("percent root")&&(S=d/Rl.getValue(c),L("root"))}}return _("text")&&(p=Av.castOption(r,u.i,"text"),Av.isValidTextValue(p)&&b.push(p)),b.join("
")}var x=Av.castOption(r,u.i,"texttemplate");if(!x)return"";var C={};u.label&&(C.label=u.label),u.hasOwnProperty("v")&&(C.value=u.v,C.valueLabel=Rl.formatValue(u.v,s)),C.currentPath=Rl.getPath(e.data),f||(C.percentParent=d/Rl.getValue(h),C.percentParentLabel=Rl.formatPercent(C.percentParent,s),C.parent=Rl.getPtLabel(h)),C.percentEntry=d/Rl.getValue(t),C.percentEntryLabel=Rl.formatPercent(C.percentEntry,s),C.entry=Rl.getPtLabel(t),C.percentRoot=d/Rl.getValue(c),C.percentRootLabel=Rl.formatPercent(C.percentRoot,s),C.root=Rl.getPtLabel(c),u.hasOwnProperty("color")&&(C.color=u.color);var M=Av.castOption(r,u.i,"text");return(Av.isValidTextValue(M)||M==="")&&(C.text=M),C.customdata=Av.castOption(r,u.i,"customdata"),Av.texttemplateString({data:[C,r._meta],fallback:r.texttemplatefallback,labels:C,locale:i._d3locale,template:x})};function uLt(e){return e.rpx0===0&&Av.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function w6e(e){return cLt(e.rpx1,e.transform.textPosAngle)}function cLt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var M6e=ye((e0r,S6e)=>{"use strict";S6e.exports={moduleType:"trace",name:"sunburst",basePlotModule:Bke(),categories:[],animatable:!0,attributes:LE(),layoutAttributes:_W(),supplyDefaults:Zke(),supplyLayoutDefaults:Kke(),calc:RE().calc,crossTraceCalc:RE().crossTraceCalc,plot:VD().plot,style:VW().style,colorbar:$d(),meta:{}}});var k6e=ye((t0r,E6e)=>{"use strict";E6e.exports=M6e()});var L6e=ye(FA=>{"use strict";var C6e=Mc();FA.name="treemap";FA.plot=function(e,t,r,n){C6e.plotBasePlot(FA.name,e,t,r,n)};FA.clean=function(e,t,r,n){C6e.cleanBasePlot(FA.name,e,t,r,n)}});var O2=ye((i0r,P6e)=>{"use strict";P6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var GD=ye((n0r,D6e)=>{"use strict";var{hovertemplateAttrs:fLt,texttemplateAttrs:hLt,templatefallbackAttrs:I6e}=Ll(),dLt=Tu(),vLt=Cc().attributes,q2=M2(),Q0=LE(),R6e=O2(),HW=Ao().extendFlat,pLt=Pd().pattern;D6e.exports={labels:Q0.labels,parents:Q0.parents,values:Q0.values,branchvalues:Q0.branchvalues,count:Q0.count,level:Q0.level,maxdepth:Q0.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:HW({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:Q0.marker.colors,pattern:pLt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Q0.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},dLt("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:HW({},q2.textfont,{}),editType:"calc"},text:q2.text,textinfo:Q0.textinfo,texttemplate:hLt({editType:"plot"},{keys:R6e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I6e({editType:"plot"}),hovertext:q2.hovertext,hoverinfo:Q0.hoverinfo,hovertemplate:fLt({},{keys:R6e.eventDataKeys}),hovertemplatefallback:I6e(),textfont:q2.textfont,insidetextfont:q2.insidetextfont,outsidetextfont:HW({},q2.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:q2.sort,root:Q0.root,domain:vLt({name:"treemap",trace:!0,editType:"calc"})}});var jW=ye((a0r,F6e)=>{"use strict";F6e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var B6e=ye((o0r,q6e)=>{"use strict";var z6e=Dr(),gLt=GD(),mLt=ka(),yLt=Cc().defaults,_Lt=r0().handleText,xLt=e2().TEXTPAD,bLt=E2().handleMarkerDefaults,O6e=tc(),wLt=O6e.hasColorscale,TLt=O6e.handleDefaults;q6e.exports=function(t,r,n,i){function a(b,p){return z6e.coerce(t,r,gLt,b,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",z6e.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";_Lt(t,r,i,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;bLt(t,r,i,a);var v=r._hasColorscale=wLt(t,"marker","colors")||(t.marker||{}).coloraxis;v?TLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var _=r.textfont.size*2;a("marker.pad.t",d?_/4:_),a("marker.pad.l",_/4),a("marker.pad.r",_/4),a("marker.pad.b",d?_:_/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:mLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*xLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),yLt(r,i,a),r._length=null}});var U6e=ye((s0r,N6e)=>{"use strict";var ALt=Dr(),SLt=jW();N6e.exports=function(t,r){function n(i,a){return ALt.coerce(t,r,SLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var XW=ye(WW=>{"use strict";var V6e=RE();WW.calc=function(e,t){return V6e.calc(e,t)};WW.crossTraceCalc=function(e){return V6e._runCrossTraceCalc("treemap",e)}});var ZW=ye((u0r,G6e)=>{"use strict";G6e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o{"use strict";var zA=PE(),MLt=ZW();H6e.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],l=n.pad[i?"right":"left"],u=n.pad[i?"left":"right"],c=n.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=zA.treemap().tile(ELt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&MLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function ELt(e,t){switch(e){case"squarify":return zA.treemapSquarify.ratio(t);case"binary":return zA.treemapBinary;case"dice":return zA.treemapDice;case"slice":return zA.treemapSlice;default:return zA.treemapSliceDice}}});var HD=ye((f0r,Z6e)=>{"use strict";var j6e=Oa(),OA=ka(),W6e=Dr(),KW=Ky(),kLt=bv().resizeText,CLt=ND();function LLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");kLt(e,t,"treemap"),t.each(function(r){var n=j6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){j6e.select(this).call(X6e,o,a,e,{hovered:!1})})})}function X6e(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=KW.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=W6e.castOption(r,s,"marker.line.color")||OA.defaultLine,u=W6e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=OA.combine(OA.addOpacity(r._backgroundColor,.75),c),_;if(d===!0){var b=KW.getMaxDepth(r);isFinite(b)?KW.isLeaf(t)?_=0:_=r._maxVisibleLayers-(t.data.depth-r._entryDepth):_=t.data.height+1}else _=t.data.depth-r._entryDepth,r._atRootLevel||_++;if(_>0)for(var p=0;p<_;p++){var k=.5*p/_;c=OA.combine(OA.addOpacity(v,k),c)}}}e.call(CLt,t,r,n,c).style("stroke-width",u).call(OA.stroke,l).style("opacity",h)}Z6e.exports={style:LLt,styleOne:X6e}});var Q6e=ye((h0r,$6e)=>{"use strict";var Y6e=Oa(),jD=Dr(),K6e=So(),PLt=ru(),ILt=YW(),J6e=HD().styleOne,JW=O2(),qA=Ky(),RLt=HE(),$W=!0;$6e.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,v=a.hasTransition,_=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,p=a.makeUpdateTextInterpolator,k={},E=t._context.staticPlot,S=t._fullLayout,L=r[0],x=L.trace,C=L.hierarchy,M=s/x._entryDepth,g=qA.listPath(n.data,"id"),P=ILt(C.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(z){var O=g.indexOf(z.data.id);return O===-1?!1:(z.x0=M*O,z.x1=M*(O+1),z.y0=o,z.y1=o+l,z.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,qA.getPtId),i.enter().append("g").classed("pathbar",!0),_(i,$W,k,[s,l],f),i.order();var T=i;v&&(T=T.transition().each("end",function(){var z=Y6e.select(this);qA.setSliceCursor(z,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),T.each(function(z){z._x0=u(z.x0),z._x1=u(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=u(z.x1-Math.min(s,l)/2),z._hoverY=c(z.y1-l/2);var O=Y6e.select(this),V=jD.ensureSingle(O,"path","surface",function(N){N.style("pointer-events",E?"none":"all")});v?V.transition().attrTween("d",function(N){var H=b(N,$W,k,[s,l]);return function(te){return f(H(te))}}):V.attr("d",f),O.call(RLt,n,t,r,{styleOne:J6e,eventDataKeys:JW.eventDataKeys,transitionTime:JW.CLICK_TRANSITION_TIME,transitionEasing:JW.CLICK_TRANSITION_EASING}).call(qA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),V.call(J6e,z,x,t,{hovered:!1}),z._text=(qA.getPtLabel(z)||"").split("
").join(" ")||"";var G=jD.ensureSingle(O,"g","slicetext"),Z=jD.ensureSingle(G,"text","",function(N){N.attr("data-notex",1)}),j=jD.ensureUniformFontSize(t,qA.determineTextFont(x,z,S.font,{onPathbar:!0}));Z.text(z._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(K6e.font,j).call(PLt.convertToTspans,t),z.textBB=K6e.bBox(Z.node()),z.transform=h(z,{fontSize:j.size,onPathbar:!0}),z.transform.fontSize=j.size,v?Z.transition().attrTween("transform",function(N){var H=p(N,$W,k,[s,l]);return function(te){return d(H(te))}}):Z.attr("transform",d(z))})}});var iLe=ye((d0r,rLe)=>{"use strict";var eLe=Oa(),QW=(F2(),ob(D2)).interpolate,Z_=Ky(),WE=Dr(),tLe=e2().TEXTPAD,DLt=n2(),FLt=DLt.toMoveInsideBar,zLt=bv(),eX=zLt.recordMinTextSize,OLt=O2(),qLt=Q6e();function B2(e){return Z_.isHierarchyRoot(e)?"":Z_.getPtId(e)}rLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=Z_.findEntryWithLevel(f,l.level),d=eLe.select(n),v=d.selectAll("g.pathbar"),_=d.selectAll("g.slice");if(!h){v.remove(),_.remove();return}var b=Z_.isHierarchyRoot(h),p=!o.uniformtext.mode&&Z_.hasTransition(i),k=Z_.getMaxDepth(l),E=function($e){return $e.data.depth-h.data.depth-1?C+P:-(g+P):0,z={x0:M,x1:M,y0:T,y1:T+g},O=function($e,St,Qt){var Vt=l.tiling.pad,_t=function(lr){return lr-Vt<=St.x0},It=function(lr){return lr+Vt>=St.x1},mt=function(lr){return lr-Vt<=St.y0},er=function(lr){return lr+Vt>=St.y1};return $e.x0===St.x0&&$e.x1===St.x1&&$e.y0===St.y0&&$e.y1===St.y1?{x0:$e.x0,x1:$e.x1,y0:$e.y0,y1:$e.y1}:{x0:_t($e.x0-Vt)?0:It($e.x0-Vt)?Qt[0]:$e.x0,x1:_t($e.x1+Vt)?0:It($e.x1+Vt)?Qt[0]:$e.x1,y0:mt($e.y0-Vt)?0:er($e.y0-Vt)?Qt[1]:$e.y0,y1:mt($e.y1+Vt)?0:er($e.y1+Vt)?Qt[1]:$e.y1}},V=null,G={},Z={},j=null,N=function($e,St){return St?G[B2($e)]:Z[B2($e)]},H=function($e,St,Qt,Vt){if(St)return G[B2(f)]||z;var _t=Z[l.level]||Qt;return E($e)?O($e,_t,Vt):{}};s.hasMultipleRoots&&b&&k++,l._maxDepth=k,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var te=-x/2+S.l+S.w*(L.x[1]+L.x[0])/2,oe=-C/2+S.t+S.h*(1-(L.y[1]+L.y[0])/2),_e=function($e){return te+$e},Ee=function($e){return oe+$e},Ce=Ee(0),me=_e(0),ie=function($e){return me+$e},Se=function($e){return Ce+$e};function Le($e,St){return $e+","+St}var Ae=ie(0),Fe=function($e){$e.x=Math.max(Ae,$e.x)},Pe=l.pathbar.edgeshape,ge=function($e){var St=ie(Math.max(Math.min($e.x0,$e.x0),0)),Qt=ie(Math.min(Math.max($e.x1,$e.x1),M)),Vt=Se($e.y0),_t=Se($e.y1),It=g/2,mt={},er={};mt.x=St,er.x=Qt,mt.y=er.y=(Vt+_t)/2;var lr={x:St,y:Vt},Tr={x:Qt,y:Vt},Lr={x:Qt,y:_t},ti={x:St,y:_t};return Pe===">"?(lr.x-=It,Tr.x-=It,Lr.x-=It,ti.x-=It):Pe==="/"?(Lr.x-=It,ti.x-=It,mt.x-=It/2,er.x-=It/2):Pe==="\\"?(lr.x-=It,Tr.x-=It,mt.x-=It/2,er.x-=It/2):Pe==="<"&&(mt.x-=It,er.x-=It),Fe(lr),Fe(ti),Fe(mt),Fe(Tr),Fe(Lr),Fe(er),"M"+Le(lr.x,lr.y)+"L"+Le(Tr.x,Tr.y)+"L"+Le(er.x,er.y)+"L"+Le(Lr.x,Lr.y)+"L"+Le(ti.x,ti.y)+"L"+Le(mt.x,mt.y)+"Z"},Re=l[c?"tiling":"marker"].pad,ce=function($e){return l.textposition.indexOf($e)!==-1},Ze=ce("top"),ut=ce("left"),pt=ce("right"),Zt=ce("bottom"),st=function($e){var St=_e($e.x0),Qt=_e($e.x1),Vt=Ee($e.y0),_t=Ee($e.y1),It=Qt-St,mt=_t-Vt;if(!It||!mt)return"";var er=l.marker.cornerradius||0,lr=Math.min(er,It/2,mt/2);lr&&$e.data&&$e.data.data&&$e.data.data.label&&(Ze&&(lr=Math.min(lr,Re.t)),ut&&(lr=Math.min(lr,Re.l)),pt&&(lr=Math.min(lr,Re.r)),Zt&&(lr=Math.min(lr,Re.b)));var Tr=function(Lr,ti){return lr?"a"+Le(lr,lr)+" 0 0 1 "+Le(Lr,ti):""};return"M"+Le(St,Vt+lr)+Tr(lr,-lr)+"L"+Le(Qt-lr,Vt)+Tr(lr,lr)+"L"+Le(Qt,_t-lr)+Tr(-lr,lr)+"L"+Le(St+lr,_t)+Tr(-lr,-lr)+"Z"},lt=function($e,St){var Qt=$e.x0,Vt=$e.x1,_t=$e.y0,It=$e.y1,mt=$e.textBB,er=Ze||St.isHeader&&!Zt,lr=er?"start":Zt?"end":"middle",Tr=ce("right"),Lr=ce("left")||St.onPathbar,ti=Lr?-1:Tr?1:0;if(St.isHeader){if(Qt+=(c?Re:Re.l)-tLe,Vt-=(c?Re:Re.r)-tLe,Qt>=Vt){var Br=(Qt+Vt)/2;Qt=Br,Vt=Br}var Vr;Zt?(Vr=It-(c?Re:Re.b),_t{"use strict";var BLt=Oa(),NLt=Ky(),ULt=bv(),VLt=ULt.clearMinTextSize,GLt=N0().resizeText,nLe=iLe();aLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!n;if(VLt(o,l),c=u.selectAll("g.trace."+o).data(r,function(v){return v[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&NLt.hasTransition(n)){i&&(f=i());var d=BLt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});d.each(function(){u.selectAll("g.trace").each(function(v){nLe(t,v,this,n,s)})})}else c.each(function(v){nLe(t,v,this,n,s)}),l.uniformtext.mode&&GLt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var cLe=ye((p0r,uLe)=>{"use strict";var oLe=Oa(),WD=Dr(),sLe=So(),HLt=ru(),jLt=YW(),lLe=HD().styleOne,rX=O2(),Y_=Ky(),WLt=HE(),XLt=VD().formatSliceLabel,iX=!1;uLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,_=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},E=t._context.staticPlot,S=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,M=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=!g&&!x.marker.pad.t||g&&!x.marker.pad.b,T=jLt(n,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),z=T.descendants(),O=1/0,V=-1/0;z.forEach(function(H){var te=H.depth;te>=x._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(O=Math.min(O,te),V=Math.max(V,te))}),i=i.data(z,Y_.getPtId),x._maxVisibleLayers=isFinite(V)?V-O+1:0,i.enter().append("g").classed("slice",!0),v(i,iX,k,[o,s],c),i.order();var G=null;if(d&&p){var Z=Y_.getPtId(p);i.each(function(H){G===null&&Y_.getPtId(H)===Z&&(G={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var j=function(){return G||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each("end",function(){var H=oLe.select(this);Y_.setSliceCursor(H,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(H){var te=Y_.isHeader(H,x);H._x0=l(H.x0),H._x1=l(H.x1),H._y0=u(H.y0),H._y1=u(H.y1),H._hoverX=l(H.x1-x.marker.pad.r),H._hoverY=u(g?H.y1-x.marker.pad.b/2:H.y0+x.marker.pad.t/2);var oe=oLe.select(this),_e=WD.ensureSingle(oe,"path","surface",function(Le){Le.style("pointer-events",E?"none":"all")});d?_e.transition().attrTween("d",function(Le){var Ae=_(Le,iX,j(),[o,s]);return function(Fe){return c(Ae(Fe))}}):_e.attr("d",c),oe.call(WLt,n,t,r,{styleOne:lLe,eventDataKeys:rX.eventDataKeys,transitionTime:rX.CLICK_TRANSITION_TIME,transitionEasing:rX.CLICK_TRANSITION_EASING}).call(Y_.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call(lLe,H,x,t,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":te?H._text=P?"":Y_.getPtLabel(H)||"":H._text=XLt(H,n,x,r,S)||"";var Ee=WD.ensureSingle(oe,"g","slicetext"),Ce=WD.ensureSingle(Ee,"text","",function(Le){Le.attr("data-notex",1)}),me=WD.ensureUniformFontSize(t,Y_.determineTextFont(x,H,S.font)),ie=H._text||" ",Se=te&&ie.indexOf("
")===-1;Ce.text(ie).classed("slicetext",!0).attr("text-anchor",M?"end":C||Se?"start":"middle").call(sLe.font,me).call(HLt.convertToTspans,t),H.textBB=sLe.bBox(Ce.node()),H.transform=f(H,{fontSize:me.size,isHeader:te}),H.transform.fontSize=me.size,d?Ce.transition().attrTween("transform",function(Le){var Ae=b(Le,iX,j(),[o,s]);return function(Fe){return h(Ae(Fe))}}):Ce.attr("transform",h(H))}),G}});var hLe=ye((g0r,fLe)=>{"use strict";var ZLt=tX(),YLt=cLe();fLe.exports=function(t,r,n,i){return ZLt(t,r,n,i,{type:"treemap",drawDescendants:YLt})}});var vLe=ye((m0r,dLe)=>{"use strict";dLe.exports={moduleType:"trace",name:"treemap",basePlotModule:L6e(),categories:[],animatable:!0,attributes:GD(),layoutAttributes:jW(),supplyDefaults:B6e(),supplyLayoutDefaults:U6e(),calc:XW().calc,crossTraceCalc:XW().crossTraceCalc,plot:hLe(),style:HD().style,colorbar:$d(),meta:{}}});var gLe=ye((y0r,pLe)=>{"use strict";pLe.exports=vLe()});var yLe=ye(BA=>{"use strict";var mLe=Mc();BA.name="icicle";BA.plot=function(e,t,r,n){mLe.plotBasePlot(BA.name,e,t,r,n)};BA.clean=function(e,t,r,n){mLe.cleanBasePlot(BA.name,e,t,r,n)}});var nX=ye((x0r,bLe)=>{"use strict";var{hovertemplateAttrs:KLt,texttemplateAttrs:JLt,templatefallbackAttrs:_Le}=Ll(),$Lt=Tu(),QLt=Cc().attributes,XE=M2(),o0=LE(),XD=GD(),xLe=O2(),ePt=Ao().extendFlat,tPt=Pd().pattern;bLe.exports={labels:o0.labels,parents:o0.parents,values:o0.values,branchvalues:o0.branchvalues,count:o0.count,level:o0.level,maxdepth:o0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:XD.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:ePt({colors:o0.marker.colors,line:o0.marker.line,pattern:tPt,editType:"calc"},$Lt("marker",{colorAttr:"colors",anim:!1})),leaf:o0.leaf,pathbar:XD.pathbar,text:XE.text,textinfo:o0.textinfo,texttemplate:JLt({editType:"plot"},{keys:xLe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:_Le({editType:"plot"}),hovertext:XE.hovertext,hoverinfo:o0.hoverinfo,hovertemplate:KLt({},{keys:xLe.eventDataKeys}),hovertemplatefallback:_Le(),textfont:XE.textfont,insidetextfont:XE.insidetextfont,outsidetextfont:XD.outsidetextfont,textposition:XD.textposition,sort:XE.sort,root:o0.root,domain:QLt({name:"icicle",trace:!0,editType:"calc"})}});var aX=ye((b0r,wLe)=>{"use strict";wLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var MLe=ye((w0r,SLe)=>{"use strict";var TLe=Dr(),rPt=nX(),iPt=ka(),nPt=Cc().defaults,aPt=r0().handleText,oPt=e2().TEXTPAD,sPt=E2().handleMarkerDefaults,ALe=tc(),lPt=ALe.hasColorscale,uPt=ALe.handleDefaults;SLe.exports=function(t,r,n,i){function a(d,v){return TLe.coerce(t,r,rPt,d,v)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",TLe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";aPt(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),sPt(t,r,i,a);var h=r._hasColorscale=lPt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&uPt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:iPt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*oPt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),nPt(r,i,a),r._length=null}});var kLe=ye((T0r,ELe)=>{"use strict";var cPt=Dr(),fPt=aX();ELe.exports=function(t,r){function n(i,a){return cPt.coerce(t,r,fPt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var sX=ye(oX=>{"use strict";var CLe=RE();oX.calc=function(e,t){return CLe.calc(e,t)};oX.crossTraceCalc=function(e){return CLe._runCrossTraceCalc("icicle",e)}});var PLe=ye((S0r,LLe)=>{"use strict";var hPt=PE(),dPt=ZW();LLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=hPt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&dPt(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var lX=ye((M0r,zLe)=>{"use strict";var ILe=Oa(),RLe=ka(),DLe=Dr(),vPt=bv().resizeText,pPt=ND();function gPt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");vPt(e,t,"icicle"),t.each(function(r){var n=ILe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){ILe.select(this).call(FLe,o,a,e)})})}function FLe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=DLe.castOption(r,o,"marker.line.color")||RLe.defaultLine,l=DLe.castOption(r,o,"marker.line.width")||0;e.call(pPt,t,r,n).style("stroke-width",l).call(RLe.stroke,s).style("opacity",a?r.leaf.opacity:null)}zLe.exports={style:gPt,styleOne:FLe}});var ULe=ye((E0r,NLe)=>{"use strict";var OLe=Oa(),ZD=Dr(),qLe=So(),mPt=ru(),yPt=PLe(),BLe=lX().styleOne,uX=O2(),NA=Ky(),_Pt=HE(),xPt=VD().formatSliceLabel,cX=!1;NLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,_=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},E=t._context.staticPlot,S=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,M=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=yPt(n,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),T=P.descendants(),z=1/0,O=-1/0;T.forEach(function(N){var H=N.depth;H>=x._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(z=Math.min(z,H),O=Math.max(O,H))}),i=i.data(T,NA.getPtId),x._maxVisibleLayers=isFinite(O)?O-z+1:0,i.enter().append("g").classed("slice",!0),v(i,cX,k,[o,s],c),i.order();var V=null;if(d&&p){var G=NA.getPtId(p);i.each(function(N){V===null&&NA.getPtId(N)===G&&(V={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Z=function(){return V||{x0:0,x1:o,y0:0,y1:s}},j=i;return d&&(j=j.transition().each("end",function(){var N=OLe.select(this);NA.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(N){N._x0=l(N.x0),N._x1=l(N.x1),N._y0=u(N.y0),N._y1=u(N.y1),N._hoverX=l(N.x1-x.tiling.pad),N._hoverY=u(g?N.y1-x.tiling.pad/2:N.y0+x.tiling.pad/2);var H=OLe.select(this),te=ZD.ensureSingle(H,"path","surface",function(Ce){Ce.style("pointer-events",E?"none":"all")});d?te.transition().attrTween("d",function(Ce){var me=_(Ce,cX,Z(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(ie){return c(me(ie))}}):te.attr("d",c),H.call(_Pt,n,t,r,{styleOne:BLe,eventDataKeys:uX.eventDataKeys,transitionTime:uX.CLICK_TRANSITION_TIME,transitionEasing:uX.CLICK_TRANSITION_EASING}).call(NA.setSliceCursor,t,{isTransitioning:t._transitioning}),te.call(BLe,N,x,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=xPt(N,n,x,r,S)||"";var oe=ZD.ensureSingle(H,"g","slicetext"),_e=ZD.ensureSingle(oe,"text","",function(Ce){Ce.attr("data-notex",1)}),Ee=ZD.ensureUniformFontSize(t,NA.determineTextFont(x,N,S.font));_e.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",M?"end":C?"start":"middle").call(qLe.font,Ee).call(mPt.convertToTspans,t),N.textBB=qLe.bBox(_e.node()),N.transform=f(N,{fontSize:Ee.size}),N.transform.fontSize=Ee.size,d?_e.transition().attrTween("transform",function(Ce){var me=b(Ce,cX,Z(),[o,s]);return function(ie){return h(me(ie))}}):_e.attr("transform",h(N))}),V}});var GLe=ye((k0r,VLe)=>{"use strict";var bPt=tX(),wPt=ULe();VLe.exports=function(t,r,n,i){return bPt(t,r,n,i,{type:"icicle",drawDescendants:wPt})}});var jLe=ye((C0r,HLe)=>{"use strict";HLe.exports={moduleType:"trace",name:"icicle",basePlotModule:yLe(),categories:[],animatable:!0,attributes:nX(),layoutAttributes:aX(),supplyDefaults:MLe(),supplyLayoutDefaults:kLe(),calc:sX().calc,crossTraceCalc:sX().crossTraceCalc,plot:GLe(),style:lX().style,colorbar:$d(),meta:{}}});var XLe=ye((L0r,WLe)=>{"use strict";WLe.exports=jLe()});var YLe=ye(UA=>{"use strict";var ZLe=Mc();UA.name="funnelarea";UA.plot=function(e,t,r,n){ZLe.plotBasePlot(UA.name,e,t,r,n)};UA.clean=function(e,t,r,n){ZLe.cleanBasePlot(UA.name,e,t,r,n)}});var fX=ye((I0r,JLe)=>{"use strict";var iv=M2(),TPt=Gl(),APt=Cc().attributes,{hovertemplateAttrs:SPt,texttemplateAttrs:MPt,templatefallbackAttrs:KLe}=Ll(),N2=Ao().extendFlat;JLe.exports={labels:iv.labels,label0:iv.label0,dlabel:iv.dlabel,values:iv.values,marker:{colors:iv.marker.colors,line:{color:N2({},iv.marker.line.color,{dflt:null}),width:N2({},iv.marker.line.width,{dflt:1}),editType:"calc"},pattern:iv.marker.pattern,editType:"calc"},text:iv.text,hovertext:iv.hovertext,scalegroup:N2({},iv.scalegroup,{}),textinfo:N2({},iv.textinfo,{flags:["label","text","value","percent"]}),texttemplate:MPt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:KLe({editType:"plot"}),hoverinfo:N2({},TPt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:SPt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:KLe(),textposition:N2({},iv.textposition,{values:["inside","none"],dflt:"inside"}),textfont:iv.textfont,insidetextfont:iv.insidetextfont,title:{text:iv.title.text,font:iv.title.font,position:N2({},iv.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:APt({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 hX=ye((R0r,$Le)=>{"use strict";var EPt=pD().hiddenlabels;$Le.exports={hiddenlabels:EPt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var tPe=ye((D0r,ePe)=>{"use strict";var QLe=Dr(),kPt=fX(),CPt=Cc().defaults,LPt=r0().handleText,PPt=E2().handleLabelsAndValues,IPt=E2().handleMarkerDefaults;ePe.exports=function(t,r,n,i){function a(_,b){return QLe.coerce(t,r,kPt,_,b)}var o=a("labels"),s=a("values"),l=PPt(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,IPt(t,r,i,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var d=a("textposition");LPt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");CPt(r,i,a);var v=a("title.text");v&&(a("title.position"),QLe.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var iPe=ye((F0r,rPe)=>{"use strict";var RPt=Dr(),DPt=hX();rPe.exports=function(t,r){function n(i,a){return RPt.coerce(t,r,DPt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var dX=ye((z0r,aPe)=>{"use strict";var nPe=TA();function FPt(e,t){return nPe.calc(e,t)}function zPt(e){nPe.crossTraceCalc(e,{type:"funnelarea"})}aPe.exports={calc:FPt,crossTraceCalc:zPt}});var cPe=ye((O0r,uPe)=>{"use strict";var U2=Oa(),vX=So(),K_=Dr(),OPt=K_.strScale,oPe=K_.strTranslate,sPe=ru(),qPt=n2(),BPt=qPt.toMoveInsideBar,lPe=bv(),NPt=lPe.recordMinTextSize,UPt=lPe.clearMinTextSize,VPt=l_(),VA=_D(),GPt=VA.attachFxHandlers,HPt=VA.determineInsideTextFont,jPt=VA.layoutAreas,WPt=VA.prerenderTitles,XPt=VA.positionTitleOutside,ZPt=VA.formatSliceLabel;uPe.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;UPt("funnelarea",i),WPt(r,t),jPt(r,i._size),K_.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=U2.select(this),s=a[0],l=s.trace;KPt(a),o.each(function(){var u=U2.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){U2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,_=U2.select(this),b=_.selectAll("path.surface").data([f]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),_.call(GPt,t,a);var p="M"+(d+f.TR[0])+","+(v+f.TR[1])+pX(f.TR,f.BR)+pX(f.BR,f.BL)+pX(f.BL,f.TL)+"Z";b.attr("d",p),ZPt(t,f,s);var k=VPt.castOption(l.textposition,f.pts),E=_.selectAll("g.slicetext").data(f.text&&k!=="none"?[0]:[]);E.enter().append("g").classed("slicetext",!0),E.exit().remove(),E.each(function(){var S=K_.ensureSingle(U2.select(this),"text","",function(z){z.attr("data-notex",1)}),L=K_.ensureUniformFontSize(t,HPt(l,f,i.font));S.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(vX.font,L).call(sPe.convertToTspans,t);var x=vX.bBox(S.node()),C,M,g,P=Math.min(f.BL[1],f.BR[1])+v,T=Math.max(f.TL[1],f.TR[1])+v;M=Math.max(f.TL[0],f.BL[0])+d,g=Math.min(f.TR[0],f.BR[0])+d,C=BPt(M,g,P,T,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,NPt(l.type,C,i),a[h].transform=C,K_.setTransormAndDisplay(S,C)})});var c=U2.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=K_.ensureSingle(U2.select(this),"text","",function(v){v.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=K_.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(vX.font,l.title.font).call(sPe.convertToTspans,t);var d=XPt(s,i._size);f.attr("transform",oPe(d.x,d.y)+OPt(Math.min(1,d.scale))+oPe(d.tx,d.ty))})})})};function pX(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function YPt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function KPt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var O=Math.sqrt(u);return{x:O,y:-O}}function f(){var O=c();return[O.x,O.y]}var h,d=[];d.push(f());var v,_;for(v=e.length-1;v>-1;v--)if(_=e[v],!_.hidden){var b=_.v/l;u+=b,d.push(f())}var p=1/0,k=-1/0;for(v=0;v-1;v--)if(_=e[v],!_.hidden){P+=1;var T=d[P][0],z=d[P][1];_.TL=[-T,z],_.TR=[T,z],_.BL=M,_.BR=g,_.pxmid=YPt(_.TR,_.BR),M=_.TL,g=_.TR}}});var dPe=ye((q0r,hPe)=>{"use strict";var fPe=Oa(),JPt=B3(),$Pt=bv().resizeText;hPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");$Pt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=fPe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){fPe.select(this).call(JPt,s,a,t)})})}});var pPe=ye((B0r,vPe)=>{"use strict";vPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:YLe(),categories:["pie-like","funnelarea","showLegend"],attributes:fX(),layoutAttributes:hX(),supplyDefaults:tPe(),supplyLayoutDefaults:iPe(),calc:dX().calc,crossTraceCalc:dX().crossTraceCalc,plot:cPe(),style:dPe(),styleOne:B3(),meta:{}}});var mPe=ye((N0r,gPe)=>{"use strict";gPe.exports=pPe()});var Od=ye((U0r,yPe)=>{(function(){var e={24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=c+d*v+h*_,o[1]=s[1],o[2]=f+d*_-h*v,o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},216:function(i){"use strict";i.exports=a;function a(o,s){for(var l={},u=0;u1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var _=1;_=0;--N){var Se=Z[N];H=Se[0];var Le=V[H],Ae=Le[0],Fe=Le[1],Pe=O[Ae],ge=O[Fe];if((Pe[0]-ge[0]||Pe[1]-ge[1])<0){var Re=Ae;Ae=Fe,Fe=Re}Le[0]=Ae;var ce=Le[1]=Se[1],Ze;for(j&&(Ze=Le[2]);N>0&&Z[N-1][0]===H;){var Se=Z[--N],ut=Se[1];j?V.push([ce,ut,Ze]):V.push([ce,ut]),ce=ut}j?V.push([ce,Fe,Ze]):V.push([ce,Fe])}return te}function x(O,V,G){for(var Z=V.length,j=new s(Z),N=[],H=0;HV[2]?1:0)}function g(O,V,G){if(O.length!==0){if(V)for(var Z=0;Z0||H.length>0}function z(O,V,G){var Z;if(G){Z=V;for(var j=new Array(V.length),N=0;N 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"}]}},620:function(i){i.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},665:function(i,a,o){"use strict";var s=o(3202);i.exports=f;var l=96;function u(h,d){var v=s(getComputedStyle(h).getPropertyValue(d));return v[0]*f(v[1],h)}function c(h,d){var v=document.createElement("div");v.style["font-size"]="128"+h,d.appendChild(v);var _=u(v,"font-size")/128;return d.removeChild(v),_}function f(h,d){switch(d=d||document.body,h=(h||"px").trim().toLowerCase(),(d===window||d===document)&&(d=document.body),h){case"%":return d.clientHeight/100;case"ch":case"ex":return c(h,d);case"em":return u(d,"font-size");case"rem":return u(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return l;case"cm":return l/2.54;case"mm":return l/25.4;case"pt":return l/72;case"pc":return l/6}return 1}},727:function(i,a,o){"use strict";var s=o(2962),l=6;function u(S){var L=S===2?h:S===3?d:S===4?v:S===5?_:b;return S<6?L(s[S]):L(s)}function c(){return[[0]]}function f(S,L){return[[L[0]],[S[0][0]]]}function h(S){return function(x,C){return[S([[+C[0],+x[0][1]],[+C[1],+x[1][1]]]),S([[+x[0][0],+C[0]],[+x[1][0],+C[1]]]),S(x)]}}function d(S){return function(x,C){return[S([[+C[0],+x[0][1],+x[0][2]],[+C[1],+x[1][1],+x[1][2]],[+C[2],+x[2][1],+x[2][2]]]),S([[+x[0][0],+C[0],+x[0][2]],[+x[1][0],+C[1],+x[1][2]],[+x[2][0],+C[2],+x[2][2]]]),S([[+x[0][0],+x[0][1],+C[0]],[+x[1][0],+x[1][1],+C[1]],[+x[2][0],+x[2][1],+C[2]]]),S(x)]}}function v(S){return function(x,C){return[S([[+C[0],+x[0][1],+x[0][2],+x[0][3]],[+C[1],+x[1][1],+x[1][2],+x[1][3]],[+C[2],+x[2][1],+x[2][2],+x[2][3]],[+C[3],+x[3][1],+x[3][2],+x[3][3]]]),S([[+x[0][0],+C[0],+x[0][2],+x[0][3]],[+x[1][0],+C[1],+x[1][2],+x[1][3]],[+x[2][0],+C[2],+x[2][2],+x[2][3]],[+x[3][0],+C[3],+x[3][2],+x[3][3]]]),S([[+x[0][0],+x[0][1],+C[0],+x[0][3]],[+x[1][0],+x[1][1],+C[1],+x[1][3]],[+x[2][0],+x[2][1],+C[2],+x[2][3]],[+x[3][0],+x[3][1],+C[3],+x[3][3]]]),S([[+x[0][0],+x[0][1],+x[0][2],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+C[3]]]),S(x)]}}function _(S){return function(x,C){return[S([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4]]]),S([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4]]]),S([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4]]]),S([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4]]]),S([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4]]]),S(x)]}}function b(S){return function(x,C){return[S([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+C[5],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),S([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+C[5],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),S([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+C[5],+x[5][3],+x[5][4],+x[5][5]]]),S([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+C[5],+x[5][4],+x[5][5]]]),S([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+C[5],+x[5][5]]]),S([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+C[4]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+C[5]]]),S(x)]}}var p=[c,f];function k(S,L,x,C,M,g,P,T){return function(O,V){switch(O.length){case 0:return S(O,V);case 1:return L(O,V);case 2:return x(O,V);case 3:return C(O,V);case 4:return M(O,V);case 5:return g(O,V)}var G=P[O.length];return G||(G=P[O.length]=T(O.length)),G(O,V)}}function E(){for(;p.length1e-6?(k=Math.acos(E),S=Math.sin(k),L=Math.sin((1-u)*k)/S,x=Math.sin(u*k)/S):(L=1-u,x=u),o[0]=L*c+x*v,o[1]=L*f+x*_,o[2]=L*h+x*b,o[3]=L*d+x*p,o}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),c=s([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); }`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},811:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; attribute vec4 color; attribute vec2 uv; uniform mat4 model , view , projection , inverseModel; uniform vec3 eyePosition , lightPosition; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; vec4 project(vec3 p) { return projection * (view * (model * vec4(p, 1.0))); } void main() { gl_Position = project(position); //Lighting geometry parameters vec4 cameraCoordinate = view * vec4(position , 1.0); cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); f_color = color; f_data = position; f_uv = uv; } `]),u=s([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } //#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness , fresnel , kambient , kdiffuse , kspecular; uniform sampler2D texture; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; void main() { if (f_color.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], f_data) ) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * f_color.a; } `]),c=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 color; attribute vec2 uv; uniform mat4 model, view, projection; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_color = color; f_data = position; f_uv = uv; }`]),f=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),h=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 uv; attribute float pointSize; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); } gl_PointSize = pointSize; f_color = color; f_uv = uv; }`]),d=s([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec2 f_uv; void main() { vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); if(dot(pointR, pointR) > 0.25) { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),v=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 id; uniform mat4 model, view, projection; varying vec3 f_position; varying vec4 f_id; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; }`]),_=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]),b=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute float pointSize; attribute vec4 id; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0, 0.0, 0.0); } else { gl_Position = projection * (view * (model * vec4(position, 1.0))); gl_PointSize = pointSize; } f_id = id; f_position = position; }`]),p=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); }`]),k=s([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},a.pickShader={vertex:v,fragment:_,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:_,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:p,fragment:k,attributes:[{name:"position",type:"vec3"}]}},855:function(i,a,o){"use strict";i.exports={init:E,sweepBipartite:x,sweepComplete:C,scanBipartite:M,scanComplete:g};var s=o(1888),l=o(8828),u=o(4192),c=1<<28,f=1024,h=s.mallocInt32(f),d=s.mallocInt32(f),v=s.mallocInt32(f),_=s.mallocInt32(f),b=s.mallocInt32(f),p=s.mallocInt32(f),k=s.mallocDouble(f*8);function E(P){var T=l.nextPow2(P);h.length>>1;u(k,Le);for(var Ae=0,Fe=0,Ce=0;Ce=c)Pe=Pe-c|0,S(v,_,Fe--,Pe);else if(Pe>=0)S(h,d,Ae--,Pe);else if(Pe<=-c){Pe=-Pe-c|0;for(var ge=0;ge>>1;u(k,Le);for(var Ae=0,Fe=0,Pe=0,Ce=0;Ce>1===k[2*Ce+3]>>1&&(Re=2,Ce+=1),ge<0){for(var ce=-(ge>>1)-1,Ze=0;Ze>1)-1;Re===0?S(h,d,Ae--,ce):Re===1?S(v,_,Fe--,ce):Re===2&&S(b,p,Pe--,ce)}}}function M(P,T,z,O,V,G,Z,j,N,H,te,oe){var _e=0,Ee=2*P,Ce=T,me=T+P,ie=1,Se=1;O?Se=c:ie=c;for(var Le=V;Le>>1;u(k,ge);for(var Re=0,Le=0;Le=c?(Ze=!O,Ae-=c):(Ze=!!O,Ae-=1),Ze)L(h,d,Re++,Ae);else{var ut=oe[Ae],pt=Ee*Ae,Zt=te[pt+T+1],st=te[pt+T+1+P];e:for(var lt=0;lt>>1;u(k,Ae);for(var Fe=0,me=0;me=c)h[Fe++]=ie-c;else{ie-=1;var ge=te[ie],Re=_e*ie,ce=H[Re+T+1],Ze=H[Re+T+1+P];e:for(var ut=0;ut=0;--ut)if(h[ut]===ie){for(var lt=ut+1;lt max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 lowerBound, upperBound; uniform float contourTint; uniform vec4 contourColor; uniform sampler2D colormap; uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform float vertexColor; varying float value, kill; varying vec3 worldCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { if ( kill > 0.0 || vColor.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; vec3 N = normalize(surfaceNormal); vec3 V = normalize(eyeDirection); vec3 L = normalize(lightDirection); if(gl_FrontFacing) { N = -N; } float specular = max(beckmannSpecular(L, V, N, roughness), 0.); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); //decide how to interpolate color \u2014 in vertex or in fragment vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor; vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } `]),f=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute float f; uniform vec3 objectOffset; uniform mat3 permutation; uniform mat4 model, view, projection; uniform float height, zOffset; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 dataCoordinate = permutation * vec3(uv.xy, height); worldCoordinate = objectOffset + dataCoordinate; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); vec4 clipPosition = projection * (view * worldPosition); clipPosition.z += zOffset; gl_Position = clipPosition; value = f + objectOffset.z; kill = -1.0; planeCoordinate = uv.zw; vColor = texture2D(colormap, vec2(value, value)); //Don't do lighting for contours surfaceNormal = vec3(1,0,0); eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } `]),h=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec2 shape; uniform vec3 clipBounds[2]; uniform float pickId; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 surfaceNormal; vec2 splitFloat(float v) { float vh = 255.0 * v; float upper = floor(vh); float lower = fract(vh); return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); } void main() { if ((kill > 0.0) || (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; vec2 ux = splitFloat(planeCoordinate.x / shape.x); vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } `]);a.createShader=function(d){var v=s(d,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createPickShader=function(d){var v=s(d,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createContourShader=function(d){var v=s(d,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},a.createPickContourShader=function(d){var v=s(d,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},1085:function(i,a,o){var s=o(1371);i.exports=l;function l(u,c,f){c=typeof c=="number"?c:1,f=f||": ";var h=u.split(/\r?\n/),d=String(h.length+c-1).length;return h.map(function(v,_){var b=_+c,p=String(b).length,k=s(b,d-p);return k+f+v}).join(` `)}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},1125:function(i,a,o){"use strict";i.exports=u;var s=o(3250)[3];function l(c,f,h,d){for(var v=0;v<2;++v){var _=c[v],b=f[v],p=Math.min(_,b),k=Math.max(_,b),E=h[v],S=d[v],L=Math.min(E,S),x=Math.max(E,S);if(x0&&_>0||v<0&&_<0)return!1;var b=s(h,c,f),p=s(d,c,f);return b>0&&p>0||b<0&&p<0?!1:v===0&&_===0&&b===0&&p===0?l(c,f,h,d):!0}},1278:function(i,a,o){"use strict";var s=o(2361),l=Math.pow(2,-1074),u=-1>>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},1283:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform vec4 highlightId; uniform float highlightScale; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = 1.0; if(distance(highlightId, id) < 0.0001) { scale = highlightScale; } vec4 worldPosition = model * vec4(position, 1); vec4 viewPosition = view * worldPosition; viewPosition = viewPosition / viewPosition.w; vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = position; } }`]),c=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float highlightScale, pixelRatio; uniform vec4 highlightId; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = pixelRatio; if(distance(highlightId.bgr, id.bgr) < 0.001) { scale *= highlightScale; } vec4 worldPosition = model * vec4(position, 1.0); vec4 viewPosition = view * worldPosition; vec4 clipPosition = projection * viewPosition; clipPosition /= clipPosition.w; gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); interpColor = color; pickId = id; dataCoordinate = position; } }`]),f=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform float highlightScale; uniform vec4 highlightId; uniform vec3 axes[2]; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float scale, pixelRatio; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float lscale = pixelRatio * scale; if(distance(highlightId, id) < 0.0001) { lscale *= highlightScale; } vec4 clipCenter = projection * (view * (model * vec4(position, 1))); vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = dataPosition; } } `]),h=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float opacity; varying vec4 interpColor; varying vec3 dataCoordinate; void main() { if ( outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || interpColor.a * opacity == 0. ) discard; gl_FragColor = interpColor * opacity; } `]),d=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float pickGroup; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); }`]),v=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],_={vertex:u,fragment:h,attributes:v},b={vertex:c,fragment:h,attributes:v},p={vertex:f,fragment:h,attributes:v},k={vertex:u,fragment:d,attributes:v},E={vertex:c,fragment:d,attributes:v},S={vertex:f,fragment:d,attributes:v};function L(x,C){var M=s(x,C),g=M.attributes;return g.position.location=0,g.color.location=1,g.glyph.location=2,g.id.location=3,M}a.createPerspective=function(x){return L(x,_)},a.createOrtho=function(x){return L(x,b)},a.createProject=function(x){return L(x,p)},a.createPickPerspective=function(x){return L(x,k)},a.createPickOrtho=function(x){return L(x,E)},a.createPickProject=function(x){return L(x,S)}},1303:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),_=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),p=Math.max(f[0][1],f[1][1]);return _p?v-p:_-p}var k,E;c[0][1]f[1][0])h=f[1],d=f[0];else return l(f,c);var v,_;if(c[0][0]c[1][0])v=c[1],_=c[0];else return-l(c,f);var b=s(h,d,_),p=s(h,d,v);if(b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;if(b=s(_,v,d),p=s(_,v,h),b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;return d[0]-_[0]}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},1338:function(i){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}i.exports=s},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;du)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c=0?z[te]:H)}function G(N){var H=L(N);return H?O in H:T.indexOf(N)>=0}function Z(N,H){var te,oe=L(N);return oe?oe[O]=H:(te=T.indexOf(N),te>=0?z[te]=H:(te=T.length,z[te]=H,T[te]=N)),this}function j(N){var H=L(N),te,oe;return H?O in H&&delete H[O]:(te=T.indexOf(N),te<0?!1:(oe=T.length-1,T[te]=void 0,z[te]=z[oe],T[te]=T[oe],T.length=oe,z.length=oe,!0))}return Object.create(P.prototype,{get___:{value:x(V)},has___:{value:x(G)},set___:{value:x(Z)},delete___:{value:x(j)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(z,O){return this.get___(z,O)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,O){return this.set___(z,O)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof l=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function T(){this instanceof P||M();var z=new l,O=void 0,V=!1;function G(H,te){return O?z.has(H)?z.get(H):O.get___(H,te):z.get(H,te)}function Z(H){return z.has(H)||(O?O.has___(H):!1)}var j;s?j=function(H,te){return z.set(H,te),z.has(H)||(O||(O=new P),O.set(H,te)),this}:j=function(H,te){if(V)try{z.set(H,te)}catch(oe){O||(O=new P),O.set___(H,te)}else z.set(H,te);return this};function N(H){var te=!!z.delete(H);return O&&O.delete___(H)||te}return Object.create(P.prototype,{get___:{value:x(G)},has___:{value:x(Z)},set___:{value:x(j)},delete___:{value:x(N)},permitHostObjects___:{value:x(function(H){if(H===o)V=!0;else throw new Error("bogus call to permitHostObjects___")})}})}T.prototype=P.prototype,i.exports=T,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),i.exports=P)})()},1570:function(i){"use strict";i.exports=o;var a=[function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,_=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b>1,E=f[2*k+1];if(E===_)return k;_>1,E=f[2*k+1];if(E===_)return k;_>1,E=f[2*k+1];if(E===_)return k;_>1,E=f[2*k+1];if(E===_)return k;_ 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(_){return l(_,f,h,null,[{name:"position",type:"vec3"}])};var d=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec3 normal; uniform mat4 model, view, projection; uniform vec3 enable; uniform vec3 bounds[2]; varying vec3 colorChannel; void main() { vec3 signAxis = sign(bounds[1] - bounds[0]); vec3 realNormal = signAxis * normal; if(dot(realNormal, enable) > 0.0) { vec3 minRange = min(bounds[0], bounds[1]); vec3 maxRange = max(bounds[0], bounds[1]); vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); } else { gl_Position = vec4(0,0,0,0); } colorChannel = abs(realNormal); } `]),v=s([`precision highp float; #define GLSLIFY 1 uniform vec4 colors[3]; varying vec3 colorChannel; void main() { gl_FragColor = colorChannel.x * colors[0] + colorChannel.y * colors[1] + colorChannel.z * colors[2]; }`]);a.bg=function(_){return l(_,d,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},1888:function(i,a,o){"use strict";var s=o(8828),l=o(1338),u=o(4793).hp;o.g.__TYPEDARRAY_POOL||(o.g.__TYPEDARRAY_POOL={UINT8:l([32,0]),UINT16:l([32,0]),UINT32:l([32,0]),BIGUINT64:l([32,0]),INT8:l([32,0]),INT16:l([32,0]),INT32:l([32,0]),BIGINT64:l([32,0]),FLOAT:l([32,0]),DOUBLE:l([32,0]),DATA:l([32,0]),UINT8C:l([32,0]),BUFFER:l([32,0])});var c=typeof Uint8ClampedArray!="undefined",f=typeof BigUint64Array!="undefined",h=typeof BigInt64Array!="undefined",d=o.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=l([32,0])),d.BIGUINT64||(d.BIGUINT64=l([32,0])),d.BIGINT64||(d.BIGINT64=l([32,0])),d.BUFFER||(d.BUFFER=l([32,0]));var v=d.DATA,_=d.BUFFER;a.free=function(j){if(u.isBuffer(j))_[s.log2(j.length)].push(j);else{if(Object.prototype.toString.call(j)!=="[object ArrayBuffer]"&&(j=j.buffer),!j)return;var N=j.length||j.byteLength,H=s.log2(N)|0;v[H].push(j)}};function b(Z){if(Z){var j=Z.length||Z.byteLength,N=s.log2(j);v[N].push(Z)}}function p(Z){b(Z.buffer)}a.freeUint8=a.freeUint16=a.freeUint32=a.freeBigUint64=a.freeInt8=a.freeInt16=a.freeInt32=a.freeBigInt64=a.freeFloat32=a.freeFloat=a.freeFloat64=a.freeDouble=a.freeUint8Clamped=a.freeDataView=p,a.freeArrayBuffer=b,a.freeBuffer=function(j){_[s.log2(j.length)].push(j)},a.malloc=function(j,N){if(N===void 0||N==="arraybuffer")return k(j);switch(N){case"uint8":return E(j);case"uint16":return S(j);case"uint32":return L(j);case"int8":return x(j);case"int16":return C(j);case"int32":return M(j);case"float":case"float32":return g(j);case"double":case"float64":return P(j);case"uint8_clamped":return T(j);case"bigint64":return O(j);case"biguint64":return z(j);case"buffer":return G(j);case"data":case"dataview":return V(j);default:return null}return null};function k(j){var j=s.nextPow2(j),N=s.log2(j),H=v[N];return H.length>0?H.pop():new ArrayBuffer(j)}a.mallocArrayBuffer=k;function E(Z){return new Uint8Array(k(Z),0,Z)}a.mallocUint8=E;function S(Z){return new Uint16Array(k(2*Z),0,Z)}a.mallocUint16=S;function L(Z){return new Uint32Array(k(4*Z),0,Z)}a.mallocUint32=L;function x(Z){return new Int8Array(k(Z),0,Z)}a.mallocInt8=x;function C(Z){return new Int16Array(k(2*Z),0,Z)}a.mallocInt16=C;function M(Z){return new Int32Array(k(4*Z),0,Z)}a.mallocInt32=M;function g(Z){return new Float32Array(k(4*Z),0,Z)}a.mallocFloat32=a.mallocFloat=g;function P(Z){return new Float64Array(k(8*Z),0,Z)}a.mallocFloat64=a.mallocDouble=P;function T(Z){return c?new Uint8ClampedArray(k(Z),0,Z):E(Z)}a.mallocUint8Clamped=T;function z(Z){return f?new BigUint64Array(k(8*Z),0,Z):null}a.mallocBigUint64=z;function O(Z){return h?new BigInt64Array(k(8*Z),0,Z):null}a.mallocBigInt64=O;function V(Z){return new DataView(k(Z),0,Z)}a.mallocDataView=V;function G(Z){Z=s.nextPow2(Z);var j=s.log2(Z),N=_[j];return N.length>0?N.pop():new u(Z)}a.mallocBuffer=G,a.clearCache=function(){for(var j=0;j<32;++j)d.UINT8[j].length=0,d.UINT16[j].length=0,d.UINT32[j].length=0,d.INT8[j].length=0,d.INT16[j].length=0,d.INT32[j].length=0,d.FLOAT[j].length=0,d.DOUBLE[j].length=0,d.BIGUINT64[j].length=0,d.BIGINT64[j].length=0,d.UINT8C[j].length=0,v[j].length=0,_[j].length=0}},1903:function(i){i.exports=a;function a(o){var s=new Float32Array(16);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s[4]=o[4],s[5]=o[5],s[6]=o[6],s[7]=o[7],s[8]=o[8],s[9]=o[9],s[10]=o[10],s[11]=o[11],s[12]=o[12],s[13]=o[13],s[14]=o[14],s[15]=o[15],s}},1944:function(i,a,o){"use strict";var s=o(5250),l=o(8210);i.exports=u;function u(c,f){for(var h=s(c[0],f[0]),d=1;d>1,G=h(g[V],P);G<=0?(G===0&&(O=V),T=V+1):G>0&&(z=V-1)}return O}a.findCell=b;function p(g,P){for(var T=new Array(g.length),z=0,O=T.length;z=g.length||h(g[_e],V)!==0););}return T}a.incidence=p;function k(g,P){if(!P)return p(_(S(g,0)),g,0);for(var T=new Array(P),z=0;z>>N&1&&j.push(O[N]);P.push(j)}return v(P)}a.explode=E;function S(g,P){if(P<0)return[];for(var T=[],z=(1<0}C=C.filter(M);for(var g=C.length,P=new Array(g),T=new Array(g),x=0;x0;){var ce=Pe.pop(),Ze=Ee[ce];h(Ze,function(lt,Gt){return lt-Gt});var ut=Ze.length,pt=ge[ce],Zt;if(pt===0){var j=C[ce];Zt=[j]}for(var x=0;x=0)&&(ge[st]=pt^1,Pe.push(st),pt===0)){var j=C[st];Fe(j)||(j.reverse(),Zt.push(j))}}pt===0&&Re.push(Zt)}return Re}},2145:function(i,a){"use strict";a.uniforms=u,a.attributes=c;var o={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},s=null;function l(f,h){if(!s){var d=Object.keys(o);s={};for(var v=0;v1)for(var k=0;k1&&G.drawBuffersWEBGL(l[V]);var te=P.getExtension("WEBGL_depth_texture");te?Z?M.depth=p(P,z,O,te.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j&&(M.depth=p(P,z,O,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):j&&Z?M._depth_rb=k(P,z,O,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j?M._depth_rb=k(P,z,O,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):Z&&(M._depth_rb=k(P,z,O,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var oe=P.checkFramebufferStatus(P.FRAMEBUFFER);if(oe!==P.FRAMEBUFFER_COMPLETE){M._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(M.handle),M.handle=null,M.depth&&(M.depth.dispose(),M.depth=null),M._depth_rb&&(P.deleteRenderbuffer(M._depth_rb),M._depth_rb=null);for(var H=0;Hz||P<0||P>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");M._shape[0]=g,M._shape[1]=P;for(var O=d(T),V=0;VO||P<0||P>O)throw new Error("gl-fbo: Parameters are too large for FBO");T=T||{};var V=1;if("color"in T){if(V=Math.max(T.color|0,0),V<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(V>1)if(z){if(V>M.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+V+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var G=M.UNSIGNED_BYTE,Z=M.getExtension("OES_texture_float");if(T.float&&V>0){if(!Z)throw new Error("gl-fbo: Context does not support floating point textures");G=M.FLOAT}else T.preferFloat&&V>0&&Z&&(G=M.FLOAT);var j=!0;"depth"in T&&(j=!!T.depth);var N=!1;return"stencil"in T&&(N=!!T.stencil),new S(M,g,P,G,V,j,N,z)}},2272:function(i,a,o){"use strict";var s=o(2646)[4],l=o(2478);i.exports=c;function u(f,h,d,v,_,b){var p=h.opposite(v,_);if(!(p<0)){if(_0;){for(var E=d.pop(),b=d.pop(),S=-1,L=-1,p=_[b],C=1;C=0||(h.flip(b,E),u(f,h,d,S,b,L),u(f,h,d,b,L,S),u(f,h,d,L,E,S),u(f,h,d,E,S,L))}}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2361:function(i){var a=!1;if(typeof Float64Array!="undefined"){var o=new Float64Array(1),s=new Uint32Array(o.buffer);if(o[0]=1,a=!0,s[1]===1072693248){let k=function(L,x){return s[0]=L,s[1]=x,o[0]},E=function(L){return o[0]=L,s[0]},S=function(L){return o[0]=L,s[1]};var u=k,c=E,f=S;i.exports=function(x){return o[0]=x,[s[0],s[1]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=S}else if(s[0]===1072693248){let k=function(L,x){return s[1]=L,s[0]=x,o[0]},E=function(L){return o[0]=L,s[1]},S=function(L){return o[0]=L,s[0]};var h=k,d=E,v=S;i.exports=function(x){return o[0]=x,[s[1],s[0]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=S}else a=!1}if(!a){let k=function(L,x){return l.writeUInt32LE(L,0,!0),l.writeUInt32LE(x,4,!0),l.readDoubleLE(0,!0)},E=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(0,!0)},S=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(4,!0)};var _=k,b=E,p=S,l=new Buffer(8);i.exports=function(x){return l.writeDoubleLE(x,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=S}i.exports.sign=function(k){return i.exports.hi(k)>>>31},i.exports.exponent=function(k){var E=i.exports.hi(k);return(E<<1>>>21)-1023},i.exports.fraction=function(k){var E=i.exports.lo(k),S=i.exports.hi(k),L=S&(1<<20)-1;return S&2146435072&&(L+=1048576),[E,L]},i.exports.denormalized=function(k){var E=i.exports.hi(k);return!(E&2146435072)}},2408:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],_=s[8],b=s[9],p=s[10],k=s[11];return s!==o&&(o[4]=s[4],o[5]=s[5],o[6]=s[6],o[7]=s[7],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c-_*u,o[1]=h*c-b*u,o[2]=d*c-p*u,o[3]=v*c-k*u,o[8]=f*u+_*c,o[9]=h*u+b*c,o[10]=d*u+p*c,o[11]=v*u+k*c,o}},2419:function(i){"use strict";i.exports=a;function a(o){for(var s=1,l=1;lS-E?u(h,d,v,_,b,p,k,E,S,L,x):c(h,d,v,_,b,p,k,E,S,L,x)}return f}function s(){function u(v,_,b,p,k,E,S,L,x,C,M){for(var g=2*v,P=p,T=g*p;PC-x?p?u(v,_,b,k,E,S,L,x,C,M,g):c(v,_,b,k,E,S,L,x,C,M,g):p?f(v,_,b,k,E,S,L,x,C,M,g):h(v,_,b,k,E,S,L,x,C,M,g)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},2478:function(i){"use strict";function a(f,h,d,v,_){for(var b=_+1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E>=0?(b=p,_=p-1):v=p+1}return b}function o(f,h,d,v,_){for(var b=_+1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E>0?(b=p,_=p-1):v=p+1}return b}function s(f,h,d,v,_){for(var b=v-1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E<0?(b=p,v=p+1):_=p-1}return b}function l(f,h,d,v,_){for(var b=v-1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E<=0?(b=p,v=p+1):_=p-1}return b}function u(f,h,d,v,_){for(;v<=_;){var b=v+_>>>1,p=f[b],k=d!==void 0?d(p,h):p-h;if(k===0)return b;k<=0?v=b+1:_=b-1}return-1}function c(f,h,d,v,_,b){return typeof d=="function"?b(f,h,d,v===void 0?0:v|0,_===void 0?f.length-1:_|0):b(f,h,void 0,d===void 0?0:d|0,v===void 0?f.length-1:v|0)}i.exports={ge:function(f,h,d,v,_){return c(f,h,d,v,_,a)},gt:function(f,h,d,v,_){return c(f,h,d,v,_,o)},lt:function(f,h,d,v,_){return c(f,h,d,v,_,s)},le:function(f,h,d,v,_){return c(f,h,d,v,_,l)},eq:function(f,h,d,v,_){return c(f,h,d,v,_,u)}}},2504:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2];return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*f,o[9]=s[9]*f,o[10]=s[10]*f,o[11]=s[11]*f,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15],o}},2538:function(i,a,o){"use strict";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);i.exports=_;function f(b){return[Math.min(b[0],b[1]),Math.max(b[0],b[1])]}function h(b,p){return b[0]-p[0]||b[1]-p[1]}function d(b){return b.map(f).sort(h)}function v(b,p,k){return p in b?b[p]:k}function _(b,p,k){Array.isArray(p)?(k=k||{},p=p||[]):(k=p||{},p=[]);var E=!!v(k,"delaunay",!0),S=!!v(k,"interior",!0),L=!!v(k,"exterior",!0),x=!!v(k,"infinity",!1);if(!S&&!L||b.length===0)return[];var C=s(b,p);if(E||S!==L||x){for(var M=l(b.length,d(p)),g=0;g0){if(Ee=1,ie[Le++]=v(M[z],E,S,L),z+=te,x>0)for(_e=1,O=M[z],Ae=ie[Le]=v(O,E,S,L),ge=ie[Le+Fe],Ze=ie[Le+Re],Zt=ie[Le+ut],(Ae!==ge||Ae!==Ze||Ae!==Zt)&&(G=M[z+V],j=M[z+Z],H=M[z+N],h(_e,Ee,O,G,j,H,Ae,ge,Ze,Zt,E,S,L),st=Se[Le]=Ce++),Le+=1,z+=te,_e=2;_e0)for(_e=1,O=M[z],Ae=ie[Le]=v(O,E,S,L),ge=ie[Le+Fe],Ze=ie[Le+Re],Zt=ie[Le+ut],(Ae!==ge||Ae!==Ze||Ae!==Zt)&&(G=M[z+V],j=M[z+Z],H=M[z+N],h(_e,Ee,O,G,j,H,Ae,ge,Ze,Zt,E,S,L),st=Se[Le]=Ce++,Zt!==Ze&&d(Se[Le+Re],st,j,H,Ze,Zt,E,S,L)),Le+=1,z+=te,_e=2;_e0){if(_e=1,ie[Le++]=v(M[z],E,S,L),z+=te,C>0)for(Ee=1,O=M[z],Ae=ie[Le]=v(O,E,S,L),Ze=ie[Le+Re],ge=ie[Le+Fe],Zt=ie[Le+ut],(Ae!==Ze||Ae!==ge||Ae!==Zt)&&(G=M[z+V],j=M[z+Z],H=M[z+N],h(_e,Ee,O,G,j,H,Ae,Ze,ge,Zt,E,S,L),st=Se[Le]=Ce++),Le+=1,z+=te,Ee=2;Ee0)for(Ee=1,O=M[z],Ae=ie[Le]=v(O,E,S,L),Ze=ie[Le+Re],ge=ie[Le+Fe],Zt=ie[Le+ut],(Ae!==Ze||Ae!==ge||Ae!==Zt)&&(G=M[z+V],j=M[z+Z],H=M[z+N],h(_e,Ee,O,G,j,H,Ae,Ze,ge,Zt,E,S,L),st=Se[Le]=Ce++,Zt!==Ze&&d(Se[Le+Re],st,H,G,Zt,Ze,E,S,L)),Le+=1,z+=te,Ee=2;Ee 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var b=f.getters||[],p=new Array(v),k=0;k=0?p[k]=!0:p[k]=!1;return u(f.vertex,f.cell,f.phase,_,d,p)}},2642:function(i,a,o){"use strict";i.exports=u;var s=o(727);function l(c){for(var f=0,h=0;hp[1][2]&&(z[0]=-z[0]),p[0][2]>p[2][0]&&(z[1]=-z[1]),p[1][0]>p[0][1]&&(z[2]=-z[2]),!0};function E(x,C,M){var g=C[0],P=C[1],T=C[2],z=C[3];return x[0]=M[0]*g+M[4]*P+M[8]*T+M[12]*z,x[1]=M[1]*g+M[5]*P+M[9]*T+M[13]*z,x[2]=M[2]*g+M[6]*P+M[10]*T+M[14]*z,x[3]=M[3]*g+M[7]*P+M[11]*T+M[15]*z,x}function S(x,C){x[0][0]=C[0],x[0][1]=C[1],x[0][2]=C[2],x[1][0]=C[4],x[1][1]=C[5],x[1][2]=C[6],x[2][0]=C[8],x[2][1]=C[9],x[2][2]=C[10]}function L(x,C,M,g,P){x[0]=C[0]*g+M[0]*P,x[1]=C[1]*g+M[1]*P,x[2]=C[2]*g+M[2]*P}},2653:function(i,a,o){"use strict";var s=o(3865);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d=d[S]&&(E+=1);p[k]=E}}return h}function f(h,d){try{return s(h,!0)}catch(p){var v=l(h);if(v.length<=d)return[];var _=u(h,v),b=s(_,!0);return c(b,v)}}},2762:function(i,a,o){"use strict";var s=o(1888),l=o(5298),u=o(9618),c=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function f(p,k,E,S,L){this.gl=p,this.type=k,this.handle=E,this.length=S,this.usage=L}var h=f.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function d(p,k,E,S,L,x){var C=L.length*L.BYTES_PER_ELEMENT;if(x<0)return p.bufferData(k,L,S),C;if(C+x>E)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return p.bufferSubData(k,x,L),E}function v(p,k){for(var E=s.malloc(p.length,k),S=p.length,L=0;L=0;--S){if(k[S]!==E)return!1;E*=p[S]}return!0}h.update=function(p,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof p=="object"&&typeof p.shape!="undefined"){var E=p.dtype;if(c.indexOf(E)<0&&(E="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var S=gl.getExtension("OES_element_index_uint");S&&E!=="uint16"?E="uint32":E="uint16"}if(E===p.dtype&&_(p.shape,p.stride))p.offset===0&&p.data.length===p.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,p.data,k):this.length=d(this.gl,this.type,this.length,this.usage,p.data.subarray(p.offset,p.shape[0]),k);else{var L=s.malloc(p.size,E),x=u(L,p.shape);l.assign(x,p),k<0?this.length=d(this.gl,this.type,this.length,this.usage,L,k):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,p.size),k),s.free(L)}}else if(Array.isArray(p)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(p,"uint16"):C=v(p,"float32"),k<0?this.length=d(this.gl,this.type,this.length,this.usage,C,k):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,p.length),k),s.free(C)}else if(typeof p=="object"&&typeof p.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,p,k);else if(typeof p=="number"||p===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");p=p|0,p<=0&&(p=1),this.gl.bufferData(this.type,p|0,this.usage),this.length=p}else throw new Error("gl-buffer: Invalid data type")};function b(p,k,E,S){if(E=E||p.ARRAY_BUFFER,S=S||p.DYNAMIC_DRAW,E!==p.ARRAY_BUFFER&&E!==p.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(S!==p.DYNAMIC_DRAW&&S!==p.STATIC_DRAW&&S!==p.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=p.createBuffer(),x=new f(p,E,L,0,S);return x.update(k),x}i.exports=b},2825:function(i){i.exports=a;function a(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}},2931:function(i,a,o){i.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},2962:function(i,a,o){"use strict";var s=o(5250),l=o(8210),u=o(3012),c=o(7004),f=6;function h(S,L,x,C){return function(g){return C(S(x(g[0][0],g[1][1]),x(-g[0][1],g[1][0])))}}function d(S,L,x,C){return function(g){return C(S(L(S(x(g[1][1],g[2][2]),x(-g[1][2],g[2][1])),g[0][0]),S(L(S(x(g[1][0],g[2][2]),x(-g[1][2],g[2][0])),-g[0][1]),L(S(x(g[1][0],g[2][1]),x(-g[1][1],g[2][0])),g[0][2]))))}}function v(S,L,x,C){return function(g){return C(S(S(L(S(L(S(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][1]),S(L(S(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),-g[1][2]),L(S(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][3]))),g[0][0]),L(S(L(S(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][0]),S(L(S(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][2]),L(S(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),g[1][3]))),-g[0][1])),S(L(S(L(S(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),g[1][0]),S(L(S(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][1]),L(S(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][3]))),g[0][2]),L(S(L(S(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][0]),S(L(S(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),-g[1][1]),L(S(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][2]))),-g[0][3]))))}}function _(S,L,x,C){return function(g){return C(S(S(L(S(S(L(S(L(S(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),S(L(S(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(S(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][1]),L(S(L(S(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),S(L(S(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(S(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),-g[1][2])),S(L(S(L(S(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),S(L(S(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(S(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][3]),L(S(L(S(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),S(L(S(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(S(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),-g[1][4]))),g[0][0]),L(S(S(L(S(L(S(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),S(L(S(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(S(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][0]),L(S(L(S(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),S(L(S(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(S(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][2])),S(L(S(L(S(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),S(L(S(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(S(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),g[1][3]),L(S(L(S(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),S(L(S(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(S(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][4]))),-g[0][1])),S(L(S(S(L(S(L(S(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),S(L(S(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(S(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),g[1][0]),L(S(L(S(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),S(L(S(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(S(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][1])),S(L(S(L(S(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),S(L(S(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(S(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][3]),L(S(L(S(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),S(L(S(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(S(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),-g[1][4]))),g[0][2]),S(L(S(S(L(S(L(S(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),S(L(S(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(S(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][0]),L(S(L(S(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),S(L(S(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(S(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),-g[1][1])),S(L(S(L(S(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),S(L(S(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(S(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][2]),L(S(L(S(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),S(L(S(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(S(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][4]))),-g[0][3]),L(S(S(L(S(L(S(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),S(L(S(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(S(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),g[1][0]),L(S(L(S(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),S(L(S(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(S(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][1])),S(L(S(L(S(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),S(L(S(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(S(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),g[1][2]),L(S(L(S(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),S(L(S(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(S(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][3]))),g[0][4])))))}}function b(S){var L=S===2?h:S===3?d:S===4?v:S===5?_:void 0;return L(l,u,s,c)}var p=[function(){return[0]},function(L){return[L[0][0]]}];function k(S,L,x,C,M,g,P,T){return function(O){switch(O.length){case 0:return S(O);case 1:return L(O);case 2:return x(O);case 3:return C(O);case 4:return M(O);case 5:return g(O)}var V=P[O.length];return V||(V=P[O.length]=T(O.length)),V(O)}}function E(){for(;p.length0){z=d[G][P][0],V=G;break}O=z[V^1];for(var Z=0;Z<2;++Z)for(var j=d[Z][P],N=0;N0&&(z=H,O=te,V=Z)}return T||z&&p(z,V),O}function E(g,P){var T=d[P][g][0],z=[g];p(T,P);for(var O=T[P^1],V=P;;){for(;O!==g;)z.push(O),O=k(z[z.length-2],O,!1);if(d[0][g].length+d[1][g].length===0)break;var G=z[z.length-1],Z=g,j=z[1],N=k(G,Z,!0);if(s(c[G],c[Z],c[j],c[N])<0)break;z.push(g),O=k(G,Z)}return z}function S(g,P){return P[1]===P[P.length-1]}for(var v=0;v0;){var C=d[0][v].length,M=E(v,L);S(x,M)?x.push.apply(x,M):(x.length>0&&b.push(x),x=M)}x.length>0&&b.push(x)}return b}},3090:function(i,a,o){"use strict";i.exports=l;var s=o(3250)[3];function l(u){var c=u.length;if(c<3){for(var k=new Array(c),f=0;f1&&s(u[d[p-2]],u[d[p-1]],b)<=0;)p-=1,d.pop();for(d.push(_),p=v.length;p>1&&s(u[v[p-2]],u[v[p-1]],b)>=0;)p-=1,v.pop();v.push(_)}for(var k=new Array(v.length+d.length-2),E=0,f=0,S=d.length;f0;--L)k[E++]=v[L];return k}},3105:function(i,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,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;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}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3134:function(i,a,o){"use strict";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=0}function d(v,_,b,p){var k=s(_,b,p);if(k===0){var E=l(s(v,_,b)),S=l(s(v,_,p));if(E===S){if(E===0){var L=h(v,_,b),x=h(v,_,p);return L===x?0:L?1:-1}return 0}else{if(S===0)return E>0||h(v,_,p)?-1:1;if(E===0)return S>0||h(v,_,b)?1:-1}return l(S-E)}var C=s(v,_,b);if(C>0)return k>0&&s(v,_,p)>0?1:-1;if(C<0)return k>0||s(v,_,p)>0?1:-1;var M=s(v,_,p);return M>0||h(v,_,b)?1:-1}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l0){if(V<=0)return G;Z=O+V}else if(O<0){if(V>=0)return G;Z=-(O+V)}else return G;var j=d*Z;return G>=j||G<=-j?G:E(P,T,z)},function(P,T,z,O){var V=P[0]-O[0],G=T[0]-O[0],Z=z[0]-O[0],j=P[1]-O[1],N=T[1]-O[1],H=z[1]-O[1],te=P[2]-O[2],oe=T[2]-O[2],_e=z[2]-O[2],Ee=G*H,Ce=Z*N,me=Z*j,ie=V*H,Se=V*N,Le=G*j,Ae=te*(Ee-Ce)+oe*(me-ie)+_e*(Se-Le),Fe=(Math.abs(Ee)+Math.abs(Ce))*Math.abs(te)+(Math.abs(me)+Math.abs(ie))*Math.abs(oe)+(Math.abs(Se)+Math.abs(Le))*Math.abs(_e),Pe=v*Fe;return Ae>Pe||-Ae>Pe?Ae:S(P,T,z,O)}];function x(g){var P=L[g.length];return P||(P=L[g.length]=k(g.length)),P.apply(void 0,g)}function C(g,P,T,z,O,V,G){return function(j,N,H,te,oe){switch(arguments.length){case 0:case 1:return 0;case 2:return z(j,N);case 3:return O(j,N,H);case 4:return V(j,N,H,te);case 5:return G(j,N,H,te,oe)}for(var _e=new Array(arguments.length),Ee=0;Ee4)throw new l("","Invalid data type");switch(te.charAt(0)){case"b":case"i":h["uniform"+oe+"iv"](_[V],G);break;case"v":h["uniform"+oe+"fv"](_[V],G);break;default:throw new l("","Unrecognized data type for vector "+name+": "+te)}}else if(te.indexOf("mat")===0&&te.length===4){if(oe=te.charCodeAt(te.length-1)-48,oe<2||oe>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+te);h["uniformMatrix"+oe+"fv"](_[V],!1,G);break}else throw new l("","Unknown uniform data type for "+name+": "+te)}}}}}function k(C,M){if(typeof M!="object")return[[C,M]];var g=[];for(var P in M){var T=M[P],z=C;parseInt(P)+""===P?z+="["+P+"]":z+="."+P,typeof T=="object"?g.push.apply(g,k(z,T)):g.push([z,T])}return g}function E(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var M=C.indexOf("vec");if(0<=M&&M<=1&&C.length===4+M){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid data type");return C.charAt(0)==="b"?c(g,!1):c(g,0)}else if(C.indexOf("mat")===0&&C.length===4){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+C);return c(g*g,0)}else throw new l("","Unknown uniform data type for "+name+": "+C)}}function S(C,M,g){if(typeof g=="object"){var P=L(g);Object.defineProperty(C,M,{get:u(P),set:p(g),enumerable:!0,configurable:!1})}else _[g]?Object.defineProperty(C,M,{get:b(g),set:p(g),enumerable:!0,configurable:!1}):C[M]=E(v[g].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var g=0;g=0!=M>=0&&_.push(E[0]+.5+.5*(C+M)/(C-M))}v+=x,++E[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,_,b){var p=v.dtype,k=v.order,E=[p,k.join()].join(),S=h[E];return S||(h[E]=S=f([p,k])),S(v.shape.slice(0),v.data,v.stride,v.offset|0,_,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"zeroCrossings"})},3352:function(i,a,o){"use strict";var s=o(2478),l=0,u=1,c=2;i.exports=P;function f(T,z,O,V,G){this.mid=T,this.left=z,this.right=O,this.leftPoints=V,this.rightPoints=G,this.count=(z?z.count:0)+(O?O.count:0)+V.length}var h=f.prototype;function d(T,z){T.mid=z.mid,T.left=z.left,T.right=z.right,T.leftPoints=z.leftPoints,T.rightPoints=z.rightPoints,T.count=z.count}function v(T,z){var O=C(z);T.mid=O.mid,T.left=O.left,T.right=O.right,T.leftPoints=O.leftPoints,T.rightPoints=O.rightPoints,T.count=O.count}function _(T,z){var O=T.intervals([]);O.push(z),v(T,O)}function b(T,z){var O=T.intervals([]),V=O.indexOf(z);return V<0?l:(O.splice(V,1),v(T,O),u)}h.intervals=function(T){return T.push.apply(T,this.leftPoints),this.left&&this.left.intervals(T),this.right&&this.right.intervals(T),T},h.insert=function(T){var z=this.count-this.leftPoints.length;if(this.count+=1,T[1]3*(z+1)?_(this,T):this.left.insert(T):this.left=C([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?_(this,T):this.right.insert(T):this.right=C([T]);else{var O=s.ge(this.leftPoints,T,L),V=s.ge(this.rightPoints,T,x);this.leftPoints.splice(O,0,T),this.rightPoints.splice(V,0,T)}},h.remove=function(T){var z=this.count-this.leftPoints;if(T[1]3*(z-1))return b(this,T);var V=this.left.remove(T);return V===c?(this.left=null,this.count-=1,u):(V===u&&(this.count-=1),V)}else if(T[0]>this.mid){if(!this.right)return l;var G=this.left?this.left.count:0;if(4*G>3*(z-1))return b(this,T);var V=this.right.remove(T);return V===c?(this.right=null,this.count-=1,u):(V===u&&(this.count-=1),V)}else{if(this.count===1)return this.leftPoints[0]===T?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===T){if(this.left&&this.right){for(var Z=this,j=this.left;j.right;)Z=j,j=j.right;if(Z===this)j.right=this.right;else{var N=this.left,V=this.right;Z.count-=j.count,Z.right=j.left,j.left=N,j.right=V}d(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var N=s.ge(this.leftPoints,T,L);N=0&&T[V][1]>=z;--V){var G=O(T[V]);if(G)return G}}function E(T,z){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(T,z);if(O)return O}return k(this.rightPoints,T,z)}else return E(this.leftPoints,z)},h.queryInterval=function(T,z,O){if(Tthis.mid&&this.right){var V=this.right.queryInterval(T,z,O);if(V)return V}return zthis.mid?k(this.rightPoints,T,O):E(this.leftPoints,O)};function S(T,z){return T-z}function L(T,z){var O=T[0]-z[0];return O||T[1]-z[1]}function x(T,z){var O=T[1]-z[1];return O||T[0]-z[0]}function C(T){if(T.length===0)return null;for(var z=[],O=0;O>1],G=[],Z=[],j=[],O=0;O=0),x.type){case"b":k=parseInt(k,10).toString(2);break;case"c":k=String.fromCharCode(parseInt(k,10));break;case"d":case"i":k=parseInt(k,10);break;case"j":k=JSON.stringify(k,null,x.width?parseInt(x.width):0);break;case"e":k=x.precision?parseFloat(k).toExponential(x.precision):parseFloat(k).toExponential();break;case"f":k=x.precision?parseFloat(k).toFixed(x.precision):parseFloat(k);break;case"g":k=x.precision?String(Number(k.toPrecision(x.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=x.precision?k.substring(0,x.precision):k;break;case"t":k=String(!!k),k=x.precision?k.substring(0,x.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=x.precision?k.substring(0,x.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=x.precision?k.substring(0,x.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?E+=k:(l.number.test(x.type)&&(!P||x.sign)?(T=P?"+":"-",k=k.toString().replace(l.sign,"")):T="",M=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",g=x.width-(T+k).length,C=x.width&&g>0?M.repeat(g):"",E+=x.align?T+k+C:M==="0"?T+C+k:C+T+k)}return E}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var _=v,b,p=[],k=0;_;){if((b=l.text.exec(_))!==null)p.push(b[0]);else if((b=l.modulo.exec(_))!==null)p.push("%");else if((b=l.placeholder.exec(_))!==null){if(b[2]){k|=1;var E=[],S=b[2],L=[];if((L=l.key.exec(S))!==null)for(E.push(L[1]);(S=S.substring(L[0].length))!=="";)if((L=l.key_access.exec(S))!==null)E.push(L[1]);else if((L=l.index_access.exec(S))!==null)E.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");b[2]=E}else k|=2;if(k===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");p.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");_=_.substring(b[0].length)}return h[v]=p}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},3436:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; attribute vec4 color; uniform mat4 model, view, projection; uniform float capSize; varying vec4 fragColor; varying vec3 fragPosition; void main() { vec4 worldPosition = model * vec4(position, 1.0); worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; }`]),c=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float opacity; varying vec3 fragPosition; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], fragPosition) || fragColor.a * opacity == 0. ) discard; gl_FragColor = opacity * fragColor; }`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},3502:function(i,a,o){i.exports=u;var s=o(5995),l=o(9127);function u(c,f){return l(s(c,f))}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},3536:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},3545:function(i,a,o){"use strict";i.exports=f;var s=o(8105),l=s("lov&&b[C+d]>L;--x,C-=k){for(var M=C,g=C+k,P=0;P>>1,L=2*h,x=S,C=b[L*S+d];k=z?(x=T,C=z):P>=V?(x=g,C=P):(x=O,C=V):z>=V?(x=T,C=z):V>=P?(x=g,C=P):(x=O,C=V);for(var j=L*(E-1),N=L*x,G=0;Gthis.buffer.length){l.free(this.buffer);for(var E=this.buffer=l.mallocUint8(c(k*p*4)),S=0;Sx|0},vertex:function(E,S,L,x,C,M,g,P,T,z,O,V,G){var Z=(g<<0)+(P<<1)+(T<<2)+(z<<3)|0;if(!(Z===0||Z===15))switch(Z){case 0:O.push([E-.5,S-.5]);break;case 1:O.push([E-.25-.25*(x+L-2*G)/(L-x),S-.25-.25*(C+L-2*G)/(L-C)]);break;case 2:O.push([E-.75-.25*(-x-L+2*G)/(x-L),S-.25-.25*(M+x-2*G)/(x-M)]);break;case 3:O.push([E-.5,S-.5-.5*(C+L+M+x-4*G)/(L-C+x-M)]);break;case 4:O.push([E-.25-.25*(M+C-2*G)/(C-M),S-.75-.25*(-C-L+2*G)/(C-L)]);break;case 5:O.push([E-.5-.5*(x+L+M+C-4*G)/(L-x+C-M),S-.5]);break;case 6:O.push([E-.5-.25*(-x-L+M+C)/(x-L+C-M),S-.5-.25*(-C-L+M+x)/(C-L+x-M)]);break;case 7:O.push([E-.75-.25*(M+C-2*G)/(C-M),S-.75-.25*(M+x-2*G)/(x-M)]);break;case 8:O.push([E-.75-.25*(-M-C+2*G)/(M-C),S-.75-.25*(-M-x+2*G)/(M-x)]);break;case 9:O.push([E-.5-.25*(x+L+-M-C)/(L-x+M-C),S-.5-.25*(C+L+-M-x)/(L-C+M-x)]);break;case 10:O.push([E-.5-.5*(-x-L+-M-C+4*G)/(x-L+M-C),S-.5]);break;case 11:O.push([E-.25-.25*(-M-C+2*G)/(M-C),S-.75-.25*(C+L-2*G)/(L-C)]);break;case 12:O.push([E-.5,S-.5-.5*(-C-L+-M-x+4*G)/(C-L+M-x)]);break;case 13:O.push([E-.75-.25*(x+L-2*G)/(L-x),S-.25-.25*(-M-x+2*G)/(M-x)]);break;case 14:O.push([E-.25-.25*(-x-L+2*G)/(x-L),S-.25-.25*(-C-L+2*G)/(C-L)]);break;case 15:O.push([E-.5,S-.5]);break}},cell:function(E,S,L,x,C,M,g,P,T){C?P.push([E,S]):P.push([S,E])}});return function(k,E){var S=[],L=[];return p(k,S,L,E),{positions:S,cells:L}}}};function c(v,_){var b=v.length+"d",p=u[b];if(p)return p(s,v,_)}function f(v,_){for(var b=l(v,_),p=b.length,k=new Array(p),E=new Array(p),S=0;S>1,b=-7,p=l?c-1:0,k=l?-1:1,E=o[s+p];for(p+=k,f=E&(1<<-b)-1,E>>=-b,b+=d;b>0;f=f*256+o[s+p],p+=k,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+p],p+=k,b-=8);if(f===0)f=1-_;else{if(f===v)return h?NaN:(E?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-_}return(E?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,_=f*8-c-1,b=(1<<_)-1,p=b>>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=u?0:f-1,S=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+p>=1?s+=k/v:s+=k*Math.pow(2,1-p),s*v>=2&&(h++,v/=2),h+p>=b?(d=0,h=b):h+p>=1?(d=(s*v-1)*Math.pow(2,c),h=h+p):(d=s*Math.pow(2,p-1)*Math.pow(2,c),h=0));c>=8;o[l+E]=d&255,E+=S,d/=256,c-=8);for(h=h<0;o[l+E]=h&255,E+=S,h/=256,_-=8);o[l+E-S]|=L*128}},3788:function(i,a,o){"use strict";var s=o(8507),l=o(2419);i.exports=u;function u(c,f){return s(c,f)||l(c)-l(f)}},3837:function(i,a,o){"use strict";i.exports=O;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function _(V){return d.isView(V)&&!(V instanceof v)}function b(V){return Array.isArray(V)||_(V)}function p(V,G){return V[0]=G[0],V[1]=G[1],V[2]=G[2],V}function k(V){this.gl=V,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(V)}var E=k.prototype;E.update=function(V){V=V||{};function G(Ae,Fe,Pe){if(Pe in V){var ge=V[Pe],Re=this[Pe],ce;(Ae?b(ge)&&b(ge[0]):b(ge))?this[Pe]=ce=[Fe(ge[0]),Fe(ge[1]),Fe(ge[2])]:this[Pe]=ce=[Fe(ge),Fe(ge),Fe(ge)];for(var Ze=0;Ze<3;++Ze)if(ce[Ze]!==Re[Ze])return!0}return!1}var Z=G.bind(this,!1,Number),j=G.bind(this,!1,Boolean),N=G.bind(this,!1,String),H=G.bind(this,!0,function(Ae){if(b(Ae)){if(Ae.length===3)return[+Ae[0],+Ae[1],+Ae[2],1];if(Ae.length===4)return[+Ae[0],+Ae[1],+Ae[2],+Ae[3]]}return[0,0,0,1]}),te,oe=!1,_e=!1;if("bounds"in V)for(var Ee=V.bounds,Ce=0;Ce<2;++Ce)for(var me=0;me<3;++me)Ee[Ce][me]!==this.bounds[Ce][me]&&(_e=!0),this.bounds[Ce][me]=Ee[Ce][me];if("ticks"in V){te=V.ticks,oe=!0,this.autoTicks=!1;for(var Ce=0;Ce<3;++Ce)this.tickSpacing[Ce]=0}else Z("tickSpacing")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&("ticks"in V||"tickSpacing"in V||(this.autoTicks=!0),_e=!0,oe=!0,this._firstInit=!1),_e&&this.autoTicks&&(te=f.create(this.bounds,this.tickSpacing),oe=!0),oe){for(var Ce=0;Ce<3;++Ce)te[Ce].sort(function(Fe,Pe){return Fe.x-Pe.x});f.equal(te,this.ticks)?oe=!1:this.ticks=te}j("tickEnable"),N("tickFont")&&(oe=!0),N("tickFontStyle")&&(oe=!0),N("tickFontWeight")&&(oe=!0),N("tickFontVariant")&&(oe=!0),Z("tickSize"),Z("tickAngle"),Z("tickPad"),H("tickColor");var ie=N("labels");N("labelFont")&&(ie=!0),N("labelFontStyle")&&(ie=!0),N("labelFontWeight")&&(ie=!0),N("labelFontVariant")&&(ie=!0),j("labelEnable"),Z("labelSize"),Z("labelPad"),H("labelColor"),j("lineEnable"),j("lineMirror"),Z("lineWidth"),H("lineColor"),j("lineTickEnable"),j("lineTickMirror"),Z("lineTickLength"),Z("lineTickWidth"),H("lineTickColor"),j("gridEnable"),Z("gridWidth"),H("gridColor"),j("zeroEnable"),H("zeroLineColor"),Z("zeroLineWidth"),j("backgroundEnable"),H("backgroundColor");var Se=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Le=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||oe)&&this._text.update(this.bounds,this.labels,Se,this.ticks,Le):this._text=s(this.gl,this.bounds,this.labels,Se,this.ticks,Le),this._lines&&oe&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function S(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new S,new S,new S];function x(V,G,Z,j,N){for(var H=V.primalOffset,te=V.primalMinor,oe=V.mirrorOffset,_e=V.mirrorMinor,Ee=j[G],Ce=0;Ce<3;++Ce)if(G!==Ce){var me=H,ie=oe,Se=te,Le=_e;Ee&1<0?(Se[Ce]=-1,Le[Ce]=0):(Se[Ce]=0,Le[Ce]=1)}}var C=[0,0,0],M={model:h,view:h,projection:h,_ortho:!1};E.isOpaque=function(){return!0},E.isTransparent=function(){return!1},E.drawTransparent=function(V){};var g=0,P=[0,0,0],T=[0,0,0],z=[0,0,0];E.draw=function(V){V=V||M;for(var Pe=this.gl,G=V.model||h,Z=V.view||h,j=V.projection||h,N=this.bounds,H=V._ortho||!1,te=c(G,Z,j,N,H),oe=te.cubeEdges,_e=te.axis,Ee=Z[12],Ce=Z[13],me=Z[14],ie=Z[15],Se=H?2:1,Le=Se*this.pixelRatio*(j[3]*Ee+j[7]*Ce+j[11]*me+j[15]*ie)/Pe.drawingBufferHeight,Ae=0;Ae<3;++Ae)this.lastCubeProps.cubeEdges[Ae]=oe[Ae],this.lastCubeProps.axis[Ae]=_e[Ae];for(var Fe=L,Ae=0;Ae<3;++Ae)x(L[Ae],Ae,this.bounds,oe,_e);for(var Pe=this.gl,ge=C,Ae=0;Ae<3;++Ae)this.backgroundEnable[Ae]?ge[Ae]=_e[Ae]:ge[Ae]=0;this._background.draw(G,Z,j,N,ge,this.backgroundColor),this._lines.bind(G,Z,j,this);for(var Ae=0;Ae<3;++Ae){var Re=[0,0,0];_e[Ae]>0?Re[Ae]=N[1][Ae]:Re[Ae]=N[0][Ae];for(var ce=0;ce<2;++ce){var Ze=(Ae+1+ce)%3,ut=(Ae+1+(ce^1))%3;this.gridEnable[Ze]&&this._lines.drawGrid(Ze,ut,this.bounds,Re,this.gridColor[Ze],this.gridWidth[Ze]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var Ze=(Ae+1+ce)%3,ut=(Ae+1+(ce^1))%3;this.zeroEnable[ut]&&Math.min(N[0][ut],N[1][ut])<=0&&Math.max(N[0][ut],N[1][ut])>=0&&this._lines.drawZero(Ze,ut,this.bounds,Re,this.zeroLineColor[ut],this.zeroLineWidth[ut]*this.pixelRatio)}}for(var Ae=0;Ae<3;++Ae){this.lineEnable[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,Fe[Ae].primalOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio),this.lineMirror[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,Fe[Ae].mirrorOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio);for(var pt=p(P,Fe[Ae].primalMinor),Zt=p(T,Fe[Ae].mirrorMinor),st=this.lineTickLength,ce=0;ce<3;++ce){var lt=Le/G[5*ce];pt[ce]*=st[ce]*lt,Zt[ce]*=st[ce]*lt}this.lineTickEnable[Ae]&&this._lines.drawAxisTicks(Ae,Fe[Ae].primalOffset,pt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio),this.lineTickMirror[Ae]&&this._lines.drawAxisTicks(Ae,Fe[Ae].mirrorOffset,Zt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(G,Z,j,this.pixelRatio);var Gt,Nt=.5,Jt,sr;function wr(_t){sr=[0,0,0],sr[_t]=1}function cr(_t,It,mt){var er=(_t+1)%3,lr=(_t+2)%3,Tr=It[er],Lr=It[lr],ti=mt[er],Br=mt[lr];if(Tr>0&&Br>0){wr(er);return}else if(Tr>0&&Br<0){wr(er);return}else if(Tr<0&&Br>0){wr(er);return}else if(Tr<0&&Br<0){wr(er);return}else if(Lr>0&&ti>0){wr(lr);return}else if(Lr>0&&ti<0){wr(lr);return}else if(Lr<0&&ti>0){wr(lr);return}else if(Lr<0&&ti<0){wr(lr);return}}for(var Ae=0;Ae<3;++Ae){for(var $e=Fe[Ae].primalMinor,St=Fe[Ae].mirrorMinor,Qt=p(z,Fe[Ae].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[Ae]&&(Qt[ce]+=Le*$e[ce]*Math.max(this.lineTickLength[ce],0)/G[5*ce]);var Vt=[0,0,0];if(Vt[Ae]=1,this.tickEnable[Ae]){this.tickAngle[Ae]===-3600?(this.tickAngle[Ae]=0,this.tickAlign[Ae]="auto"):this.tickAlign[Ae]=-1,Jt=1,Gt=[this.tickAlign[Ae],Nt,Jt],Gt[0]==="auto"?Gt[0]=g:Gt[0]=parseInt(""+Gt[0]),sr=[0,0,0],cr(Ae,$e,St);for(var ce=0;ce<3;++ce)Qt[ce]+=Le*$e[ce]*this.tickPad[ce]/G[5*ce];this._text.drawTicks(Ae,this.tickSize[Ae],this.tickAngle[Ae],Qt,this.tickColor[Ae],Vt,sr,Gt)}if(this.labelEnable[Ae]){Jt=0,sr=[0,0,0],this.labels[Ae].length>4&&(wr(Ae),Jt=1),Gt=[this.labelAlign[Ae],Nt,Jt],Gt[0]==="auto"?Gt[0]=g:Gt[0]=parseInt(""+Gt[0]);for(var ce=0;ce<3;++ce)Qt[ce]+=Le*$e[ce]*this.labelPad[ce]/G[5*ce];Qt[Ae]+=.5*(N[0][Ae]+N[1][Ae]),this._text.drawLabel(Ae,this.labelSize[Ae],this.labelAngle[Ae],Qt,this.labelColor[Ae],[0,0,0],sr,Gt)}}this._text.unbind()},E.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(V,G){var Z=new k(V);return Z.update(G),Z}},3840:function(i){"use strict";i.exports=L;var a=0,o=1;function s(x,C,M,g,P,T){this._color=x,this.key=C,this.value=M,this.left=g,this.right=P,this._count=T}function l(x){return new s(x._color,x.key,x.value,x.left,x.right,x._count)}function u(x,C){return new s(x,C.key,C.value,C.left,C.right,C._count)}function c(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function f(x,C){this._compare=x,this.root=C}var h=f.prototype;Object.defineProperty(h,"keys",{get:function(){var x=[];return this.forEach(function(C,M){x.push(C)}),x}}),Object.defineProperty(h,"values",{get:function(){var x=[];return this.forEach(function(C,M){x.push(M)}),x}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(x,C){for(var M=this._compare,g=this.root,P=[],T=[];g;){var z=M(x,g.key);P.push(g),T.push(z),z<=0?g=g.left:g=g.right}P.push(new s(a,x,C,null,null,1));for(var O=P.length-2;O>=0;--O){var g=P[O];T[O]<=0?P[O]=new s(g._color,g.key,g.value,P[O+1],g.right,g._count+1):P[O]=new s(g._color,g.key,g.value,g.left,P[O+1],g._count+1)}for(var O=P.length-1;O>1;--O){var V=P[O-1],g=P[O];if(V._color===o||g._color===o)break;var G=P[O-2];if(G.left===V)if(V.left===g){var Z=G.right;if(Z&&Z._color===a)V._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.left=V.right,V._color=o,V.right=G,P[O-2]=V,P[O-1]=g,c(G),c(V),O>=3){var j=P[O-3];j.left===G?j.left=V:j.right=V}break}}else{var Z=G.right;if(Z&&Z._color===a)V._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(V.right=g.left,G._color=a,G.left=g.right,g._color=o,g.left=V,g.right=G,P[O-2]=g,P[O-1]=V,c(G),c(V),c(g),O>=3){var j=P[O-3];j.left===G?j.left=g:j.right=g}break}}else if(V.right===g){var Z=G.left;if(Z&&Z._color===a)V._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.right=V.left,V._color=o,V.left=G,P[O-2]=V,P[O-1]=g,c(G),c(V),O>=3){var j=P[O-3];j.right===G?j.right=V:j.left=V}break}}else{var Z=G.left;if(Z&&Z._color===a)V._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(V.left=g.right,G._color=a,G.right=g.left,g._color=o,g.right=V,g.left=G,P[O-2]=g,P[O-1]=V,c(G),c(V),c(g),O>=3){var j=P[O-3];j.right===G?j.right=g:j.left=g}break}}}return P[0]._color=o,new f(M,P[0])};function d(x,C){if(C.left){var M=d(x,C.left);if(M)return M}var M=x(C.key,C.value);if(M)return M;if(C.right)return d(x,C.right)}function v(x,C,M,g){var P=C(x,g.key);if(P<=0){if(g.left){var T=v(x,C,M,g.left);if(T)return T}var T=M(g.key,g.value);if(T)return T}if(g.right)return v(x,C,M,g.right)}function _(x,C,M,g,P){var T=M(x,P.key),z=M(C,P.key),O;if(T<=0&&(P.left&&(O=_(x,C,M,g,P.left),O)||z>0&&(O=g(P.key,P.value),O)))return O;if(z>0&&P.right)return _(x,C,M,g,P.right)}h.forEach=function(C,M,g){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return v(M,this._compare,C,this.root);case 3:return this._compare(M,g)>=0?void 0:_(M,g,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.left;return new b(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.right;return new b(this,x)}}),h.at=function(x){if(x<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(x=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var T=C(x,M.key);g.push(M),T<=0&&(P=g.length),T<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.gt=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var T=C(x,M.key);g.push(M),T<0&&(P=g.length),T<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.lt=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var T=C(x,M.key);g.push(M),T>0&&(P=g.length),T<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.le=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var T=C(x,M.key);g.push(M),T>=0&&(P=g.length),T<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.find=function(x){for(var C=this._compare,M=this.root,g=[];M;){var P=C(x,M.key);if(g.push(M),P===0)return new b(this,g);P<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(x){var C=this.find(x);return C?C.remove():this},h.get=function(x){for(var C=this._compare,M=this.root;M;){var g=C(x,M.key);if(g===0)return M.value;g<=0?M=M.left:M=M.right}};function b(x,C){this.tree=x,this._stack=C}var p=b.prototype;Object.defineProperty(p,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new b(this.tree,this._stack.slice())};function k(x,C){x.key=C.key,x.value=C.value,x.left=C.left,x.right=C.right,x._color=C._color,x._count=C._count}function E(x){for(var C,M,g,P,T=x.length-1;T>=0;--T){if(C=x[T],T===0){C._color=o;return}if(M=x[T-1],M.left===C){if(g=M.right,g.right&&g.right._color===a){if(g=M.right=l(g),P=g.right=l(g.right),M.right=g.left,g.left=M,g.right=P,g._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(g),T>1){var z=x[T-2];z.left===M?z.left=g:z.right=g}x[T-1]=g;return}else if(g.left&&g.left._color===a){if(g=M.right=l(g),P=g.left=l(g.left),M.right=P.left,g.left=P.right,P.left=M,P.right=g,P._color=M._color,M._color=o,g._color=o,C._color=o,c(M),c(g),c(P),T>1){var z=x[T-2];z.left===M?z.left=P:z.right=P}x[T-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.right=u(a,g);return}else{M.right=u(a,g);continue}else{if(g=l(g),M.right=g.left,g.left=M,g._color=M._color,M._color=a,c(M),c(g),T>1){var z=x[T-2];z.left===M?z.left=g:z.right=g}x[T-1]=g,x[T]=M,T+11){var z=x[T-2];z.right===M?z.right=g:z.left=g}x[T-1]=g;return}else if(g.right&&g.right._color===a){if(g=M.left=l(g),P=g.right=l(g.right),M.left=P.right,g.right=P.left,P.right=M,P.left=g,P._color=M._color,M._color=o,g._color=o,C._color=o,c(M),c(g),c(P),T>1){var z=x[T-2];z.right===M?z.right=P:z.left=P}x[T-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.left=u(a,g);return}else{M.left=u(a,g);continue}else{if(g=l(g),M.left=g.right,g.right=M,g._color=M._color,M._color=a,c(M),c(g),T>1){var z=x[T-2];z.right===M?z.right=g:z.left=g}x[T-1]=g,x[T]=M,T+1=0;--g){var M=x[g];M.left===x[g+1]?C[g]=new s(M._color,M.key,M.value,C[g+1],M.right,M._count):C[g]=new s(M._color,M.key,M.value,M.left,C[g+1],M._count)}if(M=C[C.length-1],M.left&&M.right){var P=C.length;for(M=M.left;M.right;)C.push(M),M=M.right;var T=C[P-1];C.push(new s(M._color,T.key,T.value,M.left,M.right,M._count)),C[P-1].key=M.key,C[P-1].value=M.value;for(var g=C.length-2;g>=P;--g)M=C[g],C[g]=new s(M._color,M.key,M.value,M.left,C[g+1],M._count);C[P-1].left=C[P]}if(M=C[C.length-1],M._color===a){var z=C[C.length-2];z.left===M?z.left=null:z.right===M&&(z.right=null),C.pop();for(var g=0;g0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,"index",{get:function(){var x=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(x=C[C.length-1].left._count);for(var g=C.length-2;g>=0;--g)C[g+1]===C[g].right&&(++x,C[g].left&&(x+=C[g].left._count));return x},enumerable:!0}),p.next=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.right)for(C=C.right;C;)x.push(C),C=C.left;else for(x.pop();x.length>0&&x[x.length-1].right===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].left===x[C])return!0;return!1}}),p.update=function(x){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var M=new Array(C.length),g=C[C.length-1];M[M.length-1]=new s(g._color,g.key,x,g.left,g.right,g._count);for(var P=C.length-2;P>=0;--P)g=C[P],g.left===C[P+1]?M[P]=new s(g._color,g.key,g.value,M[P+1],g.right,g._count):M[P]=new s(g._color,g.key,g.value,g.left,M[P+1],g._count);return new f(this.tree._compare,M[0])},p.prev=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.left)for(C=C.left;C;)x.push(C),C=C.right;else for(x.pop();x.length>0&&x[x.length-1].left===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].right===x[C])return!0;return!1}});function S(x,C){return xC?1:0}function L(x){return new f(x||S,null)}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},3952:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){for(var h=new Array(f+1),d=0;d20?52:h+32}},4040:function(i){i.exports=a;function a(o,s,l,u,c,f,h){var d=1/(s-l),v=1/(u-c),_=1/(f-h);return o[0]=-2*d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*v,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*_,o[11]=0,o[12]=(s+l)*d,o[13]=(c+u)*v,o[14]=(h+f)*_,o[15]=1,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],_=l[3],b=_*u+d*f-v*c,p=_*c+v*u-h*f,k=_*f+h*c-d*u,E=-h*u-d*c-v*f;return o[0]=b*_+E*-h+p*-v-k*-d,o[1]=p*_+E*-d+k*-h-b*-v,o[2]=k*_+E*-v+b*-d-p*-h,o[3]=s[3],o}},4081:function(i){"use strict";i.exports=a;function a(o,s,l,u,c,f,h,d,v,_){var b=s+f+_;if(p>0){var p=Math.sqrt(b+1);o[0]=.5*(h-v)/p,o[1]=.5*(d-u)/p,o[2]=.5*(l-f)/p,o[3]=.5*p}else{var k=Math.max(s,f,_),p=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*p,o[1]=.5*(c+l)/p,o[2]=.5*(d+u)/p,o[3]=.5*(h-v)/p):f>=k?(o[0]=.5*(l+c)/p,o[1]=.5*p,o[2]=.5*(v+h)/p,o[3]=.5*(d-u)/p):(o[0]=.5*(u+d)/p,o[1]=.5*(h+v)/p,o[2]=.5*p,o[3]=.5*(l-c)/p)}return o}},4100:function(i,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),_=o(4772),b=o(4040),p=o(799),k=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function E(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function S(g,P){var T=null;try{T=g.getContext("webgl",P),T||(T=g.getContext("experimental-webgl",P))}catch(z){return null}return T}function L(g){var P=Math.round(Math.log(Math.abs(g))/Math.log(10));if(P<0){var T=Math.round(Math.pow(10,-P));return Math.ceil(g*T)/T}else if(P>0){var T=Math.round(Math.pow(10,P));return Math.ceil(g/T)*T}return Math.ceil(g)}function x(g){return typeof g=="boolean"?g:!0}function C(g){g=g||{},g.camera=g.camera||{};var P=g.canvas;if(!P)if(P=document.createElement("canvas"),g.container){var T=g.container;T.appendChild(P)}else document.body.appendChild(P);var z=g.gl;if(z||(g.glOptions&&(k=!!g.glOptions.preserveDrawingBuffer),z=S(P,g.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!z)throw new Error("webgl not supported");var O=g.bounds||[[-10,-10,-10],[10,10,10]],V=new E,G=h(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!k}),Z=p(z),j=g.cameraObject&&g.cameraObject._ortho===!0||g.camera.projection&&g.camera.projection.type==="orthographic"||!1,N={eye:g.camera.eye||[2,0,0],center:g.camera.center||[0,0,0],up:g.camera.up||[0,1,0],zoomMin:g.camera.zoomMax||.1,zoomMax:g.camera.zoomMin||100,mode:g.camera.mode||"turntable",_ortho:j},H=g.axes||{},te=l(z,H);te.enable=!H.disable;var oe=g.spikes||{},_e=c(z,oe),Ee=[],Ce=[],me=[],ie=[],Se=!0,Pe=!0,Le=new Array(16),Ae=new Array(16),Fe={view:null,projection:Le,model:Ae,_ortho:!1},Pe=!0,ge=[z.drawingBufferWidth,z.drawingBufferHeight],Re=g.cameraObject||s(P,N),ce={gl:z,contextLost:!1,pixelRatio:g.pixelRatio||1,canvas:P,selection:V,camera:Re,axes:te,axesPixels:null,spikes:_e,bounds:O,objects:Ee,shape:ge,aspect:g.aspectRatio||[1,1,1],pickRadius:g.pickRadius||10,zNear:g.zNear||.01,zFar:g.zFar||1e3,fovy:g.fovy||Math.PI/4,clearColor:g.clearColor||[0,0,0,0],autoResize:x(g.autoResize),autoBounds:x(g.autoBounds),autoScale:!!g.autoScale,autoCenter:x(g.autoCenter),clipToBounds:x(g.clipToBounds),snapToData:!!g.snapToData,onselect:g.onselect||null,onrender:g.onrender||null,onclick:g.onclick||null,cameraParams:Fe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(sr){this.aspect[0]=sr.x,this.aspect[1]=sr.y,this.aspect[2]=sr.z,Pe=!0},setBounds:function(sr,wr){this.bounds[0][sr]=wr.min,this.bounds[1][sr]=wr.max},setClearColor:function(sr){this.clearColor=sr},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},Ze=[z.drawingBufferWidth/ce.pixelRatio|0,z.drawingBufferHeight/ce.pixelRatio|0];function ut(){if(!ce._stopped&&ce.autoResize){var sr=P.parentNode,wr=1,cr=1;sr&&sr!==document.body?(wr=sr.clientWidth,cr=sr.clientHeight):(wr=window.innerWidth,cr=window.innerHeight);var $e=Math.ceil(wr*ce.pixelRatio)|0,St=Math.ceil(cr*ce.pixelRatio)|0;if($e!==P.width||St!==P.height){P.width=$e,P.height=St;var Qt=P.style;Qt.position=Qt.position||"absolute",Qt.left="0px",Qt.top="0px",Qt.width=wr+"px",Qt.height=cr+"px",Se=!0}}}ce.autoResize&&ut(),window.addEventListener("resize",ut);function pt(){for(var sr=Ee.length,wr=ie.length,cr=0;cr0&&me[wr-1]===0;)me.pop(),ie.pop().dispose()}ce.update=function(sr){ce._stopped||(sr=sr||{},Se=!0,Pe=!0)},ce.add=function(sr){ce._stopped||(sr.axes=te,Ee.push(sr),Ce.push(-1),Se=!0,Pe=!0,pt())},ce.remove=function(sr){if(!ce._stopped){var wr=Ee.indexOf(sr);wr<0||(Ee.splice(wr,1),Ce.pop(),Se=!0,Pe=!0,pt())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener("resize",ut),P.removeEventListener("webglcontextlost",Zt),ce.mouseListener.enabled=!1,!ce.contextLost)){te.dispose(),_e.dispose();for(var sr=0;srV.distance)continue;for(var mt=0;mt_;){var M=p[C-2],g=p[C-1];if(Mp[b+1]:!0}function d(_,b,p,k){_*=2;var E=k[_];return E>1,x=L-k,C=L+k,M=E,g=x,P=L,T=C,z=S,O=_+1,V=b-1,G=0;h(M,g,p)&&(G=M,M=g,g=G),h(T,z,p)&&(G=T,T=z,z=G),h(M,P,p)&&(G=M,M=P,P=G),h(g,P,p)&&(G=g,g=P,P=G),h(M,T,p)&&(G=M,M=T,T=G),h(P,T,p)&&(G=P,P=T,T=G),h(g,z,p)&&(G=g,g=z,z=G),h(g,P,p)&&(G=g,g=P,P=G),h(T,z,p)&&(G=T,T=z,z=G);for(var Z=p[2*g],j=p[2*g+1],N=p[2*T],H=p[2*T+1],te=2*M,oe=2*P,_e=2*z,Ee=2*E,Ce=2*L,me=2*S,ie=0;ie<2;++ie){var Se=p[te+ie],Le=p[oe+ie],Ae=p[_e+ie];p[Ee+ie]=Se,p[Ce+ie]=Le,p[me+ie]=Ae}u(x,_,p),u(C,b,p);for(var Fe=O;Fe<=V;++Fe)if(d(Fe,Z,j,p))Fe!==O&&l(Fe,O,p),++O;else if(!d(Fe,N,H,p))for(;;)if(d(V,N,H,p)){d(V,Z,j,p)?(c(Fe,O,V,p),++O,--V):(l(Fe,V,p),--V);break}else{if(--V0)if(E[0]!==L[1][0])S=k,k=k.right;else{var g=v(k.right,E);if(g)return g;k=k.left}else{if(E[0]!==L[1][0])return k;var g=v(k.right,E);if(g)return g;k=k.left}}return S}h.castUp=function(k){var E=s.le(this.coordinates,k[0]);if(E<0)return-1;var S=this.slabs[E],L=v(this.slabs[E],k),x=-1;if(L&&(x=L.value),this.coordinates[E]===k[0]){var C=null;if(L&&(C=L.key),E>0){var M=v(this.slabs[E-1],k);M&&(C?c(M.key,C)>0&&(C=M.key,x=M.value):(x=M.value,C=M.key))}var g=this.horizontal[E];if(g.length>0){var P=s.ge(g,k[1],d);if(P=g.length)return x;T=g[P]}}if(T.start)if(C){var z=u(C[0],C[1],[k[0],T.y]);C[0][0]>C[1][0]&&(z=-z),z>0&&(x=T.index)}else x=T.index;else T.y!==k[1]&&(x=T.index)}}}return x};function _(k,E,S,L){this.y=k,this.index=E,this.start=S,this.closed=L}function b(k,E,S,L){this.x=k,this.segment=E,this.create=S,this.index=L}function p(k){for(var E=k.length,S=2*E,L=new Array(S),x=0;xMath.abs(g))p.rotate(z,0,0,-M*P*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var O=-x.zoomSpeed*T*g/window.innerHeight*(z-p.lastT())/20;p.pan(z,0,0,E*(Math.exp(O)-1))}}},!0)},x.enableMouseListeners(),x}},4449:function(i,a,o){"use strict";var s=o(2762),l=o(8116),u=o(1493);i.exports=b;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,E,S){this.gl=p,this.buffer=k,this.vao=E,this.shader=S,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var h=f.prototype,d=[0,0,0],v=[0,0,0],_=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(p){},h.draw=function(p){var k=this.gl,E=this.vao,S=this.shader;E.bind(),S.bind();var L=p.model||c,x=p.view||c,C=p.projection||c,M;this.axes&&(M=this.axes.lastCubeProps.axis);for(var g=d,P=v,T=0;T<3;++T)M&&M[T]<0?(g[T]=this.bounds[0][T],P[T]=this.bounds[1][T]):(g[T]=this.bounds[1][T],P[T]=this.bounds[0][T]);_[0]=k.drawingBufferWidth,_[1]=k.drawingBufferHeight,S.uniforms.model=L,S.uniforms.view=x,S.uniforms.projection=C,S.uniforms.coordinates=[this.position,g,P],S.uniforms.colors=this.colors,S.uniforms.screenShape=_;for(var T=0;T<3;++T)S.uniforms.lineWidth=this.lineWidth[T]*this.pixelRatio,this.enabled[T]&&(E.draw(k.TRIANGLES,6,6*T),this.drawSides[T]&&E.draw(k.TRIANGLES,12,18+12*T));E.unbind()},h.update=function(p){p&&("bounds"in p&&(this.bounds=p.bounds),"position"in p&&(this.position=p.position),"lineWidth"in p&&(this.lineWidth=p.lineWidth),"colors"in p&&(this.colors=p.colors),"enabled"in p&&(this.enabled=p.enabled),"drawSides"in p&&(this.drawSides=p.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function b(p,k){var E=[];function S(g,P,T,z,O,V){var G=[g,P,T,0,0,0,1];G[z+3]=1,G[z]=O,E.push.apply(E,G),G[6]=-1,E.push.apply(E,G),G[z]=V,E.push.apply(E,G),E.push.apply(E,G),G[6]=1,E.push.apply(E,G),G[z]=O,E.push.apply(E,G)}S(0,0,0,0,0,1),S(0,0,0,1,0,1),S(0,0,0,2,0,1),S(1,0,0,1,-1,1),S(1,0,0,2,-1,1),S(0,1,0,0,-1,1),S(0,1,0,2,-1,1),S(0,0,1,0,-1,1),S(0,0,1,1,-1,1);var L=s(p,E),x=l(p,[{type:p.FLOAT,buffer:L,size:3,offset:0,stride:28},{type:p.FLOAT,buffer:L,size:3,offset:12,stride:28},{type:p.FLOAT,buffer:L,size:1,offset:24,stride:28}]),C=u(p);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.weight.location=2;var M=new f(p,L,x,C);return M.update(k),M}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},4505:function(i,a,o){i.exports=o(5847)},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},4623:function(i){"use strict";"use restrict";i.exports=a;function a(o){this.roots=new Array(o),this.ranks=new Array(o);for(var s=0;s0)return 1<=0)return 1<=0;--p)h[p]=d*s[p]+v*l[p]+_*u[p]+b*c[p];return h}return d*s+v*l+_*u[p]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,_=d*d,b=(1+2*f)*_,p=f*_,k=v*(3-2*f),E=v*d;if(s.length){h||(h=new Array(s.length));for(var S=s.length-1;S>=0;--S)h[S]=b*s[S]+p*l[S]+k*u[S]+E*c[S];return h}return b*s+p*l+k*u+E*c}i.exports=o,i.exports.derivative=a},4772:function(i){i.exports=a;function a(o,s,l,u,c){var f=1/Math.tan(s/2),h=1/(u-c);return o[0]=f/l,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=f,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(c+u)*h,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*c*u*h,o[15]=0,o}},4793:function(i,a,o){"use strict";var s;function l(Ie,xe){if(!(Ie instanceof xe))throw new TypeError("Cannot call a class as a function")}function u(Ie,xe){for(var ke=0;keM)throw new RangeError('The value "'+Ie+'" is invalid for option "size"');var xe=new Uint8Array(Ie);return Object.setPrototypeOf(xe,T.prototype),xe}function T(Ie,xe,ke){if(typeof Ie=="number"){if(typeof xe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return G(Ie)}return z(Ie,xe,ke)}T.poolSize=8192;function z(Ie,xe,ke){if(typeof Ie=="string")return Z(Ie,xe);if(ArrayBuffer.isView(Ie))return N(Ie);if(Ie==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+S(Ie));if(Ge(Ie,ArrayBuffer)||Ie&&Ge(Ie.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Ge(Ie,SharedArrayBuffer)||Ie&&Ge(Ie.buffer,SharedArrayBuffer)))return H(Ie,xe,ke);if(typeof Ie=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var vt=Ie.valueOf&&Ie.valueOf();if(vt!=null&&vt!==Ie)return T.from(vt,xe,ke);var ir=te(Ie);if(ir)return ir;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Ie[Symbol.toPrimitive]=="function")return T.from(Ie[Symbol.toPrimitive]("string"),xe,ke);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+S(Ie))}T.from=function(Ie,xe,ke){return z(Ie,xe,ke)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function O(Ie){if(typeof Ie!="number")throw new TypeError('"size" argument must be of type number');if(Ie<0)throw new RangeError('The value "'+Ie+'" is invalid for option "size"')}function V(Ie,xe,ke){return O(Ie),Ie<=0?P(Ie):xe!==void 0?typeof ke=="string"?P(Ie).fill(xe,ke):P(Ie).fill(xe):P(Ie)}T.alloc=function(Ie,xe,ke){return V(Ie,xe,ke)};function G(Ie){return O(Ie),P(Ie<0?0:oe(Ie)|0)}T.allocUnsafe=function(Ie){return G(Ie)},T.allocUnsafeSlow=function(Ie){return G(Ie)};function Z(Ie,xe){if((typeof xe!="string"||xe==="")&&(xe="utf8"),!T.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe);var ke=Ee(Ie,xe)|0,vt=P(ke),ir=vt.write(Ie,xe);return ir!==ke&&(vt=vt.slice(0,ir)),vt}function j(Ie){for(var xe=Ie.length<0?0:oe(Ie.length)|0,ke=P(xe),vt=0;vt=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return Ie|0}function _e(Ie){return+Ie!=Ie&&(Ie=0),T.alloc(+Ie)}T.isBuffer=function(xe){return xe!=null&&xe._isBuffer===!0&&xe!==T.prototype},T.compare=function(xe,ke){if(Ge(xe,Uint8Array)&&(xe=T.from(xe,xe.offset,xe.byteLength)),Ge(ke,Uint8Array)&&(ke=T.from(ke,ke.offset,ke.byteLength)),!T.isBuffer(xe)||!T.isBuffer(ke))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(xe===ke)return 0;for(var vt=xe.length,ir=ke.length,ar=0,vr=Math.min(vt,ir);arir.length?(T.isBuffer(vr)||(vr=T.from(vr)),vr.copy(ir,ar)):Uint8Array.prototype.set.call(ir,vr,ar);else if(T.isBuffer(vr))vr.copy(ir,ar);else throw new TypeError('"list" argument must be an Array of Buffers');ar+=vr.length}return ir};function Ee(Ie,xe){if(T.isBuffer(Ie))return Ie.length;if(ArrayBuffer.isView(Ie)||Ge(Ie,ArrayBuffer))return Ie.byteLength;if(typeof Ie!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+S(Ie));var ke=Ie.length,vt=arguments.length>2&&arguments[2]===!0;if(!vt&&ke===0)return 0;for(var ir=!1;;)switch(xe){case"ascii":case"latin1":case"binary":return ke;case"utf8":case"utf-8":return Lr(Ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ke*2;case"hex":return ke>>>1;case"base64":return Vr(Ie).length;default:if(ir)return vt?-1:Lr(Ie).length;xe=(""+xe).toLowerCase(),ir=!0}}T.byteLength=Ee;function Ce(Ie,xe,ke){var vt=!1;if((xe===void 0||xe<0)&&(xe=0),xe>this.length||((ke===void 0||ke>this.length)&&(ke=this.length),ke<=0)||(ke>>>=0,xe>>>=0,ke<=xe))return"";for(Ie||(Ie="utf8");;)switch(Ie){case"hex":return st(this,xe,ke);case"utf8":case"utf-8":return ce(this,xe,ke);case"ascii":return pt(this,xe,ke);case"latin1":case"binary":return Zt(this,xe,ke);case"base64":return Re(this,xe,ke);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt(this,xe,ke);default:if(vt)throw new TypeError("Unknown encoding: "+Ie);Ie=(Ie+"").toLowerCase(),vt=!0}}T.prototype._isBuffer=!0;function me(Ie,xe,ke){var vt=Ie[xe];Ie[xe]=Ie[ke],Ie[ke]=vt}T.prototype.swap16=function(){var xe=this.length;if(xe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ke=0;keke&&(xe+=" ... "),""},C&&(T.prototype[C]=T.prototype.inspect),T.prototype.compare=function(xe,ke,vt,ir,ar){if(Ge(xe,Uint8Array)&&(xe=T.from(xe,xe.offset,xe.byteLength)),!T.isBuffer(xe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+S(xe));if(ke===void 0&&(ke=0),vt===void 0&&(vt=xe?xe.length:0),ir===void 0&&(ir=0),ar===void 0&&(ar=this.length),ke<0||vt>xe.length||ir<0||ar>this.length)throw new RangeError("out of range index");if(ir>=ar&&ke>=vt)return 0;if(ir>=ar)return-1;if(ke>=vt)return 1;if(ke>>>=0,vt>>>=0,ir>>>=0,ar>>>=0,this===xe)return 0;for(var vr=ar-ir,ii=vt-ke,pi=Math.min(vr,ii),$r=this.slice(ir,ar),di=xe.slice(ke,vt),ji=0;ji2147483647?ke=2147483647:ke<-2147483648&&(ke=-2147483648),ke=+ke,Je(ke)&&(ke=ir?0:Ie.length-1),ke<0&&(ke=Ie.length+ke),ke>=Ie.length){if(ir)return-1;ke=Ie.length-1}else if(ke<0)if(ir)ke=0;else return-1;if(typeof xe=="string"&&(xe=T.from(xe,vt)),T.isBuffer(xe))return xe.length===0?-1:Se(Ie,xe,ke,vt,ir);if(typeof xe=="number")return xe=xe&255,typeof Uint8Array.prototype.indexOf=="function"?ir?Uint8Array.prototype.indexOf.call(Ie,xe,ke):Uint8Array.prototype.lastIndexOf.call(Ie,xe,ke):Se(Ie,[xe],ke,vt,ir);throw new TypeError("val must be string, number or Buffer")}function Se(Ie,xe,ke,vt,ir){var ar=1,vr=Ie.length,ii=xe.length;if(vt!==void 0&&(vt=String(vt).toLowerCase(),vt==="ucs2"||vt==="ucs-2"||vt==="utf16le"||vt==="utf-16le")){if(Ie.length<2||xe.length<2)return-1;ar=2,vr/=2,ii/=2,ke/=2}function pi(wi,On){return ar===1?wi[On]:wi.readUInt16BE(On*ar)}var $r;if(ir){var di=-1;for($r=ke;$rvr&&(ke=vr-ii),$r=ke;$r>=0;$r--){for(var ji=!0,In=0;Inir&&(vt=ir)):vt=ir;var ar=xe.length;vt>ar/2&&(vt=ar/2);var vr;for(vr=0;vr>>0,isFinite(vt)?(vt=vt>>>0,ir===void 0&&(ir="utf8")):(ir=vt,vt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ar=this.length-ke;if((vt===void 0||vt>ar)&&(vt=ar),xe.length>0&&(vt<0||ke<0)||ke>this.length)throw new RangeError("Attempt to write outside buffer bounds");ir||(ir="utf8");for(var vr=!1;;)switch(ir){case"hex":return Le(this,xe,ke,vt);case"utf8":case"utf-8":return Ae(this,xe,ke,vt);case"ascii":case"latin1":case"binary":return Fe(this,xe,ke,vt);case"base64":return Pe(this,xe,ke,vt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,xe,ke,vt);default:if(vr)throw new TypeError("Unknown encoding: "+ir);ir=(""+ir).toLowerCase(),vr=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Re(Ie,xe,ke){return xe===0&&ke===Ie.length?L.fromByteArray(Ie):L.fromByteArray(Ie.slice(xe,ke))}function ce(Ie,xe,ke){ke=Math.min(Ie.length,ke);for(var vt=[],ir=xe;ir239?4:ar>223?3:ar>191?2:1;if(ir+ii<=ke){var pi=void 0,$r=void 0,di=void 0,ji=void 0;switch(ii){case 1:ar<128&&(vr=ar);break;case 2:pi=Ie[ir+1],(pi&192)===128&&(ji=(ar&31)<<6|pi&63,ji>127&&(vr=ji));break;case 3:pi=Ie[ir+1],$r=Ie[ir+2],(pi&192)===128&&($r&192)===128&&(ji=(ar&15)<<12|(pi&63)<<6|$r&63,ji>2047&&(ji<55296||ji>57343)&&(vr=ji));break;case 4:pi=Ie[ir+1],$r=Ie[ir+2],di=Ie[ir+3],(pi&192)===128&&($r&192)===128&&(di&192)===128&&(ji=(ar&15)<<18|(pi&63)<<12|($r&63)<<6|di&63,ji>65535&&ji<1114112&&(vr=ji))}}vr===null?(vr=65533,ii=1):vr>65535&&(vr-=65536,vt.push(vr>>>10&1023|55296),vr=56320|vr&1023),vt.push(vr),ir+=ii}return ut(vt)}var Ze=4096;function ut(Ie){var xe=Ie.length;if(xe<=Ze)return String.fromCharCode.apply(String,Ie);for(var ke="",vt=0;vtvt)&&(ke=vt);for(var ir="",ar=xe;arvt&&(xe=vt),ke<0?(ke+=vt,ke<0&&(ke=0)):ke>vt&&(ke=vt),keke)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Gt(xe,ke,this.length);for(var ir=this[xe],ar=1,vr=0;++vr>>0,ke=ke>>>0,vt||Gt(xe,ke,this.length);for(var ir=this[xe+--ke],ar=1;ke>0&&(ar*=256);)ir+=this[xe+--ke]*ar;return ir},T.prototype.readUint8=T.prototype.readUInt8=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,1,this.length),this[xe]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,2,this.length),this[xe]|this[xe+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,2,this.length),this[xe]<<8|this[xe+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,4,this.length),(this[xe]|this[xe+1]<<8|this[xe+2]<<16)+this[xe+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,4,this.length),this[xe]*16777216+(this[xe+1]<<16|this[xe+2]<<8|this[xe+3])},T.prototype.readBigUInt64LE=tt(function(xe){xe=xe>>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=ke+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24),ar=this[++xe]+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+vt*Math.pow(2,24);return BigInt(ir)+(BigInt(ar)<>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=ke*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe],ar=this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+vt;return(BigInt(ir)<>>0,ke=ke>>>0,vt||Gt(xe,ke,this.length);for(var ir=this[xe],ar=1,vr=0;++vr=ar&&(ir-=Math.pow(2,8*ke)),ir},T.prototype.readIntBE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Gt(xe,ke,this.length);for(var ir=ke,ar=1,vr=this[xe+--ir];ir>0&&(ar*=256);)vr+=this[xe+--ir]*ar;return ar*=128,vr>=ar&&(vr-=Math.pow(2,8*ke)),vr},T.prototype.readInt8=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,1,this.length),this[xe]&128?(255-this[xe]+1)*-1:this[xe]},T.prototype.readInt16LE=function(xe,ke){xe=xe>>>0,ke||Gt(xe,2,this.length);var vt=this[xe]|this[xe+1]<<8;return vt&32768?vt|4294901760:vt},T.prototype.readInt16BE=function(xe,ke){xe=xe>>>0,ke||Gt(xe,2,this.length);var vt=this[xe+1]|this[xe]<<8;return vt&32768?vt|4294901760:vt},T.prototype.readInt32LE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,4,this.length),this[xe]|this[xe+1]<<8|this[xe+2]<<16|this[xe+3]<<24},T.prototype.readInt32BE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,4,this.length),this[xe]<<24|this[xe+1]<<16|this[xe+2]<<8|this[xe+3]},T.prototype.readBigInt64LE=tt(function(xe){xe=xe>>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=this[xe+4]+this[xe+5]*Math.pow(2,8)+this[xe+6]*Math.pow(2,16)+(vt<<24);return(BigInt(ir)<>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=(ke<<24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe];return(BigInt(ir)<>>0,ke||Gt(xe,4,this.length),x.read(this,xe,!0,23,4)},T.prototype.readFloatBE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,4,this.length),x.read(this,xe,!1,23,4)},T.prototype.readDoubleLE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,8,this.length),x.read(this,xe,!0,52,8)},T.prototype.readDoubleBE=function(xe,ke){return xe=xe>>>0,ke||Gt(xe,8,this.length),x.read(this,xe,!1,52,8)};function Nt(Ie,xe,ke,vt,ir,ar){if(!T.isBuffer(Ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(xe>ir||xeIe.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,vt=vt>>>0,!ir){var ar=Math.pow(2,8*vt)-1;Nt(this,xe,ke,vt,ar,0)}var vr=1,ii=0;for(this[ke]=xe&255;++ii>>0,vt=vt>>>0,!ir){var ar=Math.pow(2,8*vt)-1;Nt(this,xe,ke,vt,ar,0)}var vr=vt-1,ii=1;for(this[ke+vr]=xe&255;--vr>=0&&(ii*=256);)this[ke+vr]=xe/ii&255;return ke+vt},T.prototype.writeUint8=T.prototype.writeUInt8=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,1,255,0),this[ke]=xe&255,ke+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,65535,0),this[ke]=xe&255,this[ke+1]=xe>>>8,ke+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,65535,0),this[ke]=xe>>>8,this[ke+1]=xe&255,ke+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,4294967295,0),this[ke+3]=xe>>>24,this[ke+2]=xe>>>16,this[ke+1]=xe>>>8,this[ke]=xe&255,ke+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,4294967295,0),this[ke]=xe>>>24,this[ke+1]=xe>>>16,this[ke+2]=xe>>>8,this[ke+3]=xe&255,ke+4};function Jt(Ie,xe,ke,vt,ir){It(xe,vt,ir,Ie,ke,7);var ar=Number(xe&BigInt(4294967295));Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar;var vr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,ke}function sr(Ie,xe,ke,vt,ir){It(xe,vt,ir,Ie,ke,7);var ar=Number(xe&BigInt(4294967295));Ie[ke+7]=ar,ar=ar>>8,Ie[ke+6]=ar,ar=ar>>8,Ie[ke+5]=ar,ar=ar>>8,Ie[ke+4]=ar;var vr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[ke+3]=vr,vr=vr>>8,Ie[ke+2]=vr,vr=vr>>8,Ie[ke+1]=vr,vr=vr>>8,Ie[ke]=vr,ke+8}T.prototype.writeBigUInt64LE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Jt(this,xe,ke,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,ke,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,!ir){var ar=Math.pow(2,8*vt-1);Nt(this,xe,ke,vt,ar-1,-ar)}var vr=0,ii=1,pi=0;for(this[ke]=xe&255;++vr>0)-pi&255;return ke+vt},T.prototype.writeIntBE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,!ir){var ar=Math.pow(2,8*vt-1);Nt(this,xe,ke,vt,ar-1,-ar)}var vr=vt-1,ii=1,pi=0;for(this[ke+vr]=xe&255;--vr>=0&&(ii*=256);)xe<0&&pi===0&&this[ke+vr+1]!==0&&(pi=1),this[ke+vr]=(xe/ii>>0)-pi&255;return ke+vt},T.prototype.writeInt8=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,1,127,-128),xe<0&&(xe=255+xe+1),this[ke]=xe&255,ke+1},T.prototype.writeInt16LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,32767,-32768),this[ke]=xe&255,this[ke+1]=xe>>>8,ke+2},T.prototype.writeInt16BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,32767,-32768),this[ke]=xe>>>8,this[ke+1]=xe&255,ke+2},T.prototype.writeInt32LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,2147483647,-2147483648),this[ke]=xe&255,this[ke+1]=xe>>>8,this[ke+2]=xe>>>16,this[ke+3]=xe>>>24,ke+4},T.prototype.writeInt32BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,2147483647,-2147483648),xe<0&&(xe=4294967295+xe+1),this[ke]=xe>>>24,this[ke+1]=xe>>>16,this[ke+2]=xe>>>8,this[ke+3]=xe&255,ke+4},T.prototype.writeBigInt64LE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Jt(this,xe,ke,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,ke,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wr(Ie,xe,ke,vt,ir,ar){if(ke+vt>Ie.length)throw new RangeError("Index out of range");if(ke<0)throw new RangeError("Index out of range")}function cr(Ie,xe,ke,vt,ir){return xe=+xe,ke=ke>>>0,ir||wr(Ie,xe,ke,4,34028234663852886e22,-34028234663852886e22),x.write(Ie,xe,ke,vt,23,4),ke+4}T.prototype.writeFloatLE=function(xe,ke,vt){return cr(this,xe,ke,!0,vt)},T.prototype.writeFloatBE=function(xe,ke,vt){return cr(this,xe,ke,!1,vt)};function $e(Ie,xe,ke,vt,ir){return xe=+xe,ke=ke>>>0,ir||wr(Ie,xe,ke,8,17976931348623157e292,-17976931348623157e292),x.write(Ie,xe,ke,vt,52,8),ke+8}T.prototype.writeDoubleLE=function(xe,ke,vt){return $e(this,xe,ke,!0,vt)},T.prototype.writeDoubleBE=function(xe,ke,vt){return $e(this,xe,ke,!1,vt)},T.prototype.copy=function(xe,ke,vt,ir){if(!T.isBuffer(xe))throw new TypeError("argument should be a Buffer");if(vt||(vt=0),!ir&&ir!==0&&(ir=this.length),ke>=xe.length&&(ke=xe.length),ke||(ke=0),ir>0&&ir=this.length)throw new RangeError("Index out of range");if(ir<0)throw new RangeError("sourceEnd out of bounds");ir>this.length&&(ir=this.length),xe.length-ke>>0,vt=vt===void 0?this.length:vt>>>0,xe||(xe=0);var vr;if(typeof xe=="number")for(vr=ke;vrMath.pow(2,32)?ir=Vt(String(ke)):typeof ke=="bigint"&&(ir=String(ke),(ke>Math.pow(BigInt(2),BigInt(32))||ke<-Math.pow(BigInt(2),BigInt(32)))&&(ir=Vt(ir)),ir+="n"),vt+=" It must be ".concat(xe,". Received ").concat(ir),vt},RangeError);function Vt(Ie){for(var xe="",ke=Ie.length,vt=Ie[0]==="-"?1:0;ke>=vt+4;ke-=3)xe="_".concat(Ie.slice(ke-3,ke)).concat(xe);return"".concat(Ie.slice(0,ke)).concat(xe)}function _t(Ie,xe,ke){mt(xe,"offset"),(Ie[xe]===void 0||Ie[xe+ke]===void 0)&&er(xe,Ie.length-(ke+1))}function It(Ie,xe,ke,vt,ir,ar){if(Ie>ke||Ie3?xe===0||xe===BigInt(0)?ii=">= 0".concat(vr," and < 2").concat(vr," ** ").concat((ar+1)*8).concat(vr):ii=">= -(2".concat(vr," ** ").concat((ar+1)*8-1).concat(vr,") and < 2 ** ")+"".concat((ar+1)*8-1).concat(vr):ii=">= ".concat(xe).concat(vr," and <= ").concat(ke).concat(vr),new St.ERR_OUT_OF_RANGE("value",ii,Ie)}_t(vt,ir,ar)}function mt(Ie,xe){if(typeof Ie!="number")throw new St.ERR_INVALID_ARG_TYPE(xe,"number",Ie)}function er(Ie,xe,ke){throw Math.floor(Ie)!==Ie?(mt(Ie,ke),new St.ERR_OUT_OF_RANGE(ke||"offset","an integer",Ie)):xe<0?new St.ERR_BUFFER_OUT_OF_BOUNDS:new St.ERR_OUT_OF_RANGE(ke||"offset",">= ".concat(ke?1:0," and <= ").concat(xe),Ie)}var lr=/[^+/0-9A-Za-z-_]/g;function Tr(Ie){if(Ie=Ie.split("=")[0],Ie=Ie.trim().replace(lr,""),Ie.length<2)return"";for(;Ie.length%4!==0;)Ie=Ie+"=";return Ie}function Lr(Ie,xe){xe=xe||1/0;for(var ke,vt=Ie.length,ir=null,ar=[],vr=0;vr55295&&ke<57344){if(!ir){if(ke>56319){(xe-=3)>-1&&ar.push(239,191,189);continue}else if(vr+1===vt){(xe-=3)>-1&&ar.push(239,191,189);continue}ir=ke;continue}if(ke<56320){(xe-=3)>-1&&ar.push(239,191,189),ir=ke;continue}ke=(ir-55296<<10|ke-56320)+65536}else ir&&(xe-=3)>-1&&ar.push(239,191,189);if(ir=null,ke<128){if((xe-=1)<0)break;ar.push(ke)}else if(ke<2048){if((xe-=2)<0)break;ar.push(ke>>6|192,ke&63|128)}else if(ke<65536){if((xe-=3)<0)break;ar.push(ke>>12|224,ke>>6&63|128,ke&63|128)}else if(ke<1114112){if((xe-=4)<0)break;ar.push(ke>>18|240,ke>>12&63|128,ke>>6&63|128,ke&63|128)}else throw new Error("Invalid code point")}return ar}function ti(Ie){for(var xe=[],ke=0;ke>8,ir=ke%256,ar.push(ir),ar.push(vt);return ar}function Vr(Ie){return L.toByteArray(Tr(Ie))}function dt(Ie,xe,ke,vt){var ir;for(ir=0;ir=xe.length||ir>=Ie.length);++ir)xe[ir+ke]=Ie[ir];return ir}function Ge(Ie,xe){return Ie instanceof xe||Ie!=null&&Ie.constructor!=null&&Ie.constructor.name!=null&&Ie.constructor.name===xe.name}function Je(Ie){return Ie!==Ie}var je=function(){for(var Ie="0123456789abcdef",xe=new Array(256),ke=0;ke<16;++ke)for(var vt=ke*16,ir=0;ir<16;++ir)xe[vt+ir]=Ie[ke]+Ie[ir];return xe}();function tt(Ie){return typeof BigInt=="undefined"?xt:Ie}function xt(){throw new Error("BigInt not supported")}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},4935:function(i,a,o){"use strict";i.exports=k;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function v(E,S,L,x){this.gl=E,this.shader=S,this.buffer=L,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var _=v.prototype,b=[0,0];_.bind=function(E,S,L,x){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=E,C.view=S,C.projection=L,C.pixelScale=x,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},_.unbind=function(){this.vao.unbind()},_.update=function(E,S,L,x,C){var M=[];function g(H,te,oe,_e,Ee,Ce){var me=[oe.style,oe.weight,oe.variant,oe.family].join("_"),ie=h[me];ie||(ie=h[me]={});var Se=ie[te];Se||(Se=ie[te]=p(te,{triangles:!0,font:oe.family,fontStyle:oe.style,fontWeight:oe.weight,fontVariant:oe.variant,textAlign:"center",textBaseline:"middle",lineSpacing:Ee,styletags:Ce}));for(var Le=(_e||12)/12,Ae=Se.positions,Fe=Se.cells,Pe=0,ge=Fe.length;Pe=0;--ce){var Ze=Ae[Re[ce]];M.push(Le*Ze[0],-Le*Ze[1],H)}}for(var P=[0,0,0],T=[0,0,0],z=[0,0,0],O=[0,0,0],V=1.25,G={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Z=0;Z<3;++Z){z[Z]=M.length/d|0,g(.5*(E[0][Z]+E[1][Z]),S[Z],L[Z],12,V,G),O[Z]=(M.length/d|0)-z[Z],P[Z]=M.length/d|0;for(var j=0;j0||S.length>0;){for(;E.length>0;){var g=E.pop();if(L[g]!==-k){L[g]=k;for(var P=x[g],T=0;T<3;++T){var z=M[3*g+T];z>=0&&L[z]===0&&(C[3*g+T]?S.push(z):(E.push(z),L[z]=k))}}}var O=S;S=E,E=O,S.length=0,k=-k}var V=h(x,L,_);return b?V.concat(p.boundary):V}},5033:function(i){"use strict";i.exports=a;function a(o,s,l){var u=s||0,c=l||1;return[[o[12]+o[0],o[13]+o[1],o[14]+o[2],o[15]+o[3]],[o[12]-o[0],o[13]-o[1],o[14]-o[2],o[15]-o[3]],[o[12]+o[4],o[13]+o[5],o[14]+o[6],o[15]+o[7]],[o[12]-o[4],o[13]-o[5],o[14]-o[6],o[15]-o[7]],[u*o[12]+o[8],u*o[13]+o[9],u*o[14]+o[10],u*o[15]+o[11]],[c*o[12]-o[8],c*o[13]-o[9],c*o[14]-o[10],c*o[15]-o[11]]]}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(E){return function(S,L){var x=E[S];return x?!!x.queryPoint(L,f):!1}}function d(E){for(var S={},L=0;L0&&S[x]===L[0])C=E[x-1];else return 1;for(var M=1;C;){var g=C.key,P=s(L,g[0],g[1]);if(g[0][0]0)M=-1,C=C.right;else return 0;else if(P>0)C=C.left;else if(P<0)M=1,C=C.right;else return 0}return M}}function _(E){return 1}function b(E){return function(L){return E(L[0],L[1])?0:1}}function p(E,S){return function(x){return E(x[0],x[1])?0:S(x)}}function k(E){for(var S=E.length,L=[],x=[],C=0,M=0;M0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},5202:function(i,a,o){"use strict";var s=o(1944),l=o(8210);i.exports=f,i.exports.positive=h,i.exports.negative=d;function u(v,_){var b=l(s(v,_),[_[_.length-1]]);return b[b.length-1]}function c(v,_,b,p){var k=p-_,E=-_/k;E<0?E=0:E>1&&(E=1);for(var S=1-E,L=v.length,x=new Array(L),C=0;C0||k>0&&x<0){var C=c(E,x,S,k);b.push(C),p.push(C.slice())}x<0?p.push(S.slice()):x>0?b.push(S.slice()):(b.push(S.slice()),p.push(S.slice())),k=x}return{positive:b,negative:p}}function h(v,_){for(var b=[],p=u(v[v.length-1],_),k=v[v.length-1],E=v[0],S=0;S0||p>0&&L<0)&&b.push(c(k,L,E,p)),L>=0&&b.push(E.slice()),p=L}return b}function d(v,_){for(var b=[],p=u(v[v.length-1],_),k=v[v.length-1],E=v[0],S=0;S0||p>0&&L<0)&&b.push(c(k,L,E,p)),L<=0&&b.push(E.slice()),p=L}return b}},5219:function(i){"use strict";i.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}},5250:function(i){"use strict";i.exports=o;var a=+(Math.pow(2,27)+1);function o(s,l,u){var c=s*l,f=a*s,h=f-s,d=f-h,v=s-d,_=a*l,b=_-l,p=_-b,k=l-p,E=c-d*p,S=E-v*p,L=S-d*k,x=v*k-L;return u?(u[0]=x,u[1]=c,u):[x,c]}},5298:function(i,a){"use strict";var o={"float64,2,1,0":function(){return function(v,_,b,p,k){var E=v[0],S=v[1],L=v[2],x=b[0],C=b[1],M=b[2];p|=0;var g=0,P=0,T=0,z=M,O=C-L*M,V=x-S*C;for(T=0;T0;){j<64?(x=j,j=0):(x=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),p=G+j*g+N*P,S=Z+j*z+N*O;var H=0,te=0,oe=0,_e=T,Ee=g-M*T,Ce=P-x*g,me=V,ie=z-M*V,Se=O-x*z;for(oe=0;oe0;){O<64?(x=O,O=0):(x=64,O-=64);for(var V=v[0]|0;V>0;){V<64?(L=V,V=0):(L=64,V-=64),p=T+O*M+V*C,S=z+O*P+V*g;var G=0,Z=0,j=M,N=C-x*M,H=P,te=g-x*P;for(Z=0;Z0;){Z<64?(C=Z,Z=0):(C=64,Z-=64);for(var j=v[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(x=N,N=0):(x=64,N-=64),p=V+Z*P+j*M+N*g,S=G+Z*O+j*T+N*z;var H=0,te=0,oe=0,_e=P,Ee=M-C*P,Ce=g-L*M,me=O,ie=T-C*O,Se=z-L*T;for(oe=0;oe=0}}(),u.removeTriangle=function(h,d,v){var _=this.stars;c(_[h],d,v),c(_[d],v,h),c(_[v],h,d)},u.addTriangle=function(h,d,v){var _=this.stars;_[h].push(d,v),_[d].push(v,h),_[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],_=1,b=v.length;_0;){var p=v.pop();h[p]=!1;for(var k=f[p],_=0;_0){for(var me=0;me<24;++me)O.push(O[O.length-12]);j+=2,_e=!0}continue e}N[0][T]=Math.min(N[0][T],Ee[T],Ce[T]),N[1][T]=Math.max(N[1][T],Ee[T],Ce[T])}var ie,Se;Array.isArray(te[0])?(ie=te.length>P-1?te[P-1]:te.length>0?te[te.length-1]:[0,0,0,1],Se=te.length>P?te[P]:te.length>0?te[te.length-1]:[0,0,0,1]):ie=Se=te,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Se.length===3&&(Se=[Se[0],Se[1],Se[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Le;Array.isArray(oe)?Le=oe.length>P-1?oe[P-1]:oe.length>0?oe[oe.length-1]:[0,0,0,1]:Le=oe;var Ae=Z;if(Z+=E(Ee,Ce),_e){for(T=0;T<2;++T)O.push(Ee[0],Ee[1],Ee[2],Ce[0],Ce[1],Ce[2],Ae,Le,ie[0],ie[1],ie[2],ie[3]);j+=2,_e=!1}O.push(Ee[0],Ee[1],Ee[2],Ce[0],Ce[1],Ce[2],Ae,Le,ie[0],ie[1],ie[2],ie[3],Ee[0],Ee[1],Ee[2],Ce[0],Ce[1],Ce[2],Ae,-Le,ie[0],ie[1],ie[2],ie[3],Ce[0],Ce[1],Ce[2],Ee[0],Ee[1],Ee[2],Z,-Le,Se[0],Se[1],Se[2],Se[3],Ce[0],Ce[1],Ce[2],Ee[0],Ee[1],Ee[2],Z,Le,Se[0],Se[1],Se[2],Se[3]),j+=4}}if(this.buffer.update(O),V.push(Z),G.push(H[H.length-1].slice()),this.bounds=N,this.vertexCount=j,this.points=G,this.arcLength=V,"dashes"in g){var Fe=g.dashes,Pe=Fe.slice();for(Pe.unshift(0),P=1;Po[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},5771:function(i,a,o){"use strict";var s=o(8507),l=o(3788),u=o(2419);i.exports=c;function c(f){f.sort(l);for(var h=f.length,d=0,v=0;v0){var p=f[d-1];if(s(_,p)===0&&u(p)!==b){d-=1;continue}}f[d++]=_}}return f.length=d,f}},5838:function(i,a,o){"use strict";i.exports=l;var s=o(7842);function l(u){for(var c=new Array(u.length),f=0;f0)continue;Vt=$e.slice(0,1).join("")}return Re(Vt),Ce+=Vt.length,N=N.slice(Vt.length),N.length}while(!0)}function Jt(){return/[^a-fA-F0-9]/.test(Z)?(Re(N.join("")),G=h,O):(N.push(Z),j=Z,O+1)}function sr(){return Z==="."||/[eE]/.test(Z)?(N.push(Z),G=E,j=Z,O+1):Z==="x"&&N.length===1&&N[0]==="0"?(G=g,N.push(Z),j=Z,O+1):/[^\d]/.test(Z)?(Re(N.join("")),G=h,O):(N.push(Z),j=Z,O+1)}function wr(){return Z==="f"&&(N.push(Z),j=Z,O+=1),/[eE]/.test(Z)||(Z==="-"||Z==="+")&&/[eE]/.test(j)?(N.push(Z),j=Z,O+1):/[^\d]/.test(Z)?(Re(N.join("")),G=h,O):(N.push(Z),j=Z,O+1)}function cr(){if(/[^\d\w_]/.test(Z)){var $e=N.join("");return ge[$e]?G=x:Pe[$e]?G=L:G=S,Re(N.join("")),G=h,O}return N.push(Z),j=Z,O+1}}},5878:function(i,a,o){"use strict";i.exports=c;var s=o(3250),l=o(2014);function u(f,h,d){var v=Math.abs(s(f,h,d)),_=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2));return v/_}function c(f,h,d){for(var v=h.length,_=f.length,b=new Array(v),p=new Array(v),k=new Array(v),E=new Array(v),S=0;S>1:(ie>>1)-1}function z(ie){for(var Se=P(ie);;){var Le=Se,Ae=2*ie+1,Fe=2*(ie+1),Pe=ie;if(Ae0;){var Le=T(ie);if(Le>=0){var Ae=P(Le);if(Se0){var ie=j[0];return g(0,te-1),te-=1,z(0),ie}return-1}function G(ie,Se){var Le=j[ie];return k[Le]===Se?ie:(k[Le]=-1/0,O(ie),V(),k[Le]=Se,te+=1,O(te-1))}function Z(ie){if(!E[ie]){E[ie]=!0;var Se=b[ie],Le=p[ie];b[Le]>=0&&(b[Le]=Se),p[Se]>=0&&(p[Se]=Le),N[Se]>=0&&G(N[Se],M(Se)),N[Le]>=0&&G(N[Le],M(Le))}}for(var j=[],N=new Array(v),S=0;S>1;S>=0;--S)z(S);for(;;){var oe=V();if(oe<0||k[oe]>d)break;Z(oe)}for(var _e=[],S=0;S=0&&Le>=0&&Se!==Le){var Ae=N[Se],Fe=N[Le];Ae!==Fe&&me.push([Ae,Fe])}}),l.unique(l.normalize(me)),{positions:_e,edges:me}}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},5995:function(i,a,o){"use strict";i.exports=u;var s=o(7642),l=o(6037);function u(c,f){return s(f).filter(function(h){for(var d=new Array(h.length),v=0;v2&&T[1]>2&&M(P.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),g.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),g.pick(-1,-1,1).lo(1,1).hi(T[0]-2,T[1]-2)),T[1]>2&&(C(P.pick(0,-1).lo(1).hi(T[1]-2),g.pick(0,-1,1).lo(1).hi(T[1]-2)),x(g.pick(0,-1,0).lo(1).hi(T[1]-2))),T[1]>2&&(C(P.pick(T[0]-1,-1).lo(1).hi(T[1]-2),g.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),x(g.pick(T[0]-1,-1,0).lo(1).hi(T[1]-2))),T[0]>2&&(C(P.pick(-1,0).lo(1).hi(T[0]-2),g.pick(-1,0,0).lo(1).hi(T[0]-2)),x(g.pick(-1,0,1).lo(1).hi(T[0]-2))),T[0]>2&&(C(P.pick(-1,T[1]-1).lo(1).hi(T[0]-2),g.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),x(g.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(T[0]-1,0,0,0),g.set(T[0]-1,0,1,0),g.set(0,T[1]-1,0,0),g.set(0,T[1]-1,1,0),g.set(T[0]-1,T[1]-1,0,0),g.set(T[0]-1,T[1]-1,1,0),g}}function S(L){var x=L.join(),T=v[x];if(T)return T;for(var C=L.length,M=[b,p],g=1;g<=C;++g)M.push(k(g));var P=E,T=P.apply(void 0,M);return v[x]=T,T}i.exports=function(x,C,M){if(Array.isArray(M)||(typeof M=="string"?M=s(C.dimension,M):M=s(C.dimension,"clamp")),C.size===0)return x;if(C.dimension===0)return x.set(0),x;var g=S(M);return g(x,C)}},6204:function(i){"use strict";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;sv&&(v=s.length(O)),T&&!P){var V=2*s.distance(L,z)/(s.length(x)+s.length(O));V?(M=Math.min(M,V),g=!1):g=!0}g||(L=z,x=O),C.push(O)}var G=[_,p,E],Z=[b,k,S];c&&(c[0]=G,c[1]=Z),v===0&&(v=1);var j=1/v;isFinite(M)||(M=1),d.vectorScale=M;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*j),d.coneScale=N;for(var T=0,H=0;T_e&&(Z|=1<_e){Z|=1<d[O][1])&&(Fe=O);for(var Pe=-1,O=0;O<3;++O){var ge=Fe^1<d[Re][0]&&(Re=ge)}}var ce=E;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Pe^Fe)]=Fe&Pe,ce[s.log2(Fe^Re)]=Feℜvar Ze=Re^7;Ze===Z||Ze===Ae?(Ze=Pe^7,ce[s.log2(Re^Ze)]=Ze&Re):ce[s.log2(Pe^Ze)]=Ze&Pe;for(var ut=S,pt=Z,H=0;H<3;++H)pt&1<=0&&(d=f.length-h-1);var v=Math.pow(10,d),_=Math.round(u*c*v),b=_+"";if(b.indexOf("e")>=0)return b;var p=_/v,k=_%v;_<0?(p=-Math.ceil(p)|0,k=-k|0):(p=Math.floor(p)|0,k=k|0);var E=""+p;if(_<0&&(E="-"+E),d){for(var S=""+k;S.length=u[0][h];--_)d.push({x:_*c[h],text:o(c[h],_)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;hL+1)throw new Error(E+" map requires nshades to be at least size "+k.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha=="number"?x=[d.alpha,d.alpha]:x=[1,1],v=k.map(function(z){return Math.round(z.index*L)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var M=k.map(function(z,O){var V=k[O].index,G=k[O].rgb.slice();return G.length===4&&G[3]>=0&&G[3]<=1||(G[3]=x[0]+(x[1]-x[0])*V),G}),g=[];for(C=0;C 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"}]}},6743:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=u+u,v=c+c,_=f+f,b=u*d,p=u*v,k=u*_,E=c*v,S=c*_,L=f*_,x=h*d,C=h*v,M=h*_;return o[0]=1-(E+L),o[1]=p+M,o[2]=k-C,o[3]=0,o[4]=p-M,o[5]=1-(b+L),o[6]=S+x,o[7]=0,o[8]=k+C,o[9]=S-x,o[10]=1-(b+E),o[11]=0,o[12]=l[0],o[13]=l[1],o[14]=l[2],o[15]=1,o}},6760:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=s[4],v=s[5],_=s[6],b=s[7],p=s[8],k=s[9],E=s[10],S=s[11],L=s[12],x=s[13],C=s[14],M=s[15],g=l[0],P=l[1],T=l[2],z=l[3];return o[0]=g*u+P*d+T*p+z*L,o[1]=g*c+P*v+T*k+z*x,o[2]=g*f+P*_+T*E+z*C,o[3]=g*h+P*b+T*S+z*M,g=l[4],P=l[5],T=l[6],z=l[7],o[4]=g*u+P*d+T*p+z*L,o[5]=g*c+P*v+T*k+z*x,o[6]=g*f+P*_+T*E+z*C,o[7]=g*h+P*b+T*S+z*M,g=l[8],P=l[9],T=l[10],z=l[11],o[8]=g*u+P*d+T*p+z*L,o[9]=g*c+P*v+T*k+z*x,o[10]=g*f+P*_+T*E+z*C,o[11]=g*h+P*b+T*S+z*M,g=l[12],P=l[13],T=l[14],z=l[15],o[12]=g*u+P*d+T*p+z*L,o[13]=g*c+P*v+T*k+z*x,o[14]=g*f+P*_+T*E+z*C,o[15]=g*h+P*b+T*S+z*M,o}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6803:function(i,a,o){"use strict";var s,l=o(8828),u=o(1755);function c(P){for(var T=0,z=Math.max,O=0,V=P.length;O>1,Z=d(P[G],T);Z<=0?(Z===0&&(V=G),z=G+1):Z>0&&(O=G-1)}return V}s=p;function k(P,T){for(var z=new Array(P.length),O=0,V=z.length;O=P.length||d(P[Ee],G)!==0););}return z}s=k;function E(P,T){if(!T)return k(b(L(P,0)),P,0);for(var z=new Array(T),O=0;O>>H&1&&N.push(V[H]);T.push(N)}return _(T)}s=S;function L(P,T){if(T<0)return[];for(var z=[],O=(1<0?N:H},f.min=function(N,H){return N.cmp(H)<0?N:H},f.prototype._init=function(N,H,te){if(typeof N=="number")return this._initNumber(N,H,te);if(typeof N=="object")return this._initArray(N,H,te);H==="hex"&&(H=16),u(H===(H|0)&&H>=2&&H<=36),N=N.toString().replace(/\s+/g,"");var oe=0;N[0]==="-"&&(oe++,this.negative=1),oe=0;oe-=3)Ee=N[oe]|N[oe-1]<<8|N[oe-2]<<16,this.words[_e]|=Ee<>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);else if(te==="le")for(oe=0,_e=0;oe>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);return this.strip()};function d(j,N){var H=j.charCodeAt(N);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function v(j,N,H){var te=d(j,H);return H-1>=N&&(te|=d(j,H-1)<<4),te}f.prototype._parseHex=function(N,H,te){this.length=Math.ceil((N.length-H)/6),this.words=new Array(this.length);for(var oe=0;oe=H;oe-=2)Ce=v(N,H,oe)<<_e,this.words[Ee]|=Ce&67108863,_e>=18?(_e-=18,Ee+=1,this.words[Ee]|=Ce>>>26):_e+=8;else{var me=N.length-H;for(oe=me%2===0?H+1:H;oe=18?(_e-=18,Ee+=1,this.words[Ee]|=Ce>>>26):_e+=8}this.strip()};function _(j,N,H,te){for(var oe=0,_e=Math.min(j.length,H),Ee=N;Ee<_e;Ee++){var Ce=j.charCodeAt(Ee)-48;oe*=te,Ce>=49?oe+=Ce-49+10:Ce>=17?oe+=Ce-17+10:oe+=Ce}return oe}f.prototype._parseBase=function(N,H,te){this.words=[0],this.length=1;for(var oe=0,_e=1;_e<=67108863;_e*=H)oe++;oe--,_e=_e/H|0;for(var Ee=N.length-te,Ce=Ee%oe,me=Math.min(Ee,Ee-Ce)+te,ie=0,Se=te;Se1&&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 b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(N,H){N=N||10,H=H|0||1;var te;if(N===16||N==="hex"){te="";for(var oe=0,_e=0,Ee=0;Ee>>24-oe&16777215,_e!==0||Ee!==this.length-1?te=b[6-me.length]+me+te:te=me+te,oe+=2,oe>=26&&(oe-=26,Ee--)}for(_e!==0&&(te=_e.toString(16)+te);te.length%H!==0;)te="0"+te;return this.negative!==0&&(te="-"+te),te}if(N===(N|0)&&N>=2&&N<=36){var ie=p[N],Se=k[N];te="";var Le=this.clone();for(Le.negative=0;!Le.isZero();){var Ae=Le.modn(Se).toString(N);Le=Le.idivn(Se),Le.isZero()?te=Ae+te:te=b[ie-Ae.length]+Ae+te}for(this.isZero()&&(te="0"+te);te.length%H!==0;)te="0"+te;return this.negative!==0&&(te="-"+te),te}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,H){return u(typeof h!="undefined"),this.toArrayLike(h,N,H)},f.prototype.toArray=function(N,H){return this.toArrayLike(Array,N,H)},f.prototype.toArrayLike=function(N,H,te){var oe=this.byteLength(),_e=te||Math.max(1,oe);u(oe<=_e,"byte array longer than desired length"),u(_e>0,"Requested array length <= 0"),this.strip();var Ee=H==="le",Ce=new N(_e),me,ie,Se=this.clone();if(Ee){for(ie=0;!Se.isZero();ie++)me=Se.andln(255),Se.iushrn(8),Ce[ie]=me;for(;ie<_e;ie++)Ce[ie]=0}else{for(ie=0;ie<_e-oe;ie++)Ce[ie]=0;for(ie=0;!Se.isZero();ie++)me=Se.andln(255),Se.iushrn(8),Ce[_e-ie-1]=me}return Ce},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var H=N,te=0;return H>=4096&&(te+=13,H>>>=13),H>=64&&(te+=7,H>>>=7),H>=8&&(te+=4,H>>>=4),H>=2&&(te+=2,H>>>=2),te+H},f.prototype._zeroBits=function(N){if(N===0)return 26;var H=N,te=0;return(H&8191)===0&&(te+=13,H>>>=13),(H&127)===0&&(te+=7,H>>>=7),(H&15)===0&&(te+=4,H>>>=4),(H&3)===0&&(te+=2,H>>>=2),(H&1)===0&&te++,te},f.prototype.bitLength=function(){var N=this.words[this.length-1],H=this._countBits(N);return(this.length-1)*26+H};function E(j){for(var N=new Array(j.bitLength()),H=0;H>>oe}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,H=0;HN.length?this.clone().ior(N):N.clone().ior(this)},f.prototype.uor=function(N){return this.length>N.length?this.clone().iuor(N):N.clone().iuor(this)},f.prototype.iuand=function(N){var H;this.length>N.length?H=N:H=this;for(var te=0;teN.length?this.clone().iand(N):N.clone().iand(this)},f.prototype.uand=function(N){return this.length>N.length?this.clone().iuand(N):N.clone().iuand(this)},f.prototype.iuxor=function(N){var H,te;this.length>N.length?(H=this,te=N):(H=N,te=this);for(var oe=0;oeN.length?this.clone().ixor(N):N.clone().ixor(this)},f.prototype.uxor=function(N){return this.length>N.length?this.clone().iuxor(N):N.clone().iuxor(this)},f.prototype.inotn=function(N){u(typeof N=="number"&&N>=0);var H=Math.ceil(N/26)|0,te=N%26;this._expand(H),te>0&&H--;for(var oe=0;oe0&&(this.words[oe]=~this.words[oe]&67108863>>26-te),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,H){u(typeof N=="number"&&N>=0);var te=N/26|0,oe=N%26;return this._expand(te+1),H?this.words[te]=this.words[te]|1<N.length?(te=this,oe=N):(te=N,oe=this);for(var _e=0,Ee=0;Ee>>26;for(;_e!==0&&Ee>>26;if(this.length=te.length,_e!==0)this.words[this.length]=_e,this.length++;else if(te!==this)for(;EeN.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var H=this.iadd(N);return N.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var te=this.cmp(N);if(te===0)return this.negative=0,this.length=1,this.words[0]=0,this;var oe,_e;te>0?(oe=this,_e=N):(oe=N,_e=this);for(var Ee=0,Ce=0;Ce<_e.length;Ce++)H=(oe.words[Ce]|0)-(_e.words[Ce]|0)+Ee,Ee=H>>26,this.words[Ce]=H&67108863;for(;Ee!==0&&Ce>26,this.words[Ce]=H&67108863;if(Ee===0&&Ce>>26,Le=me&67108863,Ae=Math.min(ie,N.length-1),Fe=Math.max(0,ie-j.length+1);Fe<=Ae;Fe++){var Pe=ie-Fe|0;oe=j.words[Pe]|0,_e=N.words[Fe]|0,Ee=oe*_e+Le,Se+=Ee/67108864|0,Le=Ee&67108863}H.words[ie]=Le|0,me=Se|0}return me!==0?H.words[ie]=me|0:H.length--,H.strip()}var L=function(N,H,te){var oe=N.words,_e=H.words,Ee=te.words,Ce=0,me,ie,Se,Le=oe[0]|0,Ae=Le&8191,Fe=Le>>>13,Pe=oe[1]|0,ge=Pe&8191,Re=Pe>>>13,ce=oe[2]|0,Ze=ce&8191,ut=ce>>>13,pt=oe[3]|0,Zt=pt&8191,st=pt>>>13,lt=oe[4]|0,Gt=lt&8191,Nt=lt>>>13,Jt=oe[5]|0,sr=Jt&8191,wr=Jt>>>13,cr=oe[6]|0,$e=cr&8191,St=cr>>>13,Qt=oe[7]|0,Vt=Qt&8191,_t=Qt>>>13,It=oe[8]|0,mt=It&8191,er=It>>>13,lr=oe[9]|0,Tr=lr&8191,Lr=lr>>>13,ti=_e[0]|0,Br=ti&8191,Vr=ti>>>13,dt=_e[1]|0,Ge=dt&8191,Je=dt>>>13,je=_e[2]|0,tt=je&8191,xt=je>>>13,Ie=_e[3]|0,xe=Ie&8191,ke=Ie>>>13,vt=_e[4]|0,ir=vt&8191,ar=vt>>>13,vr=_e[5]|0,ii=vr&8191,pi=vr>>>13,$r=_e[6]|0,di=$r&8191,ji=$r>>>13,In=_e[7]|0,wi=In&8191,On=In>>>13,qn=_e[8]|0,Fn=qn&8191,ra=qn>>>13,la=_e[9]|0,Ut=la&8191,wt=la>>>13;te.negative=N.negative^H.negative,te.length=19,me=Math.imul(Ae,Br),ie=Math.imul(Ae,Vr),ie=ie+Math.imul(Fe,Br)|0,Se=Math.imul(Fe,Vr);var rr=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(rr>>>26)|0,rr&=67108863,me=Math.imul(ge,Br),ie=Math.imul(ge,Vr),ie=ie+Math.imul(Re,Br)|0,Se=Math.imul(Re,Vr),me=me+Math.imul(Ae,Ge)|0,ie=ie+Math.imul(Ae,Je)|0,ie=ie+Math.imul(Fe,Ge)|0,Se=Se+Math.imul(Fe,Je)|0;var nr=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(nr>>>26)|0,nr&=67108863,me=Math.imul(Ze,Br),ie=Math.imul(Ze,Vr),ie=ie+Math.imul(ut,Br)|0,Se=Math.imul(ut,Vr),me=me+Math.imul(ge,Ge)|0,ie=ie+Math.imul(ge,Je)|0,ie=ie+Math.imul(Re,Ge)|0,Se=Se+Math.imul(Re,Je)|0,me=me+Math.imul(Ae,tt)|0,ie=ie+Math.imul(Ae,xt)|0,ie=ie+Math.imul(Fe,tt)|0,Se=Se+Math.imul(Fe,xt)|0;var Er=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Er>>>26)|0,Er&=67108863,me=Math.imul(Zt,Br),ie=Math.imul(Zt,Vr),ie=ie+Math.imul(st,Br)|0,Se=Math.imul(st,Vr),me=me+Math.imul(Ze,Ge)|0,ie=ie+Math.imul(Ze,Je)|0,ie=ie+Math.imul(ut,Ge)|0,Se=Se+Math.imul(ut,Je)|0,me=me+Math.imul(ge,tt)|0,ie=ie+Math.imul(ge,xt)|0,ie=ie+Math.imul(Re,tt)|0,Se=Se+Math.imul(Re,xt)|0,me=me+Math.imul(Ae,xe)|0,ie=ie+Math.imul(Ae,ke)|0,ie=ie+Math.imul(Fe,xe)|0,Se=Se+Math.imul(Fe,ke)|0;var Xr=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,me=Math.imul(Gt,Br),ie=Math.imul(Gt,Vr),ie=ie+Math.imul(Nt,Br)|0,Se=Math.imul(Nt,Vr),me=me+Math.imul(Zt,Ge)|0,ie=ie+Math.imul(Zt,Je)|0,ie=ie+Math.imul(st,Ge)|0,Se=Se+Math.imul(st,Je)|0,me=me+Math.imul(Ze,tt)|0,ie=ie+Math.imul(Ze,xt)|0,ie=ie+Math.imul(ut,tt)|0,Se=Se+Math.imul(ut,xt)|0,me=me+Math.imul(ge,xe)|0,ie=ie+Math.imul(ge,ke)|0,ie=ie+Math.imul(Re,xe)|0,Se=Se+Math.imul(Re,ke)|0,me=me+Math.imul(Ae,ir)|0,ie=ie+Math.imul(Ae,ar)|0,ie=ie+Math.imul(Fe,ir)|0,Se=Se+Math.imul(Fe,ar)|0;var ri=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ri>>>26)|0,ri&=67108863,me=Math.imul(sr,Br),ie=Math.imul(sr,Vr),ie=ie+Math.imul(wr,Br)|0,Se=Math.imul(wr,Vr),me=me+Math.imul(Gt,Ge)|0,ie=ie+Math.imul(Gt,Je)|0,ie=ie+Math.imul(Nt,Ge)|0,Se=Se+Math.imul(Nt,Je)|0,me=me+Math.imul(Zt,tt)|0,ie=ie+Math.imul(Zt,xt)|0,ie=ie+Math.imul(st,tt)|0,Se=Se+Math.imul(st,xt)|0,me=me+Math.imul(Ze,xe)|0,ie=ie+Math.imul(Ze,ke)|0,ie=ie+Math.imul(ut,xe)|0,Se=Se+Math.imul(ut,ke)|0,me=me+Math.imul(ge,ir)|0,ie=ie+Math.imul(ge,ar)|0,ie=ie+Math.imul(Re,ir)|0,Se=Se+Math.imul(Re,ar)|0,me=me+Math.imul(Ae,ii)|0,ie=ie+Math.imul(Ae,pi)|0,ie=ie+Math.imul(Fe,ii)|0,Se=Se+Math.imul(Fe,pi)|0;var Qr=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,me=Math.imul($e,Br),ie=Math.imul($e,Vr),ie=ie+Math.imul(St,Br)|0,Se=Math.imul(St,Vr),me=me+Math.imul(sr,Ge)|0,ie=ie+Math.imul(sr,Je)|0,ie=ie+Math.imul(wr,Ge)|0,Se=Se+Math.imul(wr,Je)|0,me=me+Math.imul(Gt,tt)|0,ie=ie+Math.imul(Gt,xt)|0,ie=ie+Math.imul(Nt,tt)|0,Se=Se+Math.imul(Nt,xt)|0,me=me+Math.imul(Zt,xe)|0,ie=ie+Math.imul(Zt,ke)|0,ie=ie+Math.imul(st,xe)|0,Se=Se+Math.imul(st,ke)|0,me=me+Math.imul(Ze,ir)|0,ie=ie+Math.imul(Ze,ar)|0,ie=ie+Math.imul(ut,ir)|0,Se=Se+Math.imul(ut,ar)|0,me=me+Math.imul(ge,ii)|0,ie=ie+Math.imul(ge,pi)|0,ie=ie+Math.imul(Re,ii)|0,Se=Se+Math.imul(Re,pi)|0,me=me+Math.imul(Ae,di)|0,ie=ie+Math.imul(Ae,ji)|0,ie=ie+Math.imul(Fe,di)|0,Se=Se+Math.imul(Fe,ji)|0;var Oi=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,me=Math.imul(Vt,Br),ie=Math.imul(Vt,Vr),ie=ie+Math.imul(_t,Br)|0,Se=Math.imul(_t,Vr),me=me+Math.imul($e,Ge)|0,ie=ie+Math.imul($e,Je)|0,ie=ie+Math.imul(St,Ge)|0,Se=Se+Math.imul(St,Je)|0,me=me+Math.imul(sr,tt)|0,ie=ie+Math.imul(sr,xt)|0,ie=ie+Math.imul(wr,tt)|0,Se=Se+Math.imul(wr,xt)|0,me=me+Math.imul(Gt,xe)|0,ie=ie+Math.imul(Gt,ke)|0,ie=ie+Math.imul(Nt,xe)|0,Se=Se+Math.imul(Nt,ke)|0,me=me+Math.imul(Zt,ir)|0,ie=ie+Math.imul(Zt,ar)|0,ie=ie+Math.imul(st,ir)|0,Se=Se+Math.imul(st,ar)|0,me=me+Math.imul(Ze,ii)|0,ie=ie+Math.imul(Ze,pi)|0,ie=ie+Math.imul(ut,ii)|0,Se=Se+Math.imul(ut,pi)|0,me=me+Math.imul(ge,di)|0,ie=ie+Math.imul(ge,ji)|0,ie=ie+Math.imul(Re,di)|0,Se=Se+Math.imul(Re,ji)|0,me=me+Math.imul(Ae,wi)|0,ie=ie+Math.imul(Ae,On)|0,ie=ie+Math.imul(Fe,wi)|0,Se=Se+Math.imul(Fe,On)|0;var $i=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+($i>>>26)|0,$i&=67108863,me=Math.imul(mt,Br),ie=Math.imul(mt,Vr),ie=ie+Math.imul(er,Br)|0,Se=Math.imul(er,Vr),me=me+Math.imul(Vt,Ge)|0,ie=ie+Math.imul(Vt,Je)|0,ie=ie+Math.imul(_t,Ge)|0,Se=Se+Math.imul(_t,Je)|0,me=me+Math.imul($e,tt)|0,ie=ie+Math.imul($e,xt)|0,ie=ie+Math.imul(St,tt)|0,Se=Se+Math.imul(St,xt)|0,me=me+Math.imul(sr,xe)|0,ie=ie+Math.imul(sr,ke)|0,ie=ie+Math.imul(wr,xe)|0,Se=Se+Math.imul(wr,ke)|0,me=me+Math.imul(Gt,ir)|0,ie=ie+Math.imul(Gt,ar)|0,ie=ie+Math.imul(Nt,ir)|0,Se=Se+Math.imul(Nt,ar)|0,me=me+Math.imul(Zt,ii)|0,ie=ie+Math.imul(Zt,pi)|0,ie=ie+Math.imul(st,ii)|0,Se=Se+Math.imul(st,pi)|0,me=me+Math.imul(Ze,di)|0,ie=ie+Math.imul(Ze,ji)|0,ie=ie+Math.imul(ut,di)|0,Se=Se+Math.imul(ut,ji)|0,me=me+Math.imul(ge,wi)|0,ie=ie+Math.imul(ge,On)|0,ie=ie+Math.imul(Re,wi)|0,Se=Se+Math.imul(Re,On)|0,me=me+Math.imul(Ae,Fn)|0,ie=ie+Math.imul(Ae,ra)|0,ie=ie+Math.imul(Fe,Fn)|0,Se=Se+Math.imul(Fe,ra)|0;var tn=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(tn>>>26)|0,tn&=67108863,me=Math.imul(Tr,Br),ie=Math.imul(Tr,Vr),ie=ie+Math.imul(Lr,Br)|0,Se=Math.imul(Lr,Vr),me=me+Math.imul(mt,Ge)|0,ie=ie+Math.imul(mt,Je)|0,ie=ie+Math.imul(er,Ge)|0,Se=Se+Math.imul(er,Je)|0,me=me+Math.imul(Vt,tt)|0,ie=ie+Math.imul(Vt,xt)|0,ie=ie+Math.imul(_t,tt)|0,Se=Se+Math.imul(_t,xt)|0,me=me+Math.imul($e,xe)|0,ie=ie+Math.imul($e,ke)|0,ie=ie+Math.imul(St,xe)|0,Se=Se+Math.imul(St,ke)|0,me=me+Math.imul(sr,ir)|0,ie=ie+Math.imul(sr,ar)|0,ie=ie+Math.imul(wr,ir)|0,Se=Se+Math.imul(wr,ar)|0,me=me+Math.imul(Gt,ii)|0,ie=ie+Math.imul(Gt,pi)|0,ie=ie+Math.imul(Nt,ii)|0,Se=Se+Math.imul(Nt,pi)|0,me=me+Math.imul(Zt,di)|0,ie=ie+Math.imul(Zt,ji)|0,ie=ie+Math.imul(st,di)|0,Se=Se+Math.imul(st,ji)|0,me=me+Math.imul(Ze,wi)|0,ie=ie+Math.imul(Ze,On)|0,ie=ie+Math.imul(ut,wi)|0,Se=Se+Math.imul(ut,On)|0,me=me+Math.imul(ge,Fn)|0,ie=ie+Math.imul(ge,ra)|0,ie=ie+Math.imul(Re,Fn)|0,Se=Se+Math.imul(Re,ra)|0,me=me+Math.imul(Ae,Ut)|0,ie=ie+Math.imul(Ae,wt)|0,ie=ie+Math.imul(Fe,Ut)|0,Se=Se+Math.imul(Fe,wt)|0;var fn=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(fn>>>26)|0,fn&=67108863,me=Math.imul(Tr,Ge),ie=Math.imul(Tr,Je),ie=ie+Math.imul(Lr,Ge)|0,Se=Math.imul(Lr,Je),me=me+Math.imul(mt,tt)|0,ie=ie+Math.imul(mt,xt)|0,ie=ie+Math.imul(er,tt)|0,Se=Se+Math.imul(er,xt)|0,me=me+Math.imul(Vt,xe)|0,ie=ie+Math.imul(Vt,ke)|0,ie=ie+Math.imul(_t,xe)|0,Se=Se+Math.imul(_t,ke)|0,me=me+Math.imul($e,ir)|0,ie=ie+Math.imul($e,ar)|0,ie=ie+Math.imul(St,ir)|0,Se=Se+Math.imul(St,ar)|0,me=me+Math.imul(sr,ii)|0,ie=ie+Math.imul(sr,pi)|0,ie=ie+Math.imul(wr,ii)|0,Se=Se+Math.imul(wr,pi)|0,me=me+Math.imul(Gt,di)|0,ie=ie+Math.imul(Gt,ji)|0,ie=ie+Math.imul(Nt,di)|0,Se=Se+Math.imul(Nt,ji)|0,me=me+Math.imul(Zt,wi)|0,ie=ie+Math.imul(Zt,On)|0,ie=ie+Math.imul(st,wi)|0,Se=Se+Math.imul(st,On)|0,me=me+Math.imul(Ze,Fn)|0,ie=ie+Math.imul(Ze,ra)|0,ie=ie+Math.imul(ut,Fn)|0,Se=Se+Math.imul(ut,ra)|0,me=me+Math.imul(ge,Ut)|0,ie=ie+Math.imul(ge,wt)|0,ie=ie+Math.imul(Re,Ut)|0,Se=Se+Math.imul(Re,wt)|0;var yn=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(yn>>>26)|0,yn&=67108863,me=Math.imul(Tr,tt),ie=Math.imul(Tr,xt),ie=ie+Math.imul(Lr,tt)|0,Se=Math.imul(Lr,xt),me=me+Math.imul(mt,xe)|0,ie=ie+Math.imul(mt,ke)|0,ie=ie+Math.imul(er,xe)|0,Se=Se+Math.imul(er,ke)|0,me=me+Math.imul(Vt,ir)|0,ie=ie+Math.imul(Vt,ar)|0,ie=ie+Math.imul(_t,ir)|0,Se=Se+Math.imul(_t,ar)|0,me=me+Math.imul($e,ii)|0,ie=ie+Math.imul($e,pi)|0,ie=ie+Math.imul(St,ii)|0,Se=Se+Math.imul(St,pi)|0,me=me+Math.imul(sr,di)|0,ie=ie+Math.imul(sr,ji)|0,ie=ie+Math.imul(wr,di)|0,Se=Se+Math.imul(wr,ji)|0,me=me+Math.imul(Gt,wi)|0,ie=ie+Math.imul(Gt,On)|0,ie=ie+Math.imul(Nt,wi)|0,Se=Se+Math.imul(Nt,On)|0,me=me+Math.imul(Zt,Fn)|0,ie=ie+Math.imul(Zt,ra)|0,ie=ie+Math.imul(st,Fn)|0,Se=Se+Math.imul(st,ra)|0,me=me+Math.imul(Ze,Ut)|0,ie=ie+Math.imul(Ze,wt)|0,ie=ie+Math.imul(ut,Ut)|0,Se=Se+Math.imul(ut,wt)|0;var Sn=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,me=Math.imul(Tr,xe),ie=Math.imul(Tr,ke),ie=ie+Math.imul(Lr,xe)|0,Se=Math.imul(Lr,ke),me=me+Math.imul(mt,ir)|0,ie=ie+Math.imul(mt,ar)|0,ie=ie+Math.imul(er,ir)|0,Se=Se+Math.imul(er,ar)|0,me=me+Math.imul(Vt,ii)|0,ie=ie+Math.imul(Vt,pi)|0,ie=ie+Math.imul(_t,ii)|0,Se=Se+Math.imul(_t,pi)|0,me=me+Math.imul($e,di)|0,ie=ie+Math.imul($e,ji)|0,ie=ie+Math.imul(St,di)|0,Se=Se+Math.imul(St,ji)|0,me=me+Math.imul(sr,wi)|0,ie=ie+Math.imul(sr,On)|0,ie=ie+Math.imul(wr,wi)|0,Se=Se+Math.imul(wr,On)|0,me=me+Math.imul(Gt,Fn)|0,ie=ie+Math.imul(Gt,ra)|0,ie=ie+Math.imul(Nt,Fn)|0,Se=Se+Math.imul(Nt,ra)|0,me=me+Math.imul(Zt,Ut)|0,ie=ie+Math.imul(Zt,wt)|0,ie=ie+Math.imul(st,Ut)|0,Se=Se+Math.imul(st,wt)|0;var Ba=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,me=Math.imul(Tr,ir),ie=Math.imul(Tr,ar),ie=ie+Math.imul(Lr,ir)|0,Se=Math.imul(Lr,ar),me=me+Math.imul(mt,ii)|0,ie=ie+Math.imul(mt,pi)|0,ie=ie+Math.imul(er,ii)|0,Se=Se+Math.imul(er,pi)|0,me=me+Math.imul(Vt,di)|0,ie=ie+Math.imul(Vt,ji)|0,ie=ie+Math.imul(_t,di)|0,Se=Se+Math.imul(_t,ji)|0,me=me+Math.imul($e,wi)|0,ie=ie+Math.imul($e,On)|0,ie=ie+Math.imul(St,wi)|0,Se=Se+Math.imul(St,On)|0,me=me+Math.imul(sr,Fn)|0,ie=ie+Math.imul(sr,ra)|0,ie=ie+Math.imul(wr,Fn)|0,Se=Se+Math.imul(wr,ra)|0,me=me+Math.imul(Gt,Ut)|0,ie=ie+Math.imul(Gt,wt)|0,ie=ie+Math.imul(Nt,Ut)|0,Se=Se+Math.imul(Nt,wt)|0;var ua=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ua>>>26)|0,ua&=67108863,me=Math.imul(Tr,ii),ie=Math.imul(Tr,pi),ie=ie+Math.imul(Lr,ii)|0,Se=Math.imul(Lr,pi),me=me+Math.imul(mt,di)|0,ie=ie+Math.imul(mt,ji)|0,ie=ie+Math.imul(er,di)|0,Se=Se+Math.imul(er,ji)|0,me=me+Math.imul(Vt,wi)|0,ie=ie+Math.imul(Vt,On)|0,ie=ie+Math.imul(_t,wi)|0,Se=Se+Math.imul(_t,On)|0,me=me+Math.imul($e,Fn)|0,ie=ie+Math.imul($e,ra)|0,ie=ie+Math.imul(St,Fn)|0,Se=Se+Math.imul(St,ra)|0,me=me+Math.imul(sr,Ut)|0,ie=ie+Math.imul(sr,wt)|0,ie=ie+Math.imul(wr,Ut)|0,Se=Se+Math.imul(wr,wt)|0;var ma=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ma>>>26)|0,ma&=67108863,me=Math.imul(Tr,di),ie=Math.imul(Tr,ji),ie=ie+Math.imul(Lr,di)|0,Se=Math.imul(Lr,ji),me=me+Math.imul(mt,wi)|0,ie=ie+Math.imul(mt,On)|0,ie=ie+Math.imul(er,wi)|0,Se=Se+Math.imul(er,On)|0,me=me+Math.imul(Vt,Fn)|0,ie=ie+Math.imul(Vt,ra)|0,ie=ie+Math.imul(_t,Fn)|0,Se=Se+Math.imul(_t,ra)|0,me=me+Math.imul($e,Ut)|0,ie=ie+Math.imul($e,wt)|0,ie=ie+Math.imul(St,Ut)|0,Se=Se+Math.imul(St,wt)|0;var Wa=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,me=Math.imul(Tr,wi),ie=Math.imul(Tr,On),ie=ie+Math.imul(Lr,wi)|0,Se=Math.imul(Lr,On),me=me+Math.imul(mt,Fn)|0,ie=ie+Math.imul(mt,ra)|0,ie=ie+Math.imul(er,Fn)|0,Se=Se+Math.imul(er,ra)|0,me=me+Math.imul(Vt,Ut)|0,ie=ie+Math.imul(Vt,wt)|0,ie=ie+Math.imul(_t,Ut)|0,Se=Se+Math.imul(_t,wt)|0;var Fa=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,me=Math.imul(Tr,Fn),ie=Math.imul(Tr,ra),ie=ie+Math.imul(Lr,Fn)|0,Se=Math.imul(Lr,ra),me=me+Math.imul(mt,Ut)|0,ie=ie+Math.imul(mt,wt)|0,ie=ie+Math.imul(er,Ut)|0,Se=Se+Math.imul(er,wt)|0;var Wo=(Ce+me|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Wo>>>26)|0,Wo&=67108863,me=Math.imul(Tr,Ut),ie=Math.imul(Tr,wt),ie=ie+Math.imul(Lr,Ut)|0,Se=Math.imul(Lr,wt);var da=(Ce+me|0)+((ie&8191)<<13)|0;return Ce=(Se+(ie>>>13)|0)+(da>>>26)|0,da&=67108863,Ee[0]=rr,Ee[1]=nr,Ee[2]=Er,Ee[3]=Xr,Ee[4]=ri,Ee[5]=Qr,Ee[6]=Oi,Ee[7]=$i,Ee[8]=tn,Ee[9]=fn,Ee[10]=yn,Ee[11]=Sn,Ee[12]=Ba,Ee[13]=ua,Ee[14]=ma,Ee[15]=Wa,Ee[16]=Fa,Ee[17]=Wo,Ee[18]=da,Ce!==0&&(Ee[19]=Ce,te.length++),te};Math.imul||(L=S);function x(j,N,H){H.negative=N.negative^j.negative,H.length=j.length+N.length;for(var te=0,oe=0,_e=0;_e>>26)|0,oe+=Ee>>>26,Ee&=67108863}H.words[_e]=Ce,te=Ee,Ee=oe}return te!==0?H.words[_e]=te:H.length--,H.strip()}function C(j,N,H){var te=new M;return te.mulp(j,N,H)}f.prototype.mulTo=function(N,H){var te,oe=this.length+N.length;return this.length===10&&N.length===10?te=L(this,N,H):oe<63?te=S(this,N,H):oe<1024?te=x(this,N,H):te=C(this,N,H),te};function M(j,N){this.x=j,this.y=N}M.prototype.makeRBT=function(N){for(var H=new Array(N),te=f.prototype._countBits(N)-1,oe=0;oe>=1;return oe},M.prototype.permute=function(N,H,te,oe,_e,Ee){for(var Ce=0;Ce>>1)_e++;return 1<<_e+1+oe},M.prototype.conjugate=function(N,H,te){if(!(te<=1))for(var oe=0;oe>>13,te[2*Ee+1]=_e&8191,_e=_e>>>13;for(Ee=2*H;Ee>=26,H+=oe/67108864|0,H+=_e>>>26,this.words[te]=_e&67108863}return H!==0&&(this.words[te]=H,this.length++),this},f.prototype.muln=function(N){return this.clone().imuln(N)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(N){var H=E(N);if(H.length===0)return new f(1);for(var te=this,oe=0;oe=0);var H=N%26,te=(N-H)/26,oe=67108863>>>26-H<<26-H,_e;if(H!==0){var Ee=0;for(_e=0;_e>>26-H}Ee&&(this.words[_e]=Ee,this.length++)}if(te!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+te]=this.words[_e];for(_e=0;_e=0);var oe;H?oe=(H-H%26)/26:oe=0;var _e=N%26,Ee=Math.min((N-_e)/26,this.length),Ce=67108863^67108863>>>_e<<_e,me=te;if(oe-=Ee,oe=Math.max(0,oe),me){for(var ie=0;ieEe)for(this.length-=Ee,ie=0;ie=0&&(Se!==0||ie>=oe);ie--){var Le=this.words[ie]|0;this.words[ie]=Se<<26-_e|Le>>>_e,Se=Le&Ce}return me&&Se!==0&&(me.words[me.length++]=Se),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,H,te){return u(this.negative===0),this.iushrn(N,H,te)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N=="number"&&N>=0);var H=N%26,te=(N-H)/26,oe=1<=0);var H=N%26,te=(N-H)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=te)return this;if(H!==0&&te++,this.length=Math.min(te,this.length),H!==0){var oe=67108863^67108863>>>H<=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},f.prototype.isubn=function(N){if(u(typeof N=="number"),u(N<67108864),N<0)return this.iaddn(-N);if(this.negative!==0)return this.negative=0,this.iaddn(N),this.negative=1,this;if(this.words[0]-=N,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H>26)-(me/67108864|0),this.words[_e+te]=Ee&67108863}for(;_e>26,this.words[_e+te]=Ee&67108863;if(Ce===0)return this.strip();for(u(Ce===-1),Ce=0,_e=0;_e>26,this.words[_e]=Ee&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,H){var te=this.length-N.length,oe=this.clone(),_e=N,Ee=_e.words[_e.length-1]|0,Ce=this._countBits(Ee);te=26-Ce,te!==0&&(_e=_e.ushln(te),oe.iushln(te),Ee=_e.words[_e.length-1]|0);var me=oe.length-_e.length,ie;if(H!=="mod"){ie=new f(null),ie.length=me+1,ie.words=new Array(ie.length);for(var Se=0;Se=0;Ae--){var Fe=(oe.words[_e.length+Ae]|0)*67108864+(oe.words[_e.length+Ae-1]|0);for(Fe=Math.min(Fe/Ee|0,67108863),oe._ishlnsubmul(_e,Fe,Ae);oe.negative!==0;)Fe--,oe.negative=0,oe._ishlnsubmul(_e,1,Ae),oe.isZero()||(oe.negative^=1);ie&&(ie.words[Ae]=Fe)}return ie&&ie.strip(),oe.strip(),H!=="div"&&te!==0&&oe.iushrn(te),{div:ie||null,mod:oe}},f.prototype.divmod=function(N,H,te){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var oe,_e,Ee;return this.negative!==0&&N.negative===0?(Ee=this.neg().divmod(N,H),H!=="mod"&&(oe=Ee.div.neg()),H!=="div"&&(_e=Ee.mod.neg(),te&&_e.negative!==0&&_e.iadd(N)),{div:oe,mod:_e}):this.negative===0&&N.negative!==0?(Ee=this.divmod(N.neg(),H),H!=="mod"&&(oe=Ee.div.neg()),{div:oe,mod:Ee.mod}):(this.negative&N.negative)!==0?(Ee=this.neg().divmod(N.neg(),H),H!=="div"&&(_e=Ee.mod.neg(),te&&_e.negative!==0&&_e.isub(N)),{div:Ee.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?H==="div"?{div:this.divn(N.words[0]),mod:null}:H==="mod"?{div:null,mod:new f(this.modn(N.words[0]))}:{div:this.divn(N.words[0]),mod:new f(this.modn(N.words[0]))}:this._wordDiv(N,H)},f.prototype.div=function(N){return this.divmod(N,"div",!1).div},f.prototype.mod=function(N){return this.divmod(N,"mod",!1).mod},f.prototype.umod=function(N){return this.divmod(N,"mod",!0).mod},f.prototype.divRound=function(N){var H=this.divmod(N);if(H.mod.isZero())return H.div;var te=H.div.negative!==0?H.mod.isub(N):H.mod,oe=N.ushrn(1),_e=N.andln(1),Ee=te.cmp(oe);return Ee<0||_e===1&&Ee===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var H=(1<<26)%N,te=0,oe=this.length-1;oe>=0;oe--)te=(H*te+(this.words[oe]|0))%N;return te},f.prototype.idivn=function(N){u(N<=67108863);for(var H=0,te=this.length-1;te>=0;te--){var oe=(this.words[te]|0)+H*67108864;this.words[te]=oe/N|0,H=oe%N}return this.strip()},f.prototype.divn=function(N){return this.clone().idivn(N)},f.prototype.egcd=function(N){u(N.negative===0),u(!N.isZero());var H=this,te=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),Ee=new f(0),Ce=new f(1),me=0;H.isEven()&&te.isEven();)H.iushrn(1),te.iushrn(1),++me;for(var ie=te.clone(),Se=H.clone();!H.isZero();){for(var Le=0,Ae=1;(H.words[0]&Ae)===0&&Le<26;++Le,Ae<<=1);if(Le>0)for(H.iushrn(Le);Le-- >0;)(oe.isOdd()||_e.isOdd())&&(oe.iadd(ie),_e.isub(Se)),oe.iushrn(1),_e.iushrn(1);for(var Fe=0,Pe=1;(te.words[0]&Pe)===0&&Fe<26;++Fe,Pe<<=1);if(Fe>0)for(te.iushrn(Fe);Fe-- >0;)(Ee.isOdd()||Ce.isOdd())&&(Ee.iadd(ie),Ce.isub(Se)),Ee.iushrn(1),Ce.iushrn(1);H.cmp(te)>=0?(H.isub(te),oe.isub(Ee),_e.isub(Ce)):(te.isub(H),Ee.isub(oe),Ce.isub(_e))}return{a:Ee,b:Ce,gcd:te.iushln(me)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var H=this,te=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),Ee=te.clone();H.cmpn(1)>0&&te.cmpn(1)>0;){for(var Ce=0,me=1;(H.words[0]&me)===0&&Ce<26;++Ce,me<<=1);if(Ce>0)for(H.iushrn(Ce);Ce-- >0;)oe.isOdd()&&oe.iadd(Ee),oe.iushrn(1);for(var ie=0,Se=1;(te.words[0]&Se)===0&&ie<26;++ie,Se<<=1);if(ie>0)for(te.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(Ee),_e.iushrn(1);H.cmp(te)>=0?(H.isub(te),oe.isub(_e)):(te.isub(H),_e.isub(oe))}var Le;return H.cmpn(1)===0?Le=oe:Le=_e,Le.cmpn(0)<0&&Le.iadd(N),Le},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var H=this.clone(),te=N.clone();H.negative=0,te.negative=0;for(var oe=0;H.isEven()&&te.isEven();oe++)H.iushrn(1),te.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;te.isEven();)te.iushrn(1);var _e=H.cmp(te);if(_e<0){var Ee=H;H=te,te=Ee}else if(_e===0||te.cmpn(1)===0)break;H.isub(te)}while(!0);return te.iushln(oe)},f.prototype.invm=function(N){return this.egcd(N).a.umod(N)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(N){return this.words[0]&N},f.prototype.bincn=function(N){u(typeof N=="number");var H=N%26,te=(N-H)/26,oe=1<>>26,Ce&=67108863,this.words[Ee]=Ce}return _e!==0&&(this.words[Ee]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var H=N<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var te;if(this.length>1)te=1;else{H&&(N=-N),u(N<=67108863,"Number is too big");var oe=this.words[0]|0;te=oe===N?0:oeN.length)return 1;if(this.length=0;te--){var oe=this.words[te]|0,_e=N.words[te]|0;if(oe!==_e){oe<_e?H=-1:oe>_e&&(H=1);break}}return H},f.prototype.gtn=function(N){return this.cmpn(N)===1},f.prototype.gt=function(N){return this.cmp(N)===1},f.prototype.gten=function(N){return this.cmpn(N)>=0},f.prototype.gte=function(N){return this.cmp(N)>=0},f.prototype.ltn=function(N){return this.cmpn(N)===-1},f.prototype.lt=function(N){return this.cmp(N)===-1},f.prototype.lten=function(N){return this.cmpn(N)<=0},f.prototype.lte=function(N){return this.cmp(N)<=0},f.prototype.eqn=function(N){return this.cmpn(N)===0},f.prototype.eq=function(N){return this.cmp(N)===0},f.red=function(N){return new G(N)},f.prototype.toRed=function(N){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),N.convertTo(this)._forceRed(N)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(N){return this.red=N,this},f.prototype.forceRed=function(N){return u(!this.red,"Already a number in reduction context"),this._forceRed(N)},f.prototype.redAdd=function(N){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,N)},f.prototype.redIAdd=function(N){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,N)},f.prototype.redSub=function(N){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,N)},f.prototype.redISub=function(N){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,N)},f.prototype.redShl=function(N){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,N)},f.prototype.redMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.mul(this,N)},f.prototype.redIMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.imul(this,N)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(N){return u(this.red&&!N.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,N)};var g={k256:null,p224:null,p192:null,p25519:null};function P(j,N){this.name=j,this.p=new f(N,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var N=new f(null);return N.words=new Array(Math.ceil(this.n/13)),N},P.prototype.ireduce=function(N){var H=N,te;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),te=H.bitLength();while(te>this.n);var oe=te0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},P.prototype.split=function(N,H){N.iushrn(this.n,0,H)},P.prototype.imulK=function(N){return N.imul(this.k)};function T(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(T,P),T.prototype.split=function(N,H){for(var te=4194303,oe=Math.min(N.length,9),_e=0;_e>>22,Ee=Ce}Ee>>>=22,N.words[_e-10]=Ee,Ee===0&&N.length>10?N.length-=10:N.length-=9},T.prototype.imulK=function(N){N.words[N.length]=0,N.words[N.length+1]=0,N.length+=2;for(var H=0,te=0;te>>=26,N.words[te]=_e,H=oe}return H!==0&&(N.words[N.length++]=H),N},f._prime=function(N){if(g[N])return g[N];var H;if(N==="k256")H=new T;else if(N==="p224")H=new z;else if(N==="p192")H=new O;else if(N==="p25519")H=new V;else throw new Error("Unknown prime "+N);return g[N]=H,H};function G(j){if(typeof j=="string"){var N=f._prime(j);this.m=N.p,this.prime=N}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}G.prototype._verify1=function(N){u(N.negative===0,"red works only with positives"),u(N.red,"red works only with red numbers")},G.prototype._verify2=function(N,H){u((N.negative|H.negative)===0,"red works only with positives"),u(N.red&&N.red===H.red,"red works only with red numbers")},G.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},G.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},G.prototype.add=function(N,H){this._verify2(N,H);var te=N.add(H);return te.cmp(this.m)>=0&&te.isub(this.m),te._forceRed(this)},G.prototype.iadd=function(N,H){this._verify2(N,H);var te=N.iadd(H);return te.cmp(this.m)>=0&&te.isub(this.m),te},G.prototype.sub=function(N,H){this._verify2(N,H);var te=N.sub(H);return te.cmpn(0)<0&&te.iadd(this.m),te._forceRed(this)},G.prototype.isub=function(N,H){this._verify2(N,H);var te=N.isub(H);return te.cmpn(0)<0&&te.iadd(this.m),te},G.prototype.shl=function(N,H){return this._verify1(N),this.imod(N.ushln(H))},G.prototype.imul=function(N,H){return this._verify2(N,H),this.imod(N.imul(H))},G.prototype.mul=function(N,H){return this._verify2(N,H),this.imod(N.mul(H))},G.prototype.isqr=function(N){return this.imul(N,N.clone())},G.prototype.sqr=function(N){return this.mul(N,N)},G.prototype.sqrt=function(N){if(N.isZero())return N.clone();var H=this.m.andln(3);if(u(H%2===1),H===3){var te=this.m.add(new f(1)).iushrn(2);return this.pow(N,te)}for(var oe=this.m.subn(1),_e=0;!oe.isZero()&&oe.andln(1)===0;)_e++,oe.iushrn(1);u(!oe.isZero());var Ee=new f(1).toRed(this),Ce=Ee.redNeg(),me=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,me).cmp(Ce)!==0;)ie.redIAdd(Ce);for(var Se=this.pow(ie,oe),Le=this.pow(N,oe.addn(1).iushrn(1)),Ae=this.pow(N,oe),Fe=_e;Ae.cmp(Ee)!==0;){for(var Pe=Ae,ge=0;Pe.cmp(Ee)!==0;ge++)Pe=Pe.redSqr();u(ge=0;_e--){for(var Se=H.words[_e],Le=ie-1;Le>=0;Le--){var Ae=Se>>Le&1;if(Ee!==oe[0]&&(Ee=this.sqr(Ee)),Ae===0&&Ce===0){me=0;continue}Ce<<=1,Ce|=Ae,me++,!(me!==te&&(_e!==0||Le!==0))&&(Ee=this.mul(Ee,oe[Ce]),me=0,Ce=0)}ie=26}return Ee},G.prototype.convertTo=function(N){var H=N.umod(this.m);return H===N?H.clone():H},G.prototype.convertFrom=function(N){var H=N.clone();return H.red=null,H},f.mont=function(N){return new Z(N)};function Z(j){G.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c(Z,G),Z.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},Z.prototype.convertFrom=function(N){var H=this.imod(N.mul(this.rinv));return H.red=null,H},Z.prototype.imul=function(N,H){if(N.isZero()||H.isZero())return N.words[0]=0,N.length=1,N;var te=N.imul(H),oe=te.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=te.isub(oe).iushrn(this.shift),Ee=_e;return _e.cmp(this.m)>=0?Ee=_e.isub(this.m):_e.cmpn(0)<0&&(Ee=_e.iadd(this.m)),Ee._forceRed(this)},Z.prototype.mul=function(N,H){if(N.isZero()||H.isZero())return new f(0)._forceRed(this);var te=N.mul(H),oe=te.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=te.isub(oe).iushrn(this.shift),Ee=_e;return _e.cmp(this.m)>=0?Ee=_e.isub(this.m):_e.cmpn(0)<0&&(Ee=_e.iadd(this.m)),Ee._forceRed(this)},Z.prototype.invm=function(N){var H=this.imod(N._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(i,this)},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},6864:function(i){i.exports=a;function a(){var o=new Float32Array(16);return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},6867:function(i,a,o){"use strict";i.exports=p;var s=o(1888),l=o(855),u=o(7150);function c(k,E){for(var S=0;S>>1;if(!(M<=0)){var g,P=s.mallocDouble(2*M*x),T=s.mallocInt32(x);if(x=f(k,M,P,T),x>0){if(M===1&&L)l.init(x),g=l.sweepComplete(M,S,0,x,P,T,0,x,P,T);else{var z=s.mallocDouble(2*M*C),O=s.mallocInt32(C);C=f(E,M,z,O),C>0&&(l.init(x+C),M===1?g=l.sweepBipartite(M,S,0,x,P,T,0,C,z,O):g=u(M,S,L,x,P,T,C,z,O),s.free(z),s.free(O))}s.free(P),s.free(T)}return g}}}var d;function v(k,E){d.push([k,E])}function _(k){return d=[],h(k,k,v,!0),d}function b(k,E){return d=[],h(k,E,v,!1),d}function p(k,E,S){switch(arguments.length){case 1:return _(k);case 2:return typeof E=="function"?h(k,k,E,!0):b(k,E);case 3:return h(k,E,S,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=s[0],o[1]=c+h*_-d*v,o[2]=f+h*v+d*_,o}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var _=0,c=u;c=p0)&&!(p1>=hi)"),E=v("lo===p0"),S=v("lo0;){Se-=1;var Fe=Se*M,Pe=T[Fe],ge=T[Fe+1],Re=T[Fe+2],ce=T[Fe+3],Ze=T[Fe+4],ut=T[Fe+5],pt=Se*g,Zt=z[pt],st=z[pt+1],lt=ut&1,Gt=!!(ut&16),Nt=_e,Jt=Ee,sr=me,wr=ie;if(lt&&(Nt=me,Jt=ie,sr=_e,wr=Ee),!(ut&2&&(Re=S(N,Pe,ge,Re,Nt,Jt,st),ge>=Re))&&!(ut&4&&(ge=L(N,Pe,ge,Re,Nt,Jt,Zt),ge>=Re))){var cr=Re-ge,$e=Ze-ce;if(Gt){if(N*cr*(cr+$e)me&&Se>0){var Le=(ie[Se][0]-me)/(ie[Se][0]-ie[Se-1][0]);return ie[Se][1]*(1-Le)+Le*ie[Se-1][1]}}return 1}function Z(me,ie){for(var Se=p({colormap:me,nshades:256,format:"rgba"}),Le=new Uint8Array(256*4),Ae=0;Ae<256;++Ae){for(var Fe=Se[Ae],Pe=0;Pe<3;++Pe)Le[4*Ae+Pe]=Fe[Pe];ie?Le[4*Ae+3]=255*G(Ae/255,ie):Le[4*Ae+3]=255*Fe[3]}return b(Le,[256,256,4],[4,0,1])}function j(me){for(var ie=me.length,Se=new Array(ie),Le=0;Le0){var pt=this.triShader;pt.bind(),pt.uniforms=ge,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var pt=this.lineShader;pt.bind(),pt.uniforms=ge,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var pt=this.pointShader;pt.bind(),pt.uniforms=ge,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var pt=this.contourShader;pt.bind(),pt.uniforms=ge,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},V.drawPick=function(me){me=me||{};for(var ie=this.gl,Se=me.model||z,Le=me.view||z,Ae=me.projection||z,Fe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Pe=0;Pe<3;++Pe)Fe[0][Pe]=Math.max(Fe[0][Pe],this.clipBounds[0][Pe]),Fe[1][Pe]=Math.min(Fe[1][Pe],this.clipBounds[1][Pe]);this._model=[].slice.call(Se),this._view=[].slice.call(Le),this._projection=[].slice.call(Ae),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var ge={model:Se,view:Le,projection:Ae,clipBounds:Fe,pickId:this.pickId/255},Re=this.pickShader;if(Re.bind(),Re.uniforms=ge,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Re=this.pointPickShader;Re.bind(),Re.uniforms=ge,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},V.pick=function(me){if(!me||me.id!==this.pickId)return null;for(var ie=me.value[0]+256*me.value[1]+65536*me.value[2],Se=this.cells[ie],Le=this.positions,Ae=new Array(Se.length),Fe=0;FeMath.max(x,C)?M[2]=1:x>Math.max(L,C)?M[0]=1:M[1]=1;for(var g=0,P=0,T=0;T<3;++T)g+=S[T]*S[T],P+=M[T]*S[T];for(var T=0;T<3;++T)M[T]-=P/g*S[T];return f(M,M),M}function b(S,L,x,C,M,g,P,T){this.center=s(x),this.up=s(C),this.right=s(M),this.radius=s([g]),this.angle=s([P,T]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(S,L),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var p=b.prototype;p.setDistanceLimits=function(S,L){S>0?S=Math.log(S):S=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,S),this.radius.bounds[0][0]=S,this.radius.bounds[1][0]=L},p.getDistanceLimits=function(S){var L=this.radius.bounds[0];return S?(S[0]=Math.exp(L[0][0]),S[1]=Math.exp(L[1][0]),S):[Math.exp(L[0][0]),Math.exp(L[1][0])]},p.recalcMatrix=function(S){this.center.curve(S),this.up.curve(S),this.right.curve(S),this.radius.curve(S),this.angle.curve(S);for(var L=this.computedUp,x=this.computedRight,C=0,M=0,g=0;g<3;++g)M+=L[g]*x[g],C+=L[g]*L[g];for(var P=Math.sqrt(C),T=0,g=0;g<3;++g)x[g]-=L[g]*M/C,T+=x[g]*x[g],L[g]/=P;for(var z=Math.sqrt(T),g=0;g<3;++g)x[g]/=z;var O=this.computedToward;c(O,L,x),f(O,O);for(var V=Math.exp(this.computedRadius[0]),G=this.computedAngle[0],Z=this.computedAngle[1],j=Math.cos(G),N=Math.sin(G),H=Math.cos(Z),te=Math.sin(Z),oe=this.computedCenter,_e=j*H,Ee=N*H,Ce=te,me=-j*te,ie=-N*te,Se=H,Le=this.computedEye,Ae=this.computedMatrix,g=0;g<3;++g){var Fe=_e*x[g]+Ee*O[g]+Ce*L[g];Ae[4*g+1]=me*x[g]+ie*O[g]+Se*L[g],Ae[4*g+2]=Fe,Ae[4*g+3]=0}var Pe=Ae[1],ge=Ae[5],Re=Ae[9],ce=Ae[2],Ze=Ae[6],ut=Ae[10],pt=ge*ut-Re*Ze,Zt=Re*ce-Pe*ut,st=Pe*Ze-ge*ce,lt=d(pt,Zt,st);pt/=lt,Zt/=lt,st/=lt,Ae[0]=pt,Ae[4]=Zt,Ae[8]=st;for(var g=0;g<3;++g)Le[g]=oe[g]+Ae[2+4*g]*V;for(var g=0;g<3;++g){for(var T=0,Gt=0;Gt<3;++Gt)T+=Ae[g+4*Gt]*Le[Gt];Ae[12+g]=-T}Ae[15]=1},p.getMatrix=function(S,L){this.recalcMatrix(S);var x=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=x[C];return L}return x};var k=[0,0,0];p.rotate=function(S,L,x,C){if(this.angle.move(S,L,x),C){this.recalcMatrix(S);var M=this.computedMatrix;k[0]=M[2],k[1]=M[6],k[2]=M[10];for(var g=this.computedUp,P=this.computedRight,T=this.computedToward,z=0;z<3;++z)M[4*z]=g[z],M[4*z+1]=P[z],M[4*z+2]=T[z];u(M,M,C,k);for(var z=0;z<3;++z)g[z]=M[4*z],P[z]=M[4*z+1];this.up.set(S,g[0],g[1],g[2]),this.right.set(S,P[0],P[1],P[2])}},p.pan=function(S,L,x,C){L=L||0,x=x||0,C=C||0,this.recalcMatrix(S);var M=this.computedMatrix,g=Math.exp(this.computedRadius[0]),P=M[1],T=M[5],z=M[9],O=d(P,T,z);P/=O,T/=O,z/=O;var V=M[0],G=M[4],Z=M[8],j=V*P+G*T+Z*z;V-=P*j,G-=T*j,Z-=z*j;var N=d(V,G,Z);V/=N,G/=N,Z/=N;var H=V*L+P*x,te=G*L+T*x,oe=Z*L+z*x;this.center.move(S,H,te,oe);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(S,Math.log(_e))},p.translate=function(S,L,x,C){this.center.move(S,L||0,x||0,C||0)},p.setMatrix=function(S,L,x,C){var M=1;typeof x=="number"&&(M=x|0),(M<0||M>3)&&(M=1);var g=(M+2)%3,P=(M+1)%3;L||(this.recalcMatrix(S),L=this.computedMatrix);var T=L[M],z=L[M+4],O=L[M+8];if(C){var G=Math.abs(T),Z=Math.abs(z),j=Math.abs(O),N=Math.max(G,Z,j);G===N?(T=T<0?-1:1,z=O=0):j===N?(O=O<0?-1:1,T=z=0):(z=z<0?-1:1,T=O=0)}else{var V=d(T,z,O);T/=V,z/=V,O/=V}var H=L[g],te=L[g+4],oe=L[g+8],_e=H*T+te*z+oe*O;H-=T*_e,te-=z*_e,oe-=O*_e;var Ee=d(H,te,oe);H/=Ee,te/=Ee,oe/=Ee;var Ce=z*oe-O*te,me=O*H-T*oe,ie=T*te-z*H,Se=d(Ce,me,ie);Ce/=Se,me/=Se,ie/=Se,this.center.jump(S,cr,$e,St),this.radius.idle(S),this.up.jump(S,T,z,O),this.right.jump(S,H,te,oe);var Le,Ae;if(M===2){var Fe=L[1],Pe=L[5],ge=L[9],Re=Fe*H+Pe*te+ge*oe,ce=Fe*Ce+Pe*me+ge*ie;Zt<0?Le=-Math.PI/2:Le=Math.PI/2,Ae=Math.atan2(ce,Re)}else{var Ze=L[2],ut=L[6],pt=L[10],Zt=Ze*T+ut*z+pt*O,st=Ze*H+ut*te+pt*oe,lt=Ze*Ce+ut*me+pt*ie;Le=Math.asin(v(Zt)),Ae=Math.atan2(lt,st)}this.angle.jump(S,Ae,Le),this.recalcMatrix(S);var Gt=L[2],Nt=L[6],Jt=L[10],sr=this.computedMatrix;l(sr,L);var wr=sr[15],cr=sr[12]/wr,$e=sr[13]/wr,St=sr[14]/wr,Qt=Math.exp(this.computedRadius[0]);this.center.jump(S,cr-Gt*Qt,$e-Nt*Qt,St-Jt*Qt)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(S){this.center.idle(S),this.up.idle(S),this.right.idle(S),this.radius.idle(S),this.angle.idle(S)},p.flush=function(S){this.center.flush(S),this.up.flush(S),this.right.flush(S),this.radius.flush(S),this.angle.flush(S)},p.setDistance=function(S,L){L>0&&this.radius.set(S,Math.log(L))},p.lookAt=function(S,L,x,C){this.recalcMatrix(S),L=L||this.computedEye,x=x||this.computedCenter,C=C||this.computedUp;var M=C[0],g=C[1],P=C[2],T=d(M,g,P);if(!(T<1e-6)){M/=T,g/=T,P/=T;var z=L[0]-x[0],O=L[1]-x[1],V=L[2]-x[2],G=d(z,O,V);if(!(G<1e-6)){z/=G,O/=G,V/=G;var Z=this.computedRight,j=Z[0],N=Z[1],H=Z[2],te=M*j+g*N+P*H;j-=te*M,N-=te*g,H-=te*P;var oe=d(j,N,H);if(!(oe<.01&&(j=g*V-P*O,N=P*z-M*V,H=M*O-g*z,oe=d(j,N,H),oe<1e-6))){j/=oe,N/=oe,H/=oe,this.up.set(S,M,g,P),this.right.set(S,j,N,H),this.center.set(S,x[0],x[1],x[2]),this.radius.set(S,Math.log(G));var _e=g*H-P*N,Ee=P*j-M*H,Ce=M*N-g*j,me=d(_e,Ee,Ce);_e/=me,Ee/=me,Ce/=me;var ie=M*z+g*O+P*V,Se=j*z+N*O+H*V,Le=_e*z+Ee*O+Ce*V,Ae=Math.asin(v(ie)),Fe=Math.atan2(Le,Se),Pe=this.angle._state,ge=Pe[Pe.length-1],Re=Pe[Pe.length-2];ge=ge%(2*Math.PI);var ce=Math.abs(ge+2*Math.PI-Fe),Ze=Math.abs(ge-Fe),ut=Math.abs(ge-2*Math.PI-Fe);ce max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D dashTexture; uniform float dashScale; uniform float opacity; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], worldPosition) || fragColor.a * opacity == 0. ) discard; float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; if(dashWeight < 0.5) { discard; } gl_FragColor = fragColor * opacity; } `]),f=s([`precision highp float; #define GLSLIFY 1 #define FLOAT_MAX 1.70141184e38 #define FLOAT_MIN 1.17549435e-38 // https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl vec4 packFloat(float v) { float av = abs(v); //Handle special cases if(av < FLOAT_MIN) { return vec4(0.0, 0.0, 0.0, 0.0); } else if(v > FLOAT_MAX) { return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; } else if(v < -FLOAT_MAX) { return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; } vec4 c = vec4(0,0,0,0); //Compute exponent and mantissa float e = floor(log2(av)); float m = av * pow(2.0, -e) - 1.0; //Unpack mantissa c[1] = floor(128.0 * m); m -= c[1] / 128.0; c[2] = floor(32768.0 * m); m -= c[2] / 32768.0; c[3] = floor(8388608.0 * m); //Unpack exponent float ebias = e + 127.0; c[0] = floor(ebias / 2.0); ebias -= c[0] * 2.0; c[1] += floor(ebias) * 128.0; //Unpack sign bit c[0] += 128.0 * step(0.0, -v); //Scale back to range return c / 255.0; } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform float pickId; uniform vec3 clipBounds[2]; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); }`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},7352:function(i,a,o){"use strict";var s=o(5721),l=o(4750),u=o(2690);i.exports=c;function c(f){var h=f.length;if(h===0)return[];if(h===1)return[[0]];var d=f[0].length;return d===0?[]:d===1?s(f):d===2?l(f):u(f,d)}},7399:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l+l,d=u+u,v=c+c,_=l*h,b=u*h,p=u*d,k=c*h,E=c*d,S=c*v,L=f*h,x=f*d,C=f*v;return o[0]=1-p-S,o[1]=b+C,o[2]=k-x,o[3]=0,o[4]=b-C,o[5]=1-_-S,o[6]=E+L,o[7]=0,o[8]=k+x,o[9]=E-L,o[10]=1-_-p,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7417:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=_;function _(E,S,L,x){if(c(S)===0||c(L)===0)return!1;var C=u(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),M=u(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!M?!1:(s(v.translate,h.translate,d.translate,x),s(v.skew,h.skew,d.skew,x),s(v.scale,h.scale,d.scale,x),s(v.perspective,h.perspective,d.perspective,x),f(v.quaternion,h.quaternion,d.quaternion,x),l(E,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:p(),scale:p(1),skew:p(),perspective:k(),quaternion:k()}}function p(E){return[E||0,E||0,E||0]}function k(){return[0,0,0,1]}},7507:function(i,a){"use strict";a.byteLength=d,a.toByteArray=_,a.fromByteArray=k;for(var o=[],s=[],l=typeof Uint8Array!="undefined"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=u.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var L=E.indexOf("=");L===-1&&(L=S);var x=L===S?0:4-L%4;return[L,x]}function d(E){var S=h(E),L=S[0],x=S[1];return(L+x)*3/4-x}function v(E,S,L){return(S+L)*3/4-L}function _(E){var S,L=h(E),x=L[0],C=L[1],M=new l(v(E,x,C)),g=0,P=C>0?x-4:x,T;for(T=0;T>16&255,M[g++]=S>>8&255,M[g++]=S&255;return C===2&&(S=s[E.charCodeAt(T)]<<2|s[E.charCodeAt(T+1)]>>4,M[g++]=S&255),C===1&&(S=s[E.charCodeAt(T)]<<10|s[E.charCodeAt(T+1)]<<4|s[E.charCodeAt(T+2)]>>2,M[g++]=S>>8&255,M[g++]=S&255),M}function b(E){return o[E>>18&63]+o[E>>12&63]+o[E>>6&63]+o[E&63]}function p(E,S,L){for(var x,C=[],M=S;MP?P:g+M));return x===1?(S=E[L-1],C.push(o[S>>2]+o[S<<4&63]+"==")):x===2&&(S=(E[L-2]<<8)+E[L-1],C.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),C.join("")}},7518:function(i,a,o){"use strict";var s=o(1433);function l(f,h,d,v,_,b){this.location=f,this.dimension=h,this.a=d,this.b=v,this.c=_,this.d=b}l.prototype.bind=function(f){switch(this.dimension){case 1:f.vertexAttrib1f(this.location,this.a);break;case 2:f.vertexAttrib2f(this.location,this.a,this.b);break;case 3:f.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:f.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function u(f,h,d){this.gl=f,this._ext=h,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var f=0;f1.0001)return null;T+=P[L]}return Math.abs(T-1)>.001?null:[x,h(v,P),P]}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},7640:function(i,a,o){"use strict";var s=o(1888);function l(_){switch(_){case"uint32":return[s.mallocUint32,s.freeUint32];default:return null}}var u={"uint32,1,0":function(_,b){return function(k,E,S,L,x,C,M,g,P,T,z){var O,V,G,Z=k*x+L,j,N=_(g),H,te,oe,_e;for(O=k+1;O<=E;++O){for(V=O,Z+=x,G=Z,H=0,te=Z,j=0;jk;){H=0,te=G-x;t:for(j=0;j_e)break t;te+=T,H+=z}for(H=G,te=G-x,j=0;j>1,N=j-V,H=j+V,te=G,oe=N,_e=j,Ee=H,Ce=Z,me=E+1,ie=S-1,Se=!0,Le,Ae,Fe,Pe,ge,Re,ce,Ze,ut,pt=0,Zt=0,st=0,lt,Gt,Nt,Jt,sr,wr,cr,$e,St,Qt,Vt,_t,It,mt,er,lr,Tr=P,Lr=b(Tr),ti=b(Tr);Gt=C*te,Nt=C*oe,lr=x;e:for(lt=0;lt0){Ae=te,te=oe,oe=Ae;break e}if(st<0)break e;lr+=z}Gt=C*Ee,Nt=C*Ce,lr=x;e:for(lt=0;lt0){Ae=Ee,Ee=Ce,Ce=Ae;break e}if(st<0)break e;lr+=z}Gt=C*te,Nt=C*_e,lr=x;e:for(lt=0;lt0){Ae=te,te=_e,_e=Ae;break e}if(st<0)break e;lr+=z}Gt=C*oe,Nt=C*_e,lr=x;e:for(lt=0;lt0){Ae=oe,oe=_e,_e=Ae;break e}if(st<0)break e;lr+=z}Gt=C*te,Nt=C*Ee,lr=x;e:for(lt=0;lt0){Ae=te,te=Ee,Ee=Ae;break e}if(st<0)break e;lr+=z}Gt=C*_e,Nt=C*Ee,lr=x;e:for(lt=0;lt0){Ae=_e,_e=Ee,Ee=Ae;break e}if(st<0)break e;lr+=z}Gt=C*oe,Nt=C*Ce,lr=x;e:for(lt=0;lt0){Ae=oe,oe=Ce,Ce=Ae;break e}if(st<0)break e;lr+=z}Gt=C*oe,Nt=C*_e,lr=x;e:for(lt=0;lt0){Ae=oe,oe=_e,_e=Ae;break e}if(st<0)break e;lr+=z}Gt=C*Ee,Nt=C*Ce,lr=x;e:for(lt=0;lt0){Ae=Ee,Ee=Ce,Ce=Ae;break e}if(st<0)break e;lr+=z}for(Gt=C*te,Nt=C*oe,Jt=C*_e,sr=C*Ee,wr=C*Ce,cr=C*G,$e=C*j,St=C*Z,er=0,lr=x,lt=0;lt0)ie--;else if(st<0){for(Gt=C*Re,Nt=C*me,Jt=C*ie,lr=x,lt=0;lt0)for(;;){ce=x+ie*C,er=0;e:for(lt=0;lt0){if(--ieZ){e:for(;;){for(ce=x+me*C,er=0,lr=x,lt=0;lt1&&k?S(p,k[0],k[1]):S(p)}var d={"uint32,1,0":function(_,b){return function(p){var k=p.data,E=p.offset|0,S=p.shape,L=p.stride,x=L[0]|0,C=S[0]|0,M=L[1]|0,g=S[1]|0,P=M,T=M,z=1;C<=32?_(0,C-1,k,E,x,M,C,g,P,T,z):b(0,C-1,k,E,x,M,C,g,P,T,z)}}};function v(_,b){var p=[b,_].join(","),k=d[p],E=c(_,b),S=h(_,b,E);return k(E,S)}i.exports=v},7642:function(i,a,o){"use strict";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var _=d.point,b=v.point,p=_.length,k=0;k=2)return!1;G[j]=N}return!0}):V=V.filter(function(G){for(var Z=0;Z<=b;++Z){var j=P[G[Z]];if(j<0)return!1;G[Z]=j}return!0}),b&1)for(var E=0;E",H="",te=N.length,oe=H.length,_e=G[0]===k||G[0]===L,Ee=0,Ce=-oe;Ee>-1&&(Ee=Z.indexOf(N,Ee),!(Ee===-1||(Ce=Z.indexOf(H,Ee+te),Ce===-1)||Ce<=Ee));){for(var me=Ee;me=Ce)j[me]=null,Z=Z.substr(0,me)+" "+Z.substr(me+1);else if(j[me]!==null){var ie=j[me].indexOf(G[0]);ie===-1?j[me]+=G:_e&&(j[me]=j[me].substr(0,ie+1)+(1+parseInt(j[me][ie+1]))+j[me].substr(ie+2))}var Se=Ee+te,Le=Z.substr(Se,Ce-Se),Ae=Le.indexOf(N);Ae!==-1?Ee=Ae:Ee=Ce+oe}return j}function M(V,G,Z){for(var j=G.textAlign||"start",N=G.textBaseline||"alphabetic",H=[1<<30,1<<30],te=[0,0],oe=V.length,_e=0;_e/g,` `):Z=Z.replace(/\/g," ");var te="",oe=[];for(ge=0;ge-1?parseInt($e[1+Vt]):0,mt=_t>-1?parseInt(St[1+_t]):0;It!==mt&&(Qt=Qt.replace(st(),"?px "),Ze*=Math.pow(.75,mt-It),Qt=Qt.replace("?px ",st())),ce+=.25*ie*(mt-It)}if(H.superscripts===!0){var er=$e.indexOf(k),lr=St.indexOf(k),Tr=er>-1?parseInt($e[1+er]):0,Lr=lr>-1?parseInt(St[1+lr]):0;Tr!==Lr&&(Qt=Qt.replace(st(),"?px "),Ze*=Math.pow(.75,Lr-Tr),Qt=Qt.replace("?px ",st())),ce-=.25*ie*(Lr-Tr)}if(H.bolds===!0){var ti=$e.indexOf(v)>-1,Br=St.indexOf(v)>-1;!ti&&Br&&(Vr?Qt=Qt.replace("italic ","italic bold "):Qt="bold "+Qt),ti&&!Br&&(Qt=Qt.replace("bold ",""))}if(H.italics===!0){var Vr=$e.indexOf(b)>-1,dt=St.indexOf(b)>-1;!Vr&&dt&&(Qt="italic "+Qt),Vr&&!dt&&(Qt=Qt.replace("italic ",""))}G.font=Qt}for(Pe=0;Pe0&&(N=j.size),j.lineSpacing&&j.lineSpacing>0&&(H=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(te.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(te.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(te.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(te.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(te.superscripts=!!j.styletags.superscripts)),Z.font=[j.fontStyle,j.fontVariant,j.fontWeight,N+"px",j.font].filter(function(_e){return _e}).join(" "),Z.textAlign="start",Z.textBaseline="alphabetic",Z.direction="ltr";var oe=g(G,Z,V,N,H,te);return z(oe,j,N)}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},7765:function(i,a,o){"use strict";i.exports=p;var s=o(9618),l=o(1888),u=o(446),c=o(1570);function f(k){for(var E=k.length,S=0,L=0;LV||z<0||z>V)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[T,z],P.bind(),O.texImage2D(O.TEXTURE_2D,0,P.format,T,z,0,P.format,P.type,null),P._mipLevels=[0],P}function p(P,T,z,O,V,G){this.gl=P,this.handle=T,this.format=V,this.type=G,this._shape=[z,O],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var Z=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return Z._wrapS},set:function(H){return Z.wrapS=H}},{get:function(){return Z._wrapT},set:function(H){return Z.wrapT=H}}]),this._wrapVector=j;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return Z._shape[0]},set:function(H){return Z.width=H}},{get:function(){return Z._shape[1]},set:function(H){return Z.height=H}}]),this._shapeVector=N}var k=p.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var T=this.gl;if(this.type===T.FLOAT&&c.indexOf(P)>=0&&(T.getExtension("OES_texture_float_linear")||(P=T.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var T=this.gl;if(this.type===T.FLOAT&&c.indexOf(P)>=0&&(T.getExtension("OES_texture_float_linear")||(P=T.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var T=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,T!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var T=0;T<2;++T)if(h.indexOf(P[T])<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);this._wrapS=P[0],this._wrapT=P[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,b(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,b(this,this._shape[0],P),P}}}),k.bind=function(P){var T=this.gl;return P!==void 0&&T.activeTexture(T.TEXTURE0+(P|0)),T.bindTexture(T.TEXTURE_2D,this.handle),P!==void 0?P|0:T.getParameter(T.ACTIVE_TEXTURE)-T.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),T=0;P>0;++T,P>>>=1)this._mipLevels.indexOf(T)<0&&this._mipLevels.push(T)},k.setPixels=function(P,T,z,O){var V=this.gl;this.bind(),Array.isArray(T)?(O=z,z=T[1]|0,T=T[0]|0):(T=T||0,z=z||0),O=O||0;var G=v(P)?P:P.raw;if(G){var Z=this._mipLevels.indexOf(O)<0;Z?(V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,this.type,G),this._mipLevels.push(O)):V.texSubImage2D(V.TEXTURE_2D,O,T,z,this.format,this.type,G)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||T+P.shape[1]>this._shape[1]>>>O||z+P.shape[0]>this._shape[0]>>>O||T<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");S(V,T,z,O,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function E(P,T){return P.length===3?T[2]===1&&T[1]===P[0]*P[2]&&T[0]===P[2]:T[0]===1&&T[1]===P[0]}function S(P,T,z,O,V,G,Z,j){var N=j.dtype,H=j.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var te=0,oe=0,_e=E(H,j.stride.slice());N==="float32"?te=P.FLOAT:N==="float64"?(te=P.FLOAT,_e=!1,N="float32"):N==="uint8"?te=P.UNSIGNED_BYTE:(te=P.UNSIGNED_BYTE,_e=!1,N="uint8");var Ee=1;if(H.length===2)oe=P.LUMINANCE,H=[H[0],H[1],1],j=s(j.data,H,[j.stride[0],j.stride[1],1],j.offset);else if(H.length===3){if(H[2]===1)oe=P.ALPHA;else if(H[2]===2)oe=P.LUMINANCE_ALPHA;else if(H[2]===3)oe=P.RGB;else if(H[2]===4)oe=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Ee=H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((oe===P.LUMINANCE||oe===P.ALPHA)&&(V===P.LUMINANCE||V===P.ALPHA)&&(oe=V),oe!==V)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Ce=j.size,me=Z.indexOf(O)<0;if(me&&Z.push(O),te===G&&_e)j.offset===0&&j.data.length===Ce?me?P.texImage2D(P.TEXTURE_2D,O,V,H[0],H[1],0,V,G,j.data):P.texSubImage2D(P.TEXTURE_2D,O,T,z,H[0],H[1],V,G,j.data):me?P.texImage2D(P.TEXTURE_2D,O,V,H[0],H[1],0,V,G,j.data.subarray(j.offset,j.offset+Ce)):P.texSubImage2D(P.TEXTURE_2D,O,T,z,H[0],H[1],V,G,j.data.subarray(j.offset,j.offset+Ce));else{var ie;G===P.FLOAT?ie=u.mallocFloat32(Ce):ie=u.mallocUint8(Ce);var Se=s(ie,H,[H[2],H[2]*H[0],1]);te===P.FLOAT&&G===P.UNSIGNED_BYTE?_(Se,j):l.assign(Se,j),me?P.texImage2D(P.TEXTURE_2D,O,V,H[0],H[1],0,V,G,ie.subarray(0,Ce)):P.texSubImage2D(P.TEXTURE_2D,O,T,z,H[0],H[1],V,G,ie.subarray(0,Ce)),G===P.FLOAT?u.freeFloat32(ie):u.freeUint8(ie)}}function L(P){var T=P.createTexture();return P.bindTexture(P.TEXTURE_2D,T),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),T}function x(P,T,z,O,V){var G=P.getParameter(P.MAX_TEXTURE_SIZE);if(T<0||T>G||z<0||z>G)throw new Error("gl-texture2d: Invalid texture shape");if(V===P.FLOAT&&!P.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,O,T,z,0,O,V,null),new p(P,Z,T,z,O,V)}function C(P,T,z,O,V,G){var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,V,V,G,T),new p(P,Z,z,O,V,G)}function M(P,T){var z=T.dtype,O=T.shape.slice(),V=P.getParameter(P.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>V||O[1]<0||O[1]>V)throw new Error("gl-texture2d: Invalid texture size");var G=E(O,T.stride.slice()),Z=0;z==="float32"?Z=P.FLOAT:z==="float64"?(Z=P.FLOAT,G=!1,z="float32"):z==="uint8"?Z=P.UNSIGNED_BYTE:(Z=P.UNSIGNED_BYTE,G=!1,z="uint8");var j=0;if(O.length===2)j=P.LUMINANCE,O=[O[0],O[1],1],T=s(T.data,O,[T.stride[0],T.stride[1],1],T.offset);else if(O.length===3)if(O[2]===1)j=P.ALPHA;else if(O[2]===2)j=P.LUMINANCE_ALPHA;else if(O[2]===3)j=P.RGB;else if(O[2]===4)j=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");Z===P.FLOAT&&!P.getExtension("OES_texture_float")&&(Z=P.UNSIGNED_BYTE,G=!1);var N,H,te=T.size;if(G)T.offset===0&&T.data.length===te?N=T.data:N=T.data.subarray(T.offset,T.offset+te);else{var oe=[O[2],O[2]*O[0],1];H=u.malloc(te,z);var _e=s(H,O,oe,0);(z==="float32"||z==="float64")&&Z===P.UNSIGNED_BYTE?_(_e,T):l.assign(_e,T),N=H.subarray(0,te)}var Ee=L(P);return P.texImage2D(P.TEXTURE_2D,0,j,O[0],O[1],0,j,Z,N),G||u.free(H),new p(P,Ee,O[0],O[1],j,Z)}function g(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(P),typeof arguments[1]=="number")return x(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var T=arguments[1],z=v(T)?T:T.raw;if(z)return C(P,z,T.width|0,T.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(T.shape&&T.data&&T.stride)return M(P,T)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(i,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(S,L,x,C){for(var M=S.points,g=S.velocities,P=S.divergences,T=[],z=[],O=[],V=[],G=[],Z=[],j=0,N=0,H=l.create(),te=l.create(),oe=8,_e=0;_e0)for(var ie=0;ieL)return C-1}return C},d=function(S,L,x){return Sx?x:S},v=function(S,L,x){var C=L.vectors,M=L.meshgrid,g=S[0],P=S[1],T=S[2],z=M[0].length,O=M[1].length,V=M[2].length,G=h(M[0],g),Z=h(M[1],P),j=h(M[2],T),N=G+1,H=Z+1,te=j+1;if(G=d(G,0,z-1),N=d(N,0,z-1),Z=d(Z,0,O-1),H=d(H,0,O-1),j=d(j,0,V-1),te=d(te,0,V-1),G<0||Z<0||j<0||N>z-1||H>O-1||te>V-1)return s.create();var oe=M[0][G],_e=M[0][N],Ee=M[1][Z],Ce=M[1][H],me=M[2][j],ie=M[2][te],Se=(g-oe)/(_e-oe),Le=(P-Ee)/(Ce-Ee),Ae=(T-me)/(ie-me);isFinite(Se)||(Se=.5),isFinite(Le)||(Le=.5),isFinite(Ae)||(Ae=.5);var Fe,Pe,ge,Re,ce,Ze;switch(x.reversedX&&(G=z-1-G,N=z-1-N),x.reversedY&&(Z=O-1-Z,H=O-1-H),x.reversedZ&&(j=V-1-j,te=V-1-te),x.filled){case 5:ce=j,Ze=te,ge=Z*V,Re=H*V,Fe=G*V*O,Pe=N*V*O;break;case 4:ce=j,Ze=te,Fe=G*V,Pe=N*V,ge=Z*V*z,Re=H*V*z;break;case 3:ge=Z,Re=H,ce=j*O,Ze=te*O,Fe=G*O*V,Pe=N*O*V;break;case 2:ge=Z,Re=H,Fe=G*O,Pe=N*O,ce=j*O*z,Ze=te*O*z;break;case 1:Fe=G,Pe=N,ce=j*z,Ze=te*z,ge=Z*z*V,Re=H*z*V;break;default:Fe=G,Pe=N,ge=Z*z,Re=H*z,ce=j*z*O,Ze=te*z*O;break}var ut=C[Fe+ge+ce],pt=C[Fe+ge+Ze],Zt=C[Fe+Re+ce],st=C[Fe+Re+Ze],lt=C[Pe+ge+ce],Gt=C[Pe+ge+Ze],Nt=C[Pe+Re+ce],Jt=C[Pe+Re+Ze],sr=s.create(),wr=s.create(),cr=s.create(),$e=s.create();s.lerp(sr,ut,lt,Se),s.lerp(wr,pt,Gt,Se),s.lerp(cr,Zt,Nt,Se),s.lerp($e,st,Jt,Se);var St=s.create(),Qt=s.create();s.lerp(St,sr,cr,Le),s.lerp(Qt,wr,$e,Le);var Vt=s.create();return s.lerp(Vt,St,Qt,Ae),Vt},_=function(S,L){var x=L[0],C=L[1],M=L[2];return S[0]=x<0?-x:x,S[1]=C<0?-C:C,S[2]=M<0?-M:M,S},b=function(S){var L=1/0;S.sort(function(g,P){return g-P});for(var x=S.length,C=1;CN||JtH||srte)},_e=s.distance(L[0],L[1]),Ee=10*_e/C,Ce=Ee*Ee,me=1,ie=0,Se=x.length;Se>1&&(me=p(x));for(var Le=0;Leie&&(ie=ut),ce.push(ut),V.push({points:Fe,velocities:Pe,divergences:ce});for(var pt=0;ptCe&&s.scale(Zt,Zt,Ee/Math.sqrt(st)),s.add(Zt,Zt,Ae),ge=z(Zt),s.squaredDistance(Re,Zt)-Ce>-1e-4*Ce){Fe.push(Zt),Re=Zt,Pe.push(ge);var Ze=O(Zt,ge),ut=s.length(Ze);isFinite(ut)&&ut>ie&&(ie=ut),ce.push(ut)}Ae=Zt}}var lt=f(V,S.colormap,ie,me);return g?lt.tubeScale=g:(ie===0&&(ie=1),lt.tubeScale=M*.5*me/ie),lt};var k=o(6740),E=o(6405).createMesh;i.exports.createTubeMesh=function(S,L){return E(S,L,{shaders:k,traceType:"streamtube"})}},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(i,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,_){if(s(v))return _?h(v,d(_)):[v[0].clone(),v[1].clone()];var b=0,p,k;if(l(v))p=v.clone();else if(typeof v=="string")p=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))p=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;p=u(v)}}if(s(_))p.mul(_[1]),k=_[0].clone();else if(l(_))k=_.clone();else if(typeof _=="string")k=c(_);else if(!_)k=u(1);else if(_===Math.floor(_))k=u(_);else{for(;_!==Math.floor(_);)_=_*Math.pow(2,256),b+=256;k=u(_)}return b>0?p=p.ushln(b):b<0&&(k=k.ushln(-b)),f(p,k)}},7894:function(i){i.exports=a;function a(o){return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},8105:function(i){"use strict";i.exports=o;var a={"lo===p0":s,"lo=p0)&&!(p1>=hi)":d};function o(v){return a[v]}function s(v,_,b,p,k,E,S){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,T=b;p>T;++T,x+=L){var z=k[x+g];if(z===S)if(M===T)M+=1,C+=L;else{for(var O=0;L>O;++O){var V=k[x+O];k[x+O]=k[C],k[C++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function l(v,_,b,p,k,E,S){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,T=b;p>T;++T,x+=L){var z=k[x+g];if(zO;++O){var V=k[x+O];k[x+O]=k[C],k[C++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function u(v,_,b,p,k,E,S){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,T=b;p>T;++T,x+=L){var z=k[x+P];if(z<=S)if(M===T)M+=1,C+=L;else{for(var O=0;L>O;++O){var V=k[x+O];k[x+O]=k[C],k[C++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function c(v,_,b,p,k,E,S){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,T=b;p>T;++T,x+=L){var z=k[x+P];if(z<=S)if(M===T)M+=1,C+=L;else{for(var O=0;L>O;++O){var V=k[x+O];k[x+O]=k[C],k[C++]=V}var G=E[T];E[T]=E[M],E[M++]=G}}return M}function f(v,_,b,p,k,E,S){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,T=b;p>T;++T,x+=L){var z=k[x+g],O=k[x+P];if(z<=S&&S<=O)if(M===T)M+=1,C+=L;else{for(var V=0;L>V;++V){var G=k[x+V];k[x+V]=k[C],k[C++]=G}var Z=E[T];E[T]=E[M],E[M++]=Z}}return M}function h(v,_,b,p,k,E,S){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,T=b;p>T;++T,x+=L){var z=k[x+g],O=k[x+P];if(zV;++V){var G=k[x+V];k[x+V]=k[C],k[C++]=G}var Z=E[T];E[T]=E[M],E[M++]=Z}}return M}function d(v,_,b,p,k,E,S,L){for(var x=2*v,C=x*b,M=C,g=b,P=_,T=v+_,z=b;p>z;++z,C+=x){var O=k[C+P],V=k[C+T];if(!(O>=S)&&!(L>=V))if(g===z)g+=1,M+=x;else{for(var G=0;x>G;++G){var Z=k[C+G];k[C+G]=k[M],k[M++]=Z}var j=E[z];E[z]=E[g],E[g++]=j}}return g}},8107:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}},8116:function(i,a,o){"use strict";var s=o(7518),l=o(870);function u(f){this.bindVertexArrayOES=f.bindVertexArray.bind(f),this.createVertexArrayOES=f.createVertexArray.bind(f),this.deleteVertexArrayOES=f.deleteVertexArray.bind(f)}function c(f,h,d,v){var _=f.createVertexArray?new u(f):f.getExtension("OES_vertex_array_object"),b;return _?b=s(f,_):b=l(f),b.update(h,d,v),b}i.exports=c},8192:function(i,a,o){i.exports=c;var s=o(2825),l=o(3536),u=o(244);function c(f,h){var d=s(f[0],f[1],f[2]),v=s(h[0],h[1],h[2]);l(d,d),l(v,v);var _=u(d,v);return _>1?0:Math.acos(_)}},8210:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],l[0]);var f=u+c,h=new Array(f),d=0,v=0,_=0,b=Math.abs,p=s[v],k=b(p),E=l[_],S=b(E),L,x;k=c?(L=p,v+=1,vd)for(var z=h[p],O=1/Math.sqrt(M*P),T=0;T<3;++T){var V=(T+1)%3,G=(T+2)%3;z[T]+=O*(g[V]*C[G]-g[G]*C[V])}}for(var v=0;vd)for(var O=1/Math.sqrt(Z),T=0;T<3;++T)z[T]*=O;else for(var T=0;T<3;++T)z[T]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,v=0;vd?L=1/Math.sqrt(L):L=0;for(var p=0;p<3;++p)S[p]*=L;h[v]=S}return h}},8418:function(i,a,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),v=o(5964),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=ArrayBuffer,p=DataView;function k(Ae){return b.isView(Ae)&&!(Ae instanceof p)}function E(Ae){return Array.isArray(Ae)||k(Ae)}i.exports=Le;function S(Ae,Fe){var Pe=Ae[0],ge=Ae[1],Re=Ae[2],ce=Ae[3];return Ae[0]=Fe[0]*Pe+Fe[4]*ge+Fe[8]*Re+Fe[12]*ce,Ae[1]=Fe[1]*Pe+Fe[5]*ge+Fe[9]*Re+Fe[13]*ce,Ae[2]=Fe[2]*Pe+Fe[6]*ge+Fe[10]*Re+Fe[14]*ce,Ae[3]=Fe[3]*Pe+Fe[7]*ge+Fe[11]*Re+Fe[15]*ce,Ae}function L(Ae,Fe,Pe,ge){return S(ge,ge,Pe),S(ge,ge,Fe),S(ge,ge,Ae)}function x(Ae,Fe){this.index=Ae,this.dataCoordinate=this.position=Fe}function C(Ae){return Ae===!0||Ae>1?1:Ae}function M(Ae,Fe,Pe,ge,Re,ce,Ze,ut,pt,Zt,st,lt){this.gl=Ae,this.pixelRatio=1,this.shader=Fe,this.orthoShader=Pe,this.projectShader=ge,this.pointBuffer=Re,this.colorBuffer=ce,this.glyphBuffer=Ze,this.idBuffer=ut,this.vao=pt,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=Zt,this.pickOrthoShader=st,this.pickProjectShader=lt,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var g=M.prototype;g.pickSlots=1,g.setPickBase=function(Ae){this.pickId=Ae},g.isTransparent=function(){if(this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&this.projectHasAlpha)return!0;return!1},g.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&!this.projectHasAlpha)return!0;return!1};var P=[0,0],T=[0,0,0],z=[0,0,0],O=[0,0,0,1],V=[0,0,0,1],G=_.slice(),Z=[0,0,0],j=[[0,0,0],[0,0,0]];function N(Ae){return Ae[0]=Ae[1]=Ae[2]=0,Ae}function H(Ae,Fe){return Ae[0]=Fe[0],Ae[1]=Fe[1],Ae[2]=Fe[2],Ae[3]=1,Ae}function te(Ae,Fe,Pe,ge){return Ae[0]=Fe[0],Ae[1]=Fe[1],Ae[2]=Fe[2],Ae[Pe]=ge,Ae}function oe(Ae){for(var Fe=j,Pe=0;Pe<2;++Pe)for(var ge=0;ge<3;++ge)Fe[Pe][ge]=Math.max(Math.min(Ae[Pe][ge],1e8),-1e8);return Fe}function _e(Ae,Fe,Pe,ge){var Re=Fe.axesProject,ce=Fe.gl,Ze=Ae.uniforms,ut=Pe.model||_,pt=Pe.view||_,Zt=Pe.projection||_,st=Fe.axesBounds,lt=oe(Fe.clipBounds),Gt;Fe.axes&&Fe.axes.lastCubeProps?Gt=Fe.axes.lastCubeProps.axis:Gt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,Ae.bind(),Ze.view=pt,Ze.projection=Zt,Ze.screenSize=P,Ze.highlightId=Fe.highlightId,Ze.highlightScale=Fe.highlightScale,Ze.clipBounds=lt,Ze.pickGroup=Fe.pickId/255,Ze.pixelRatio=ge;for(var Nt=0;Nt<3;++Nt)if(Re[Nt]){Ze.scale=Fe.projectScale[Nt],Ze.opacity=Fe.projectOpacity[Nt];for(var Jt=G,sr=0;sr<16;++sr)Jt[sr]=0;for(var sr=0;sr<4;++sr)Jt[5*sr]=1;Jt[5*Nt]=0,Gt[Nt]<0?Jt[12+Nt]=st[0][Nt]:Jt[12+Nt]=st[1][Nt],f(Jt,ut,Jt),Ze.model=Jt;var wr=(Nt+1)%3,cr=(Nt+2)%3,$e=N(T),St=N(z);$e[wr]=1,St[cr]=1;var Qt=L(Zt,pt,ut,H(O,$e)),Vt=L(Zt,pt,ut,H(V,St));if(Math.abs(Qt[1])>Math.abs(Vt[1])){var _t=Qt;Qt=Vt,Vt=_t,_t=$e,$e=St,St=_t;var It=wr;wr=cr,cr=It}Qt[0]<0&&($e[wr]=-1),Vt[1]>0&&(St[cr]=-1);for(var mt=0,er=0,sr=0;sr<4;++sr)mt+=Math.pow(ut[4*wr+sr],2),er+=Math.pow(ut[4*cr+sr],2);$e[wr]/=Math.sqrt(mt),St[cr]/=Math.sqrt(er),Ze.axes[0]=$e,Ze.axes[1]=St,Ze.fragClipBounds[0]=te(Z,lt[0],Nt,-1e8),Ze.fragClipBounds[1]=te(Z,lt[1],Nt,1e8),Fe.vao.bind(),Fe.vao.draw(ce.TRIANGLES,Fe.vertexCount),Fe.lineWidth>0&&(ce.lineWidth(Fe.lineWidth*ge),Fe.vao.draw(ce.LINES,Fe.lineVertexCount,Fe.vertexCount)),Fe.vao.unbind()}}var Ee=[-1e8,-1e8,-1e8],Ce=[1e8,1e8,1e8],me=[Ee,Ce];function ie(Ae,Fe,Pe,ge,Re,ce,Ze){var ut=Pe.gl;if((ce===Pe.projectHasAlpha||Ze)&&_e(Fe,Pe,ge,Re),ce===Pe.hasAlpha||Ze){Ae.bind();var pt=Ae.uniforms;pt.model=ge.model||_,pt.view=ge.view||_,pt.projection=ge.projection||_,P[0]=2/ut.drawingBufferWidth,P[1]=2/ut.drawingBufferHeight,pt.screenSize=P,pt.highlightId=Pe.highlightId,pt.highlightScale=Pe.highlightScale,pt.fragClipBounds=me,pt.clipBounds=Pe.axes.bounds,pt.opacity=Pe.opacity,pt.pickGroup=Pe.pickId/255,pt.pixelRatio=Re,Pe.vao.bind(),Pe.vao.draw(ut.TRIANGLES,Pe.vertexCount),Pe.lineWidth>0&&(ut.lineWidth(Pe.lineWidth*Re),Pe.vao.draw(ut.LINES,Pe.lineVertexCount,Pe.vertexCount)),Pe.vao.unbind()}}g.draw=function(Ae){var Fe=this.useOrtho?this.orthoShader:this.shader;ie(Fe,this.projectShader,this,Ae,this.pixelRatio,!1,!1)},g.drawTransparent=function(Ae){var Fe=this.useOrtho?this.orthoShader:this.shader;ie(Fe,this.projectShader,this,Ae,this.pixelRatio,!0,!1)},g.drawPick=function(Ae){var Fe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(Fe,this.pickProjectShader,this,Ae,1,!0,!0)},g.pick=function(Ae){if(!Ae||Ae.id!==this.pickId)return null;var Fe=Ae.value[2]+(Ae.value[1]<<8)+(Ae.value[0]<<16);if(Fe>=this.pointCount||Fe<0)return null;var Pe=this.points[Fe],ge=this._selectResult;ge.index=Fe;for(var Re=0;Re<3;++Re)ge.position[Re]=ge.dataCoordinate[Re]=Pe[Re];return ge},g.highlight=function(Ae){if(!Ae)this.highlightId=[1,1,1,1];else{var Fe=Ae.index,Pe=Fe&255,ge=Fe>>8&255,Re=Fe>>16&255;this.highlightId=[Pe/255,ge/255,Re/255,0]}};function Se(Ae,Fe,Pe,ge){var Re;E(Ae)?Fe0){var Vr=0,dt=cr,Ge=[0,0,0,1],Je=[0,0,0,1],je=E(Gt)&&E(Gt[0]),tt=E(sr)&&E(sr[0]);e:for(var ge=0;ge0?1-er[0][0]:ar<0?1+er[1][0]:1,vr*=vr>0?1-er[0][1]:vr<0?1+er[1][1]:1;for(var ii=[ar,vr],In=It.cells||[],wi=It.positions||[],Vt=0;Vt=c?(L=p,v+=1,v0?1:0}},8648:function(i,a,o){i.exports=o(783)},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=c+h*_-d*v,o[1]=f+h*v+d*_,o[2]=s[2],o}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},8731:function(i,a,o){"use strict";i.exports=d;var s=o(8866);function l(v,_,b,p,k,E){this._gl=v,this._wrapper=_,this._index=b,this._locations=p,this._dimension=k,this._constFunc=E}var u=l.prototype;u.pointer=function(_,b,p,k){var E=this,S=E._gl,L=E._locations[E._index];S.vertexAttribPointer(L,E._dimension,_||S.FLOAT,!!b,p||0,k||0),S.enableVertexAttribArray(L)},u.set=function(v,_,b,p){return this._constFunc(this._locations[this._index],v,_,b,p)},Object.defineProperty(u,"location",{get:function(){return this._locations[this._index]},set:function(v){return v!==this._locations[this._index]&&(this._locations[this._index]=v|0,this._wrapper.program=null),v|0}});var c=[function(v,_,b){return b.length===void 0?v.vertexAttrib1f(_,b):v.vertexAttrib1fv(_,b)},function(v,_,b,p){return b.length===void 0?v.vertexAttrib2f(_,b,p):v.vertexAttrib2fv(_,b)},function(v,_,b,p,k){return b.length===void 0?v.vertexAttrib3f(_,b,p,k):v.vertexAttrib3fv(_,b)},function(v,_,b,p,k,E){return b.length===void 0?v.vertexAttrib4f(_,b,p,k,E):v.vertexAttrib4fv(_,b)}];function f(v,_,b,p,k,E,S){var L=c[k],x=new l(v,_,b,p,k,L);Object.defineProperty(E,S,{set:function(C){return v.disableVertexAttribArray(p[b]),L(v,p[b],C),C},get:function(){return x},enumerable:!0})}function h(v,_,b,p,k,E,S){for(var L=new Array(k),x=new Array(k),C=0;C=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);f(v,_,M[0],p,g,k,x)}else if(C.indexOf("mat")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);h(v,_,M,p,g,k,x)}else throw new s("","Unknown data type for attribute "+x+": "+C);break}}return k}},8828:function(i,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,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;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}},8866:function(i){function a(o,s,l){this.shortMessage=s||"",this.longMessage=l||"",this.rawError=o||"",this.message="gl-shader: "+(s||o||"")+(l?` `+l:""),this.stack=new Error().stack}a.prototype=new Error,a.prototype.name="GLError",a.prototype.constructor=a,i.exports=a},8902:function(i,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=S;function h(L,x,C,M,g){this.a=L,this.b=x,this.idx=C,this.lowerIds=M,this.upperIds=g}function d(L,x,C,M){this.a=L,this.b=x,this.type=C,this.idx=M}function v(L,x){var C=L.a[0]-x.a[0]||L.a[1]-x.a[1]||L.type-x.type;return C||L.type!==u&&(C=l(L.a,L.b,x.b),C)?C:L.idx-x.idx}function _(L,x){return l(L.a,L.b,x)}function b(L,x,C,M,g){for(var P=s.lt(x,M,_),T=s.gt(x,M,_),z=P;z1&&l(C[V[Z-2]],C[V[Z-1]],M)>0;)L.push([V[Z-1],V[Z-2],g]),Z-=1;V.length=Z,V.push(g);for(var G=O.upperIds,Z=G.length;Z>1&&l(C[G[Z-2]],C[G[Z-1]],M)<0;)L.push([G[Z-2],G[Z-1],g]),Z-=1;G.length=Z,G.push(g)}}function p(L,x){var C;return L.a[0]O[0]&&g.push(new d(O,z,f,P),new d(z,O,c,P))}g.sort(v);for(var V=g[0].a[0]-(1+Math.abs(g[0].a[0]))*Math.pow(2,-52),G=[new h([V,1],[V,0],-1,[],[],[],[])],Z=[],P=0,j=g.length;P0;){k=M.pop();for(var g=k.adjacent,P=0;P<=S;++P){var T=g[P];if(!(!T.boundary||T.lastVisited<=-L)){for(var z=T.vertices,O=0;O<=S;++O){var V=z[O];V<0?x[O]=E:x[O]=C[V]}var G=this.orient();if(G>0)return T;T.lastVisited=-L,G===0&&M.push(T)}}}return null},b.walk=function(k,E){var S=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,M=E?this.interior.length*Math.random()|0:this.interior.length-1,g=this.interior[M];e:for(;!g.boundary;){for(var P=g.vertices,T=g.adjacent,z=0;z<=L;++z)C[z]=x[P[z]];g.lastVisited=S;for(var z=0;z<=L;++z){var O=T[z];if(!(O.lastVisited>=S)){var V=C[z];C[z]=k;var G=this.orient();if(C[z]=V,G<0){g=O;continue e}else O.boundary?O.lastVisited=-S:O.lastVisited=S}}return}return g},b.addPeaks=function(k,E){var S=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,M=this.interior,g=this.simplices,P=[E];E.lastVisited=S,E.vertices[E.vertices.indexOf(-1)]=S,E.boundary=!1,M.push(E);for(var T=[];P.length>0;){var E=P.pop(),z=E.vertices,O=E.adjacent,V=z.indexOf(S);if(!(V<0)){for(var G=0;G<=L;++G)if(G!==V){var Z=O[G];if(!(!Z.boundary||Z.lastVisited>=S)){var j=Z.vertices;if(Z.lastVisited!==-S){for(var N=0,H=0;H<=L;++H)j[H]<0?(N=H,C[H]=k):C[H]=x[j[H]];var te=this.orient();if(te>0){j[N]=S,Z.boundary=!1,M.push(Z),P.push(Z),Z.lastVisited=S;continue}else Z.lastVisited=-S}var oe=Z.adjacent,_e=z.slice(),Ee=O.slice(),Ce=new u(_e,Ee,!0);g.push(Ce);var me=oe.indexOf(E);if(!(me<0)){oe[me]=Ce,Ee[V]=Z,_e[G]=-1,Ee[G]=E,O[G]=Ce,Ce.flip();for(var H=0;H<=L;++H){var ie=_e[H];if(!(ie<0||ie===S)){for(var Se=new Array(L-1),Le=0,Ae=0;Ae<=L;++Ae){var Fe=_e[Ae];Fe<0||Ae===H||(Se[Le++]=Fe)}T.push(new c(Se,Ce,H))}}}}}}}T.sort(f);for(var G=0;G+1=0?M[P++]=g[z]:T=z&1;if(T===(k&1)){var O=M[0];M[0]=M[1],M[1]=O}E.push(M)}}return E};function p(k,E){var S=k.length;if(S===0)throw new Error("Must have at least d+1 points");var L=k[0].length;if(S<=L)throw new Error("Must input at least d+1 points");var x=k.slice(0,L+1),C=s.apply(void 0,x);if(C===0)throw new Error("Input not in general position");for(var M=new Array(L+1),g=0;g<=L;++g)M[g]=g;C<0&&(M[0]=1,M[1]=0);for(var P=new u(M,new Array(L+1),!1),T=P.adjacent,z=new Array(L+2),g=0;g<=L;++g){for(var O=M.slice(),V=0;V<=L;++V)V===g&&(O[V]=-1);var G=O[0];O[0]=O[1],O[1]=G;var Z=new u(O,new Array(L+1),!0);T[g]=Z,z[g]=Z}z[L+1]=P;for(var g=0;g<=L;++g)for(var O=T[g].vertices,j=T[g].adjacent,V=0;V<=L;++V){var N=O[V];if(N<0){j[V]=P;continue}for(var H=0;H<=L;++H)T[H].vertices.indexOf(N)<0&&(j[V]=T[H])}for(var te=new _(L,x,z),oe=!!E,g=L+1;g=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(C){this.pickId=C};function k(C){for(var M=v({colormap:C,nshades:256,format:"rgba"}),g=new Uint8Array(256*4),P=0;P<256;++P){for(var T=M[P],z=0;z<3;++z)g[4*P+z]=T[z];g[4*P+3]=T[3]*255}return d(g,[256,256,4],[4,0,1])}function E(C){for(var M=C.length,g=new Array(M),P=0;P0){var H=this.triShader;H.bind(),H.uniforms=V,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},p.drawPick=function(C){C=C||{};for(var M=this.gl,g=C.model||_,P=C.view||_,T=C.projection||_,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)z[0][O]=Math.max(z[0][O],this.clipBounds[0][O]),z[1][O]=Math.min(z[1][O],this.clipBounds[1][O]);this._model=[].slice.call(g),this._view=[].slice.call(P),this._projection=[].slice.call(T),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var V={model:g,view:P,projection:T,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},G=this.pickShader;G.bind(),G.uniforms=V,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},p.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],g=this.cells[M],P=this.positions[g[1]].slice(0,3),T={position:P,dataCoordinate:P,index:Math.floor(g[1]/48)};return this.traceType==="cone"?T.index=Math.floor(g[1]/48):this.traceType==="streamtube"&&(T.intensity=this.intensity[g[1]],T.velocity=this.vectors[g[1]].slice(0,3),T.divergence=this.vectors[g[1]][3],T.index=M),T},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function S(C,M){var g=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return g.attributes.position.location=0,g.attributes.color.location=2,g.attributes.uv.location=3,g.attributes.vector.location=4,g}function L(C,M){var g=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return g.attributes.position.location=0,g.attributes.id.location=1,g.attributes.vector.location=4,g}function x(C,M,g){var P=g.shaders;arguments.length===1&&(M=C,C=M.gl);var T=S(C,P),z=L(C,P),O=c(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=C.LINEAR_MIPMAP_LINEAR,O.magFilter=C.LINEAR;var V=l(C),G=l(C),Z=l(C),j=l(C),N=l(C),H=u(C,[{buffer:V,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Z,type:C.FLOAT,size:4},{buffer:j,type:C.FLOAT,size:2},{buffer:G,type:C.FLOAT,size:4}]),te=new b(C,O,T,z,V,G,N,Z,j,H,g.traceType||"cone");return te.update(M),te}i.exports=x},9127:function(i,a,o){"use strict";i.exports=u;var s=o(6204),l=o(5771);function u(c){return l(s(c))}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,E,S){this.gl=p,this.shader=S,this.buffer=k,this.vao=E,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(p){var k=this.gl,E=this.shader.uniforms;this.shader.bind();var S=E.view=p.view||c,L=E.projection=p.projection||c;E.model=p.model||c,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var x=S[12],C=S[13],M=S[14],g=S[15],P=p._ortho||!1,T=P?2:1,z=T*this.pixelRatio*(L[3]*x+L[7]*C+L[11]*M+L[15]*g)/k.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)k.lineWidth(this.lineWidth[O]*this.pixelRatio),E.capSize=this.capSize[O]*z,this.lineCount[O]&&k.drawArrays(k.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function d(p,k){for(var E=0;E<3;++E)p[0][E]=Math.min(p[0][E],k[E]),p[1][E]=Math.max(p[1][E],k[E])}var v=function(){for(var p=new Array(3),k=0;k<3;++k){for(var E=[],S=1;S<=2;++S)for(var L=-1;L<=1;L+=2){var x=(S+k)%3,C=[0,0,0];C[x]=L,E.push(C)}p[k]=E}return p}();function _(p,k,E,S){for(var L=v[S],x=0;x0){var V=P.slice();V[M]+=z[1][M],L.push(P[0],P[1],P[2],O[0],O[1],O[2],O[3],0,0,0,V[0],V[1],V[2],O[0],O[1],O[2],O[3],0,0,0),d(this.bounds,V),C+=2+_(L,V,O,M)}}}this.lineCount[M]=C-this.lineOffset[M]}this.buffer.update(L)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(p){var k=p.gl,E=s(k),S=l(k,[{buffer:E,type:k.FLOAT,size:3,offset:0,stride:40},{buffer:E,type:k.FLOAT,size:4,offset:12,stride:40},{buffer:E,type:k.FLOAT,size:3,offset:28,stride:40}]),L=u(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var x=new f(k,E,S,L);return x.update(p),x}},9215:function(i,a,o){"use strict";i.exports=d;var s=o(4769),l=o(2478);function u(v,_,b){return Math.min(_,Math.max(v,b))}function c(v,_,b){this.dimension=v.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var p=0;p=b-1)for(var C=E.length-1,g=v-_[b-1],M=0;M=b-1)for(var x=E.length-1,C=v-_[b-1],M=0;M=0;--b)if(v[--_])return!1;return!0},f.jump=function(v){var _=this.lastT(),b=this.dimension;if(!(v<_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,S=this.bounds,L=S[0],x=S[1];this._time.push(_,v);for(var C=0;C<2;++C)for(var M=0;M0;--M)p.push(u(L[M-1],x[M-1],arguments[M])),k.push(0)}},f.push=function(v){var _=this.lastT(),b=this.dimension;if(!(v<_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,S=v-_,L=this.bounds,x=L[0],C=L[1],M=S>1e-6?1/S:0;this._time.push(v);for(var g=b;g>0;--g){var P=u(x[g-1],C[g-1],arguments[g]);p.push(P),k.push((P-p[E++])*M)}}},f.set=function(v){var _=this.dimension;if(!(v0;--L)b.push(u(E[L-1],S[L-1],arguments[L])),p.push(0)}},f.move=function(v){var _=this.lastT(),b=this.dimension;if(!(v<=_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,S=this.bounds,L=S[0],x=S[1],C=v-_,M=C>1e-6?1/C:0;this._time.push(v);for(var g=b;g>0;--g){var P=arguments[g];p.push(u(L[g-1],x[g-1],p[E++]+P)),k.push(P*M)}}},f.idle=function(v){var _=this.lastT();if(!(v<_)){var b=this.dimension,p=this._state,k=this._velocity,E=p.length-b,S=this.bounds,L=S[0],x=S[1],C=v-_;this._time.push(v);for(var M=b-1;M>=0;--M)p.push(u(L[M],x[M],p[E]+C*k[E])),k.push(0),E+=1}};function h(v){for(var _=new Array(v),b=0;b1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},9346:function(i){"use strict";var a=new Float64Array(4),o=new Float64Array(4),s=new Float64Array(4);function l(u,c,f,h,d){a.length=_?(g=1,T=_+2*k+S):(g=-k/_,T=k*g+S)):(g=0,E>=0?(P=0,T=S):-E>=p?(P=1,T=p+2*E+S):(P=-E/p,T=E*P+S));else if(P<0)P=0,k>=0?(g=0,T=S):-k>=_?(g=1,T=_+2*k+S):(g=-k/_,T=k*g+S);else{var z=1/M;g*=z,P*=z,T=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+S}else{var O,V,G,Z;g<0?(O=b+k,V=p+E,V>O?(G=V-O,Z=_-2*b+p,G>=Z?(g=1,P=0,T=_+2*k+S):(g=G/Z,P=1-g,T=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+S)):(g=0,V<=0?(P=1,T=p+2*E+S):E>=0?(P=0,T=S):(P=-E/p,T=E*P+S))):P<0?(O=b+E,V=_+k,V>O?(G=V-O,Z=_-2*b+p,G>=Z?(P=1,g=0,T=p+2*E+S):(P=G/Z,g=1-P,T=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+S)):(P=0,V<=0?(g=1,T=_+2*k+S):k>=0?(g=0,T=S):(g=-k/_,T=k*g+S))):(G=p+E-b-k,G<=0?(g=0,P=1,T=p+2*E+S):(Z=_-2*b+p,G>=Z?(g=1,P=0,T=_+2*k+S):(g=G/Z,P=1-g,T=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+S)))}for(var j=1-g-P,v=0;vE)for(p=E;pk)for(p=k;p=0){for(var j=Z.type.charAt(Z.type.length-1)|0,N=new Array(j),H=0;H=0;)te+=1;V[G]=te}var oe=new Array(E.length);function _e(){x.program=c.program(C,x._vref,x._fref,O,V);for(var Ee=0;EePe&&Re>0){var ce=(ge[Re][0]-Pe)/(ge[Re][0]-ge[Re-1][0]);return ge[Re][1]*(1-ce)+ce*ge[Re-1][1]}}return 1}var H=[0,0,0],te={showSurface:!1,showContour:!1,projections:[T.slice(),T.slice(),T.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function oe(Pe,ge){var Re,ce,Ze,ut=ge.axes&&ge.axes.lastCubeProps.axis||H,pt=ge.showSurface,Zt=ge.showContour;for(Re=0;Re<3;++Re)for(pt=pt||ge.surfaceProject[Re],ce=0;ce<3;++ce)Zt=Zt||ge.contourProject[Re][ce];for(Re=0;Re<3;++Re){var st=te.projections[Re];for(ce=0;ce<16;++ce)st[ce]=0;for(ce=0;ce<4;++ce)st[5*ce]=1;st[5*Re]=0,st[12+Re]=ge.axesBounds[+(ut[Re]>0)][Re],p(st,Pe.model,st);var lt=te.clipBounds[Re];for(Ze=0;Ze<2;++Ze)for(ce=0;ce<3;++ce)lt[Ze][ce]=Pe.clipBounds[Ze][ce];lt[0][Re]=-1e8,lt[1][Re]=1e8}return te.showSurface=pt,te.showContour=Zt,te}var _e={model:T,view:T,projection:T,inverseModel:T.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},Ee=T.slice(),Ce=[1,0,0,0,1,0,0,0,1];function me(Pe,ge){Pe=Pe||{};var Re=this.gl;Re.disable(Re.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Pe.model||T,ce.view=Pe.view||T,ce.projection=Pe.projection||T,ce.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ce.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ce.objectOffset=this.objectOffset,ce.contourColor=this.contourColor[0],ce.inverseModel=k(ce.inverseModel,ce.model);for(var Ze=0;Ze<2;++Ze)for(var ut=ce.clipBounds[Ze],pt=0;pt<3;++pt)ut[pt]=Math.min(Math.max(this.clipBounds[Ze][pt],-1e8),1e8);ce.kambient=this.ambientLight,ce.kdiffuse=this.diffuseLight,ce.kspecular=this.specularLight,ce.roughness=this.roughness,ce.fresnel=this.fresnel,ce.opacity=this.opacity,ce.height=0,ce.permutation=Ce,ce.vertexColor=this.vertexColor;var Zt=Ee;for(p(Zt,ce.view,ce.model),p(Zt,ce.projection,Zt),k(Zt,Zt),Ze=0;Ze<3;++Ze)ce.eyePosition[Ze]=Zt[12+Ze]/Zt[15];var st=Zt[15];for(Ze=0;Ze<3;++Ze)st+=this.lightPosition[Ze]*Zt[4*Ze+3];for(Ze=0;Ze<3;++Ze){var lt=Zt[12+Ze];for(pt=0;pt<3;++pt)lt+=Zt[4*pt+Ze]*this.lightPosition[pt];ce.lightPosition[Ze]=lt/st}var Gt=oe(ce,this);if(Gt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Re.TRIANGLES,this._vertexCount),Ze=0;Ze<3;++Ze)!this.surfaceProject[Ze]||!this.vertexCount||(this._shader.uniforms.model=Gt.projections[Ze],this._shader.uniforms.clipBounds=Gt.clipBounds[Ze],this._vao.draw(Re.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Gt.showContour){var Nt=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,Nt.bind(),Nt.uniforms=ce;var Jt=this._contourVAO;for(Jt.bind(),Ze=0;Ze<3;++Ze)for(Nt.uniforms.permutation=O[Ze],Re.lineWidth(this.contourWidth[Ze]*this.pixelRatio),pt=0;pt>4)/16)/255,Ze=Math.floor(ce),ut=ce-Ze,pt=ge[1]*(Pe.value[1]+(Pe.value[2]&15)/16)/255,Zt=Math.floor(pt),st=pt-Zt;Ze+=1,Zt+=1;var lt=Re.position;lt[0]=lt[1]=lt[2]=0;for(var Gt=0;Gt<2;++Gt)for(var Nt=Gt?ut:1-ut,Jt=0;Jt<2;++Jt)for(var sr=Jt?st:1-st,wr=Ze+Gt,cr=Zt+Jt,$e=Nt*sr,St=0;St<3;++St)lt[St]+=this._field[St].get(wr,cr)*$e;for(var Qt=this._pickResult.level,Vt=0;Vt<3;++Vt)if(Qt[Vt]=E.le(this.contourLevels[Vt],lt[Vt]),Qt[Vt]<0)this.contourLevels[Vt].length>0&&(Qt[Vt]=0);else if(Qt[Vt]Math.abs(It-lt[Vt])&&(Qt[Vt]+=1)}for(Re.index[0]=ut<.5?Ze:Ze+1,Re.index[1]=st<.5?Zt:Zt+1,Re.uv[0]=ce/ge[0],Re.uv[1]=pt/ge[1],St=0;St<3;++St)Re.dataCoordinate[St]=this._field[St].get(Re.index[0],Re.index[1]);return Re},j.padField=function(Pe,ge){var Re=ge.shape.slice(),ce=Pe.shape.slice();d.assign(Pe.lo(1,1).hi(Re[0],Re[1]),ge),d.assign(Pe.lo(1).hi(Re[0],1),ge.hi(Re[0],1)),d.assign(Pe.lo(1,ce[1]-1).hi(Re[0],1),ge.lo(0,Re[1]-1).hi(Re[0],1)),d.assign(Pe.lo(0,1).hi(1,Re[1]),ge.hi(1)),d.assign(Pe.lo(ce[0]-1,1).hi(1,Re[1]),ge.lo(Re[0]-1)),Pe.set(0,0,ge.get(0,0)),Pe.set(0,ce[1]-1,ge.get(0,Re[1]-1)),Pe.set(ce[0]-1,0,ge.get(Re[0]-1,0)),Pe.set(ce[0]-1,ce[1]-1,ge.get(Re[0]-1,Re[1]-1))};function Se(Pe,ge){return Array.isArray(Pe)?[ge(Pe[0]),ge(Pe[1]),ge(Pe[2])]:[ge(Pe),ge(Pe),ge(Pe)]}function Le(Pe){return Array.isArray(Pe)?Pe.length===3?[Pe[0],Pe[1],Pe[2],1]:[Pe[0],Pe[1],Pe[2],Pe[3]]:[0,0,0,1]}function Ae(Pe){if(Array.isArray(Pe)){if(Array.isArray(Pe))return[Le(Pe[0]),Le(Pe[1]),Le(Pe[2])];var ge=Le(Pe);return[ge.slice(),ge.slice(),ge.slice()]}}j.update=function(Pe){Pe=Pe||{},this.objectOffset=Pe.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Pe&&(this.contourWidth=Se(Pe.contourWidth,Number)),"showContour"in Pe&&(this.showContour=Se(Pe.showContour,Boolean)),"showSurface"in Pe&&(this.showSurface=!!Pe.showSurface),"contourTint"in Pe&&(this.contourTint=Se(Pe.contourTint,Boolean)),"contourColor"in Pe&&(this.contourColor=Ae(Pe.contourColor)),"contourProject"in Pe&&(this.contourProject=Se(Pe.contourProject,function(yn){return Se(yn,Boolean)})),"surfaceProject"in Pe&&(this.surfaceProject=Pe.surfaceProject),"dynamicColor"in Pe&&(this.dynamicColor=Ae(Pe.dynamicColor)),"dynamicTint"in Pe&&(this.dynamicTint=Se(Pe.dynamicTint,Number)),"dynamicWidth"in Pe&&(this.dynamicWidth=Se(Pe.dynamicWidth,Number)),"opacity"in Pe&&(this.opacity=Pe.opacity),"opacityscale"in Pe&&(this.opacityscale=Pe.opacityscale),"colorBounds"in Pe&&(this.colorBounds=Pe.colorBounds),"vertexColor"in Pe&&(this.vertexColor=Pe.vertexColor?1:0),"colormap"in Pe&&this._colorMap.setPixels(this.genColormap(Pe.colormap,this.opacityscale));var ge=Pe.field||Pe.coords&&Pe.coords[2]||null,Re=!1;if(ge||(this._field[2].shape[0]||this._field[2].shape[2]?ge=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):ge=this._field[2].hi(0,0)),"field"in Pe||"coords"in Pe){var ce=(ge.shape[0]+2)*(ge.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=_(this._field[2].data,[ge.shape[0]+2,ge.shape[1]+2]),this.padField(this._field[2],ge),this.shape=ge.shape.slice();for(var Ze=this.shape,ut=0;ut<2;++ut)this._field[2].size>this._field[ut].data.length&&(f.freeFloat(this._field[ut].data),this._field[ut].data=f.mallocFloat(this._field[2].size)),this._field[ut]=_(this._field[ut].data,[Ze[0]+2,Ze[1]+2]);if(Pe.coords){var pt=Pe.coords;if(!Array.isArray(pt)||pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ut=0;ut<2;++ut){var Zt=pt[ut];for(Jt=0;Jt<2;++Jt)if(Zt.shape[Jt]!==Ze[Jt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ut],Zt)}}else if(Pe.ticks){var st=Pe.ticks;if(!Array.isArray(st)||st.length!==2)throw new Error("gl-surface: invalid ticks");for(ut=0;ut<2;++ut){var lt=st[ut];if((Array.isArray(lt)||lt.length)&&(lt=_(lt)),lt.shape[0]!==Ze[ut])throw new Error("gl-surface: invalid tick length");var Gt=_(lt.data,Ze);Gt.stride[ut]=lt.stride[0],Gt.stride[ut^1]=0,this.padField(this._field[ut],Gt)}}else{for(ut=0;ut<2;++ut){var Nt=[0,0];Nt[ut]=1,this._field[ut]=_(this._field[ut].data,[Ze[0]+2,Ze[1]+2],Nt,0)}this._field[0].set(0,0,0);for(var Jt=0;Jt0){for(var tn=0;tn<5;++tn)pi.pop();je-=1}continue e}}}In.push(je)}this._contourOffsets[$r]=ji,this._contourCounts[$r]=In}var fn=f.mallocFloat(pi.length);for(ut=0;ut=0&&(M=x|0,C+=P*M,g-=M),new E(this.data,g,P,C)},S.step=function(x){var C=this.shape[0],M=this.stride[0],g=this.offset,P=0,T=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(g+=M*(C-1),C=T(-C/P)):C=T(C/P),M*=P),new E(this.data,C,M,g)},S.transpose=function(x){x=x===void 0?0:x|0;var C=this.shape,M=this.stride;return new E(this.data,C[x],M[x],this.offset)},S.pick=function(x){var C=[],M=[],g=this.offset;typeof x=="number"&&x>=0?g=g+this.stride[0]*x|0:(C.push(this.shape[0]),M.push(this.stride[0]));var P=p[C.length+1];return P(this.data,C,M,g)},function(x,C,M,g){return new E(x,C[0],M[0],g)}},2:function(b,p,k){function E(L,x,C,M,g,P){this.data=L,this.shape=[x,C],this.stride=[M,g],this.offset=P|0}var S=E.prototype;return S.dtype=b,S.dimension=2,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(S,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),S.set=function(x,C,M){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]=M},S.get=function(x,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]},S.index=function(x,C){return this.offset+this.stride[0]*x+this.stride[1]*C},S.hi=function(x,C){return new E(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},S.lo=function(x,C){var M=this.offset,g=0,P=this.shape[0],T=this.shape[1],z=this.stride[0],O=this.stride[1];return typeof x=="number"&&x>=0&&(g=x|0,M+=z*g,P-=g),typeof C=="number"&&C>=0&&(g=C|0,M+=O*g,T-=g),new E(this.data,P,T,z,O,M)},S.step=function(x,C){var M=this.shape[0],g=this.shape[1],P=this.stride[0],T=this.stride[1],z=this.offset,O=0,V=Math.ceil;return typeof x=="number"&&(O=x|0,O<0?(z+=P*(M-1),M=V(-M/O)):M=V(M/O),P*=O),typeof C=="number"&&(O=C|0,O<0?(z+=T*(g-1),g=V(-g/O)):g=V(g/O),T*=O),new E(this.data,M,g,P,T,z)},S.transpose=function(x,C){x=x===void 0?0:x|0,C=C===void 0?1:C|0;var M=this.shape,g=this.stride;return new E(this.data,M[x],M[C],g[x],g[C],this.offset)},S.pick=function(x,C){var M=[],g=[],P=this.offset;typeof x=="number"&&x>=0?P=P+this.stride[0]*x|0:(M.push(this.shape[0]),g.push(this.stride[0])),typeof C=="number"&&C>=0?P=P+this.stride[1]*C|0:(M.push(this.shape[1]),g.push(this.stride[1]));var T=p[M.length+1];return T(this.data,M,g,P)},function(x,C,M,g){return new E(x,C[0],C[1],M[0],M[1],g)}},3:function(b,p,k){function E(L,x,C,M,g,P,T,z){this.data=L,this.shape=[x,C,M],this.stride=[g,P,T],this.offset=z|0}var S=E.prototype;return S.dtype=b,S.dimension=3,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(S,"order",{get:function(){var x=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return x>C?C>M?[2,1,0]:x>M?[1,2,0]:[1,0,2]:x>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),S.set=function(x,C,M,g){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M,g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M]=g},S.get=function(x,C,M){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M]},S.index=function(x,C,M){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M},S.hi=function(x,C,M){return new E(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},S.lo=function(x,C,M){var g=this.offset,P=0,T=this.shape[0],z=this.shape[1],O=this.shape[2],V=this.stride[0],G=this.stride[1],Z=this.stride[2];return typeof x=="number"&&x>=0&&(P=x|0,g+=V*P,T-=P),typeof C=="number"&&C>=0&&(P=C|0,g+=G*P,z-=P),typeof M=="number"&&M>=0&&(P=M|0,g+=Z*P,O-=P),new E(this.data,T,z,O,V,G,Z,g)},S.step=function(x,C,M){var g=this.shape[0],P=this.shape[1],T=this.shape[2],z=this.stride[0],O=this.stride[1],V=this.stride[2],G=this.offset,Z=0,j=Math.ceil;return typeof x=="number"&&(Z=x|0,Z<0?(G+=z*(g-1),g=j(-g/Z)):g=j(g/Z),z*=Z),typeof C=="number"&&(Z=C|0,Z<0?(G+=O*(P-1),P=j(-P/Z)):P=j(P/Z),O*=Z),typeof M=="number"&&(Z=M|0,Z<0?(G+=V*(T-1),T=j(-T/Z)):T=j(T/Z),V*=Z),new E(this.data,g,P,T,z,O,V,G)},S.transpose=function(x,C,M){x=x===void 0?0:x|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var g=this.shape,P=this.stride;return new E(this.data,g[x],g[C],g[M],P[x],P[C],P[M],this.offset)},S.pick=function(x,C,M){var g=[],P=[],T=this.offset;typeof x=="number"&&x>=0?T=T+this.stride[0]*x|0:(g.push(this.shape[0]),P.push(this.stride[0])),typeof C=="number"&&C>=0?T=T+this.stride[1]*C|0:(g.push(this.shape[1]),P.push(this.stride[1])),typeof M=="number"&&M>=0?T=T+this.stride[2]*M|0:(g.push(this.shape[2]),P.push(this.stride[2]));var z=p[g.length+1];return z(this.data,g,P,T)},function(x,C,M,g){return new E(x,C[0],C[1],C[2],M[0],M[1],M[2],g)}},4:function(b,p,k){function E(L,x,C,M,g,P,T,z,O,V){this.data=L,this.shape=[x,C,M,g],this.stride=[P,T,z,O],this.offset=V|0}var S=E.prototype;return S.dtype=b,S.dimension=4,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(S,"order",{get:k}),S.set=function(x,C,M,g,P){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g,P):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g]=P},S.get=function(x,C,M,g){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g]},S.index=function(x,C,M,g){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g},S.hi=function(x,C,M,g){return new E(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,typeof g!="number"||g<0?this.shape[3]:g|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},S.lo=function(x,C,M,g){var P=this.offset,T=0,z=this.shape[0],O=this.shape[1],V=this.shape[2],G=this.shape[3],Z=this.stride[0],j=this.stride[1],N=this.stride[2],H=this.stride[3];return typeof x=="number"&&x>=0&&(T=x|0,P+=Z*T,z-=T),typeof C=="number"&&C>=0&&(T=C|0,P+=j*T,O-=T),typeof M=="number"&&M>=0&&(T=M|0,P+=N*T,V-=T),typeof g=="number"&&g>=0&&(T=g|0,P+=H*T,G-=T),new E(this.data,z,O,V,G,Z,j,N,H,P)},S.step=function(x,C,M,g){var P=this.shape[0],T=this.shape[1],z=this.shape[2],O=this.shape[3],V=this.stride[0],G=this.stride[1],Z=this.stride[2],j=this.stride[3],N=this.offset,H=0,te=Math.ceil;return typeof x=="number"&&(H=x|0,H<0?(N+=V*(P-1),P=te(-P/H)):P=te(P/H),V*=H),typeof C=="number"&&(H=C|0,H<0?(N+=G*(T-1),T=te(-T/H)):T=te(T/H),G*=H),typeof M=="number"&&(H=M|0,H<0?(N+=Z*(z-1),z=te(-z/H)):z=te(z/H),Z*=H),typeof g=="number"&&(H=g|0,H<0?(N+=j*(O-1),O=te(-O/H)):O=te(O/H),j*=H),new E(this.data,P,T,z,O,V,G,Z,j,N)},S.transpose=function(x,C,M,g){x=x===void 0?0:x|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,g=g===void 0?3:g|0;var P=this.shape,T=this.stride;return new E(this.data,P[x],P[C],P[M],P[g],T[x],T[C],T[M],T[g],this.offset)},S.pick=function(x,C,M,g){var P=[],T=[],z=this.offset;typeof x=="number"&&x>=0?z=z+this.stride[0]*x|0:(P.push(this.shape[0]),T.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(P.push(this.shape[1]),T.push(this.stride[1])),typeof M=="number"&&M>=0?z=z+this.stride[2]*M|0:(P.push(this.shape[2]),T.push(this.stride[2])),typeof g=="number"&&g>=0?z=z+this.stride[3]*g|0:(P.push(this.shape[3]),T.push(this.stride[3]));var O=p[P.length+1];return O(this.data,P,T,z)},function(x,C,M,g){return new E(x,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],g)}},5:function(p,k,E){function S(x,C,M,g,P,T,z,O,V,G,Z,j){this.data=x,this.shape=[C,M,g,P,T],this.stride=[z,O,V,G,Z],this.offset=j|0}var L=S.prototype;return L.dtype=p,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:E}),L.set=function(C,M,g,P,T,z){return p==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T,z):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T]=z},L.get=function(C,M,g,P,T){return p==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T]},L.index=function(C,M,g,P,T){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*T},L.hi=function(C,M,g,P,T){return new S(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof g!="number"||g<0?this.shape[2]:g|0,typeof P!="number"||P<0?this.shape[3]:P|0,typeof T!="number"||T<0?this.shape[4]:T|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(C,M,g,P,T){var z=this.offset,O=0,V=this.shape[0],G=this.shape[1],Z=this.shape[2],j=this.shape[3],N=this.shape[4],H=this.stride[0],te=this.stride[1],oe=this.stride[2],_e=this.stride[3],Ee=this.stride[4];return typeof C=="number"&&C>=0&&(O=C|0,z+=H*O,V-=O),typeof M=="number"&&M>=0&&(O=M|0,z+=te*O,G-=O),typeof g=="number"&&g>=0&&(O=g|0,z+=oe*O,Z-=O),typeof P=="number"&&P>=0&&(O=P|0,z+=_e*O,j-=O),typeof T=="number"&&T>=0&&(O=T|0,z+=Ee*O,N-=O),new S(this.data,V,G,Z,j,N,H,te,oe,_e,Ee,z)},L.step=function(C,M,g,P,T){var z=this.shape[0],O=this.shape[1],V=this.shape[2],G=this.shape[3],Z=this.shape[4],j=this.stride[0],N=this.stride[1],H=this.stride[2],te=this.stride[3],oe=this.stride[4],_e=this.offset,Ee=0,Ce=Math.ceil;return typeof C=="number"&&(Ee=C|0,Ee<0?(_e+=j*(z-1),z=Ce(-z/Ee)):z=Ce(z/Ee),j*=Ee),typeof M=="number"&&(Ee=M|0,Ee<0?(_e+=N*(O-1),O=Ce(-O/Ee)):O=Ce(O/Ee),N*=Ee),typeof g=="number"&&(Ee=g|0,Ee<0?(_e+=H*(V-1),V=Ce(-V/Ee)):V=Ce(V/Ee),H*=Ee),typeof P=="number"&&(Ee=P|0,Ee<0?(_e+=te*(G-1),G=Ce(-G/Ee)):G=Ce(G/Ee),te*=Ee),typeof T=="number"&&(Ee=T|0,Ee<0?(_e+=oe*(Z-1),Z=Ce(-Z/Ee)):Z=Ce(Z/Ee),oe*=Ee),new S(this.data,z,O,V,G,Z,j,N,H,te,oe,_e)},L.transpose=function(C,M,g,P,T){C=C===void 0?0:C|0,M=M===void 0?1:M|0,g=g===void 0?2:g|0,P=P===void 0?3:P|0,T=T===void 0?4:T|0;var z=this.shape,O=this.stride;return new S(this.data,z[C],z[M],z[g],z[P],z[T],O[C],O[M],O[g],O[P],O[T],this.offset)},L.pick=function(C,M,g,P,T){var z=[],O=[],V=this.offset;typeof C=="number"&&C>=0?V=V+this.stride[0]*C|0:(z.push(this.shape[0]),O.push(this.stride[0])),typeof M=="number"&&M>=0?V=V+this.stride[1]*M|0:(z.push(this.shape[1]),O.push(this.stride[1])),typeof g=="number"&&g>=0?V=V+this.stride[2]*g|0:(z.push(this.shape[2]),O.push(this.stride[2])),typeof P=="number"&&P>=0?V=V+this.stride[3]*P|0:(z.push(this.shape[3]),O.push(this.stride[3])),typeof T=="number"&&T>=0?V=V+this.stride[4]*T|0:(z.push(this.shape[4]),O.push(this.stride[4]));var G=k[z.length+1];return G(this.data,z,O,V)},function(C,M,g,P){return new S(C,M[0],M[1],M[2],M[3],M[4],g[0],g[1],g[2],g[3],g[4],P)}}};function h(b,p){var k=p===-1?"T":String(p),E=f[k];return p===-1?E(b):p===0?E(b,v[b][0]):E(b,v[b],c)}function d(b){if(s(b))return"buffer";if(l)switch(Object.prototype.toString.call(b)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(b)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function _(b,p,k,E){if(b===void 0){var g=v.array[0];return g([])}else typeof b=="number"&&(b=[b]);p===void 0&&(p=[b.length]);var S=p.length;if(k===void 0){k=new Array(S);for(var L=S-1,x=1;L>=0;--L)k[L]=x,x*=p[L]}if(E===void 0){E=0;for(var L=0;L1e-6?(k[0]=S/M,k[1]=L/M,k[2]=x/M,k[3]=C/M):(k[0]=k[1]=k[2]=0,k[3]=1)}function _(k,E,S){this.radius=s([S]),this.center=s(E),this.rotation=s(k),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var b=_.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(k){this.radius.curve(k),this.center.curve(k),this.rotation.curve(k);var E=this.computedRotation;v(E,E);var S=this.computedMatrix;u(S,E);var L=this.computedCenter,x=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);x[0]=L[0]+M*S[2],x[1]=L[1]+M*S[6],x[2]=L[2]+M*S[10],C[0]=S[1],C[1]=S[5],C[2]=S[9];for(var g=0;g<3;++g){for(var P=0,T=0;T<3;++T)P+=S[g+4*T]*x[T];S[12+g]=-P}},b.getMatrix=function(k,E){this.recalcMatrix(k);var S=this.computedMatrix;if(E){for(var L=0;L<16;++L)E[L]=S[L];return E}return S},b.idle=function(k){this.center.idle(k),this.radius.idle(k),this.rotation.idle(k)},b.flush=function(k){this.center.flush(k),this.radius.flush(k),this.rotation.flush(k)},b.pan=function(k,E,S,L){E=E||0,S=S||0,L=L||0,this.recalcMatrix(k);var x=this.computedMatrix,C=x[1],M=x[5],g=x[9],P=h(C,M,g);C/=P,M/=P,g/=P;var T=x[0],z=x[4],O=x[8],V=T*C+z*M+O*g;T-=C*V,z-=M*V,O-=g*V;var G=h(T,z,O);T/=G,z/=G,O/=G;var Z=x[2],j=x[6],N=x[10],H=Z*C+j*M+N*g,te=Z*T+j*z+N*O;Z-=H*C+te*T,j-=H*M+te*z,N-=H*g+te*O;var oe=h(Z,j,N);Z/=oe,j/=oe,N/=oe;var _e=T*E+C*S,Ee=z*E+M*S,Ce=O*E+g*S;this.center.move(k,_e,Ee,Ce);var me=Math.exp(this.computedRadius[0]);me=Math.max(1e-4,me+L),this.radius.set(k,Math.log(me))},b.rotate=function(k,E,S,L){this.recalcMatrix(k),E=E||0,S=S||0;var x=this.computedMatrix,C=x[0],M=x[4],g=x[8],P=x[1],T=x[5],z=x[9],O=x[2],V=x[6],G=x[10],Z=E*C+S*P,j=E*M+S*T,N=E*g+S*z,H=-(V*N-G*j),te=-(G*Z-O*N),oe=-(O*j-V*Z),_e=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(te,2)-Math.pow(oe,2))),Ee=d(H,te,oe,_e);Ee>1e-6?(H/=Ee,te/=Ee,oe/=Ee,_e/=Ee):(H=te=oe=0,_e=1);var Ce=this.computedRotation,me=Ce[0],ie=Ce[1],Se=Ce[2],Le=Ce[3],Ae=me*_e+Le*H+ie*oe-Se*te,Fe=ie*_e+Le*te+Se*H-me*oe,Pe=Se*_e+Le*oe+me*te-ie*H,ge=Le*_e-me*H-ie*te-Se*oe;if(L){H=O,te=V,oe=G;var Re=Math.sin(L)/h(H,te,oe);H*=Re,te*=Re,oe*=Re,_e=Math.cos(E),Ae=Ae*_e+ge*H+Fe*oe-Pe*te,Fe=Fe*_e+ge*te+Pe*H-Ae*oe,Pe=Pe*_e+ge*oe+Ae*te-Fe*H,ge=ge*_e-Ae*H-Fe*te-Pe*oe}var ce=d(Ae,Fe,Pe,ge);ce>1e-6?(Ae/=ce,Fe/=ce,Pe/=ce,ge/=ce):(Ae=Fe=Pe=0,ge=1),this.rotation.set(k,Ae,Fe,Pe,ge)},b.lookAt=function(k,E,S,L){this.recalcMatrix(k),S=S||this.computedCenter,E=E||this.computedEye,L=L||this.computedUp;var x=this.computedMatrix;l(x,E,S,L);var C=this.computedRotation;f(C,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),v(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var M=0,g=0;g<3;++g)M+=Math.pow(S[g]-E[g],2);this.radius.set(k,.5*Math.log(Math.max(M,1e-6))),this.center.set(k,S[0],S[1],S[2])},b.translate=function(k,E,S,L){this.center.move(k,E||0,S||0,L||0)},b.setMatrix=function(k,E){var S=this.computedRotation;f(S,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),v(S,S),this.rotation.set(k,S[0],S[1],S[2],S[3]);var L=this.computedMatrix;c(L,E);var x=L[15];if(Math.abs(x)>1e-6){var C=L[12]/x,M=L[13]/x,g=L[14]/x;this.recalcMatrix(k);var P=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*P,M-L[6]*P,g-L[10]*P),this.radius.idle(k)}else this.center.idle(k),this.radius.idle(k)},b.setDistance=function(k,E){E>0&&this.radius.set(k,Math.log(E))},b.setDistanceLimits=function(k,E){k>0?k=Math.log(k):k=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=E},b.getDistanceLimits=function(k){var E=this.radius.bounds;return k?(k[0]=Math.exp(E[0][0]),k[1]=Math.exp(E[1][0]),k):[Math.exp(E[0][0]),Math.exp(E[1][0])]},b.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},b.fromJSON=function(k){var E=this.lastT(),S=k.center;S&&this.center.set(E,S[0],S[1],S[2]);var L=k.rotation;L&&this.rotation.set(E,L[0],L[1],L[2],L[3]);var x=k.distance;x&&x>0&&this.radius.set(E,Math.log(x)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function p(k){k=k||{};var E=k.center||[0,0,0],S=k.rotation||[0,0,0,1],L=k.radius||1;E=[].slice.call(E,0,3),S=[].slice.call(S,0,4),v(S,S);var x=new _(S,E,Math.log(L));return x.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&x.lookAt(0,k.eye,k.center,k.up),x}},9994:function(i,a,o){"use strict";var s=o(9618),l=o(8277);i.exports=function(c,f){for(var h=[],d=c,v=1;Array.isArray(d);)h.push(d.length),v*=d.length,d=d[0];return h.length===0?s():(f||(f=s(new Float64Array(v),h)),l(f,c),f)}}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);yPe.exports=n})()});var gX=ye((V0r,_Pe)=>{"use strict";_Pe.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 TPe=ye((G0r,wPe)=>{"use strict";var xPe=gX();wPe.exports=QPt;var bPe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function QPt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),xPe[e])r=xPe[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",a=l.replace(/a$/,"");i=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(bPe[h]!==void 0)return bPe[h]}return parseFloat(h)}),l===a&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}});var SPe=ye((H0r,APe)=>{"use strict";var eIt=TPe();APe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,i,a=eIt(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=tIt(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function tIt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}});var ZE=ye((j0r,MPe)=>{MPe.exports=rIt;function rIt(e,t,r){return tr?r:e:et?t:e}});var YD=ye((W0r,EPe)=>{EPe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var J_=ye((X0r,kPe)=>{"use strict";var iIt=SPe(),KD=ZE(),nIt=YD();kPe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=nIt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=iIt(t),t[0]/=255,t[1]/=255,t[2]/=255),aIt(t)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:255,a&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(a?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:1):(i[0]=KD(Math.floor(t[0]*255),0,255),i[1]=KD(Math.floor(t[1]*255),0,255),i[2]=KD(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:KD(Math.floor(t[3]*255),0,255)),i)};function aIt(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 Jy=ye((Z0r,CPe)=>{"use strict";var oIt=J_();function sIt(e){return e?oIt(e):[0,0,0,1]}CPe.exports=sIt});var $y=ye((Y0r,zPe)=>{"use strict";var DPe=Eo(),lIt=cd(),JD=J_(),$D=tc(),uIt=Lh().defaultLine,LPe=vv().isArrayOrTypedArray,mX=JD(uIt),FPe=1;function PPe(e,t){var r=e;return r[3]*=t,r}function IPe(e){if(DPe(e))return mX;var t=JD(e);return t.length?t:mX}function RPe(e){return DPe(e)?e:FPe}function cIt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=LPe(n),a=LPe(t),o=$D.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=$D.makeColorScaleFuncFromTrace(e):l=IPe,i?u=function(v,_){return v[_]===void 0?mX:JD(l(v[_]))}:u=IPe,a?c=function(v,_){return v[_]===void 0?FPe:RPe(v[_])}:c=RPe,i||a)for(var d=0;d{"use strict";OPe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var QD=ye((J0r,qPe)=>{"use strict";qPe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var NPe=ye(($0r,BPe)=>{"use strict";var hIt=qa();function _X(e,t,r,n){if(!t||!t.visible)return null;for(var i=hIt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function dIt(e){for(var t=0;t{"use strict";var pIt=Od().gl_line3d,UPe=Od().gl_scatter3d,gIt=Od().gl_error3d,mIt=Od().gl_mesh3d,yIt=Od().delaunay_triangulate,Qy=Dr(),WPe=Jy(),eF=$y().formatColor,_It=k3(),xX=yX(),xIt=QD(),bIt=ho(),wIt=ip().appendArrayPointValue,TIt=NPe();function XPe(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 wX=XPe.prototype;wX.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&&(Qy.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 AIt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function GPe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function MIt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var u=AIt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=mIt(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)};wX.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 LIt(e,t){var r=new XPe(e,t.uid);return r.update(t),r}ZPe.exports=LIt});var EX=ye((egr,QPe)=>{"use strict";var e1=pf(),PIt=ec(),MX=Tu(),TX=df().axisHoverFormat,{hovertemplateAttrs:IIt,texttemplateAttrs:RIt,templatefallbackAttrs:KPe}=Ll(),JPe=Gl(),DIt=yX(),FIt=QD(),Kg=Ao().extendFlat,zIt=mc().overrideAll,$Pe=Z1(),OIt=e1.line,V2=e1.marker,qIt=V2.line,BIt=Kg({width:OIt.width,dash:{valType:"enumerated",values:$Pe(DIt),dflt:"solid"}},MX("line"));function AX(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 SX=QPe.exports=zIt({x:e1.x,y:e1.y,z:{valType:"data_array"},text:Kg({},e1.text,{}),texttemplate:RIt(),texttemplatefallback:KPe({editType:"calc"}),hovertext:Kg({},e1.hovertext,{}),hovertemplate:IIt(),hovertemplatefallback:KPe(),xhoverformat:TX("x"),yhoverformat:TX("y"),zhoverformat:TX("z"),mode:Kg({},e1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:AX("x"),y:AX("y"),z:AX("z")},connectgaps:e1.connectgaps,line:BIt,marker:Kg({symbol:{valType:"enumerated",values:$Pe(FIt),dflt:"circle",arrayOk:!0},size:Kg({},V2.size,{dflt:8}),sizeref:V2.sizeref,sizemin:V2.sizemin,sizemode:V2.sizemode,opacity:Kg({},V2.opacity,{arrayOk:!1}),colorbar:V2.colorbar,line:Kg({width:Kg({},qIt.width,{arrayOk:!1})},MX("marker.line"))},MX("marker")),textposition:Kg({},e1.textposition,{dflt:"top center"}),textfont:PIt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:JPe.opacity,hoverinfo:Kg({},JPe.hoverinfo)},"calc","nested");SX.x.editType=SX.y.editType=SX.z.editType="calc+clearAxisTypes"});var rIe=ye((tgr,tIe)=>{"use strict";var eIe=qa(),NIt=Dr(),kX=Ru(),UIt=$p(),VIt=R0(),GIt=D0(),HIt=EX();tIe.exports=function(t,r,n,i){function a(d,v){return NIt.coerce(t,r,HIt,d,v)}var o=jIt(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),kX.hasMarkers(r)&&UIt(t,r,n,i,a,{noSelect:!0,noAngle:!0}),kX.hasLines(r)&&(a("connectgaps"),VIt(t,r,n,i,a)),kX.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),GIt(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=eIe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||n,{axis:"z"}),h(t,r,s||l||n,{axis:"y",inherit:"z"}),h(t,r,s||l||n,{axis:"x",inherit:"z"})};function jIt(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),l=eIe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),a&&o&&s&&(i=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=i),i}});var nIe=ye((rgr,iIe)=>{"use strict";var WIt=km(),XIt=F0();iIe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return WIt(n,r),XIt(t,r),n}});var oIe=ye((igr,aIe)=>{aIe.exports=ZIt;function ZIt(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,i;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o{var YIt=oIe();sIe.exports=function(t){return YIt("webgl",t)}});var CX=ye((agr,cIe)=>{"use strict";var uIe=ka(),KIt=function(){};cIe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=KIt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=uIe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=uIe.lightLine,n.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",n.appendChild(i),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var dIe=ye((ogr,hIe)=>{"use strict";var G2=Jy(),JIt=Dr(),$It=["xaxis","yaxis","zaxis"];function fIe(){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 QIt=fIe.prototype;QIt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[$It[n]];if(!i.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?JIt.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=G2(i.title.font.color)),i.title.font.family&&(r.labelFont[n]=i.title.font.family),i.title.font.size&&(r.labelSize[n]=i.title.font.size),i.title.font.weight&&(r.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(r.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(r.labelFontVariant[n]=i.title.font.variant)),"showline"in i&&(r.lineEnable[n]=i.showline),"linecolor"in i&&(r.lineColor[n]=G2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=G2(i.gridcolor)),"gridwidth"in i&&(r.gridWidth[n]=i.gridwidth),i.type==="log"?r.zeroEnable[n]=!1:"zeroline"in i&&(r.zeroEnable[n]=i.zeroline),"zerolinecolor"in i&&(r.zeroLineColor[n]=G2(i.zerolinecolor)),"zerolinewidth"in i&&(r.zeroLineWidth[n]=i.zerolinewidth),"ticks"in i&&i.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in i&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=i.ticklen),"tickcolor"in i&&(r.lineTickColor[n]=G2(i.tickcolor)),"tickwidth"in i&&(r.lineTickWidth[n]=i.tickwidth),"tickangle"in i&&(r.tickAngle[n]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(r.tickEnable[n]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(r.tickColor[n]=G2(i.tickfont.color)),i.tickfont.family&&(r.tickFont[n]=i.tickfont.family),i.tickfont.size&&(r.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(r.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(r.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(r.tickFontVariant[n]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):i.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in i&&i.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=G2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function e8t(e,t){var r=new fIe;return r.merge(e,t),r}hIe.exports=e8t});var gIe=ye((sgr,pIe)=>{"use strict";var t8t=Jy(),r8t=["xaxis","yaxis","zaxis"];function vIe(){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 i8t=vIe.prototype;i8t.merge=function(e){for(var t=0;t<3;++t){var r=e[r8t[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=t8t(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function n8t(e){var t=new vIe;return t.merge(e),t}pIe.exports=n8t});var _Ie=ye((lgr,yIe)=>{"use strict";yIe.exports=u8t;var mIe=ho(),a8t=Dr(),o8t=["xaxis","yaxis","zaxis"],s8t=[0,0,0];function l8t(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;a/g," "));i[a]=u,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){s8t[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=l8t(i)}});var MIe=ye((ugr,SIe)=>{"use strict";var wIe=Od().gl_plot3d,c8t=wIe.createCamera,xIe=wIe.createScene,f8t=lIe(),h8t=RL(),iF=qa(),up=Dr(),rF=up.preserveDrawingBuffer(),nF=ho(),Jg=vf(),d8t=Jy(),v8t=CX(),p8t=UU(),g8t=dIe(),m8t=gIe(),y8t=_Ie(),_8t=Ag().applyAutorangeOptions,YE,tF,TIe=!1;function AIe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=g8t(t,t[this.id]),this.spikeOptions=m8t(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=iF.getComponentMethod("annotations3d","convert"),this.drawAnnotations=iF.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Sv=AIe.prototype;Sv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:rF,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(!tF&&(YE=document.createElement("canvas"),tF=f8t({canvas:YE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!tF))throw new Error("error creating static canvas/context for image server");t.gl=tF,t.canvas=YE}return t};var bIe=!0;Sv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=xIe(t)}catch(n){if(e.staticMode||!bIe||rF)r=!1;else{up.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{rF=t.glOptions.preserveDrawingBuffer=!0,e.glplot=xIe(t)}catch(i){rF=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return bIe=!1,r};Sv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=c8t(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Sv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return v8t(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,i=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=i();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){TIe=!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)}},h8t?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=i();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Sv.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,i=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),y8t(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"?(p.valueLabel=nF.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+p.valueLabel),f.textLabel&&x.push(f.textLabel),L=x.join("
")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:b};Jg.appendArrayPointValue(C,_,b),r._module.eventData&&(C=_._module.eventData(C,f,_,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var g=[];Jg.loneHover({trace:_,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:L,name:c.name,color:Jg.castHoverOption(_,b,"bgcolor")||c.color,borderColor:Jg.castHoverOption(_,b,"bordercolor"),fontFamily:Jg.castHoverOption(_,b,"font.family"),fontSize:Jg.castHoverOption(_,b,"font.size"),fontColor:Jg.castHoverOption(_,b,"font.color"),nameLength:Jg.castHoverOption(_,b,"namelength"),textAlign:Jg.castHoverOption(_,b,"align"),hovertemplate:up.castOption(_,b,"hovertemplate"),hovertemplateLabels:up.extendFlat({},C,p),eventData:[C]},{container:n,gd:t,inOut_bbox:g}),C.bbox=g[0]}f.distance<5&&(f.buttons||TIe)?t.emit("plotly_click",M):t.emit("plotly_hover",M),this.oldEventData=M}else Jg.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Sv.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){up.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var KE=["xaxis","yaxis","zaxis"];function x8t(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=KE[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!up.isArrayOrTypedArray(l))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1);else for(var f,h=0;h<(c||l.length);h++)if(up.isArrayOrTypedArray(l[h]))for(var d=0;d_[1][o])_[0][o]=-1,_[1][o]=1;else{var T=_[1][o]-_[0][o];_[0][o]-=T/32,_[1][o]+=T/32}if(k=[_[0][o],_[1][o]],k=_8t(k,l),_[0][o]=k[0],_[1][o]=k[1],l.isReversed()){var z=_[0][o];_[0][o]=_[1][o],_[1][o]=z}}else k=l.range,_[0][o]=l.r2l(k[0]),_[1][o]=l.r2l(k[1]);_[0][o]===_[1][o]&&(_[0][o]-=1,_[1][o]+=1),b[o]=_[1][o]-_[0][o],l.range=[_[0][o],_[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var O,V=c.aspectmode;if(V==="cube")O=[1,1,1];else if(V==="manual"){var G=c.aspectratio;O=[G.x,G.y,G.z]}else if(V==="auto"||V==="data"){var Z=[1,1,1];for(o=0;o<3;++o){l=c[KE[o]],u=l.type;var j=p[u];Z[o]=Math.pow(j.acc,1/j.count)/d[o]}V==="data"||Math.max.apply(null,Z)/Math.min.apply(null,Z)<=4?O=Z:O=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=O[0],c.aspectratio.y=f.aspectratio.y=O[1],c.aspectratio.z=f.aspectratio.z=O[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,H=t._size||null;if(N&&H){var te=n.container.style;te.position="absolute",te.left=H.l+N.x[0]*H.w+"px",te.top=H.t+(1-N.y[1])*H.h+"px",te.width=H.w*(N.x[1]-N.x[0])+"px",te.height=H.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}};Sv.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function w8t(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 T8t(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Sv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),T8t(e.camera)};Sv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,w8t(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",i=t.camera._ortho;n!==i&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Sv.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=up.nestedProperty(e,t.id+".camera"),i=n.get();function a(u,c,f,h){var d=["up","center","eye"],v=["x","y","z"];return c[d[f]]&&u[d[f]][v[h]]===c[d[f]][v[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,i,s,l)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Sv.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=up.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Sv.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),i=up.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=up.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),iF.call("_storeDirectGUIEdit",e,r._preGUI,h),u){i.set(n);var d=up.nestedProperty(r,t.id+".camera");d.set(n)}if(c){s.set(o);var v=up.nestedProperty(r,t.id+".aspectratio");v.set(o),t.glplot.redraw()}}return f};Sv.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var d=i.layout;iF.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,up.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function A8t(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}Sv.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(YE),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,i=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(n*i*4);r.readPixels(0,0,n,i,r.RGBA,r.UNSIGNED_BYTE,a),A8t(a,n,i),S8t(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,i);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(YE),u};Sv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[KE[t]];nF.setConvert(r,e.fullLayout),r.setScale=up.noop}};Sv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},nF.setConvert(e._mockAxis,r)};SIe.exports=AIe});var kIe=ye((cgr,EIe)=>{"use strict";EIe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var PX=ye((fgr,CIe)=>{"use strict";var M8t=ka(),xs=Rd(),LX=Ao().extendFlat,E8t=mc().overrideAll;CIe.exports=E8t({visible:xs.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:M8t.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:xs.color,categoryorder:xs.categoryorder,categoryarray:xs.categoryarray,title:{text:xs.title.text,font:xs.title.font},type:LX({},xs.type,{values:["-","linear","log","date","category"]}),autotypenumbers:xs.autotypenumbers,autorange:xs.autorange,autorangeoptions:{minallowed:xs.autorangeoptions.minallowed,maxallowed:xs.autorangeoptions.maxallowed,clipmin:xs.autorangeoptions.clipmin,clipmax:xs.autorangeoptions.clipmax,include:xs.autorangeoptions.include,editType:"plot"},rangemode:xs.rangemode,minallowed:xs.minallowed,maxallowed:xs.maxallowed,range:LX({},xs.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:xs.minor.tickmode,nticks:xs.nticks,tick0:xs.tick0,dtick:xs.dtick,tickvals:xs.tickvals,ticktext:xs.ticktext,ticks:xs.ticks,mirror:xs.mirror,ticklen:xs.ticklen,tickwidth:xs.tickwidth,tickcolor:xs.tickcolor,showticklabels:xs.showticklabels,labelalias:xs.labelalias,tickfont:xs.tickfont,tickangle:xs.tickangle,tickprefix:xs.tickprefix,showtickprefix:xs.showtickprefix,ticksuffix:xs.ticksuffix,showticksuffix:xs.showticksuffix,showexponent:xs.showexponent,exponentformat:xs.exponentformat,minexponent:xs.minexponent,separatethousands:xs.separatethousands,tickformat:xs.tickformat,tickformatstops:xs.tickformatstops,hoverformat:xs.hoverformat,showline:xs.showline,linecolor:xs.linecolor,linewidth:xs.linewidth,showgrid:xs.showgrid,gridcolor:LX({},xs.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:xs.gridwidth,zeroline:xs.zeroline,zerolinecolor:xs.zerolinecolor,zerolinewidth:xs.zerolinewidth},"plot","from-root")});var FX=ye((hgr,LIe)=>{"use strict";var IX=PX(),k8t=Cc().attributes,RX=Ao().extendFlat,C8t=Dr().counterRegex;function DX(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"}}LIe.exports={_arrayAttrRegexps:[C8t("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:RX(DX(0,0,1),{}),center:RX(DX(0,0,0),{}),eye:RX(DX(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:k8t({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:IX,yaxis:IX,zaxis:IX,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 DIe=ye((dgr,RIe)=>{"use strict";var L8t=cd().mix,PIe=Dr(),P8t=vl(),I8t=PX(),R8t=SU(),D8t=i4(),IIe=["xaxis","yaxis","zaxis"],F8t=100*136/187;RIe.exports=function(t,r,n){var i,a;function o(u,c){return PIe.coerce(i,a,I8t,u,c)}for(var s=0;s{"use strict";var z8t=Dr(),O8t=ka(),q8t=qa(),B8t=k_(),N8t=DIe(),FIe=FX(),U8t=Id().getSubplotData,zIe="gl3d";OIe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=z8t.validate(t[o],FIe[o]);if(s)return t[o]}}B8t(t,r,n,{type:zIe,attributes:FIe,handleDefaults:V8t,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function V8t(e,t,r,n){for(var i=r("bgcolor"),a=O8t.combine(i,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",n.getDfltFromLayout("hovermode"))}});var $_=ye(cp=>{"use strict";var G8t=mc().overrideAll,H8t=B1(),j8t=MIe(),W8t=Id().getSubplotData,X8t=Dr(),Z8t=Wp(),GA="gl3d",zX="scene";cp.name=GA;cp.attr=zX;cp.idRoot=zX;cp.idRegex=cp.attrRegex=X8t.counterRegex("scene");cp.attributes=kIe();cp.layoutAttributes=FX();cp.baseLayoutAttrOverrides=G8t({hoverlabel:H8t.hoverlabel},"plot","nested");cp.supplyLayoutDefaults=qIe();cp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[GA],a=0;a{"use strict";BIe.exports={plot:YPe(),attributes:EX(),markerSymbols:QD(),supplyDefaults:rIe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:nIe(),moduleType:"trace",name:"scatter3d",basePlotModule:$_(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var VIe=ye((mgr,UIe)=>{"use strict";UIe.exports=NIe()});var JE=ye((ygr,jIe)=>{"use strict";var GIe=ka(),Y8t=Tu(),OX=df().axisHoverFormat,{hovertemplateAttrs:K8t,templatefallbackAttrs:J8t}=Ll(),HIe=Gl(),qX=Ao().extendFlat,$8t=mc().overrideAll;function BX(e){return{valType:"boolean",dflt:!1}}function NX(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:BX("x"),y:BX("y"),z:BX("z")},color:{valType:"color",dflt:GIe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:GIe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var UX=jIe.exports=$8t(qX({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:K8t(),hovertemplatefallback:J8t(),xhoverformat:OX("x"),yhoverformat:OX("y"),zhoverformat:OX("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},Y8t("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:NX("x"),y:NX("y"),z:NX("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:qX({},HIe.hoverinfo),showlegend:qX({},HIe.showlegend,{dflt:!1})}),"calc","nested");UX.x.editType=UX.y.editType=UX.z.editType="calc+clearAxisTypes"});var GX=ye((_gr,ZIe)=>{"use strict";var Q8t=qa(),WIe=Dr(),eRt=Qh(),tRt=JE(),VX=.1;function rRt(e,t){for(var r=[],n=32,i=0;i{"use strict";var YIe=gv();KIe.exports=function(t,r){r.surfacecolor?YIe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):YIe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var i8e=ye((bgr,r8e)=>{"use strict";var aRt=Od().gl_surface3d,HA=Od().ndarray,oRt=Od().ndarray_linear_interpolate.d2,sRt=o8(),lRt=s8(),$E=Dr().isArrayOrTypedArray,uRt=$y().parseColorScale,$Ie=Jy(),cRt=tc().extractOpts;function e8e(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 $g=e8e.prototype;$g.getXat=function(e,t,r,n){var i=$E(this.data.x)?$E(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};$g.getYat=function(e,t,r,n){var i=$E(this.data.y)?$E(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};$g.getZat=function(e,t,r,n){var i=this.data.z[t][e];return i===null&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),r===void 0?i:n.d2l(i,0,r)};$g.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return $E(s)&&s[i]&&s[i][n]!==void 0?e.textLabel=s[i][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function fRt(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 jA=[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 hRt(e,t){if(e0){r=jA[n];break}return r}function vRt(e,t){if(!(e<1||t<1)){for(var r=HX(e),n=HX(t),i=1,a=0;aaF;)n--,n/=dRt(n),n++,n1?i:1};function gRt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function mRt(e,t,r){return yRt(e,t,gRt,r),e}function yRt(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,i=this.contourStart[n];ih&&(this.minValues[u]=h),this.maxValues[u]{"use strict";n8e.exports={attributes:JE(),supplyDefaults:GX().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:JIe(),plot:i8e(),moduleType:"trace",name:"surface",basePlotModule:$_(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var s8e=ye((Tgr,o8e)=>{"use strict";o8e.exports=a8e()});var WA=ye((Agr,u8e)=>{"use strict";var bRt=Tu(),jX=df().axisHoverFormat,{hovertemplateAttrs:wRt,templatefallbackAttrs:TRt}=Ll(),Q_=JE(),l8e=Gl(),ex=Ao().extendFlat;u8e.exports=ex({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:wRt({editType:"calc"}),hovertemplatefallback:TRt({editType:"calc"}),xhoverformat:jX("x"),yhoverformat:jX("y"),zhoverformat:jX("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"}},bRt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:Q_.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:ex({},Q_.contours.x.show,{}),color:Q_.contours.x.color,width:Q_.contours.x.width,editType:"calc"},lightposition:{x:ex({},Q_.lightposition.x,{dflt:1e5}),y:ex({},Q_.lightposition.y,{dflt:1e5}),z:ex({},Q_.lightposition.z,{dflt:0}),editType:"calc"},lighting:ex({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",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"},Q_.lighting),hoverinfo:ex({},l8e.hoverinfo,{editType:"calc"}),showlegend:ex({},l8e.showlegend,{dflt:!1})})});var sF=ye((Sgr,f8e)=>{"use strict";var ARt=Tu(),oF=df().axisHoverFormat,{hovertemplateAttrs:SRt,templatefallbackAttrs:MRt}=Ll(),QE=WA(),c8e=Gl(),WX=Ao().extendFlat,ERt=mc().overrideAll;function XX(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function ZX(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var XA=f8e.exports=ERt(WX({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:XX("x"),y:XX("y"),z:XX("z")},caps:{x:ZX("x"),y:ZX("y"),z:ZX("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:SRt(),hovertemplatefallback:MRt(),xhoverformat:oF("x"),yhoverformat:oF("y"),zhoverformat:oF("z"),valuehoverformat:oF("value",1),showlegend:WX({},c8e.showlegend,{dflt:!1})},ARt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:QE.opacity,lightposition:QE.lightposition,lighting:QE.lighting,flatshading:QE.flatshading,contour:QE.contour,hoverinfo:WX({},c8e.hoverinfo)}),"calc","nested");XA.flatshading.dflt=!0;XA.lighting.facenormalsepsilon.dflt=0;XA.x.editType=XA.y.editType=XA.z.editType=XA.value.editType="calc+clearAxisTypes"});var YX=ye((Mgr,d8e)=>{"use strict";var kRt=Dr(),CRt=qa(),LRt=sF(),PRt=Qh();function IRt(e,t,r,n){function i(a,o){return kRt.coerce(e,t,LRt,a,o)}h8e(e,t,r,n,i)}function h8e(e,t,r,n,i){var a=i("isomin"),o=i("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=i("x"),l=i("y"),u=i("z"),c=i("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=CRt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(_){i(_+"hoverformat");var b="caps."+_,p=i(b+".show");p&&i(b+".fill");var k="slices."+_,E=i(k+".show");E&&(i(k+".fill"),i(k+".locations"))});var h=i("spaceframe.show");h&&i("spaceframe.fill");var d=i("surface.show");d&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var v=i("contour.show");v&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(_){i(_)}),PRt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}d8e.exports={supplyDefaults:IRt,supplyIsoDefaults:h8e}});var lF=ye((Egr,p8e)=>{"use strict";var JX=Dr(),RRt=gv();function DRt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=jm(t.u,t._len),t._v=jm(t.v,t._len),t._w=jm(t.w,t._len),t._x=jm(t.x,t._len),t._y=jm(t.y,t._len),t._z=jm(t.z,t._len);var r=v8e(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,i,a,o;t.starts&&(i=jm(t.starts.x||[]),a=jm(t.starts.y||[]),o=jm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(E=t[i-1],L=r[i-1],C=n[i-1]),a=0;aE?"-":"+")+"x"),v=v.replace("y",(S>L?"-":"+")+"y"),v=v.replace("z",(x>C?"-":"+")+"z");var T=function(){i=0,M=[],g=[],P=[]};(!i||i{"use strict";var FRt=gv(),zRt=lF().processGrid,uF=lF().filter;g8e.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=uF(r.x,r._len),r._y=uF(r.y,r._len),r._z=uF(r.z,r._len),r._value=uF(r.value,r._len);var n=zRt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var i=1/0,a=-1/0,o=0;o{"use strict";m8e.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var ORt=Od().gl_mesh3d,qRt=$y().parseColorScale,BRt=Dr().isArrayOrTypedArray,NRt=Jy(),URt=tc().extractOpts,y8e=ZA(),ek=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function oe(Qt,Vt){return Qt===null?Vt:Qt}function _e(Qt,Vt,_t){T();var It=[Vt],mt=[_t];if(j>=1)It=[Vt],mt=[_t];else if(j>0){var er=H(Vt,_t);It=er.xyzv,mt=er.abc}for(var lr=0;lr-1?_t[Lr]:P(ti,Br,Vr);Ge>-1?Tr[Lr]=Ge:Tr[Lr]=O(ti,Br,Vr,oe(Qt,dt))}V(Tr[0],Tr[1],Tr[2])}}function Ee(Qt,Vt,_t){var It=function(mt,er,lr){_e(Qt,[Vt[mt],Vt[er],Vt[lr]],[_t[mt],_t[er],_t[lr]])};It(0,1,2),It(2,3,0)}function Ce(Qt,Vt,_t){var It=function(mt,er,lr){_e(Qt,[Vt[mt],Vt[er],Vt[lr]],[_t[mt],_t[er],_t[lr]])};It(0,1,2),It(3,0,1),It(2,3,0),It(1,2,3)}function me(Qt,Vt,_t,It){var mt=Qt[3];mt<_t&&(mt=_t),mt>It&&(mt=It);for(var er=(Qt[3]-mt)/(Qt[3]-Vt[3]+1e-9),lr=[],Tr=0;Tr<4;Tr++)lr[Tr]=(1-er)*Qt[Tr]+er*Vt[Tr];return lr}function ie(Qt,Vt,_t){return Qt>=Vt&&Qt<=_t}function Se(Qt){var Vt=.001*(L-S);return Qt>=S-Vt&&Qt<=L+Vt}function Le(Qt){for(var Vt=[],_t=0;_t<4;_t++){var It=Qt[_t];Vt.push([e._x[It],e._y[It],e._z[It],e._value[It]])}return Vt}var Ae=3;function Fe(Qt,Vt,_t,It,mt,er){er||(er=1),_t=[-1,-1,-1];var lr=!1,Tr=[ie(Vt[0][3],It,mt),ie(Vt[1][3],It,mt),ie(Vt[2][3],It,mt)];if(!Tr[0]&&!Tr[1]&&!Tr[2])return!1;var Lr=function(Br,Vr,dt){return Se(Vr[0][3])&&Se(Vr[1][3])&&Se(Vr[2][3])?(_e(Br,Vr,dt),!0):erTr?[k,er]:[er,E];Nt(Vt,Lr[0],Lr[1])}}var ti=[[Math.min(S,E),Math.max(S,E)],[Math.min(k,L),Math.max(k,L)]];["x","y","z"].forEach(function(Br){for(var Vr=[],dt=0;dt0&&(Ie.push(vt.id),Br==="x"?xe.push([vt.distRatio,0,0]):Br==="y"?xe.push([0,vt.distRatio,0]):xe.push([0,0,vt.distRatio]))}else Br==="x"?xt=cr(1,d-1):Br==="y"?xt=cr(1,v-1):xt=cr(1,_-1);Ie.length>0&&(Br==="x"?Vr[Ge]=Jt(Qt,Ie,Je,je,xe,Vr[Ge]):Br==="y"?Vr[Ge]=sr(Qt,Ie,Je,je,xe,Vr[Ge]):Vr[Ge]=wr(Qt,Ie,Je,je,xe,Vr[Ge]),Ge++),xt.length>0&&(Br==="x"?Vr[Ge]=pt(Qt,xt,Je,je,Vr[Ge]):Br==="y"?Vr[Ge]=Zt(Qt,xt,Je,je,Vr[Ge]):Vr[Ge]=st(Qt,xt,Je,je,Vr[Ge]),Ge++)}var ir=e.caps[Br];ir.show&&ir.fill&&(N(ir.fill),Br==="x"?Vr[Ge]=pt(Qt,[0,d-1],Je,je,Vr[Ge]):Br==="y"?Vr[Ge]=Zt(Qt,[0,v-1],Je,je,Vr[Ge]):Vr[Ge]=st(Qt,[0,_-1],Je,je,Vr[Ge]),Ge++)}}),s===0&&z(),e._meshX=x,e._meshY=C,e._meshZ=M,e._meshIntensity=g,e._Xs=c,e._Ys=f,e._Zs=h}return St(),e}function GRt(e,t){var r=e.glplot.gl,n=ORt({gl:r}),i=new _8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}b8e.exports={findNearestOnAxis:ek,generateIsoMeshes:x8e,createIsosurfaceTrace:GRt}});var T8e=ye((Pgr,w8e)=>{"use strict";w8e.exports={attributes:sF(),supplyDefaults:YX().supplyDefaults,calc:$X(),colorbar:{min:"cmin",max:"cmax"},plot:cF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var S8e=ye((Igr,A8e)=>{"use strict";A8e.exports=T8e()});var tZ=ye((Rgr,E8e)=>{"use strict";var HRt=Tu(),yh=sF(),jRt=JE(),M8e=Gl(),eZ=Ao().extendFlat,WRt=mc().overrideAll,fF=E8e.exports=WRt(eZ({x:yh.x,y:yh.y,z:yh.z,value:yh.value,isomin:yh.isomin,isomax:yh.isomax,surface:yh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:yh.slices,caps:yh.caps,text:yh.text,hovertext:yh.hovertext,xhoverformat:yh.xhoverformat,yhoverformat:yh.yhoverformat,zhoverformat:yh.zhoverformat,valuehoverformat:yh.valuehoverformat,hovertemplate:yh.hovertemplate,hovertemplatefallback:yh.hovertemplatefallback},HRt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:yh.colorbar,opacity:yh.opacity,opacityscale:jRt.opacityscale,lightposition:yh.lightposition,lighting:yh.lighting,flatshading:yh.flatshading,contour:yh.contour,hoverinfo:eZ({},M8e.hoverinfo),showlegend:eZ({},M8e.showlegend,{dflt:!1})}),"calc","nested");fF.x.editType=fF.y.editType=fF.z.editType=fF.value.editType="calc+clearAxisTypes"});var C8e=ye((Dgr,k8e)=>{"use strict";var XRt=Dr(),ZRt=tZ(),YRt=YX().supplyIsoDefaults,KRt=GX().opacityscaleDefaults;k8e.exports=function(t,r,n,i){function a(o,s){return XRt.coerce(t,r,ZRt,o,s)}YRt(t,r,n,i,a),KRt(t,r,i,a)}});var R8e=ye((Fgr,I8e)=>{"use strict";var JRt=Od().gl_mesh3d,$Rt=$y().parseColorScale,QRt=Dr().isArrayOrTypedArray,eDt=Jy(),tDt=tc().extractOpts,L8e=ZA(),rZ=cF().findNearestOnAxis,rDt=cF().generateIsoMeshes;function P8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var iZ=P8e.prototype;iZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=rZ(r,this.data._Xs).id,l=rZ(n,this.data._Ys).id,u=rZ(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return QRt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};iZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=rDt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=L8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=L8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:eDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=tDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=$Rt(e),this.mesh.update(o)};iZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function iDt(e,t){var r=e.glplot.gl,n=JRt({gl:r}),i=new P8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}I8e.exports=iDt});var F8e=ye((zgr,D8e)=>{"use strict";D8e.exports={attributes:tZ(),supplyDefaults:C8e(),calc:$X(),colorbar:{min:"cmin",max:"cmax"},plot:R8e(),moduleType:"trace",name:"volume",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var O8e=ye((Ogr,z8e)=>{"use strict";z8e.exports=F8e()});var N8e=ye((qgr,B8e)=>{"use strict";var nDt=qa(),q8e=Dr(),aDt=Qh(),oDt=WA();B8e.exports=function(t,r,n,i){function a(c,f){return q8e.coerce(t,r,oDt,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&q8e.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=nDt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],i),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),aDt(t,r,i,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var V8e=ye((Bgr,U8e)=>{"use strict";var sDt=gv();U8e.exports=function(t,r){r.intensity&&sDt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var X8e=ye((Ngr,W8e)=>{"use strict";var lDt=Od().gl_mesh3d,uDt=Od().delaunay_triangulate,cDt=Od().alpha_shape,fDt=Od().convex_hull,hDt=$y().parseColorScale,dDt=Dr().isArrayOrTypedArray,sZ=Jy(),vDt=tc().extractOpts,G8e=ZA();function j8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var lZ=j8e.prototype;lZ.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 dDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function H8e(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}lZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=G8e(nZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),nZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),nZ(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||!oZ(e.i,n)||!oZ(e.j,n)||!oZ(e.k,n))return;a=G8e(aZ(e.i),aZ(e.j),aZ(e.k))}else e.alphahull===0?a=fDt(i):e.alphahull>0?a=cDt(e.alphahull,i):a=pDt(e.delaunayaxis,i);var o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:sZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=vDt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=hDt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=H8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=H8e(e.facecolor)):(this.color=e.color,o.meshColor=sZ(e.color));this.mesh.update(o)};lZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function gDt(e,t){var r=e.glplot.gl,n=lDt({gl:r}),i=new j8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}W8e.exports=gDt});var Y8e=ye((Ugr,Z8e)=>{"use strict";Z8e.exports={attributes:WA(),supplyDefaults:N8e(),calc:V8e(),colorbar:{min:"cmin",max:"cmax"},plot:X8e(),moduleType:"trace",name:"mesh3d",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var J8e=ye((Vgr,K8e)=>{"use strict";K8e.exports=Y8e()});var cZ=ye((Ggr,Q8e)=>{"use strict";var mDt=Tu(),YA=df().axisHoverFormat,{hovertemplateAttrs:yDt,templatefallbackAttrs:_Dt}=Ll(),xDt=WA(),$8e=Gl(),uZ=Ao().extendFlat,hF={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:yDt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:_Dt({editType:"calc"}),uhoverformat:YA("u",1),vhoverformat:YA("v",1),whoverformat:YA("w",1),xhoverformat:YA("x"),yhoverformat:YA("y"),zhoverformat:YA("z"),showlegend:uZ({},$8e.showlegend,{dflt:!1})};uZ(hF,mDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var bDt=["opacity","lightposition","lighting"];bDt.forEach(function(e){hF[e]=xDt[e]});hF.hoverinfo=uZ({},$8e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});Q8e.exports=hF});var tRe=ye((Hgr,eRe)=>{"use strict";var wDt=Dr(),TDt=Qh(),ADt=cZ();eRe.exports=function(t,r,n,i){function a(d,v){return wDt.coerce(t,r,ADt,d,v)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a("sizemode");a("sizeref",h==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),TDt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var iRe=ye((jgr,rRe)=>{"use strict";var SDt=gv();rRe.exports=function(t,r){for(var n=r.u,i=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,u=0;u{"use strict";var MDt=Od().gl_cone3d,EDt=Od().gl_cone3d.createConeMesh,kDt=Dr().simpleMap,CDt=$y().parseColorScale,LDt=tc().extractOpts,PDt=Dr().isArrayOrTypedArray,nRe=ZA();function aRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var fZ=aRe.prototype;fZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return PDt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var IDt={xaxis:0,yaxis:1,zaxis:2},RDt={tip:1,tail:0,cm:.25,center:.5},DDt={tip:1,tail:1,cm:.75,center:.5};function oRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[IDt[f]];return kDt(c,function(v){return h.d2l(v)*d})}i.vectors=nRe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=nRe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=LDt(t);i.colormap=CDt(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=RDt[t.anchor];var s=t.sizemode;s==="scaled"?i.coneSize=t.sizeref||.5:s==="absolute"?i.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(i.coneSize=t.sizeref),i.coneSizemode=s;var l=MDt(i),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=DDt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}fZ.update=function(e){this.data=e;var t=oRe(this.scene,e);this.mesh.update(t)};fZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function FDt(e,t){var r=e.glplot.gl,n=oRe(e,t),i=EDt(r,n),a=new aRe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}sRe.exports=FDt});var cRe=ye((Xgr,uRe)=>{"use strict";uRe.exports={moduleType:"trace",name:"cone",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:cZ(),supplyDefaults:tRe(),colorbar:{min:"cmin",max:"cmax"},calc:iRe(),plot:lRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var hRe=ye((Zgr,fRe)=>{"use strict";fRe.exports=cRe()});var dZ=ye((Ygr,vRe)=>{"use strict";var zDt=Tu(),KA=df().axisHoverFormat,{hovertemplateAttrs:ODt,templatefallbackAttrs:qDt}=Ll(),BDt=WA(),dRe=Gl(),hZ=Ao().extendFlat,dF={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:ODt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:qDt({editType:"calc"}),uhoverformat:KA("u",1),vhoverformat:KA("v",1),whoverformat:KA("w",1),xhoverformat:KA("x"),yhoverformat:KA("y"),zhoverformat:KA("z"),showlegend:hZ({},dRe.showlegend,{dflt:!1})};hZ(dF,zDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var NDt=["opacity","lightposition","lighting"];NDt.forEach(function(e){dF[e]=BDt[e]});dF.hoverinfo=hZ({},dRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});vRe.exports=dF});var gRe=ye((Kgr,pRe)=>{"use strict";var UDt=Dr(),VDt=Qh(),GDt=dZ();pRe.exports=function(t,r,n,i){function a(h,d){return UDt.coerce(t,r,GDt,h,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),VDt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var ARe=ye((Jgr,TRe)=>{"use strict";var _Re=Od().gl_streamtube3d,HDt=_Re.createTubeMesh,jDt=Dr(),WDt=$y().parseColorScale,XDt=tc().extractOpts,mRe=ZA(),xRe={xaxis:0,yaxis:1,zaxis:2};function bRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var pZ=bRe.prototype;pZ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[xRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var i=e.data.position,a=e.data.velocity;return e.traceCoordinate=[n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function yRe(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 vZ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function wRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(z,O){var V=r[O],G=n[xRe[O]];return jDt.simpleMap(z,function(Z){return V.d2l(Z)*G})}if(a.vectors=mRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=mRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=yRe(s),d=yRe(u),v=new Array(h.length*d.length),_=0,b=0;b{"use strict";SRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:dZ(),supplyDefaults:gRe(),colorbar:{min:"cmin",max:"cmax"},calc:lF().calc,plot:ARe(),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 kRe=ye((Qgr,ERe)=>{"use strict";ERe.exports=MRe()});var j2=ye((tmr,IRe)=>{"use strict";var{hovertemplateAttrs:YDt,texttemplateAttrs:KDt,templatefallbackAttrs:CRe}=Ll(),JDt=Cg(),Wm=pf(),$Dt=Gl(),LRe=Tu(),QDt=Pd().dash,H2=Ao().extendFlat,eFt=mc().overrideAll,eg=Wm.marker,PRe=Wm.line,tFt=eg.line,emr=["The library used by the *country names* `locationmode` option is changing in an upcoming version.","Country names in existing plots may not work in the new version."].join(" ");IRe.exports=eFt({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:H2({},Wm.mode,{dflt:"markers"}),text:H2({},Wm.text,{}),texttemplate:KDt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:CRe({editType:"plot"}),hovertext:H2({},Wm.hovertext,{}),textfont:Wm.textfont,textposition:Wm.textposition,line:{color:PRe.color,width:PRe.width,dash:QDt},connectgaps:Wm.connectgaps,marker:H2({symbol:eg.symbol,opacity:eg.opacity,angle:eg.angle,angleref:H2({},eg.angleref,{values:["previous","up","north"]}),standoff:eg.standoff,size:eg.size,sizeref:eg.sizeref,sizemin:eg.sizemin,sizemode:eg.sizemode,colorbar:eg.colorbar,line:H2({width:tFt.width},LRe("marker.line")),gradient:eg.gradient},LRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:JDt(),selected:Wm.selected,unselected:Wm.unselected,hoverinfo:H2({},$Dt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:YDt(),hovertemplatefallback:CRe()},"calc","nested")});var DRe=ye((rmr,RRe)=>{"use strict";var vF=Dr(),gZ=Ru(),rFt=$p(),iFt=R0(),nFt=D0(),aFt=Rg(),oFt=j2(),sFt=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");RRe.exports=function(t,r,n,i){function a(d,v){return vF.coerce(t,r,oFt,d,v)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||vF.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&vF.warn(sFt),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"),gZ.hasMarkers(r)&&rFt(t,r,n,i,a,{gradient:!0}),gZ.hasLines(r)&&(iFt(t,r,n,i,a),a("connectgaps")),gZ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),nFt(t,r,i,a)),a("fill"),r.fill!=="none"&&aFt(t,r,n,a),vF.coerceSelectionMarkerOpacity(r,a)}});var ORe=ye((imr,zRe)=>{"use strict";var FRe=ho();zRe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=FRe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=FRe.tickText(o,o.c2l(s[1]),!0).text,i}});var pF=ye((nmr,URe)=>{"use strict";var mZ=Eo(),qRe=fs().BADNUM,lFt=F0(),uFt=km(),cFt=z0(),fFt=Dr().isArrayOrTypedArray,BRe=Dr()._;function NRe(e){return e&&typeof e=="string"}URe.exports=function(t,r){var n=fFt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return NRe(h)||mZ(h)}:o=NRe;for(var s=0;s{"use strict";Mv.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};Mv.axesNames=["lonaxis","lataxis"];Mv.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Mv.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Mv.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};Mv.clipPad=.001;Mv.precision=.1;Mv.landColor="#F0DC82";Mv.waterColor="#3399FF";Mv.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Mv.sphereSVG={type:"Sphere"};Mv.fillLayers={ocean:1,land:1,lakes:1};Mv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Mv.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Mv.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Mv.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var yZ=ye((gF,VRe)=>{(function(e,t){typeof gF=="object"&&typeof VRe!="undefined"?t(gF):(e=e||self,t(e.topojson=e.topojson||{}))})(gF,function(e){"use strict";function t(E){return E}function r(E){if(E==null)return t;var S,L,x=E.scale[0],C=E.scale[1],M=E.translate[0],g=E.translate[1];return function(P,T){T||(S=L=0);var z=2,O=P.length,V=new Array(O);for(V[0]=(S+=P[0])*x+M,V[1]=(L+=P[1])*C+g;zM&&(M=z[0]),z[1]g&&(g=z[1])}function T(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(T);break;case"Point":P(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(P);break}}E.arcs.forEach(function(z){for(var O=-1,V=z.length,G;++OM&&(M=G[0]),G[1]g&&(g=G[1])});for(L in E.objects)T(E.objects[L]);return[x,C,M,g]}function i(E,S){for(var L,x=E.length,C=x-S;C<--x;)L=E[C],E[C++]=E[x],E[x]=L}function a(E,S){return typeof S=="string"&&(S=E.objects[S]),S.type==="GeometryCollection"?{type:"FeatureCollection",features:S.geometries.map(function(L){return o(E,L)})}:o(E,S)}function o(E,S){var L=S.id,x=S.bbox,C=S.properties==null?{}:S.properties,M=s(E,S);return L==null&&x==null?{type:"Feature",properties:C,geometry:M}:x==null?{type:"Feature",id:L,properties:C,geometry:M}:{type:"Feature",id:L,bbox:x,properties:C,geometry:M}}function s(E,S){var L=r(E.transform),x=E.arcs;function C(O,V){V.length&&V.pop();for(var G=x[O<0?~O:O],Z=0,j=G.length;Z1)x=f(E,S,L);else for(C=0,x=new Array(M=E.arcs.length);C1)for(var V=1,G=P(z[0]),Z,j;VG&&(j=z[0],z[0]=z[V],z[V]=j,G=Z);return z}).filter(function(T){return T.length>0})}}function _(E,S){for(var L=0,x=E.length;L>>1;E[C]=2))throw new Error("n must be \u22652");T=E.bbox||n(E);var L=T[0],x=T[1],C=T[2],M=T[3],g;S={scale:[C-L?(C-L)/(g-1):1,M-x?(M-x)/(g-1):1],translate:[L,x]}}else T=E.bbox;var P=p(S),T,z,O=E.objects,V={};function G(N){return P(N)}function Z(N){var H;switch(N.type){case"GeometryCollection":H={type:"GeometryCollection",geometries:N.geometries.map(Z)};break;case"Point":H={type:"Point",coordinates:G(N.coordinates)};break;case"MultiPoint":H={type:"MultiPoint",coordinates:N.coordinates.map(G)};break;default:return N}return N.id!=null&&(H.id=N.id),N.bbox!=null&&(H.bbox=N.bbox),N.properties!=null&&(H.properties=N.properties),H}function j(N){var H=0,te=1,oe=N.length,_e,Ee=new Array(oe);for(Ee[0]=P(N[0],0);++H{"use strict";var _Z=GRe.exports={},hFt=tk().locationmodeToLayer,dFt=yZ().feature;_Z.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};_Z.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};_Z.getTopojsonFeatures=function(e,t){var r=hFt[e.locationmode],n=t.objects[r];return dFt(t,n).features}});var tx=ye(rk=>{"use strict";var vFt=fs().BADNUM;rk.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],i=[],a=0;a0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};rk.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};rk.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{HRe.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xE7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xE3)o.?tom(e|\xE9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}});var xF=ye(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var Op=63710088e-1,bZ={centimeters:Op*100,centimetres:Op*100,degrees:360/(2*Math.PI),feet:Op*3.28084,inches:Op*39.37,kilometers:Op/1e3,kilometres:Op/1e3,meters:Op,metres:Op,miles:Op/1609.344,millimeters:Op*1e3,millimetres:Op*1e3,nauticalmiles:Op/1852,radians:1,yards:Op*1.0936},xZ={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function rx(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function pFt(e,t,r={}){switch(e){case"Point":return wZ(t).geometry;case"LineString":return AZ(t).geometry;case"Polygon":return TZ(t).geometry;case"MultiPoint":return XRe(t).geometry;case"MultiLineString":return WRe(t).geometry;case"MultiPolygon":return ZRe(t).geometry;default:throw new Error(e+" is invalid")}}function wZ(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(!yF(e[0])||!yF(e[1]))throw new Error("coordinates must contain numbers");return rx({type:"Point",coordinates:e},t,r)}function gFt(e,t,r={}){return _F(e.map(n=>wZ(n,t)),r)}function TZ(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;aTZ(n,t)),r)}function AZ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return rx({type:"LineString",coordinates:e},t,r)}function yFt(e,t,r={}){return _F(e.map(n=>AZ(n,t)),r)}function _F(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function WRe(e,t,r={}){return rx({type:"MultiLineString",coordinates:e},t,r)}function XRe(e,t,r={}){return rx({type:"MultiPoint",coordinates:e},t,r)}function ZRe(e,t,r={}){return rx({type:"MultiPolygon",coordinates:e},t,r)}function _Ft(e,t,r={}){return rx({type:"GeometryCollection",geometries:e},t,r)}function xFt(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 YRe(e,t="kilometers"){let r=bZ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function SZ(e,t="kilometers"){let r=bZ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function bFt(e,t){return KRe(SZ(e,t))}function wFt(e){let t=e%360;return t<0&&(t+=360),t}function TFt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function KRe(e){return e%(2*Math.PI)*180/Math.PI}function AFt(e){return e%360*Math.PI/180}function SFt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return YRe(SZ(e,t),r)}function MFt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=xZ[t];if(!n)throw new Error("invalid original units");let i=xZ[r];if(!i)throw new Error("invalid final units");return e/n*i}function yF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function EFt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function kFt(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(!yF(t))throw new Error("bbox must only contain numbers")})}function CFt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}ic.areaFactors=xZ;ic.azimuthToBearing=TFt;ic.bearingToAzimuth=wFt;ic.convertArea=MFt;ic.convertLength=SFt;ic.degreesToRadians=AFt;ic.earthRadius=Op;ic.factors=bZ;ic.feature=rx;ic.featureCollection=_F;ic.geometry=pFt;ic.geometryCollection=_Ft;ic.isNumber=yF;ic.isObject=EFt;ic.lengthToDegrees=bFt;ic.lengthToRadians=SZ;ic.lineString=AZ;ic.lineStrings=yFt;ic.multiLineString=WRe;ic.multiPoint=XRe;ic.multiPolygon=ZRe;ic.point=wZ;ic.points=gFt;ic.polygon=TZ;ic.polygons=mFt;ic.radiansToDegrees=KRe;ic.radiansToLength=YRe;ic.round=xFt;ic.validateBBox=kFt;ic.validateId=CFt});var wF=ye(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Wv=xF();function ik(e,t,r){if(e!==null)for(var n,i,a,o,s,l,u,c=0,f=0,h,d=e.type,v=d==="FeatureCollection",_=d==="Feature",b=v?e.features.length:1,p=0;pl||v>u||_>c){s=f,l=n,u=v,c=_,a=0;return}var b=Wv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,_,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function zFt(e,t,r){var n=r,i=!1;return QRe(e,function(a,o,s,l,u){i===!1&&r===void 0?n=a:n=t(n,a,o,s,l,u),i=!0}),n}function eDe(e,t){if(!e)throw new Error("geojson is required");bF(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(TF,"__esModule",{value:!0});var tDe=xF(),NFt=wF();function nDe(e){return NFt.geomReduce.call(void 0,e,(t,r)=>t+UFt(r),0)}function UFt(e){let t=0,r;switch(e.type){case"Polygon":return rDe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(iDe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*EZ,l=a[1]*EZ,u=o[0]*EZ;r+=(u-s)*Math.sin(l),n++}return r*VFt}var GFt=nDe;TF.area=nDe;TF.default=GFt});var sDe=ye(AF=>{"use strict";Object.defineProperty(AF,"__esModule",{value:!0});var HFt=xF(),jFt=wF();function oDe(e,t={}){let r=0,n=0,i=0;return jFt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),HFt.point.call(void 0,[r/i,n/i],t.properties)}var WFt=oDe;AF.centroid=oDe;AF.default=WFt});var uDe=ye(SF=>{"use strict";Object.defineProperty(SF,"__esModule",{value:!0});var XFt=wF();function lDe(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return XFt.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]{"use strict";var YFt=Oa(),hDe=jRe(),{area:KFt}=aDe(),{centroid:JFt}=sDe(),{bbox:$Ft}=uDe(),cDe=HS(),JA=G1(),QFt=my(),ezt=PS(),MF=kM(),fDe=Object.keys(hDe),tzt={"ISO-3":cDe,"USA-states":cDe,"country names":rzt};function rzt(e){for(var t=0;t0&&c[f+1][0]<0)return f;return null}switch(n==="RUS"||n==="FJI"?a=function(c){var f;if(u(c)===null)f=c;else for(f=new Array(c.length),l=0;lf?h[d++]=[c[l][0]+360,c[l][1]]:l===f?(h[d++]=c[l],h[d++]=[c[l][0],-90]):h[d++]=c[l];var v=MF.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(MF.tester(c))},t.type){case"MultiPolygon":for(o=0;o0?v.properties.ct=ozt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else JA.log(["Location",h.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[f]}switch(r.type){case"FeatureCollection":var l=r.features;for(a=0;ai&&(i=s,r=o)}else r=t;return JFt(r).geometry.coordinates}function szt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){YFt.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(d))}return t[l]=h,u(h)})})}function i(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;a{"use strict";var uzt=Oa(),czt=So(),pDe=ka(),gDe=op(),fzt=gDe.stylePoints,hzt=gDe.styleText;mDe.exports=function(t,r){r&&dzt(t,r)};function dzt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),fzt(n,r,e),hzt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=uzt.select(this),o=i.trace,s=o.line||{};a.call(pDe.stroke,s.color).call(czt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(pDe.fill,o.fillcolor)})}});var IZ=ye((gmr,xDe)=>{"use strict";var yDe=Oa(),kF=Dr(),vzt=mF().getTopojsonFeatures,CZ=tx(),EF=ix(),_De=Ag().findExtremes,PZ=fs().BADNUM,pzt=O0().calcMarkerSize,LZ=Ru(),gzt=kZ();function mzt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=kF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===PZ&&yDe.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=yDe.select(this),l=o[0].trace;if(LZ.hasLines(l)||l.fill!=="none"){var u=CZ.calcTraceToLineCoords(o),c=l.fill!=="none"?CZ.makePolygon(u):CZ.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}LZ.hasMarkers(l)&&s.selectAll("path.point").data(kF.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),LZ.hasText(l)&&s.selectAll("g").data(kF.identity).enter().append("g").append("text").each(function(f){a(f,this)}),gzt(e,o)})}function yzt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(kF.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?EF.extractTraceFeature(e):vzt(r,i.topojson);for(o=0;o{"use strict";var _zt=vf(),xzt=fs().BADNUM,bzt=cT(),wzt=Dr().fillText,Tzt=j2();bDe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(k){var E=k.lonlat;if(E[0]===xzt||u(E))return 1/0;var S=c(E),L=c([r,n]),x=Math.abs(S[0]-L[0]),C=Math.abs(S[1]-L[1]),M=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(x*x+C*C)-M,1-3/M)}if(_zt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],_=h.mrc||1;t.x0=v[0]-_,t.x1=v[0]+_,t.y0=v[1]-_,t.y1=v[1]+_,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var p=a._module.formatLabels(h,a,b);return t.lonLabel=p.lonLabel,t.latLabel=p.latLabel,t.color=bzt(a,h),t.extraText=Azt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Azt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?Tzt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&wzt(t,e,c),c.join("
")}});var ADe=ye((ymr,TDe)=>{"use strict";TDe.exports=function(t,r,n,i,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var EDe=ye((_mr,MDe)=>{"use strict";var SDe=Ru(),Szt=fs().BADNUM;MDe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,d=!SDe.hasMarkers(s)&&!SDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){t(typeof CF=="object"&&typeof kDe!="undefined"?CF:e.d3=e.d3||{})})(CF,function(e){"use strict";function t(Le,Ae){return LeAe?1:Le>=Ae?0:NaN}function r(Le){return Le.length===1&&(Le=n(Le)),{left:function(Ae,Fe,Pe,ge){for(Pe==null&&(Pe=0),ge==null&&(ge=Ae.length);Pe>>1;Le(Ae[Re],Fe)<0?Pe=Re+1:ge=Re}return Pe},right:function(Ae,Fe,Pe,ge){for(Pe==null&&(Pe=0),ge==null&&(ge=Ae.length);Pe>>1;Le(Ae[Re],Fe)>0?ge=Re:Pe=Re+1}return Pe}}}function n(Le){return function(Ae,Fe){return t(Le(Ae),Fe)}}var i=r(t),a=i.right,o=i.left;function s(Le,Ae){Ae==null&&(Ae=l);for(var Fe=0,Pe=Le.length-1,ge=Le[0],Re=new Array(Pe<0?0:Pe);FeLe?1:Ae>=Le?0:NaN}function f(Le){return Le===null?NaN:+Le}function h(Le,Ae){var Fe=Le.length,Pe=0,ge=-1,Re=0,ce,Ze,ut=0;if(Ae==null)for(;++ge1)return ut/(Pe-1)}function d(Le,Ae){var Fe=h(Le,Ae);return Fe&&Math.sqrt(Fe)}function v(Le,Ae){var Fe=Le.length,Pe=-1,ge,Re,ce;if(Ae==null){for(;++Pe=ge)for(Re=ce=ge;++Pege&&(Re=ge),ce=ge)for(Re=ce=ge;++Pege&&(Re=ge),ce0)return[Le];if((Pe=Ae0)for(Le=Math.ceil(Le/Ze),Ae=Math.floor(Ae/Ze),ce=new Array(Re=Math.ceil(Ae-Le+1));++ge=0?(Re>=L?10:Re>=x?5:Re>=C?2:1)*Math.pow(10,ge):-Math.pow(10,-ge)/(Re>=L?10:Re>=x?5:Re>=C?2:1)}function P(Le,Ae,Fe){var Pe=Math.abs(Ae-Le)/Math.max(0,Fe),ge=Math.pow(10,Math.floor(Math.log(Pe)/Math.LN10)),Re=Pe/ge;return Re>=L?ge*=10:Re>=x?ge*=5:Re>=C&&(ge*=2),Aest;)lt.pop(),--Gt;var Nt=new Array(Gt+1),Jt;for(Re=0;Re<=Gt;++Re)Jt=Nt[Re]=[],Jt.x0=Re>0?lt[Re-1]:Zt,Jt.x1=Re=1)return+Fe(Le[Pe-1],Pe-1,Le);var Pe,ge=(Pe-1)*Ae,Re=Math.floor(ge),ce=+Fe(Le[Re],Re,Le),Ze=+Fe(Le[Re+1],Re+1,Le);return ce+(Ze-ce)*(ge-Re)}}function V(Le,Ae,Fe){return Le=p.call(Le,f).sort(t),Math.ceil((Fe-Ae)/(2*(O(Le,.75)-O(Le,.25))*Math.pow(Le.length,-1/3)))}function G(Le,Ae,Fe){return Math.ceil((Fe-Ae)/(3.5*d(Le)*Math.pow(Le.length,-1/3)))}function Z(Le,Ae){var Fe=Le.length,Pe=-1,ge,Re;if(Ae==null){for(;++Pe=ge)for(Re=ge;++PeRe&&(Re=ge)}else for(;++Pe=ge)for(Re=ge;++PeRe&&(Re=ge);return Re}function j(Le,Ae){var Fe=Le.length,Pe=Fe,ge=-1,Re,ce=0;if(Ae==null)for(;++ge=0;)for(ce=Le[Ae],Fe=ce.length;--Fe>=0;)Re[--ge]=ce[Fe];return Re}function te(Le,Ae){var Fe=Le.length,Pe=-1,ge,Re;if(Ae==null){for(;++Pe=ge)for(Re=ge;++Pege&&(Re=ge)}else for(;++Pe=ge)for(Re=ge;++Pege&&(Re=ge);return Re}function oe(Le,Ae){for(var Fe=Ae.length,Pe=new Array(Fe);Fe--;)Pe[Fe]=Le[Ae[Fe]];return Pe}function _e(Le,Ae){if(Fe=Le.length){var Fe,Pe=0,ge=0,Re,ce=Le[ge];for(Ae==null&&(Ae=t);++Pe{(function(e,t){typeof LF=="object"&&typeof CDe!="undefined"?t(LF,nk()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(LF,function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(At){a(i,At,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(At,Wt,Cr){var Ar=At.s=Wt+Cr,Kr=Ar-Wt,ki=Ar-Kr;At.t=Wt-ki+(Cr-Kr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,v=Math.abs,_=Math.atan,b=Math.atan2,p=Math.cos,k=Math.ceil,E=Math.exp,S=Math.log,L=Math.pow,x=Math.sin,C=Math.sign||function(At){return At>0?1:At<0?-1:0},M=Math.sqrt,g=Math.tan;function P(At){return At>1?0:At<-1?l:Math.acos(At)}function T(At){return At>1?u:At<-1?-u:Math.asin(At)}function z(At){return(At=x(At/2))*At}function O(){}function V(At,Wt){At&&Z.hasOwnProperty(At.type)&&Z[At.type](At,Wt)}var G={Feature:function(At,Wt){V(At.geometry,Wt)},FeatureCollection:function(At,Wt){for(var Cr=At.features,Ar=-1,Kr=Cr.length;++Ar=0?1:-1,Kr=Ar*Cr,ki=p(Wt),Xi=x(Wt),dn=ie*Xi,wn=me*ki+dn*p(Kr),Nn=dn*Ar*x(Kr);te.add(b(Nn,wn)),Ce=At,me=ki,ie=Xi}function ge(At){return oe.reset(),H(At,Se),oe*2}function Re(At){return[b(At[1],At[0]),T(At[2])]}function ce(At){var Wt=At[0],Cr=At[1],Ar=p(Cr);return[Ar*p(Wt),Ar*x(Wt),x(Cr)]}function Ze(At,Wt){return At[0]*Wt[0]+At[1]*Wt[1]+At[2]*Wt[2]}function ut(At,Wt){return[At[1]*Wt[2]-At[2]*Wt[1],At[2]*Wt[0]-At[0]*Wt[2],At[0]*Wt[1]-At[1]*Wt[0]]}function pt(At,Wt){At[0]+=Wt[0],At[1]+=Wt[1],At[2]+=Wt[2]}function Zt(At,Wt){return[At[0]*Wt,At[1]*Wt,At[2]*Wt]}function st(At){var Wt=M(At[0]*At[0]+At[1]*At[1]+At[2]*At[2]);At[0]/=Wt,At[1]/=Wt,At[2]/=Wt}var lt,Gt,Nt,Jt,sr,wr,cr,$e,St=r(),Qt,Vt,_t={point:It,lineStart:er,lineEnd:lr,polygonStart:function(){_t.point=Tr,_t.lineStart=Lr,_t.lineEnd=ti,St.reset(),Se.polygonStart()},polygonEnd:function(){Se.polygonEnd(),_t.point=It,_t.lineStart=er,_t.lineEnd=lr,te<0?(lt=-(Nt=180),Gt=-(Jt=90)):St>o?Jt=90:St<-o&&(Gt=-90),Vt[0]=lt,Vt[1]=Nt},sphere:function(){lt=-(Nt=180),Gt=-(Jt=90)}};function It(At,Wt){Qt.push(Vt=[lt=At,Nt=At]),WtJt&&(Jt=Wt)}function mt(At,Wt){var Cr=ce([At*d,Wt*d]);if($e){var Ar=ut($e,Cr),Kr=[Ar[1],-Ar[0],0],ki=ut(Kr,Ar);st(ki),ki=Re(ki);var Xi=At-sr,dn=Xi>0?1:-1,wn=ki[0]*h*dn,Nn,Yi=v(Xi)>180;Yi^(dn*srJt&&(Jt=Nn)):(wn=(wn+360)%360-180,Yi^(dn*srJt&&(Jt=Wt))),Yi?AtBr(lt,Nt)&&(Nt=At):Br(At,Nt)>Br(lt,Nt)&&(lt=At):Nt>=lt?(AtNt&&(Nt=At)):At>sr?Br(lt,At)>Br(lt,Nt)&&(Nt=At):Br(At,Nt)>Br(lt,Nt)&&(lt=At)}else Qt.push(Vt=[lt=At,Nt=At]);WtJt&&(Jt=Wt),$e=Cr,sr=At}function er(){_t.point=mt}function lr(){Vt[0]=lt,Vt[1]=Nt,_t.point=It,$e=null}function Tr(At,Wt){if($e){var Cr=At-sr;St.add(v(Cr)>180?Cr+(Cr>0?360:-360):Cr)}else wr=At,cr=Wt;Se.point(At,Wt),mt(At,Wt)}function Lr(){Se.lineStart()}function ti(){Tr(wr,cr),Se.lineEnd(),v(St)>o&&(lt=-(Nt=180)),Vt[0]=lt,Vt[1]=Nt,$e=null}function Br(At,Wt){return(Wt-=At)<0?Wt+360:Wt}function Vr(At,Wt){return At[0]-Wt[0]}function dt(At,Wt){return At[0]<=At[1]?At[0]<=Wt&&Wt<=At[1]:WtBr(Ar[0],Ar[1])&&(Ar[1]=Kr[1]),Br(Kr[0],Ar[1])>Br(Ar[0],Ar[1])&&(Ar[0]=Kr[0])):ki.push(Ar=Kr);for(Xi=-1/0,Cr=ki.length-1,Wt=0,Ar=ki[Cr];Wt<=Cr;Ar=Kr,++Wt)Kr=ki[Wt],(dn=Br(Ar[1],Kr[0]))>Xi&&(Xi=dn,lt=Kr[0],Nt=Ar[1])}return Qt=Vt=null,lt===1/0||Gt===1/0?[[NaN,NaN],[NaN,NaN]]:[[lt,Gt],[Nt,Jt]]}var Je,je,tt,xt,Ie,xe,ke,vt,ir,ar,vr,ii,pi,$r,di,ji,In={sphere:O,point:wi,lineStart:qn,lineEnd:la,polygonStart:function(){In.lineStart=Ut,In.lineEnd=wt},polygonEnd:function(){In.lineStart=qn,In.lineEnd=la}};function wi(At,Wt){At*=d,Wt*=d;var Cr=p(Wt);On(Cr*p(At),Cr*x(At),x(Wt))}function On(At,Wt,Cr){++Je,tt+=(At-tt)/Je,xt+=(Wt-xt)/Je,Ie+=(Cr-Ie)/Je}function qn(){In.point=Fn}function Fn(At,Wt){At*=d,Wt*=d;var Cr=p(Wt);$r=Cr*p(At),di=Cr*x(At),ji=x(Wt),In.point=ra,On($r,di,ji)}function ra(At,Wt){At*=d,Wt*=d;var Cr=p(Wt),Ar=Cr*p(At),Kr=Cr*x(At),ki=x(Wt),Xi=b(M((Xi=di*ki-ji*Kr)*Xi+(Xi=ji*Ar-$r*ki)*Xi+(Xi=$r*Kr-di*Ar)*Xi),$r*Ar+di*Kr+ji*ki);je+=Xi,xe+=Xi*($r+($r=Ar)),ke+=Xi*(di+(di=Kr)),vt+=Xi*(ji+(ji=ki)),On($r,di,ji)}function la(){In.point=wi}function Ut(){In.point=rr}function wt(){nr(ii,pi),In.point=wi}function rr(At,Wt){ii=At,pi=Wt,At*=d,Wt*=d,In.point=nr;var Cr=p(Wt);$r=Cr*p(At),di=Cr*x(At),ji=x(Wt),On($r,di,ji)}function nr(At,Wt){At*=d,Wt*=d;var Cr=p(Wt),Ar=Cr*p(At),Kr=Cr*x(At),ki=x(Wt),Xi=di*ki-ji*Kr,dn=ji*Ar-$r*ki,wn=$r*Kr-di*Ar,Nn=M(Xi*Xi+dn*dn+wn*wn),Yi=T(Nn),Qi=Nn&&-Yi/Nn;ir+=Qi*Xi,ar+=Qi*dn,vr+=Qi*wn,je+=Yi,xe+=Yi*($r+($r=Ar)),ke+=Yi*(di+(di=Kr)),vt+=Yi*(ji+(ji=ki)),On($r,di,ji)}function Er(At){Je=je=tt=xt=Ie=xe=ke=vt=ir=ar=vr=0,H(At,In);var Wt=ir,Cr=ar,Ar=vr,Kr=Wt*Wt+Cr*Cr+Ar*Ar;return Krl?At+Math.round(-At/f)*f:At,Wt]}Qr.invert=Qr;function Oi(At,Wt,Cr){return(At%=f)?Wt||Cr?ri(tn(At),fn(Wt,Cr)):tn(At):Wt||Cr?fn(Wt,Cr):Qr}function $i(At){return function(Wt,Cr){return Wt+=At,[Wt>l?Wt-f:Wt<-l?Wt+f:Wt,Cr]}}function tn(At){var Wt=$i(At);return Wt.invert=$i(-At),Wt}function fn(At,Wt){var Cr=p(At),Ar=x(At),Kr=p(Wt),ki=x(Wt);function Xi(dn,wn){var Nn=p(wn),Yi=p(dn)*Nn,Qi=x(dn)*Nn,on=x(wn),Fi=on*Cr+Yi*Ar;return[b(Qi*Kr-Fi*ki,Yi*Cr-on*Ar),T(Fi*Kr+Qi*ki)]}return Xi.invert=function(dn,wn){var Nn=p(wn),Yi=p(dn)*Nn,Qi=x(dn)*Nn,on=x(wn),Fi=on*Kr-Qi*ki;return[b(Qi*Kr+on*ki,Yi*Cr+Fi*Ar),T(Fi*Cr-Yi*Ar)]},Xi}function yn(At){At=Oi(At[0]*d,At[1]*d,At.length>2?At[2]*d:0);function Wt(Cr){return Cr=At(Cr[0]*d,Cr[1]*d),Cr[0]*=h,Cr[1]*=h,Cr}return Wt.invert=function(Cr){return Cr=At.invert(Cr[0]*d,Cr[1]*d),Cr[0]*=h,Cr[1]*=h,Cr},Wt}function Sn(At,Wt,Cr,Ar,Kr,ki){if(Cr){var Xi=p(Wt),dn=x(Wt),wn=Ar*Cr;Kr==null?(Kr=Wt+Ar*f,ki=Wt-wn/2):(Kr=Ba(Xi,Kr),ki=Ba(Xi,ki),(Ar>0?Krki)&&(Kr+=Ar*f));for(var Nn,Yi=Kr;Ar>0?Yi>ki:Yi1&&At.push(At.pop().concat(At.shift()))},result:function(){var Cr=At;return At=[],Wt=null,Cr}}}function Wa(At,Wt){return v(At[0]-Wt[0])=0;--dn)Kr.point((Qi=Yi[dn])[0],Qi[1]);else Ar(on.x,on.p.x,-1,Kr);on=on.p}on=on.o,Yi=on.z,Fi=!Fi}while(!on.v);Kr.lineEnd()}}}function da(At){if(Wt=At.length){for(var Wt,Cr=0,Ar=At[0],Kr;++Cr=0?1:-1,as=Ss*Xo,ws=as>l,Ho=Ca*Ka;if(Wn.add(b(Ho*Ss*x(as),Ra*bo+Ho*p(as))),Xi+=ws?Xo+Ss*f:Xo,ws^Fi>=Cr^Yn>=Cr){var ml=ut(ce(on),ce(Na));st(ml);var Ws=ut(ki,ml);st(Ws);var Ls=(ws^Xo>=0?-1:1)*T(Ws[2]);(Ar>Ls||Ar===Ls&&(ml[0]||ml[1]))&&(dn+=ws^Xo>=0?1:-1)}}return(Xi<-o||Xi0){for(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),bo=0;bo1&&Dn&2&&Ka.push(Ka.pop().concat(Ka.shift())),Yi.push(Ka.filter(Mt))}}return on}}function Mt(At){return At.length>1}function kr(At,Wt){return((At=At.x)[0]<0?At[1]-u-o:u-At[1])-((Wt=Wt.x)[0]<0?Wt[1]-u-o:u-Wt[1])}var Jr=jn(function(){return!0},vi,An,[-l,-u]);function vi(At){var Wt=NaN,Cr=NaN,Ar=NaN,Kr;return{lineStart:function(){At.lineStart(),Kr=1},point:function(ki,Xi){var dn=ki>0?l:-l,wn=v(ki-Wt);v(wn-l)0?u:-u),At.point(Ar,Cr),At.lineEnd(),At.lineStart(),At.point(dn,Cr),At.point(ki,Cr),Kr=0):Ar!==dn&&wn>=l&&(v(Wt-Ar)o?_((x(Wt)*(ki=p(Ar))*x(Cr)-x(Ar)*(Kr=p(Wt))*x(At))/(Kr*ki*Xi)):(Wt+Ar)/2}function An(At,Wt,Cr,Ar){var Kr;if(At==null)Kr=Cr*u,Ar.point(-l,Kr),Ar.point(0,Kr),Ar.point(l,Kr),Ar.point(l,0),Ar.point(l,-Kr),Ar.point(0,-Kr),Ar.point(-l,-Kr),Ar.point(-l,0),Ar.point(-l,Kr);else if(v(At[0]-Wt[0])>o){var ki=At[0]0,Kr=v(Wt)>o;function ki(Yi,Qi,on,Fi){Sn(Fi,At,Cr,on,Yi,Qi)}function Xi(Yi,Qi){return p(Yi)*p(Qi)>Wt}function dn(Yi){var Qi,on,Fi,$n,Ca;return{lineStart:function(){$n=Fi=!1,Ca=1},point:function(Ra,La){var Na=[Ra,La],Yn,Dn=Xi(Ra,La),Ka=Ar?Dn?0:Nn(Ra,La):Dn?Nn(Ra+(Ra<0?l:-l),La):0;if(!Qi&&($n=Fi=Dn)&&Yi.lineStart(),Dn!==Fi&&(Yn=wn(Qi,Na),(!Yn||Wa(Qi,Yn)||Wa(Na,Yn))&&(Na[2]=1)),Dn!==Fi)Ca=0,Dn?(Yi.lineStart(),Yn=wn(Na,Qi),Yi.point(Yn[0],Yn[1])):(Yn=wn(Qi,Na),Yi.point(Yn[0],Yn[1],2),Yi.lineEnd()),Qi=Yn;else if(Kr&&Qi&&Ar^Dn){var bo;!(Ka&on)&&(bo=wn(Na,Qi,!0))&&(Ca=0,Ar?(Yi.lineStart(),Yi.point(bo[0][0],bo[0][1]),Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd()):(Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd(),Yi.lineStart(),Yi.point(bo[0][0],bo[0][1],3)))}Dn&&(!Qi||!Wa(Qi,Na))&&Yi.point(Na[0],Na[1]),Qi=Na,Fi=Dn,on=Ka},lineEnd:function(){Fi&&Yi.lineEnd(),Qi=null},clean:function(){return Ca|($n&&Fi)<<1}}}function wn(Yi,Qi,on){var Fi=ce(Yi),$n=ce(Qi),Ca=[1,0,0],Ra=ut(Fi,$n),La=Ze(Ra,Ra),Na=Ra[0],Yn=La-Na*Na;if(!Yn)return!on&&Yi;var Dn=Wt*La/Yn,Ka=-Wt*Na/Yn,bo=ut(Ca,Ra),Xo=Zt(Ca,Dn),Ss=Zt(Ra,Ka);pt(Xo,Ss);var as=bo,ws=Ze(Xo,as),Ho=Ze(as,as),ml=ws*ws-Ho*(Ze(Xo,Xo)-1);if(!(ml<0)){var Ws=M(ml),Ls=Zt(as,(-ws-Ws)/Ho);if(pt(Ls,Xo),Ls=Re(Ls),!on)return Ls;var va=Yi[0],no=Qi[0],ys=Yi[1],rs=Qi[1],$l;no0^Ls[1]<(v(Ls[0]-va)l^(va<=Ls[0]&&Ls[0]<=no)){var pu=Zt(as,(-ws+Ws)/Ho);return pt(pu,Xo),[Ls,Re(pu)]}}}function Nn(Yi,Qi){var on=Ar?At:l-At,Fi=0;return Yi<-on?Fi|=1:Yi>on&&(Fi|=2),Qi<-on?Fi|=4:Qi>on&&(Fi|=8),Fi}return jn(Xi,dn,ki,Ar?[0,-At]:[-l,At-l])}function Li(At,Wt,Cr,Ar,Kr,ki){var Xi=At[0],dn=At[1],wn=Wt[0],Nn=Wt[1],Yi=0,Qi=1,on=wn-Xi,Fi=Nn-dn,$n;if($n=Cr-Xi,!(!on&&$n>0)){if($n/=on,on<0){if($n0){if($n>Qi)return;$n>Yi&&(Yi=$n)}if($n=Kr-Xi,!(!on&&$n<0)){if($n/=on,on<0){if($n>Qi)return;$n>Yi&&(Yi=$n)}else if(on>0){if($n0)){if($n/=Fi,Fi<0){if($n0){if($n>Qi)return;$n>Yi&&(Yi=$n)}if($n=ki-dn,!(!Fi&&$n<0)){if($n/=Fi,Fi<0){if($n>Qi)return;$n>Yi&&(Yi=$n)}else if(Fi>0){if($n0&&(At[0]=Xi+Yi*on,At[1]=dn+Yi*Fi),Qi<1&&(Wt[0]=Xi+Qi*on,Wt[1]=dn+Qi*Fi),!0}}}}}var _n=1e9,ya=-_n;function Jn(At,Wt,Cr,Ar){function Kr(Nn,Yi){return At<=Nn&&Nn<=Cr&&Wt<=Yi&&Yi<=Ar}function ki(Nn,Yi,Qi,on){var Fi=0,$n=0;if(Nn==null||(Fi=Xi(Nn,Qi))!==($n=Xi(Yi,Qi))||wn(Nn,Yi)<0^Qi>0)do on.point(Fi===0||Fi===3?At:Cr,Fi>1?Ar:Wt);while((Fi=(Fi+Qi+4)%4)!==$n);else on.point(Yi[0],Yi[1])}function Xi(Nn,Yi){return v(Nn[0]-At)0?0:3:v(Nn[0]-Cr)0?2:1:v(Nn[1]-Wt)0?1:0:Yi>0?3:2}function dn(Nn,Yi){return wn(Nn.x,Yi.x)}function wn(Nn,Yi){var Qi=Xi(Nn,1),on=Xi(Yi,1);return Qi!==on?Qi-on:Qi===0?Yi[1]-Nn[1]:Qi===1?Nn[0]-Yi[0]:Qi===2?Nn[1]-Yi[1]:Yi[0]-Nn[0]}return function(Nn){var Yi=Nn,Qi=ma(),on,Fi,$n,Ca,Ra,La,Na,Yn,Dn,Ka,bo,Xo={point:Ss,lineStart:ml,lineEnd:Ws,polygonStart:ws,polygonEnd:Ho};function Ss(va,no){Kr(va,no)&&Yi.point(va,no)}function as(){for(var va=0,no=0,ys=Fi.length;noAr&&(Uc-Nc)*(Ar-pu)>(xu-pu)*(At-Nc)&&++va:xu<=Ar&&(Uc-Nc)*(Ar-pu)<(xu-pu)*(At-Nc)&&--va;return va}function ws(){Yi=Qi,on=[],Fi=[],bo=!0}function Ho(){var va=as(),no=bo&&va,ys=(on=t.merge(on)).length;(no||ys)&&(Nn.polygonStart(),no&&(Nn.lineStart(),ki(null,null,1,Nn),Nn.lineEnd()),ys&&Wo(on,dn,va,ki,Nn),Nn.polygonEnd()),Yi=Nn,on=Fi=$n=null}function ml(){Xo.point=Ls,Fi&&Fi.push($n=[]),Ka=!0,Dn=!1,Na=Yn=NaN}function Ws(){on&&(Ls(Ca,Ra),La&&Dn&&Qi.rejoin(),on.push(Qi.result())),Xo.point=Ss,Dn&&Yi.lineEnd()}function Ls(va,no){var ys=Kr(va,no);if(Fi&&$n.push([va,no]),Ka)Ca=va,Ra=no,La=ys,Ka=!1,ys&&(Yi.lineStart(),Yi.point(va,no));else if(ys&&Dn)Yi.point(va,no);else{var rs=[Na=Math.max(ya,Math.min(_n,Na)),Yn=Math.max(ya,Math.min(_n,Yn))],$l=[va=Math.max(ya,Math.min(_n,va)),no=Math.max(ya,Math.min(_n,no))];Li(rs,$l,At,Wt,Cr,Ar)?(Dn||(Yi.lineStart(),Yi.point(rs[0],rs[1])),Yi.point($l[0],$l[1]),ys||Yi.lineEnd(),bo=!1):ys&&(Yi.lineStart(),Yi.point(va,no),bo=!1)}Na=va,Yn=no,Dn=ys}return Xo}}function Ma(){var At=0,Wt=0,Cr=960,Ar=500,Kr,ki,Xi;return Xi={stream:function(dn){return Kr&&ki===dn?Kr:Kr=Jn(At,Wt,Cr,Ar)(ki=dn)},extent:function(dn){return arguments.length?(At=+dn[0][0],Wt=+dn[0][1],Cr=+dn[1][0],Ar=+dn[1][1],Kr=ki=null,Xi):[[At,Wt],[Cr,Ar]]}}}var _o=r(),No,po,Lo,ko={sphere:O,point:O,lineStart:Ds,lineEnd:O,polygonStart:O,polygonEnd:O};function Ds(){ko.point=ll,ko.lineEnd=Fs}function Fs(){ko.point=ko.lineEnd=O}function ll(At,Wt){At*=d,Wt*=d,No=At,po=x(Wt),Lo=p(Wt),ko.point=ul}function ul(At,Wt){At*=d,Wt*=d;var Cr=x(Wt),Ar=p(Wt),Kr=v(At-No),ki=p(Kr),Xi=x(Kr),dn=Ar*Xi,wn=Lo*Cr-po*Ar*ki,Nn=po*Cr+Lo*Ar*ki;_o.add(b(M(dn*dn+wn*wn),Nn)),No=At,po=Cr,Lo=Ar}function zl(At){return _o.reset(),H(At,ko),+_o}var us=[null,null],il={type:"LineString",coordinates:us};function As(At,Wt){return us[0]=At,us[1]=Wt,zl(il)}var cl={Feature:function(At,Wt){return zs(At.geometry,Wt)},FeatureCollection:function(At,Wt){for(var Cr=At.features,Ar=-1,Kr=Cr.length;++Ar0&&(Kr=As(At[ki],At[ki-1]),Kr>0&&Cr<=Kr&&Ar<=Kr&&(Cr+Ar-Kr)*(1-Math.pow((Cr-Ar)/Kr,2))o}).map(on)).concat(t.range(k(ki/Nn)*Nn,Kr,Nn).filter(function(Yn){return v(Yn%Qi)>o}).map(Fi))}return La.lines=function(){return Na().map(function(Yn){return{type:"LineString",coordinates:Yn}})},La.outline=function(){return{type:"Polygon",coordinates:[$n(Ar).concat(Ca(Xi).slice(1),$n(Cr).reverse().slice(1),Ca(dn).reverse().slice(1))]}},La.extent=function(Yn){return arguments.length?La.extentMajor(Yn).extentMinor(Yn):La.extentMinor()},La.extentMajor=function(Yn){return arguments.length?(Ar=+Yn[0][0],Cr=+Yn[1][0],dn=+Yn[0][1],Xi=+Yn[1][1],Ar>Cr&&(Yn=Ar,Ar=Cr,Cr=Yn),dn>Xi&&(Yn=dn,dn=Xi,Xi=Yn),La.precision(Ra)):[[Ar,dn],[Cr,Xi]]},La.extentMinor=function(Yn){return arguments.length?(Wt=+Yn[0][0],At=+Yn[1][0],ki=+Yn[0][1],Kr=+Yn[1][1],Wt>At&&(Yn=Wt,Wt=At,At=Yn),ki>Kr&&(Yn=ki,ki=Kr,Kr=Yn),La.precision(Ra)):[[Wt,ki],[At,Kr]]},La.step=function(Yn){return arguments.length?La.stepMajor(Yn).stepMinor(Yn):La.stepMinor()},La.stepMajor=function(Yn){return arguments.length?(Yi=+Yn[0],Qi=+Yn[1],La):[Yi,Qi]},La.stepMinor=function(Yn){return arguments.length?(wn=+Yn[0],Nn=+Yn[1],La):[wn,Nn]},La.precision=function(Yn){return arguments.length?(Ra=+Yn,on=Rn(ki,Kr,90),Fi=_a(Wt,At,Ra),$n=Rn(dn,Xi,90),Ca=_a(Ar,Cr,Ra),La):Ra},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ol(){return Vu()()}function xo(At,Wt){var Cr=At[0]*d,Ar=At[1]*d,Kr=Wt[0]*d,ki=Wt[1]*d,Xi=p(Ar),dn=x(Ar),wn=p(ki),Nn=x(ki),Yi=Xi*p(Cr),Qi=Xi*x(Cr),on=wn*p(Kr),Fi=wn*x(Kr),$n=2*T(M(z(ki-Ar)+Xi*wn*z(Kr-Cr))),Ca=x($n),Ra=$n?function(La){var Na=x(La*=$n)/Ca,Yn=x($n-La)/Ca,Dn=Yn*Yi+Na*on,Ka=Yn*Qi+Na*Fi,bo=Yn*dn+Na*Nn;return[b(Ka,Dn)*h,b(bo,M(Dn*Dn+Ka*Ka))*h]}:function(){return[Cr*h,Ar*h]};return Ra.distance=$n,Ra}function Yl(At){return At}var Ns=r(),Hl=r(),ac,aa,Oo,qo,ql={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ql.lineStart=Pc,ql.lineEnd=Uf},polygonEnd:function(){ql.lineStart=ql.lineEnd=ql.point=O,Ns.add(v(Hl)),Hl.reset()},result:function(){var At=Ns/2;return Ns.reset(),At}};function Pc(){ql.point=Do}function Do(At,Wt){ql.point=rf,ac=Oo=At,aa=qo=Wt}function rf(At,Wt){Hl.add(qo*At-Oo*Wt),Oo=At,qo=Wt}function Uf(){rf(ac,aa)}var pl=1/0,Zc=pl,Kl=-pl,Os=Kl,yu={point:oc,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var At=[[pl,Zc],[Kl,Os]];return Kl=Os=-(Zc=pl=1/0),At}};function oc(At,Wt){AtKl&&(Kl=At),WtOs&&(Os=Wt)}var Cf=0,sc=0,Vh=0,Lf=0,cs=0,nf=0,Vf=0,Jl=0,fl=0,lc,Fu,Es,Hs,Go={point:ps,lineStart:uc,lineEnd:qs,polygonStart:function(){Go.lineStart=ad,Go.lineEnd=Po},polygonEnd:function(){Go.point=ps,Go.lineStart=uc,Go.lineEnd=qs},result:function(){var At=fl?[Vf/fl,Jl/fl]:nf?[Lf/nf,cs/nf]:Vh?[Cf/Vh,sc/Vh]:[NaN,NaN];return Cf=sc=Vh=Lf=cs=nf=Vf=Jl=fl=0,At}};function ps(At,Wt){Cf+=At,sc+=Wt,++Vh}function uc(){Go.point=xl}function xl(At,Wt){Go.point=Gu,ps(Es=At,Hs=Wt)}function Gu(At,Wt){var Cr=At-Es,Ar=Wt-Hs,Kr=M(Cr*Cr+Ar*Ar);Lf+=Kr*(Es+At)/2,cs+=Kr*(Hs+Wt)/2,nf+=Kr,ps(Es=At,Hs=Wt)}function qs(){Go.point=ps}function ad(){Go.point=od}function Po(){Yo(lc,Fu)}function od(At,Wt){Go.point=Yo,ps(lc=Es=At,Fu=Hs=Wt)}function Yo(At,Wt){var Cr=At-Es,Ar=Wt-Hs,Kr=M(Cr*Cr+Ar*Ar);Lf+=Kr*(Es+At)/2,cs+=Kr*(Hs+Wt)/2,nf+=Kr,Kr=Hs*At-Es*Wt,Vf+=Kr*(Es+At),Jl+=Kr*(Hs+Wt),fl+=Kr*3,ps(Es=At,Hs=Wt)}function Pa(At){this._context=At}Pa.prototype={_radius:4.5,pointRadius:function(At){return this._radius=At,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(At,Wt){switch(this._point){case 0:{this._context.moveTo(At,Wt),this._point=1;break}case 1:{this._context.lineTo(At,Wt);break}default:{this._context.moveTo(At+this._radius,Wt),this._context.arc(At,Wt,this._radius,0,f);break}}},result:O};var af=r(),Hu,bl,Gf,Ic,yf,Bl={point:O,lineStart:function(){Bl.point=wh},lineEnd:function(){Hu&&Qf(bl,Gf),Bl.point=O},polygonStart:function(){Hu=!0},polygonEnd:function(){Hu=null},result:function(){var At=+af;return af.reset(),At}};function wh(At,Wt){Bl.point=Qf,bl=Ic=At,Gf=yf=Wt}function Qf(At,Wt){Ic-=At,yf-=Wt,af.add(M(Ic*Ic+yf*yf)),Ic=At,yf=Wt}function _f(){this._string=[]}_f.prototype={_radius:4.5,_circle:Yc(4.5),pointRadius:function(At){return(At=+At)!==this._radius&&(this._radius=At,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(At,Wt){switch(this._point){case 0:{this._string.push("M",At,",",Wt),this._point=1;break}case 1:{this._string.push("L",At,",",Wt);break}default:{this._circle==null&&(this._circle=Yc(this._radius)),this._string.push("M",At,",",Wt,this._circle);break}}},result:function(){if(this._string.length){var At=this._string.join("");return this._string=[],At}else return null}};function Yc(At){return"m0,"+At+"a"+At+","+At+" 0 1,1 0,"+-2*At+"a"+At+","+At+" 0 1,1 0,"+2*At+"z"}function eh(At,Wt){var Cr=4.5,Ar,Kr;function ki(Xi){return Xi&&(typeof Cr=="function"&&Kr.pointRadius(+Cr.apply(this,arguments)),H(Xi,Ar(Kr))),Kr.result()}return ki.area=function(Xi){return H(Xi,Ar(ql)),ql.result()},ki.measure=function(Xi){return H(Xi,Ar(Bl)),Bl.result()},ki.bounds=function(Xi){return H(Xi,Ar(yu)),yu.result()},ki.centroid=function(Xi){return H(Xi,Ar(Go)),Go.result()},ki.projection=function(Xi){return arguments.length?(Ar=Xi==null?(At=null,Yl):(At=Xi).stream,ki):At},ki.context=function(Xi){return arguments.length?(Kr=Xi==null?(Wt=null,new _f):new Pa(Wt=Xi),typeof Cr!="function"&&Kr.pointRadius(Cr),ki):Wt},ki.pointRadius=function(Xi){return arguments.length?(Cr=typeof Xi=="function"?Xi:(Kr.pointRadius(+Xi),+Xi),ki):Cr},ki.projection(At).context(Wt)}function th(At){return{stream:ju(At)}}function ju(At){return function(Wt){var Cr=new Hf;for(var Ar in At)Cr[Ar]=At[Ar];return Cr.stream=Wt,Cr}}function Hf(){}Hf.prototype={constructor:Hf,point:function(At,Wt){this.stream.point(At,Wt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function cc(At,Wt,Cr){var Ar=At.clipExtent&&At.clipExtent();return At.scale(150).translate([0,0]),Ar!=null&&At.clipExtent(null),H(Cr,At.stream(yu)),Wt(yu.result()),Ar!=null&&At.clipExtent(Ar),At}function of(At,Wt,Cr){return cc(At,function(Ar){var Kr=Wt[1][0]-Wt[0][0],ki=Wt[1][1]-Wt[0][1],Xi=Math.min(Kr/(Ar[1][0]-Ar[0][0]),ki/(Ar[1][1]-Ar[0][1])),dn=+Wt[0][0]+(Kr-Xi*(Ar[1][0]+Ar[0][0]))/2,wn=+Wt[0][1]+(ki-Xi*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*Xi).translate([dn,wn])},Cr)}function Nl(At,Wt,Cr){return of(At,[[0,0],Wt],Cr)}function Kc(At,Wt,Cr){return cc(At,function(Ar){var Kr=+Wt,ki=Kr/(Ar[1][0]-Ar[0][0]),Xi=(Kr-ki*(Ar[1][0]+Ar[0][0]))/2,dn=-ki*Ar[0][1];At.scale(150*ki).translate([Xi,dn])},Cr)}function Rc(At,Wt,Cr){return cc(At,function(Ar){var Kr=+Wt,ki=Kr/(Ar[1][1]-Ar[0][1]),Xi=-ki*Ar[0][0],dn=(Kr-ki*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*ki).translate([Xi,dn])},Cr)}var gs=16,jf=p(30*d);function Gh(At,Wt){return+Wt?sf(At,Wt):rh(At)}function rh(At){return ju({point:function(Wt,Cr){Wt=At(Wt,Cr),this.stream.point(Wt[0],Wt[1])}})}function sf(At,Wt){function Cr(Ar,Kr,ki,Xi,dn,wn,Nn,Yi,Qi,on,Fi,$n,Ca,Ra){var La=Nn-Ar,Na=Yi-Kr,Yn=La*La+Na*Na;if(Yn>4*Wt&&Ca--){var Dn=Xi+on,Ka=dn+Fi,bo=wn+$n,Xo=M(Dn*Dn+Ka*Ka+bo*bo),Ss=T(bo/=Xo),as=v(v(bo)-1)Wt||v((La*Ws+Na*Ls)/Yn-.5)>.3||Xi*on+dn*Fi+wn*$n2?va[2]%360*d:0,Ws()):[dn*h,wn*h,Nn*h]},Ho.angle=function(va){return arguments.length?(Qi=va%360*d,Ws()):Qi*h},Ho.reflectX=function(va){return arguments.length?(on=va?-1:1,Ws()):on<0},Ho.reflectY=function(va){return arguments.length?(Fi=va?-1:1,Ws()):Fi<0},Ho.precision=function(va){return arguments.length?(bo=Gh(Xo,Ka=va*va),Ls()):M(Ka)},Ho.fitExtent=function(va,no){return of(Ho,va,no)},Ho.fitSize=function(va,no){return Nl(Ho,va,no)},Ho.fitWidth=function(va,no){return Kc(Ho,va,no)},Ho.fitHeight=function(va,no){return Rc(Ho,va,no)};function Ws(){var va=js(Cr,0,0,on,Fi,Qi).apply(null,Wt(ki,Xi)),no=(Qi?js:ih)(Cr,Ar-va[0],Kr-va[1],on,Fi,Qi);return Yi=Oi(dn,wn,Nn),Xo=ri(Wt,no),Ss=ri(Yi,Xo),bo=Gh(Xo,Ka),Ls()}function Ls(){return as=ws=null,Ho}return function(){return Wt=At.apply(this,arguments),Ho.invert=Wt.invert&&ml,Ws()}}function ks(At){var Wt=0,Cr=l/3,Ar=Dc(At),Kr=Ar(Wt,Cr);return Kr.parallels=function(ki){return arguments.length?Ar(Wt=ki[0]*d,Cr=ki[1]*d):[Wt*h,Cr*h]},Kr}function bc(At){var Wt=p(At);function Cr(Ar,Kr){return[Ar*Wt,x(Kr)/Wt]}return Cr.invert=function(Ar,Kr){return[Ar/Wt,T(Kr*Wt)]},Cr}function hu(At,Wt){var Cr=x(At),Ar=(Cr+x(Wt))/2;if(v(Ar)=.12&&Ra<.234&&Ca>=-.425&&Ca<-.214?Kr:Ra>=.166&&Ra<.234&&Ca>=-.214&&Ca<-.115?Xi:Cr).invert(on)},Yi.stream=function(on){return At&&Wt===on?At:At=nh([Cr.stream(Wt=on),Kr.stream(on),Xi.stream(on)])},Yi.precision=function(on){return arguments.length?(Cr.precision(on),Kr.precision(on),Xi.precision(on),Qi()):Cr.precision()},Yi.scale=function(on){return arguments.length?(Cr.scale(on),Kr.scale(on*.35),Xi.scale(on),Yi.translate(Cr.translate())):Cr.scale()},Yi.translate=function(on){if(!arguments.length)return Cr.translate();var Fi=Cr.scale(),$n=+on[0],Ca=+on[1];return Ar=Cr.translate(on).clipExtent([[$n-.455*Fi,Ca-.238*Fi],[$n+.455*Fi,Ca+.238*Fi]]).stream(Nn),ki=Kr.translate([$n-.307*Fi,Ca+.201*Fi]).clipExtent([[$n-.425*Fi+o,Ca+.12*Fi+o],[$n-.214*Fi-o,Ca+.234*Fi-o]]).stream(Nn),dn=Xi.translate([$n-.205*Fi,Ca+.212*Fi]).clipExtent([[$n-.214*Fi+o,Ca+.166*Fi+o],[$n-.115*Fi-o,Ca+.234*Fi-o]]).stream(Nn),Qi()},Yi.fitExtent=function(on,Fi){return of(Yi,on,Fi)},Yi.fitSize=function(on,Fi){return Nl(Yi,on,Fi)},Yi.fitWidth=function(on,Fi){return Kc(Yi,on,Fi)},Yi.fitHeight=function(on,Fi){return Rc(Yi,on,Fi)};function Qi(){return At=Wt=null,Yi}return Yi.scale(1070)}function zu(At){return function(Wt,Cr){var Ar=p(Wt),Kr=p(Cr),ki=At(Ar*Kr);return[ki*Kr*x(Wt),ki*x(Cr)]}}function Fc(At){return function(Wt,Cr){var Ar=M(Wt*Wt+Cr*Cr),Kr=At(Ar),ki=x(Kr),Xi=p(Kr);return[b(Wt*ki,Ar*Xi),T(Ar&&Cr*ki/Ar)]}}var wc=zu(function(At){return M(2/(1+At))});wc.invert=Fc(function(At){return 2*T(At/2)});function bd(){return Eu(wc).scale(124.75).clipAngle(180-.001)}var xf=zu(function(At){return(At=P(At))&&At/x(At)});xf.invert=Fc(function(At){return At});function Pf(){return Eu(xf).scale(79.4188).clipAngle(180-.001)}function Ou(At,Wt){return[At,S(g((u+Wt)/2))]}Ou.invert=function(At,Wt){return[At,2*_(E(Wt))-u]};function bf(){return jl(Ou).scale(961/f)}function jl(At){var Wt=Eu(At),Cr=Wt.center,Ar=Wt.scale,Kr=Wt.translate,ki=Wt.clipExtent,Xi=null,dn,wn,Nn;Wt.scale=function(Qi){return arguments.length?(Ar(Qi),Yi()):Ar()},Wt.translate=function(Qi){return arguments.length?(Kr(Qi),Yi()):Kr()},Wt.center=function(Qi){return arguments.length?(Cr(Qi),Yi()):Cr()},Wt.clipExtent=function(Qi){return arguments.length?(Qi==null?Xi=dn=wn=Nn=null:(Xi=+Qi[0][0],dn=+Qi[0][1],wn=+Qi[1][0],Nn=+Qi[1][1]),Yi()):Xi==null?null:[[Xi,dn],[wn,Nn]]};function Yi(){var Qi=l*Ar(),on=Wt(yn(Wt.rotate()).invert([0,0]));return ki(Xi==null?[[on[0]-Qi,on[1]-Qi],[on[0]+Qi,on[1]+Qi]]:At===Ou?[[Math.max(on[0]-Qi,Xi),dn],[Math.min(on[0]+Qi,wn),Nn]]:[[Xi,Math.max(on[1]-Qi,dn)],[wn,Math.min(on[1]+Qi,Nn)]])}return Yi()}function lf(At){return g((u+At)/2)}function Hh(At,Wt){var Cr=p(At),Ar=At===Wt?x(At):S(Cr/p(Wt))/S(lf(Wt)/lf(At)),Kr=Cr*L(lf(At),Ar)/Ar;if(!Ar)return Ou;function ki(Xi,dn){Kr>0?dn<-u+o&&(dn=-u+o):dn>u-o&&(dn=u-o);var wn=Kr/L(lf(dn),Ar);return[wn*x(Ar*Xi),Kr-wn*p(Ar*Xi)]}return ki.invert=function(Xi,dn){var wn=Kr-dn,Nn=C(Ar)*M(Xi*Xi+wn*wn),Yi=b(Xi,v(wn))*C(wn);return wn*Ar<0&&(Yi-=l*C(Xi)*C(wn)),[Yi/Ar,2*_(L(Kr/Nn,1/Ar))-u]},ki}function If(){return ks(Hh).scale(109.5).parallels([30,30])}function Cs(At,Wt){return[At,Wt]}Cs.invert=Cs;function du(){return Eu(Cs).scale(152.63)}function ku(At,Wt){var Cr=p(At),Ar=At===Wt?x(At):(Cr-p(Wt))/(Wt-At),Kr=Cr/Ar+At;if(v(Ar)o&&--Ar>0);return[At/(.8707+(ki=Cr*Cr)*(-.131979+ki*(-.013791+ki*ki*ki*(.003971-.001529*ki)))),Cr]};function Tc(){return Eu(Oc).scale(175.295)}function wl(At,Wt){return[p(Wt)*x(At),x(Wt)]}wl.invert=Fc(T);function vu(){return Eu(wl).scale(249.5).clipAngle(90+o)}function qc(At,Wt){var Cr=p(Wt),Ar=1+p(At)*Cr;return[Cr*x(At)/Ar,x(Wt)/Ar]}qc.invert=Fc(function(At){return 2*_(At)});function cf(){return Eu(qc).scale(250).clipAngle(142)}function fc(At,Wt){return[S(g((u+Wt)/2)),-At]}fc.invert=function(At,Wt){return[-Wt,2*_(E(At))-u]};function Bc(){var At=jl(fc),Wt=At.center,Cr=At.rotate;return At.center=function(Ar){return arguments.length?Wt([-Ar[1],Ar[0]]):(Ar=Wt(),[Ar[1],-Ar[0]])},At.rotate=function(Ar){return arguments.length?Cr([Ar[0],Ar[1],Ar.length>2?Ar[2]+90:90]):(Ar=Cr(),[Ar[0],Ar[1],Ar[2]-90])},Cr([0,0,90]).scale(159.155)}e.geoAlbers=nl,e.geoAlbersUsa=Ah,e.geoArea=ge,e.geoAzimuthalEqualArea=bd,e.geoAzimuthalEqualAreaRaw=wc,e.geoAzimuthalEquidistant=Pf,e.geoAzimuthalEquidistantRaw=xf,e.geoBounds=Ge,e.geoCentroid=Er,e.geoCircle=ua,e.geoClipAntimeridian=Jr,e.geoClipCircle=Mn,e.geoClipExtent=Ma,e.geoClipRectangle=Jn,e.geoConicConformal=If,e.geoConicConformalRaw=Hh,e.geoConicEqualArea=_u,e.geoConicEqualAreaRaw=hu,e.geoConicEquidistant=Wf,e.geoConicEquidistantRaw=ku,e.geoContains=bs,e.geoDistance=As,e.geoEqualEarth=Xf,e.geoEqualEarthRaw=uf,e.geoEquirectangular=du,e.geoEquirectangularRaw=Cs,e.geoGnomonic=ah,e.geoGnomonicRaw=Wl,e.geoGraticule=Vu,e.geoGraticule10=Ol,e.geoIdentity=Zu,e.geoInterpolate=xo,e.geoLength=zl,e.geoMercator=bf,e.geoMercatorRaw=Ou,e.geoNaturalEarth1=Tc,e.geoNaturalEarth1Raw=Oc,e.geoOrthographic=vu,e.geoOrthographicRaw=wl,e.geoPath=eh,e.geoProjection=Eu,e.geoProjectionMutator=Dc,e.geoRotation=yn,e.geoStereographic=cf,e.geoStereographicRaw=qc,e.geoStream=H,e.geoTransform=th,e.geoTransverseMercator=Bc,e.geoTransverseMercatorRaw=fc,Object.defineProperty(e,"__esModule",{value:!0})})});var PDe=ye((PF,LDe)=>{(function(e,t){typeof PF=="object"&&typeof LDe!="undefined"?t(PF,RZ(),nk()):t(e.d3=e.d3||{},e.d3,e.d3)})(PF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,v=Math.sign||function(ve){return ve>0?1:ve<0?-1:0},_=Math.sin,b=Math.tan,p=1e-6,k=1e-12,E=Math.PI,S=E/2,L=E/4,x=Math.SQRT1_2,C=G(2),M=G(E),g=E*2,P=180/E,T=E/180;function z(ve){return ve?ve/Math.sin(ve):1}function O(ve){return ve>1?S:ve<-1?-S:Math.asin(ve)}function V(ve){return ve>1?0:ve<-1?E:Math.acos(ve)}function G(ve){return ve>0?Math.sqrt(ve):0}function Z(ve){return ve=s(2*ve),(ve-1)/(ve+1)}function j(ve){return(s(ve)-s(-ve))/2}function N(ve){return(s(ve)+s(-ve))/2}function H(ve){return u(ve+G(ve*ve+1))}function te(ve){return u(ve+G(ve*ve-1))}function oe(ve){var be=b(ve/2),De=2*u(o(ve/2))/(be*be);function Be(et,We){var it=o(et),Ft=o(We),Ht=_(We),tr=Ft*it,dr=-((1-tr?u((1+tr)/2)/(1-tr):-.5)+De/(1+tr));return[dr*Ft*_(et),dr*Ht]}return Be.invert=function(et,We){var it=G(et*et+We*We),Ft=-ve/2,Ht=50,tr;if(!it)return[0,0];do{var dr=Ft/2,Sr=o(dr),Or=_(dr),Wr=Or/Sr,ni=-u(n(Sr));Ft-=tr=(2/Wr*ni-De*Wr-it)/(-ni/(Or*Or)+1-De/(2*Sr*Sr))*(Sr<0?.7:1)}while(n(tr)>p&&--Ht>0);var Pi=_(Ft);return[a(et*Pi,it*o(Ft)),O(We*Pi/it)]},Be}function _e(){var ve=S,be=t.geoProjectionMutator(oe),De=be(ve);return De.radius=function(Be){return arguments.length?be(ve=Be*T):ve*P},De.scale(179.976).clipAngle(147)}function Ee(ve,be){var De=o(be),Be=z(V(De*o(ve/=2)));return[2*De*_(ve)*Be,_(be)*Be]}Ee.invert=function(ve,be){if(!(ve*ve+4*be*be>E*E+p)){var De=ve,Be=be,et=25;do{var We=_(De),it=_(De/2),Ft=o(De/2),Ht=_(Be),tr=o(Be),dr=_(2*Be),Sr=Ht*Ht,Or=tr*tr,Wr=it*it,ni=1-Or*Ft*Ft,Pi=ni?V(tr*Ft)*G(cn=1/ni):cn=0,cn,ln=2*Pi*tr*it-ve,Cn=Pi*Ht-be,Kn=cn*(Or*Wr+Pi*tr*Ft*Sr),Ta=cn*(.5*We*dr-Pi*2*Ht*it),fa=cn*.25*(dr*it-Pi*Ht*Or*We),$a=cn*(Sr*Ft+Pi*Wr*tr),Co=Ta*fa-$a*Kn;if(!Co)break;var Qa=(Cn*Ta-ln*$a)/Co,mo=(ln*fa-Cn*Kn)/Co;De-=Qa,Be-=mo}while((n(Qa)>p||n(mo)>p)&&--et>0);return[De,Be]}};function Ce(){return t.geoProjection(Ee).scale(152.63)}function me(ve){var be=_(ve),De=o(ve),Be=ve>=0?1:-1,et=b(Be*ve),We=(1+be-De)/2;function it(Ft,Ht){var tr=o(Ht),dr=o(Ft/=2);return[(1+tr)*_(Ft),(Be*Ht>-a(dr,et)-.001?0:-Be*10)+We+_(Ht)*De-(1+tr)*be*dr]}return it.invert=function(Ft,Ht){var tr=0,dr=0,Sr=50;do{var Or=o(tr),Wr=_(tr),ni=o(dr),Pi=_(dr),cn=1+ni,ln=cn*Wr-Ft,Cn=We+Pi*De-cn*be*Or-Ht,Kn=cn*Or/2,Ta=-Wr*Pi,fa=be*cn*Wr/2,$a=De*ni+be*Or*Pi,Co=Ta*fa-$a*Kn,Qa=(Cn*Ta-ln*$a)/Co/2,mo=(ln*fa-Cn*Kn)/Co;n(mo)>2&&(mo/=2),tr-=Qa,dr-=mo}while((n(Qa)>p||n(mo)>p)&&--Sr>0);return Be*dr>-a(o(tr),et)-.001?[tr*2,dr]:null},it}function ie(){var ve=20*T,be=ve>=0?1:-1,De=b(be*ve),Be=t.geoProjectionMutator(me),et=Be(ve),We=et.stream;return et.parallel=function(it){return arguments.length?(De=b((be=(ve=it*T)>=0?1:-1)*ve),Be(ve)):ve*P},et.stream=function(it){var Ft=et.rotate(),Ht=We(it),tr=(et.rotate([0,0]),We(it)),dr=et.precision();return et.rotate(Ft),Ht.sphere=function(){tr.polygonStart(),tr.lineStart();for(var Sr=be*-180;be*Sr<180;Sr+=be*90)tr.point(Sr,be*90);if(ve)for(;be*(Sr-=3*be*dr)>=-180;)tr.point(Sr,be*-a(o(Sr*T/2),De)*P);tr.lineEnd(),tr.polygonEnd()},Ht},et.scale(218.695).center([0,28.0974])}function Se(ve,be){var De=b(be/2),Be=G(1-De*De),et=1+Be*o(ve/=2),We=_(ve)*Be/et,it=De/et,Ft=We*We,Ht=it*it;return[4/3*We*(3+Ft-3*Ht),4/3*it*(3+3*Ft-Ht)]}Se.invert=function(ve,be){if(ve*=3/8,be*=3/8,!ve&&n(be)>1)return null;var De=ve*ve,Be=be*be,et=1+De+Be,We=G((et-G(et*et-4*be*be))/2),it=O(We)/3,Ft=We?te(n(be/We))/3:H(n(ve))/3,Ht=o(it),tr=N(Ft),dr=tr*tr-Ht*Ht;return[v(ve)*2*a(j(Ft)*Ht,.25-dr),v(be)*2*a(tr*_(it),.25+dr)]};function Le(){return t.geoProjection(Se).scale(66.1603)}var Ae=G(8),Fe=u(1+C);function Pe(ve,be){var De=n(be);return Dek&&--Be>0);return[ve/(o(De)*(Ae-1/_(De))),v(be)*De]};function ge(){return t.geoProjection(Pe).scale(112.314)}function Re(ve){var be=2*E/ve;function De(Be,et){var We=t.geoAzimuthalEquidistantRaw(Be,et);if(n(Be)>S){var it=a(We[1],We[0]),Ft=G(We[0]*We[0]+We[1]*We[1]),Ht=be*d((it-S)/be)+S,tr=a(_(it-=Ht),2-o(it));it=Ht+O(E/Ft*_(tr))-tr,We[0]=Ft*o(it),We[1]=Ft*_(it)}return We}return De.invert=function(Be,et){var We=G(Be*Be+et*et);if(We>S){var it=a(et,Be),Ft=be*d((it-S)/be)+S,Ht=it>Ft?-1:1,tr=We*o(Ft-it),dr=1/b(Ht*V((tr-E)/G(E*(E-2*tr)+We*We)));it=Ft+2*i((dr+Ht*G(dr*dr-3))/3),Be=We*o(it),et=We*_(it)}return t.geoAzimuthalEquidistantRaw.invert(Be,et)},De}function ce(){var ve=5,be=t.geoProjectionMutator(Re),De=be(ve),Be=De.stream,et=.01,We=-o(et*T),it=_(et*T);return De.lobes=function(Ft){return arguments.length?be(ve=+Ft):ve},De.stream=function(Ft){var Ht=De.rotate(),tr=Be(Ft),dr=(De.rotate([0,0]),Be(Ft));return De.rotate(Ht),tr.sphere=function(){dr.polygonStart(),dr.lineStart();for(var Sr=0,Or=360/ve,Wr=2*E/ve,ni=90-180/ve,Pi=S;Sr0&&n(et)>p);return Be<0?NaN:De}function st(ve,be,De){return be===void 0&&(be=40),De===void 0&&(De=k),function(Be,et,We,it){var Ft,Ht,tr;We=We===void 0?0:+We,it=it===void 0?0:+it;for(var dr=0;drFt){We-=Ht/=2,it-=tr/=2;continue}Ft=ni;var Pi=(We>0?-1:1)*De,cn=(it>0?-1:1)*De,ln=ve(We+Pi,it),Cn=ve(We,it+cn),Kn=(ln[0]-Sr[0])/Pi,Ta=(ln[1]-Sr[1])/Pi,fa=(Cn[0]-Sr[0])/cn,$a=(Cn[1]-Sr[1])/cn,Co=$a*Kn-Ta*fa,Qa=(n(Co)<.5?.5:1)/Co;if(Ht=(Wr*fa-Or*$a)*Qa,tr=(Or*Ta-Wr*Kn)*Qa,We+=Ht,it+=tr,n(Ht)0&&(Ft[1]*=1+Ht/1.5*Ft[0]*Ft[0]),Ft}return Be.invert=st(Be),Be}function Gt(){return t.geoProjection(lt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Nt(ve,be){var De=ve*_(be),Be=30,et;do be-=et=(be+_(be)-De)/(1+o(be));while(n(et)>p&&--Be>0);return be/2}function Jt(ve,be,De){function Be(et,We){return[ve*et*o(We=Nt(De,We)),be*_(We)]}return Be.invert=function(et,We){return We=O(We/be),[et/(ve*o(We)),O((2*We+_(2*We))/De)]},Be}var sr=Jt(C/S,C,E);function wr(){return t.geoProjection(sr).scale(169.529)}var cr=2.00276,$e=1.11072;function St(ve,be){var De=Nt(E,be);return[cr*ve/(1/o(be)+$e/o(De)),(be+C*_(De))/cr]}St.invert=function(ve,be){var De=cr*be,Be=be<0?-L:L,et=25,We,it;do it=De-C*_(Be),Be-=We=(_(2*Be)+2*Be-E*_(it))/(2*o(2*Be)+2+E*o(it)*C*o(Be));while(n(We)>p&&--et>0);return it=De-C*_(Be),[ve*(1/o(it)+$e/o(Be))/cr,it]};function Qt(){return t.geoProjection(St).scale(160.857)}function Vt(ve){var be=0,De=t.geoProjectionMutator(ve),Be=De(be);return Be.parallel=function(et){return arguments.length?De(be=et*T):be*P},Be}function _t(ve,be){return[ve*o(be),be]}_t.invert=function(ve,be){return[ve/o(be),be]};function It(){return t.geoProjection(_t).scale(152.63)}function mt(ve){if(!ve)return _t;var be=1/b(ve);function De(Be,et){var We=be+ve-et,it=We&&Be*o(et)/We;return[We*_(it),be-We*o(it)]}return De.invert=function(Be,et){var We=G(Be*Be+(et=be-et)*et),it=be+ve-We;return[We/o(it)*a(Be,et),it]},De}function er(){return Vt(mt).scale(123.082).center([0,26.1441]).parallel(45)}function lr(ve){function be(De,Be){var et=S-Be,We=et&&De*ve*_(et)/et;return[et*_(We)/ve,S-et*o(We)]}return be.invert=function(De,Be){var et=De*ve,We=S-Be,it=G(et*et+We*We),Ft=a(et,We);return[(it?it/_(it):1)*Ft/ve,S-it]},be}function Tr(){var ve=.5,be=t.geoProjectionMutator(lr),De=be(ve);return De.fraction=function(Be){return arguments.length?be(ve=+Be):ve},De.scale(158.837)}var Lr=Jt(1,4/E,E);function ti(){return t.geoProjection(Lr).scale(152.63)}function Br(ve,be,De,Be,et,We){var it=o(We),Ft;if(n(ve)>1||n(We)>1)Ft=V(De*et+be*Be*it);else{var Ht=_(ve/2),tr=_(We/2);Ft=2*O(G(Ht*Ht+be*Be*tr*tr))}return n(Ft)>p?[Ft,a(Be*_(We),be*et-De*Be*it)]:[0,0]}function Vr(ve,be,De){return V((ve*ve+be*be-De*De)/(2*ve*be))}function dt(ve){return ve-2*E*l((ve+E)/(2*E))}function Ge(ve,be,De){for(var Be=[[ve[0],ve[1],_(ve[1]),o(ve[1])],[be[0],be[1],_(be[1]),o(be[1])],[De[0],De[1],_(De[1]),o(De[1])]],et=Be[2],We,it=0;it<3;++it,et=We)We=Be[it],et.v=Br(We[1]-et[1],et[3],et[2],We[3],We[2],We[0]-et[0]),et.point=[0,0];var Ft=Vr(Be[0].v[0],Be[2].v[0],Be[1].v[0]),Ht=Vr(Be[0].v[0],Be[1].v[0],Be[2].v[0]),tr=E-Ft;Be[2].point[1]=0,Be[0].point[0]=-(Be[1].point[0]=Be[0].v[0]/2);var dr=[Be[2].point[0]=Be[0].point[0]+Be[2].v[0]*o(Ft),2*(Be[0].point[1]=Be[1].point[1]=Be[2].v[0]*_(Ft))];function Sr(Or,Wr){var ni=_(Wr),Pi=o(Wr),cn=new Array(3),ln;for(ln=0;ln<3;++ln){var Cn=Be[ln];if(cn[ln]=Br(Wr-Cn[1],Cn[3],Cn[2],Pi,ni,Or-Cn[0]),!cn[ln][0])return Cn.point;cn[ln][1]=dt(cn[ln][1]-Cn.v[1])}var Kn=dr.slice();for(ln=0;ln<3;++ln){var Ta=ln==2?0:ln+1,fa=Vr(Be[ln].v[0],cn[ln][0],cn[Ta][0]);cn[ln][1]<0&&(fa=-fa),ln?ln==1?(fa=Ht-fa,Kn[0]-=cn[ln][0]*o(fa),Kn[1]-=cn[ln][0]*_(fa)):(fa=tr-fa,Kn[0]+=cn[ln][0]*o(fa),Kn[1]+=cn[ln][0]*_(fa)):(Kn[0]+=cn[ln][0]*o(fa),Kn[1]-=cn[ln][0]*_(fa))}return Kn[0]/=3,Kn[1]/=3,Kn}return Sr}function Je(ve){return ve[0]*=T,ve[1]*=T,ve}function je(){return tt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function tt(ve,be,De){var Be=t.geoCentroid({type:"MultiPoint",coordinates:[ve,be,De]}),et=[-Be[0],-Be[1]],We=t.geoRotation(et),it=Ge(Je(We(ve)),Je(We(be)),Je(We(De)));it.invert=st(it);var Ft=t.geoProjection(it).rotate(et),Ht=Ft.center;return delete Ft.rotate,Ft.center=function(tr){return arguments.length?Ht(We(tr)):We.invert(Ht())},Ft.clipAngle(90)}function xt(ve,be){var De=G(1-_(be));return[2/M*ve*De,M*(1-De)]}xt.invert=function(ve,be){var De=(De=be/M-1)*De;return[De>0?ve*G(E/De)/2:0,O(1-De)]};function Ie(){return t.geoProjection(xt).scale(95.6464).center([0,30])}function xe(ve){var be=b(ve);function De(Be,et){return[Be,(Be?Be/_(Be):1)*(_(et)*o(Be)-be*o(et))]}return De.invert=be?function(Be,et){Be&&(et*=_(Be)/Be);var We=o(Be);return[Be,2*a(G(We*We+be*be-et*et)-We,be-et)]}:function(Be,et){return[Be,O(Be?et*b(Be)/Be:et)]},De}function ke(){return Vt(xe).scale(249.828).clipAngle(90)}var vt=G(3);function ir(ve,be){return[vt*ve*(2*o(2*be/3)-1)/M,vt*M*_(be/3)]}ir.invert=function(ve,be){var De=3*O(be/(vt*M));return[M*ve/(vt*(2*o(2*De/3)-1)),De]};function ar(){return t.geoProjection(ir).scale(156.19)}function vr(ve){var be=o(ve);function De(Be,et){return[Be*be,_(et)/be]}return De.invert=function(Be,et){return[Be/be,O(et*be)]},De}function ii(){return Vt(vr).parallel(38.58).scale(195.044)}function pi(ve){var be=o(ve);function De(Be,et){return[Be*be,(1+be)*b(et/2)]}return De.invert=function(Be,et){return[Be/be,i(et/(1+be))*2]},De}function $r(){return Vt(pi).scale(124.75)}function di(ve,be){var De=G(8/(3*E));return[De*ve*(1-n(be)/E),De*be]}di.invert=function(ve,be){var De=G(8/(3*E)),Be=be/De;return[ve/(De*(1-n(Be)/E)),Be]};function ji(){return t.geoProjection(di).scale(165.664)}function In(ve,be){var De=G(4-3*_(n(be)));return[2/G(6*E)*ve*De,v(be)*G(2*E/3)*(2-De)]}In.invert=function(ve,be){var De=2-n(be)/G(2*E/3);return[ve*G(6*E)/(2*De),v(be)*O((4-De*De)/3)]};function wi(){return t.geoProjection(In).scale(165.664)}function On(ve,be){var De=G(E*(4+E));return[2/De*ve*(1+G(1-4*be*be/(E*E))),4/De*be]}On.invert=function(ve,be){var De=G(E*(4+E))/2;return[ve*De/(1+G(1-be*be*(4+E)/(4*E))),be*De/2]};function qn(){return t.geoProjection(On).scale(180.739)}function Fn(ve,be){var De=(2+S)*_(be);be/=2;for(var Be=0,et=1/0;Be<10&&n(et)>p;Be++){var We=o(be);be-=et=(be+_(be)*(We+2)-De)/(2*We*(1+We))}return[2/G(E*(4+E))*ve*(1+o(be)),2*G(E/(4+E))*_(be)]}Fn.invert=function(ve,be){var De=be*G((4+E)/E)/2,Be=O(De),et=o(Be);return[ve/(2/G(E*(4+E))*(1+et)),O((Be+De*(et+2))/(2+S))]};function ra(){return t.geoProjection(Fn).scale(180.739)}function la(ve,be){return[ve*(1+o(be))/G(2+E),2*be/G(2+E)]}la.invert=function(ve,be){var De=G(2+E),Be=be*De/2;return[De*ve/(1+o(Be)),Be]};function Ut(){return t.geoProjection(la).scale(173.044)}function wt(ve,be){for(var De=(1+S)*_(be),Be=0,et=1/0;Be<10&&n(et)>p;Be++)be-=et=(be+_(be)-De)/(1+o(be));return De=G(2+E),[ve*(1+o(be))/De,2*be/De]}wt.invert=function(ve,be){var De=1+S,Be=G(De/2);return[ve*2*Be/(1+o(be*=Be)),O((be+_(be))/De)]};function rr(){return t.geoProjection(wt).scale(173.044)}var nr=3+2*C;function Er(ve,be){var De=_(ve/=2),Be=o(ve),et=G(o(be)),We=o(be/=2),it=_(be)/(We+C*Be*et),Ft=G(2/(1+it*it)),Ht=G((C*We+(Be+De)*et)/(C*We+(Be-De)*et));return[nr*(Ft*(Ht-1/Ht)-2*u(Ht)),nr*(Ft*it*(Ht+1/Ht)-2*i(it))]}Er.invert=function(ve,be){if(!(We=Se.invert(ve/1.2,be*1.065)))return null;var De=We[0],Be=We[1],et=20,We;ve/=nr,be/=nr;do{var it=De/2,Ft=Be/2,Ht=_(it),tr=o(it),dr=_(Ft),Sr=o(Ft),Or=o(Be),Wr=G(Or),ni=dr/(Sr+C*tr*Wr),Pi=ni*ni,cn=G(2/(1+Pi)),ln=C*Sr+(tr+Ht)*Wr,Cn=C*Sr+(tr-Ht)*Wr,Kn=ln/Cn,Ta=G(Kn),fa=Ta-1/Ta,$a=Ta+1/Ta,Co=cn*fa-2*u(Ta)-ve,Qa=cn*ni*$a-2*i(ni)-be,mo=dr&&x*Wr*Ht*Pi/dr,Bo=(C*tr*Sr+Wr)/(2*(Sr+C*tr*Wr)*(Sr+C*tr*Wr)*Wr),Ps=-.5*ni*cn*cn*cn,Ts=Ps*mo,wo=Ps*Bo,To=(To=2*Sr+C*Wr*(tr-Ht))*To*Ta,hl=(C*tr*Sr*Wr+Or)/To,Ul=-(C*Ht*dr)/(Wr*To),Lu=fa*Ts-2*hl/Ta+cn*(hl+hl/Kn),au=fa*wo-2*Ul/Ta+cn*(Ul+Ul/Kn),Js=ni*$a*Ts-2*mo/(1+Pi)+cn*$a*mo+cn*ni*(hl-hl/Kn),Ql=ni*$a*wo-2*Bo/(1+Pi)+cn*$a*Bo+cn*ni*(Ul-Ul/Kn),dc=au*Js-Ql*Lu;if(!dc)break;var Tl=(Qa*au-Co*Ql)/dc,Al=(Co*Js-Qa*Lu)/dc;De-=Tl,Be=c(-S,f(S,Be-Al))}while((n(Tl)>p||n(Al)>p)&&--et>0);return n(n(Be)-S)Be){var Sr=G(dr),Or=a(tr,Ht),Wr=De*d(Or/De),ni=Or-Wr,Pi=ve*o(ni),cn=(ve*_(ni)-ni*_(Pi))/(S-Pi),ln=Wa(ni,cn),Cn=(E-ve)/Fa(ln,Pi,E);Ht=Sr;var Kn=50,Ta;do Ht-=Ta=(ve+Fa(ln,Pi,Ht)*Cn-Sr)/(ln(Ht)*Cn);while(n(Ta)>p&&--Kn>0);tr=ni*_(Ht),HtBe){var Ht=G(Ft),tr=a(it,We),dr=De*d(tr/De),Sr=tr-dr;We=Ht*o(Sr),it=Ht*_(Sr);for(var Or=We-S,Wr=_(We),ni=it/Wr,Pi=Wep||n(ni)>p)&&--Pi>0);return[Sr,Or]},Ht}var Wn=da(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(Wn).scale(149.995)}var vo=da(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function jn(){return t.geoProjection(vo).scale(153.93)}var Mt=da(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kr(){return t.geoProjection(Mt).scale(130.945)}function Jr(ve,be){var De=ve*ve,Be=be*be;return[ve*(1-.162388*Be)*(.87-952426e-9*De*De),be*(1+Be/12)]}Jr.invert=function(ve,be){var De=ve,Be=be,et=50,We;do{var it=Be*Be;Be-=We=(Be*(1+it/12)-be)/(1+it/4)}while(n(We)>p&&--et>0);et=50,ve/=1-.162388*it;do{var Ft=(Ft=De*De)*Ft;De-=We=(De*(.87-952426e-9*Ft)-ve)/(.87-.00476213*Ft)}while(n(We)>p&&--et>0);return[De,Be]};function vi(){return t.geoProjection(Jr).scale(131.747)}var hn=da(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function An(){return t.geoProjection(hn).scale(131.087)}function Mn(ve){var be=ve(S,0)[0]-ve(-S,0)[0];function De(Be,et){var We=Be>0?-.5:.5,it=ve(Be+We*E,et);return it[0]-=We*be,it}return ve.invert&&(De.invert=function(Be,et){var We=Be>0?-.5:.5,it=ve.invert(Be+We*be,et),Ft=it[0]-We*E;return Ft<-E?Ft+=2*E:Ft>E&&(Ft-=2*E),it[0]=Ft,it}),De}function Li(ve,be){var De=v(ve),Be=v(be),et=o(be),We=o(ve)*et,it=_(ve)*et,Ft=_(Be*be);ve=n(a(it,Ft)),be=O(We),n(ve-S)>p&&(ve%=S);var Ht=_n(ve>E/4?S-ve:ve,be);return ve>E/4&&(Ft=Ht[0],Ht[0]=-Ht[1],Ht[1]=-Ft),Ht[0]*=De,Ht[1]*=-Be,Ht}Li.invert=function(ve,be){n(ve)>1&&(ve=v(ve)*2-ve),n(be)>1&&(be=v(be)*2-be);var De=v(ve),Be=v(be),et=-De*ve,We=-Be*be,it=We/et<1,Ft=ya(it?We:et,it?et:We),Ht=Ft[0],tr=Ft[1],dr=o(tr);return it&&(Ht=-S-Ht),[De*(a(_(Ht)*dr,-_(tr))+E),Be*O(o(Ht)*dr)]};function _n(ve,be){if(be===S)return[0,0];var De=_(be),Be=De*De,et=Be*Be,We=1+et,it=1+3*et,Ft=1-et,Ht=O(1/G(We)),tr=Ft+Be*We*Ht,dr=(1-De)/tr,Sr=G(dr),Or=dr*We,Wr=G(Or),ni=Sr*Ft,Pi,cn;if(ve===0)return[0,-(ni+Be*Wr)];var ln=o(be),Cn=1/ln,Kn=2*De*ln,Ta=(-3*Be+Ht*it)*Kn,fa=(-tr*ln-(1-De)*Ta)/(tr*tr),$a=.5*fa/Sr,Co=Ft*$a-2*Be*Sr*Kn,Qa=Be*We*fa+dr*it*Kn,mo=-Cn*Kn,Bo=-Cn*Qa,Ps=-2*Cn*Co,Ts=4*ve/E,wo;if(ve>.222*E||be.175*E){if(Pi=(ni+Be*G(Or*(1+et)-ni*ni))/(1+et),ve>E/4)return[Pi,Pi];var To=Pi,hl=.5*Pi;Pi=.5*(hl+To),cn=50;do{var Ul=G(Or-Pi*Pi),Lu=Pi*(Ps+mo*Ul)+Bo*O(Pi/Wr)-Ts;if(!Lu)break;Lu<0?hl=Pi:To=Pi,Pi=.5*(hl+To)}while(n(To-hl)>p&&--cn>0)}else{Pi=p,cn=25;do{var au=Pi*Pi,Js=G(Or-au),Ql=Ps+mo*Js,dc=Pi*Ql+Bo*O(Pi/Wr)-Ts,Tl=Ql+(Bo-mo*au)/Js;Pi-=wo=Js?dc/Tl:0}while(n(wo)>p&&--cn>0)}return[Pi,-ni-Be*G(Or-Pi*Pi)]}function ya(ve,be){for(var De=0,Be=1,et=.5,We=50;;){var it=et*et,Ft=G(et),Ht=O(1/G(1+it)),tr=1-it+et*(1+it)*Ht,dr=(1-Ft)/tr,Sr=G(dr),Or=dr*(1+it),Wr=Sr*(1-it),ni=Or-ve*ve,Pi=G(ni),cn=be+Wr+et*Pi;if(n(Be-De)0?De=et:Be=et,et=.5*(De+Be)}if(!We)return null;var ln=O(Ft),Cn=o(ln),Kn=1/Cn,Ta=2*Ft*Cn,fa=(-3*et+Ht*(1+3*it))*Ta,$a=(-tr*Cn-(1-Ft)*fa)/(tr*tr),Co=.5*$a/Sr,Qa=(1-it)*Co-2*et*Sr*Ta,mo=-2*Kn*Qa,Bo=-Kn*Ta,Ps=-Kn*(et*(1+it)*$a+dr*(1+3*it)*Ta);return[E/4*(ve*(mo+Bo*Pi)+Ps*O(ve/G(Or))),ln]}function Jn(){return t.geoProjection(Mn(Li)).scale(239.75)}function Ma(ve,be,De){var Be,et,We;return ve?(Be=_o(ve,De),be?(et=_o(be,1-De),We=et[1]*et[1]+De*Be[0]*Be[0]*et[0]*et[0],[[Be[0]*et[2]/We,Be[1]*Be[2]*et[0]*et[1]/We],[Be[1]*et[1]/We,-Be[0]*Be[2]*et[0]*et[2]/We],[Be[2]*et[1]*et[2]/We,-De*Be[0]*Be[1]*et[0]/We]]):[[Be[0],0],[Be[1],0],[Be[2],0]]):(et=_o(be,1-De),[[0,et[0]/et[1]],[1/et[1],0],[et[2]/et[1],0]])}function _o(ve,be){var De,Be,et,We,it;if(be=1-p)return De=(1-be)/4,Be=N(ve),We=Z(ve),et=1/Be,it=Be*j(ve),[We+De*(it-ve)/(Be*Be),et-De*We*et*(it-ve),et+De*We*et*(it+ve),2*i(s(ve))-S+De*(it-ve)/Be];var Ft=[1,0,0,0,0,0,0,0,0],Ht=[G(be),0,0,0,0,0,0,0,0],tr=0;for(Be=G(1-be),it=1;n(Ht[tr]/Ft[tr])>p&&tr<8;)De=Ft[tr++],Ht[tr]=(De-Be)/2,Ft[tr]=(De+Be)/2,Be=G(De*Be),it*=2;et=it*Ft[tr]*ve;do We=Ht[tr]*_(Be=et)/Ft[tr],et=(O(We)+et)/2;while(--tr);return[_(et),We=o(et),We/o(et-Be),et]}function No(ve,be,De){var Be=n(ve),et=n(be),We=j(et);if(Be){var it=1/_(Be),Ft=1/(b(Be)*b(Be)),Ht=-(Ft+De*(We*We*it*it)-1+De),tr=(De-1)*Ft,dr=(-Ht+G(Ht*Ht-4*tr))/2;return[po(i(1/G(dr)),De)*v(ve),po(i(G((dr/Ft-1)/De)),1-De)*v(be)]}return[0,po(i(We),1-De)*v(be)]}function po(ve,be){if(!be)return ve;if(be===1)return u(b(ve/2+L));for(var De=1,Be=G(1-be),et=G(be),We=0;n(et)>p;We++){if(ve%E){var it=i(Be*b(ve)/De);it<0&&(it+=E),ve+=it+~~(ve/E)*E}else ve+=ve;et=(De+Be)/2,Be=G(De*Be),et=((De=et)-Be)/2}return ve/(h(2,We)*De)}function Lo(ve,be){var De=(C-1)/(C+1),Be=G(1-De*De),et=po(S,Be*Be),We=-1,it=u(b(E/4+n(be)/2)),Ft=s(We*it)/G(De),Ht=ko(Ft*o(We*ve),Ft*_(We*ve)),tr=No(Ht[0],Ht[1],Be*Be);return[-tr[1],(be>=0?1:-1)*(.5*et-tr[0])]}function ko(ve,be){var De=ve*ve,Be=be+1,et=1-De-be*be;return[.5*((ve>=0?S:-S)-a(et,2*ve)),-.25*u(et*et+4*De)+.5*u(Be*Be+De)]}function Ds(ve,be){var De=be[0]*be[0]+be[1]*be[1];return[(ve[0]*be[0]+ve[1]*be[1])/De,(ve[1]*be[0]-ve[0]*be[1])/De]}Lo.invert=function(ve,be){var De=(C-1)/(C+1),Be=G(1-De*De),et=po(S,Be*Be),We=-1,it=Ma(.5*et-be,-ve,Be*Be),Ft=Ds(it[0],it[1]),Ht=a(Ft[1],Ft[0])/We;return[Ht,2*i(s(.5/We*u(De*Ft[0]*Ft[0]+De*Ft[1]*Ft[1])))-S]};function Fs(){return t.geoProjection(Mn(Lo)).scale(151.496)}function ll(ve){var be=_(ve),De=o(ve),Be=ul(ve);Be.invert=ul(-ve);function et(We,it){var Ft=Be(We,it);We=Ft[0],it=Ft[1];var Ht=_(it),tr=o(it),dr=o(We),Sr=V(be*Ht+De*tr*dr),Or=_(Sr),Wr=n(Or)>p?Sr/Or:1;return[Wr*De*_(We),(n(We)>S?Wr:-Wr)*(be*tr-De*Ht*dr)]}return et.invert=function(We,it){var Ft=G(We*We+it*it),Ht=-_(Ft),tr=o(Ft),dr=Ft*tr,Sr=-it*Ht,Or=Ft*be,Wr=G(dr*dr+Sr*Sr-Or*Or),ni=a(dr*Or+Sr*Wr,Sr*Or-dr*Wr),Pi=(Ft>S?-1:1)*a(We*Ht,Ft*o(ni)*tr+it*_(ni)*Ht);return Be.invert(Pi,ni)},et}function ul(ve){var be=_(ve),De=o(ve);return function(Be,et){var We=o(et),it=o(Be)*We,Ft=_(Be)*We,Ht=_(et);return[a(Ft,it*De-Ht*be),O(Ht*De+it*be)]}}function zl(){var ve=0,be=t.geoProjectionMutator(ll),De=be(ve),Be=De.rotate,et=De.stream,We=t.geoCircle();return De.parallel=function(it){if(!arguments.length)return ve*P;var Ft=De.rotate();return be(ve=it*T).rotate(Ft)},De.rotate=function(it){return arguments.length?(Be.call(De,[it[0],it[1]-ve*P]),We.center([-it[0],-it[1]]),De):(it=Be.call(De),it[1]+=ve*P,it)},De.stream=function(it){return it=et(it),it.sphere=function(){it.polygonStart();var Ft=.01,Ht=We.radius(90-Ft)().coordinates[0],tr=Ht.length-1,dr=-1,Sr;for(it.lineStart();++dr=0;)it.point((Sr=Ht[dr])[0],Sr[1]);it.lineEnd(),it.polygonEnd()},it},De.scale(79.4187).parallel(45).clipAngle(180-.001)}var us=3,il=O(1-1/us)*P,As=vr(0);function cl(ve){var be=il*T,De=xt(E,be)[0]-xt(-E,be)[0],Be=As(0,be)[1],et=xt(0,be)[1],We=M-et,it=g/ve,Ft=4/g,Ht=Be+We*We*4/g;function tr(dr,Sr){var Or,Wr=n(Sr);if(Wr>be){var ni=f(ve-1,c(0,l((dr+E)/it)));dr+=E*(ve-1)/ve-ni*it,Or=xt(dr,Wr),Or[0]=Or[0]*g/De-g*(ve-1)/(2*ve)+ni*g/ve,Or[1]=Be+(Or[1]-et)*4*We/g,Sr<0&&(Or[1]=-Or[1])}else Or=As(dr,Sr);return Or[0]*=Ft,Or[1]/=Ht,Or}return tr.invert=function(dr,Sr){dr/=Ft,Sr*=Ht;var Or=n(Sr);if(Or>Be){var Wr=f(ve-1,c(0,l((dr+E)/it)));dr=(dr+E*(ve-1)/ve-Wr*it)*De/g;var ni=xt.invert(dr,.25*(Or-Be)*g/We+et);return ni[0]-=E*(ve-1)/ve-Wr*it,Sr<0&&(ni[1]=-ni[1]),ni}return As.invert(dr,Sr)},tr}function Ks(ve,be){return[ve,be&1?90-p:il]}function zs(ve,be){return[ve,be&1?-90+p:-il]}function Io(ve){return[ve[0]*(1-p),ve[1]]}function ls(ve){var be=[].concat(r.range(-180,180+ve/2,ve).map(Ks),r.range(180,-180-ve/2,-ve).map(zs));return{type:"Polygon",coordinates:[ve===180?be.map(Io):be]}}function Zl(){var ve=4,be=t.geoProjectionMutator(cl),De=be(ve),Be=De.stream;return De.lobes=function(et){return arguments.length?be(ve=+et):ve},De.stream=function(et){var We=De.rotate(),it=Be(et),Ft=(De.rotate([0,0]),Be(et));return De.rotate(We),it.sphere=function(){t.geoStream(ls(180/ve),Ft)},it},De.scale(239.75)}function Su(ve){var be=1+ve,De=_(1/be),Be=O(De),et=2*G(E/(We=E+4*Be*be)),We,it=.5*et*(be+G(ve*(2+ve))),Ft=ve*ve,Ht=be*be;function tr(dr,Sr){var Or=1-_(Sr),Wr,ni;if(Or&&Or<2){var Pi=S-Sr,cn=25,ln;do{var Cn=_(Pi),Kn=o(Pi),Ta=Be+a(Cn,be-Kn),fa=1+Ht-2*be*Kn;Pi-=ln=(Pi-Ft*Be-be*Cn+fa*Ta-.5*Or*We)/(2*be*Cn*Ta)}while(n(ln)>k&&--cn>0);Wr=et*G(fa),ni=dr*Ta/E}else Wr=et*(ve+Or),ni=dr*Be/E;return[Wr*_(ni),it-Wr*o(ni)]}return tr.invert=function(dr,Sr){var Or=dr*dr+(Sr-=it)*Sr,Wr=(1+Ht-Or/(et*et))/(2*be),ni=V(Wr),Pi=_(ni),cn=Be+a(Pi,be-Wr);return[O(dr/G(Or))*E/cn,O(1-2*(ni-Ft*Be-be*Pi+(1+Ht-2*be*Wr)*cn)/We)]},tr}function nc(){var ve=1,be=t.geoProjectionMutator(Su),De=be(ve);return De.ratio=function(Be){return arguments.length?be(ve=+Be):ve},De.scale(167.774).center([0,18.67])}var bs=.7109889596207567,Rn=.0528035274542;function _a(ve,be){return be>-bs?(ve=sr(ve,be),ve[1]+=Rn,ve):_t(ve,be)}_a.invert=function(ve,be){return be>-bs?sr.invert(ve,be-Rn):_t.invert(ve,be)};function Vu(){return t.geoProjection(_a).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ol(ve,be){return n(be)>bs?(ve=sr(ve,be),ve[1]-=be>0?Rn:-Rn,ve):_t(ve,be)}Ol.invert=function(ve,be){return n(be)>bs?sr.invert(ve,be+(be>0?Rn:-Rn)):_t.invert(ve,be)};function xo(){return t.geoProjection(Ol).scale(152.63)}function Yl(ve,be,De,Be){var et=G(4*E/(2*De+(1+ve-be/2)*_(2*De)+(ve+be)/2*_(4*De)+be/2*_(6*De))),We=G(Be*_(De)*G((1+ve*o(2*De)+be*o(4*De))/(1+ve+be))),it=De*Ht(1);function Ft(Sr){return G(1+ve*o(2*Sr)+be*o(4*Sr))}function Ht(Sr){var Or=Sr*De;return(2*Or+(1+ve-be/2)*_(2*Or)+(ve+be)/2*_(4*Or)+be/2*_(6*Or))/De}function tr(Sr){return Ft(Sr)*_(Sr)}var dr=function(Sr,Or){var Wr=De*Zt(Ht,it*_(Or)/De,Or/E);isNaN(Wr)&&(Wr=De*v(Or));var ni=et*Ft(Wr);return[ni*We*Sr/E*o(Wr),ni/We*_(Wr)]};return dr.invert=function(Sr,Or){var Wr=Zt(tr,Or*We/et);return[Sr*E/(o(Wr)*et*We*Ft(Wr)),O(De*Ht(Wr/De)/it)]},De===0&&(et=G(Be/E),dr=function(Sr,Or){return[Sr*et,_(Or)/et]},dr.invert=function(Sr,Or){return[Sr/et,O(Or*et)]}),dr}function Ns(){var ve=1,be=0,De=45*T,Be=2,et=t.geoProjectionMutator(Yl),We=et(ve,be,De,Be);return We.a=function(it){return arguments.length?et(ve=+it,be,De,Be):ve},We.b=function(it){return arguments.length?et(ve,be=+it,De,Be):be},We.psiMax=function(it){return arguments.length?et(ve,be,De=+it*T,Be):De*P},We.ratio=function(it){return arguments.length?et(ve,be,De,Be=+it):Be},We.scale(180.739)}function Hl(ve,be,De,Be,et,We,it,Ft,Ht,tr,dr){if(dr.nanEncountered)return NaN;var Sr,Or,Wr,ni,Pi,cn,ln,Cn,Kn,Ta;if(Sr=De-be,Or=ve(be+Sr*.25),Wr=ve(De-Sr*.25),isNaN(Or)){dr.nanEncountered=!0;return}if(isNaN(Wr)){dr.nanEncountered=!0;return}return ni=Sr*(Be+4*Or+et)/12,Pi=Sr*(et+4*Wr+We)/12,cn=ni+Pi,Ta=(cn-it)/15,tr>Ht?(dr.maxDepthCount++,cn+Ta):Math.abs(Ta)>1;do Ht[cn]>Wr?Pi=cn:ni=cn,cn=ni+Pi>>1;while(cn>ni);var ln=Ht[cn+1]-Ht[cn];return ln&&(ln=(Wr-Ht[cn+1])/ln),(cn+1+ln)/it}var Sr=2*dr(1)/E*We/De,Or=function(Wr,ni){var Pi=dr(n(_(ni))),cn=Be(Pi)*Wr;return Pi/=Sr,[cn,ni>=0?Pi:-Pi]};return Or.invert=function(Wr,ni){var Pi;return ni*=Sr,n(ni)<1&&(Pi=v(ni)*O(et(n(ni))*We)),[Wr/Be(n(ni)),Pi]},Or}function Oo(){var ve=0,be=2.5,De=1.183136,Be=t.geoProjectionMutator(aa),et=Be(ve,be,De);return et.alpha=function(We){return arguments.length?Be(ve=+We,be,De):ve},et.k=function(We){return arguments.length?Be(ve,be=+We,De):be},et.gamma=function(We){return arguments.length?Be(ve,be,De=+We):De},et.scale(152.63)}function qo(ve,be){return n(ve[0]-be[0])=0;--Ht)De=ve[1][Ht],Be=De[0][0],et=De[0][1],We=De[1][1],it=De[2][0],Ft=De[2][1],be.push(ql([[it-p,Ft-p],[it-p,We+p],[Be+p,We+p],[Be+p,et-p]],30));return{type:"Polygon",coordinates:[r.merge(be)]}}function Do(ve,be,De){var Be,et;function We(Ht,tr){for(var dr=tr<0?-1:1,Sr=be[+(tr<0)],Or=0,Wr=Sr.length-1;OrSr[Or][2][0];++Or);var ni=ve(Ht-Sr[Or][1][0],tr);return ni[0]+=ve(Sr[Or][1][0],dr*tr>dr*Sr[Or][0][1]?Sr[Or][0][1]:tr)[0],ni}De?We.invert=De(We):ve.invert&&(We.invert=function(Ht,tr){for(var dr=et[+(tr<0)],Sr=be[+(tr<0)],Or=0,Wr=dr.length;Orni&&(Pi=Wr,Wr=ni,ni=Pi),[[Sr,Wr],[Or,ni]]})}),it):be.map(function(tr){return tr.map(function(dr){return[[dr[0][0]*P,dr[0][1]*P],[dr[1][0]*P,dr[1][1]*P],[dr[2][0]*P,dr[2][1]*P]]})})},be!=null&&it.lobes(be),it}var rf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Uf(){return Do(St,rf).scale(160.857)}var pl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Zc(){return Do(Ol,pl).scale(152.63)}var Kl=[[[[-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 Os(){return Do(sr,Kl).scale(169.529)}var yu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function oc(){return Do(sr,yu).scale(169.529).rotate([20,0])}var Cf=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function sc(){return Do(_a,Cf,st).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Vh=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Lf(){return Do(_t,Vh).scale(152.63).rotate([-20,0])}function cs(ve,be){return[3/g*ve*G(E*E/3-be*be),be]}cs.invert=function(ve,be){return[g/3*ve/G(E*E/3-be*be),be]};function nf(){return t.geoProjection(cs).scale(158.837)}function Vf(ve){function be(De,Be){if(n(n(Be)-S)2)return null;De/=2,Be/=2;var We=De*De,it=Be*Be,Ft=2*Be/(1+We+it);return Ft=h((1+Ft)/(1-Ft),1/ve),[a(2*De,1-We-it)/ve,O((Ft-1)/(Ft+1))]},be}function Jl(){var ve=.5,be=t.geoProjectionMutator(Vf),De=be(ve);return De.spacing=function(Be){return arguments.length?be(ve=+Be):ve},De.scale(124.75)}var fl=E/C;function lc(ve,be){return[ve*(1+G(o(be)))/2,be/(o(be/2)*o(ve/6))]}lc.invert=function(ve,be){var De=n(ve),Be=n(be),et=p,We=S;Bep||n(cn)>p)&&--et>0);return et&&[De,Be]};function Hs(){return t.geoProjection(Es).scale(139.98)}function Go(ve,be){return[_(ve)/o(be),b(be)*o(ve)]}Go.invert=function(ve,be){var De=ve*ve,Be=be*be,et=Be+1,We=De+et,it=ve?x*G((We-G(We*We-4*De))/De):1/G(et);return[O(ve*it),v(be)*V(it)]};function ps(){return t.geoProjection(Go).scale(144.049).clipAngle(90-.001)}function uc(ve){var be=o(ve),De=b(L+ve/2);function Be(et,We){var it=We-ve,Ft=n(it)=0;)dr=ve[tr],Sr=dr[0]+Ft*(Wr=Sr)-Ht*Or,Or=dr[1]+Ft*Or+Ht*Wr;return Sr=Ft*(Wr=Sr)-Ht*Or,Or=Ft*Or+Ht*Wr,[Sr,Or]}return De.invert=function(Be,et){var We=20,it=Be,Ft=et;do{for(var Ht=be,tr=ve[Ht],dr=tr[0],Sr=tr[1],Or=0,Wr=0,ni;--Ht>=0;)tr=ve[Ht],Or=dr+it*(ni=Or)-Ft*Wr,Wr=Sr+it*Wr+Ft*ni,dr=tr[0]+it*(ni=dr)-Ft*Sr,Sr=tr[1]+it*Sr+Ft*ni;Or=dr+it*(ni=Or)-Ft*Wr,Wr=Sr+it*Wr+Ft*ni,dr=it*(ni=dr)-Ft*Sr-Be,Sr=it*Sr+Ft*ni-et;var Pi=Or*Or+Wr*Wr,cn,ln;it-=cn=(dr*Or+Sr*Wr)/Pi,Ft-=ln=(Sr*Or-dr*Wr)/Pi}while(n(cn)+n(ln)>p*p&&--We>0);if(We){var Cn=G(it*it+Ft*Ft),Kn=2*i(Cn*.5),Ta=_(Kn);return[a(it*Ta,Cn*o(Kn)),Cn?O(Ft*Ta/Cn):0]}},De}var Po=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],od=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Yo=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pa=[[.9245,0],[0,0],[.01943,0]],af=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Bl(Po,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function bl(){return Bl(od,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Gf(){return Bl(Yo,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ic(){return Bl(Pa,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return Bl(af,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Bl(ve,be){var De=t.geoProjection(ad(ve)).rotate(be).clipAngle(90),Be=t.geoRotation(be),et=De.center;return delete De.rotate,De.center=function(We){return arguments.length?et(Be(We)):Be.invert(et())},De}var wh=G(6),Qf=G(7);function _f(ve,be){var De=O(7*_(be)/(3*wh));return[wh*ve*(2*o(2*De/3)-1)/Qf,9*_(De/3)/Qf]}_f.invert=function(ve,be){var De=3*O(be*Qf/9);return[ve*Qf/(wh*(2*o(2*De/3)-1)),O(_(De)*3*wh/7)]};function Yc(){return t.geoProjection(_f).scale(164.859)}function eh(ve,be){for(var De=(1+x)*_(be),Be=be,et=0,We;et<25&&(Be-=We=(_(Be/2)+_(Be)-De)/(.5*o(Be/2)+o(Be)),!(n(We)k&&--Be>0);return We=De*De,it=We*We,Ft=We*it,[ve/(.84719-.13063*We+Ft*Ft*(-.04515+.05494*We-.02326*it+.00331*Ft)),De]};function of(){return t.geoProjection(cc).scale(175.295)}function Nl(ve,be){return[ve*(1+o(be))/2,2*(be-b(be/2))]}Nl.invert=function(ve,be){for(var De=be/2,Be=0,et=1/0;Be<10&&n(et)>p;++Be){var We=o(be/2);be-=et=(be-b(be/2)-De)/(1-.5/(We*We))}return[2*ve/(1+o(be)),be]};function Kc(){return t.geoProjection(Nl).scale(152.63)}var Rc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function gs(){return Do(Ze(1/0),Rc).rotate([20,0]).scale(152.63)}function jf(ve,be){var De=_(be),Be=o(be),et=v(ve);if(ve===0||n(be)===S)return[0,be];if(be===0)return[ve,0];if(n(ve)===S)return[ve*Be,S*De];var We=E/(2*ve)-2*ve/E,it=2*be/E,Ft=(1-it*it)/(De-it),Ht=We*We,tr=Ft*Ft,dr=1+Ht/tr,Sr=1+tr/Ht,Or=(We*De/Ft-We/2)/dr,Wr=(tr*De/Ht+Ft/2)/Sr,ni=Or*Or+Be*Be/dr,Pi=Wr*Wr-(tr*De*De/Ht+Ft*De-1)/Sr;return[S*(Or+G(ni)*et),S*(Wr+G(Pi<0?0:Pi)*v(-be*We)*et)]}jf.invert=function(ve,be){ve/=S,be/=S;var De=ve*ve,Be=be*be,et=De+Be,We=E*E;return[ve?(et-1+G((1-et)*(1-et)+4*De))/(2*ve)*S:0,Zt(function(it){return et*(E*_(it)-2*it)*E+4*it*it*(be-_(it))+2*E*it-We*be},0)]};function Gh(){return t.geoProjection(jf).scale(127.267)}var rh=1.0148,sf=.23185,Th=-.14499,Mu=.02406,ih=rh,js=5*sf,Eu=7*Th,Dc=9*Mu,ks=1.790857183;function bc(ve,be){var De=be*be;return[ve,be*(rh+De*De*(sf+De*(Th+Mu*De)))]}bc.invert=function(ve,be){be>ks?be=ks:be<-ks&&(be=-ks);var De=be,Be;do{var et=De*De;De-=Be=(De*(rh+et*et*(sf+et*(Th+Mu*et)))-be)/(ih+et*et*(js+et*(Eu+Dc*et)))}while(n(Be)>p);return[ve,De]};function hu(){return t.geoProjection(bc).scale(139.319)}function _u(ve,be){if(n(be)p&&--et>0);return it=b(Be),[(n(be)=0;)if(Be=be[Ft],De[0]===Be[0]&&De[1]===Be[1]){if(We)return[We,De];We=De}}}function jl(ve){for(var be=ve.length,De=[],Be=ve[be-1],et=0;et0?[-Be[0],0]:[180-Be[0],180])};var be=If.map(function(De){return{face:De,project:ve(De)}});return[-1,0,0,1,0,1,4,5].forEach(function(De,Be){var et=be[De];et&&(et.children||(et.children=[])).push(be[Be])}),xf(be[0],function(De,Be){return be[De<-E/2?Be<0?6:4:De<0?Be<0?2:0:DeBe^Wr>Be&&De<(Or-tr)*(Be-dr)/(Wr-dr)+tr&&(et=!et)}return et}function Wl(ve,be){var De=be.stream,Be;if(!De)throw new Error("invalid projection");switch(ve&&ve.type){case"Feature":Be=Zu;break;case"FeatureCollection":Be=ah;break;default:Be=Tc;break}return Be(ve,De)}function ah(ve,be){return{type:"FeatureCollection",features:ve.features.map(function(De){return Zu(De,be)})}}function Zu(ve,be){return{type:"Feature",id:ve.id,properties:ve.properties,geometry:Tc(ve.geometry,be)}}function Oc(ve,be){return{type:"GeometryCollection",geometries:ve.geometries.map(function(De){return Tc(De,be)})}}function Tc(ve,be){if(!ve)return null;if(ve.type==="GeometryCollection")return Oc(ve,be);var De;switch(ve.type){case"Point":De=qc;break;case"MultiPoint":De=qc;break;case"LineString":De=cf;break;case"MultiLineString":De=cf;break;case"Polygon":De=fc;break;case"MultiPolygon":De=fc;break;case"Sphere":De=fc;break;default:return null}return t.geoStream(ve,be(De)),De.result()}var wl=[],vu=[],qc={point:function(ve,be){wl.push([ve,be])},result:function(){var ve=wl.length?wl.length<2?{type:"Point",coordinates:wl[0]}:{type:"MultiPoint",coordinates:wl}:null;return wl=[],ve}},cf={lineStart:Xu,point:function(ve,be){wl.push([ve,be])},lineEnd:function(){wl.length&&(vu.push(wl),wl=[])},result:function(){var ve=vu.length?vu.length<2?{type:"LineString",coordinates:vu[0]}:{type:"MultiLineString",coordinates:vu}:null;return vu=[],ve}},fc={polygonStart:Xu,lineStart:Xu,point:function(ve,be){wl.push([ve,be])},lineEnd:function(){var ve=wl.length;if(ve){do wl.push(wl[0].slice());while(++ve<4);vu.push(wl),wl=[]}},polygonEnd:Xu,result:function(){if(!vu.length)return null;var ve=[],be=[];return vu.forEach(function(De){uf(De)?ve.push([De]):be.push(De)}),be.forEach(function(De){var Be=De[0];ve.some(function(et){if(Xf(et[0],Be))return et.push(De),!0})||ve.push([De])}),vu=[],ve.length?ve.length>1?{type:"MultiPolygon",coordinates:ve}:{type:"Polygon",coordinates:ve[0]}:null}};function Bc(ve){var be=ve(S,0)[0]-ve(-S,0)[0];function De(Be,et){var We=n(Be)0?Be-E:Be+E,et),Ft=(it[0]-it[1])*x,Ht=(it[0]+it[1])*x;if(We)return[Ft,Ht];var tr=be*x,dr=Ft>0^Ht>0?-1:1;return[dr*Ft-v(Ht)*tr,dr*Ht-v(Ft)*tr]}return ve.invert&&(De.invert=function(Be,et){var We=(Be+et)*x,it=(et-Be)*x,Ft=n(We)<.5*be&&n(it)<.5*be;if(!Ft){var Ht=be*x,tr=We>0^it>0?-1:1,dr=-tr*Be+(it>0?1:-1)*Ht,Sr=-tr*et+(We>0?1:-1)*Ht;We=(-dr-Sr)*x,it=(dr-Sr)*x}var Or=ve.invert(We,it);return Ft||(Or[0]+=We>0?E:-E),Or}),t.geoProjection(De).rotate([-90,-90,45]).clipAngle(180-.001)}function At(){return Bc(Li).scale(176.423)}function Wt(){return Bc(Lo).scale(111.48)}function Cr(ve,be){if(!(0<=(be=+be)&&be<=20))throw new Error("invalid digits");function De(tr){var dr=tr.length,Sr=2,Or=new Array(dr);for(Or[0]=+tr[0].toFixed(be),Or[1]=+tr[1].toFixed(be);Sr2||Wr[0]!=dr[0]||Wr[1]!=dr[1])&&(Sr.push(Wr),dr=Wr)}return Sr.length===1&&tr.length>1&&Sr.push(De(tr[tr.length-1])),Sr}function We(tr){return tr.map(et)}function it(tr){if(tr==null)return tr;var dr;switch(tr.type){case"GeometryCollection":dr={type:"GeometryCollection",geometries:tr.geometries.map(it)};break;case"Point":dr={type:"Point",coordinates:De(tr.coordinates)};break;case"MultiPoint":dr={type:tr.type,coordinates:Be(tr.coordinates)};break;case"LineString":dr={type:tr.type,coordinates:et(tr.coordinates)};break;case"MultiLineString":case"Polygon":dr={type:tr.type,coordinates:We(tr.coordinates)};break;case"MultiPolygon":dr={type:"MultiPolygon",coordinates:tr.coordinates.map(We)};break;default:return tr}return tr.bbox!=null&&(dr.bbox=tr.bbox),dr}function Ft(tr){var dr={type:"Feature",properties:tr.properties,geometry:it(tr.geometry)};return tr.id!=null&&(dr.id=tr.id),tr.bbox!=null&&(dr.bbox=tr.bbox),dr}if(ve!=null)switch(ve.type){case"Feature":return Ft(ve);case"FeatureCollection":{var Ht={type:"FeatureCollection",features:ve.features.map(Ft)};return ve.bbox!=null&&(Ht.bbox=ve.bbox),Ht}default:return it(ve)}return ve}function Ar(ve){var be=_(ve);function De(Be,et){var We=be?b(Be*be/2)/be:Be/2;if(!et)return[2*We,-ve];var it=2*i(We*_(et)),Ft=1/b(et);return[_(it)*Ft,et+(1-o(it))*Ft-ve]}return De.invert=function(Be,et){if(n(et+=ve)p&&--Ft>0);var Or=Be*(tr=b(it)),Wr=b(n(et)0?S:-S)*(Ht+et*(dr-it)/2+et*et*(dr-2*Ht+it)/2)]}Xi.invert=function(ve,be){var De=be/S,Be=De*90,et=f(18,n(Be/5)),We=c(0,l(et));do{var it=ki[We][1],Ft=ki[We+1][1],Ht=ki[f(19,We+2)][1],tr=Ht-it,dr=Ht-2*Ft+it,Sr=2*(n(De)-Ft)/tr,Or=dr/tr,Wr=Sr*(1-Or*Sr*(1-2*Or*Sr));if(Wr>=0||We===1){Be=(be>=0?5:-5)*(Wr+et);var ni=50,Pi;do et=f(18,n(Be)/5),We=l(et),Wr=et-We,it=ki[We][1],Ft=ki[We+1][1],Ht=ki[f(19,We+2)][1],Be-=(Pi=(be>=0?S:-S)*(Ft+Wr*(Ht-it)/2+Wr*Wr*(Ht-2*Ft+it)/2)-be)*P;while(n(Pi)>k&&--ni>0);break}}while(--We>=0);var cn=ki[We][0],ln=ki[We+1][0],Cn=ki[f(19,We+2)][0];return[ve/(ln+Wr*(Cn-cn)/2+Wr*Wr*(Cn-2*ln+cn)/2),Be*T]};function dn(){return t.geoProjection(Xi).scale(152.63)}function wn(ve){function be(De,Be){var et=o(Be),We=(ve-1)/(ve-et*o(De));return[We*et*_(De),We*_(Be)]}return be.invert=function(De,Be){var et=De*De+Be*Be,We=G(et),it=(ve-G(1-et*(ve+1)/(ve-1)))/((ve-1)/We+We/(ve-1));return[a(De*it,We*G(1-it*it)),We?O(Be*it/We):0]},be}function Nn(ve,be){var De=wn(ve);if(!be)return De;var Be=o(be),et=_(be);function We(it,Ft){var Ht=De(it,Ft),tr=Ht[1],dr=tr*et/(ve-1)+Be;return[Ht[0]*Be/dr,tr/dr]}return We.invert=function(it,Ft){var Ht=(ve-1)/(ve-1-Ft*et);return De.invert(Ht*it,Ht*Ft*Be)},We}function Yi(){var ve=2,be=0,De=t.geoProjectionMutator(Nn),Be=De(ve,be);return Be.distance=function(et){return arguments.length?De(ve=+et,be):ve},Be.tilt=function(et){return arguments.length?De(ve,be=et*T):be*P},Be.scale(432.147).clipAngle(V(1/ve)*P-1e-6)}var Qi=1e-4,on=1e4,Fi=-180,$n=Fi+Qi,Ca=180,Ra=Ca-Qi,La=-90,Na=La+Qi,Yn=90,Dn=Yn-Qi;function Ka(ve){return ve.length>0}function bo(ve){return Math.floor(ve*on)/on}function Xo(ve){return ve===La||ve===Yn?[0,ve]:[Fi,bo(ve)]}function Ss(ve){var be=ve[0],De=ve[1],Be=!1;return be<=$n?(be=Fi,Be=!0):be>=Ra&&(be=Ca,Be=!0),De<=Na?(De=La,Be=!0):De>=Dn&&(De=Yn,Be=!0),Be?[be,De]:ve}function as(ve){return ve.map(Ss)}function ws(ve,be,De){for(var Be=0,et=ve.length;Be=Ra||dr<=Na||dr>=Dn){We[it]=Ss(Ht);for(var Sr=it+1;Sr$n&&WrNa&&ni=Ft)break;De.push({index:-1,polygon:be,ring:We=We.slice(Sr-1)}),We[0]=Xo(We[0][1]),it=-1,Ft=We.length}}}}function Ho(ve){var be,De=ve.length,Be={},et={},We,it,Ft,Ht,tr;for(be=0;be0?E-Ft:Ft)*P],tr=t.geoProjection(ve(it)).rotate(Ht),dr=t.geoRotation(Ht),Sr=tr.center;return delete tr.rotate,tr.center=function(Or){return arguments.length?Sr(dr(Or)):dr.invert(Sr())},tr.clipAngle(90)}function rs(ve){var be=o(ve);function De(Be,et){var We=t.geoGnomonicRaw(Be,et);return We[0]*=be,We}return De.invert=function(Be,et){return t.geoGnomonicRaw.invert(Be/be,et)},De}function $l(){return Cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Cu(ve,be){return ys(rs,ve,be)}function Yu(ve){if(!(ve*=2))return t.geoAzimuthalEquidistantRaw;var be=-ve/2,De=-be,Be=ve*ve,et=b(De),We=.5/_(De);function it(Ft,Ht){var tr=V(o(Ht)*o(Ft-be)),dr=V(o(Ht)*o(Ft-De)),Sr=Ht<0?-1:1;return tr*=tr,dr*=dr,[(tr-dr)/(2*ve),Sr*G(4*Be*dr-(Be-tr+dr)*(Be-tr+dr))/(2*ve)]}return it.invert=function(Ft,Ht){var tr=Ht*Ht,dr=o(G(tr+(Or=Ft+be)*Or)),Sr=o(G(tr+(Or=Ft+De)*Or)),Or,Wr;return[a(Wr=dr-Sr,Or=(dr+Sr)*et),(Ht<0?-1:1)*V(G(Or*Or+Wr*Wr)*We)]},it}function Nc(){return pu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function pu(ve,be){return ys(Yu,ve,be)}function Uc(ve,be){if(n(be)p&&--Ft>0);return[v(ve)*(G(et*et+4)+et)*E/4,S*it]};function Ku(){return t.geoProjection(hc).scale(127.16)}function ue(ve,be,De,Be,et){function We(it,Ft){var Ht=De*_(Be*Ft),tr=G(1-Ht*Ht),dr=G(2/(1+tr*o(it*=et)));return[ve*tr*dr*_(it),be*Ht*dr]}return We.invert=function(it,Ft){var Ht=it/ve,tr=Ft/be,dr=G(Ht*Ht+tr*tr),Sr=2*O(dr/2);return[a(it*b(Sr),ve*dr)/et,dr&&O(Ft*_(Sr)/(be*De*dr))/Be]},We}function w(ve,be,De,Be){var et=E/3;ve=c(ve,p),be=c(be,p),ve=f(ve,S),be=f(be,E-p),De=c(De,0),De=f(De,100-p),Be=c(Be,p);var We=De/100+1,it=Be/100,Ft=V(We*o(et))/et,Ht=_(ve)/_(Ft*S),tr=be/E,dr=G(it*_(ve/2)/_(be/2)),Sr=dr/G(tr*Ht*Ft),Or=1/(dr*G(tr*Ht*Ft));return ue(Sr,Or,Ht,Ft,tr)}function B(){var ve=65*T,be=60*T,De=20,Be=200,et=t.geoProjectionMutator(w),We=et(ve,be,De,Be);return We.poleline=function(it){return arguments.length?et(ve=+it*T,be,De,Be):ve*P},We.parallels=function(it){return arguments.length?et(ve,be=+it*T,De,Be):be*P},We.inflation=function(it){return arguments.length?et(ve,be,De=+it,Be):De},We.ratio=function(it){return arguments.length?et(ve,be,De,Be=+it):Be},We.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*E+3*G(3),le=2*G(2*E*G(3)/ee),qe=Jt(le*G(3)/E,le,ee/6);function Xe(){return t.geoProjection(qe).scale(176.84)}function ot(ve,be){return[ve*G(1-3*be*be/(E*E)),be]}ot.invert=function(ve,be){return[ve/G(1-3*be*be/(E*E)),be]};function Tt(){return t.geoProjection(ot).scale(152.63)}function Yt(ve,be){var De=o(be),Be=o(ve)*De,et=1-Be,We=o(ve=a(_(ve)*De,-_(be))),it=_(ve);return De=G(1-Be*Be),[it*De-We*et,-We*De-it*et]}Yt.invert=function(ve,be){var De=(ve*ve+be*be)/-2,Be=G(-De*(2+De)),et=be*De+ve*Be,We=ve*De-be*Be,it=G(We*We+et*et);return[a(Be*et,it*(1+De)),it?-O(Be*We/it):0]};function Kt(){return t.geoProjection(Yt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function xr(ve,be){var De=Ee(ve,be);return[(De[0]+ve/S)/2,(De[1]+be)/2]}xr.invert=function(ve,be){var De=ve,Be=be,et=25;do{var We=o(Be),it=_(Be),Ft=_(2*Be),Ht=it*it,tr=We*We,dr=_(De),Sr=o(De/2),Or=_(De/2),Wr=Or*Or,ni=1-tr*Sr*Sr,Pi=ni?V(We*Sr)*G(cn=1/ni):cn=0,cn,ln=.5*(2*Pi*We*Or+De/S)-ve,Cn=.5*(Pi*it+Be)-be,Kn=.5*cn*(tr*Wr+Pi*We*Sr*Ht)+.5/S,Ta=cn*(dr*Ft/4-Pi*it*Or),fa=.125*cn*(Ft*Or-Pi*it*tr*dr),$a=.5*cn*(Ht*Sr+Pi*Wr*We)+.5,Co=Ta*fa-$a*Kn,Qa=(Cn*Ta-ln*$a)/Co,mo=(ln*fa-Cn*Kn)/Co;De-=Qa,Be-=mo}while((n(Qa)>p||n(mo)>p)&&--et>0);return[De,Be]};function Ir(){return t.geoProjection(xr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=oe,e.geoAitoff=Ce,e.geoAitoffRaw=Ee,e.geoArmadillo=ie,e.geoArmadilloRaw=me,e.geoAugust=Le,e.geoAugustRaw=Se,e.geoBaker=ge,e.geoBakerRaw=Pe,e.geoBerghaus=ce,e.geoBerghausRaw=Re,e.geoBertin1953=Gt,e.geoBertin1953Raw=lt,e.geoBoggs=Qt,e.geoBoggsRaw=St,e.geoBonne=er,e.geoBonneRaw=mt,e.geoBottomley=Tr,e.geoBottomleyRaw=lr,e.geoBromley=ti,e.geoBromleyRaw=Lr,e.geoChamberlin=tt,e.geoChamberlinRaw=Ge,e.geoChamberlinAfrica=je,e.geoCollignon=Ie,e.geoCollignonRaw=xt,e.geoCraig=ke,e.geoCraigRaw=xe,e.geoCraster=ar,e.geoCrasterRaw=ir,e.geoCylindricalEqualArea=ii,e.geoCylindricalEqualAreaRaw=vr,e.geoCylindricalStereographic=$r,e.geoCylindricalStereographicRaw=pi,e.geoEckert1=ji,e.geoEckert1Raw=di,e.geoEckert2=wi,e.geoEckert2Raw=In,e.geoEckert3=qn,e.geoEckert3Raw=On,e.geoEckert4=ra,e.geoEckert4Raw=Fn,e.geoEckert5=Ut,e.geoEckert5Raw=la,e.geoEckert6=rr,e.geoEckert6Raw=wt,e.geoEisenlohr=Xr,e.geoEisenlohrRaw=Er,e.geoFahey=Oi,e.geoFaheyRaw=Qr,e.geoFoucaut=tn,e.geoFoucautRaw=$i,e.geoFoucautSinusoidal=yn,e.geoFoucautSinusoidalRaw=fn,e.geoGilbert=ua,e.geoGingery=Wo,e.geoGingeryRaw=ma,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=Wn,e.geoGinzburg5=jn,e.geoGinzburg5Raw=vo,e.geoGinzburg6=kr,e.geoGinzburg6Raw=Mt,e.geoGinzburg8=vi,e.geoGinzburg8Raw=Jr,e.geoGinzburg9=An,e.geoGinzburg9Raw=hn,e.geoGringorten=Jn,e.geoGringortenRaw=Li,e.geoGuyou=Fs,e.geoGuyouRaw=Lo,e.geoHammer=pt,e.geoHammerRaw=Ze,e.geoHammerRetroazimuthal=zl,e.geoHammerRetroazimuthalRaw=ll,e.geoHealpix=Zl,e.geoHealpixRaw=cl,e.geoHill=nc,e.geoHillRaw=Su,e.geoHomolosine=xo,e.geoHomolosineRaw=Ol,e.geoHufnagel=Ns,e.geoHufnagelRaw=Yl,e.geoHyperelliptical=Oo,e.geoHyperellipticalRaw=aa,e.geoInterrupt=Do,e.geoInterruptedBoggs=Uf,e.geoInterruptedHomolosine=Zc,e.geoInterruptedMollweide=Os,e.geoInterruptedMollweideHemispheres=oc,e.geoInterruptedSinuMollweide=sc,e.geoInterruptedSinusoidal=Lf,e.geoKavrayskiy7=nf,e.geoKavrayskiy7Raw=cs,e.geoLagrange=Jl,e.geoLagrangeRaw=Vf,e.geoLarrivee=Fu,e.geoLarriveeRaw=lc,e.geoLaskowski=Hs,e.geoLaskowskiRaw=Es,e.geoLittrow=ps,e.geoLittrowRaw=Go,e.geoLoximuthal=xl,e.geoLoximuthalRaw=uc,e.geoMiller=qs,e.geoMillerRaw=Gu,e.geoModifiedStereographic=Bl,e.geoModifiedStereographicRaw=ad,e.geoModifiedStereographicAlaska=Hu,e.geoModifiedStereographicGs48=bl,e.geoModifiedStereographicGs50=Gf,e.geoModifiedStereographicMiller=Ic,e.geoModifiedStereographicLee=yf,e.geoMollweide=wr,e.geoMollweideRaw=sr,e.geoMtFlatPolarParabolic=Yc,e.geoMtFlatPolarParabolicRaw=_f,e.geoMtFlatPolarQuartic=th,e.geoMtFlatPolarQuarticRaw=eh,e.geoMtFlatPolarSinusoidal=Hf,e.geoMtFlatPolarSinusoidalRaw=ju,e.geoNaturalEarth2=of,e.geoNaturalEarth2Raw=cc,e.geoNellHammer=Kc,e.geoNellHammerRaw=Nl,e.geoInterruptedQuarticAuthalic=gs,e.geoNicolosi=Gh,e.geoNicolosiRaw=jf,e.geoPatterson=hu,e.geoPattersonRaw=bc,e.geoPolyconic=nl,e.geoPolyconicRaw=_u,e.geoPolyhedral=xf,e.geoPolyhedralButterfly=Cs,e.geoPolyhedralCollignon=Wf,e.geoPolyhedralWaterman=Us,e.geoProject=Wl,e.geoGringortenQuincuncial=At,e.geoPeirceQuincuncial=Wt,e.geoPierceQuincuncial=Wt,e.geoQuantize=Cr,e.geoQuincuncial=Bc,e.geoRectangularPolyconic=Kr,e.geoRectangularPolyconicRaw=Ar,e.geoRobinson=dn,e.geoRobinsonRaw=Xi,e.geoSatellite=Yi,e.geoSatelliteRaw=Nn,e.geoSinuMollweide=Vu,e.geoSinuMollweideRaw=_a,e.geoSinusoidal=It,e.geoSinusoidalRaw=_t,e.geoStitch=Ls,e.geoTimes=no,e.geoTimesRaw=va,e.geoTwoPointAzimuthal=Cu,e.geoTwoPointAzimuthalRaw=rs,e.geoTwoPointAzimuthalUsa=$l,e.geoTwoPointEquidistant=pu,e.geoTwoPointEquidistantRaw=Yu,e.geoTwoPointEquidistantUsa=Nc,e.geoVanDerGrinten=xu,e.geoVanDerGrintenRaw=Uc,e.geoVanDerGrinten2=Ua,e.geoVanDerGrinten2Raw=Ac,e.geoVanDerGrinten3=Vc,e.geoVanDerGrinten3Raw=oo,e.geoVanDerGrinten4=Ku,e.geoVanDerGrinten4Raw=hc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=Xe,e.geoWagner4Raw=qe,e.geoWagner6=Tt,e.geoWagner6Raw=ot,e.geoWiechel=Kt,e.geoWiechelRaw=Yt,e.geoWinkel3=Ir,e.geoWinkel3Raw=xr,Object.defineProperty(e,"__esModule",{value:!0})})});var zDe=ye((xmr,FDe)=>{"use strict";var id=Oa(),DZ=Dr(),Mzt=qa(),$A=Math.PI/180,W2=180/Math.PI,zZ={cursor:"pointer"},OZ={cursor:"auto"};function Ezt(e,t){var r=e.projection,n;return t._isScoped?n=kzt:t._isClipped?n=Lzt:n=Czt,n(e,r)}FDe.exports=Ezt;function qZ(e,t){return id.behavior.zoom().translate(t.translate()).scale(t.scale())}function BZ(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,l=s[n],u={},c={};function f(h,d){u[n+"."+h]=DZ.nestedProperty(o,h).get(),Mzt.call("_storeDirectGUIEdit",a,s._preGUI,u);var v=DZ.nestedProperty(l,h);v.get()!==d&&(v.set(d),DZ.nestedProperty(o,h).set(d),c[n+"."+h]=d)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),i.emit("plotly_relayout",c)}function kzt(e,t){var r=qZ(e,t);function n(){id.select(this).style(zZ)}function i(){t.scale(id.event.scale).translate(id.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(){id.select(this).style(OZ),BZ(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function Czt(e,t){var r=qZ(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(E){return t.invert(E)}function v(E){var S=d(E);if(!S)return!0;var L=t(S);return Math.abs(L[0]-E[0])>n||Math.abs(L[1]-E[1])>n}function _(){id.select(this).style(zZ),i=id.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=id.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(id.event.scale),t.translate([o[0],id.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(i=u,l=d(i)),h=!0,e.render(!0);var E=t.rotate(),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],"geo.projection.rotation.lon":-E[0]})}function p(){id.select(this).style(OZ),h&&BZ(e,t,k)}function k(E){var S=t.rotate(),L=t.invert(e.midPt);E("projection.rotation.lon",-S[0]),E("center.lon",L[0]),E("center.lat",L[1])}return r.on("zoomstart",_).on("zoom",b).on("zoomend",p),r}function Lzt(e,t){var r={r:t.rotate(),k:t.scale()},n=qZ(e,t),i=qzt(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){id.select(this).style(zZ);var h=id.mouse(this),d=t.rotate(),v=d,_=t.translate(),b=Pzt(d);s=IF(t,h),o.call(n,"zoom",function(){var p=id.mouse(this);if(t.scale(r.k=id.event.scale),!s)h=p,s=IF(t,h);else if(IF(t,p)){t.rotate(d).translate(_);var k=IF(t,p),E=Rzt(s,k),S=Fzt(Izt(b,E)),L=r.r=Dzt(S,s,v);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=v),t.rotate(L),v=L}u(i.of(this,arguments))}),l(i.of(this,arguments))}).on("zoomend",function(){id.select(this).style(OZ),o.call(n,"zoom",null),c(i.of(this,arguments)),BZ(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return id.rebind(n,i,"on")}function IF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&zzt(r)}function Pzt(e){var t=.5*e[0]*$A,r=.5*e[1]*$A,n=.5*e[2]*$A,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function Izt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function Rzt(e,t){if(!(!e||!t)){var r=Ozt(e,t),n=Math.sqrt(DDe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,DDe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function Dzt(e,t,r){var n=FZ(t,2,e[0]);n=FZ(n,1,e[1]),n=FZ(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(a,i)*W2,f=Math.sqrt(i*i+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*W2-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,_=(Math.atan2(u,s)-Math.atan2(o,h))*W2,b=(Math.atan2(u,s)-Math.atan2(o,-h))*W2,p=IDe(r[0],r[1],d,_),k=IDe(r[0],r[1],v,b);return p<=k?[d,_,r[2]]:[v,b,r[2]]}function IDe(e,t,r,n){var i=RDe(r-e),a=RDe(n-t);return Math.sqrt(i*i+a*a)}function RDe(e){return(e%360+540)%360-180}function FZ(e,t,r){var n=r*$A,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=e[a]*s-e[o]*l,i[o]=e[o]*s+e[a]*l,i}function Fzt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*W2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*W2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*W2]}function zzt(e){var t=e[0]*$A,r=e[1]*$A,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function DDe(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var t1=Oa(),VZ=RZ(),Bzt=VZ.geoPath,Nzt=VZ.geoDistance,Uzt=PDe(),Vzt=qa(),ok=Dr(),Gzt=ok.strTranslate,RF=ka(),ak=So(),ODe=vf(),Hzt=Mc(),UZ=ho(),qDe=Ag().getAutoRange,NZ=yv(),jzt=Of().prepSelect,Wzt=Of().clearOutline,Xzt=Of().selectOnClick,Zzt=zDe(),fp=tk(),Yzt=ix(),NDe=mF(),Kzt=yZ().feature;function UDe(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 Qg=UDe.prototype;VDe.exports=function(t){return new UDe(t)};Qg.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in fp.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!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),Hzt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Qg.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=Jzt(n),h=[[i.l+i.w*a.x[0],i.t+i.h*(1-a.y[1])],[i.l+i.w*a.x[1],i.t+i.h*(1-a.y[0])]],d=n.center||{},v=o.rotation||{},_=s.range||[],b=l.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=qDe(r,u),c.range=qDe(r,c);var p=(u.range[0]+u.range[1])/2,k=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:p,lat:k};else if(n._isClipped){d={lon:p,lat:k},v={lon:p,lat:k,roll:v.roll};var E=o.type,S=fp.lonaxisSpan[E]/2||180,L=fp.lataxisSpan[E]/2||90;_=[p-S,p+S],b=[k-L,k+L]}else d={lon:p,lat:k},v={lon:p,lat:v.lat,roll:v.roll}}f.center([d.lon-v.lon,d.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(o.parallels);var x=BDe(_,b);f.fitExtent(h,x);var C=this.bounds=f.getBounds(x),M=this.fitScale=f.scale(),g=f.translate();if(n.fitbounds){var P=f.getBounds(BDe(u.range,c.range)),T=Math.min((C[1][0]-C[0][0])/(P[1][0]-P[0][0]),(C[1][1]-C[0][1])/(P[1][1]-P[0][1]));isFinite(T)?f.scale(T*M):ok.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*M);var z=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([g[0]+(z[0]-g[0]),g[1]+(z[1]-g[1])]).clipExtent(C),n._isAlbersUsa){var O=f([d.lon,d.lat]),V=f.translate();f.translate([V[0]-(O[0]-V[0]),V[1]-(O[1]-V[1])])}};Qg.updateBaseLayers=function(e,t){var r=this,n=r.topojson,i=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!fp.lineLayers[h]}function l(h){return!!fp.fillLayers[h]}var u=this.hasChoropleth?fp.layersForChoropleth:fp.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete i[h],delete a[h],t1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=i[h]=t1.select(this);h==="bg"?r.bgRect=d.append("rect").style("pointer-events","all"):o(h)?a[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):s(h)?a[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=d.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var d=a[h],v=fp.layerNameToAdjective[h];h==="frame"?d.datum(fp.sphereSVG):s(h)||l(h)?d.datum(Kzt(n,n.objects[h])):o(h)&&d.datum($zt(h,t,e)).call(RF.stroke,t[h].gridcolor).call(ak.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(RF.stroke,t[v+"color"]).call(ak.dashLine,"",t[v+"width"]):l(h)&&d.call(RF.fill,t[v+"color"])})};Qg.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;ak.setRect(this.clipRect,i,a,o,s),this.bgRect.call(ak.setRect,i,a,o,s).call(RF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};Qg.updateFx=function(e,t){var r=this,n=r.graphDiv,i=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+"."+d]=f[d];Vzt.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var v=f.lassoPoints={};v[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&Wzt(n)}};a==="pan"?(i.node().onmousedown=null,i.call(Zzt(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),c.prepFn=function(f,h,d){jzt(f,h,d,c,a)},NZ.init(c)),i.on("mousemove",function(){var f=r.projection.invert(ok.getPositionFromD3Event());if(!f)return NZ.unhover(n,t1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},ODe.hover(n,t1.event,r.id)}),i.on("mouseout",function(){n._dragging||NZ.unhover(n,t1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&Xzt(t1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&ODe.click(n,t1.event))})};Qg.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=t1.select(e.container).append("g").attr("class","geo "+e.id).call(ak.setClipUrl,n,t),e.project=function(i){var a=e.projection(i);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(i){return e.project(i)[0]}},e.yaxis={_id:"y",c2p:function(i){return e.project(i)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},UZ.setConvert(e.mockAxis,r)};Qg.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var i;e._isScoped?i={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?i={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:i={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},ok.extendFlat(this.viewInitial,i)};Qg.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Qg._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?Gzt(o[0],o[1]):null}function i(a){return e.isLonLatOverEdges(a.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",i).attr("transform",n)};function Jzt(e){var t=e.projection,r=t.type,n=fp.projNames[r];n="geo"+ok.titleCase(n);for(var i=VZ[n]||Uzt[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?fp.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;uv}else return!1},a.getPath=function(){return Bzt().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(fp.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-fp.clipPad),a}function $zt(e,t,r){var n=1e-6,i=2.5,a=t[e],o=fp.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(k,E){return[k,E]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(k,E){return[E,k]});var c={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};UZ.setConvert(c,r);var f=UZ.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,d=new Array(h),v=0;v0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}});var GZ=ye((wmr,WDe)=>{"use strict";var e5=Lh(),Qzt=Cc().attributes,e7t=Pd().dash,QA=tk(),t7t=mc().overrideAll,HDe=Z1(),jDe={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:e5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:e7t},r7t=WDe.exports=t7t({domain:Qzt({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:HDe(QA.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:HDe(QA.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:e5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:QA.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:QA.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:QA.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:QA.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:e5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:e5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:e5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:e5.background},lonaxis:jDe,lataxis:jDe},"plot","from-root");r7t.uirevision={valType:"any",editType:"none"}});var YDe=ye((Tmr,ZDe)=>{"use strict";var DF=Dr(),i7t=k_(),n7t=Id().getSubplotData,FF=tk(),a7t=GZ(),XDe=FF.axesNames;ZDe.exports=function(t,r,n){i7t(t,r,n,{type:"geo",attributes:a7t,handleDefaults:o7t,fullData:n,partition:"y"})};function o7t(e,t,r,n){var i=n7t(n.fullData,"geo",n.id),a=i.map(function(oe){return oe.index}),o=r("resolution"),s=r("scope"),l=FF.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",d=t._isConic=u.indexOf("conic")!==-1||u==="albers",v=t._isClipped=!!FF.lonaxisSpan[u];if(e.visible===!1){var _=DF.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var b=r("visible"),p,k=0;k0&&O<0&&(O+=360);var V=(z+O)/2,G;if(!c){var Z=f?l.projRotate:[V,0,0];G=r("projection.rotation.lon",Z[0]),r("projection.rotation.lat",Z[1]),r("projection.rotation.roll",Z[2]),p=r("showcoastlines",!f&&b),p&&(r("coastlinecolor"),r("coastlinewidth")),p=r("showocean",b?void 0:!1),p&&r("oceancolor")}var j,N;if(c?(j=-96.6,N=38.7):(j=f?V:G,N=(T[0]+T[1])/2),r("center.lon",j),r("center.lat",N),h&&(r("projection.tilt"),r("projection.distance")),d){var H=l.projParallels||[0,60];r("projection.parallels",H)}r("projection.scale"),p=r("showland",b?void 0:!1),p&&r("landcolor"),p=r("showlakes",b?void 0:!1),p&&r("lakecolor"),p=r("showrivers",b?void 0:!1),p&&(r("rivercolor"),r("riverwidth")),p=r("showcountries",f&&s!=="usa"&&b),p&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),f||(p=r("showframe",b),p&&(r("framecolor"),r("framewidth"))),r("bgcolor");var te=r("fitbounds");te&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var HZ=ye((Amr,$De)=>{"use strict";var s7t=Id().getSubplotCalcData,l7t=Dr().counterRegex,u7t=GDe(),Xm="geo",KDe=l7t(Xm),JDe={};JDe[Xm]={valType:"subplotid",dflt:Xm,editType:"calc"};function c7t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Xm],i=0;i{"use strict";QDe.exports={attributes:j2(),supplyDefaults:DRe(),colorbar:$d(),formatLabels:ORe(),calc:pF(),calcGeoJSON:IZ().calcGeoJSON,plot:IZ().plot,style:kZ(),styleOnSelect:op().styleOnSelect,hoverPoints:wDe(),eventData:ADe(),selectPoints:EDe(),moduleType:"trace",name:"scattergeo",basePlotModule:HZ(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var rFe=ye((Mmr,tFe)=>{"use strict";tFe.exports=eFe()});var t5=ye((Emr,aFe)=>{"use strict";var{hovertemplateAttrs:d7t,templatefallbackAttrs:v7t}=Ll(),ax=j2(),p7t=Tu(),iFe=Gl(),g7t=Lh().defaultLine,nx=Ao().extendFlat,nFe=ax.marker.line;aFe.exports=nx({locations:{valType:"data_array",editType:"calc"},locationmode:ax.locationmode,z:{valType:"data_array",editType:"calc"},geojson:nx({},ax.geojson,{}),featureidkey:ax.featureidkey,text:nx({},ax.text,{}),hovertext:nx({},ax.hovertext,{}),marker:{line:{color:nx({},nFe.color,{dflt:g7t}),width:nx({},nFe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:ax.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:ax.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:nx({},iFe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:d7t(),hovertemplatefallback:v7t(),showlegend:nx({},iFe.showlegend,{dflt:!1})},p7t("",{cLetter:"z",editTypeOverride:"calc"}))});var sFe=ye((kmr,oFe)=>{"use strict";var sk=Dr(),m7t=Qh(),y7t=t5(),_7t=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");oFe.exports=function(t,r,n,i){function a(h,d){return sk.coerce(t,r,y7t,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&sk.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!==""||sk.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&sk.warn(_7t),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"),m7t(t,r,i,a,{prefix:"",cLetter:"z"}),sk.coerceSelectionMarkerOpacity(r,a)}});var zF=ye((Cmr,cFe)=>{"use strict";var lFe=Eo(),x7t=fs().BADNUM,b7t=gv(),w7t=km(),T7t=z0();function uFe(e){return e&&typeof e=="string"}cFe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return uFe(c)||lFe(c)}:a=uFe;for(var o=0;o{"use strict";var A7t=Oa(),S7t=ka(),jZ=So(),M7t=tc();function E7t(e,t){t&&fFe(e,t)}function fFe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=M7t.makeColorScaleFuncFromTrace(r);i.each(function(l){A7t.select(this).attr("fill",s(l.z)).call(S7t.stroke,l.mlc||o.color).call(jZ.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),jZ.selectedPointStyle(i,r)}function k7t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?jZ.selectedPointStyle(r.selectAll(".choroplethlocation"),n):fFe(e,t)}hFe.exports={style:E7t,styleOnSelect:k7t}});var WZ=ye((Pmr,pFe)=>{"use strict";var C7t=Oa(),dFe=Dr(),r5=ix(),L7t=mF().getTopojsonFeatures,vFe=Ag().findExtremes,P7t=OF().style;function I7t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");dFe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=C7t.select(this),o=a.selectAll("path.choroplethlocation").data(dFe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),P7t(e,i)})}function R7t(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?r5.extractTraceFeature(e):L7t(r,i.topojson),l=[],u=[],c=0;c{"use strict";var D7t=ho(),F7t=t5(),z7t=Dr().fillText;gFe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,l,u,c,f=[r,n],h=[r+360,n];for(l=0;l")}}});var BF=ye((Rmr,mFe)=>{"use strict";mFe.exports=function(t,r,n,i,a){t.location=r.location,t.z=r.z;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var NF=ye((Dmr,yFe)=>{"use strict";yFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";_Fe.exports={attributes:t5(),supplyDefaults:sFe(),colorbar:S_(),calc:zF(),calcGeoJSON:WZ().calcGeoJSON,plot:WZ().plot,style:OF().style,styleOnSelect:OF().styleOnSelect,hoverPoints:qF(),eventData:BF(),selectPoints:NF(),moduleType:"trace",name:"choropleth",basePlotModule:HZ(),categories:["geo","noOpacity","showLegend"],meta:{}}});var wFe=ye((zmr,bFe)=>{"use strict";bFe.exports=xFe()});var UF=ye((Omr,AFe)=>{"use strict";var q7t=qa(),s0=Dr(),B7t=cT();function N7t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,v;if(a.tree){var _=s.p2c(f-d),b=s.p2c(f+d),p=l.p2c(h-d),k=l.p2c(h+d);n==="x"?v=a.tree.range(Math.min(_,b),Math.min(l._rl[0],l._rl[1]),Math.max(_,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(_,b),Math.min(p,k),Math.max(_,b),Math.max(p,k))}else v=a.ids;var E,S,L,x,C,M,g,P,T,z=d;if(n==="x"){var O=!!o.xperiodalignment,V=!!o.yperiodalignment;for(C=0;C=Math.min(G,Z)&&f<=Math.max(G,Z)?0:1/0}if(M=Math.min(j,N)&&h<=Math.max(j,N)?0:1/0}T=Math.sqrt(M*M+g*g),S=v[C]}}}else for(C=v.length-1;C>-1;C--)E=v[C],L=u[E],x=c[E],M=s.c2p(L)-f,g=l.c2p(x)-h,P=Math.sqrt(M*M+g*g),P{"use strict";var SFe=20;MFe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:SFe,SYMBOL_STROKE:SFe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var lk=ye((Bmr,LFe)=>{"use strict";var U7t=Gl(),V7t=ec(),G7t=Cg(),mf=pf(),EFe=df().axisHoverFormat,kFe=Tu(),H7t=Z1(),XZ=Ao().extendFlat,j7t=mc().overrideAll,W7t=ox().DASHES,CFe=mf.line,r1=mf.marker,X7t=r1.line,sx=LFe.exports=j7t({x:mf.x,x0:mf.x0,dx:mf.dx,y:mf.y,y0:mf.y0,dy:mf.dy,xperiod:mf.xperiod,yperiod:mf.yperiod,xperiod0:mf.xperiod0,yperiod0:mf.yperiod0,xperiodalignment:mf.xperiodalignment,yperiodalignment:mf.yperiodalignment,xhoverformat:EFe("x"),yhoverformat:EFe("y"),text:mf.text,hovertext:mf.hovertext,textposition:mf.textposition,textfont:V7t({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:CFe.color,width:CFe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:H7t(W7t),dflt:"solid"}},marker:XZ({},kFe("marker"),{symbol:r1.symbol,angle:r1.angle,size:r1.size,sizeref:r1.sizeref,sizemin:r1.sizemin,sizemode:r1.sizemode,opacity:r1.opacity,colorbar:r1.colorbar,line:XZ({},kFe("marker.line"),{width:X7t.width})}),connectgaps:mf.connectgaps,fill:XZ({},mf.fill,{dflt:"none"}),fillcolor:G7t(),selected:{marker:mf.selected.marker,textfont:mf.selected.textfont},unselected:{marker:mf.unselected.marker,textfont:mf.unselected.textfont},opacity:U7t.opacity},"calc","nested");sx.x.editType=sx.y.editType=sx.x0.editType=sx.y0.editType="calc+clearAxisTypes";sx.hovertemplate=mf.hovertemplate;sx.hovertemplatefallback=mf.hovertemplatefallback;sx.texttemplate=mf.texttemplate;sx.texttemplatefallback=mf.texttemplatefallback});var VF=ye(ZZ=>{"use strict";var PFe=ox();ZZ.isOpenSymbol=function(e){return typeof e=="string"?PFe.OPEN_RE.test(e):e%200>100};ZZ.isDotSymbol=function(e){return typeof e=="string"?PFe.DOT_RE.test(e):e>200}});var DFe=ye((Umr,RFe)=>{"use strict";var IFe=Dr(),Z7t=qa(),Y7t=VF(),K7t=lk(),J7t=Sm(),GF=Ru(),$7t=eT(),Q7t=Ig(),e9t=$p(),t9t=R0(),r9t=Rg(),i9t=D0();RFe.exports=function(t,r,n,i){function a(d,v){return IFe.coerce(t,r,K7t,d,v)}var o=t.marker?Y7t.isOpenSymbol(t.marker.symbol):!1,s=GF.isBubble(t),l=$7t(t,r,i,a);if(!l){r.visible=!1;return}Q7t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var n9t=nI();FFe.exports=function(t,r,n){var i=t.i;return"x"in t||(t.x=r._x[i]),"y"in t||(t.y=r._y[i]),n9t(t,r,n)}});var qFe=ye((Gmr,OFe)=>{"use strict";function a9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,i=o-1):n=o+1}return a}function o9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,i=o-1):n=o+1}return a}function s9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,n=o+1):i=o-1}return a}function l9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,n=o+1):i=o-1}return a}function u9t(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?n=a+1:i=a-1}return-1}function uk(e,t,r,n,i,a){return typeof r=="function"?a(e,t,r,n===void 0?0:n|0,i===void 0?e.length-1:i|0):a(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}OFe.exports={ge:function(e,t,r,n,i){return uk(e,t,r,n,i,a9t)},gt:function(e,t,r,n,i){return uk(e,t,r,n,i,o9t)},lt:function(e,t,r,n,i){return uk(e,t,r,n,i,s9t)},le:function(e,t,r,n,i){return uk(e,t,r,n,i,l9t)},eq:function(e,t,r,n,i){return uk(e,t,r,n,i,u9t)}}});var Zm=ye((Hmr,NFe)=>{"use strict";NFe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=BFe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var c9t=Zm();UFe.exports=f9t;function f9t(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=c9t(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 X2=ye((Wmr,VFe)=>{"use strict";VFe.exports=h9t;function h9t(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;ni&&(i=e[o]),e[o]{GFe.exports=function(){for(var e=0;e{var jFe=YD();WFe.exports=d9t;function d9t(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,i=e.length*n,a,o,s,l;(!t||typeof t=="string")&&(t=new(jFe(t||"float32"))(i+r));var u=t.length-r;if(i!==u)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a{"use strict";XFe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var KFe=ye((Kmr,YFe)=>{"use strict";YFe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var ize=ye((Jmr,rze)=>{"use strict";var JFe=qFe(),$Fe=ZE(),v9t=i5(),p9t=X2(),QFe=Zm(),KZ=HFe(),g9t=Z2(),m9t=ZFe(),y9t=YD(),eze=KFe(),_9t=1073741824;rze.exports=function(t,r){r||(r={}),t=g9t(t,"float64"),r=QFe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=KZ(r.maxDepth,255),i=KZ(r.bounds,p9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=tze(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(y9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let p=0;pn||x>_9t){for(let N=0;N_e||g>Ee||P=z||te===oe)return;let Ce=l[H];oe===void 0&&(oe=Ce.length);for(let Re=te;Re=S&&Ze<=x&&ut>=L&&ut<=C&&O.push(ce)}let me=u[H],ie=me[te*4+0],Se=me[te*4+1],Le=me[te*4+2],Ae=me[te*4+3],Fe=G(me,te+1),Pe=N*.5,ge=H+1;V(Z,j,Pe,ge,ie,Se||Le||Ae||Fe),V(Z,j+Pe,Pe,ge,Se,Le||Ae||Fe),V(Z+Pe,j,Pe,ge,Le,Ae||Fe),V(Z+Pe,j+Pe,Pe,ge,Ae,Fe)}function G(Z,j){let N=null,H=0;for(;N===null;)if(N=Z[j*4+H],H++,H>Z.length)return null;return N}return O}function _(p,k,E,S,L){let x=[];for(let C=0;C{"use strict";nze.exports=ize()});var JZ=ye((Qmr,aze)=>{aze.exports=x9t;function x9t(e){var t=0,r=0,n=0,i=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=n,a[7]+=i;break;case"v":a[1]+=i;break;case"h":a[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(jF,"__esModule",{value:!0});var b9t=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ck=Math.PI*2,$Z=function(t,r,n,i,a,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=i*l-a*u,f=a*l+i*u;return{x:c+o,y:f+s}},w9t=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},oze=function(t,r,n,i){var a=t*i-r*n<0?-1:1,o=t*n+r*i;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},T9t=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),_=Math.pow(f,2),b=Math.pow(h,2),p=d*v-d*b-v*_;p<0&&(p=0),p/=d*b+v*_,p=Math.sqrt(p)*(s===l?-1:1);var k=p*a/o*h,E=p*-o/a*f,S=c*k-u*E+(t+n)/2,L=u*k+c*E+(r+i)/2,x=(f-k)/a,C=(h-E)/o,M=(-f-k)/a,g=(-h-E)/o,P=oze(1,0,x,C),T=oze(x,C,M,g);return l===0&&T>0&&(T-=ck),l===1&&T<0&&(T+=ck),[S,L,P,T]},A9t=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(o===0||s===0)return[];var _=Math.sin(u*ck/360),b=Math.cos(u*ck/360),p=b*(r-i)/2+_*(n-a)/2,k=-_*(r-i)/2+b*(n-a)/2;if(p===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var E=Math.pow(p,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);E>1&&(o*=Math.sqrt(E),s*=Math.sqrt(E));var S=T9t(r,n,i,a,o,s,f,d,_,b,p,k),L=b9t(S,4),x=L[0],C=L[1],M=L[2],g=L[3],P=Math.abs(g)/(ck/4);Math.abs(1-P)<1e-7&&(P=1);var T=Math.max(Math.ceil(P),1);g/=T;for(var z=0;z{"use strict";cze.exports=M9t;var S9t=lze();function M9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function WF(e,t,r,n){return["C",e,t,r,n,r,n]}function uze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}});var QZ=ye((tyr,hze)=>{"use strict";hze.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 pze=ye((ryr,vze)=>{"use strict";var E9t=eM(),k9t=JZ(),C9t=fze(),L9t=QZ(),dze=lE();vze.exports=P9t;function P9t(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(dze(L9t(e),"String is not an SVG path."),e=E9t(e)),dze(Array.isArray(e),"Argument should be a string or an array of path segments."),e=k9t(e),e=C9t(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=i[a+0]),i[a+1]>t[3]&&(t[3]=i[a+1]);return t}});var bze=ye((iyr,xze)=>{var Y2=Math.PI,gze=_ze(120);xze.exports=I9t;function I9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f7&&(r.push(d.splice(0,7)),d.unshift("C"));break;case"S":var _=u,b=c;(t=="C"||t=="S")&&(_+=_-n,b+=b-i),d=["C",_,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=mze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=mze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=XF(u,c,d[1],d[2]);break;case"H":d=XF(u,c,d[1],c);break;case"V":d=XF(u,c,u,d[1]);break;case"Z":d=XF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function XF(e,t,r,n){return["C",e,t,r,n,r,n]}function mze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function yze(e,t,r,n,i,a,o,s,l,u){if(u)E=u[0],S=u[1],p=u[2],k=u[3];else{var c=eY(e,t,-i);e=c.x,t=c.y,c=eY(s,l,-i),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,d=f*f/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var v=r*r,_=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*_-v*h*h-_*f*f)/(v*h*h+_*f*f)));b==1/0&&(b=1);var p=b*r*h/n+(e+s)/2,k=b*-n*f/r+(t+l)/2,E=Math.asin(((t-k)/n).toFixed(9)),S=Math.asin(((l-k)/n).toFixed(9));E=eS&&(E=E-Y2*2),!o&&S>E&&(S=S-Y2*2)}if(Math.abs(S-E)>gze){var L=S,x=s,C=l;S=E+gze*(o&&S>E?1:-1),s=p+r*Math.cos(S),l=k+n*Math.sin(S);var M=yze(s,l,r,n,i,0,o,x,C,[S,L,p,k])}var g=Math.tan((S-E)/4),P=4/3*r*g,T=4/3*n*g,z=[2*e-(e+P*Math.sin(E)),2*t-(t-T*Math.cos(E)),s+P*Math.sin(S),l-T*Math.cos(S),s,l];if(u)return z;M&&(z=z.concat(M));for(var O=0;O{var R9t=JZ(),D9t=bze(),F9t={M:"moveTo",C:"bezierCurveTo"};wze.exports=function(e,t){e.beginPath(),D9t(R9t(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[F9t[n]].apply(e,i)}),e.closePath()}});var Eze=ye((ayr,Mze)=>{"use strict";var z9t=ZE();Mze.exports=O9t;var fk=1e20;function O9t(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,i=t.channel||0,a,o,s,l,u,c,f,h,d,v,_;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),v=0,_=u.length;v<_;v++)l[v]=u[v*c+i]/255;else if(c!==1)throw Error("Raw data can have only 1 value per pixel");var b=Array(a*o),p=Array(a*o),k=Array(s),E=Array(s),S=Array(s+1),L=Array(s);for(v=0,_=a*o;v<_;v++){var x=l[v];b[v]=x===1?0:x===0?fk:Math.pow(Math.max(0,.5-x),2),p[v]=x===1?fk:x===0?0:Math.pow(Math.max(0,x-.5),2)}Aze(b,a,o,k,E,L,S),Aze(p,a,o,k,E,L,S);var C=window.Float32Array?new Float32Array(a*o):new Array(a*o);for(v=0,_=a*o;v<_;v++)C[v]=z9t(1-((b[v]-p[v])/n+r),0,1);return C}function Aze(e,t,r,n,i,a,o){for(var s=0;s{"use strict";var q9t=pze(),B9t=eM(),N9t=Tze(),U9t=QZ(),V9t=Eze(),tY=document.createElement("canvas"),hp=tY.getContext("2d");kze.exports=G9t;function G9t(e,t){if(!U9t(e))throw Error("Argument should be valid svg path string");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=tY.width=t.w||t.width||200,n=tY.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||q9t(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(hp.fillStyle="black",hp.fillRect(0,0,r,n),hp.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?hp.strokeStyle="white":hp.strokeStyle="black",hp.lineWidth=Math.abs(a)),hp.translate(r*.5,n*.5),hp.scale(l,l),H9t()){var u=new Path2D(e);hp.fill(u),a&&hp.stroke(u)}else{var c=B9t(e);N9t(hp,c),hp.fill(),a&&hp.stroke()}hp.setTransform(1,0,0,1,0,0);var f=V9t(hp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var ZF;function H9t(){if(ZF!=null)return ZF;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return ZF=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return ZF=r&&r.data&&r.data[3]===255}});var J2=ye((syr,Nze)=>{"use strict";var KF=Eo(),j9t=Cze(),YF=J_(),W9t=qa(),o5=Dr(),_h=o5.isArrayOrTypedArray,n5=So(),Lze=hf(),Pze=$y().formatColor,a5=Ru(),X9t=k3(),iY=VF(),hk=ox(),Z9t=N1().DESELECTDIM,Ize={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},Y9t=ip().appendArrayPointValue;function K9t(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(a5.hasText(t)&&(n.text=Bze(e,t),n.textSel=Dze(e,t,t.selected),n.textUnsel=Dze(e,t,t.unselected)),a5.hasMarkers(t)&&(n.marker=aY(e,t),n.markerSel=nY(e,t,t.selected),n.markerUnsel=nY(e,t,t.unselected),!t.unselected&&_h(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function aY(e,t){var r=t._length,n=t.marker,i={},a,o=_h(n.symbol),s=_h(n.angle),l=_h(n.color),u=_h(n.line.color),c=_h(n.opacity),f=_h(n.size),h=_h(n.line.width),d;if(o||(d=iY.isOpenSymbol(n.symbol)),o||l||u||c||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var v=n.symbol,_=n.angle,b=Pze(n,n.opacity,r),p=Pze(n.line,n.opacity,r);if(!_h(p[0])){var k=p;for(p=Array(r),a=0;ahk.TOO_MANY_POINTS||a5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o1?l[o]:l[0]:l,d=_h(u)?u.length>1?u[o]:u[0]:u,v=Ize[h],_=Ize[d],b=c?c/.8+1:0,p=-_*b-_*.5;a.offset[o]=[v*b/f,p/f]}}return a}Nze.exports={style:K9t,markerStyle:aY,markerSelection:nY,linePositions:$9t,errorBarPositions:Q9t,textPosition:eOt}});var oY=ye((lyr,Uze)=>{"use strict";var JF=Dr();Uze.exports=function(t,r){var n=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){JF.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=JF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var tOt=HF(),s5=Dr(),Vze=hf(),rOt=Ag().findExtremes,Gze=Dg(),sY=O0(),iOt=sY.calcMarkerSize,nOt=sY.calcAxisExpansion,aOt=sY.setFirstScatter,oOt=F0(),l5=J2(),sOt=oY(),Hze=fs().BADNUM,lOt=ox().TOO_MANY_POINTS;Wze.exports=function(t,r){var n=t._fullLayout,i=r._xA=Vze.getFromId(t,r.xaxis,"x"),a=r._yA=Vze.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=lOt,u=s*2,c={},f,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),v=Gze(r,i,"x",h),_=Gze(r,a,"y",d),b=v.vals,p=_.vals;r._x=b,r._y=p,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=_.starts,r._yEnds=_.ends);var k=new Array(u),E=new Array(s);for(f=0;f1&&s5.extendFlat(o.line,l5.linePositions(e,r,n)),o.errorX||o.errorY){var s=l5.errorBarPositions(e,r,n,i,a);o.errorX&&s5.extendFlat(o.errorX,s.x),o.errorY&&s5.extendFlat(o.errorY,s.y)}return o.text&&(s5.extendFlat(o.text,{positions:n},l5.textPosition(e,r,o.text,o.marker)),s5.extendFlat(o.textSel,{positions:n},l5.textPosition(e,r,o.text,o.markerSel)),s5.extendFlat(o.textUnsel,{positions:n},l5.textPosition(e,r,o.text,o.markerUnsel))),o}});var lY=ye((cyr,Yze)=>{"use strict";var Zze=Dr(),cOt=ka(),fOt=N1().DESELECTDIM;function hOt(e){var t=e[0],r=t.trace,n=t.t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],u=i.textSelectedOptions[a]||{},c=i.textUnselectedOptions[a]||{},f=Zze.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,_=c.color,b=l.color,p=Zze.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h{"use strict";var Kze=Ru(),dOt=lY().styleTextSelection;Jze.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var v=Kze.hasText(s),_=Kze.hasMarkers(s),b=!_&&!v;if(s.visible!==!0||b)return o;var p=[],k=[];if(r!==!1&&!r.degenerate)for(var E=0;E{"use strict";var vOt=UF();$ze.exports={moduleType:"trace",name:"scattergl",basePlotModule:ph(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:lk(),supplyDefaults:DFe(),crossTraceDefaults:aU(),colorbar:$d(),formatLabels:zFe(),calc:Xze(),hoverPoints:vOt.hoverPoints,selectPoints:uY(),meta:{}}});var t7e=ye((dyr,QF)=>{"use strict";var $F=ZE();QF.exports=e7e;QF.exports.to=e7e;QF.exports.from=pOt;function e7e(e,t){t==null&&(t=!0);var r=e[0],n=e[1],i=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,n*=255,i*=255,a*=255),r=$F(r,0,255)&255,n=$F(n,0,255)&255,i=$F(i,0,255)&255,a=$F(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function pOt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=e&255;return t===!1?[r,n,i,a]:[r/255,n/255,i/255,a/255]}});var Oh=ye((vyr,i7e)=>{"use strict";var r7e=Object.getOwnPropertySymbols,gOt=Object.prototype.hasOwnProperty,mOt=Object.prototype.propertyIsEnumerable;function yOt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function _Ot(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}i7e.exports=_Ot()?Object.assign:function(e,t){for(var r,n=yOt(e),i,a=1;a{n7e.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";o7e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";s7e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var ez=ye((yyr,u5)=>{"use strict";u5.exports=dk;u5.exports.float32=u5.exports.float=dk;u5.exports.fract32=u5.exports.fract=xOt;var u7e=new Float32Array(1);function xOt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=dk(e));for(var r=0,n=t.length;r{"use strict";function bOt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function wOt(e,t){return SOt(e)||bOt(e,t)||f7e(e,t)||kOt()}function TOt(e){return AOt(e)||MOt(e)||f7e(e)||EOt()}function AOt(e){if(Array.isArray(e))return fY(e)}function SOt(e){if(Array.isArray(e))return e}function MOt(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f7e(e,t){if(e){if(typeof e=="string")return fY(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 fY(e,t)}}function fY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r 1.0 + delta) { discard; } alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); float borderRadius = fragBorderRadius; float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); vec4 color = mix(fragColor, fragBorderColor, ratio); color.a *= alpha * opacity; gl_FragColor = color; } `]),v.vert=tz([`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; } `]),c7e&&(v.frag=v.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(v)}nv.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};nv.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};nv.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nte)?N.tree=IOt(j,{bounds:me}):te&&te.length&&(N.tree=te),N.tree){var ie={primitive:"points",usage:"static",data:N.tree,type:"uint32"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Se=rz.float32(j);oe({data:Se,usage:"dynamic"});var Le=rz.fract32(j,Se);return _e({data:Le,usage:"dynamic"}),Ee({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),j}},{marker:function(j,N,H){var te=N.activation;if(te.forEach(function(Le){return Le&&Le.destroy&&Le.destroy()}),te.length=0,!j||typeof j[0]=="number"){var oe=e.addMarker(j);te[oe]=!0}else{for(var _e=[],Ee=0,Ce=Math.min(j.length,N.count);Ee=0)return i;var a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(var o=0,s=e.length;on*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};nv.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var i=e.length*.25%t;i{"use strict";gY.exports=az;gY.exports.default=az;function az(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=v7e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(n&&(a=HOt(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var v=r;vu&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return vk(a,o,r,s,l,d,0),o}function v7e(e,t,r,n,i){var a,o;if(i===pY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=d7e(a,e[a],e[a+1],o);return o&&oz(o,o.next)&&(gk(o),o=o.next),o}function Q2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(oz(r,r.next)||xh(r.prev,r,r.next)===0)){if(gk(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function vk(e,t,r,n,i,a,o){if(e){!o&&a&&YOt(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?UOt(e,n,i,a):NOt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),gk(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=VOt(Q2(e),t,r),vk(e,t,r,n,i,a,2)):o===2&&GOt(e,t,r,n,i,a):vk(Q2(e),t,r,n,i,a,1);break}}}}function NOt(e){var t=e.prev,r=e,n=e.next;if(xh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ia?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&c5(i,s,a,l,o,u,v.x,v.y)&&xh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function UOt(e,t,r,n){var i=e.prev,a=e,o=e.next;if(xh(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,u=o.x,c=i.y,f=a.y,h=o.y,d=sl?s>u?s:u:l>u?l:u,b=c>f?c>h?c:h:f>h?f:h,p=dY(d,v,t,r,n),k=dY(_,b,t,r,n),E=e.prevZ,S=e.nextZ;E&&E.z>=p&&S&&S.z<=k;){if(E.x>=d&&E.x<=_&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&c5(s,c,l,f,u,h,E.x,E.y)&&xh(E.prev,E,E.next)>=0||(E=E.prevZ,S.x>=d&&S.x<=_&&S.y>=v&&S.y<=b&&S!==i&&S!==o&&c5(s,c,l,f,u,h,S.x,S.y)&&xh(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;E&&E.z>=p;){if(E.x>=d&&E.x<=_&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&c5(s,c,l,f,u,h,E.x,E.y)&&xh(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;S&&S.z<=k;){if(S.x>=d&&S.x<=_&&S.y>=v&&S.y<=b&&S!==i&&S!==o&&c5(s,c,l,f,u,h,S.x,S.y)&&xh(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function VOt(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!oz(i,a)&&p7e(i,n,n.next,a)&&pk(i,a)&&pk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),gk(n),gk(n.next),n=e=a),n=n.next}while(n!==e);return Q2(n)}function GOt(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&$Ot(o,s)){var l=g7e(o,s);o=Q2(o,o.next),l=Q2(l,l.next),vk(o,t,r,n,i,a,0),vk(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function HOt(e,t,r,n){var i=[],a,o,s,l,u;for(a=0,o=t.length;a=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a&&(a=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&c5(io.x||r.x===o.x&&ZOt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function ZOt(e,t){return xh(e.prev,e,t.prev)<0&&xh(t.next,e,e.next)<0}function YOt(e,t,r,n){var i=e;do i.z===0&&(i.z=dY(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,KOt(i)}function KOt(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function dY(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function JOt(e){var t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function $Ot(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!QOt(e,t)&&(pk(e,t)&&pk(t,e)&&eqt(e,t)&&(xh(e.prev,e,t.prev)||xh(e,t.prev,t))||oz(e,t)&&xh(e.prev,e,e.next)>0&&xh(t.prev,t,t.next)>0)}function xh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function oz(e,t){return e.x===t.x&&e.y===t.y}function p7e(e,t,r,n){var i=nz(xh(e,t,r)),a=nz(xh(e,t,n)),o=nz(xh(r,n,e)),s=nz(xh(r,n,t));return!!(i!==a&&o!==s||i===0&&iz(e,r,t)||a===0&&iz(e,n,t)||o===0&&iz(r,e,n)||s===0&&iz(r,t,n))}function iz(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 nz(e){return e>0?1:e<0?-1:0}function QOt(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&&p7e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function pk(e,t){return xh(e.prev,e,e.next)<0?xh(e,t,e.next)>=0&&xh(e,e.prev,t)>=0:xh(e,t,e.prev)<0||xh(e,e.next,t)<0}function eqt(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function g7e(e,t){var r=new vY(e.i,e.x,e.y),n=new vY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function d7e(e,t,r,n){var i=new vY(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function gk(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 vY(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}az.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(pY(e,0,a,r));if(i)for(var s=0,l=t.length;s0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var _7e=ye((byr,y7e)=>{"use strict";var tqt=X2();y7e.exports=rqt;function rqt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=tqt(e,t));for(var n=0;n{"use strict";x7e.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 T7e=ye((Tyr,w7e)=>{"use strict";w7e.exports=function(){}});var lx=ye((Ayr,A7e)=>{"use strict";var iqt=T7e()();A7e.exports=function(e){return e!==iqt&&e!==null}});var mY=ye((Syr,M7e)=>{"use strict";var nqt=Object.create,aqt=Object.getPrototypeOf,S7e={};M7e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||nqt;return typeof e!="function"?!1:aqt(e(t(null),S7e))===S7e}});var yY=ye((Myr,E7e)=>{"use strict";var oqt=lx(),sqt={function:!0,object:!0};E7e.exports=function(e){return oqt(e)&&sqt[typeof e]||!1}});var i1=ye((Eyr,k7e)=>{"use strict";var lqt=lx();k7e.exports=function(e){if(!lqt(e))throw new TypeError("Cannot use null or undefined");return e}});var L7e=ye((kyr,C7e)=>{"use strict";var _Y=Object.create,sz;mY()()||(sz=xY());C7e.exports=function(){var e,t,r;return!sz||sz.level!==1?_Y:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(sz,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return _Y(n===null?e:n,i)})}()});var xY=ye((Cyr,P7e)=>{"use strict";var uqt=yY(),cqt=i1(),fqt=Object.prototype.isPrototypeOf,hqt=Object.defineProperty,dqt={configurable:!0,enumerable:!1,writable:!0,value:void 0},lz;lz=function(e,t){if(cqt(e),t===null||uqt(t))return e;throw new TypeError("Prototype must be null or an object")};P7e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(lz(n,i),i),n}):t=function(n,i){return lz(n,i).__proto__=i,n}:t=function n(i,a){var o;return lz(i,a),o=fqt.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&hqt(n.nullPolyfill,"__proto__",dqt),i},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(i){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)}());L7e()});var uz=ye((Lyr,I7e)=>{"use strict";I7e.exports=mY()()?Object.setPrototypeOf:xY()});var D7e=ye((Pyr,R7e)=>{"use strict";var vqt=yY();R7e.exports=function(e){if(!vqt(e))throw new TypeError(e+" is not an Object");return e}});var z7e=ye((Iyr,F7e)=>{"use strict";var pqt=Object.create(null),gqt=Math.random;F7e.exports=function(){var e;do e=gqt().toString(36).slice(2);while(pqt[e]);return e}});var ew=ye((Ryr,O7e)=>{"use strict";var mqt=void 0;O7e.exports=function(e){return e!==mqt&&e!==null}});var cz=ye((Dyr,q7e)=>{"use strict";var yqt=ew(),_qt={object:!0,function:!0,undefined:!0};q7e.exports=function(e){return yqt(e)?hasOwnProperty.call(_qt,typeof e):!1}});var N7e=ye((Fyr,B7e)=>{"use strict";var xqt=cz();B7e.exports=function(e){if(!xqt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var V7e=ye((zyr,U7e)=>{"use strict";var bqt=N7e();U7e.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!bqt(e)}});var bY=ye((Oyr,G7e)=>{"use strict";var wqt=V7e(),Tqt=/^\s*class[\s{/}]/,Aqt=Function.prototype.toString;G7e.exports=function(e){return!(!wqt(e)||Tqt.test(Aqt.call(e)))}});var j7e=ye((qyr,H7e)=>{"use strict";H7e.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 X7e=ye((Byr,W7e)=>{"use strict";W7e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var Y7e=ye((Nyr,Z7e)=>{"use strict";var Sqt=lx(),Mqt=Object.keys;Z7e.exports=function(e){return Mqt(Sqt(e)?Object(e):e)}});var J7e=ye((Uyr,K7e)=>{"use strict";K7e.exports=X7e()()?Object.keys:Y7e()});var Q7e=ye((Vyr,$7e)=>{"use strict";var Eqt=J7e(),kqt=i1(),Cqt=Math.max;$7e.exports=function(e,t){var r,n,i=Cqt(arguments.length,2),a;for(e=Object(kqt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";e9e.exports=j7e()()?Object.assign:Q7e()});var wY=ye((Hyr,t9e)=>{"use strict";var Lqt=lx(),Pqt=Array.prototype.forEach,Iqt=Object.create,Rqt=function(e,t){var r;for(r in e)t[r]=e[r]};t9e.exports=function(e){var t=Iqt(null);return Pqt.call(arguments,function(r){Lqt(r)&&Rqt(Object(r),t)}),t}});var i9e=ye((jyr,r9e)=>{"use strict";var TY="razdwatrzy";r9e.exports=function(){return typeof TY.contains!="function"?!1:TY.contains("dwa")===!0&&TY.contains("foo")===!1}});var a9e=ye((Wyr,n9e)=>{"use strict";var Dqt=String.prototype.indexOf;n9e.exports=function(e){return Dqt.call(this,e,arguments[1])>-1}});var AY=ye((Xyr,o9e)=>{"use strict";o9e.exports=i9e()()?String.prototype.contains:a9e()});var n1=ye((Zyr,c9e)=>{"use strict";var hz=ew(),s9e=bY(),l9e=fz(),u9e=wY(),mk=AY(),Fqt=c9e.exports=function(e,t){var r,n,i,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],hz(e)?(r=mk.call(e,"c"),n=mk.call(e,"e"),i=mk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?l9e(u9e(a),o):o};Fqt.gs=function(e,t,r){var n,i,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],hz(t)?s9e(t)?hz(r)?s9e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,hz(e)?(n=mk.call(e,"c"),i=mk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?l9e(u9e(a),o):o}});var yk=ye((Yyr,h9e)=>{"use strict";var f9e=Object.prototype.toString,zqt=f9e.call(function(){return arguments}());h9e.exports=function(e){return f9e.call(e)===zqt}});var _k=ye((Kyr,v9e)=>{"use strict";var d9e=Object.prototype.toString,Oqt=d9e.call("");v9e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||d9e.call(e)===Oqt)||!1}});var g9e=ye((Jyr,p9e)=>{"use strict";p9e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var _9e=ye(($yr,y9e)=>{var m9e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};y9e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return m9e()}try{return __global__||m9e()}finally{delete Object.prototype.__global__}}()});var xk=ye((Qyr,x9e)=>{"use strict";x9e.exports=g9e()()?globalThis:_9e()});var w9e=ye((e1r,b9e)=>{"use strict";var qqt=xk(),SY={object:!0,symbol:!0};b9e.exports=function(){var e=qqt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!SY[typeof e.iterator]||!SY[typeof e.toPrimitive]||!SY[typeof e.toStringTag])}});var A9e=ye((t1r,T9e)=>{"use strict";T9e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var MY=ye((r1r,S9e)=>{"use strict";var Bqt=A9e();S9e.exports=function(e){if(!Bqt(e))throw new TypeError(e+" is not a symbol");return e}});var L9e=ye((i1r,C9e)=>{"use strict";var M9e=n1(),Nqt=Object.create,E9e=Object.defineProperty,Uqt=Object.prototype,k9e=Nqt(null);C9e.exports=function(e){for(var t=0,r,n;k9e[e+(t||"")];)++t;return e+=t||"",k9e[e]=!0,r="@@"+e,E9e(Uqt,r,M9e.gs(null,function(i){n||(n=!0,E9e(this,r,M9e(i)),n=!1)})),r}});var I9e=ye((n1r,P9e)=>{"use strict";var em=n1(),qh=xk().Symbol;P9e.exports=function(e){return Object.defineProperties(e,{hasInstance:em("",qh&&qh.hasInstance||e("hasInstance")),isConcatSpreadable:em("",qh&&qh.isConcatSpreadable||e("isConcatSpreadable")),iterator:em("",qh&&qh.iterator||e("iterator")),match:em("",qh&&qh.match||e("match")),replace:em("",qh&&qh.replace||e("replace")),search:em("",qh&&qh.search||e("search")),species:em("",qh&&qh.species||e("species")),split:em("",qh&&qh.split||e("split")),toPrimitive:em("",qh&&qh.toPrimitive||e("toPrimitive")),toStringTag:em("",qh&&qh.toStringTag||e("toStringTag")),unscopables:em("",qh&&qh.unscopables||e("unscopables"))})}});var F9e=ye((a1r,D9e)=>{"use strict";var R9e=n1(),Vqt=MY(),bk=Object.create(null);D9e.exports=function(e){return Object.defineProperties(e,{for:R9e(function(t){return bk[t]?bk[t]:bk[t]=e(String(t))}),keyFor:R9e(function(t){var r;Vqt(t);for(r in bk)if(bk[r]===t)return r})})}});var q9e=ye((o1r,O9e)=>{"use strict";var Ym=n1(),EY=MY(),dz=xk().Symbol,Gqt=L9e(),Hqt=I9e(),jqt=F9e(),Wqt=Object.create,kY=Object.defineProperties,vz=Object.defineProperty,Xv,f5,z9e;if(typeof dz=="function")try{String(dz()),z9e=!0}catch(e){}else dz=null;f5=function(t){if(this instanceof f5)throw new TypeError("Symbol is not a constructor");return Xv(t)};O9e.exports=Xv=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return z9e?dz(t):(r=Wqt(f5.prototype),t=t===void 0?"":String(t),kY(r,{__description__:Ym("",t),__name__:Ym("",Gqt(t))}))};Hqt(Xv);jqt(Xv);kY(f5.prototype,{constructor:Ym(Xv),toString:Ym("",function(){return this.__name__})});kY(Xv.prototype,{toString:Ym(function(){return"Symbol ("+EY(this).__description__+")"}),valueOf:Ym(function(){return EY(this)})});vz(Xv.prototype,Xv.toPrimitive,Ym("",function(){var e=EY(this);return typeof e=="symbol"?e:e.toString()}));vz(Xv.prototype,Xv.toStringTag,Ym("c","Symbol"));vz(f5.prototype,Xv.toStringTag,Ym("c",Xv.prototype[Xv.toStringTag]));vz(f5.prototype,Xv.toPrimitive,Ym("c",Xv.prototype[Xv.toPrimitive]))});var ux=ye((s1r,B9e)=>{"use strict";B9e.exports=w9e()()?xk().Symbol:q9e()});var U9e=ye((l1r,N9e)=>{"use strict";var Xqt=i1();N9e.exports=function(){return Xqt(this).length=0,this}});var h5=ye((u1r,V9e)=>{"use strict";V9e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var H9e=ye((c1r,G9e)=>{"use strict";var Zqt=ew(),Yqt=cz(),Kqt=Object.prototype.toString;G9e.exports=function(e){if(!Zqt(e))return null;if(Yqt(e)){var t=e.toString;if(typeof t!="function"||t===Kqt)return null}try{return""+e}catch(r){return null}}});var W9e=ye((f1r,j9e)=>{"use strict";j9e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var Z9e=ye((h1r,X9e)=>{"use strict";var Jqt=W9e(),$qt=/[\n\r\u2028\u2029]/g;X9e.exports=function(e){var t=Jqt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace($qt,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 CY=ye((d1r,J9e)=>{"use strict";var Y9e=ew(),Qqt=cz(),eBt=H9e(),tBt=Z9e(),K9e=function(e,t){return e.replace("%v",tBt(t))};J9e.exports=function(e,t,r){if(!Qqt(r))throw new TypeError(K9e(t,e));if(!Y9e(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=eBt(r.errorMessage);throw Y9e(n)||(n=t),new TypeError(K9e(n,e))}});var Q9e=ye((v1r,$9e)=>{"use strict";var rBt=CY(),iBt=ew();$9e.exports=function(e){return iBt(e)?e:rBt(e,"Cannot use %v",arguments[1])}});var tOe=ye((p1r,eOe)=>{"use strict";var nBt=CY(),aBt=bY();eOe.exports=function(e){return aBt(e)?e:nBt(e,"%v is not a plain function",arguments[1])}});var iOe=ye((g1r,rOe)=>{"use strict";rOe.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 aOe=ye((m1r,nOe)=>{"use strict";var oBt=Object.prototype.toString,sBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);nOe.exports=function(e){return typeof e=="function"&&sBt(oBt.call(e))}});var sOe=ye((y1r,oOe)=>{"use strict";oOe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var uOe=ye((_1r,lOe)=>{"use strict";lOe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var fOe=ye((x1r,cOe)=>{"use strict";cOe.exports=sOe()()?Math.sign:uOe()});var dOe=ye((b1r,hOe)=>{"use strict";var lBt=fOe(),uBt=Math.abs,cBt=Math.floor;hOe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:lBt(e)*cBt(uBt(e)))}});var pOe=ye((w1r,vOe)=>{"use strict";var fBt=dOe(),hBt=Math.max;vOe.exports=function(e){return hBt(0,fBt(e))}});var _Oe=ye((T1r,yOe)=>{"use strict";var dBt=ux().iterator,vBt=yk(),pBt=aOe(),gBt=pOe(),gOe=h5(),mBt=i1(),yBt=lx(),_Bt=_k(),mOe=Array.isArray,LY=Function.prototype.call,tw={configurable:!0,enumerable:!0,writable:!0,value:null},PY=Object.defineProperty;yOe.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(mBt(e)),yBt(t)&&gOe(t),!this||this===Array||!pBt(this)){if(!t){if(vBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(mOe(e)){for(o=new Array(s=e.length),i=0;i=55296&&l<=56319&&(h+=e[++i])),h=t?LY.call(t,r,h,a):h,n?(tw.value=h,PY(o,a,tw)):o[a]=h,++a;s=a}}if(s===void 0)for(s=gBt(e.length),n&&(o=new n(s)),i=0;i{"use strict";xOe.exports=iOe()()?Array.from:_Oe()});var TOe=ye((S1r,wOe)=>{"use strict";var xBt=bOe(),bBt=fz(),wBt=i1();wOe.exports=function(e){var t=Object(wBt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?xBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):bBt(i,e),i}});var MOe=ye((M1r,SOe)=>{"use strict";var TBt=h5(),ABt=i1(),SBt=Function.prototype.bind,AOe=Function.prototype.call,MBt=Object.keys,EBt=Object.prototype.propertyIsEnumerable;SOe.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(ABt(r)),TBt(n),i=MBt(r),o&&i.sort(typeof o=="function"?SBt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),AOe.call(e,i,function(s,l){return EBt.call(r,s)?AOe.call(n,a,r[s],s,r,l):t})}}});var kOe=ye((E1r,EOe)=>{"use strict";EOe.exports=MOe()("forEach")});var LOe=ye((k1r,COe)=>{"use strict";var kBt=h5(),CBt=kOe(),LBt=Function.prototype.call;COe.exports=function(e,t){var r={},n=arguments[2];return kBt(t),CBt(e,function(i,a,o,s){r[a]=LBt.call(t,n,i,a,o,s)}),r}});var DOe=ye((C1r,ROe)=>{"use strict";var PBt=ew(),IBt=Q9e(),POe=tOe(),RBt=TOe(),DBt=wY(),FBt=LOe(),zBt=Function.prototype.bind,OBt=Object.defineProperty,qBt=Object.prototype.hasOwnProperty,IOe;IOe=function(e,t,r){var n=IBt(t)&&POe(t.value),i;return i=RBt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&qBt.call(this,e)?n:(t.value=zBt.call(n,r.resolveContext?r.resolveContext(this):this),OBt(this,e,t),this[e])},i};ROe.exports=function(e){var t=DBt(arguments[1]);return PBt(t.resolveContext)&&POe(t.resolveContext),FBt(e,function(r,n){return IOe(n,r,t)})}});var IY=ye((L1r,qOe)=>{"use strict";var BBt=U9e(),NBt=fz(),UBt=h5(),VBt=i1(),qp=n1(),GBt=DOe(),FOe=ux(),zOe=Object.defineProperty,OOe=Object.defineProperties,wk;qOe.exports=wk=function(e,t){if(!(this instanceof wk))throw new TypeError("Constructor requires 'new'");OOe(this,{__list__:qp("w",VBt(e)),__context__:qp("w",t),__nextIndex__:qp("w",0)}),t&&(UBt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete wk.prototype.constructor;OOe(wk.prototype,NBt({_next:qp(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__){zOe(this,"__redo__",qp("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:qp(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:qp(function(){this.__redo__&&BBt.call(this.__redo__),this.__nextIndex__=0})})));zOe(wk.prototype,FOe.iterator,qp(function(){return this}))});var GOe=ye((P1r,VOe)=>{"use strict";var BOe=uz(),NOe=AY(),RY=n1(),HBt=ux(),DY=IY(),UOe=Object.defineProperty,d5;d5=VOe.exports=function(e,t){if(!(this instanceof d5))throw new TypeError("Constructor requires 'new'");DY.call(this,e),t?NOe.call(t,"key+value")?t="key+value":NOe.call(t,"key")?t="key":t="value":t="value",UOe(this,"__kind__",RY("",t))};BOe&&BOe(d5,DY);delete d5.prototype.constructor;d5.prototype=Object.create(DY.prototype,{_resolve:RY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});UOe(d5.prototype,HBt.toStringTag,RY("c","Array Iterator"))});var XOe=ye((I1r,WOe)=>{"use strict";var HOe=uz(),pz=n1(),jBt=ux(),FY=IY(),jOe=Object.defineProperty,v5;v5=WOe.exports=function(e){if(!(this instanceof v5))throw new TypeError("Constructor requires 'new'");e=String(e),FY.call(this,e),jOe(this,"__length__",pz("",e.length))};HOe&&HOe(v5,FY);delete v5.prototype.constructor;v5.prototype=Object.create(FY.prototype,{_next:pz(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});jOe(v5.prototype,jBt.toStringTag,pz("c","String Iterator"))});var YOe=ye((R1r,ZOe)=>{"use strict";var WBt=yk(),XBt=lx(),ZBt=_k(),YBt=ux().iterator,KBt=Array.isArray;ZOe.exports=function(e){return XBt(e)?KBt(e)||ZBt(e)||WBt(e)?!0:typeof e[YBt]=="function":!1}});var JOe=ye((D1r,KOe)=>{"use strict";var JBt=YOe();KOe.exports=function(e){if(!JBt(e))throw new TypeError(e+" is not iterable");return e}});var zY=ye((F1r,eqe)=>{"use strict";var $Bt=yk(),QBt=_k(),$Oe=GOe(),eNt=XOe(),tNt=JOe(),QOe=ux().iterator;eqe.exports=function(e){return typeof tNt(e)[QOe]=="function"?e[QOe]():$Bt(e)?new $Oe(e):QBt(e)?new eNt(e):new $Oe(e)}});var rqe=ye((z1r,tqe)=>{"use strict";var rNt=yk(),iNt=h5(),nNt=_k(),aNt=zY(),oNt=Array.isArray,OY=Function.prototype.call,sNt=Array.prototype.some;tqe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(oNt(e)||rNt(e)?r="array":nNt(e)?r="string":e=aNt(e),iNt(t),a=function(){o=!0},r==="array"){sNt.call(e,function(f){return OY.call(t,n,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),OY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(OY.call(t,n,i.value,a),o)return;i=e.next()}}});var nqe=ye((O1r,iqe)=>{"use strict";iqe.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var sqe=ye((q1r,oqe)=>{"use strict";var lNt=lx(),mz=uz(),gz=D7e(),uNt=i1(),cNt=z7e(),a1=n1(),fNt=zY(),hNt=rqe(),dNt=ux().toStringTag,aqe=nqe(),vNt=Array.isArray,BY=Object.defineProperty,qY=Object.prototype.hasOwnProperty,pNt=Object.getPrototypeOf,cx;oqe.exports=cx=function(){var e=arguments[0],t;if(!(this instanceof cx))throw new TypeError("Constructor requires 'new'");return t=aqe&&mz&&WeakMap!==cx?mz(new WeakMap,pNt(this)):this,lNt(e)&&(vNt(e)||(e=fNt(e))),BY(t,"__weakMapData__",a1("c","$weakMap$"+cNt())),e&&hNt(e,function(r){uNt(r),t.set(r[0],r[1])}),t};aqe&&(mz&&mz(cx,WeakMap),cx.prototype=Object.create(WeakMap.prototype,{constructor:a1(cx)}));Object.defineProperties(cx.prototype,{delete:a1(function(e){return qY.call(gz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:a1(function(e){if(qY.call(gz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:a1(function(e){return qY.call(gz(e),this.__weakMapData__)}),set:a1(function(e,t){return BY(gz(e),this.__weakMapData__,a1("c",t)),this}),toString:a1(function(){return"[object WeakMap]"})});BY(cx.prototype,dNt,a1("c","WeakMap"))});var NY=ye((B1r,lqe)=>{"use strict";lqe.exports=b7e()()?WeakMap:sqe()});var cqe=ye((N1r,uqe)=>{"use strict";uqe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(i===0)return-1;for(var a=0;a{"use strict";var yz=J_(),gNt=X2(),VY=Oh(),mNt=Zm(),yNt=Z2(),fqe=m7e(),_Nt=_7e(),{float32:xNt,fract32:UY}=ez(),bNt=NY(),hqe=i5(),wNt=cqe(),TNt=` 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.; } `,ANt=` 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; } `,SNt=` 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; } `,MNt=` precision highp float; varying vec4 fragColor; void main() { gl_FragColor = fragColor; } `,ENt=` 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; } } } `,kNt=` 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; } `;dqe.exports=Wc;function Wc(e,t){if(!(this instanceof Wc))return new Wc(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Wc.shaders.has(e)?Wc.shaders.get(e):Wc.shaders.set(e,Wc.createShaders(e)).get(e),this.update(t)}Wc.dashMult=2;Wc.maxPatternLength=256;Wc.precisionThreshold=3e6;Wc.maxPoints=1e4;Wc.maxLines=2048;Wc.shaders=new bNt;Wc.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e(VY({vert:TNt,frag:ANt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),i;try{i=e(VY({cull:{enable:!0,face:"back"},vert:ENt,frag:kNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){i=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:SNt,frag:MNt,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:i}};Wc.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};Wc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Wc.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Wc.precisionThreshold||t.scale[1]*t.viewport.height>Wc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Wc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Wc.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((i,a)=>{let o=this.passes[a];if(i!==void 0){if(i===null){this.passes[a]=null;return}if(typeof i[0]=="number"&&(i={positions:i}),i=mNt(i,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},i=VY({},Wc.defaults,i)),i.thickness!=null&&(o.thickness=parseFloat(i.thickness)),i.opacity!=null&&(o.opacity=parseFloat(i.opacity)),i.miterLimit!=null&&(o.miterLimit=parseFloat(i.miterLimit)),i.overlay!=null&&(o.overlay=!!i.overlay,aL-x),k=[],E=0,S=o.hole!=null?o.hole[0]:null;if(S!=null){let L=wNt(p,x=>x>=S);p=p.slice(0,L),p.push(S)}for(let L=0;Lg-S+(p[L]-E)),M=fqe(x,C);M=M.map(g=>g+E+(g+E{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var yqe=ye((V1r,mqe)=>{"use strict";var CNt=X2(),LNt=J_(),PNt=cY(),INt=Zm(),vqe=Oh(),pqe=Z2(),{float32:RNt,fract32:HY}=ez();mqe.exports=DNt;var gqe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function DNt(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,i,a,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:gqe}),v(t),n=e({vert:` precision highp float; attribute vec2 position, positionFract; attribute vec4 error; attribute vec4 color; attribute vec2 direction, lineOffset, capOffset; uniform vec4 viewport; uniform float lineWidth, capSize; uniform vec2 scale, scaleFract, translate, translateFract; varying vec4 fragColor; void main() { fragColor = color / 255.; vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; vec2 position = position + dxy; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; pos += pixelOffset / viewport.zw; gl_Position = vec4(pos * 2. - 1., 0, 1); } `,frag:` precision highp float; varying vec4 fragColor; uniform float opacity; void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(b,p)=>[p.viewport.x,p.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,p)=>p.offset*4,divisor:1},position:{buffer:i,offset:(b,p)=>p.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,p)=>p.offset*8,divisor:1},error:{buffer:s,offset:(b,p)=>p.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:gqe.length}),vqe(f,{update:v,draw:h,destroy:_,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&_(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((p,k)=>{if(p){if(b&&(b[k]?p.draw=!0:p.draw=!1),!p.draw){p.draw=!0;return}d(k)}})}function d(b){typeof b=="number"&&(b=c[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],n(b),b.after&&b.after(b))}function v(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let p=0,k=0;if(f.groups=c=b.map((L,x)=>{let C=c[x];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=INt(L,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),C||(c[x]=C={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=vqe({},u,L)),PNt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=pqe(M),k+=M.length,M),positions:(M,g)=>(M=pqe(M,"float64"),g.count=Math.floor(M.length/2),g.bounds=CNt(M,2),g.offset=p,p+=g.count,M)},{color:(M,g)=>{let P=g.count;if(M||(M="transparent"),!Array.isArray(M)||typeof M[0]=="number"){let z=M;M=Array(P);for(let O=0;O{let T=g.bounds;return M||(M=T),g.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],g.translate=[-M[0],-M[1]],g.scaleFract=HY(g.scale),g.translateFract=HY(g.translate),M},viewport:M=>{let g;return Array.isArray(M)?g={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(g={x:M.x||M.left||0,y:M.y||M.top||0},M.right?g.width=M.right-g.x:g.width=M.w||M.width||0,M.bottom?g.height=M.bottom-g.y:g.height=M.h||M.height||0):g={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},g}}]),C}),p||k){let L=c.reduce((g,P,T)=>g+(P?P.count:0),0),x=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);c.forEach((g,P)=>{if(!g)return;let{positions:T,count:z,offset:O,color:V,errors:G}=g;z&&(C.set(V,O*4),M.set(G,O*4),x.set(T,O*2))});var E=RNt(x);i(E);var S=HY(x,E);a(S),o(C),s(M)}}function _(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var bqe=ye((G1r,xqe)=>{var _qe=/[\'\"]/;xqe.exports=function(t){return t?(_qe.test(t.charAt(0))&&(t=t.substr(1)),_qe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var jY=ye((H1r,FNt)=>{FNt.exports=["inherit","initial","unset"]});var WY=ye((j1r,zNt)=>{zNt.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var XY=ye((W1r,ONt)=>{ONt.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var ZY=ye((X1r,qNt)=>{qNt.exports=["normal","italic","oblique"]});var YY=ye((Z1r,BNt)=>{BNt.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var Sqe=ye((Y1r,Aqe)=>{"use strict";function wqe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,d,v){var _=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(_),i+_+i}r.forEach(function(h,d){for(var v,_=0;h!=v;)if(v=h,h=h.replace(u,f),_++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function Tqe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],i;if(!n)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=i;){if(o++>1e4)throw Error("Circular references in "+e);i=n,n=n.replace(a,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function KY(e,t){return Array.isArray(e)?Tqe(e,t):wqe(e,t)}KY.parse=wqe;KY.stringify=Tqe;Aqe.exports=KY});var kqe=ye((K1r,Eqe)=>{"use strict";var Mqe=Sqe();Eqe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var i=Mqe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l{NNt.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var JY=ye(($1r,Lqe)=>{"use strict";var UNt=Cqe();Lqe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||UNt.indexOf(t)!==-1}}});var Dqe=ye((Q1r,Rqe)=>{"use strict";var VNt=bqe(),GNt=jY(),HNt=WY(),jNt=XY(),WNt=ZY(),XNt=YY(),$Y=kqe(),ZNt=JY().isSize;Rqe.exports=Iqe;var Tk=Iqe.cache={};function Iqe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(Tk[e])return Tk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(HNt.indexOf(e)!==-1)return Tk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=$Y(e,/\s+/),n;n=r.shift();){if(GNt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),Tk[e]=t;if(WNt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(XNt.indexOf(n)!==-1){t.stretch=n;continue}if(jNt.indexOf(n)!==-1){t.weight=n;continue}if(ZNt(n)){var i=$Y(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=Pqe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=Pqe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=$Y(r.join(" "),/\s*,\s*/).map(VNt),Tk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function Pqe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var eK=ye((e_r,Fqe)=>{"use strict";var YNt=Zm(),KNt=JY().isSize,JNt=Sk(jY()),$Nt=Sk(WY()),QNt=Sk(XY()),eUt=Sk(ZY()),tUt=Sk(YY()),rUt={normal:1,"small-caps":1},iUt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},QY={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};Fqe.exports=function(t){if(t=YNt(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&&Ak(t.system,$Nt),t.system;if(Ak(t.style,eUt),Ak(t.variant,rUt),Ak(t.weight,QNt),Ak(t.stretch,tUt),t.size==null&&(t.size=QY.size),typeof t.size=="number"&&(t.size+="px"),!KNt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=QY.family),Array.isArray(t.family)&&(t.family.length||(t.family=[QY.family]),t.family=t.family.map(function(n){return iUt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function Ak(e,t){if(e&&!t[e]&&!JNt[e])throw Error("Unknown keyword `"+e+"`");return e}function Sk(e){for(var t={},r=0;r{"use strict";zqe.exports={parse:Dqe(),stringify:eK()}});var qqe=ye((tK,rK)=>{(function(e,t){typeof tK=="object"&&typeof rK!="undefined"?rK.exports=t():e.createREGL=t()})(tK,function(){"use strict";var e=function(Me,bt){for(var zt=Object.keys(bt),Rr=0;Rr1&&bt===zt&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Rr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Rr)return s(Me.substr(0,Rr.index)).concat(s(Rr[1])).concat(s(Me.substr(Rr.index+Rr[0].length)));var jr=Me.split(".");if(jr.length===1)return['"'+o(Me)+'"'];for(var Nr=[],Gr=0;Gr65535)<<4,Me>>>=bt,zt=(Me>255)<<3,Me>>>=zt,bt|=zt,zt=(Me>15)<<2,Me>>>=zt,bt|=zt,zt=(Me>3)<<1,Me>>>=zt,bt|=zt,bt|Me>>1}function N(){var Me=M(8,function(){return[]});function bt(Nr){var Gr=Z(Nr),mi=Me[j(Gr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Gr)}function zt(Nr){Me[j(Nr.byteLength)>>2].push(Nr)}function Rr(Nr,Gr){var mi=null;switch(Nr){case g:mi=new Int8Array(bt(Gr),0,Gr);break;case P:mi=new Uint8Array(bt(Gr),0,Gr);break;case T:mi=new Int16Array(bt(2*Gr),0,Gr);break;case z:mi=new Uint16Array(bt(2*Gr),0,Gr);break;case O:mi=new Int32Array(bt(4*Gr),0,Gr);break;case V:mi=new Uint32Array(bt(4*Gr),0,Gr);break;case G:mi=new Float32Array(bt(4*Gr),0,Gr);break;default:return null}return mi.length!==Gr?mi.subarray(0,Gr):mi}function jr(Nr){zt(Nr.buffer)}return{alloc:bt,free:zt,allocType:Rr,freeType:jr}}var H=N();H.zero=N();var te=3408,oe=3410,_e=3411,Ee=3412,Ce=3413,me=3414,ie=3415,Se=33901,Le=33902,Ae=3379,Fe=3386,Pe=34921,ge=36347,Re=36348,ce=35661,Ze=35660,ut=34930,pt=36349,Zt=34076,st=34024,lt=7936,Gt=7937,Nt=7938,Jt=35724,sr=34047,wr=36063,cr=34852,$e=3553,St=34067,Qt=34069,Vt=33984,_t=6408,It=5126,mt=5121,er=36160,lr=36053,Tr=36064,Lr=16384,ti=function(Me,bt){var zt=1;bt.ext_texture_filter_anisotropic&&(zt=Me.getParameter(sr));var Rr=1,jr=1;bt.webgl_draw_buffers&&(Rr=Me.getParameter(cr),jr=Me.getParameter(wr));var Nr=!!bt.oes_texture_float;if(Nr){var Gr=Me.createTexture();Me.bindTexture($e,Gr),Me.texImage2D($e,0,_t,1,1,0,_t,It,null);var mi=Me.createFramebuffer();if(Me.bindFramebuffer(er,mi),Me.framebufferTexture2D(er,Tr,$e,Gr,0),Me.bindTexture($e,null),Me.checkFramebufferStatus(er)!==lr)Nr=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Lr);var Ui=H.allocType(It,4);Me.readPixels(0,0,1,1,_t,It,Ui),Me.getError()?Nr=!1:(Me.deleteFramebuffer(mi),Me.deleteTexture(Gr),Nr=Ui[0]===1),H.freeType(Ui)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ei=!0;if(!qi){var Hn=Me.createTexture(),en=H.allocType(mt,36);Me.activeTexture(Vt),Me.bindTexture(St,Hn),Me.texImage2D(Qt,0,_t,3,3,0,_t,mt,en),H.freeType(en),Me.bindTexture(St,null),Me.deleteTexture(Hn),Ei=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(Ee),Me.getParameter(Ce)],depthBits:Me.getParameter(me),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(te),extensions:Object.keys(bt).filter(function(Wi){return!!bt[Wi]}),maxAnisotropic:zt,maxDrawbuffers:Rr,maxColorAttachments:jr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Le),maxViewportDims:Me.getParameter(Fe),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Zt),maxRenderbufferSize:Me.getParameter(st),maxTextureUnits:Me.getParameter(ut),maxTextureSize:Me.getParameter(Ae),maxAttributes:Me.getParameter(Pe),maxVertexUniforms:Me.getParameter(ge),maxVertexTextureUnits:Me.getParameter(Ze),maxVaryingVectors:Me.getParameter(Re),maxFragmentUniforms:Me.getParameter(pt),glsl:Me.getParameter(Jt),renderer:Me.getParameter(Gt),vendor:Me.getParameter(lt),version:Me.getParameter(Nt),readFloat:Nr,npotTextureCube:Ei}},Br=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function Vr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||Br(Me.data))}var dt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:xe,flatten:Ie};function Je(Me,bt,zt){for(var Rr=0;Rr0){var Bn;if(Array.isArray(Yr[0])){Zi=Fn(Yr);for(var hi=1,li=1;li0){if(typeof hi[0]=="number"){var Vi=H.allocType(ci.dtype,hi.length);Er(Vi,hi),Zi(Vi,mn),H.freeType(Vi)}else if(Array.isArray(hi[0])||Br(hi[0])){Ji=Fn(hi);var Ni=qn(hi,Ji,ci.dtype);Zi(Ni,mn),H.freeType(Ni)}}}else if(Vr(hi)){Ji=hi.shape;var pn=hi.stride,Vn=0,na=0,Ki=0,kn=0;Ji.length===1?(Vn=Ji[0],na=1,Ki=pn[0],kn=0):Ji.length===2&&(Vn=Ji[0],na=Ji[1],Ki=pn[0],kn=pn[1]);var ta=Array.isArray(hi.data)?ci.dtype:nr(hi.data),oa=H.allocType(ta,Vn*na);Xr(oa,hi.data,Vn,na,Ki,kn,hi.offset),Zi(oa,mn),H.freeType(oa)}return an}return xi||an(Mr),an._reglType="buffer",an._buffer=ci,an.subdata=Bn,zt.profile&&(an.stats=ci.stats),an.destroy=function(){en(ci)},an}function si(){dt(Nr).forEach(function(Mr){Mr.buffer=Me.createBuffer(),Me.bindBuffer(Mr.type,Mr.buffer),Me.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(bt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Nr).forEach(function(Yr){Mr+=Nr[Yr].stats.size}),Mr}),{create:Wi,createStream:Ui,destroyStream:qi,clear:function(){dt(Nr).forEach(en),mi.forEach(en)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Gr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var Qr=0,Oi=0,$i=1,tn=1,fn=4,yn=4,Sn={points:Qr,point:Oi,lines:$i,line:tn,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Wo=5122,da=5123,Wn=5124,Ha=5125,vo=34963,jn=35040,Mt=35044;function kr(Me,bt,zt,Rr){var jr={},Nr=0,Gr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Gr.uint32=Ha);function mi(si){this.id=Nr++,jr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ui=[];function qi(si){var Mr=Ui.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Ei(si){Ui.push(si)}function Hn(si,Mr,Yr,xi,Ri,ci,an){si.buffer.bind();var Zi;if(Mr){var Bn=an;!an&&(!Br(Mr)||Vr(Mr)&&!Br(Mr.data))&&(Bn=bt.oes_element_index_uint?Ha:da),zt._initBuffer(si.buffer,Mr,Yr,Bn,3)}else Me.bufferData(vo,ci,Yr),si.buffer.dtype=Zi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Zi=an,!an){switch(si.buffer.dtype){case Fa:case Wa:Zi=Fa;break;case da:case Wo:Zi=da;break;case Ha:case Wn:Zi=Ha;break;default:}si.buffer.dtype=Zi}si.type=Zi;var hi=Ri;hi<0&&(hi=si.buffer.byteLength,Zi===da?hi>>=1:Zi===Ha&&(hi>>=2)),si.vertCount=hi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=ua),mn===3&&(li=ma)}si.primType=li}function en(si){Rr.elementsCount--,delete jr[si.id],si.buffer.destroy(),si.buffer=null}function Wi(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Rr.elementsCount++;function Ri(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci=="number")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var an=null,Zi=Mt,Bn=-1,hi=-1,li=0,mn=0;Array.isArray(ci)||Br(ci)||Vr(ci)?an=ci:("data"in ci&&(an=ci.data),"usage"in ci&&(Zi=On[ci.usage]),"primitive"in ci&&(Bn=Sn[ci.primitive]),"count"in ci&&(hi=ci.count|0),"type"in ci&&(mn=Gr[ci.type]),"length"in ci?li=ci.length|0:(li=hi,mn===da||mn===Wo?li*=2:(mn===Ha||mn===Wn)&&(li*=4))),Hn(xi,an,Zi,Bn,hi,li,mn)}return Ri}return Ri(si),Ri._reglType="elements",Ri._elements=xi,Ri.subdata=function(ci,an){return Yr.subdata(ci,an),Ri},Ri.destroy=function(){en(xi)},Ri}return{create:Wi,createStream:qi,destroyStream:Ei,getElements:function(si){return typeof si=="function"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(jr).forEach(en)}}}var Jr=new Float32Array(1),vi=new Uint32Array(Jr.buffer),hn=5123;function An(Me){for(var bt=H.allocType(hn,Me.length),zt=0;zt>>31<<15,Nr=(Rr<<1>>>24)-127,Gr=Rr>>13&1023;if(Nr<-24)bt[zt]=jr;else if(Nr<-14){var mi=-14-Nr;bt[zt]=jr+(Gr+1024>>mi)}else Nr>15?bt[zt]=jr+31744:bt[zt]=jr+(Nr+15<<10)+Gr}return bt}function Mn(Me){return Array.isArray(Me)||Br(Me)}var Li=34467,_n=3553,ya=34067,Jn=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Zl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Yl=36196,Ns=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Uf=10241,pl=9728,Zc=9729,Kl=9984,Os=9985,yu=9986,oc=9987,Cf=33170,sc=4352,Vh=4353,Lf=4354,cs=34046,nf=3317,Vf=37440,Jl=37441,fl=37443,lc=37444,Fu=33984,Es=[Kl,yu,Os,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),qs=ps("ImageBitmap"),ad=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),od=Object.keys(ke).concat([uc,xl,Gu,qs,ad,Po]),Yo=[];Yo[Ns]=1,Yo[aa]=4,Yo[zs]=2,Yo[Hl]=2,Yo[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Zl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Yl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!Mn(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Gf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===qs}function wh(Me){return bl(Me)===ad}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return od.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||Vr(Me)}function Yc(Me){return ke[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var zt=bt.length;switch(Me.type){case Ns:case Hl:case ac:case aa:var Rr=H.allocType(Me.type,zt);Rr.set(bt),Me.data=Rr;break;case zs:Me.data=An(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?aa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=An(bt),H.freeType(bt)):Me.data=bt}function Hf(Me,bt,zt,Rr,jr,Nr){for(var Gr=Me.width,mi=Me.height,Ui=Me.channels,qi=Gr*mi*Ui,Ei=th(Me,qi),Hn=0,en=0;en=1;)mi+=Gr*Ui*Ui,Ui/=2;return mi}else return Gr*zt*Rr}function of(Me,bt,zt,Rr,jr,Nr,Gr){var mi={"don't care":sc,"dont care":sc,nice:Lf,fast:Vh},Ui={repeat:ql,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Ei=e({mipmap:oc,"nearest mipmap nearest":Kl,"linear mipmap nearest":Os,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Hn={none:0,browser:lc},en={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},Wi={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},si={};bt.ext_srgb&&(Wi.srgb=cl,Wi.srgba=Ks),bt.oes_texture_float&&(en.float32=en.float=aa),bt.oes_texture_half_float&&(en.float16=en["half float"]=zs),bt.webgl_depth_texture&&(e(Wi,{depth:il,"depth stencil":As}),e(en,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(si,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Zl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(si,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(si,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":Ol,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(si["rgb etc1"]=Yl);var Mr=Array.prototype.slice.call(Me.getParameter(Li));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(Wi[ne]=we)});var Yr=Object.keys(Wi);zt.textureFormats=Yr;var xi=[];Object.keys(Wi).forEach(function(ne){var we=Wi[ne];xi[we]=ne});var Ri=[];Object.keys(en).forEach(function(ne){var we=en[ne];Ri[we]=ne});var ci=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ci[we]=ne});var an=[];Object.keys(Ei).forEach(function(ne){var we=Ei[ne];an[we]=ne});var Zi=[];Object.keys(Ui).forEach(function(ne){var we=Ui[ne];Zi[we]=ne});var Bn=Yr.reduce(function(ne,we){var Ue=Wi[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===il||Ue===As||bt.ext_srgb&&(Ue===cl||Ue===Ks)?ne[Ue]=Ue:Ue===Ds||we.indexOf("rgba")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function hi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!="object"||!we)){if("premultiplyAlpha"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),"flipY"in we&&(ne.flipY=we.flipY),"alignment"in we&&(ne.unpackAlignment=we.alignment),"colorSpace"in we&&(ne.colorSpace=Hn[we.colorSpace]),"type"in we){var Ue=we.type;ne.type=en[Ue]}var ft=ne.width,Xt=ne.height,hr=ne.channels,qt=!1;"shape"in we?(ft=we.shape[0],Xt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):("radius"in we&&(ft=Xt=we.radius),"width"in we&&(ft=we.width),"height"in we&&(Xt=we.height),"channels"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Xt|0,ne.channels=hr|0;var Ve=!1;if("format"in we){var Qe=we.format,at=ne.internalformat=Wi[Qe];ne.format=Bn[at],Qe in en&&("type"in we||(ne.type=en[Qe])),Qe in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Vf,ne.flipY),Me.pixelStorei(Jl,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Vi(){hi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ni(ne,we){var Ue=null;if(_f(we)?Ue=we:we&&(mn(ne,we),"x"in we&&(ne.xOffset=we.x|0),"y"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Ue=we.data)),we.copy){var ft=jr.viewportWidth,Xt=jr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Xt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Br(Ue))ne.channels=ne.channels||4,ne.data=Ue,!("type"in we)&&ne.type===Ns&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Vr(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Ns&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,Qe,at,Ct,Ot,Rt,Bt;qt.length===3?(Ct=qt[2],Bt=Ve[2]):(Ct=1,Bt=1),Qe=qt[0],at=qt[1],Ot=Ve[0],Rt=Ve[1],ne.alignment=1,ne.width=Qe,ne.height=at,ne.channels=Ct,ne.format=ne.internalformat=Hs[Ct],ne.needsFree=!0,Hf(ne,hr,Ot,Rt,Bt,Ue.offset)}else if(Gf(Ue)||Ic(Ue)||yf(Ue))Gf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(wh(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Dt=ne.width||Ue[0].length,yt=ne.height||Ue.length,Pt=ne.channels;Mn(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),ur=1,br=0;br>=Xt,Ue.height>>=Xt,Ni(Ue,ft[Xt]),ne.mipmask|=1<=0&&!("faces"in we)&&(ne.genMipmaps=!0)}if("mag"in we){var ft=we.mag;ne.magFilter=qi[ft]}var Xt=ne.wrapS,hr=ne.wrapT;if("wrap"in we){var qt=we.wrap;typeof qt=="string"?Xt=hr=Ui[qt]:Array.isArray(qt)&&(Xt=Ui[qt[0]],hr=Ui[qt[1]])}else{if("wrapS"in we){var Ve=we.wrapS;Xt=Ui[Ve]}if("wrapT"in we){var Qe=we.wrapT;hr=Ui[Qe]}}if(ne.wrapS=Xt,ne.wrapT=hr,"anisotropic"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if("mipmap"in we){var Ct=!1;switch(typeof we.mipmap){case"string":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,Ct=!0;break;case"boolean":Ct=ne.genMipmaps=we.mipmap;break;case"object":ne.genMipmaps=!1,Ct=!0;break;default:}Ct&&!("min"in we)&&(ne.minFilter=Kl)}}function al(ne,we){Me.texParameteri(we,Uf,ne.minFilter),Me.texParameteri(we,rf,ne.magFilter),Me.texParameteri(we,Oo,ne.wrapS),Me.texParameteri(we,qo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=zt.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){hi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Gr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Me.activeTexture(Fu+Ue),Me.bindTexture(ft,null),Ys[Ue]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Nr.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue0)continue;ft.unit=-1}Ys[Ue]=ne,we=Ue;break}we>=Vs,Gr.profile&&Nr.maxTextureUnits>Rt)-Ct,Bt.height=Bt.height||(Ue.height>>Rt)-Ot,ol(Ue),Vn(Bt,_n,Ct,Ot,Rt),io(),kn(Bt),ft}function hr(qt,Ve){var Qe=qt|0,at=Ve|0||Qe;if(Qe===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=Qe,ft.height=Ue.height=at,ol(Ue);for(var Ct=0;Ue.mipmask>>Ct;++Ct){var Ot=Qe>>Ct,Rt=at>>Ct;if(!Ot||!Rt)break;Me.texImage2D(_n,Ct,Ue.format,Ot,Rt,0,Ue.format,Ue.type,null)}return io(),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,Qe,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Xt,ft.resize=hr,ft._reglType="texture2d",ft._texture=Ue,Gr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Xt,hr){var qt=new wa(ya);ss[qt.id]=qt,Nr.cubeCount++;var Ve=new Array(6);function Qe(Ot,Rt,Bt,Dt,yt,Pt){var ht,ur=qt.texInfo;for(zo.call(ur),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot=="number"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot=="object")if(Rt)ba(Ve[0],Ot),ba(Ve[1],Rt),ba(Ve[2],Bt),ba(Ve[3],Dt),ba(Ve[4],yt),ba(Ve[5],Pt);else if(Qs(ur,Ot),mn(qt,Ot),"faces"in Ot){var Ur=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),ba(Ve[ht],Ur[ht])}else for(ht=0;ht<6;++ht)ba(Ve[ht],Ot);for(li(qt,Ve[0]),ur.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,Qe.width=Ve[0].width,Qe.height=Ve[0].height,ol(qt),ht=0;ht<6;++ht)is(Ve[ht],Jn+ht);for(al(ur,ya),io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,ur.genMipmaps,!0)),Qe.format=xi[qt.internalformat],Qe.type=Ri[qt.type],Qe.mag=ci[ur.magFilter],Qe.min=an[ur.minFilter],Qe.wrapS=Zi[ur.wrapS],Qe.wrapT=Zi[ur.wrapT],ht=0;ht<6;++ht)Ml(Ve[ht]);return Qe}function at(Ot,Rt,Bt,Dt,yt){var Pt=Bt|0,ht=Dt|0,ur=yt|0,br=Ki();return li(br,qt),br.width=0,br.height=0,Ni(br,Rt),br.width=br.width||(qt.width>>ur)-Pt,br.height=br.height||(qt.height>>ur)-ht,ol(qt),Vn(br,Jn+Ot,Pt,ht,ur),io(),kn(br),Qe}function Ct(Ot){var Rt=Ot|0;if(Rt!==qt.width){Qe.width=qt.width=Rt,Qe.height=qt.height=Rt,ol(qt);for(var Bt=0;Bt<6;++Bt)for(var Dt=0;qt.mipmask>>Dt;++Dt)Me.texImage2D(Jn+Bt,Dt,qt.format,Rt>>Dt,Rt>>Dt,0,qt.format,qt.type,null);return io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,!1,!0)),Qe}}return Qe(ne,we,Ue,ft,Xt,hr),Qe.subimage=at,Qe.resize=Ct,Qe._reglType="textureCube",Qe._texture=qt,Gr.profile&&(Qe.stats=qt.stats),Qe.destroy=function(){qt.decRef()},Qe}function q(){for(var ne=0;ne>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Xt=0;Xt<6;++Xt)Me.texImage2D(Jn+Xt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);al(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ui.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(al),ta=0;ta0&&(kn.depth=Ni[0].depth,kn.stencil=Ni[0].stencil,kn.depthStencil=Ni[0].depthStencil),Ni[Ki]?Ni[Ki](kn):Ni[Ki]=li(kn)}return e(pn,{width:ta,height:ta,color:zo})}function Vn(na){var Ki,kn=na|0;if(kn===pn.width)return pn;var ta=pn.color;for(Ki=0;Ki=ta.byteLength?oa.subdata(ta):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=jr.create(Ki,If,!1,!0)),kn.buffer=jr.getBuffer(oa),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1,pn[na]=1}else jr.getBuffer(Ki)?(kn.buffer=jr.getBuffer(Ki),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1):jr.getBuffer(Ki.buffer)?(kn.buffer=jr.getBuffer(Ki.buffer),kn.size=(+Ki.size||kn.buffer.dimension)|0,kn.normalized=!!Ki.normalized||!1,"type"in Ki?kn.type=ji[Ki.type]:kn.type=kn.buffer.dtype,kn.offset=(Ki.offset||0)|0,kn.stride=(Ki.stride||0)|0,kn.divisor=(Ki.divisor||0)|0,kn.state=1):"x"in Ki&&(kn.x=+Ki.x||0,kn.y=+Ki.y||0,kn.z=+Ki.z||0,kn.w=+Ki.w||0,kn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiMr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){jr={},Nr={};for(var Mr=0;Mr16&&(zt=Yi(zt,Me.length*8));for(var Rr=Array(16),jr=Array(16),Nr=0;Nr<16;Nr++)Rr[Nr]=zt[Nr]^909522486,jr[Nr]=zt[Nr]^1549556828;var Gr=Yi(Rr.concat(Bc(bt)),512+bt.length*8);return At(Yi(jr.concat(Gr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",zt="",Rr,jr=0;jr>>4&15)+bt.charAt(Rr&15);return zt}function qc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt="",Rr=Me.length,jr=0;jrMe.length*8?zt+=Zu:zt+=bt.charAt(Nr>>>6*(3-Gr)&63);return zt}function cf(Me,bt){var zt=bt.length,Rr=Array(),jr,Nr,Gr,mi,Ui=Array(Math.ceil(Me.length/2));for(jr=0;jr0;){for(mi=Array(),Gr=0,jr=0;jr0||Nr>0)&&(mi[mi.length]=Nr);Rr[Rr.length]=Gr,Ui=mi}var qi="";for(jr=Rr.length-1;jr>=0;jr--)qi+=bt.charAt(Rr[jr]);var Ei=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(jr=qi.length;jr>>6&31,128|Rr&63):Rr<=65535?bt+=String.fromCharCode(224|Rr>>>12&15,128|Rr>>>6&63,128|Rr&63):Rr<=2097151&&(bt+=String.fromCharCode(240|Rr>>>18&7,128|Rr>>>12&63,128|Rr>>>6&63,128|Rr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),zt=0;zt>5]|=(Me.charCodeAt(zt/8)&255)<<24-zt%32;return bt}function At(Me){for(var bt="",zt=0;zt>5]>>>24-zt%32&255);return bt}function Wt(Me,bt){return Me>>>bt|Me<<32-bt}function Cr(Me,bt){return Me>>>bt}function Ar(Me,bt,zt){return Me&bt^~Me&zt}function Kr(Me,bt,zt){return Me&bt^Me&zt^bt&zt}function ki(Me){return Wt(Me,2)^Wt(Me,13)^Wt(Me,22)}function Xi(Me){return Wt(Me,6)^Wt(Me,11)^Wt(Me,25)}function dn(Me){return Wt(Me,7)^Wt(Me,18)^Cr(Me,3)}function wn(Me){return Wt(Me,17)^Wt(Me,19)^Cr(Me,10)}var Nn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Rr=new Array(64),jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,en=0;en>16)+(bt>>16)+(zt>>16);return Rr<<16|zt&65535}function on(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return on(Me).join("")}function $n(Me){var bt=Me&&Me.cache,zt=0,Rr=[],jr=[],Nr=[];function Gr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi0&&(si.push(Ri,"="),si.push.apply(si,on(arguments)),si.push(";")),Ri}return e(Mr,{def:xi,toString:function(){return Fi([Yr.length>0?"var "+Yr.join(",")+";":"",Fi(si)])}})}function Ui(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ri(ci,an){Mr(ci,an,"=",si.def(ci,an),";")}return e(function(){si.apply(si,on(arguments))},{def:si.def,entry:si,exit:Mr,save:Ri,set:function(ci,an,Zi){Ri(ci,an),si(ci,an,"=",Zi,";")},toString:function(){return Yr()+xi()}})}function qi(){var si=Fi(arguments),Mr=Ui(),Yr=Ui(),xi=Mr.toString,Ri=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,on(arguments)),this},else:function(){return Yr.apply(Yr,on(arguments)),this},toString:function(){var ci=Ri();return ci&&(ci="else{"+ci+"}"),Fi(["if(",si,"){",xi(),"}",ci])}})}var Ei=mi(),Hn={};function en(si,Mr){var Yr=[];function xi(){var Bn="a"+Yr.length;return Yr.push(Bn),Bn}Mr=Mr||0;for(var Ri=0;Ri":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ai={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},gi={cw:Te,ccw:Ne};function Ii(Me){return Array.isArray(Me)||Br(Me)||Vr(Me)}function Si(Me){return Me.sort(function(bt,zt){return bt===ee?-1:zt===ee?1:bt=1,Rr>=2,bt)}else if(zt===Xo){var jr=Me.data;return new ei(jr.thisDep,jr.contextDep,jr.propDep,bt)}else{if(zt===Ss)return new ei(!1,!1,!1,bt);if(zt===as){for(var Nr=!1,Gr=!1,mi=!1,Ui=0;Ui=1&&(Gr=!0),Ei>=2&&(mi=!0)}else qi.type===Xo&&(Nr=Nr||qi.data.thisDep,Gr=Gr||qi.data.contextDep,mi=mi||qi.data.propDep)}return new ei(Nr,Gr,mi,bt)}else return new ei(zt===bo,zt===Ka,zt===Dn,bt)}}var ia=new ei(!1,!1,!1,function(){});function Ea(Me,bt,zt,Rr,jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr){var Yr=qi.Record,xi={add:32774,subtract:32778,"reverse subtract":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ri=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,an=zt.oes_vertex_array_object,Zi={dirty:!0,profile:Mr.profile},Bn={},hi=[],li={},mn={};function Ji(Ve){return Ve.replace(".","_")}function Vi(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Bn[Ct]=Zi[Ct]=!!at,li[Ct]=Qe}function Ni(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Array.isArray(at)?(Zi[Ct]=at.slice(),Bn[Ct]=at.slice()):Zi[Ct]=Bn[Ct]=at,mn[Ct]=Qe}function pn(Ve){return!!isNaN(Ve)}Vi(ws,Pi),Vi(Ho,ni),Ni(ml,"blendColor",[0,0,0,0]),Ni(Ws,"blendEquationSeparate",[yr,yr]),Ni(Ls,"blendFuncSeparate",[gr,jt,gr,jt]),Vi(va,ln,!0),Ni(no,"depthFunc",Hr),Ni(ys,"depthRange",[0,1]),Ni(rs,"depthMask",!0),Ni($l,$l,[!0,!0,!0,!0]),Vi(Cu,Wr),Ni(Yu,"cullFace",se),Ni(Nc,Nc,Ne),Ni(pu,pu,1),Vi(Uc,Kn),Ni(xu,"polygonOffset",[0,0]),Vi(Ac,Ta),Vi(Ua,fa),Ni(oo,"sampleCoverage",[1,!1]),Vi(Vc,cn),Ni(hc,"stencilMask",-1),Ni(Ku,"stencilFunc",[kt,0,-1]),Ni(ue,"stencilOpSeparate",[X,nt,nt,nt]),Ni(w,"stencilOpSeparate",[se,nt,nt,nt]),Vi(B,Cn),Ni(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Ni(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Vn={gl:Me,context:en,strings:bt,next:Bn,current:Zi,draw:Hn,elements:Nr,buffer:jr,shader:Ei,attributes:qi.state,vao:qi,uniforms:Ui,framebuffer:mi,extensions:zt,timer:Wi,isBufferArgs:Ii},na={primTypes:Sn,compareFuncs:Zr,blendFuncs:bi,blendEquations:xi,stencilOps:ai,glTypes:ji,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Rr.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(Qe){return _i+Qe})}));var Ki=0;function kn(){var Ve=$n({cache:si}),Qe=Ve.link,at=Ve.global;Ve.id=Ki++,Ve.batchId="0";var Ct=Qe(Vn),Ot=Ve.shared={props:"a0"};Object.keys(Vn).forEach(function(Pt){Ot[Pt]=at.def(Ct,".",Pt)});var Rt=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Zi[Pt])&&(Rt[Pt]=at.def(Ot.next,".",Pt),Bt[Pt]=at.def(Ot.current,".",Pt))});var Dt=Ve.constants={};Object.keys(na).forEach(function(Pt){Dt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var ur=["this",Ot.context,Ot.props,Ve.batchId];return Pt.def(Qe(ht.data),".call(",ur.slice(0,Math.max(ht.data.length+1,4)),")");case Dn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def("this",ht.data);case Xo:return ht.data.append(Ve,Pt),ht.data.ref;case Ss:return ht.data.toString();case as:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var yt={};return Ve.scopeAttrib=function(Pt){var ht=bt.id(Pt);if(ht in yt)return yt[ht];var ur=qi.scope[ht];ur||(ur=qi.scope[ht]=new Yr);var br=yt[ht]=Qe(ur);return br},Ve}function ta(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct;if(le in Qe){var Ot=!!Qe[le];Ct=En(function(Bt,Dt){return Ot}),Ct.enable=Ot}else if(le in at){var Rt=at[le];Ct=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}return Ct}function oa(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic;if(qe in at){var Ot=at[qe];return Ot?(Ot=mi.getFramebuffer(Ot),En(function(Bt,Dt){var yt=Bt.link(Ot),Pt=Bt.shared;Dt.set(Pt.framebuffer,".next",yt);var ht=Pt.context;return Dt.set(ht,"."+Be,yt+".width"),Dt.set(ht,"."+et,yt+".height"),yt})):En(function(Bt,Dt){var yt=Bt.shared;Dt.set(yt.framebuffer,".next","null");var Pt=yt.context;return Dt.set(Pt,"."+Be,Pt+"."+Ht),Dt.set(Pt,"."+et,Pt+"."+tr),"null"})}else if(qe in Ct){var Rt=Ct[qe];return Un(Rt,function(Bt,Dt){var yt=Bt.invoke(Dt,Rt),Pt=Bt.shared,ht=Pt.framebuffer,ur=Dt.def(ht,".getFramebuffer(",yt,")");Dt.set(ht,".next",ur);var br=Pt.context;return Dt.set(br,"."+Be,ur+"?"+ur+".width:"+br+"."+Ht),Dt.set(br,"."+et,ur+"?"+ur+".height:"+br+"."+tr),ur})}else return null}function ba(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(yt){if(yt in Ct){var Pt=Ct[yt],ht=!0,ur=Pt.x|0,br=Pt.y|0,Ur,Di;return"width"in Pt?Ur=Pt.width|0:ht=!1,"height"in Pt?Di=Pt.height|0:ht=!1,new ei(!ht&&Qe&&Qe.thisDep,!ht&&Qe&&Qe.contextDep,!ht&&Qe&&Qe.propDep,function(gn,rn){var Ci=gn.shared.context,Bi=Ur;"width"in Pt||(Bi=rn.def(Ci,".",Be,"-",ur));var Gi=Di;return"height"in Pt||(Gi=rn.def(Ci,".",et,"-",br)),[ur,br,Bi,Gi]})}else if(yt in Ot){var fi=Ot[yt],Ti=Un(fi,function(gn,rn){var Ci=gn.invoke(rn,fi),Bi=gn.shared.context,Gi=rn.def(Ci,".x|0"),sn=rn.def(Ci,".y|0"),zn=rn.def('"width" in ',Ci,"?",Ci,".width|0:","(",Bi,".",Be,"-",Gi,")"),Ja=rn.def('"height" in ',Ci,"?",Ci,".height|0:","(",Bi,".",et,"-",sn,")");return[Gi,sn,zn,Ja]});return Qe&&(Ti.thisDep=Ti.thisDep||Qe.thisDep,Ti.contextDep=Ti.contextDep||Qe.contextDep,Ti.propDep=Ti.propDep||Qe.propDep),Ti}else return Qe?new ei(Qe.thisDep,Qe.contextDep,Qe.propDep,function(gn,rn){var Ci=gn.shared.context;return[0,0,rn.def(Ci,".",Be),rn.def(Ci,".",et)]}):null}var Bt=Rt(ee);if(Bt){var Dt=Bt;Bt=new ei(Bt.thisDep,Bt.contextDep,Bt.propDep,function(yt,Pt){var ht=Dt.append(yt,Pt),ur=yt.shared.context;return Pt.set(ur,"."+We,ht[2]),Pt.set(ur,"."+it,ht[3]),ht})}return{viewport:Bt,scissor_box:Rt(Q)}}function is(Ve,Qe){var at=Ve.static,Ct=typeof at[ot]=="string"&&typeof at[Xe]=="string";if(Ct){if(Object.keys(Qe.dynamic).length>0)return null;var Ot=Qe.static,Rt=Object.keys(Ot);if(Rt.length>0&&typeof Ot[Rt[0]]=="number"){for(var Bt=[],Dt=0;Dt"+Gi+"?"+ht+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Ur,"(",ht,".buffer)){",gn,"=",Di,".createStream(",Sr,",",ht,".buffer);","}else{",gn,"=",Di,".getBuffer(",ht,".buffer);","}",rn,'="type" in ',ht,"?",br.glTypes,"[",ht,".type]:",gn,".dtype;",fi.normalized,"=!!",ht,".normalized;");function Ci(Bi){Pt(fi[Bi],"=",ht,".",Bi,"|0;")}return Ci("size"),Ci("offset"),Ci("stride"),Ci("divisor"),Pt("}}"),Pt.exit("if(",fi.isStream,"){",Di,".destroyStream(",gn,");","}"),fi}Ot[Rt]=Un(Bt,Dt)}),Ot}function al(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct={};return Object.keys(Qe).forEach(function(Ot){var Rt=Qe[Ot];Ct[Ot]=En(function(Bt,Dt){return typeof Rt=="number"||typeof Rt=="boolean"?""+Rt:Bt.link(Rt)})}),Object.keys(at).forEach(function(Ot){var Rt=at[Ot];Ct[Ot]=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}),Ct}function Vl(Ve,Qe,at,Ct,Ot){var Rt=Ve.static,Bt=Ve.dynamic,Dt=is(Ve,Qe),yt=oa(Ve,Ot),Pt=ba(Ve,yt,Ot),ht=Va(Ve,Ot),ur=Ml(Ve,Ot),br=Zs(Ve,Ot,Dt);function Ur(Ci){var Bi=Pt[Ci];Bi&&(ur[Ci]=Bi)}Ur(ee),Ur(Ji(Q));var Di=Object.keys(ur).length>0,fi={framebuffer:yt,draw:ht,shader:br,state:ur,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fi.profile=ta(Ve,Ot),fi.uniforms=zo(at,Ot),fi.drawVAO=fi.scopeVAO=ht.vao,!fi.drawVAO&&br.program&&!Dt&&zt.angle_instanced_arrays&&ht.static.elements){var Ti=!0,gn=br.program.attributes.map(function(Ci){var Bi=Qe.static[Ci];return Ti=Ti&&!!Bi,Bi});if(Ti&&gn.length>0){var rn=qi.getVAO(qi.createVAO({attributes:gn,elements:ht.static.elements}));fi.drawVAO=new ei(null,null,null,function(Ci,Bi){return Ci.link(rn)}),fi.useVAO=!0}}return Dt?fi.useVAO=!0:fi.attributes=Qs(Qe,Ot),fi.context=al(Ct,Ot),fi}function ss(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.context,Rt=Ve.scope();Object.keys(at).forEach(function(Bt){Qe.save(Ot,"."+Bt);var Dt=at[Bt],yt=Dt.append(Ve,Qe);Array.isArray(yt)?Rt(Ot,".",Bt,"=[",yt.join(),"];"):Rt(Ot,".",Bt,"=",yt,";")}),Qe(Rt)}function Vs(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.framebuffer,Dt;ci&&(Dt=Qe.def(Ot.extensions,".webgl_draw_buffers"));var yt=Ve.constants,Pt=yt.drawBuffer,ht=yt.backBuffer,ur;at?ur=at.append(Ve,Qe):ur=Qe.def(Bt,".next"),Ct||Qe("if(",ur,"!==",Bt,".cur){"),Qe("if(",ur,"){",Rt,".bindFramebuffer(",qr,",",ur,".framebuffer);"),ci&&Qe(Dt,".drawBuffersWEBGL(",Pt,"[",ur,".colorAttachments.length]);"),Qe("}else{",Rt,".bindFramebuffer(",qr,",null);"),ci&&Qe(Dt,".drawBuffersWEBGL(",ht,");"),Qe("}",Bt,".cur=",ur,";"),Ct||Qe("}")}function Ys(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.gl,Rt=Ve.current,Bt=Ve.next,Dt=Ct.current,yt=Ct.next,Pt=Ve.cond(Dt,".dirty");hi.forEach(function(ht){var ur=Ji(ht);if(!(ur in at.state)){var br,Ur;if(ur in Bt){br=Bt[ur],Ur=Rt[ur];var Di=M(Zi[ur].length,function(Ti){return Pt.def(br,"[",Ti,"]")});Pt(Ve.cond(Di.map(function(Ti,gn){return Ti+"!=="+Ur+"["+gn+"]"}).join("||")).then(Ot,".",mn[ur],"(",Di,");",Di.map(function(Ti,gn){return Ur+"["+gn+"]="+Ti}).join(";"),";"))}else{br=Pt.def(yt,".",ur);var fi=Ve.cond(br,"!==",Dt,".",ur);Pt(fi),ur in li?fi(Ve.cond(br).then(Ot,".enable(",li[ur],");").else(Ot,".disable(",li[ur],");"),Dt,".",ur,"=",br,";"):fi(Ot,".",mn[ur],"(",br,");",Dt,".",ur,"=",br,";")}}}),Object.keys(at.state).length===0&&Pt(Dt,".dirty=false;"),Qe(Pt)}function wa(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ve.current,Bt=Ot.current,Dt=Ot.gl,yt;Si(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(Ct&&!Ct(ht))){var ur=ht.append(Ve,Qe);if(li[Pt]){var br=li[Pt];Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Ve.cond(yt).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",yt,";")):(Qe(Ve.cond(ur).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",ur,";"))}else if(Mn(ur)){var Ur=Rt[Pt];Qe(Dt,".",mn[Pt],"(",ur,");",ur.map(function(Di,fi){return Ur+"["+fi+"]="+Di}).join(";"),";")}else Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Dt,".",mn[Pt],"(",yt,");",Bt,".",Pt,"=",yt,";")):Qe(Dt,".",mn[Pt],"(",ur,");",Bt,".",Pt,"=",ur,";")}})}function ol(Ve,Qe){Ri&&(Ve.instancing=Qe.def(Ve.shared.extensions,".angle_instanced_arrays"))}function io(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared,Bt=Ve.stats,Dt=Rt.current,yt=Rt.timer,Pt=at.profile;function ht(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var ur,br;function Ur(Ci){ur=Qe.def(),Ci(ur,"=",ht(),";"),typeof Ot=="string"?Ci(Bt,".count+=",Ot,";"):Ci(Bt,".count++;"),Wi&&(Ct?(br=Qe.def(),Ci(br,"=",yt,".getNumPendingQueries();")):Ci(yt,".beginQuery(",Bt,");"))}function Di(Ci){Ci(Bt,".cpuTime+=",ht(),"-",ur,";"),Wi&&(Ct?Ci(yt,".pushScopeStats(",br,",",yt,".getNumPendingQueries(),",Bt,");"):Ci(yt,".endQuery();"))}function fi(Ci){var Bi=Qe.def(Dt,".profile");Qe(Dt,".profile=",Ci,";"),Qe.exit(Dt,".profile=",Bi,";")}var Ti;if(Pt){if(Ln(Pt)){Pt.enable?(Ur(Qe),Di(Qe.exit),fi("true")):fi("false");return}Ti=Pt.append(Ve,Qe),fi(Ti)}else Ti=Qe.def(Dt,".profile");var gn=Ve.block();Ur(gn),Qe("if(",Ti,"){",gn,"}");var rn=Ve.block();Di(rn),Qe.exit("if(",Ti,"){",rn,"}")}function Y(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared;function Bt(yt){switch(yt){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Dt(yt,Pt,ht){var ur=Rt.gl,br=Qe.def(yt,".location"),Ur=Qe.def(Rt.attributes,"[",br,"]"),Di=ht.state,fi=ht.buffer,Ti=[ht.x,ht.y,ht.z,ht.w],gn=["buffer","normalized","offset","stride"];function rn(){Qe("if(!",Ur,".buffer){",ur,".enableVertexAttribArray(",br,");}");var Bi=ht.type,Gi;if(ht.size?Gi=Qe.def(ht.size,"||",Pt):Gi=Pt,Qe("if(",Ur,".type!==",Bi,"||",Ur,".size!==",Gi,"||",gn.map(function(zn){return Ur+"."+zn+"!=="+ht[zn]}).join("||"),"){",ur,".bindBuffer(",Sr,",",fi,".buffer);",ur,".vertexAttribPointer(",[br,Gi,Bi,ht.normalized,ht.stride,ht.offset],");",Ur,".type=",Bi,";",Ur,".size=",Gi,";",gn.map(function(zn){return Ur+"."+zn+"="+ht[zn]+";"}).join(""),"}"),Ri){var sn=ht.divisor;Qe("if(",Ur,".divisor!==",sn,"){",Ve.instancing,".vertexAttribDivisorANGLE(",[br,sn],");",Ur,".divisor=",sn,";}")}}function Ci(){Qe("if(",Ur,".buffer){",ur,".disableVertexAttribArray(",br,");",Ur,".buffer=null;","}if(",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"!=="+Ti[Gi]}).join("||"),"){",ur,".vertexAttrib4f(",br,",",Ti,");",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"="+Ti[Gi]+";"}).join(""),"}")}Di===La?rn():Di===Na?Ci():(Qe("if(",Di,"===",La,"){"),rn(),Qe("}else{"),Ci(),Qe("}"))}Ct.forEach(function(yt){var Pt=yt.name,ht=at.attributes[Pt],ur;if(ht){if(!Ot(ht))return;ur=ht.append(Ve,Qe)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);ur={},Object.keys(new Yr).forEach(function(Ur){ur[Ur]=Qe.def(br,".",Ur)})}Dt(Ve.link(yt),Bt(yt.info.type),ur)})}function D(Ve,Qe,at,Ct,Ot,Rt){for(var Bt=Ve.shared,Dt=Bt.gl,yt,Pt=0;Pt1){for(var co=[],ts=[],so=0;so>1)",fi],");")}function sn(){at(Ti,".drawArraysInstancedANGLE(",[br,Ur,Di,fi],");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}function Bi(){function Gi(){at(Rt+".drawElements("+[br,Di,gn,Ur+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function sn(){at(Rt+".drawArrays("+[br,Ur,Di]+");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}Ri&&(typeof fi!="number"||fi>=0)?typeof fi=="string"?(at("if(",fi,">0){"),Ci(),at("}else if(",fi,"<0){"),Bi(),at("}")):Ci():Bi()}function q(Ve,Qe,at,Ct,Ot){var Rt=kn(),Bt=Rt.proc("body",Ot);return Ri&&(Rt.instancing=Bt.def(Rt.shared.extensions,".angle_instanced_arrays")),Ve(Rt,Bt,at,Ct),Rt.compile().body}function K(Ve,Qe,at,Ct){ol(Ve,Qe),at.useVAO?at.drawVAO?Qe(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Qe),");"):Qe(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Qe(Ve.shared.vao,".setVAO(null);"),Y(Ve,Qe,at,Ct.attributes,function(){return!0})),D(Ve,Qe,at,Ct.uniforms,function(){return!0},!1),J(Ve,Qe,Qe,at)}function de(Ve,Qe){var at=Ve.proc("draw",1);ol(Ve,at),ss(Ve,at,Qe.context),Vs(Ve,at,Qe.framebuffer),Ys(Ve,at,Qe),wa(Ve,at,Qe.state),io(Ve,at,Qe,!1,!0);var Ct=Qe.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Ct,".program);"),Qe.shader.program)K(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var Ot=Ve.global.def("{}"),Rt=at.def(Ct,".id"),Bt=at.def(Ot,"[",Rt,"]");at(Ve.cond(Bt).then(Bt,".call(this,a0);").else(Bt,"=",Ot,"[",Rt,"]=",Ve.link(function(Dt){return q(K,Ve,Qe,Dt,1)}),"(",Ct,");",Bt,".call(this,a0);"))}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ne(Ve,Qe,at,Ct){Ve.batchId="a1",ol(Ve,Qe);function Ot(){return!0}Y(Ve,Qe,at,Ct.attributes,Ot),D(Ve,Qe,at,Ct.uniforms,Ot,!1),J(Ve,Qe,Qe,at)}function we(Ve,Qe,at,Ct){ol(Ve,Qe);var Ot=at.contextDep,Rt=Qe.def(),Bt="a0",Dt="a1",yt=Qe.def();Ve.shared.props=yt,Ve.batchId=Rt;var Pt=Ve.scope(),ht=Ve.scope();Qe(Pt.entry,"for(",Rt,"=0;",Rt,"<",Dt,";++",Rt,"){",yt,"=",Bt,"[",Rt,"];",ht,"}",Pt.exit);function ur(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!ur(gn)}if(at.needsContext&&ss(Ve,ht,at.context),at.needsFramebuffer&&Vs(Ve,ht,at.framebuffer),wa(Ve,ht,at.state,ur),at.profile&&ur(at.profile)&&io(Ve,ht,at,!1,!0),Ct)at.useVAO?at.drawVAO?ur(at.drawVAO)?ht(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,ht),");"):Pt(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Pt),");"):Pt(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Pt(Ve.shared.vao,".setVAO(null);"),Y(Ve,Pt,at,Ct.attributes,br),Y(Ve,ht,at,Ct.attributes,ur)),D(Ve,Pt,at,Ct.uniforms,br,!1),D(Ve,ht,at,Ct.uniforms,ur,!0),J(Ve,Pt,ht,at);else{var Ur=Ve.global.def("{}"),Di=at.shader.progVar.append(Ve,ht),fi=ht.def(Di,".id"),Ti=ht.def(Ur,"[",fi,"]");ht(Ve.shared.gl,".useProgram(",Di,".program);","if(!",Ti,"){",Ti,"=",Ur,"[",fi,"]=",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),"(",Di,");}",Ti,".call(this,a0[",Rt,"],",Rt,");")}}function Ue(Ve,Qe){var at=Ve.proc("batch",2);Ve.batchId="0",ol(Ve,at);var Ct=!1,Ot=!0;Object.keys(Qe.context).forEach(function(Ur){Ct=Ct||Qe.context[Ur].propDep}),Ct||(ss(Ve,at,Qe.context),Ot=!1);var Rt=Qe.framebuffer,Bt=!1;Rt?(Rt.propDep?Ct=Bt=!0:Rt.contextDep&&Ct&&(Bt=!0),Bt||Vs(Ve,at,Rt)):Vs(Ve,at,null),Qe.state.viewport&&Qe.state.viewport.propDep&&(Ct=!0);function Dt(Ur){return Ur.contextDep&&Ct||Ur.propDep}Ys(Ve,at,Qe),wa(Ve,at,Qe.state,function(Ur){return!Dt(Ur)}),(!Qe.profile||!Dt(Qe.profile))&&io(Ve,at,Qe,!1,"a1"),Qe.contextDep=Ct,Qe.needsContext=Ot,Qe.needsFramebuffer=Bt;var yt=Qe.shader.progVar;if(yt.contextDep&&Ct||yt.propDep)we(Ve,at,Qe,null);else{var Pt=yt.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Pt,".program);"),Qe.shader.program)we(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var ht=Ve.global.def("{}"),ur=at.def(Pt,".id"),br=at.def(ht,"[",ur,"]");at(Ve.cond(br).then(br,".call(this,a0,a1);").else(br,"=",ht,"[",ur,"]=",Ve.link(function(Ur){return q(we,Ve,Qe,Ur,2)}),"(",Pt,");",br,".call(this,a0,a1);"))}}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ft(Ve,Qe){var at=Ve.proc("scope",3);Ve.batchId="a2";var Ct=Ve.shared,Ot=Ct.current;if(ss(Ve,at,Qe.context),Qe.framebuffer&&Qe.framebuffer.append(Ve,at),Si(Object.keys(Qe.state)).forEach(function(Dt){var yt=Qe.state[Dt],Pt=yt.append(Ve,at);Mn(Pt)?Pt.forEach(function(ht,ur){pn(ht)?at.set(Ve.next[Dt],"["+ur+"]",ht):at.set(Ve.next[Dt],"["+ur+"]",Ve.link(ht,{stable:!0}))}):Ln(yt)?at.set(Ct.next,"."+Dt,Ve.link(Pt,{stable:!0})):at.set(Ct.next,"."+Dt,Pt)}),io(Ve,at,Qe,!0,!0),[Tt,xr,Kt,Ir,Yt].forEach(function(Dt){var yt=Qe.draw[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.draw,"."+Dt,Pt):at.set(Ct.draw,"."+Dt,Ve.link(Pt),{stable:!0})}}),Object.keys(Qe.uniforms).forEach(function(Dt){var yt=Qe.uniforms[Dt].append(Ve,at);Array.isArray(yt)&&(yt="["+yt.map(function(Pt){return pn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+"]"),at.set(Ct.uniforms,"["+Ve.link(bt.id(Dt),{stable:!0})+"]",yt)}),Object.keys(Qe.attributes).forEach(function(Dt){var yt=Qe.attributes[Dt].append(Ve,at),Pt=Ve.scopeAttrib(Dt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,"."+ht,yt[ht])})}),Qe.scopeVAO){var Rt=Qe.scopeVAO.append(Ve,at);pn(Rt)?at.set(Ct.vao,".targetVAO",Rt):at.set(Ct.vao,".targetVAO",Ve.link(Rt,{stable:!0}))}function Bt(Dt){var yt=Qe.shader[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.shader,"."+Dt,Pt):at.set(Ct.shader,"."+Dt,Ve.link(Pt,{stable:!0}))}}Bt(Xe),Bt(ot),Object.keys(Qe.state).length>0&&(at(Ot,".dirty=true;"),at.exit(Ot,".dirty=true;")),at("a1(",Ve.shared.context,",a0,",Ve.batchId,");")}function Xt(Ve){if(!(typeof Ve!="object"||Mn(Ve))){for(var Qe=Object.keys(Ve),at=0;at=0;--q){var K=Vn[q];K&&K(si,null,0)}zt.flush(),Ei&&Ei.update()}function ba(){!ta&&Vn.length>0&&(ta=d.next(oa))}function is(){ta&&(d.cancel(oa),ta=null)}function Zs(q){q.preventDefault(),jr=!0,is(),na.forEach(function(K){K()})}function Va(q){zt.getError(),jr=!1,Nr.restore(),Bn.restore(),Ri.restore(),hi.restore(),li.restore(),mn.restore(),an.restore(),Ei&&Ei.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Vn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),Bn.clear(),mn.clear(),li.clear(),an.clear(),hi.clear(),ci.clear(),Ri.clear(),Ei&&Ei.clear(),kn.forEach(function(q){q()})}function zo(q){function K(Rt){var Bt=e({},Rt);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,"stencil"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Dt(yt){if(yt in Bt){var Pt=Bt[yt];delete Bt[yt],Object.keys(Pt).forEach(function(ht){Bt[yt+"."+ht]=Pt[ht]})}}return Dt("blend"),Dt("depth"),Dt("cull"),Dt("stencil"),Dt("polygonOffset"),Dt("scissor"),Dt("sample"),"vao"in Rt&&(Bt.vao=Rt.vao),Bt}function de(Rt,Bt){var Dt={},yt={};return Object.keys(Rt).forEach(function(Pt){var ht=Rt[Pt];if(h.isDynamic(ht)){yt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var ur=0;ur0)return Ve.call(this,Ct(Rt|0),Rt|0)}else if(Array.isArray(Rt)){if(Rt.length)return Ve.call(this,Rt,Rt.length)}else return qt.call(this,Rt)}return e(Ot,{stats:Xt,destroy:function(){hr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(q,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(zt.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if("framebuffer"in q)if(q.framebuffer&&q.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:q.framebuffer.faces[K]},q),al);else Qs(q,al);else al(null,q)}function ss(q){Vn.push(q);function K(){var de=dl(Vn,q);function ne(){var we=dl(Vn,ne);Vn[we]=Vn[Vn.length-1],Vn.length-=1,Vn.length<=0&&is()}Vn[de]=ne}return ba(),{cancel:K}}function Vs(){var q=Ni.viewport,K=Ni.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ys(){si.tick+=1,si.time=ol(),Vs(),Ji.procs.poll()}function wa(){hi.refresh(),Vs(),Ji.procs.refresh(),Ei&&Ei.update()}function ol(){return(v()-Hn)/1e3}wa();function io(q,K){var de;switch(q){case"frame":return ss(K);case"lost":de=na;break;case"restore":de=Ki;break;case"destroy":de=kn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Vi,destroy:Ml,_gl:zt,_refresh:wa,poll:function(){Ys(),Ei&&Ei.update()},now:ol,stats:mi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Gqe=ye((r_r,Vqe)=>{"use strict";var nUt=Zm();Vqe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},Nqe(t)?t={container:t}:aUt(t)?t={container:t}:oUt(t)?t={gl:t}:t=nUt(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}Nqe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=Uqe(),t.container.appendChild(t.canvas),Bqe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=Uqe(),t.container.appendChild(t.canvas),Bqe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(i){}return t.gl}),t.gl};function Bqe(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 Nqe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function aUt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function oUt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function Uqe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var jqe=ye((i_r,Hqe)=>{"use strict";var sUt=eK(),lUt=[32,126];Hqe.exports=uUt;function uUt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,i=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],a=e.chars||lUt;if(n&&typeof n!="string"&&(n=sUt(n)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=i[0]/2,f=i[1]/2,s=0;st[0]-i[0]/2&&(c=i[0]/2,f+=i[1]);return r}});var nK=ye(Bh=>{"use strict";"use restrict";var iK=32;Bh.INT_BITS=iK;Bh.INT_MAX=2147483647;Bh.INT_MIN=-1<0)-(e<0)};Bh.abs=function(e){var t=e>>iK-1;return(e^t)-t};Bh.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};Bh.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};Bh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function Wqe(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}Bh.countTrailingZeros=Wqe;Bh.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};Bh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Bh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var Mk=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<>>8&255]<<16|Mk[e>>>16&255]<<8|Mk[e>>>24&255]};Bh.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};Bh.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};Bh.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};Bh.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};Bh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>Wqe(e)+1}});var Yqe=ye((a_r,Zqe)=>{"use strict";function Xqe(e,t,r){var n=e[r]|0;if(n<=0)return[];var i=new Array(n),a;if(r===e.length-1)for(a=0;a0)return cUt(e|0,t);break;case"object":if(typeof e.length=="number")return Xqe(e,t,0);break}return[]}Zqe.exports=fUt});var cBe=ye(mu=>{"use strict";var fx=nK(),Ev=Yqe(),Kqe=c2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ev([32,0]),UINT16:Ev([32,0]),UINT32:Ev([32,0]),BIGUINT64:Ev([32,0]),INT8:Ev([32,0]),INT16:Ev([32,0]),INT32:Ev([32,0]),BIGINT64:Ev([32,0]),FLOAT:Ev([32,0]),DOUBLE:Ev([32,0]),DATA:Ev([32,0]),UINT8C:Ev([32,0]),BUFFER:Ev([32,0])});var hUt=typeof Uint8ClampedArray!="undefined",dUt=typeof BigUint64Array!="undefined",vUt=typeof BigInt64Array!="undefined",nd=window.__TYPEDARRAY_POOL;nd.UINT8C||(nd.UINT8C=Ev([32,0]));nd.BIGUINT64||(nd.BIGUINT64=Ev([32,0]));nd.BIGINT64||(nd.BIGINT64=Ev([32,0]));nd.BUFFER||(nd.BUFFER=Ev([32,0]));var _z=nd.DATA,xz=nd.BUFFER;mu.free=function(t){if(Kqe.isBuffer(t))xz[fx.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=fx.log2(r)|0;_z[n].push(t)}};function Jqe(e){if(e){var t=e.length||e.byteLength,r=fx.log2(t);_z[r].push(e)}}function pUt(e){Jqe(e.buffer)}mu.freeUint8=mu.freeUint16=mu.freeUint32=mu.freeBigUint64=mu.freeInt8=mu.freeInt16=mu.freeInt32=mu.freeBigInt64=mu.freeFloat32=mu.freeFloat=mu.freeFloat64=mu.freeDouble=mu.freeUint8Clamped=mu.freeDataView=pUt;mu.freeArrayBuffer=Jqe;mu.freeBuffer=function(t){xz[fx.log2(t.length)].push(t)};mu.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Bp(t);switch(r){case"uint8":return aK(t);case"uint16":return $qe(t);case"uint32":return Qqe(t);case"int8":return eBe(t);case"int16":return tBe(t);case"int32":return rBe(t);case"float":case"float32":return iBe(t);case"double":case"float64":return nBe(t);case"uint8_clamped":return aBe(t);case"bigint64":return sBe(t);case"biguint64":return oBe(t);case"buffer":return uBe(t);case"data":case"dataview":return lBe(t);default:return null}return null};function Bp(t){var t=fx.nextPow2(t),r=fx.log2(t),n=_z[r];return n.length>0?n.pop():new ArrayBuffer(t)}mu.mallocArrayBuffer=Bp;function aK(e){return new Uint8Array(Bp(e),0,e)}mu.mallocUint8=aK;function $qe(e){return new Uint16Array(Bp(2*e),0,e)}mu.mallocUint16=$qe;function Qqe(e){return new Uint32Array(Bp(4*e),0,e)}mu.mallocUint32=Qqe;function eBe(e){return new Int8Array(Bp(e),0,e)}mu.mallocInt8=eBe;function tBe(e){return new Int16Array(Bp(2*e),0,e)}mu.mallocInt16=tBe;function rBe(e){return new Int32Array(Bp(4*e),0,e)}mu.mallocInt32=rBe;function iBe(e){return new Float32Array(Bp(4*e),0,e)}mu.mallocFloat32=mu.mallocFloat=iBe;function nBe(e){return new Float64Array(Bp(8*e),0,e)}mu.mallocFloat64=mu.mallocDouble=nBe;function aBe(e){return hUt?new Uint8ClampedArray(Bp(e),0,e):aK(e)}mu.mallocUint8Clamped=aBe;function oBe(e){return dUt?new BigUint64Array(Bp(8*e),0,e):null}mu.mallocBigUint64=oBe;function sBe(e){return vUt?new BigInt64Array(Bp(8*e),0,e):null}mu.mallocBigInt64=sBe;function lBe(e){return new DataView(Bp(e),0,e)}mu.mallocDataView=lBe;function uBe(e){e=fx.nextPow2(e);var t=fx.log2(e),r=xz[t];return r.length>0?r.pop():new Kqe(e)}mu.mallocBuffer=uBe;mu.clearCache=function(){for(var t=0;t<32;++t)nd.UINT8[t].length=0,nd.UINT16[t].length=0,nd.UINT32[t].length=0,nd.INT8[t].length=0,nd.INT16[t].length=0,nd.INT32[t].length=0,nd.FLOAT[t].length=0,nd.DOUBLE[t].length=0,nd.BIGUINT64[t].length=0,nd.BIGINT64[t].length=0,nd.UINT8C[t].length=0,_z[t].length=0,xz[t].length=0}});var hBe=ye((s_r,fBe)=>{"use strict";var gUt=Object.prototype.toString;fBe.exports=function(e){var t;return gUt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var oK=ye((l_r,dBe)=>{dBe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var gBe=ye((u_r,pBe)=>{"use strict";var mUt=oK();pBe.exports=vBe;var Ek=96;function sK(e,t){var r=mUt(getComputedStyle(e).getPropertyValue(t));return r[0]*vBe(r[1],e)}function yUt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=sK(r,"font-size")/128;return t.removeChild(r),n}function vBe(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 yUt(e,t);case"em":return sK(t,"font-size");case"rem":return sK(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 Ek;case"cm":return Ek/2.54;case"mm":return Ek/25.4;case"pt":return Ek/72;case"pc":return Ek/6}return 1}});var _Be=ye((c_r,yBe)=>{"use strict";yBe.exports=Tz;var _Ut=Tz.canvas=document.createElement("canvas"),bz=_Ut.getContext("2d"),mBe=wz([32,126]);Tz.createPairs=wz;Tz.ascii=mBe;function Tz(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=wz(t):Array.isArray(t)?n=t:(t.o?n=wz(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=mBe),bz.font=i+"px "+e;for(var o=0;oi*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function wz(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";wBe.exports=hx;hx.canvas=document.createElement("canvas");hx.cache={};function hx(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,i=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,i,n].join(" ")+"px "+r,s=t.origin||"top";if(hx.cache[r]&&n<=hx.cache[r].em)return xBe(hx.cache[r],s);var l=t.canvas||hx.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var v=Km(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var _=Km(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-_+v,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var b=Km(u.getImageData(0,0,f,f)),p=f-b-1+v;d.baseline=d.alphabetic=p,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var k=Km(u.getImageData(0,0,f,f));d.median=d.middle=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var E=Km(u.getImageData(0,0,f,f));d.hanging=f-E-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var S=Km(u.getImageData(0,0,f,f));if(d.ideographic=f-S-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=Km(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),d.lower=Km(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),d.tittle=Km(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),d.ascent=Km(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),d.descent=bBe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=bBe(u.getImageData(0,0,f,f));d.overshoot=L-p}for(var x in d)d[x]/=n;return d.em=n,hx.cache[r]=d,xBe(d,s)}function xBe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function Km(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var EBe=ye((h_r,MBe)=>{"use strict";var p5=Oqe(),xUt=Zm(),bUt=qqe(),wUt=Gqe(),TUt=NY(),lK=J_(),AUt=jqe(),dx=cBe(),SUt=i5(),MUt=hBe(),EUt=oK(),kUt=gBe(),CUt=_Be(),LUt=Oh(),PUt=TBe(),IUt=Z2(),RUt=nK(),ABe=RUt.nextPow2,SBe=new TUt,Sz=!1;document.body&&(Az=document.body.appendChild(document.createElement("div")),Az.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(Az).fontStretch&&(Sz=!0),document.body.removeChild(Az));var Az,xc=function(t){DUt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=wUt(t),this.shader=SBe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||bUt({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),SBe.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(MUt(t)?t:{})};xc.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(i,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(i,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(i,a){return a.atlas.texture},charStep:function(i,a){return a.atlas.step},em:function(i,a){return a.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; uniform float fontSize, charStep, em, align, baseline; uniform vec4 viewport; uniform vec4 color; uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; varying vec2 charCoord, charId; varying float charWidth; varying vec4 fontColor; void main () { vec2 offset = floor(em * (vec2(align + charOffset, baseline) + vec2(positionOffset.x, -positionOffset.y))) / (viewport.zw * scale.xy); vec2 position = (position + translate) * scale; position += offset * scale; charCoord = position * viewport.zw + viewport.xy; gl_Position = vec4(position * 2. - 1., 0, 1); gl_PointSize = charStep; charId.x = mod(char, atlasDim.x); charId.y = floor(char / atlasDim.x); charWidth = width * em; fontColor = color / 255.; }`,frag:` precision highp float; uniform float fontSize, charStep, opacity; uniform vec2 atlasSize; uniform vec4 viewport; uniform sampler2D atlas; varying vec4 fontColor; varying vec2 charCoord, charId; varying float charWidth; float lightness(vec4 color) { return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; } void main () { vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; float halfCharStep = floor(charStep * .5 + .5); // invert y and shift by 1px (FF expecially needs that) uv.y = charStep - uv.y; // ignore points outside of character bounding box float halfCharWidth = ceil(charWidth * .5); if (floor(uv.x) > halfCharStep + halfCharWidth || floor(uv.x) < halfCharStep - halfCharWidth) return; uv += charId * charStep; uv = uv / atlasSize; vec4 color = fontColor; vec4 mask = texture2D(atlas, uv); float maskY = lightness(mask); // float colorY = lightness(color); color.a *= maskY; color.a *= opacity; // color.a += .1; // antialiasing, see yiq color space y-channel formula // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; }`}),n={};return{regl:t,draw:r,atlas:n}};xc.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=xUt(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(Ce){return parseFloat(Ce)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=SUt(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=IUt(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=xc.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Ce,me){if(typeof Ce=="string")try{Ce=p5.parse(Ce)}catch(Ze){Ce=p5.parse(xc.baseFontSize+"px "+Ce)}else{var ie=Ce.style,Se=Ce.weight,Le=Ce.stretch,Ae=Ce.variant;Ce=p5.parse(p5.stringify(Ce)),ie&&(Ce.style=ie),Se&&(Ce.weight=Se),Le&&(Ce.stretch=Le),Ae&&(Ce.variant=Ae)}var Fe=p5.stringify({size:xc.baseFontSize,family:Ce.family,stretch:Sz?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style}),Pe=EUt(Ce.size),ge=Math.round(Pe[0]*kUt(Pe[1]));if(ge!==r.fontSize[me]&&(i=!0,r.fontSize[me]=ge),(!r.font[me]||Fe!=r.font[me].baseString)&&(n=!0,r.font[me]=xc.fonts[Fe],!r.font[me])){var Re=Ce.family.join(", "),ce=[Ce.style];Ce.style!=Ce.variant&&ce.push(Ce.variant),Ce.variant!=Ce.weight&&ce.push(Ce.weight),Sz&&Ce.weight!=Ce.stretch&&ce.push(Ce.stretch),r.font[me]={baseString:Fe,family:Re,weight:Ce.weight,stretch:Ce.stretch,style:Ce.style,variant:Ce.variant,width:{},kerning:{},metrics:PUt(Re,{origin:"top",fontSize:xc.baseFontSize,fontStyle:ce.join(" ")})},xc.fonts[Fe]=r.font[me]}}),(n||i)&&this.font.forEach(function(Ce,me){var ie=p5.stringify({size:r.fontSize[me],family:Ce.family,stretch:Sz?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style});if(r.fontAtlas[me]=r.shader.atlas[ie],!r.fontAtlas[me]){var Se=Ce.metrics;r.shader.atlas[ie]=r.fontAtlas[me]={fontString:ie,step:Math.ceil(r.fontSize[me]*Se.bottom*.5)*2,em:r.fontSize[me],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=dx.mallocFloat(this.count*2),f=0,h=0;f1?r.align[me]:r.align[0]:r.align;if(typeof ie=="number")return ie;switch(ie){case"right":case"end":return-Ce;case"center":case"centre":case"middle":return-Ce*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Ce,me){var ie=(r.font[me]||r.font[0]).metrics,Se=0;return Se+=ie.bottom*.5,typeof Ce=="number"?Se+=Ce-ie.baseline:Se+=-ie[Ce],Se*=-1,Se})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=lK(t.color,"uint8");else{var G;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var Z=t.color.length;G=dx.mallocUint8(Z);for(var j=(t.color.subarray||t.color.slice).bind(t.color),N=0;N4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var Ee=0;Ee1?this.counts[Ee]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ee]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ee*4,Ee*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ee]:this.opacity,baseline:this.baselineOffset[Ee]!=null?this.baselineOffset[Ee]:this.baselineOffset[0],align:this.align?this.alignOffset[Ee]!=null?this.alignOffset[Ee]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ee]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ee*2,Ee*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}};xc.prototype.destroy=function(){};xc.prototype.kerning=!0;xc.prototype.position={constant:new Float32Array(2)};xc.prototype.translate=null;xc.prototype.scale=null;xc.prototype.font=null;xc.prototype.text="";xc.prototype.positionOffset=[0,0];xc.prototype.opacity=1;xc.prototype.color=new Uint8Array([0,0,0,255]);xc.prototype.alignOffset=[0,0];xc.maxAtlasSize=1024;xc.atlasCanvas=document.createElement("canvas");xc.atlasContext=xc.atlasCanvas.getContext("2d",{alpha:!1});xc.baseFontSize=64;xc.fonts={};function DUt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}MBe.exports=xc});var kBe=ye((uK,cK)=>{(function(e,t){typeof uK=="object"&&typeof cK!="undefined"?cK.exports=t():e.createREGL=t()})(uK,function(){"use strict";var e=function(Me,bt){for(var zt=Object.keys(bt),Rr=0;Rr1&&bt===zt&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Rr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Rr)return s(Me.substr(0,Rr.index)).concat(s(Rr[1])).concat(s(Me.substr(Rr.index+Rr[0].length)));var jr=Me.split(".");if(jr.length===1)return['"'+o(Me)+'"'];for(var Nr=[],Gr=0;Gr65535)<<4,Me>>>=bt,zt=(Me>255)<<3,Me>>>=zt,bt|=zt,zt=(Me>15)<<2,Me>>>=zt,bt|=zt,zt=(Me>3)<<1,Me>>>=zt,bt|=zt,bt|Me>>1}function N(){var Me=M(8,function(){return[]});function bt(Nr){var Gr=Z(Nr),mi=Me[j(Gr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Gr)}function zt(Nr){Me[j(Nr.byteLength)>>2].push(Nr)}function Rr(Nr,Gr){var mi=null;switch(Nr){case g:mi=new Int8Array(bt(Gr),0,Gr);break;case P:mi=new Uint8Array(bt(Gr),0,Gr);break;case T:mi=new Int16Array(bt(2*Gr),0,Gr);break;case z:mi=new Uint16Array(bt(2*Gr),0,Gr);break;case O:mi=new Int32Array(bt(4*Gr),0,Gr);break;case V:mi=new Uint32Array(bt(4*Gr),0,Gr);break;case G:mi=new Float32Array(bt(4*Gr),0,Gr);break;default:return null}return mi.length!==Gr?mi.subarray(0,Gr):mi}function jr(Nr){zt(Nr.buffer)}return{alloc:bt,free:zt,allocType:Rr,freeType:jr}}var H=N();H.zero=N();var te=3408,oe=3410,_e=3411,Ee=3412,Ce=3413,me=3414,ie=3415,Se=33901,Le=33902,Ae=3379,Fe=3386,Pe=34921,ge=36347,Re=36348,ce=35661,Ze=35660,ut=34930,pt=36349,Zt=34076,st=34024,lt=7936,Gt=7937,Nt=7938,Jt=35724,sr=34047,wr=36063,cr=34852,$e=3553,St=34067,Qt=34069,Vt=33984,_t=6408,It=5126,mt=5121,er=36160,lr=36053,Tr=36064,Lr=16384,ti=function(Me,bt){var zt=1;bt.ext_texture_filter_anisotropic&&(zt=Me.getParameter(sr));var Rr=1,jr=1;bt.webgl_draw_buffers&&(Rr=Me.getParameter(cr),jr=Me.getParameter(wr));var Nr=!!bt.oes_texture_float;if(Nr){var Gr=Me.createTexture();Me.bindTexture($e,Gr),Me.texImage2D($e,0,_t,1,1,0,_t,It,null);var mi=Me.createFramebuffer();if(Me.bindFramebuffer(er,mi),Me.framebufferTexture2D(er,Tr,$e,Gr,0),Me.bindTexture($e,null),Me.checkFramebufferStatus(er)!==lr)Nr=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Lr);var Ui=H.allocType(It,4);Me.readPixels(0,0,1,1,_t,It,Ui),Me.getError()?Nr=!1:(Me.deleteFramebuffer(mi),Me.deleteTexture(Gr),Nr=Ui[0]===1),H.freeType(Ui)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ei=!0;if(!qi){var Hn=Me.createTexture(),en=H.allocType(mt,36);Me.activeTexture(Vt),Me.bindTexture(St,Hn),Me.texImage2D(Qt,0,_t,3,3,0,_t,mt,en),H.freeType(en),Me.bindTexture(St,null),Me.deleteTexture(Hn),Ei=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(Ee),Me.getParameter(Ce)],depthBits:Me.getParameter(me),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(te),extensions:Object.keys(bt).filter(function(Wi){return!!bt[Wi]}),maxAnisotropic:zt,maxDrawbuffers:Rr,maxColorAttachments:jr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Le),maxViewportDims:Me.getParameter(Fe),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Zt),maxRenderbufferSize:Me.getParameter(st),maxTextureUnits:Me.getParameter(ut),maxTextureSize:Me.getParameter(Ae),maxAttributes:Me.getParameter(Pe),maxVertexUniforms:Me.getParameter(ge),maxVertexTextureUnits:Me.getParameter(Ze),maxVaryingVectors:Me.getParameter(Re),maxFragmentUniforms:Me.getParameter(pt),glsl:Me.getParameter(Jt),renderer:Me.getParameter(Gt),vendor:Me.getParameter(lt),version:Me.getParameter(Nt),readFloat:Nr,npotTextureCube:Ei}},Br=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function Vr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||Br(Me.data))}var dt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:xe,flatten:Ie};function Je(Me,bt,zt){for(var Rr=0;Rr0){var Bn;if(Array.isArray(Yr[0])){Zi=Fn(Yr);for(var hi=1,li=1;li0){if(typeof hi[0]=="number"){var Vi=H.allocType(ci.dtype,hi.length);Er(Vi,hi),Zi(Vi,mn),H.freeType(Vi)}else if(Array.isArray(hi[0])||Br(hi[0])){Ji=Fn(hi);var Ni=qn(hi,Ji,ci.dtype);Zi(Ni,mn),H.freeType(Ni)}}}else if(Vr(hi)){Ji=hi.shape;var pn=hi.stride,Vn=0,na=0,Ki=0,kn=0;Ji.length===1?(Vn=Ji[0],na=1,Ki=pn[0],kn=0):Ji.length===2&&(Vn=Ji[0],na=Ji[1],Ki=pn[0],kn=pn[1]);var ta=Array.isArray(hi.data)?ci.dtype:nr(hi.data),oa=H.allocType(ta,Vn*na);Xr(oa,hi.data,Vn,na,Ki,kn,hi.offset),Zi(oa,mn),H.freeType(oa)}return an}return xi||an(Mr),an._reglType="buffer",an._buffer=ci,an.subdata=Bn,zt.profile&&(an.stats=ci.stats),an.destroy=function(){en(ci)},an}function si(){dt(Nr).forEach(function(Mr){Mr.buffer=Me.createBuffer(),Me.bindBuffer(Mr.type,Mr.buffer),Me.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(bt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Nr).forEach(function(Yr){Mr+=Nr[Yr].stats.size}),Mr}),{create:Wi,createStream:Ui,destroyStream:qi,clear:function(){dt(Nr).forEach(en),mi.forEach(en)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Gr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var Qr=0,Oi=0,$i=1,tn=1,fn=4,yn=4,Sn={points:Qr,point:Oi,lines:$i,line:tn,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Wo=5122,da=5123,Wn=5124,Ha=5125,vo=34963,jn=35040,Mt=35044;function kr(Me,bt,zt,Rr){var jr={},Nr=0,Gr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Gr.uint32=Ha);function mi(si){this.id=Nr++,jr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ui=[];function qi(si){var Mr=Ui.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Ei(si){Ui.push(si)}function Hn(si,Mr,Yr,xi,Ri,ci,an){si.buffer.bind();var Zi;if(Mr){var Bn=an;!an&&(!Br(Mr)||Vr(Mr)&&!Br(Mr.data))&&(Bn=bt.oes_element_index_uint?Ha:da),zt._initBuffer(si.buffer,Mr,Yr,Bn,3)}else Me.bufferData(vo,ci,Yr),si.buffer.dtype=Zi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Zi=an,!an){switch(si.buffer.dtype){case Fa:case Wa:Zi=Fa;break;case da:case Wo:Zi=da;break;case Ha:case Wn:Zi=Ha;break;default:}si.buffer.dtype=Zi}si.type=Zi;var hi=Ri;hi<0&&(hi=si.buffer.byteLength,Zi===da?hi>>=1:Zi===Ha&&(hi>>=2)),si.vertCount=hi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=ua),mn===3&&(li=ma)}si.primType=li}function en(si){Rr.elementsCount--,delete jr[si.id],si.buffer.destroy(),si.buffer=null}function Wi(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Rr.elementsCount++;function Ri(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci=="number")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var an=null,Zi=Mt,Bn=-1,hi=-1,li=0,mn=0;Array.isArray(ci)||Br(ci)||Vr(ci)?an=ci:("data"in ci&&(an=ci.data),"usage"in ci&&(Zi=On[ci.usage]),"primitive"in ci&&(Bn=Sn[ci.primitive]),"count"in ci&&(hi=ci.count|0),"type"in ci&&(mn=Gr[ci.type]),"length"in ci?li=ci.length|0:(li=hi,mn===da||mn===Wo?li*=2:(mn===Ha||mn===Wn)&&(li*=4))),Hn(xi,an,Zi,Bn,hi,li,mn)}return Ri}return Ri(si),Ri._reglType="elements",Ri._elements=xi,Ri.subdata=function(ci,an){return Yr.subdata(ci,an),Ri},Ri.destroy=function(){en(xi)},Ri}return{create:Wi,createStream:qi,destroyStream:Ei,getElements:function(si){return typeof si=="function"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(jr).forEach(en)}}}var Jr=new Float32Array(1),vi=new Uint32Array(Jr.buffer),hn=5123;function An(Me){for(var bt=H.allocType(hn,Me.length),zt=0;zt>>31<<15,Nr=(Rr<<1>>>24)-127,Gr=Rr>>13&1023;if(Nr<-24)bt[zt]=jr;else if(Nr<-14){var mi=-14-Nr;bt[zt]=jr+(Gr+1024>>mi)}else Nr>15?bt[zt]=jr+31744:bt[zt]=jr+(Nr+15<<10)+Gr}return bt}function Mn(Me){return Array.isArray(Me)||Br(Me)}var Li=34467,_n=3553,ya=34067,Jn=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Zl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Yl=36196,Ns=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Uf=10241,pl=9728,Zc=9729,Kl=9984,Os=9985,yu=9986,oc=9987,Cf=33170,sc=4352,Vh=4353,Lf=4354,cs=34046,nf=3317,Vf=37440,Jl=37441,fl=37443,lc=37444,Fu=33984,Es=[Kl,yu,Os,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),qs=ps("ImageBitmap"),ad=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),od=Object.keys(ke).concat([uc,xl,Gu,qs,ad,Po]),Yo=[];Yo[Ns]=1,Yo[aa]=4,Yo[zs]=2,Yo[Hl]=2,Yo[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Zl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Yl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!Mn(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Gf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===qs}function wh(Me){return bl(Me)===ad}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return od.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||Vr(Me)}function Yc(Me){return ke[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var zt=bt.length;switch(Me.type){case Ns:case Hl:case ac:case aa:var Rr=H.allocType(Me.type,zt);Rr.set(bt),Me.data=Rr;break;case zs:Me.data=An(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?aa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=An(bt),H.freeType(bt)):Me.data=bt}function Hf(Me,bt,zt,Rr,jr,Nr){for(var Gr=Me.width,mi=Me.height,Ui=Me.channels,qi=Gr*mi*Ui,Ei=th(Me,qi),Hn=0,en=0;en=1;)mi+=Gr*Ui*Ui,Ui/=2;return mi}else return Gr*zt*Rr}function of(Me,bt,zt,Rr,jr,Nr,Gr){var mi={"don't care":sc,"dont care":sc,nice:Lf,fast:Vh},Ui={repeat:ql,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Ei=e({mipmap:oc,"nearest mipmap nearest":Kl,"linear mipmap nearest":Os,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Hn={none:0,browser:lc},en={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},Wi={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},si={};bt.ext_srgb&&(Wi.srgb=cl,Wi.srgba=Ks),bt.oes_texture_float&&(en.float32=en.float=aa),bt.oes_texture_half_float&&(en.float16=en["half float"]=zs),bt.webgl_depth_texture&&(e(Wi,{depth:il,"depth stencil":As}),e(en,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(si,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Zl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(si,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(si,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":Ol,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(si["rgb etc1"]=Yl);var Mr=Array.prototype.slice.call(Me.getParameter(Li));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(Wi[ne]=we)});var Yr=Object.keys(Wi);zt.textureFormats=Yr;var xi=[];Object.keys(Wi).forEach(function(ne){var we=Wi[ne];xi[we]=ne});var Ri=[];Object.keys(en).forEach(function(ne){var we=en[ne];Ri[we]=ne});var ci=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ci[we]=ne});var an=[];Object.keys(Ei).forEach(function(ne){var we=Ei[ne];an[we]=ne});var Zi=[];Object.keys(Ui).forEach(function(ne){var we=Ui[ne];Zi[we]=ne});var Bn=Yr.reduce(function(ne,we){var Ue=Wi[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===il||Ue===As||bt.ext_srgb&&(Ue===cl||Ue===Ks)?ne[Ue]=Ue:Ue===Ds||we.indexOf("rgba")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function hi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!="object"||!we)){if("premultiplyAlpha"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),"flipY"in we&&(ne.flipY=we.flipY),"alignment"in we&&(ne.unpackAlignment=we.alignment),"colorSpace"in we&&(ne.colorSpace=Hn[we.colorSpace]),"type"in we){var Ue=we.type;ne.type=en[Ue]}var ft=ne.width,Xt=ne.height,hr=ne.channels,qt=!1;"shape"in we?(ft=we.shape[0],Xt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):("radius"in we&&(ft=Xt=we.radius),"width"in we&&(ft=we.width),"height"in we&&(Xt=we.height),"channels"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Xt|0,ne.channels=hr|0;var Ve=!1;if("format"in we){var Qe=we.format,at=ne.internalformat=Wi[Qe];ne.format=Bn[at],Qe in en&&("type"in we||(ne.type=en[Qe])),Qe in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Vf,ne.flipY),Me.pixelStorei(Jl,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Vi(){hi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ni(ne,we){var Ue=null;if(_f(we)?Ue=we:we&&(mn(ne,we),"x"in we&&(ne.xOffset=we.x|0),"y"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Ue=we.data)),we.copy){var ft=jr.viewportWidth,Xt=jr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Xt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Br(Ue))ne.channels=ne.channels||4,ne.data=Ue,!("type"in we)&&ne.type===Ns&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Vr(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Ns&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,Qe,at,Ct,Ot,Rt,Bt;qt.length===3?(Ct=qt[2],Bt=Ve[2]):(Ct=1,Bt=1),Qe=qt[0],at=qt[1],Ot=Ve[0],Rt=Ve[1],ne.alignment=1,ne.width=Qe,ne.height=at,ne.channels=Ct,ne.format=ne.internalformat=Hs[Ct],ne.needsFree=!0,Hf(ne,hr,Ot,Rt,Bt,Ue.offset)}else if(Gf(Ue)||Ic(Ue)||yf(Ue))Gf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(wh(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Dt=ne.width||Ue[0].length,yt=ne.height||Ue.length,Pt=ne.channels;Mn(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),ur=1,br=0;br>=Xt,Ue.height>>=Xt,Ni(Ue,ft[Xt]),ne.mipmask|=1<=0&&!("faces"in we)&&(ne.genMipmaps=!0)}if("mag"in we){var ft=we.mag;ne.magFilter=qi[ft]}var Xt=ne.wrapS,hr=ne.wrapT;if("wrap"in we){var qt=we.wrap;typeof qt=="string"?Xt=hr=Ui[qt]:Array.isArray(qt)&&(Xt=Ui[qt[0]],hr=Ui[qt[1]])}else{if("wrapS"in we){var Ve=we.wrapS;Xt=Ui[Ve]}if("wrapT"in we){var Qe=we.wrapT;hr=Ui[Qe]}}if(ne.wrapS=Xt,ne.wrapT=hr,"anisotropic"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if("mipmap"in we){var Ct=!1;switch(typeof we.mipmap){case"string":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,Ct=!0;break;case"boolean":Ct=ne.genMipmaps=we.mipmap;break;case"object":ne.genMipmaps=!1,Ct=!0;break;default:}Ct&&!("min"in we)&&(ne.minFilter=Kl)}}function al(ne,we){Me.texParameteri(we,Uf,ne.minFilter),Me.texParameteri(we,rf,ne.magFilter),Me.texParameteri(we,Oo,ne.wrapS),Me.texParameteri(we,qo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=zt.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){hi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Gr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Me.activeTexture(Fu+Ue),Me.bindTexture(ft,null),Ys[Ue]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Nr.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue0)continue;ft.unit=-1}Ys[Ue]=ne,we=Ue;break}we>=Vs,Gr.profile&&Nr.maxTextureUnits>Rt)-Ct,Bt.height=Bt.height||(Ue.height>>Rt)-Ot,ol(Ue),Vn(Bt,_n,Ct,Ot,Rt),io(),kn(Bt),ft}function hr(qt,Ve){var Qe=qt|0,at=Ve|0||Qe;if(Qe===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=Qe,ft.height=Ue.height=at,ol(Ue);for(var Ct=0;Ue.mipmask>>Ct;++Ct){var Ot=Qe>>Ct,Rt=at>>Ct;if(!Ot||!Rt)break;Me.texImage2D(_n,Ct,Ue.format,Ot,Rt,0,Ue.format,Ue.type,null)}return io(),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,Qe,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Xt,ft.resize=hr,ft._reglType="texture2d",ft._texture=Ue,Gr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Xt,hr){var qt=new wa(ya);ss[qt.id]=qt,Nr.cubeCount++;var Ve=new Array(6);function Qe(Ot,Rt,Bt,Dt,yt,Pt){var ht,ur=qt.texInfo;for(zo.call(ur),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot=="number"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot=="object")if(Rt)ba(Ve[0],Ot),ba(Ve[1],Rt),ba(Ve[2],Bt),ba(Ve[3],Dt),ba(Ve[4],yt),ba(Ve[5],Pt);else if(Qs(ur,Ot),mn(qt,Ot),"faces"in Ot){var Ur=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),ba(Ve[ht],Ur[ht])}else for(ht=0;ht<6;++ht)ba(Ve[ht],Ot);for(li(qt,Ve[0]),ur.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,Qe.width=Ve[0].width,Qe.height=Ve[0].height,ol(qt),ht=0;ht<6;++ht)is(Ve[ht],Jn+ht);for(al(ur,ya),io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,ur.genMipmaps,!0)),Qe.format=xi[qt.internalformat],Qe.type=Ri[qt.type],Qe.mag=ci[ur.magFilter],Qe.min=an[ur.minFilter],Qe.wrapS=Zi[ur.wrapS],Qe.wrapT=Zi[ur.wrapT],ht=0;ht<6;++ht)Ml(Ve[ht]);return Qe}function at(Ot,Rt,Bt,Dt,yt){var Pt=Bt|0,ht=Dt|0,ur=yt|0,br=Ki();return li(br,qt),br.width=0,br.height=0,Ni(br,Rt),br.width=br.width||(qt.width>>ur)-Pt,br.height=br.height||(qt.height>>ur)-ht,ol(qt),Vn(br,Jn+Ot,Pt,ht,ur),io(),kn(br),Qe}function Ct(Ot){var Rt=Ot|0;if(Rt!==qt.width){Qe.width=qt.width=Rt,Qe.height=qt.height=Rt,ol(qt);for(var Bt=0;Bt<6;++Bt)for(var Dt=0;qt.mipmask>>Dt;++Dt)Me.texImage2D(Jn+Bt,Dt,qt.format,Rt>>Dt,Rt>>Dt,0,qt.format,qt.type,null);return io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,!1,!0)),Qe}}return Qe(ne,we,Ue,ft,Xt,hr),Qe.subimage=at,Qe.resize=Ct,Qe._reglType="textureCube",Qe._texture=qt,Gr.profile&&(Qe.stats=qt.stats),Qe.destroy=function(){qt.decRef()},Qe}function q(){for(var ne=0;ne>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Xt=0;Xt<6;++Xt)Me.texImage2D(Jn+Xt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);al(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ui.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(al),ta=0;ta0&&(kn.depth=Ni[0].depth,kn.stencil=Ni[0].stencil,kn.depthStencil=Ni[0].depthStencil),Ni[Ki]?Ni[Ki](kn):Ni[Ki]=li(kn)}return e(pn,{width:ta,height:ta,color:zo})}function Vn(na){var Ki,kn=na|0;if(kn===pn.width)return pn;var ta=pn.color;for(Ki=0;Ki=ta.byteLength?oa.subdata(ta):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=jr.create(Ki,If,!1,!0)),kn.buffer=jr.getBuffer(oa),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1,pn[na]=1}else jr.getBuffer(Ki)?(kn.buffer=jr.getBuffer(Ki),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1):jr.getBuffer(Ki.buffer)?(kn.buffer=jr.getBuffer(Ki.buffer),kn.size=(+Ki.size||kn.buffer.dimension)|0,kn.normalized=!!Ki.normalized||!1,"type"in Ki?kn.type=ji[Ki.type]:kn.type=kn.buffer.dtype,kn.offset=(Ki.offset||0)|0,kn.stride=(Ki.stride||0)|0,kn.divisor=(Ki.divisor||0)|0,kn.state=1):"x"in Ki&&(kn.x=+Ki.x||0,kn.y=+Ki.y||0,kn.z=+Ki.z||0,kn.w=+Ki.w||0,kn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiMr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){jr={},Nr={};for(var Mr=0;Mr16&&(zt=Yi(zt,Me.length*8));for(var Rr=Array(16),jr=Array(16),Nr=0;Nr<16;Nr++)Rr[Nr]=zt[Nr]^909522486,jr[Nr]=zt[Nr]^1549556828;var Gr=Yi(Rr.concat(Bc(bt)),512+bt.length*8);return At(Yi(jr.concat(Gr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",zt="",Rr,jr=0;jr>>4&15)+bt.charAt(Rr&15);return zt}function qc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt="",Rr=Me.length,jr=0;jrMe.length*8?zt+=Zu:zt+=bt.charAt(Nr>>>6*(3-Gr)&63);return zt}function cf(Me,bt){var zt=bt.length,Rr=Array(),jr,Nr,Gr,mi,Ui=Array(Math.ceil(Me.length/2));for(jr=0;jr0;){for(mi=Array(),Gr=0,jr=0;jr0||Nr>0)&&(mi[mi.length]=Nr);Rr[Rr.length]=Gr,Ui=mi}var qi="";for(jr=Rr.length-1;jr>=0;jr--)qi+=bt.charAt(Rr[jr]);var Ei=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(jr=qi.length;jr>>6&31,128|Rr&63):Rr<=65535?bt+=String.fromCharCode(224|Rr>>>12&15,128|Rr>>>6&63,128|Rr&63):Rr<=2097151&&(bt+=String.fromCharCode(240|Rr>>>18&7,128|Rr>>>12&63,128|Rr>>>6&63,128|Rr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),zt=0;zt>5]|=(Me.charCodeAt(zt/8)&255)<<24-zt%32;return bt}function At(Me){for(var bt="",zt=0;zt>5]>>>24-zt%32&255);return bt}function Wt(Me,bt){return Me>>>bt|Me<<32-bt}function Cr(Me,bt){return Me>>>bt}function Ar(Me,bt,zt){return Me&bt^~Me&zt}function Kr(Me,bt,zt){return Me&bt^Me&zt^bt&zt}function ki(Me){return Wt(Me,2)^Wt(Me,13)^Wt(Me,22)}function Xi(Me){return Wt(Me,6)^Wt(Me,11)^Wt(Me,25)}function dn(Me){return Wt(Me,7)^Wt(Me,18)^Cr(Me,3)}function wn(Me){return Wt(Me,17)^Wt(Me,19)^Cr(Me,10)}var Nn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Rr=new Array(64),jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,en=0;en>16)+(bt>>16)+(zt>>16);return Rr<<16|zt&65535}function on(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return on(Me).join("")}function $n(Me){var bt=Me&&Me.cache,zt=0,Rr=[],jr=[],Nr=[];function Gr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi0&&(si.push(Ri,"="),si.push.apply(si,on(arguments)),si.push(";")),Ri}return e(Mr,{def:xi,toString:function(){return Fi([Yr.length>0?"var "+Yr.join(",")+";":"",Fi(si)])}})}function Ui(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ri(ci,an){Mr(ci,an,"=",si.def(ci,an),";")}return e(function(){si.apply(si,on(arguments))},{def:si.def,entry:si,exit:Mr,save:Ri,set:function(ci,an,Zi){Ri(ci,an),si(ci,an,"=",Zi,";")},toString:function(){return Yr()+xi()}})}function qi(){var si=Fi(arguments),Mr=Ui(),Yr=Ui(),xi=Mr.toString,Ri=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,on(arguments)),this},else:function(){return Yr.apply(Yr,on(arguments)),this},toString:function(){var ci=Ri();return ci&&(ci="else{"+ci+"}"),Fi(["if(",si,"){",xi(),"}",ci])}})}var Ei=mi(),Hn={};function en(si,Mr){var Yr=[];function xi(){var Bn="a"+Yr.length;return Yr.push(Bn),Bn}Mr=Mr||0;for(var Ri=0;Ri":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ai={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},gi={cw:Te,ccw:Ne};function Ii(Me){return Array.isArray(Me)||Br(Me)||Vr(Me)}function Si(Me){return Me.sort(function(bt,zt){return bt===ee?-1:zt===ee?1:bt=1,Rr>=2,bt)}else if(zt===Xo){var jr=Me.data;return new ei(jr.thisDep,jr.contextDep,jr.propDep,bt)}else{if(zt===Ss)return new ei(!1,!1,!1,bt);if(zt===as){for(var Nr=!1,Gr=!1,mi=!1,Ui=0;Ui=1&&(Gr=!0),Ei>=2&&(mi=!0)}else qi.type===Xo&&(Nr=Nr||qi.data.thisDep,Gr=Gr||qi.data.contextDep,mi=mi||qi.data.propDep)}return new ei(Nr,Gr,mi,bt)}else return new ei(zt===bo,zt===Ka,zt===Dn,bt)}}var ia=new ei(!1,!1,!1,function(){});function Ea(Me,bt,zt,Rr,jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr){var Yr=qi.Record,xi={add:32774,subtract:32778,"reverse subtract":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ri=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,an=zt.oes_vertex_array_object,Zi={dirty:!0,profile:Mr.profile},Bn={},hi=[],li={},mn={};function Ji(Ve){return Ve.replace(".","_")}function Vi(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Bn[Ct]=Zi[Ct]=!!at,li[Ct]=Qe}function Ni(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Array.isArray(at)?(Zi[Ct]=at.slice(),Bn[Ct]=at.slice()):Zi[Ct]=Bn[Ct]=at,mn[Ct]=Qe}function pn(Ve){return!!isNaN(Ve)}Vi(ws,Pi),Vi(Ho,ni),Ni(ml,"blendColor",[0,0,0,0]),Ni(Ws,"blendEquationSeparate",[yr,yr]),Ni(Ls,"blendFuncSeparate",[gr,jt,gr,jt]),Vi(va,ln,!0),Ni(no,"depthFunc",Hr),Ni(ys,"depthRange",[0,1]),Ni(rs,"depthMask",!0),Ni($l,$l,[!0,!0,!0,!0]),Vi(Cu,Wr),Ni(Yu,"cullFace",se),Ni(Nc,Nc,Ne),Ni(pu,pu,1),Vi(Uc,Kn),Ni(xu,"polygonOffset",[0,0]),Vi(Ac,Ta),Vi(Ua,fa),Ni(oo,"sampleCoverage",[1,!1]),Vi(Vc,cn),Ni(hc,"stencilMask",-1),Ni(Ku,"stencilFunc",[kt,0,-1]),Ni(ue,"stencilOpSeparate",[X,nt,nt,nt]),Ni(w,"stencilOpSeparate",[se,nt,nt,nt]),Vi(B,Cn),Ni(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Ni(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Vn={gl:Me,context:en,strings:bt,next:Bn,current:Zi,draw:Hn,elements:Nr,buffer:jr,shader:Ei,attributes:qi.state,vao:qi,uniforms:Ui,framebuffer:mi,extensions:zt,timer:Wi,isBufferArgs:Ii},na={primTypes:Sn,compareFuncs:Zr,blendFuncs:bi,blendEquations:xi,stencilOps:ai,glTypes:ji,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Rr.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(Qe){return _i+Qe})}));var Ki=0;function kn(){var Ve=$n({cache:si}),Qe=Ve.link,at=Ve.global;Ve.id=Ki++,Ve.batchId="0";var Ct=Qe(Vn),Ot=Ve.shared={props:"a0"};Object.keys(Vn).forEach(function(Pt){Ot[Pt]=at.def(Ct,".",Pt)});var Rt=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Zi[Pt])&&(Rt[Pt]=at.def(Ot.next,".",Pt),Bt[Pt]=at.def(Ot.current,".",Pt))});var Dt=Ve.constants={};Object.keys(na).forEach(function(Pt){Dt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var ur=["this",Ot.context,Ot.props,Ve.batchId];return Pt.def(Qe(ht.data),".call(",ur.slice(0,Math.max(ht.data.length+1,4)),")");case Dn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def("this",ht.data);case Xo:return ht.data.append(Ve,Pt),ht.data.ref;case Ss:return ht.data.toString();case as:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var yt={};return Ve.scopeAttrib=function(Pt){var ht=bt.id(Pt);if(ht in yt)return yt[ht];var ur=qi.scope[ht];ur||(ur=qi.scope[ht]=new Yr);var br=yt[ht]=Qe(ur);return br},Ve}function ta(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct;if(le in Qe){var Ot=!!Qe[le];Ct=En(function(Bt,Dt){return Ot}),Ct.enable=Ot}else if(le in at){var Rt=at[le];Ct=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}return Ct}function oa(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic;if(qe in at){var Ot=at[qe];return Ot?(Ot=mi.getFramebuffer(Ot),En(function(Bt,Dt){var yt=Bt.link(Ot),Pt=Bt.shared;Dt.set(Pt.framebuffer,".next",yt);var ht=Pt.context;return Dt.set(ht,"."+Be,yt+".width"),Dt.set(ht,"."+et,yt+".height"),yt})):En(function(Bt,Dt){var yt=Bt.shared;Dt.set(yt.framebuffer,".next","null");var Pt=yt.context;return Dt.set(Pt,"."+Be,Pt+"."+Ht),Dt.set(Pt,"."+et,Pt+"."+tr),"null"})}else if(qe in Ct){var Rt=Ct[qe];return Un(Rt,function(Bt,Dt){var yt=Bt.invoke(Dt,Rt),Pt=Bt.shared,ht=Pt.framebuffer,ur=Dt.def(ht,".getFramebuffer(",yt,")");Dt.set(ht,".next",ur);var br=Pt.context;return Dt.set(br,"."+Be,ur+"?"+ur+".width:"+br+"."+Ht),Dt.set(br,"."+et,ur+"?"+ur+".height:"+br+"."+tr),ur})}else return null}function ba(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(yt){if(yt in Ct){var Pt=Ct[yt],ht=!0,ur=Pt.x|0,br=Pt.y|0,Ur,Di;return"width"in Pt?Ur=Pt.width|0:ht=!1,"height"in Pt?Di=Pt.height|0:ht=!1,new ei(!ht&&Qe&&Qe.thisDep,!ht&&Qe&&Qe.contextDep,!ht&&Qe&&Qe.propDep,function(gn,rn){var Ci=gn.shared.context,Bi=Ur;"width"in Pt||(Bi=rn.def(Ci,".",Be,"-",ur));var Gi=Di;return"height"in Pt||(Gi=rn.def(Ci,".",et,"-",br)),[ur,br,Bi,Gi]})}else if(yt in Ot){var fi=Ot[yt],Ti=Un(fi,function(gn,rn){var Ci=gn.invoke(rn,fi),Bi=gn.shared.context,Gi=rn.def(Ci,".x|0"),sn=rn.def(Ci,".y|0"),zn=rn.def('"width" in ',Ci,"?",Ci,".width|0:","(",Bi,".",Be,"-",Gi,")"),Ja=rn.def('"height" in ',Ci,"?",Ci,".height|0:","(",Bi,".",et,"-",sn,")");return[Gi,sn,zn,Ja]});return Qe&&(Ti.thisDep=Ti.thisDep||Qe.thisDep,Ti.contextDep=Ti.contextDep||Qe.contextDep,Ti.propDep=Ti.propDep||Qe.propDep),Ti}else return Qe?new ei(Qe.thisDep,Qe.contextDep,Qe.propDep,function(gn,rn){var Ci=gn.shared.context;return[0,0,rn.def(Ci,".",Be),rn.def(Ci,".",et)]}):null}var Bt=Rt(ee);if(Bt){var Dt=Bt;Bt=new ei(Bt.thisDep,Bt.contextDep,Bt.propDep,function(yt,Pt){var ht=Dt.append(yt,Pt),ur=yt.shared.context;return Pt.set(ur,"."+We,ht[2]),Pt.set(ur,"."+it,ht[3]),ht})}return{viewport:Bt,scissor_box:Rt(Q)}}function is(Ve,Qe){var at=Ve.static,Ct=typeof at[ot]=="string"&&typeof at[Xe]=="string";if(Ct){if(Object.keys(Qe.dynamic).length>0)return null;var Ot=Qe.static,Rt=Object.keys(Ot);if(Rt.length>0&&typeof Ot[Rt[0]]=="number"){for(var Bt=[],Dt=0;Dt"+Gi+"?"+ht+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Ur,"(",ht,".buffer)){",gn,"=",Di,".createStream(",Sr,",",ht,".buffer);","}else{",gn,"=",Di,".getBuffer(",ht,".buffer);","}",rn,'="type" in ',ht,"?",br.glTypes,"[",ht,".type]:",gn,".dtype;",fi.normalized,"=!!",ht,".normalized;");function Ci(Bi){Pt(fi[Bi],"=",ht,".",Bi,"|0;")}return Ci("size"),Ci("offset"),Ci("stride"),Ci("divisor"),Pt("}}"),Pt.exit("if(",fi.isStream,"){",Di,".destroyStream(",gn,");","}"),fi}Ot[Rt]=Un(Bt,Dt)}),Ot}function al(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct={};return Object.keys(Qe).forEach(function(Ot){var Rt=Qe[Ot];Ct[Ot]=En(function(Bt,Dt){return typeof Rt=="number"||typeof Rt=="boolean"?""+Rt:Bt.link(Rt)})}),Object.keys(at).forEach(function(Ot){var Rt=at[Ot];Ct[Ot]=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}),Ct}function Vl(Ve,Qe,at,Ct,Ot){var Rt=Ve.static,Bt=Ve.dynamic,Dt=is(Ve,Qe),yt=oa(Ve,Ot),Pt=ba(Ve,yt,Ot),ht=Va(Ve,Ot),ur=Ml(Ve,Ot),br=Zs(Ve,Ot,Dt);function Ur(Ci){var Bi=Pt[Ci];Bi&&(ur[Ci]=Bi)}Ur(ee),Ur(Ji(Q));var Di=Object.keys(ur).length>0,fi={framebuffer:yt,draw:ht,shader:br,state:ur,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fi.profile=ta(Ve,Ot),fi.uniforms=zo(at,Ot),fi.drawVAO=fi.scopeVAO=ht.vao,!fi.drawVAO&&br.program&&!Dt&&zt.angle_instanced_arrays&&ht.static.elements){var Ti=!0,gn=br.program.attributes.map(function(Ci){var Bi=Qe.static[Ci];return Ti=Ti&&!!Bi,Bi});if(Ti&&gn.length>0){var rn=qi.getVAO(qi.createVAO({attributes:gn,elements:ht.static.elements}));fi.drawVAO=new ei(null,null,null,function(Ci,Bi){return Ci.link(rn)}),fi.useVAO=!0}}return Dt?fi.useVAO=!0:fi.attributes=Qs(Qe,Ot),fi.context=al(Ct,Ot),fi}function ss(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.context,Rt=Ve.scope();Object.keys(at).forEach(function(Bt){Qe.save(Ot,"."+Bt);var Dt=at[Bt],yt=Dt.append(Ve,Qe);Array.isArray(yt)?Rt(Ot,".",Bt,"=[",yt.join(),"];"):Rt(Ot,".",Bt,"=",yt,";")}),Qe(Rt)}function Vs(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.framebuffer,Dt;ci&&(Dt=Qe.def(Ot.extensions,".webgl_draw_buffers"));var yt=Ve.constants,Pt=yt.drawBuffer,ht=yt.backBuffer,ur;at?ur=at.append(Ve,Qe):ur=Qe.def(Bt,".next"),Ct||Qe("if(",ur,"!==",Bt,".cur){"),Qe("if(",ur,"){",Rt,".bindFramebuffer(",qr,",",ur,".framebuffer);"),ci&&Qe(Dt,".drawBuffersWEBGL(",Pt,"[",ur,".colorAttachments.length]);"),Qe("}else{",Rt,".bindFramebuffer(",qr,",null);"),ci&&Qe(Dt,".drawBuffersWEBGL(",ht,");"),Qe("}",Bt,".cur=",ur,";"),Ct||Qe("}")}function Ys(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.gl,Rt=Ve.current,Bt=Ve.next,Dt=Ct.current,yt=Ct.next,Pt=Ve.cond(Dt,".dirty");hi.forEach(function(ht){var ur=Ji(ht);if(!(ur in at.state)){var br,Ur;if(ur in Bt){br=Bt[ur],Ur=Rt[ur];var Di=M(Zi[ur].length,function(Ti){return Pt.def(br,"[",Ti,"]")});Pt(Ve.cond(Di.map(function(Ti,gn){return Ti+"!=="+Ur+"["+gn+"]"}).join("||")).then(Ot,".",mn[ur],"(",Di,");",Di.map(function(Ti,gn){return Ur+"["+gn+"]="+Ti}).join(";"),";"))}else{br=Pt.def(yt,".",ur);var fi=Ve.cond(br,"!==",Dt,".",ur);Pt(fi),ur in li?fi(Ve.cond(br).then(Ot,".enable(",li[ur],");").else(Ot,".disable(",li[ur],");"),Dt,".",ur,"=",br,";"):fi(Ot,".",mn[ur],"(",br,");",Dt,".",ur,"=",br,";")}}}),Object.keys(at.state).length===0&&Pt(Dt,".dirty=false;"),Qe(Pt)}function wa(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ve.current,Bt=Ot.current,Dt=Ot.gl,yt;Si(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(Ct&&!Ct(ht))){var ur=ht.append(Ve,Qe);if(li[Pt]){var br=li[Pt];Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Ve.cond(yt).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",yt,";")):(Qe(Ve.cond(ur).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",ur,";"))}else if(Mn(ur)){var Ur=Rt[Pt];Qe(Dt,".",mn[Pt],"(",ur,");",ur.map(function(Di,fi){return Ur+"["+fi+"]="+Di}).join(";"),";")}else Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Dt,".",mn[Pt],"(",yt,");",Bt,".",Pt,"=",yt,";")):Qe(Dt,".",mn[Pt],"(",ur,");",Bt,".",Pt,"=",ur,";")}})}function ol(Ve,Qe){Ri&&(Ve.instancing=Qe.def(Ve.shared.extensions,".angle_instanced_arrays"))}function io(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared,Bt=Ve.stats,Dt=Rt.current,yt=Rt.timer,Pt=at.profile;function ht(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var ur,br;function Ur(Ci){ur=Qe.def(),Ci(ur,"=",ht(),";"),typeof Ot=="string"?Ci(Bt,".count+=",Ot,";"):Ci(Bt,".count++;"),Wi&&(Ct?(br=Qe.def(),Ci(br,"=",yt,".getNumPendingQueries();")):Ci(yt,".beginQuery(",Bt,");"))}function Di(Ci){Ci(Bt,".cpuTime+=",ht(),"-",ur,";"),Wi&&(Ct?Ci(yt,".pushScopeStats(",br,",",yt,".getNumPendingQueries(),",Bt,");"):Ci(yt,".endQuery();"))}function fi(Ci){var Bi=Qe.def(Dt,".profile");Qe(Dt,".profile=",Ci,";"),Qe.exit(Dt,".profile=",Bi,";")}var Ti;if(Pt){if(Ln(Pt)){Pt.enable?(Ur(Qe),Di(Qe.exit),fi("true")):fi("false");return}Ti=Pt.append(Ve,Qe),fi(Ti)}else Ti=Qe.def(Dt,".profile");var gn=Ve.block();Ur(gn),Qe("if(",Ti,"){",gn,"}");var rn=Ve.block();Di(rn),Qe.exit("if(",Ti,"){",rn,"}")}function Y(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared;function Bt(yt){switch(yt){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Dt(yt,Pt,ht){var ur=Rt.gl,br=Qe.def(yt,".location"),Ur=Qe.def(Rt.attributes,"[",br,"]"),Di=ht.state,fi=ht.buffer,Ti=[ht.x,ht.y,ht.z,ht.w],gn=["buffer","normalized","offset","stride"];function rn(){Qe("if(!",Ur,".buffer){",ur,".enableVertexAttribArray(",br,");}");var Bi=ht.type,Gi;if(ht.size?Gi=Qe.def(ht.size,"||",Pt):Gi=Pt,Qe("if(",Ur,".type!==",Bi,"||",Ur,".size!==",Gi,"||",gn.map(function(zn){return Ur+"."+zn+"!=="+ht[zn]}).join("||"),"){",ur,".bindBuffer(",Sr,",",fi,".buffer);",ur,".vertexAttribPointer(",[br,Gi,Bi,ht.normalized,ht.stride,ht.offset],");",Ur,".type=",Bi,";",Ur,".size=",Gi,";",gn.map(function(zn){return Ur+"."+zn+"="+ht[zn]+";"}).join(""),"}"),Ri){var sn=ht.divisor;Qe("if(",Ur,".divisor!==",sn,"){",Ve.instancing,".vertexAttribDivisorANGLE(",[br,sn],");",Ur,".divisor=",sn,";}")}}function Ci(){Qe("if(",Ur,".buffer){",ur,".disableVertexAttribArray(",br,");",Ur,".buffer=null;","}if(",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"!=="+Ti[Gi]}).join("||"),"){",ur,".vertexAttrib4f(",br,",",Ti,");",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"="+Ti[Gi]+";"}).join(""),"}")}Di===La?rn():Di===Na?Ci():(Qe("if(",Di,"===",La,"){"),rn(),Qe("}else{"),Ci(),Qe("}"))}Ct.forEach(function(yt){var Pt=yt.name,ht=at.attributes[Pt],ur;if(ht){if(!Ot(ht))return;ur=ht.append(Ve,Qe)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);ur={},Object.keys(new Yr).forEach(function(Ur){ur[Ur]=Qe.def(br,".",Ur)})}Dt(Ve.link(yt),Bt(yt.info.type),ur)})}function D(Ve,Qe,at,Ct,Ot,Rt){for(var Bt=Ve.shared,Dt=Bt.gl,yt,Pt=0;Pt1){for(var co=[],ts=[],so=0;so>1)",fi],");")}function sn(){at(Ti,".drawArraysInstancedANGLE(",[br,Ur,Di,fi],");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}function Bi(){function Gi(){at(Rt+".drawElements("+[br,Di,gn,Ur+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function sn(){at(Rt+".drawArrays("+[br,Ur,Di]+");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}Ri&&(typeof fi!="number"||fi>=0)?typeof fi=="string"?(at("if(",fi,">0){"),Ci(),at("}else if(",fi,"<0){"),Bi(),at("}")):Ci():Bi()}function q(Ve,Qe,at,Ct,Ot){var Rt=kn(),Bt=Rt.proc("body",Ot);return Ri&&(Rt.instancing=Bt.def(Rt.shared.extensions,".angle_instanced_arrays")),Ve(Rt,Bt,at,Ct),Rt.compile().body}function K(Ve,Qe,at,Ct){ol(Ve,Qe),at.useVAO?at.drawVAO?Qe(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Qe),");"):Qe(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Qe(Ve.shared.vao,".setVAO(null);"),Y(Ve,Qe,at,Ct.attributes,function(){return!0})),D(Ve,Qe,at,Ct.uniforms,function(){return!0},!1),J(Ve,Qe,Qe,at)}function de(Ve,Qe){var at=Ve.proc("draw",1);ol(Ve,at),ss(Ve,at,Qe.context),Vs(Ve,at,Qe.framebuffer),Ys(Ve,at,Qe),wa(Ve,at,Qe.state),io(Ve,at,Qe,!1,!0);var Ct=Qe.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Ct,".program);"),Qe.shader.program)K(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var Ot=Ve.global.def("{}"),Rt=at.def(Ct,".id"),Bt=at.def(Ot,"[",Rt,"]");at(Ve.cond(Bt).then(Bt,".call(this,a0);").else(Bt,"=",Ot,"[",Rt,"]=",Ve.link(function(Dt){return q(K,Ve,Qe,Dt,1)}),"(",Ct,");",Bt,".call(this,a0);"))}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ne(Ve,Qe,at,Ct){Ve.batchId="a1",ol(Ve,Qe);function Ot(){return!0}Y(Ve,Qe,at,Ct.attributes,Ot),D(Ve,Qe,at,Ct.uniforms,Ot,!1),J(Ve,Qe,Qe,at)}function we(Ve,Qe,at,Ct){ol(Ve,Qe);var Ot=at.contextDep,Rt=Qe.def(),Bt="a0",Dt="a1",yt=Qe.def();Ve.shared.props=yt,Ve.batchId=Rt;var Pt=Ve.scope(),ht=Ve.scope();Qe(Pt.entry,"for(",Rt,"=0;",Rt,"<",Dt,";++",Rt,"){",yt,"=",Bt,"[",Rt,"];",ht,"}",Pt.exit);function ur(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!ur(gn)}if(at.needsContext&&ss(Ve,ht,at.context),at.needsFramebuffer&&Vs(Ve,ht,at.framebuffer),wa(Ve,ht,at.state,ur),at.profile&&ur(at.profile)&&io(Ve,ht,at,!1,!0),Ct)at.useVAO?at.drawVAO?ur(at.drawVAO)?ht(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,ht),");"):Pt(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Pt),");"):Pt(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Pt(Ve.shared.vao,".setVAO(null);"),Y(Ve,Pt,at,Ct.attributes,br),Y(Ve,ht,at,Ct.attributes,ur)),D(Ve,Pt,at,Ct.uniforms,br,!1),D(Ve,ht,at,Ct.uniforms,ur,!0),J(Ve,Pt,ht,at);else{var Ur=Ve.global.def("{}"),Di=at.shader.progVar.append(Ve,ht),fi=ht.def(Di,".id"),Ti=ht.def(Ur,"[",fi,"]");ht(Ve.shared.gl,".useProgram(",Di,".program);","if(!",Ti,"){",Ti,"=",Ur,"[",fi,"]=",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),"(",Di,");}",Ti,".call(this,a0[",Rt,"],",Rt,");")}}function Ue(Ve,Qe){var at=Ve.proc("batch",2);Ve.batchId="0",ol(Ve,at);var Ct=!1,Ot=!0;Object.keys(Qe.context).forEach(function(Ur){Ct=Ct||Qe.context[Ur].propDep}),Ct||(ss(Ve,at,Qe.context),Ot=!1);var Rt=Qe.framebuffer,Bt=!1;Rt?(Rt.propDep?Ct=Bt=!0:Rt.contextDep&&Ct&&(Bt=!0),Bt||Vs(Ve,at,Rt)):Vs(Ve,at,null),Qe.state.viewport&&Qe.state.viewport.propDep&&(Ct=!0);function Dt(Ur){return Ur.contextDep&&Ct||Ur.propDep}Ys(Ve,at,Qe),wa(Ve,at,Qe.state,function(Ur){return!Dt(Ur)}),(!Qe.profile||!Dt(Qe.profile))&&io(Ve,at,Qe,!1,"a1"),Qe.contextDep=Ct,Qe.needsContext=Ot,Qe.needsFramebuffer=Bt;var yt=Qe.shader.progVar;if(yt.contextDep&&Ct||yt.propDep)we(Ve,at,Qe,null);else{var Pt=yt.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Pt,".program);"),Qe.shader.program)we(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var ht=Ve.global.def("{}"),ur=at.def(Pt,".id"),br=at.def(ht,"[",ur,"]");at(Ve.cond(br).then(br,".call(this,a0,a1);").else(br,"=",ht,"[",ur,"]=",Ve.link(function(Ur){return q(we,Ve,Qe,Ur,2)}),"(",Pt,");",br,".call(this,a0,a1);"))}}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ft(Ve,Qe){var at=Ve.proc("scope",3);Ve.batchId="a2";var Ct=Ve.shared,Ot=Ct.current;if(ss(Ve,at,Qe.context),Qe.framebuffer&&Qe.framebuffer.append(Ve,at),Si(Object.keys(Qe.state)).forEach(function(Dt){var yt=Qe.state[Dt],Pt=yt.append(Ve,at);Mn(Pt)?Pt.forEach(function(ht,ur){pn(ht)?at.set(Ve.next[Dt],"["+ur+"]",ht):at.set(Ve.next[Dt],"["+ur+"]",Ve.link(ht,{stable:!0}))}):Ln(yt)?at.set(Ct.next,"."+Dt,Ve.link(Pt,{stable:!0})):at.set(Ct.next,"."+Dt,Pt)}),io(Ve,at,Qe,!0,!0),[Tt,xr,Kt,Ir,Yt].forEach(function(Dt){var yt=Qe.draw[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.draw,"."+Dt,Pt):at.set(Ct.draw,"."+Dt,Ve.link(Pt),{stable:!0})}}),Object.keys(Qe.uniforms).forEach(function(Dt){var yt=Qe.uniforms[Dt].append(Ve,at);Array.isArray(yt)&&(yt="["+yt.map(function(Pt){return pn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+"]"),at.set(Ct.uniforms,"["+Ve.link(bt.id(Dt),{stable:!0})+"]",yt)}),Object.keys(Qe.attributes).forEach(function(Dt){var yt=Qe.attributes[Dt].append(Ve,at),Pt=Ve.scopeAttrib(Dt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,"."+ht,yt[ht])})}),Qe.scopeVAO){var Rt=Qe.scopeVAO.append(Ve,at);pn(Rt)?at.set(Ct.vao,".targetVAO",Rt):at.set(Ct.vao,".targetVAO",Ve.link(Rt,{stable:!0}))}function Bt(Dt){var yt=Qe.shader[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.shader,"."+Dt,Pt):at.set(Ct.shader,"."+Dt,Ve.link(Pt,{stable:!0}))}}Bt(Xe),Bt(ot),Object.keys(Qe.state).length>0&&(at(Ot,".dirty=true;"),at.exit(Ot,".dirty=true;")),at("a1(",Ve.shared.context,",a0,",Ve.batchId,");")}function Xt(Ve){if(!(typeof Ve!="object"||Mn(Ve))){for(var Qe=Object.keys(Ve),at=0;at=0;--q){var K=Vn[q];K&&K(si,null,0)}zt.flush(),Ei&&Ei.update()}function ba(){!ta&&Vn.length>0&&(ta=d.next(oa))}function is(){ta&&(d.cancel(oa),ta=null)}function Zs(q){q.preventDefault(),jr=!0,is(),na.forEach(function(K){K()})}function Va(q){zt.getError(),jr=!1,Nr.restore(),Bn.restore(),Ri.restore(),hi.restore(),li.restore(),mn.restore(),an.restore(),Ei&&Ei.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Vn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),Bn.clear(),mn.clear(),li.clear(),an.clear(),hi.clear(),ci.clear(),Ri.clear(),Ei&&Ei.clear(),kn.forEach(function(q){q()})}function zo(q){function K(Rt){var Bt=e({},Rt);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,"stencil"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Dt(yt){if(yt in Bt){var Pt=Bt[yt];delete Bt[yt],Object.keys(Pt).forEach(function(ht){Bt[yt+"."+ht]=Pt[ht]})}}return Dt("blend"),Dt("depth"),Dt("cull"),Dt("stencil"),Dt("polygonOffset"),Dt("scissor"),Dt("sample"),"vao"in Rt&&(Bt.vao=Rt.vao),Bt}function de(Rt,Bt){var Dt={},yt={};return Object.keys(Rt).forEach(function(Pt){var ht=Rt[Pt];if(h.isDynamic(ht)){yt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var ur=0;ur0)return Ve.call(this,Ct(Rt|0),Rt|0)}else if(Array.isArray(Rt)){if(Rt.length)return Ve.call(this,Rt,Rt.length)}else return qt.call(this,Rt)}return e(Ot,{stats:Xt,destroy:function(){hr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(q,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(zt.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if("framebuffer"in q)if(q.framebuffer&&q.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:q.framebuffer.faces[K]},q),al);else Qs(q,al);else al(null,q)}function ss(q){Vn.push(q);function K(){var de=dl(Vn,q);function ne(){var we=dl(Vn,ne);Vn[we]=Vn[Vn.length-1],Vn.length-=1,Vn.length<=0&&is()}Vn[de]=ne}return ba(),{cancel:K}}function Vs(){var q=Ni.viewport,K=Ni.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ys(){si.tick+=1,si.time=ol(),Vs(),Ji.procs.poll()}function wa(){hi.refresh(),Vs(),Ji.procs.refresh(),Ei&&Ei.update()}function ol(){return(v()-Hn)/1e3}wa();function io(q,K){var de;switch(q){case"frame":return ss(K);case"lost":de=na;break;case"restore":de=Ki;break;case"destroy":de=kn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Vi,destroy:Ml,_gl:zt,_refresh:wa,poll:function(){Ys(),Ei&&Ei.update()},now:ol,stats:mi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Mz=ye((d_r,CBe)=>{"use strict";var FUt=CX(),zUt=kBe();CBe.exports=function(t,r,n){var i=t._fullLayout,a=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=zUt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),a||FUt({container:i._glcontainer.node()}),a}});var dK=ye((hK,DBe)=>{"use strict";var LBe=hY(),PBe=GY(),OUt=yqe(),IBe=EBe(),fK=Dr(),qUt=Eg().selectMode,BUt=Mz(),NUt=Ru(),UUt=_U(),VUt=lY().styleTextSelection,RBe={};function GUt(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var hK=DBe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=BUt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],RBe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if(UUt(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=OUt(h)),a.line2d===!0&&(a.line2d=PBe(h)),a.scatter2d===!0&&(a.scatter2d=LBe(h)),a.fill2d===!0&&(a.fill2d=PBe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var d=f-a.glText.length;for(l=0;loe&&(isNaN(te[_e])||isNaN(te[_e+1]));)_e-=2;H.positions=te.slice(oe,_e+2)}return H}),a.line2d.update(a.lineOptions)),a.error2d){var b=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(b)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=fK.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(H,te){var oe=n[te];if(!(!H||!oe||!oe[0]||!oe[0].trace)){var _e=oe[0],Ee=_e.trace,Ce=_e.t,me=a.lineOptions[te],ie,Se,Le=[];Ee._ownfill&&Le.push(te),Ee._nexttrace&&Le.push(te+1),Le.length&&(a.fillOrder[te]=Le);var Ae=[],Fe=me&&me.positions||Ce.positions,Pe,ge;if(Ee.fill==="tozeroy"){for(Pe=0;PePe&&isNaN(Fe[ge+1]);)ge-=2;Fe[Pe+1]!==0&&(Ae=[Fe[Pe],0]),Ae=Ae.concat(Fe.slice(Pe,ge+2)),Fe[ge+1]!==0&&(Ae=Ae.concat([Fe[ge],0]))}else if(Ee.fill==="tozerox"){for(Pe=0;PePe&&isNaN(Fe[ge]);)ge-=2;Fe[Pe]!==0&&(Ae=[0,Fe[Pe+1]]),Ae=Ae.concat(Fe.slice(Pe,ge+2)),Fe[ge]!==0&&(Ae=Ae.concat([0,Fe[ge+1]]))}else if(Ee.fill==="toself"||Ee.fill==="tonext"){for(Ae=[],ie=0,H.splitNull=!0,Se=0;Se-1;for(l=0;l{"use strict";var FBe=Qze();FBe.plot=dK();zBe.exports=FBe});var BBe=ye((p_r,qBe)=>{"use strict";qBe.exports=OBe()});var vK=ye((g_r,GBe)=>{"use strict";var HUt=pf(),VBe=Tu(),NBe=df().axisHoverFormat,{hovertemplateAttrs:jUt,templatefallbackAttrs:WUt}=Ll(),kk=lk(),XUt=hd().idRegex,ZUt=vl().templatedArray,g5=Ao().extendFlat,o1=HUt.marker,YUt=o1.line,KUt=g5(VBe("marker.line",{editTypeOverride:"calc"}),{width:g5({},YUt.width,{editType:"calc"}),editType:"calc"}),Ez=g5(VBe("marker"),{symbol:o1.symbol,angle:o1.angle,size:g5({},o1.size,{editType:"markerSize"}),sizeref:o1.sizeref,sizemin:o1.sizemin,sizemode:o1.sizemode,opacity:o1.opacity,colorbar:o1.colorbar,line:KUt,editType:"calc"});Ez.color.editType=Ez.cmin.editType=Ez.cmax.editType="style";function UBe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:XUt[e],editType:"plot"}}}GBe.exports={dimensions:ZUt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:g5({},kk.text,{}),hovertext:g5({},kk.hovertext,{}),hovertemplate:jUt(),hovertemplatefallback:WUt(),xhoverformat:NBe("x"),yhoverformat:NBe("y"),marker:Ez,xaxes:UBe("x"),yaxes:UBe("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:kk.selected.marker,editType:"calc"},unselected:{marker:kk.unselected.marker,editType:"calc"},opacity:kk.opacity}});var kz=ye((m_r,HBe)=>{"use strict";HBe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var pK=Dr(),JUt=Yd(),jBe=vK(),$Ut=Ru(),QUt=$p(),eVt=kz(),tVt=VF().isOpenSymbol;WBe.exports=function(t,r,n,i){function a(d,v){return pK.coerce(t,r,jBe,d,v)}var o=JUt(t,r,{name:"dimensions",handleItemDefaults:rVt}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=eVt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),QUt(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var f=tVt(r.marker.symbol),h=$Ut.isBubble(r);a("marker.line.width",f||h?1:0),iVt(t,r,i,a),pK.coerceSelectionMarkerOpacity(r,a)};function rVt(e,t){function r(i,a){return pK.coerce(e,t,jBe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function iVt(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;uc&&o||u{"use strict";var ZBe=Dr();YBe.exports=function(t,r){var n=t._fullLayout,i=r.uid,a=n._splomScenes;a||(a=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[i]=ZBe.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||ZBe.extendFlat(l,o),l}});var QBe=ye((x_r,$Be)=>{"use strict";var gK=Dr(),Cz=hf(),nVt=O0().calcMarkerSize,aVt=O0().calcAxisExpansion,oVt=F0(),JBe=J2().markerSelection,sVt=J2().markerStyle,lVt=KBe(),uVt=fs().BADNUM,cVt=ox().TOO_MANY_POINTS;$Be.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function v(E,S){for(var L=E.makeCalcdata({v:S.values,vcalendar:r.calendar},"v"),x=0;xcVt,p;for(b?p=a.sizeAvg||Math.max(a.size,3):p=nVt(r,i),c=0;c{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?Ck.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Ck.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),a=process.uptime()*1e9,i=n-a):Date.now?(Ck.exports=function(){return Date.now()-r},r=Date.now()):(Ck.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(eNe)});var iNe=ye((b_r,Iz)=>{var fVt=tNe(),s1=window,Lz=["moz","webkit"],y5="AnimationFrame",_5=s1["request"+y5],Lk=s1["cancel"+y5]||s1["cancelRequest"+y5];for(m5=0;!_5&&m5{nNe.exports=function(t,r){var n=typeof t=="number",i=typeof r=="number";n&&!i?(r=t,t=0):!n&&!i&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s{"use strict";var hVt=hY(),dVt=Zm(),vVt=X2(),oNe=iNe(),pVt=aNe(),yK=i5(),gVt=Z2();lNe.exports=px;function px(e,t){if(!(this instanceof px))return new px(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=hVt(e),this.canvas=this.scatter.canvas}px.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=oNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,oNe(()=>{this.dirty=!1})),this)};px.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&_{t[a+s]=n})}this.scatter.draw(...t)}return this};px.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function mVt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function Rz(e,t,r){let n,i,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],a=f[2],i=f[1],o=f[3]):f.length?(n=i=f[0],a=o=f[1]):(n=f.x,i=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,i,u,o]}function sNe(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=yK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var fNe=ye((A_r,cNe)=>{"use strict";var yVt=uNe(),_K=Dr(),Dz=hf(),_Vt=Eg().selectMode;cNe.exports=function(t,r,n){if(n.length)for(var i=0;i-1,T=_Vt(c)||!!i.selectedpoints||P,z=!0;if(T){var O=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var V=i.selectedpoints,G={};for(d=0;d{"use strict";hNe.getDimIndex=function(t,r){for(var n=r._id,i=n.charAt(0),a={x:0,y:1}[i],o=t._visibleDims,s=0;s{"use strict";var dNe=xK(),bVt=UF().calcHover,vNe=ho().getFromId,wVt=Ao().extendFlat;function TVt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=pNe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=wVt({},e),f=0;f{"use strict";var bNe=Dr(),yNe=bNe.pushUnique,_Ne=Ru(),xNe=xK();wNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!_Ne.hasMarkers(i)&&!_Ne.hasText(i);if(i.visible!==!0||f)return c;var h=xNe.getDimIndex(i,l),d=xNe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],_=a.ypx[d],b=s[h],p=s[d],k=(t.scene.selectBatch||[]).slice(),E=[];if(r!==!1&&!r.degenerate)for(var S=0;S{"use strict";var ANe=Dr(),AVt=F0(),SVt=J2().markerStyle;SNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){AVt(t,n),ANe.extendFlat(i.matrixOptions,SVt(t,n));var a=ANe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var kNe=ye((C_r,ENe)=>{"use strict";var MVt=qa(),EVt=fV();ENe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:vK(),supplyDefaults:XBe(),colorbar:$d(),calc:QBe(),plot:fNe(),hoverPoints:mNe().hoverPoints,selectPoints:TNe(),editStyle:MNe(),meta:{}};MVt.register(EVt)});var DNe=ye((L_r,RNe)=>{"use strict";var kVt=GY(),CVt=qa(),LVt=Mz(),PVt=Id().getModuleCalcData,gx=ph(),CNe=hf().getFromId,LNe=ho().shouldShowZeroLine,PNe="splom",INe={};function IVt(e){var t=e._fullLayout,r=CVt.getModule(PNe),n=PVt(e.calcdata,r)[0],i=LVt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],INe);i&&(t._hasOnlyLargeSploms&&bK(e),r.plot(e,{},n))}function RVt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&bK(e);for(var n=0;n{"use strict";var FNe=kNe();FNe.basePlotModule=DNe(),zNe.exports=FNe});var BNe=ye((I_r,qNe)=>{"use strict";qNe.exports=ONe()});var AK=ye((R_r,NNe)=>{"use strict";var OVt=Tu(),wK=Rd(),TK=ec(),qVt=Cc().attributes,Fz=Ao().extendFlat,BVt=vl().templatedArray;NNe.exports={domain:qVt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:TK({editType:"plot"}),tickfont:TK({autoShadowDflt:!0,editType:"plot"}),rangefont:TK({editType:"plot"}),dimensions:BVt("dimension",{label:{valType:"string",editType:"plot"},tickvals:Fz({},wK.tickvals,{editType:"plot"}),ticktext:Fz({},wK.ticktext,{editType:"plot"}),tickformat:Fz({},wK.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:Fz({editType:"calc"},OVt("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 Pk=ye((D_r,UNe)=>{"use strict";UNe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var Jm=ye((F_r,GNe)=>{"use strict";var NVt=HS();function VNe(e){return[e]}GNe.exports={keyFun:function(e){return e.key},repeat:VNe,descend:NVt,wrap:VNe,unwrap:function(e){return e[0]}}});var EK=ye((z_r,eUe)=>{"use strict";var bh=Pk(),tm=Oa(),UVt=Jm().keyFun,zz=Jm().repeat,x5=Dr().sorterAsc,VVt=Dr().strTranslate,HNe=bh.bar.snapRatio;function jNe(e,t){return e*(1-HNe)+t*HNe}var WNe=bh.bar.snapClose;function GVt(e,t){return e*(1-WNe)+t*WNe}function qz(e,t,r,n){if(HVt(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;i*c=t[r][0]&&e<=t[r][1])return!0;return!1}function jVt(e){e.attr("x",-bh.bar.captureWidth/2).attr("width",bh.bar.captureWidth)}function WVt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function XVt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=XNe(e.brush.filter.getConsolidated(),e.height),r=[0],n,i,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 ZNe(){tm.select(document.body).style("cursor",null)}function MK(e){e.attr("stroke-dasharray",XVt)}function Oz(e,t){var r=tm.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(bh.bar.snapDuration).each("end",t):r;MK(n)}function YNe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=XNe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=c,isNaN(i)&&(isNaN(f)||isNaN(h)?i=isNaN(f)?h:f:i=t-u[f][1]=k[0]&&p<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function YVt(e,t){tm.event.sourceEvent.stopPropagation();var r=t.height-tm.mouse(e)[1]-2*bh.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=YNe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-bh.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function KNe(e,t){tm.event.sourceEvent.stopPropagation();var r=t.height-tm.mouse(e)[1]-2*bh.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(x5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),Oz(e.parentNode)}function KVt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(JNe(e,t),KNe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=tm.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,ZNe(),!i.wasDragged){i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,i.extent.length===0&&SK(r)):SK(r),i.brushCallback(t),Oz(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||SK(r),i.brushCallback(t),u?Oz(e.parentNode,s):(s(),Oz(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function JNe(e,t){var r=t.height-tm.mouse(e)[1]-2*bh.verticalPadding,n=YNe(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),tm.select(document.body).style("cursor",i)}function JVt(e){e.on("mousemove",function(t){tm.event.preventDefault(),t.parent.inBrushDrag||JNe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||ZNe()}).call(tm.behavior.drag().on("dragstart",function(t){YVt(this,t)}).on("drag",function(t){KNe(this,t)}).on("dragend",function(t){KVt(this,t)}))}function $Ne(e,t){return e[0]-t[0]}function $Vt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(zz);i.enter().append("rect").classed("background",!0).call(jVt).call(WVt).style("pointer-events",n?"none":"auto").attr("transform",VVt(0,bh.verticalPadding)),i.call(JVt).attr("height",function(s){return s.height-bh.verticalPadding});var a=e.selectAll(".highlight-shadow").data(zz);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-bh.bar.width/2).attr("stroke-width",bh.bar.width+bh.bar.strokeWidth).attr("stroke",t).attr("opacity",bh.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(MK);var o=e.selectAll(".highlight").data(zz);o.enter().append("line").classed("highlight",!0).attr("x",-bh.bar.width/2).attr("stroke-width",bh.bar.width-bh.bar.strokeWidth).attr("stroke",bh.bar.fillColor).attr("opacity",bh.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(MK)}function QVt(e,t,r){var n=e.selectAll("."+bh.cn.axisBrush).data(zz,UVt);n.enter().append("g").classed(bh.cn.axisBrush,!0),$Vt(n,t,r)}function eGt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function SK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function tGt(e){return function(r){var n=r.brush,i=eGt(n),a=i.slice();n.filter.set(a),e()}}function QNe(e){for(var t=e.slice(),r=[],n,i=t.shift();i;){for(n=i.slice();(i=t.shift())&&i[0]<=n[1];)n[1]=Math.max(n[1],i[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function rGt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(x5)}).sort($Ne),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=QNe(e),r=e.reduce(function(i,a){return[Math.min(i[0],a[0]),Math.max(i[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function iGt(e,t,r,n,i,a){var o=rGt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:tGt(i),brushEndCallback:a}}}function nGt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(x5)}),t.multiselect?e=QNe(e.sort($Ne)):e=[e[0]]):e=[e.sort(x5)],t.tickvals){var r=t.tickvals.slice().sort(x5);if(e=e.map(function(n){var i=[qz(0,r,n[0],[]),qz(1,r,n[1],[])];if(i[1]>i[0])return i}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}eUe.exports={makeBrush:iGt,ensureAxisBrush:QVt,cleanRanges:nGt}});var iUe=ye((O_r,rUe)=>{"use strict";var mx=Dr(),aGt=pv().hasColorscale,oGt=Qh(),sGt=Cc().defaults,lGt=Yd(),uGt=ho(),tUe=AK(),cGt=EK(),kK=Pk().maxDimensionCount,fGt=kz();function hGt(e,t,r,n,i){var a=i("line.color",r);if(aGt(e,"line")&&mx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),oGt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function dGt(e,t,r,n){function i(u,c){return mx.coerce(e,t,tUe.dimensions,u,c)}var a=i("values"),o=i("visible");if(a&&a.length||(o=t.visible=!1),o){i("label"),i("tickvals"),i("ticktext"),i("tickformat");var s=i("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},uGt.setConvert(t._ax,n.layout),i("multiselect");var l=i("constraintrange");l&&(t.constraintrange=cGt.cleanRanges(l,t))}}rUe.exports=function(t,r,n,i){function a(c,f){return mx.coerce(t,r,tUe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>kK&&(mx.log("parcoords traces support up to "+kK+" dimensions at the moment"),o.splice(kK));var s=lGt(t,r,{name:"dimensions",layout:i,handleItemDefaults:dGt}),l=hGt(t,r,n,i,a);sGt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),fGt(r,s,"values",l);var u=mx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});mx.coerceFont(a,"labelfont",u),mx.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),mx.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var aUe=ye((q_r,nUe)=>{"use strict";var vGt=Dr().isArrayOrTypedArray,CK=tc(),pGt=Jm().wrap;nUe.exports=function(t,r){var n,i;return CK.hasColorscale(r,"line")&&vGt(r.line.color)?(n=r.line.color,i=CK.extractOpts(r.line).colorscale,CK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=gGt(r._length),i=[[0,r.line.color],[1,r.line.color]]),pGt({lineColor:n,cscale:i})};function gGt(e){for(var t=new Array(e),r=0;r>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),LK.default[e])r=LK.default[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(e[0]==="#"){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];i=l.replace(/a$/,"");var u=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=r.shift()),r=r.map(function(h,d){if(h[h.length-1]==="%")return h=parseFloat(h)/100,d===3?h:i==="rgb"?h*255:i[0]==="h"||i[0]==="l"&&!d?h*100:i==="lab"?h*125:i==="lch"?d<2?h*150:h*360:i[0]==="o"&&!d?h:i==="oklab"?h*.4:i==="oklch"?d<2?h*.4:h*360:h;if(i[d]==="h"||d===2&&i[i.length-1]==="h"){if(oUe[h]!==void 0)return oUe[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(""))==null?void 0:f.toLowerCase())||"rgb");return{space:i,values:r,alpha:n}}var LK,sUe,oUe,lUe=gu(()=>{LK=gtt(gX(),1),sUe=mGt,oUe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var Ik,PK=gu(()=>{Ik={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var Bz,uUe=gu(()=>{PK();Bz={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}};Ik.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s,l,u;return a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(i+a)/2,a===i?l=0:u<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,u*100]}});var fUe={};cee(fUe,{default:()=>cUe});function cUe(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,i=sUe(e);if(!i.space)return[];let a=i.space[0]==="h"?Bz.min:Ik.min,o=i.space[0]==="h"?Bz.max:Ik.max;return t=Array(3),t[0]=Math.min(Math.max(i.values[0],a[0]),o[0]),t[1]=Math.min(Math.max(i.values[1],a[1]),o[1]),t[2]=Math.min(Math.max(i.values[2],a[2]),o[2]),i.space[0]==="h"&&(t=Bz.rgb(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}var hUe=gu(()=>{lUe();PK();uUe()});var IK=ye(Nz=>{"use strict";var yGt=Dr().isTypedArray;Nz.convertTypedArray=function(e){return yGt(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 wUe=ye((X_r,bUe)=>{"use strict";var _Gt=["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(` `),xGt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),Rk=Pk().maxDimensionCount,yUe=Dr(),dUe=1e-6,Uz=2048,bGt=new Uint8Array(4),vUe=new Uint8Array(4),pUe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function wGt(e){e.read({x:0,y:0,width:1,height:1,data:bGt})}function _Ue(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function TGt(e,t,r,n,i,a){var o=a.key;function s(l){var u=Math.min(n,i-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],_Ue(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*n,t(a),l*n+u>>8*t)%256/255}function MGt(e,t,r){for(var n=new Array(e*(Rk+4)),i=0,a=0;aZ&&(Z=M[z].dim1.canvasX,V=z);T===0&&_Ue(i,0,0,u.canvasWidth,u.canvasHeight);var j=E(r);for(z=0;z{"use strict";var Bd=Oa(),l1=Dr(),DK=l1.isArrayOrTypedArray,kUe=l1.numberFormat,CUe=(hUe(),ob(fUe)).default,LUe=ho(),PGt=l1.strRotate,$m=l1.strTranslate,IGt=ru(),Vz=So(),TUe=tc(),OK=Jm(),tg=OK.keyFun,Qm=OK.repeat,PUe=OK.unwrap,b5=IK(),Dl=Pk(),IUe=EK(),RGt=wUe();function AUe(e,t,r){return l1.aggNums(e,null,t,r)}function RUe(e,t){return qK(AUe(Math.min,e,t),AUe(Math.max,e,t))}function Gz(e){var t=e.range;return t?qK(t[0],t[1]):RUe(e.values,e._length)}function qK(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 DGt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function FGt(e,t,r,n,i){var a=Gz(r);return n?Bd.scale.ordinal().domain(n.map(DGt(kUe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Bd.scale.linear().domain(a).range([e-t,t])}function zGt(e,t){return Bd.scale.linear().range([t,e-t])}function OGt(e,t){return Bd.scale.linear().domain(Gz(e)).range([t,1-t])}function qGt(e){if(e.tickvals){var t=Gz(e);return Bd.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function BGt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=CUe(a[1]);return Bd.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return Bd.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function zK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function NGt(e,t,r){var n=PUe(t),i=n.trace,a=b5.convertTypedArray(n.lineColor),o=i.line,s={color:CUe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=TUe.extractOpts(o),u=l.reversescale?TUe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,_=i.labelfont,b=i.tickfont,p=i.rangefont,k=l1.extendDeepNoArrays({},o,{color:a.map(Bd.scale.linear().domain(Gz({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:Dl.blockLineCount,canvasOverdrag:Dl.overdrag*Dl.canvasPixelRatio}),E=Math.floor(h*(c.x[1]-c.x[0])),S=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},x=E,C=S;return{key:r,colCount:f.filter(b5.isVisible).length,dimensions:f,tickDistance:Dl.tickDistance,unitToColor:BGt(u),lines:k,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:_,tickFont:b,rangeFont:p,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:x*Dl.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Dl.canvasPixelRatio,width:x,height:C,canvasPixelRatio:Dl.canvasPixelRatio}}function UGt(e,t,r){var n=r.width,i=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Dl.verticalPadding/i,u=zGt(i,Dl.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(b5.isVisible).map(function(h,d){var v=OGt(h,l),_=f[h.label];f[h.label]=(_||0)+1;var b=h.label+(_?"__"+_:""),p=h.constraintrange,k=p&&p.length;k&&!DK(p[0])&&(p=[p]);var E=k?p.map(function(O){return O.map(v)}):[[-1/0,1/0]],S=function(){var O=c;O.focusLayer&&O.focusLayer.render(O.panels,!0);var V=zK(O);!e.contextShown()&&V?(O.contextLayer&&O.contextLayer.render(O.panels,!0),e.contextShown(!0)):e.contextShown()&&!V&&(O.contextLayer&&O.contextLayer.render(O.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var x=h.tickvals,C;function M(O,V){return{val:O,text:C[V]}}function g(O,V){return O.val-V.val}if(DK(x)&&x.length){l1.isTypedArray(x)&&(x=Array.from(x)),C=h.ticktext,!DK(C)||!C.length?C=x.map(kUe(h.tickformat)):C.length>x.length?C=C.slice(0,x.length):x.length>C.length&&(x=x.slice(0,C.length));for(var P=1;P=V||N>=G)return;var H=z.lineLayer.readPixel(j,G-1-N),te=H[3]!==0,oe=te?H[2]+256*(H[1]+256*H[0]):null,_e={x:j,y:N,clientX:O.clientX,clientY:O.clientY,dataIndex:z.model.key,curveNumber:oe};oe!==v&&(te?i.hover(_e):i.unhover&&i.unhover(_e),v=oe)}}),d.style("opacity",function(z){return z.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Dl.cn.parcoords).data(h,tg);b.exit().remove(),b.enter().append("g").classed(Dl.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(z){return $m(z.model.translateX,z.model.translateY)});var p=b.selectAll("."+Dl.cn.parcoordsControlView).data(Qm,tg);p.enter().append("g").classed(Dl.cn.parcoordsControlView,!0),p.attr("transform",function(z){return $m(z.model.pad.l,z.model.pad.t)});var k=p.selectAll("."+Dl.cn.yAxis).data(function(z){return z.dimensions},tg);k.enter().append("g").classed(Dl.cn.yAxis,!0),p.each(function(z){FK(k,z,u)}),d.each(function(z){if(z.viewModel){!z.lineLayer||i?z.lineLayer=RGt(this,z):z.lineLayer.update(z),(z.key||z.key===0)&&(z.viewModel[z.key]=z.lineLayer);var O=!z.context||i;z.lineLayer.render(z.viewModel.panels,O)}}),k.attr("transform",function(z){return $m(z.xScale(z.xIndex),0)}),k.call(Bd.behavior.drag().origin(function(z){return z}).on("drag",function(z){var O=z.parent;f.linePickActive(!1),z.x=Math.max(-Dl.overdrag,Math.min(z.model.width+Dl.overdrag,Bd.event.x)),z.canvasX=z.x*z.model.canvasPixelRatio,k.sort(function(V,G){return V.x-G.x}).each(function(V,G){V.xIndex=G,V.x=z===V?V.x:V.xScale(V.xIndex),V.canvasX=V.x*V.model.canvasPixelRatio}),FK(k,O,u),k.filter(function(V){return Math.abs(z.xIndex-V.xIndex)!==0}).attr("transform",function(V){return $m(V.xScale(V.xIndex),0)}),Bd.select(this).attr("transform",$m(z.x,0)),k.each(function(V,G,Z){Z===z.parent.key&&(O.dimensions[G]=V)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!zK(O)),O.focusLayer.render&&O.focusLayer.render(O.panels)}).on("dragend",function(z){var O=z.parent;z.x=z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio,FK(k,O,u),Bd.select(this).attr("transform",function(V){return $m(V.x,0)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!zK(O)),O.focusLayer&&O.focusLayer.render(O.panels),O.pickLayer&&O.pickLayer.render(O.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(O.key,O.dimensions.map(function(V){return V.crossfilterDimensionIndex}))})),k.exit().remove();var E=k.selectAll("."+Dl.cn.axisOverlays).data(Qm,tg);E.enter().append("g").classed(Dl.cn.axisOverlays,!0),E.selectAll("."+Dl.cn.axis).remove();var S=E.selectAll("."+Dl.cn.axis).data(Qm,tg);S.enter().append("g").classed(Dl.cn.axis,!0),S.each(function(z){var O=z.model.height/z.model.tickDistance,V=z.domainScale,G=V.domain();Bd.select(this).call(Bd.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(O,z.tickFormat).tickValues(z.ordinal?G:null).tickFormat(function(Z){return b5.isOrdinal(z)?Z:DUe(z.model.dimensions[z.visibleIndex],Z)}).scale(V)),Vz.font(S.selectAll("text"),z.model.tickFont)}),S.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),S.selectAll("text").style("cursor","default");var L=E.selectAll("."+Dl.cn.axisHeading).data(Qm,tg);L.enter().append("g").classed(Dl.cn.axisHeading,!0);var x=L.selectAll("."+Dl.cn.axisTitle).data(Qm,tg);x.enter().append("text").classed(Dl.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(z){return z.label}).each(function(z){var O=Bd.select(this);Vz.font(O,z.model.labelFont),IGt.convertToTspans(O,t)}).attr("transform",function(z){var O=MUe(z.model.labelAngle,z.model.labelSide),V=Dl.axisTitleOffset;return(O.dir>0?"":$m(0,2*V+z.model.height))+PGt(O.degrees)+$m(-V*O.dx,-V*O.dy)}).attr("text-anchor",function(z){var O=MUe(z.model.labelAngle,z.model.labelSide),V=Math.abs(O.dx),G=Math.abs(O.dy);return 2*V>G?O.dir*O.dx<0?"start":"end":"middle"});var C=E.selectAll("."+Dl.cn.axisExtent).data(Qm,tg);C.enter().append("g").classed(Dl.cn.axisExtent,!0);var M=C.selectAll("."+Dl.cn.axisExtentTop).data(Qm,tg);M.enter().append("g").classed(Dl.cn.axisExtentTop,!0),M.attr("transform",$m(0,-Dl.axisExtentOffset));var g=M.selectAll("."+Dl.cn.axisExtentTopText).data(Qm,tg);g.enter().append("text").classed(Dl.cn.axisExtentTopText,!0).call(SUe),g.text(function(z){return EUe(z,!0)}).each(function(z){Vz.font(Bd.select(this),z.model.rangeFont)});var P=C.selectAll("."+Dl.cn.axisExtentBottom).data(Qm,tg);P.enter().append("g").classed(Dl.cn.axisExtentBottom,!0),P.attr("transform",function(z){return $m(0,z.model.height+Dl.axisExtentOffset)});var T=P.selectAll("."+Dl.cn.axisExtentBottomText).data(Qm,tg);T.enter().append("text").classed(Dl.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(SUe),T.text(function(z){return EUe(z,!1)}).each(function(z){Vz.font(Bd.select(this),z.model.rangeFont)}),IUe.ensureAxisBrush(E,c,t)}});var NK=ye((BK,NUe)=>{"use strict";var HGt=zUe(),jGt=Mz(),OUe=IK().isVisible,BUe={};function qUe(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function WGt(e,t){return function(n,i){return qUe(e,t,n)-qUe(e,t,i)}}var BK=NUe.exports=function(t,r){var n=t._fullLayout,i=jGt(t,[],BUe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,_){var b=v[0].trace;s[_]=b.index;var p=l[_]=b.index;a[_]=t.data[p].dimensions,o[_]=t.data[p].dimensions.slice()});var c=function(v,_,b){var p=o[v][_],k=b.map(function(M){return M.slice()}),E="dimensions["+_+"].constraintrange",S=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(S[E]===void 0){var L=p.constraintrange;S[E]=L||null}var x=t._fullData[s[v]].dimensions[_];k.length?(k.length===1&&(k=k[0]),p.constraintrange=k,x.constraintrange=k.slice(),k=[k]):(delete p.constraintrange,delete x.constraintrange,k=null);var C={};C[E]=k,t.emit("plotly_restyle",[C,[l[v]]])},f=function(v){t.emit("plotly_hover",v)},h=function(v){t.emit("plotly_unhover",v)},d=function(v,_){var b=WGt(_,o[v].filter(OUe));a[v].sort(b),o[v].filter(function(p){return!OUe(p)}).sort(function(p){return o[v].indexOf(p)}).forEach(function(p){a[v].splice(a[v].indexOf(p),1),a[v].splice(o[v].indexOf(p),0,p)}),t.emit("plotly_restyle",[{dimensions:[a[v]]},[l[v]]])};HGt(t,r,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:c,hover:f,unhover:h,axesMoved:d})}};BK.reglPrecompiled=BUe});var VUe=ye(Dk=>{"use strict";var UUe=Oa(),XGt=Id().getModuleCalcData,ZGt=NK(),YGt=Wp();Dk.name="parcoords";Dk.plot=function(e){var t=XGt(e.calcdata,"parcoords")[0];t.length&&ZGt(e,t)};Dk.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};Dk.toSVG=function(e){var t=e._fullLayout._glimages,r=UUe.select(e).selectAll(".svg-container"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:YGt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){UUe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var HUe=ye((K_r,GUe)=>{"use strict";GUe.exports={attributes:AK(),supplyDefaults:iUe(),calc:aUe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:VUe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var XUe=ye((J_r,WUe)=>{"use strict";var jUe=HUe();jUe.plot=NK();WUe.exports=jUe});var YUe=ye(($_r,ZUe)=>{"use strict";ZUe.exports=XUe()});var UK=ye((Q_r,eVe)=>{"use strict";var JUe=Ao().extendFlat,KGt=Gl(),KUe=ec(),JGt=Tu(),{hovertemplateAttrs:$Ue,templatefallbackAttrs:QUe}=Ll(),$Gt=Cc().attributes,QGt=JUe({editType:"calc"},JGt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:$Ue({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:QUe({editType:"plot"})});eVe.exports={domain:$Gt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:JUe({},KGt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:$Ue({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:QUe({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:KUe({editType:"calc"}),tickfont:KUe({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:QGt,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 iVe=ye((exr,rVe)=>{"use strict";var w5=Dr(),eHt=pv().hasColorscale,tHt=Qh(),rHt=Cc().defaults,iHt=Yd(),tVe=UK(),nHt=kz(),aHt=vv().isTypedArraySpec;function oHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate"),i("line.hovertemplatefallback");var a=i("line.color",n.colorway[0]);if(eHt(e,"line")&&w5.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),tHt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function sHt(e,t){function r(u,c){return w5.coerce(e,t,tVe.dimensions,u,c)}var n=r("values"),i=r("visible");if(n&&n.length||(i=t.visible=!1),i){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=w5.isArrayOrTypedArray(a)&&a.length>0||aHt(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")}}rVe.exports=function(t,r,n,i){function a(u,c){return w5.coerce(t,r,tVe,u,c)}var o=iHt(t,r,{name:"dimensions",handleItemDefaults:sHt}),s=oHt(t,r,n,i,a);rHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),nHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=i.font;w5.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),w5.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var aVe=ye((txr,nVe)=>{"use strict";var lHt=Jm().wrap,uHt=pv().hasColorscale,cHt=gv(),fHt=JO(),hHt=So(),Fk=Dr(),dHt=Eo();nVe.exports=function(t,r){var n=Fk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(g){var P;if(g.categoryorder==="trace")P=null;else if(g.categoryorder==="array")P=g.categoryarray;else{P=fHt(g.values);for(var T=!0,z=0;z=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var vVe=ye((rxr,dVe)=>{"use strict";var Fl=Oa(),AHt=(F2(),ob(D2)).interpolateNumber,SHt=HP(),qk=vf(),yx=Dr(),zk=yx.strTranslate,oVe=So(),VK=cd(),MHt=ru();function EHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(VHt.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",i?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,u1),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(k){return zk(k.x,k.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(k){return k.paths},u1);c.attr("fill",function(k){return k.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(k){return k.model.color}).attr("fill-opacity",0);jK(f),c.attr("d",function(k){return k.svgD}),f.empty()||c.sort(GK),c.exit().remove(),c.on("mouseover",kHt).on("mouseout",CHt).on("click",LHt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(k){return k.dimensions},u1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(k){return zk(k.x,0)}),d.exit().remove();var v=d.selectAll("g.category").data(function(k){return k.categories},u1),_=v.enter().append("g").attr("class","category");v.attr("transform",function(k){return zk(0,k.y)}),_.append("rect").attr("class","catrect").attr("pointer-events","none"),v.select("rect.catrect").attr("fill","none").attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),lVe(_);var b=v.selectAll("rect.bandrect").data(function(k){return k.bands},u1);b.each(function(){yx.raiseToTop(this)}),b.attr("fill",function(k){return k.color});var p=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(k){return k.color}).attr("fill-opacity",0);b.attr("fill",function(k){return k.color}).attr("width",function(k){return k.width}).attr("height",function(k){return k.height}).attr("y",function(k){return k.y}).attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":k.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),XK(p),b.exit().remove(),_.append("text").attr("class","catlabel").attr("pointer-events","none"),v.select("text.catlabel").attr("text-anchor",function(k){return Ok(k)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(k){return Ok(k)?k.width+5:-5}).attr("y",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){oVe.font(Fl.select(this),k.parcatsViewModel.categorylabelfont),MHt.convertToTspans(Fl.select(this),t)}),_.append("text").attr("class","dimlabel"),v.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(k){return k.width/2}).attr("y",-5).text(function(k,E){return E===0?k.parcatsViewModel.model.dimensions[k.model.dimensionInd].dimensionLabel:null}).each(function(k){oVe.font(Fl.select(this),k.parcatsViewModel.labelfont)}),v.selectAll("rect.bandrect").on("mouseover",OHt).on("mouseout",qHt),v.exit().remove(),d.call(Fl.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on("dragstart",BHt).on("drag",NHt).on("dragend",UHt)),s.each(function(k){k.traceSelection=Fl.select(this),k.pathSelection=Fl.select(this).selectAll("g.paths").selectAll("path.path"),k.dimensionSelection=Fl.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}dVe.exports=function(e,t,r,n){EHt(r,e,n,t)};function u1(e){return e.key}function Ok(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function GK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),x=Fl.mouse(i)[0];qk.loneHover({trace:a,x:v-s.left+l.left,y:_-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:x1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var v=s.model.count,_=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,p={countLabel:v,categoryLabel:_,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&k.push(["Count:",p.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&k.push(["P("+p.categoryLabel+"):",p.probabilityLabel].join(" "));var E=k.join("
");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:E,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:p,eventData:[{data:c._input,fullData:c,count:v,category:_,probability:b}]}}function FHt(e,t,r){var n=[];return Fl.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(uVe(e,t,i))}),n}function zHt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Fl.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var v=s.model.categoryLabel,_=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var p=s.model.count,k=0;l.pathSelection.each(function(P){P.model.color===o.color&&(k+=P.model.count)});var E=b/_,S=b/k,L=b/p,x={countLabel:b,categoryLabel:v,probabilityLabel:E.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+v+"): "+x.probabilityLabel),C.push("P("+v+" | color): "+S.toFixed(3)),C.push("P(color | "+v+"): "+L.toFixed(3)));var M=C.join("
"),g=VK.mostReadable(o.color,["black","white"]);return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:M,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:g,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:v,count:_,probability:E,categorycount:p,colorcount:k,bandcolorcount:b}]}}function OHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Fl.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,i=n._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?(DHt(o),YK(o,"plotly_hover",Fl.event)):(RHt(o),ZK(o,"plotly_hover",Fl.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=uVe(r,i,o):a==="color"?s=zHt(r,i,o):a==="dimension"&&(s=FHt(r,i,o)),s&&qk.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function qHt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(jK(t.pathSelection),lVe(t.dimensionSelection.selectAll("g.category")),XK(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),qk.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(GK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?YK(n,"plotly_unhover",Fl.event):ZK(n,"plotly_unhover",Fl.event)}}function BHt(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Fl.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Fl.mouse(this)[0],n=Fl.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(i){return i.displayInd}),t.model.dragY=t.y,yx.raiseToTop(this.parentNode),Fl.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.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"){i.model.dragX=Fl.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}JK(e.parcatsViewModel),KK(e.parcatsViewModel),hVe(e.parcatsViewModel),fVe(e.parcatsViewModel)}}function UHt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Fl.select(this).selectAll("text").attr("font-weight","normal");var t={},r=cVe(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),i=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==n[d]});i&&n.forEach(function(h,d){var v=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+v+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?YK(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent):ZK(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,JK(e.parcatsViewModel),KK(e.parcatsViewModel);var f=Fl.transition().duration(300).ease("cubic-in-out");f.each(function(){hVe(e.parcatsViewModel,!0),fVe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&SHt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function cVe(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+a[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function KK(e){var t=e.dimensions,r=e.model,n=t.map(function(O){return O.categories.map(function(V){return V.y})}),i=e.model.dimensions.map(function(O){return O.categories.map(function(V){return V.displayInd})}),a=e.model.dimensions.map(function(O){return O.displayInd}),o=e.dimensions.map(function(O){return O.model.dimensionInd}),s=t.map(function(O){return O.x}),l=t.map(function(O){return O.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(O){var V=O.categoryInds.map(function(Z,j){return i[j][Z]}),G=o.map(function(Z){return V[Z]});return G}u.sort(function(O,V){var G=f(O),Z=f(V);return e.sortpaths==="backward"&&(G.reverse(),Z.reverse()),G.push(O.valueInds[0]),Z.push(V.valueInds[0]),e.bundlecolors&&(G.unshift(O.rawColor),Z.unshift(V.rawColor)),GZ?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(O){return O.height}).reduce(function(O,V){return O+V}),_=0;_0?p=v*(b.count/d):p=0;for(var k=new Array(n.length),E=0;E1?o=(e.width-2*r-n)/(i-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,v=e.height-h*(c-1),_,b,p,k,E,S=(c-f)*h/2,L=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(L.sort(function(x,C){return x.displayInd-C.displayInd}),E=0;E0?_=b.count/d*v:_=0,p={key:b.valueInds[0],model:b,width:n,height:_,y:b.dragY!==null?b.dragY:S,bands:[],parcatsViewModel:e},S=S+_+h,u.push(p);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var $K=ye((ixr,pVe)=>{"use strict";var HHt=vVe();pVe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;HHt(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}});var mVe=ye(jz=>{"use strict";var jHt=Id().getModuleCalcData,WHt=$K(),gVe="parcats";jz.name=gVe;jz.plot=function(e,t,r,n){var i=jHt(e.calcdata,gVe);if(i.length){var a=i[0];WHt(e,a,r,n)}};jz.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}});var _Ve=ye((axr,yVe)=>{"use strict";yVe.exports={attributes:UK(),supplyDefaults:iVe(),calc:aVe(),plot:$K(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:mVe(),categories:["noOpacity"],meta:{}}});var bVe=ye((oxr,xVe)=>{"use strict";xVe.exports=_Ve()});var c1=ye((sxr,kVe)=>{"use strict";var XHt=Z1(),wVe="1.13.4",MVe='\xA9 OpenStreetMap contributors',TVe=['\xA9 Carto',MVe].join(" "),AVe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),ZHt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),EVe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:MVe,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:TVe,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:TVe,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:AVe,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:AVe,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:ZHt,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},SVe=XHt(EVe);kVe.exports={requiredVersion:wVe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:EVe,styleValuesNonMapbox:SVe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+wVe+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",SVe.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` `),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}});var Nk=ye((lxr,IVe)=>{"use strict";var CVe=Dr(),LVe=ka().defaultLine,YHt=Cc().attributes,KHt=ec(),JHt=pf().textposition,$Ht=mc().overrideAll,QHt=vl().templatedArray,QK=c1(),PVe=KHt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});PVe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var ejt=IVe.exports=$Ht({_arrayAttrRegexps:[CVe.counterRegex("mapbox",".layers",!0)],domain:YHt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:QK.styleValuesMapbox.concat(QK.styleValuesNonMapbox),dflt:QK.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:QHt("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:LVe},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:LVe}},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:PVe,textposition:CVe.extendFlat({},JHt,{arrayOk:!1})}})},"plot","from-root");ejt.uirevision={valType:"any",editType:"none"}});var Wz=ye((uxr,zVe)=>{"use strict";var{hovertemplateAttrs:tjt,texttemplateAttrs:rjt,templatefallbackAttrs:RVe}=Ll(),ijt=Cg(),Uk=j2(),T5=pf(),DVe=Nk(),njt=Gl(),ajt=Tu(),rw=Ao().extendFlat,ojt=mc().overrideAll,sjt=Nk(),FVe=Uk.line,A5=Uk.marker;zVe.exports=ojt({lon:Uk.lon,lat:Uk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:rw({},sjt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:rw({},A5.opacity,{dflt:1})},mode:rw({},T5.mode,{dflt:"markers"}),text:rw({},T5.text,{}),texttemplate:rjt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:RVe({editType:"plot"}),hovertext:rw({},T5.hovertext,{}),line:{color:FVe.color,width:FVe.width},connectgaps:T5.connectgaps,marker:rw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:A5.opacity,size:A5.size,sizeref:A5.sizeref,sizemin:A5.sizemin,sizemode:A5.sizemode},ajt("marker")),fill:Uk.fill,fillcolor:ijt(),textfont:DVe.layers.symbol.textfont,textposition:DVe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:T5.selected.marker},unselected:{marker:T5.unselected.marker},hoverinfo:rw({},njt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:tjt(),hovertemplatefallback:RVe()},"calc","nested")});var eJ=ye((cxr,OVe)=>{"use strict";var ljt=["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"];OVe.exports={isSupportedFont:function(e){return ljt.indexOf(e)!==-1}}});var NVe=ye((fxr,BVe)=>{"use strict";var Vk=Dr(),tJ=Ru(),ujt=$p(),cjt=R0(),fjt=D0(),hjt=Rg(),qVe=Wz(),djt=eJ().isSupportedFont;BVe.exports=function(t,r,n,i){function a(p,k){return Vk.coerce(t,r,qVe,p,k)}function o(p,k){return Vk.coerce2(t,r,qVe,p,k)}var s=vjt(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"),tJ.hasMarkers(r)){ujt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Vk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Vk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}tJ.hasLines(r)&&(cjt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,_=a("cluster.enabled",v);if(_||tJ.hasText(r)){var b=i.font.family;fjt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:djt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&hjt(t,r,n,a),Vk.coerceSelectionMarkerOpacity(r,a)};function vjt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var rJ=ye((hxr,VVe)=>{"use strict";var UVe=ho();VVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=UVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=UVe.tickText(o,o.c2l(s[1]),!0).text,i}});var iJ=ye((dxr,HVe)=>{"use strict";var GVe=Dr();HVe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=GVe.isArrayOrTypedArray(r)?GVe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var KVe=ye((vxr,YVe)=>{"use strict";var XVe=Eo(),av=Dr(),pjt=fs().BADNUM,Zz=tx(),jVe=tc(),gjt=So(),mjt=k3(),Yz=Ru(),yjt=eJ().isSupportedFont,_jt=iJ(),xjt=ip().appendArrayPointValue,bjt=ru().NEWLINES,wjt=ru().BR_TAG_ALL;YVe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=Yz.hasLines(n),s=Yz.hasMarkers(n),l=Yz.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=Xz("fill"),d=Xz("line"),v=Xz("circle"),_=Xz("symbol"),b={fill:h,line:d,circle:v,symbol:_};if(!i)return b;var p;if((a||o)&&(p=Zz.calcTraceToLineCoords(r)),a&&(h.geojson=Zz.makePolygon(p),h.layout.visibility="visible",av.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=Zz.makeLine(p),d.layout.visibility="visible",av.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=Tjt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":aJ(n.cluster.color,n.cluster.step),"circle-radius":aJ(n.cluster.size,n.cluster.step),"circle-opacity":aJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":WVe(n),"text-size":12}}),av.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(_.geojson=Ajt(r,t),av.extendFlat(_.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(av.extendFlat(_.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&av.extendFlat(_.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),_.layout["icon-allow-overlap"]=n.marker.allowoverlap,av.extendFlat(_.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var E=(n.marker||{}).size,S=_jt(n.textposition,E);av.extendFlat(_.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":WVe(n)}),av.extendFlat(_.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function Xz(e){return{type:e,geojson:Zz.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Tjt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=av.isArrayOrTypedArray(r.color),a=av.isArrayOrTypedArray(r.size),o=av.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&(jVe.hasColorscale(t,"marker")?c=jVe.makeColorScaleFuncFromTrace(r):c=av.identity);var f;a&&(f=mjt(t));var h;o&&(h=function(E){var S=XVe(E)?+av.constrain(E,0,1):0;return l(S)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),yjt(s)||(s=r);var l=s.split(", ");return l}});var eGe=ye((pxr,QVe)=>{"use strict";var Sjt=Dr(),JVe=KVe(),S5=c1().traceLayerPrefix,rg={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function $Ve(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:S5+t+"-fill",line:S5+t+"-line",circle:S5+t+"-circle",symbol:S5+t+"-symbol",cluster:S5+t+"-cluster",clusterCount:S5+t+"-cluster-count"},this.below=null}var Gk=$Ve.prototype;Gk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&Sjt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};Gk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Gk.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=S[L];i.removeLayer(u.layerIds[x])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var S=rg.nonCluster,L=0;L=0;L--){var x=S[L];i.removeLayer(u.layerIds[x]),E||i.removeSource(u.sourceIds[x])}}function v(E){l?f(E):d(E)}function _(E){s?c(E):h(E)}function b(){for(var E=s?rg.cluster:rg.nonCluster,S=0;S=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};QVe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new $Ve(t,n.uid,i,a),s=JVe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Mjt=vf(),oJ=Dr(),Ejt=cT(),kjt=oJ.fillText,Cjt=fs().BADNUM,Ljt=c1().traceLayerPrefix;function Pjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=Ljt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function _(M){var g=M.lonlat;if(g[0]===Cjt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=oJ.modHalf(g[0],360),T=g[1],z=s.project([P,T]),O=z.x-a.c2p([v,T]),V=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+V*V)-G,1-3/G)}if(Mjt.getClosest(n,_,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[oJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(k),S=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=S-L,e.y1=S+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=Ejt(i,b),e.extraText=tGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function tGe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&kjt(t,e,u),u.join("
")}rGe.exports={hoverPoints:Pjt,getExtraText:tGe}});var nGe=ye((mxr,iGe)=>{"use strict";iGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var oGe=ye((yxr,aGe)=>{"use strict";var Ijt=Dr(),Rjt=Ru(),Djt=fs().BADNUM;aGe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!Rjt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof sJ=="object"&&typeof lJ!="undefined"?lJ.exports=t():(e=e||self,e.mapboxgl=t())})(sJ,function(){"use strict";var e,t,r;function n(i,a){if(!e)e=a;else if(!t)t=a;else{var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",s={};e(s),r=a(s),typeof window!="undefined"&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}}return n(["exports"],function(i){"use strict";function a(m,y){return y={exports:{}},m(y,y.exports),y.exports}var o="1.13.4",s=l;function l(m,y,I,U){this.cx=3*m,this.bx=3*(I-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*y,this.by=3*(U-y)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=U,this.p2x=I,this.p2y=U}l.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},l.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},l.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},l.prototype.solveCurveX=function(m,y){typeof y=="undefined"&&(y=1e-6);var I,U,$,ae,he;for($=m,he=0;he<8;he++){if(ae=this.sampleCurveX($)-m,Math.abs(ae)U)return U;for(;Iae?I=$:U=$,$=(U-I)*.5+I}return $},l.prototype.solve=function(m,y){return this.sampleCurveY(this.solveCurveX(m,y))};var u=c;function c(m,y){this.x=m,this.y=y}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,y){return this.clone()._rotateAround(m,y)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var y=m.x-this.x,I=m.y-this.y;return y*y+I*I},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,y){return Math.atan2(this.x*y-this.y*m,this.x*m+this.y*y)},_matMult:function(m){var y=m[0]*this.x+m[1]*this.y,I=m[2]*this.x+m[3]*this.y;return this.x=y,this.y=I,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var y=Math.cos(m),I=Math.sin(m),U=y*this.x-I*this.y,$=I*this.x+y*this.y;return this.x=U,this.y=$,this},_rotateAround:function(m,y){var I=Math.cos(m),U=Math.sin(m),$=y.x+I*(this.x-y.x)-U*(this.y-y.y),ae=y.y+U*(this.x-y.x)+I*(this.y-y.y);return this.x=$,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(m){return m instanceof c?m:Array.isArray(m)?new c(m[0],m[1]):m};var f=typeof self!="undefined"?self:{};function h(m,y){if(Array.isArray(m)){if(!Array.isArray(y)||m.length!==y.length)return!1;for(var I=0;I=1)return 1;var y=m*m,I=y*m;return 4*(m<.5?I:3*(m-y)+I-.75)}function _(m,y,I,U){var $=new s(m,y,I,U);return function(ae){return $.solve(ae)}}var b=_(.25,.1,.25,1);function p(m,y,I){return Math.min(I,Math.max(y,m))}function k(m,y,I){var U=I-y,$=((m-y)%U+U)%U+y;return $===y?I:$}function E(m,y,I){if(!m.length)return I(null,[]);var U=m.length,$=new Array(m.length),ae=null;m.forEach(function(he,Oe){y(he,function(rt,gt){rt&&(ae=rt),$[Oe]=gt,--U===0&&I(ae,$)})})}function S(m){var y=[];for(var I in m)y.push(m[I]);return y}function L(m,y){var I=[];for(var U in m)U in y||I.push(U);return I}function x(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,$=y;U<$.length;U+=1){var ae=$[U];for(var he in ae)m[he]=ae[he]}return m}function C(m,y){for(var I={},U=0;U>y/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function T(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function z(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,y){m.forEach(function(I){y[I]&&(y[I]=y[I].bind(y))})}function V(m,y){return m.indexOf(y,m.length-y.length)!==-1}function G(m,y,I){var U={};for(var $ in m)U[$]=y.call(I||this,m[$],$,m);return U}function Z(m,y,I){var U={};for(var $ in m)y.call(I||this,m[$],$,m)&&(U[$]=m[$]);return U}function j(m){return Array.isArray(m)?m.map(j):typeof m=="object"&&m?G(m,j):m}function N(m,y){for(var I=0;I=0)return!0;return!1}var H={};function te(m){H[m]||(typeof console!="undefined"&&console.warn(m),H[m]=!0)}function oe(m,y,I){return(I.y-m.y)*(y.x-m.x)>(y.y-m.y)*(I.x-m.x)}function _e(m){for(var y=0,I=0,U=m.length,$=U-1,ae=void 0,he=void 0;I@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,I={};if(m.replace(y,function($,ae,he,Oe){var rt=he||Oe;return I[ae]=rt?rt.toLowerCase():!0,""}),I["max-age"]){var U=parseInt(I["max-age"],10);isNaN(U)?delete I["max-age"]:I["max-age"]=U}return I}var ie=null;function Se(m){if(ie==null){var y=m.navigator?m.navigator.userAgent:null;ie=!!m.safari||!!(y&&(/\b(iPad|iPhone|iPod)\b/.test(y)||y.match("Safari")&&!y.match("Chrome")))}return ie}function Le(m){try{var y=f[m];return y.setItem("_mapbox_test_",1),y.removeItem("_mapbox_test_"),!0}catch(I){return!1}}function Ae(m){return f.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(y,I){return String.fromCharCode(+("0x"+I))}))}function Fe(m){return decodeURIComponent(f.atob(m).split("").map(function(y){return"%"+("00"+y.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Pe=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),ge=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,Re=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,Ze,ut={now:Pe,frame:function(y){var I=ge(y);return{cancel:function(){return Re(I)}}},getImageData:function(y,I){I===void 0&&(I=0);var U=f.document.createElement("canvas"),$=U.getContext("2d");if(!$)throw new Error("failed to create canvas 2d context");return U.width=y.width,U.height=y.height,$.drawImage(y,0,0,y.width,y.height),$.getImageData(-I,-I,y.width+2*I,y.height+2*I)},resolveURL:function(y){return ce||(ce=f.document.createElement("a")),ce.href=y,ce.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return f.matchMedia?(Ze==null&&(Ze=f.matchMedia("(prefers-reduced-motion: reduce)")),Ze.matches):!1}},pt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Zt={supported:!1,testSupport:Jt},st,lt=!1,Gt,Nt=!1;f.document&&(Gt=f.document.createElement("img"),Gt.onload=function(){st&&sr(st),st=null,Nt=!0},Gt.onerror=function(){lt=!0,st=null},Gt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Jt(m){lt||!Gt||(Nt?sr(m):st=m)}function sr(m){var y=m.createTexture();m.bindTexture(m.TEXTURE_2D,y);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,Gt),m.isContextLost())return;Zt.supported=!0}catch(I){}m.deleteTexture(y),lt=!0}var wr="01";function cr(){for(var m="1",y="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="",U=0;U<10;U++)I+=y[Math.floor(Math.random()*62)];var $=12*60*60*1e3,ae=[m,wr,I].join(""),he=Date.now()+$;return{token:ae,tokenExpiresAt:he}}var $e=function(y,I){this._transformRequestFn=y,this._customAccessToken=I,this._createSkuToken()};$e.prototype._createSkuToken=function(){var y=cr();this._skuToken=y.token,this._skuTokenExpiresAt=y.tokenExpiresAt},$e.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},$e.prototype.transformRequest=function(y,I){return this._transformRequestFn?this._transformRequestFn(y,I)||{url:y}:{url:y}},$e.prototype.normalizeStyleURL=function(y,I){if(!St(y))return y;var U=er(y);return U.path="/styles/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},$e.prototype.normalizeGlyphsURL=function(y,I){if(!St(y))return y;var U=er(y);return U.path="/fonts/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},$e.prototype.normalizeSourceURL=function(y,I){if(!St(y))return y;var U=er(y);return U.path="/v4/"+U.authority+".json",U.params.push("secure"),this._makeAPIURL(U,this._customAccessToken||I)},$e.prototype.normalizeSpriteURL=function(y,I,U,$){var ae=er(y);return St(y)?(ae.path="/styles/v1"+ae.path+"/sprite"+I+U,this._makeAPIURL(ae,this._customAccessToken||$)):(ae.path+=""+I+U,lr(ae))},$e.prototype.normalizeTileURL=function(y,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),y&&!St(y))return y;var U=er(y),$=/(\.(png|jpg)\d*)(?=$)/,ae=/^.+\/v4\//,he=ut.devicePixelRatio>=2||I===512?"@2x":"",Oe=Zt.supported?".webp":"$1";U.path=U.path.replace($,""+he+Oe),U.path=U.path.replace(ae,"/"),U.path="/v4"+U.path;var rt=this._customAccessToken||It(U.params)||pt.ACCESS_TOKEN;return pt.REQUIRE_ACCESS_TOKEN&&rt&&this._skuToken&&U.params.push("sku="+this._skuToken),this._makeAPIURL(U,rt)},$e.prototype.canonicalizeTileURL=function(y,I){var U="/v4/",$=/\.[\w]+$/,ae=er(y);if(!ae.path.match(/(^\/v4\/)/)||!ae.path.match($))return y;var he="mapbox://tiles/";he+=ae.path.replace(U,"");var Oe=ae.params;return I&&(Oe=Oe.filter(function(rt){return!rt.match(/^access_token=/)})),Oe.length&&(he+="?"+Oe.join("&")),he},$e.prototype.canonicalizeTileset=function(y,I){for(var U=I?St(I):!1,$=[],ae=0,he=y.tiles||[];ae=0&&y.params.splice(ae,1)}if($.path!=="/"&&(y.path=""+$.path+y.path),!pt.REQUIRE_ACCESS_TOKEN)return lr(y);if(I=I||pt.ACCESS_TOKEN,!I)throw new Error("An API access token is required to use Mapbox GL. "+U);if(I[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+U);return y.params=y.params.filter(function(he){return he.indexOf("access_token")===-1}),y.params.push("access_token="+I),lr(y)};function St(m){return m.indexOf("mapbox:")===0}var Qt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Vt(m){return Qt.test(m)}function _t(m){return m.indexOf("sku=")>0&&Vt(m)}function It(m){for(var y=0,I=m;y=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch($){te("Unable to write to LocalStorage")}},ti.prototype.processRequests=function(y){},ti.prototype.postEvent=function(y,I,U,$){var ae=this;if(pt.EVENTS_URL){var he=er(pt.EVENTS_URL);he.params.push("access_token="+($||pt.ACCESS_TOKEN||""));var Oe={event:this.type,created:new Date(y).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:wr,userId:this.anonId},rt=I?x(Oe,I):Oe,gt={url:lr(he),headers:{"Content-Type":"text/plain"},body:JSON.stringify([rt])};this.pendingRequest=Qr(gt,function(Et){ae.pendingRequest=null,U(Et),ae.saveEventData(),ae.processRequests($)})}},ti.prototype.queueRequest=function(y,I){this.queue.push(y),this.processRequests(I)};var Br=function(m){function y(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postMapLoadEvent=function(U,$,ae,he){this.skuToken=ae,(pt.EVENTS_URL&&he||pt.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(Oe){return St(Oe)||Vt(Oe)}))&&this.queueRequest({id:$,timestamp:Date.now()},he)},y.prototype.processRequests=function(U){var $=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),he=ae.id,Oe=ae.timestamp;he&&this.success[he]||(this.anonId||this.fetchEventData(),z(this.anonId)||(this.anonId=P()),this.postEvent(Oe,{skuToken:this.skuToken},function(rt){rt||he&&($.success[he]=!0)},U))}},y}(ti),Vr=function(m){function y(I){m.call(this,"appUserTurnstile"),this._customAccessToken=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postTurnstileEvent=function(U,$){pt.EVENTS_URL&&pt.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(ae){return St(ae)||Vt(ae)})&&this.queueRequest(Date.now(),$)},y.prototype.processRequests=function(U){var $=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Lr(pt.ACCESS_TOKEN),he=ae?ae.u:pt.ACCESS_TOKEN,Oe=he!==this.eventData.tokenU;z(this.anonId)||(this.anonId=P(),Oe=!0);var rt=this.queue.shift();if(this.eventData.lastSuccess){var gt=new Date(this.eventData.lastSuccess),Et=new Date(rt),or=(rt-this.eventData.lastSuccess)/(24*60*60*1e3);Oe=Oe||or>=1||or<-1||gt.getDate()!==Et.getDate()}else Oe=!0;if(!Oe)return this.processRequests();this.postEvent(rt,{"enabled.telemetry":!1},function(_r){_r||($.eventData.lastSuccess=rt,$.eventData.tokenU=he)},U)}},y}(ti),dt=new Vr,Ge=dt.postTurnstileEvent.bind(dt),Je=new Br,je=Je.postMapLoadEvent.bind(Je),tt="mapbox-tiles",xt=500,Ie=50,xe=1e3*60*7,ke;function vt(){f.caches&&!ke&&(ke=f.caches.open(tt))}var ir;function ar(m,y){if(ir===void 0)try{new Response(new ReadableStream),ir=!0}catch(I){ir=!1}ir?y(m.body):m.blob().then(y)}function vr(m,y,I){if(vt(),!!ke){var U={status:y.status,statusText:y.statusText,headers:new f.Headers};y.headers.forEach(function(he,Oe){return U.headers.set(Oe,he)});var $=me(y.headers.get("Cache-Control")||"");if(!$["no-store"]){$["max-age"]&&U.headers.set("Expires",new Date(I+$["max-age"]*1e3).toUTCString());var ae=new Date(U.headers.get("Expires")).getTime()-I;aeDate.now()&&!I["no-cache"]}var di=1/0;function ji(m){di++,di>Ie&&(m.getActor().send("enforceCacheSizeLimit",xt),di=0)}function In(m){vt(),ke&&ke.then(function(y){y.keys().then(function(I){for(var U=0;U=200&&I.status<300||I.status===0)&&I.response!==null){var $=I.response;if(m.type==="json")try{$=JSON.parse(I.response)}catch(ae){return y(ae)}y(null,$,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else y(new la(I.statusText,I.status,m.url))},I.send(m.body),{cancel:function(){return I.abort()}}}var Er=function(m,y){if(!wt(m.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return rr(m,y);if(Ce()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send("getResource",m,y,void 0,I)}}return nr(m,y)},Xr=function(m,y){return Er(x(m,{type:"json"}),y)},ri=function(m,y){return Er(x(m,{type:"arrayBuffer"}),y)},Qr=function(m,y){return Er(x(m,{method:"POST"}),y)};function Oi(m){var y=f.document.createElement("a");return y.href=m,y.protocol===f.document.location.protocol&&y.host===f.document.location.host}var $i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function tn(m,y,I,U){var $=new f.Image,ae=f.URL;$.onload=function(){y(null,$),ae.revokeObjectURL($.src),$.onload=null,f.requestAnimationFrame(function(){$.src=$i})},$.onerror=function(){return y(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var he=new f.Blob([new Uint8Array(m)],{type:"image/png"});$.cacheControl=I,$.expires=U,$.src=m.byteLength?ae.createObjectURL(he):$i}function fn(m,y){var I=new f.Blob([new Uint8Array(m)],{type:"image/png"});f.createImageBitmap(I).then(function(U){y(null,U)}).catch(function(U){y(new Error("Could not load image because of "+U.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var yn,Sn,Ba=function(){yn=[],Sn=0};Ba();var ua=function(m,y){if(Zt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),Sn>=pt.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:m,callback:y,cancelled:!1,cancel:function(){this.cancelled=!0}};return yn.push(I),I}Sn++;var U=!1,$=function(){if(!U)for(U=!0,Sn--;yn.length&&Sn0||this._oneTimeListeners&&this._oneTimeListeners[y]&&this._oneTimeListeners[y].length>0||this._eventedParent&&this._eventedParent.listens(y)},Wn.prototype.setEventedParent=function(y,I){return this._eventedParent=y,this._eventedParentData=I,this};var Ha=8,vo={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},jn={"*":{type:"source"}},Mt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],kr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Jr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},vi={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},hn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},An={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"}}},Mn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Li={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_n=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ya={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Jn={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ma={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_o={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},No={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},po={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Lo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ko={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ds={type:"array",value:"*"},Fs={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ll={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ul={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},zl={type:"array",value:"*",minimum:1},us={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},il=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],As={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},cl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Ks={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},zs={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Io={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},ls={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Zl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Su={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},nc={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},bs={"*":{type:"string"}},Rn={$version:Ha,$root:vo,sources:jn,source:Mt,source_vector:kr,source_raster:Jr,source_raster_dem:vi,source_geojson:hn,source_video:An,source_image:Mn,layer:Li,layout:_n,layout_background:ya,layout_fill:Jn,layout_circle:Ma,layout_heatmap:_o,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:No,layout_symbol:po,layout_raster:Lo,layout_hillshade:ko,filter:Ds,filter_operator:Fs,geometry_type:ll,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ul,expression:zl,light:us,paint:il,paint_fill:As,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:cl,paint_circle:Ks,paint_heatmap:zs,paint_symbol:Io,paint_raster:ls,paint_hillshade:Zl,paint_background:Su,transition:nc,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:bs},_a=function(y,I,U,$){this.message=(y?y+": ":"")+U,$&&(this.identifier=$),I!=null&&I.__line__&&(this.line=I.__line__)};function Vu(m){var y=m.key,I=m.value;return I?[new _a(y,I,"constants have been deprecated as of v8")]:[]}function Ol(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,$=y;U<$.length;U+=1){var ae=$[U];for(var he in ae)m[he]=ae[he]}return m}function xo(m){return m instanceof Number||m instanceof String||m instanceof Boolean?m.valueOf():m}function Yl(m){if(Array.isArray(m))return m.map(Yl);if(m instanceof Object&&!(m instanceof Number||m instanceof String||m instanceof Boolean)){var y={};for(var I in m)y[I]=Yl(m[I]);return y}return xo(m)}var Ns=function(m){function y(I,U){m.call(this,U),this.message=U,this.key=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(Error),Hl=function(y,I){I===void 0&&(I=[]),this.parent=y,this.bindings={};for(var U=0,$=I;U<$.length;U+=1){var ae=$[U],he=ae[0],Oe=ae[1];this.bindings[he]=Oe}};Hl.prototype.concat=function(y){return new Hl(this,y)},Hl.prototype.get=function(y){if(this.bindings[y])return this.bindings[y];if(this.parent)return this.parent.get(y);throw new Error(y+" not found in scope.")},Hl.prototype.has=function(y){return this.bindings[y]?!0:this.parent?this.parent.has(y):!1};var ac={kind:"null"},aa={kind:"number"},Oo={kind:"string"},qo={kind:"boolean"},ql={kind:"color"},Pc={kind:"object"},Do={kind:"value"},rf={kind:"error"},Uf={kind:"collator"},pl={kind:"formatted"},Zc={kind:"resolvedImage"};function Kl(m,y){return{kind:"array",itemType:m,N:y}}function Os(m){if(m.kind==="array"){var y=Os(m.itemType);return typeof m.N=="number"?"array<"+y+", "+m.N+">":m.itemType.kind==="value"?"array":"array<"+y+">"}else return m.kind}var yu=[ac,aa,Oo,qo,ql,pl,Pc,Kl(Do),Zc];function oc(m,y){if(y.kind==="error")return null;if(m.kind==="array"){if(y.kind==="array"&&(y.N===0&&y.itemType.kind==="value"||!oc(m.itemType,y.itemType))&&(typeof m.N!="number"||m.N===y.N))return null}else{if(m.kind===y.kind)return null;if(m.kind==="value")for(var I=0,U=yu;I255?255:gt}function $(gt){return gt<0?0:gt>1?1:gt}function ae(gt){return gt[gt.length-1]==="%"?U(parseFloat(gt)/100*255):U(parseInt(gt))}function he(gt){return gt[gt.length-1]==="%"?$(parseFloat(gt)/100):$(parseFloat(gt))}function Oe(gt,Et,or){return or<0?or+=1:or>1&&(or-=1),or*6<1?gt+(Et-gt)*or*6:or*2<1?Et:or*3<2?gt+(Et-gt)*(2/3-or)*6:gt}function rt(gt){var Et=gt.replace(/ /g,"").toLowerCase();if(Et in I)return I[Et].slice();if(Et[0]==="#"){if(Et.length===4){var or=parseInt(Et.substr(1),16);return or>=0&&or<=4095?[(or&3840)>>4|(or&3840)>>8,or&240|(or&240)>>4,or&15|(or&15)<<4,1]:null}else if(Et.length===7){var or=parseInt(Et.substr(1),16);return or>=0&&or<=16777215?[(or&16711680)>>16,(or&65280)>>8,or&255,1]:null}return null}var _r=Et.indexOf("("),pr=Et.indexOf(")");if(_r!==-1&&pr+1===Et.length){var Fr=Et.substr(0,_r),oi=Et.substr(_r+1,pr-(_r+1)).split(","),Hi=1;switch(Fr){case"rgba":if(oi.length!==4)return null;Hi=he(oi.pop());case"rgb":return oi.length!==3?null:[ae(oi[0]),ae(oi[1]),ae(oi[2]),Hi];case"hsla":if(oi.length!==4)return null;Hi=he(oi.pop());case"hsl":if(oi.length!==3)return null;var Ai=(parseFloat(oi[0])%360+360)%360/360,bn=he(oi[1]),nn=he(oi[2]),xn=nn<=.5?nn*(bn+1):nn+bn-nn*bn,Pn=nn*2-xn;return[U(Oe(Pn,xn,Ai+1/3)*255),U(Oe(Pn,xn,Ai)*255),U(Oe(Pn,xn,Ai-1/3)*255),Hi];default:return null}}return null}try{y.parseCSSColor=rt}catch(gt){}}),Lf=Vh.parseCSSColor,cs=function(y,I,U,$){$===void 0&&($=1),this.r=y,this.g=I,this.b=U,this.a=$};cs.parse=function(y){if(y){if(y instanceof cs)return y;if(typeof y=="string"){var I=Lf(y);if(I)return new cs(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},cs.prototype.toString=function(){var y=this.toArray(),I=y[0],U=y[1],$=y[2],ae=y[3];return"rgba("+Math.round(I)+","+Math.round(U)+","+Math.round($)+","+ae+")"},cs.prototype.toArray=function(){var y=this,I=y.r,U=y.g,$=y.b,ae=y.a;return ae===0?[0,0,0,0]:[I*255/ae,U*255/ae,$*255/ae,ae]},cs.black=new cs(0,0,0,1),cs.white=new cs(1,1,1,1),cs.transparent=new cs(0,0,0,0),cs.red=new cs(1,0,0,1);var nf=function(y,I,U){y?this.sensitivity=I?"variant":"case":this.sensitivity=I?"accent":"base",this.locale=U,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};nf.prototype.compare=function(y,I){return this.collator.compare(y,I)},nf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Vf=function(y,I,U,$,ae){this.text=y,this.image=I,this.scale=U,this.fontStack=$,this.textColor=ae},Jl=function(y){this.sections=y};Jl.fromString=function(y){return new Jl([new Vf(y,null,null,null,null)])},Jl.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(y){return y.text.length!==0||y.image&&y.image.name.length!==0})},Jl.factory=function(y){return y instanceof Jl?y:Jl.fromString(y)},Jl.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(y){return y.text}).join("")},Jl.prototype.serialize=function(){for(var y=["format"],I=0,U=this.sections;I=0&&m<=255&&typeof y=="number"&&y>=0&&y<=255&&typeof I=="number"&&I>=0&&I<=255)){var $=typeof U=="number"?[m,y,I,U]:[m,y,I];return"Invalid rgba value ["+$.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof U=="undefined"||typeof U=="number"&&U>=0&&U<=1?null:"Invalid rgba value ["+[m,y,I,U].join(", ")+"]: 'a' must be between 0 and 1."}function Fu(m){if(m===null)return!0;if(typeof m=="string")return!0;if(typeof m=="boolean")return!0;if(typeof m=="number")return!0;if(m instanceof cs)return!0;if(m instanceof nf)return!0;if(m instanceof Jl)return!0;if(m instanceof fl)return!0;if(Array.isArray(m)){for(var y=0,I=m;y2){var Oe=y[1];if(typeof Oe!="string"||!(Oe in uc)||Oe==="object")return I.error('The item type argument of "array" must be one of string, number, boolean',1);he=uc[Oe],U++}else he=Do;var rt;if(y.length>3){if(y[2]!==null&&(typeof y[2]!="number"||y[2]<0||y[2]!==Math.floor(y[2])))return I.error('The length argument to "array" must be a positive integer literal',2);rt=y[2],U++}$=Kl(he,rt)}else $=uc[ae];for(var gt=[];U1)&&I.push($)}}return I.concat(this.args.map(function(ae){return ae.serialize()}))};var Gu=function(y){this.type=pl,this.sections=y};Gu.parse=function(y,I){if(y.length<2)return I.error("Expected at least one argument.");var U=y[1];if(!Array.isArray(U)&&typeof U=="object")return I.error("First argument must be an image or text section.");for(var $=[],ae=!1,he=1;he<=y.length-1;++he){var Oe=y[he];if(ae&&typeof Oe=="object"&&!Array.isArray(Oe)){ae=!1;var rt=null;if(Oe["font-scale"]&&(rt=I.parse(Oe["font-scale"],1,aa),!rt))return null;var gt=null;if(Oe["text-font"]&&(gt=I.parse(Oe["text-font"],1,Kl(Oo)),!gt))return null;var Et=null;if(Oe["text-color"]&&(Et=I.parse(Oe["text-color"],1,ql),!Et))return null;var or=$[$.length-1];or.scale=rt,or.font=gt,or.textColor=Et}else{var _r=I.parse(y[he],1,Do);if(!_r)return null;var pr=_r.type.kind;if(pr!=="string"&&pr!=="value"&&pr!=="null"&&pr!=="resolvedImage")return I.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ae=!0,$.push({content:_r,scale:null,font:null,textColor:null})}}return new Gu($)},Gu.prototype.evaluate=function(y){var I=function(U){var $=U.content.evaluate(y);return Es($)===Zc?new Vf("",$,null,null,null):new Vf(Hs($),null,U.scale?U.scale.evaluate(y):null,U.font?U.font.evaluate(y).join(","):null,U.textColor?U.textColor.evaluate(y):null)};return new Jl(this.sections.map(I))},Gu.prototype.eachChild=function(y){for(var I=0,U=this.sections;I-1),U},qs.prototype.eachChild=function(y){y(this.input)},qs.prototype.outputDefined=function(){return!1},qs.prototype.serialize=function(){return["image",this.input.serialize()]};var ad={"to-boolean":qo,"to-color":ql,"to-number":aa,"to-string":Oo},Po=function(y,I){this.type=y,this.args=I};Po.parse=function(y,I){if(y.length<2)return I.error("Expected at least one argument.");var U=y[0];if((U==="to-boolean"||U==="to-string")&&y.length!==2)return I.error("Expected one argument.");for(var $=ad[U],ae=[],he=1;he4?U="Invalid rbga value "+JSON.stringify(I)+": expected an array containing either three or four numeric values.":U=lc(I[0],I[1],I[2],I[3]),!U))return new cs(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new ps(U||"Could not parse color from value '"+(typeof I=="string"?I:String(JSON.stringify(I)))+"'")}else if(this.type.kind==="number"){for(var rt=null,gt=0,Et=this.args;gt=y[2]||m[1]<=y[1]||m[3]>=y[3])}function wh(m,y){var I=Ic(m[0]),U=yf(m[1]),$=Math.pow(2,y.z);return[Math.round(I*$*bl),Math.round(U*$*bl)]}function Qf(m,y,I){var U=m[0]-y[0],$=m[1]-y[1],ae=m[0]-I[0],he=m[1]-I[1];return U*he-ae*$===0&&U*ae<=0&&$*he<=0}function _f(m,y,I){return y[1]>m[1]!=I[1]>m[1]&&m[0]<(I[0]-y[0])*(m[1]-y[1])/(I[1]-y[1])+y[0]}function Yc(m,y){for(var I=!1,U=0,$=y.length;U<$;U++)for(var ae=y[U],he=0,Oe=ae.length;he0&&or<0||Et<0&&or>0}function Hf(m,y,I,U){var $=[y[0]-m[0],y[1]-m[1]],ae=[U[0]-I[0],U[1]-I[1]];return th(ae,$)===0?!1:!!(ju(m,y,I,U)&&ju(I,U,m,y))}function cc(m,y,I){for(var U=0,$=I;U<$.length;U+=1)for(var ae=$[U],he=0;heI[2]){var $=U*.5,ae=m[0]-I[0]>$?-U:I[0]-m[0]>$?U:0;ae===0&&(ae=m[0]-I[2]>$?-U:I[2]-m[0]>$?U:0),m[0]+=ae}Gf(y,m)}function jf(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Gh(m,y,I,U){for(var $=Math.pow(2,U.z)*bl,ae=[U.x*bl,U.y*bl],he=[],Oe=0,rt=m;Oe=0)return!1;var I=!0;return m.eachChild(function(U){I&&!Eu(U,y)&&(I=!1)}),I}var Dc=function(y,I){this.type=I.type,this.name=y,this.boundExpression=I};Dc.parse=function(y,I){if(y.length!==2||typeof y[1]!="string")return I.error("'var' expression requires exactly one string literal argument.");var U=y[1];return I.scope.has(U)?new Dc(U,I.scope.get(U)):I.error('Unknown variable "'+U+'". Make sure "'+U+'" has been bound in an enclosing "let" expression before using it.',1)},Dc.prototype.evaluate=function(y){return this.boundExpression.evaluate(y)},Dc.prototype.eachChild=function(){},Dc.prototype.outputDefined=function(){return!1},Dc.prototype.serialize=function(){return["var",this.name]};var ks=function(y,I,U,$,ae){I===void 0&&(I=[]),$===void 0&&($=new Hl),ae===void 0&&(ae=[]),this.registry=y,this.path=I,this.key=I.map(function(he){return"["+he+"]"}).join(""),this.scope=$,this.errors=ae,this.expectedType=U};ks.prototype.parse=function(y,I,U,$,ae){return ae===void 0&&(ae={}),I?this.concat(I,U,$)._parse(y,ae):this._parse(y,ae)},ks.prototype._parse=function(y,I){(y===null||typeof y=="string"||typeof y=="boolean"||typeof y=="number")&&(y=["literal",y]);function U(Et,or,_r){return _r==="assert"?new xl(or,[Et]):_r==="coerce"?new Po(or,[Et]):Et}if(Array.isArray(y)){if(y.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var $=y[0];if(typeof $!="string")return this.error("Expression name must be a string, but found "+typeof $+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ae=this.registry[$];if(ae){var he=ae.parse(y,this);if(!he)return null;if(this.expectedType){var Oe=this.expectedType,rt=he.type;if((Oe.kind==="string"||Oe.kind==="number"||Oe.kind==="boolean"||Oe.kind==="object"||Oe.kind==="array")&&rt.kind==="value")he=U(he,Oe,I.typeAnnotation||"assert");else if((Oe.kind==="color"||Oe.kind==="formatted"||Oe.kind==="resolvedImage")&&(rt.kind==="value"||rt.kind==="string"))he=U(he,Oe,I.typeAnnotation||"coerce");else if(this.checkSubtype(Oe,rt))return null}if(!(he instanceof Go)&&he.type.kind!=="resolvedImage"&&bc(he)){var gt=new Yo;try{he=new Go(he.type,he.evaluate(gt))}catch(Et){return this.error(Et.message),null}}return he}return this.error('Unknown expression "'+$+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof y=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof y=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof y+" instead.")},ks.prototype.concat=function(y,I,U){var $=typeof y=="number"?this.path.concat(y):this.path,ae=U?this.scope.concat(U):this.scope;return new ks(this.registry,$,I||null,ae,this.errors)},ks.prototype.error=function(y){for(var I=[],U=arguments.length-1;U-- >0;)I[U]=arguments[U+1];var $=""+this.key+I.map(function(ae){return"["+ae+"]"}).join("");this.errors.push(new Ns($,y))},ks.prototype.checkSubtype=function(y,I){var U=oc(y,I);return U&&this.error(U),U};function bc(m){if(m instanceof Dc)return bc(m.boundExpression);if(m instanceof Pa&&m.name==="error")return!1;if(m instanceof Hu)return!1;if(m instanceof Mu)return!1;var y=m instanceof Po||m instanceof xl,I=!0;return m.eachChild(function(U){y?I=I&&bc(U):I=I&&U instanceof Go}),I?ih(m)&&Eu(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function hu(m,y){for(var I=m.length-1,U=0,$=I,ae=0,he,Oe;U<=$;)if(ae=Math.floor((U+$)/2),he=m[ae],Oe=m[ae+1],he<=y){if(ae===I||yy)$=ae-1;else throw new ps("Input is not a number.");return 0}var _u=function(y,I,U){this.type=y,this.input=I,this.labels=[],this.outputs=[];for(var $=0,ae=U;$=Oe)return I.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',gt);var or=I.parse(rt,Et,ae);if(!or)return null;ae=ae||or.type,$.push([Oe,or])}return new _u(ae,U,$)},_u.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return U[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return U[ae-1].evaluate(y);var he=hu(I,$);return U[he].evaluate(y)},_u.prototype.eachChild=function(y){y(this.input);for(var I=0,U=this.outputs;I0&&y.push(this.labels[I]),y.push(this.outputs[I].serialize());return y};function nl(m,y,I){return m*(1-I)+y*I}function nh(m,y,I){return new cs(nl(m.r,y.r,I),nl(m.g,y.g,I),nl(m.b,y.b,I),nl(m.a,y.a,I))}function Ah(m,y,I){return m.map(function(U,$){return nl(U,y[$],I)})}var zu=Object.freeze({__proto__:null,number:nl,color:nh,array:Ah}),Fc=.95047,wc=1,bd=1.08883,xf=4/29,Pf=6/29,Ou=3*Pf*Pf,bf=Pf*Pf*Pf,jl=Math.PI/180,lf=180/Math.PI;function Hh(m){return m>bf?Math.pow(m,1/3):m/Ou+xf}function If(m){return m>Pf?m*m*m:Ou*(m-xf)}function Cs(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function du(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function ku(m){var y=du(m.r),I=du(m.g),U=du(m.b),$=Hh((.4124564*y+.3575761*I+.1804375*U)/Fc),ae=Hh((.2126729*y+.7151522*I+.072175*U)/wc),he=Hh((.0193339*y+.119192*I+.9503041*U)/bd);return{l:116*ae-16,a:500*($-ae),b:200*(ae-he),alpha:m.a}}function Wf(m){var y=(m.l+16)/116,I=isNaN(m.a)?y:y+m.a/500,U=isNaN(m.b)?y:y-m.b/200;return y=wc*If(y),I=Fc*If(I),U=bd*If(U),new cs(Cs(3.2404542*I-1.5371385*y-.4985314*U),Cs(-.969266*I+1.8760108*y+.041556*U),Cs(.0556434*I-.2040259*y+1.0572252*U),m.alpha)}function Us(m,y,I){return{l:nl(m.l,y.l,I),a:nl(m.a,y.a,I),b:nl(m.b,y.b,I),alpha:nl(m.alpha,y.alpha,I)}}function wf(m){var y=ku(m),I=y.l,U=y.a,$=y.b,ae=Math.atan2($,U)*lf;return{h:ae<0?ae+360:ae,c:Math.sqrt(U*U+$*$),l:I,alpha:m.a}}function zc(m){var y=m.h*jl,I=m.c,U=m.l;return Wf({l:U,a:Math.cos(y)*I,b:Math.sin(y)*I,alpha:m.alpha})}function Wu(m,y,I){var U=y-m;return m+I*(U>180||U<-180?U-360*Math.round(U/360):U)}function Rf(m,y,I){return{h:Wu(m.h,y.h,I),c:nl(m.c,y.c,I),l:nl(m.l,y.l,I),alpha:nl(m.alpha,y.alpha,I)}}var Xu={forward:ku,reverse:Wf,interpolate:Us},uf={forward:wf,reverse:zc,interpolate:Rf},Xf=Object.freeze({__proto__:null,lab:Xu,hcl:uf}),Wl=function(y,I,U,$,ae){this.type=y,this.operator=I,this.interpolation=U,this.input=$,this.labels=[],this.outputs=[];for(var he=0,Oe=ae;he1}))return I.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);$={name:"cubic-bezier",controlPoints:rt}}else return I.error("Unknown interpolation type "+String($[0]),1,0);if(y.length-1<4)return I.error("Expected at least 4 arguments, but found only "+(y.length-1)+".");if((y.length-1)%2!==0)return I.error("Expected an even number of arguments.");if(ae=I.parse(ae,2,aa),!ae)return null;var gt=[],Et=null;U==="interpolate-hcl"||U==="interpolate-lab"?Et=ql:I.expectedType&&I.expectedType.kind!=="value"&&(Et=I.expectedType);for(var or=0;or=_r)return I.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Fr);var Hi=I.parse(pr,oi,Et);if(!Hi)return null;Et=Et||Hi.type,gt.push([_r,Hi])}return Et.kind!=="number"&&Et.kind!=="color"&&!(Et.kind==="array"&&Et.itemType.kind==="number"&&typeof Et.N=="number")?I.error("Type "+Os(Et)+" is not interpolatable."):new Wl(Et,U,$,ae,gt)},Wl.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return U[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return U[ae-1].evaluate(y);var he=hu(I,$),Oe=I[he],rt=I[he+1],gt=Wl.interpolationFactor(this.interpolation,$,Oe,rt),Et=U[he].evaluate(y),or=U[he+1].evaluate(y);return this.operator==="interpolate"?zu[this.type.kind.toLowerCase()](Et,or,gt):this.operator==="interpolate-hcl"?uf.reverse(uf.interpolate(uf.forward(Et),uf.forward(or),gt)):Xu.reverse(Xu.interpolate(Xu.forward(Et),Xu.forward(or),gt))},Wl.prototype.eachChild=function(y){y(this.input);for(var I=0,U=this.outputs;I=U.length)throw new ps("Array index out of bounds: "+I+" > "+(U.length-1)+".");if(I!==Math.floor(I))throw new ps("Array index must be an integer, but found "+I+" instead.");return U[I]},Tc.prototype.eachChild=function(y){y(this.index),y(this.input)},Tc.prototype.outputDefined=function(){return!1},Tc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var wl=function(y,I){this.type=qo,this.needle=y,this.haystack=I};wl.parse=function(y,I){if(y.length!==3)return I.error("Expected 2 arguments, but found "+(y.length-1)+" instead.");var U=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);return!U||!$?null:Cf(U.type,[qo,Oo,aa,ac,Do])?new wl(U,$):I.error("Expected first argument to be of type boolean, string, number or null, but found "+Os(U.type)+" instead")},wl.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!U)return!1;if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+Os(Es(I))+" instead.");if(!sc(U,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+Os(Es(U))+" instead.");return U.indexOf(I)>=0},wl.prototype.eachChild=function(y){y(this.needle),y(this.haystack)},wl.prototype.outputDefined=function(){return!0},wl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var vu=function(y,I,U){this.type=aa,this.needle=y,this.haystack=I,this.fromIndex=U};vu.parse=function(y,I){if(y.length<=2||y.length>=5)return I.error("Expected 3 or 4 arguments, but found "+(y.length-1)+" instead.");var U=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);if(!U||!$)return null;if(!Cf(U.type,[qo,Oo,aa,ac,Do]))return I.error("Expected first argument to be of type boolean, string, number or null, but found "+Os(U.type)+" instead");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new vu(U,$,ae):null}else return new vu(U,$)},vu.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+Os(Es(I))+" instead.");if(!sc(U,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+Os(Es(U))+" instead.");if(this.fromIndex){var $=this.fromIndex.evaluate(y);return U.indexOf(I,$)}return U.indexOf(I)},vu.prototype.eachChild=function(y){y(this.needle),y(this.haystack),this.fromIndex&&y(this.fromIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var y=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),y]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var qc=function(y,I,U,$,ae,he){this.inputType=y,this.type=I,this.input=U,this.cases=$,this.outputs=ae,this.otherwise=he};qc.parse=function(y,I){if(y.length<5)return I.error("Expected at least 4 arguments, but found only "+(y.length-1)+".");if(y.length%2!==1)return I.error("Expected an even number of arguments.");var U,$;I.expectedType&&I.expectedType.kind!=="value"&&($=I.expectedType);for(var ae={},he=[],Oe=2;OeNumber.MAX_SAFE_INTEGER)return Et.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof pr=="number"&&Math.floor(pr)!==pr)return Et.error("Numeric branch labels must be integer values.");if(!U)U=Es(pr);else if(Et.checkSubtype(U,Es(pr)))return null;if(typeof ae[String(pr)]!="undefined")return Et.error("Branch labels must be unique.");ae[String(pr)]=he.length}var Fr=I.parse(gt,Oe,$);if(!Fr)return null;$=$||Fr.type,he.push(Fr)}var oi=I.parse(y[1],1,Do);if(!oi)return null;var Hi=I.parse(y[y.length-1],y.length-1,$);return!Hi||oi.type.kind!=="value"&&I.concat(1).checkSubtype(U,oi.type)?null:new qc(U,$,oi,ae,he,Hi)},qc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=Es(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return U.evaluate(y)},qc.prototype.eachChild=function(y){y(this.input),this.outputs.forEach(y),y(this.otherwise)},qc.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})&&this.otherwise.outputDefined()},qc.prototype.serialize=function(){for(var y=this,I=["match",this.input.serialize()],U=Object.keys(this.cases).sort(),$=[],ae={},he=0,Oe=U;he=5)return I.error("Expected 3 or 4 arguments, but found "+(y.length-1)+" instead.");var U=I.parse(y[1],1,Do),$=I.parse(y[2],2,aa);if(!U||!$)return null;if(!Cf(U.type,[Kl(Do),Oo,Do]))return I.error("Expected first argument to be of type array or string, but found "+Os(U.type)+" instead");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new fc(U.type,U,$,ae):null}else return new fc(U.type,U,$)},fc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=this.beginIndex.evaluate(y);if(!sc(I,["string","array"]))throw new ps("Expected first argument to be of type array or string, but found "+Os(Es(I))+" instead.");if(this.endIndex){var $=this.endIndex.evaluate(y);return I.slice(U,$)}return I.slice(U)},fc.prototype.eachChild=function(y){y(this.input),y(this.beginIndex),this.endIndex&&y(this.endIndex)},fc.prototype.outputDefined=function(){return!1},fc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var y=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),y]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Bc(m,y){return m==="=="||m==="!="?y.kind==="boolean"||y.kind==="string"||y.kind==="number"||y.kind==="null"||y.kind==="value":y.kind==="string"||y.kind==="number"||y.kind==="value"}function At(m,y,I){return y===I}function Wt(m,y,I){return y!==I}function Cr(m,y,I){return yI}function Kr(m,y,I){return y<=I}function ki(m,y,I){return y>=I}function Xi(m,y,I,U){return U.compare(y,I)===0}function dn(m,y,I,U){return!Xi(m,y,I,U)}function wn(m,y,I,U){return U.compare(y,I)<0}function Nn(m,y,I,U){return U.compare(y,I)>0}function Yi(m,y,I,U){return U.compare(y,I)<=0}function Qi(m,y,I,U){return U.compare(y,I)>=0}function on(m,y,I){var U=m!=="=="&&m!=="!=";return function(){function $(ae,he,Oe){this.type=qo,this.lhs=ae,this.rhs=he,this.collator=Oe,this.hasUntypedArgument=ae.type.kind==="value"||he.type.kind==="value"}return $.parse=function(he,Oe){if(he.length!==3&&he.length!==4)return Oe.error("Expected two or three arguments.");var rt=he[0],gt=Oe.parse(he[1],1,Do);if(!gt)return null;if(!Bc(rt,gt.type))return Oe.concat(1).error('"'+rt+`" comparisons are not supported for type '`+Os(gt.type)+"'.");var Et=Oe.parse(he[2],2,Do);if(!Et)return null;if(!Bc(rt,Et.type))return Oe.concat(2).error('"'+rt+`" comparisons are not supported for type '`+Os(Et.type)+"'.");if(gt.type.kind!==Et.type.kind&>.type.kind!=="value"&&Et.type.kind!=="value")return Oe.error("Cannot compare types '"+Os(gt.type)+"' and '"+Os(Et.type)+"'.");U&&(gt.type.kind==="value"&&Et.type.kind!=="value"?gt=new xl(Et.type,[gt]):gt.type.kind!=="value"&&Et.type.kind==="value"&&(Et=new xl(gt.type,[Et])));var or=null;if(he.length===4){if(gt.type.kind!=="string"&&Et.type.kind!=="string"&>.type.kind!=="value"&&Et.type.kind!=="value")return Oe.error("Cannot use collator to compare non-string types.");if(or=Oe.parse(he[3],3,Uf),!or)return null}return new $(gt,Et,or)},$.prototype.evaluate=function(he){var Oe=this.lhs.evaluate(he),rt=this.rhs.evaluate(he);if(U&&this.hasUntypedArgument){var gt=Es(Oe),Et=Es(rt);if(gt.kind!==Et.kind||!(gt.kind==="string"||gt.kind==="number"))throw new ps('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+gt.kind+", "+Et.kind+") instead.")}if(this.collator&&!U&&this.hasUntypedArgument){var or=Es(Oe),_r=Es(rt);if(or.kind!=="string"||_r.kind!=="string")return y(he,Oe,rt)}return this.collator?I(he,Oe,rt,this.collator.evaluate(he)):y(he,Oe,rt)},$.prototype.eachChild=function(he){he(this.lhs),he(this.rhs),this.collator&&he(this.collator)},$.prototype.outputDefined=function(){return!0},$.prototype.serialize=function(){var he=[m];return this.eachChild(function(Oe){he.push(Oe.serialize())}),he},$}()}var Fi=on("==",At,Xi),$n=on("!=",Wt,dn),Ca=on("<",Cr,wn),Ra=on(">",Ar,Nn),La=on("<=",Kr,Yi),Na=on(">=",ki,Qi),Yn=function(y,I,U,$,ae){this.type=Oo,this.number=y,this.locale=I,this.currency=U,this.minFractionDigits=$,this.maxFractionDigits=ae};Yn.parse=function(y,I){if(y.length!==3)return I.error("Expected two arguments.");var U=I.parse(y[1],1,aa);if(!U)return null;var $=y[2];if(typeof $!="object"||Array.isArray($))return I.error("NumberFormat options argument must be an object.");var ae=null;if($.locale&&(ae=I.parse($.locale,1,Oo),!ae))return null;var he=null;if($.currency&&(he=I.parse($.currency,1,Oo),!he))return null;var Oe=null;if($["min-fraction-digits"]&&(Oe=I.parse($["min-fraction-digits"],1,aa),!Oe))return null;var rt=null;return $["max-fraction-digits"]&&(rt=I.parse($["max-fraction-digits"],1,aa),!rt)?null:new Yn(U,ae,he,Oe,rt)},Yn.prototype.evaluate=function(y){return new Intl.NumberFormat(this.locale?this.locale.evaluate(y):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(y):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(y):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(y):void 0}).format(this.number.evaluate(y))},Yn.prototype.eachChild=function(y){y(this.number),this.locale&&y(this.locale),this.currency&&y(this.currency),this.minFractionDigits&&y(this.minFractionDigits),this.maxFractionDigits&&y(this.maxFractionDigits)},Yn.prototype.outputDefined=function(){return!1},Yn.prototype.serialize=function(){var y={};return this.locale&&(y.locale=this.locale.serialize()),this.currency&&(y.currency=this.currency.serialize()),this.minFractionDigits&&(y["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(y["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),y]};var Dn=function(y){this.type=aa,this.input=y};Dn.parse=function(y,I){if(y.length!==2)return I.error("Expected 1 argument, but found "+(y.length-1)+" instead.");var U=I.parse(y[1],1);return U?U.type.kind!=="array"&&U.type.kind!=="string"&&U.type.kind!=="value"?I.error("Expected argument of type string or array, but found "+Os(U.type)+" instead."):new Dn(U):null},Dn.prototype.evaluate=function(y){var I=this.input.evaluate(y);if(typeof I=="string")return I.length;if(Array.isArray(I))return I.length;throw new ps("Expected value to be of type string or array, but found "+Os(Es(I))+" instead.")},Dn.prototype.eachChild=function(y){y(this.input)},Dn.prototype.outputDefined=function(){return!1},Dn.prototype.serialize=function(){var y=["length"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Ka={"==":Fi,"!=":$n,">":Ra,"<":Ca,">=":Na,"<=":La,array:xl,at:Tc,boolean:xl,case:cf,coalesce:Zu,collator:Hu,format:Gu,image:qs,in:wl,"index-of":vu,interpolate:Wl,"interpolate-hcl":Wl,"interpolate-lab":Wl,length:Dn,let:Oc,literal:Go,match:qc,number:xl,"number-format":Yn,object:xl,slice:fc,step:_u,string:xl,"to-boolean":Po,"to-color":Po,"to-number":Po,"to-string":Po,var:Dc,within:Mu};function bo(m,y){var I=y[0],U=y[1],$=y[2],ae=y[3];I=I.evaluate(m),U=U.evaluate(m),$=$.evaluate(m);var he=ae?ae.evaluate(m):1,Oe=lc(I,U,$,he);if(Oe)throw new ps(Oe);return new cs(I/255*he,U/255*he,$/255*he,he)}function Xo(m,y){return m in y}function Ss(m,y){var I=y[m];return typeof I=="undefined"?null:I}function as(m,y,I,U){for(;I<=U;){var $=I+U>>1;if(y[$]===m)return!0;y[$]>m?U=$-1:I=$+1}return!1}function ws(m){return{type:m}}Pa.register(Ka,{error:[rf,[Oo],function(m,y){var I=y[0];throw new ps(I.evaluate(m))}],typeof:[Oo,[Do],function(m,y){var I=y[0];return Os(Es(I.evaluate(m)))}],"to-rgba":[Kl(aa,4),[ql],function(m,y){var I=y[0];return I.evaluate(m).toArray()}],rgb:[ql,[aa,aa,aa],bo],rgba:[ql,[aa,aa,aa,aa],bo],has:{type:qo,overloads:[[[Oo],function(m,y){var I=y[0];return Xo(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],U=y[1];return Xo(I.evaluate(m),U.evaluate(m))}]]},get:{type:Do,overloads:[[[Oo],function(m,y){var I=y[0];return Ss(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],U=y[1];return Ss(I.evaluate(m),U.evaluate(m))}]]},"feature-state":[Do,[Oo],function(m,y){var I=y[0];return Ss(I.evaluate(m),m.featureState||{})}],properties:[Pc,[],function(m){return m.properties()}],"geometry-type":[Oo,[],function(m){return m.geometryType()}],id:[Do,[],function(m){return m.id()}],zoom:[aa,[],function(m){return m.globals.zoom}],"heatmap-density":[aa,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[aa,[],function(m){return m.globals.lineProgress||0}],accumulated:[Do,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[aa,ws(aa),function(m,y){for(var I=0,U=0,$=y;U<$.length;U+=1){var ae=$[U];I+=ae.evaluate(m)}return I}],"*":[aa,ws(aa),function(m,y){for(var I=1,U=0,$=y;U<$.length;U+=1){var ae=$[U];I*=ae.evaluate(m)}return I}],"-":{type:aa,overloads:[[[aa,aa],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)-U.evaluate(m)}],[[aa],function(m,y){var I=y[0];return-I.evaluate(m)}]]},"/":[aa,[aa,aa],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)/U.evaluate(m)}],"%":[aa,[aa,aa],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)%U.evaluate(m)}],ln2:[aa,[],function(){return Math.LN2}],pi:[aa,[],function(){return Math.PI}],e:[aa,[],function(){return Math.E}],"^":[aa,[aa,aa],function(m,y){var I=y[0],U=y[1];return Math.pow(I.evaluate(m),U.evaluate(m))}],sqrt:[aa,[aa],function(m,y){var I=y[0];return Math.sqrt(I.evaluate(m))}],log10:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN10}],ln:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))}],log2:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN2}],sin:[aa,[aa],function(m,y){var I=y[0];return Math.sin(I.evaluate(m))}],cos:[aa,[aa],function(m,y){var I=y[0];return Math.cos(I.evaluate(m))}],tan:[aa,[aa],function(m,y){var I=y[0];return Math.tan(I.evaluate(m))}],asin:[aa,[aa],function(m,y){var I=y[0];return Math.asin(I.evaluate(m))}],acos:[aa,[aa],function(m,y){var I=y[0];return Math.acos(I.evaluate(m))}],atan:[aa,[aa],function(m,y){var I=y[0];return Math.atan(I.evaluate(m))}],min:[aa,ws(aa),function(m,y){return Math.min.apply(Math,y.map(function(I){return I.evaluate(m)}))}],max:[aa,ws(aa),function(m,y){return Math.max.apply(Math,y.map(function(I){return I.evaluate(m)}))}],abs:[aa,[aa],function(m,y){var I=y[0];return Math.abs(I.evaluate(m))}],round:[aa,[aa],function(m,y){var I=y[0],U=I.evaluate(m);return U<0?-Math.round(-U):Math.round(U)}],floor:[aa,[aa],function(m,y){var I=y[0];return Math.floor(I.evaluate(m))}],ceil:[aa,[aa],function(m,y){var I=y[0];return Math.ceil(I.evaluate(m))}],"filter-==":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1];return m.properties()[I.value]===U.value}],"filter-id-==":[qo,[Do],function(m,y){var I=y[0];return m.id()===I.value}],"filter-type-==":[qo,[Oo],function(m,y){var I=y[0];return m.geometryType()===I.value}],"filter-<":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$>ae}],"filter-id->":[qo,[Do],function(m,y){var I=y[0],U=m.id(),$=I.value;return typeof U==typeof $&&U>$}],"filter-<=":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$<=ae}],"filter-id-<=":[qo,[Do],function(m,y){var I=y[0],U=m.id(),$=I.value;return typeof U==typeof $&&U<=$}],"filter->=":[qo,[Oo,Do],function(m,y){var I=y[0],U=y[1],$=m.properties()[I.value],ae=U.value;return typeof $==typeof ae&&$>=ae}],"filter-id->=":[qo,[Do],function(m,y){var I=y[0],U=m.id(),$=I.value;return typeof U==typeof $&&U>=$}],"filter-has":[qo,[Do],function(m,y){var I=y[0];return I.value in m.properties()}],"filter-has-id":[qo,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[qo,[Kl(Oo)],function(m,y){var I=y[0];return I.value.indexOf(m.geometryType())>=0}],"filter-id-in":[qo,[Kl(Do)],function(m,y){var I=y[0];return I.value.indexOf(m.id())>=0}],"filter-in-small":[qo,[Oo,Kl(Do)],function(m,y){var I=y[0],U=y[1];return U.value.indexOf(m.properties()[I.value])>=0}],"filter-in-large":[qo,[Oo,Kl(Do)],function(m,y){var I=y[0],U=y[1];return as(m.properties()[I.value],U.value,0,U.value.length-1)}],all:{type:qo,overloads:[[[qo,qo],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)&&U.evaluate(m)}],[ws(qo),function(m,y){for(var I=0,U=y;I-1}function va(m){return!!m.expression&&m.expression.interpolated}function no(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function ys(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function rs(m){return m}function $l(m,y){var I=y.type==="color",U=m.stops&&typeof m.stops[0][0]=="object",$=U||m.property!==void 0,ae=U||!$,he=m.type||(va(y)?"exponential":"interval");if(I&&(m=Ol({},m),m.stops&&(m.stops=m.stops.map(function(ha){return[ha[0],cs.parse(ha[1])]})),m.default?m.default=cs.parse(m.default):m.default=cs.parse(y.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Xf[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Oe,rt,gt;if(he==="exponential")Oe=pu;else if(he==="interval")Oe=Nc;else if(he==="categorical"){Oe=Yu,rt=Object.create(null);for(var Et=0,or=m.stops;Et=m.stops[U-1][0])return m.stops[U-1][1];var $=hu(m.stops.map(function(ae){return ae[0]}),I);return m.stops[$][1]}function pu(m,y,I){var U=m.base!==void 0?m.base:1;if(no(I)!=="number")return Cu(m.default,y.default);var $=m.stops.length;if($===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[$-1][0])return m.stops[$-1][1];var ae=hu(m.stops.map(function(or){return or[0]}),I),he=xu(I,U,m.stops[ae][0],m.stops[ae+1][0]),Oe=m.stops[ae][1],rt=m.stops[ae+1][1],gt=zu[y.type]||rs;if(m.colorSpace&&m.colorSpace!=="rgb"){var Et=Xf[m.colorSpace];gt=function(or,_r){return Et.reverse(Et.interpolate(Et.forward(or),Et.forward(_r),he))}}return typeof Oe.evaluate=="function"?{evaluate:function(){for(var _r=[],pr=arguments.length;pr--;)_r[pr]=arguments[pr];var Fr=Oe.evaluate.apply(void 0,_r),oi=rt.evaluate.apply(void 0,_r);if(!(Fr===void 0||oi===void 0))return gt(Fr,oi,he)}}:gt(Oe,rt,he)}function Uc(m,y,I){return y.type==="color"?I=cs.parse(I):y.type==="formatted"?I=Jl.fromString(I.toString()):y.type==="resolvedImage"?I=fl.fromString(I.toString()):no(I)!==y.type&&(y.type!=="enum"||!y.values[I])&&(I=void 0),Cu(I,m.default,y.default)}function xu(m,y,I,U){var $=U-I,ae=m-I;return $===0?0:y===1?ae/$:(Math.pow(y,ae)-1)/(Math.pow(y,$)-1)}var Ac=function(y,I){this.expression=y,this._warningHistory={},this._evaluator=new Yo,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type==="enum"?I.values:null};Ac.prototype.evaluateWithoutErrorHandling=function(y,I,U,$,ae,he){return this._evaluator.globals=y,this._evaluator.feature=I,this._evaluator.featureState=U,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he,this.expression.evaluate(this._evaluator)},Ac.prototype.evaluate=function(y,I,U,$,ae,he){this._evaluator.globals=y,this._evaluator.feature=I||null,this._evaluator.featureState=U||null,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he||null;try{var Oe=this.expression.evaluate(this._evaluator);if(Oe==null||typeof Oe=="number"&&Oe!==Oe)return this._defaultValue;if(this._enumValues&&!(Oe in this._enumValues))throw new ps("Expected value to be one of "+Object.keys(this._enumValues).map(function(rt){return JSON.stringify(rt)}).join(", ")+", but found "+JSON.stringify(Oe)+" instead.");return Oe}catch(rt){return this._warningHistory[rt.message]||(this._warningHistory[rt.message]=!0,typeof console!="undefined"&&console.warn(rt.message)),this._defaultValue}};function Ua(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in Ka}function oo(m,y){var I=new ks(Ka,[],y?Q(y):void 0),U=I.parse(m,void 0,void 0,void 0,y&&y.type==="string"?{typeAnnotation:"coerce"}:void 0);return U?Ho(new Ac(U,y)):ml(I.errors)}var Vc=function(y,I){this.kind=y,this._styleExpression=I,this.isStateDependent=y!=="constant"&&!js(I.expression)};Vc.prototype.evaluateWithoutErrorHandling=function(y,I,U,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,$,ae,he)},Vc.prototype.evaluate=function(y,I,U,$,ae,he){return this._styleExpression.evaluate(y,I,U,$,ae,he)};var hc=function(y,I,U,$){this.kind=y,this.zoomStops=U,this._styleExpression=I,this.isStateDependent=y!=="camera"&&!js(I.expression),this.interpolationType=$};hc.prototype.evaluateWithoutErrorHandling=function(y,I,U,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,$,ae,he)},hc.prototype.evaluate=function(y,I,U,$,ae,he){return this._styleExpression.evaluate(y,I,U,$,ae,he)},hc.prototype.interpolationFactor=function(y,I,U){return this.interpolationType?Wl.interpolationFactor(this.interpolationType,y,I,U):0};function Ku(m,y){if(m=oo(m,y),m.result==="error")return m;var I=m.value.expression,U=ih(I);if(!U&&!Ws(y))return ml([new Ns("","data expressions not supported")]);var $=Eu(I,["zoom"]);if(!$&&!Ls(y))return ml([new Ns("","zoom expressions not supported")]);var ae=B(I);if(!ae&&!$)return ml([new Ns("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ae instanceof Ns)return ml([ae]);if(ae instanceof Wl&&!va(y))return ml([new Ns("",'"interpolate" expressions cannot be used with this property')]);if(!ae)return Ho(U?new Vc("constant",m.value):new Vc("source",m.value));var he=ae instanceof Wl?ae.interpolation:void 0;return Ho(U?new hc("camera",m.value,ae.labels,he):new hc("composite",m.value,ae.labels,he))}var ue=function(y,I){this._parameters=y,this._specification=I,Ol(this,$l(this._parameters,this._specification))};ue.deserialize=function(y){return new ue(y._parameters,y._specification)},ue.serialize=function(y){return{_parameters:y._parameters,_specification:y._specification}};function w(m,y){if(ys(m))return new ue(m,y);if(Ua(m)){var I=Ku(m,y);if(I.result==="error")throw new Error(I.value.map(function($){return $.key+": "+$.message}).join(", "));return I.value}else{var U=m;return typeof m=="string"&&y.type==="color"&&(U=cs.parse(m)),{kind:"constant",evaluate:function(){return U}}}}function B(m){var y=null;if(m instanceof Oc)y=B(m.result);else if(m instanceof Zu)for(var I=0,U=m.args;IU.maximum?[new _a(y,I,I+" is greater than the maximum value "+U.maximum)]:[]}function ot(m){var y=m.valueSpec,I=xo(m.value.type),U,$={},ae,he,Oe=I!=="categorical"&&m.value.property===void 0,rt=!Oe,gt=no(m.value.stops)==="array"&&no(m.value.stops[0])==="array"&&no(m.value.stops[0][0])==="object",Et=le({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:or,default:Fr}});return I==="identity"&&Oe&&Et.push(new _a(m.key,m.value,'missing required property "property"')),I!=="identity"&&!m.value.stops&&Et.push(new _a(m.key,m.value,'missing required property "stops"')),I==="exponential"&&m.valueSpec.expression&&!va(m.valueSpec)&&Et.push(new _a(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(rt&&!Ws(m.valueSpec)?Et.push(new _a(m.key,m.value,"property functions not supported")):Oe&&!Ls(m.valueSpec)&&Et.push(new _a(m.key,m.value,"zoom functions not supported"))),(I==="categorical"||gt)&&m.value.property===void 0&&Et.push(new _a(m.key,m.value,'"property" property is required')),Et;function or(oi){if(I==="identity")return[new _a(oi.key,oi.value,'identity function may not have a "stops" property')];var Hi=[],Ai=oi.value;return Hi=Hi.concat(qe({key:oi.key,value:Ai,valueSpec:oi.valueSpec,style:oi.style,styleSpec:oi.styleSpec,arrayElementValidator:_r})),no(Ai)==="array"&&Ai.length===0&&Hi.push(new _a(oi.key,Ai,"array must have at least one stop")),Hi}function _r(oi){var Hi=[],Ai=oi.value,bn=oi.key;if(no(Ai)!=="array")return[new _a(bn,Ai,"array expected, "+no(Ai)+" found")];if(Ai.length!==2)return[new _a(bn,Ai,"array length 2 expected, length "+Ai.length+" found")];if(gt){if(no(Ai[0])!=="object")return[new _a(bn,Ai,"object expected, "+no(Ai[0])+" found")];if(Ai[0].zoom===void 0)return[new _a(bn,Ai,"object stop key must have zoom")];if(Ai[0].value===void 0)return[new _a(bn,Ai,"object stop key must have value")];if(he&&he>xo(Ai[0].zoom))return[new _a(bn,Ai[0].zoom,"stop zoom values must appear in ascending order")];xo(Ai[0].zoom)!==he&&(he=xo(Ai[0].zoom),ae=void 0,$={}),Hi=Hi.concat(le({key:bn+"[0]",value:Ai[0],valueSpec:{zoom:{}},style:oi.style,styleSpec:oi.styleSpec,objectElementValidators:{zoom:Xe,value:pr}}))}else Hi=Hi.concat(pr({key:bn+"[0]",value:Ai[0],valueSpec:{},style:oi.style,styleSpec:oi.styleSpec},Ai));return Ua(Yl(Ai[1]))?Hi.concat([new _a(bn+"[1]",Ai[1],"expressions are not allowed in function stops.")]):Hi.concat(Qa({key:bn+"[1]",value:Ai[1],valueSpec:y,style:oi.style,styleSpec:oi.styleSpec}))}function pr(oi,Hi){var Ai=no(oi.value),bn=xo(oi.value),nn=oi.value!==null?oi.value:Hi;if(!U)U=Ai;else if(Ai!==U)return[new _a(oi.key,nn,Ai+" stop domain type must match previous stop domain type "+U)];if(Ai!=="number"&&Ai!=="string"&&Ai!=="boolean")return[new _a(oi.key,nn,"stop domain value must be a number, string, or boolean")];if(Ai!=="number"&&I!=="categorical"){var xn="number expected, "+Ai+" found";return Ws(y)&&I===void 0&&(xn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _a(oi.key,nn,xn)]}return I==="categorical"&&Ai==="number"&&(!isFinite(bn)||Math.floor(bn)!==bn)?[new _a(oi.key,nn,"integer expected, found "+bn)]:I!=="categorical"&&Ai==="number"&&ae!==void 0&&bn=2&&m[1]!=="$id"&&m[1]!=="$type";case"in":return m.length>=3&&(typeof m[1]!="string"||Array.isArray(m[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case"any":case"all":for(var y=0,I=m.slice(1);yy?1:0}function Be(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var y=1;y"||y==="<="||y===">="?We(m[1],m[2],y):y==="any"?it(m.slice(1)):y==="all"?["all"].concat(m.slice(1).map(et)):y==="none"?["all"].concat(m.slice(1).map(et).map(tr)):y==="in"?Ft(m[1],m.slice(2)):y==="!in"?tr(Ft(m[1],m.slice(2))):y==="has"?Ht(m[1]):y==="!has"?tr(Ht(m[1])):y==="within"?m:!0;return I}function We(m,y,I){switch(m){case"$type":return["filter-type-"+I,y];case"$id":return["filter-id-"+I,y];default:return["filter-"+I,m,y]}}function it(m){return["any"].concat(m.map(et))}function Ft(m,y){if(y.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",y]];case"$id":return["filter-id-in",["literal",y]];default:return y.length>200&&!y.some(function(I){return typeof I!=typeof y[0]})?["filter-in-large",m,["literal",y.sort(De)]]:["filter-in-small",m,["literal",y]]}}function Ht(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function tr(m){return["!",m]}function dr(m){return Ir(Yl(m.value))?Tt(Ol({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Sr(m)}function Sr(m){var y=m.value,I=m.key;if(no(y)!=="array")return[new _a(I,y,"array expected, "+no(y)+" found")];var U=m.styleSpec,$,ae=[];if(y.length<1)return[new _a(I,y,"filter array must have at least 1 element")];switch(ae=ae.concat(xr({key:I+"[0]",value:y[0],valueSpec:U.filter_operator,style:m.style,styleSpec:m.styleSpec})),xo(y[0])){case"<":case"<=":case">":case">=":y.length>=2&&xo(y[1])==="$type"&&ae.push(new _a(I,y,'"$type" cannot be use with operator "'+y[0]+'"'));case"==":case"!=":y.length!==3&&ae.push(new _a(I,y,'filter array for operator "'+y[0]+'" must have 3 elements'));case"in":case"!in":y.length>=2&&($=no(y[1]),$!=="string"&&ae.push(new _a(I+"[1]",y[1],"string expected, "+$+" found")));for(var he=2;he=Et[pr+0]&&U>=Et[pr+1])?(he[_r]=!0,ae.push(gt[_r])):he[_r]=!1}}},Ql.prototype._forEachCell=function(m,y,I,U,$,ae,he,Oe){for(var rt=this._convertToCellCoord(m),gt=this._convertToCellCoord(y),Et=this._convertToCellCoord(I),or=this._convertToCellCoord(U),_r=rt;_r<=Et;_r++)for(var pr=gt;pr<=or;pr++){var Fr=this.d*pr+_r;if(!(Oe&&!Oe(this._convertFromCellCoord(_r),this._convertFromCellCoord(pr),this._convertFromCellCoord(_r+1),this._convertFromCellCoord(pr+1)))&&$.call(this,m,y,I,U,Fr,ae,he,Oe))return}},Ql.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},Ql.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},Ql.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,y=Js+this.cells.length+1+1,I=0,U=0;U=0)){var or=m[Et];gt[Et]=Al[rt].shallow.indexOf(Et)>=0?or:He(or,y)}m instanceof Error&&(gt.message=m.message)}if(gt.$name)throw new Error("$name property is reserved for worker serialization logic.");return rt!=="Object"&&(gt.$name=rt),gt}throw new Error("can't serialize object of type "+typeof m)}function Ye(m){if(m==null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Te(m)||Ne(m)||ArrayBuffer.isView(m)||m instanceof dc)return m;if(Array.isArray(m))return m.map(Ye);if(typeof m=="object"){var y=m.$name||"Object",I=Al[y],U=I.klass;if(!U)throw new Error("can't deserialize unregistered class "+y);if(U.deserialize)return U.deserialize(m);for(var $=Object.create(U.prototype),ae=0,he=Object.keys(m);ae=0?rt:Ye(rt)}}return $}throw new Error("can't deserialize object of type "+typeof m)}var kt=function(){this.first=!0};kt.prototype.update=function(y,I){var U=Math.floor(y);return this.first?(this.first=!1,this.lastIntegerZoom=U,this.lastIntegerZoomTime=0,this.lastZoom=y,this.lastFloorZoom=U,!0):(this.lastFloorZoom>U?(this.lastIntegerZoom=U+1,this.lastIntegerZoomTime=I):this.lastFloorZoom=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},"Arabic Supplement":function(m){return m>=1872&&m<=1919},"Arabic Extended-A":function(m){return m>=2208&&m<=2303},"Hangul Jamo":function(m){return m>=4352&&m<=4607},"Unified Canadian Aboriginal Syllabics":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(m){return m>=6320&&m<=6399},"General Punctuation":function(m){return m>=8192&&m<=8303},"Letterlike Symbols":function(m){return m>=8448&&m<=8527},"Number Forms":function(m){return m>=8528&&m<=8591},"Miscellaneous Technical":function(m){return m>=8960&&m<=9215},"Control Pictures":function(m){return m>=9216&&m<=9279},"Optical Character Recognition":function(m){return m>=9280&&m<=9311},"Enclosed Alphanumerics":function(m){return m>=9312&&m<=9471},"Geometric Shapes":function(m){return m>=9632&&m<=9727},"Miscellaneous Symbols":function(m){return m>=9728&&m<=9983},"Miscellaneous Symbols and Arrows":function(m){return m>=11008&&m<=11263},"CJK Radicals Supplement":function(m){return m>=11904&&m<=12031},"Kangxi Radicals":function(m){return m>=12032&&m<=12255},"Ideographic Description Characters":function(m){return m>=12272&&m<=12287},"CJK Symbols and Punctuation":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},"Hangul Compatibility Jamo":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},"Bopomofo Extended":function(m){return m>=12704&&m<=12735},"CJK Strokes":function(m){return m>=12736&&m<=12783},"Katakana Phonetic Extensions":function(m){return m>=12784&&m<=12799},"Enclosed CJK Letters and Months":function(m){return m>=12800&&m<=13055},"CJK Compatibility":function(m){return m>=13056&&m<=13311},"CJK Unified Ideographs Extension A":function(m){return m>=13312&&m<=19903},"Yijing Hexagram Symbols":function(m){return m>=19904&&m<=19967},"CJK Unified Ideographs":function(m){return m>=19968&&m<=40959},"Yi Syllables":function(m){return m>=40960&&m<=42127},"Yi Radicals":function(m){return m>=42128&&m<=42191},"Hangul Jamo Extended-A":function(m){return m>=43360&&m<=43391},"Hangul Syllables":function(m){return m>=44032&&m<=55215},"Hangul Jamo Extended-B":function(m){return m>=55216&&m<=55295},"Private Use Area":function(m){return m>=57344&&m<=63743},"CJK Compatibility Ideographs":function(m){return m>=63744&&m<=64255},"Arabic Presentation Forms-A":function(m){return m>=64336&&m<=65023},"Vertical Forms":function(m){return m>=65040&&m<=65055},"CJK Compatibility Forms":function(m){return m>=65072&&m<=65103},"Small Form Variants":function(m){return m>=65104&&m<=65135},"Arabic Presentation Forms-B":function(m){return m>=65136&&m<=65279},"Halfwidth and Fullwidth Forms":function(m){return m>=65280&&m<=65519}};function jt(m){for(var y=0,I=m;y=65097&&m<=65103)||nt["CJK Compatibility Ideographs"](m)||nt["CJK Compatibility"](m)||nt["CJK Radicals Supplement"](m)||nt["CJK Strokes"](m)||nt["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||nt["CJK Unified Ideographs Extension A"](m)||nt["CJK Unified Ideographs"](m)||nt["Enclosed CJK Letters and Months"](m)||nt["Hangul Compatibility Jamo"](m)||nt["Hangul Jamo Extended-A"](m)||nt["Hangul Jamo Extended-B"](m)||nt["Hangul Jamo"](m)||nt["Hangul Syllables"](m)||nt.Hiragana(m)||nt["Ideographic Description Characters"](m)||nt.Kanbun(m)||nt["Kangxi Radicals"](m)||nt["Katakana Phonetic Extensions"](m)||nt.Katakana(m)&&m!==12540||nt["Halfwidth and Fullwidth Forms"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||nt["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||nt["Unified Canadian Aboriginal Syllabics"](m)||nt["Unified Canadian Aboriginal Syllabics Extended"](m)||nt["Vertical Forms"](m)||nt["Yijing Hexagram Symbols"](m)||nt["Yi Syllables"](m)||nt["Yi Radicals"](m))}function _i(m){return!!(nt["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||nt["General Punctuation"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||nt["Letterlike Symbols"](m)||nt["Number Forms"](m)||nt["Miscellaneous Technical"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||nt["Control Pictures"](m)&&m!==9251||nt["Optical Character Recognition"](m)||nt["Enclosed Alphanumerics"](m)||nt["Geometric Shapes"](m)||nt["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||nt["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||nt["CJK Symbols and Punctuation"](m)||nt.Katakana(m)||nt["Private Use Area"](m)||nt["CJK Compatibility Forms"](m)||nt["Small Form Variants"](m)||nt["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function bi(m){return!(qr(m)||_i(m))}function Zr(m){return nt.Arabic(m)||nt["Arabic Supplement"](m)||nt["Arabic Extended-A"](m)||nt["Arabic Presentation Forms-A"](m)||nt["Arabic Presentation Forms-B"](m)}function ai(m){return m>=1424&&m<=2303||nt["Arabic Presentation Forms-A"](m)||nt["Arabic Presentation Forms-B"](m)}function gi(m,y){return!(!y&&ai(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||nt.Khmer(m))}function Ii(m){for(var y=0,I=m;y-1&&(En=ei.error),Ln&&Ln(m)};function Ea(){Ia.fire(new Wo("pluginStateChange",{pluginStatus:En,pluginURL:Un}))}var Ia=new Wn,yo=function(){return En},Da=function(m){return m({pluginStatus:En,pluginURL:Un}),Ia.on("pluginStateChange",m),m},go=function(m,y,I){if(I===void 0&&(I=!1),En===ei.deferred||En===ei.loading||En===ei.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Un=ut.resolveURL(m),En=ei.deferred,Ln=y,Ea(),I||Is()},Is=function(){if(En!==ei.deferred||!Un)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");En=ei.loading,Ea(),Un&&ri({url:Un},function(m){m?ia(m):(En=ei.loaded,Ea())})},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return En===ei.loaded||Ms.applyArabicShaping!=null},isLoading:function(){return En===ei.loading},setState:function(y){En=y.pluginStatus,Un=y.pluginURL},isParsed:function(){return Ms.applyArabicShaping!=null&&Ms.processBidirectionalText!=null&&Ms.processStyledBidirectionalText!=null},getPluginURL:function(){return Un}},Xs=function(){!Ms.isLoading()&&!Ms.isLoaded()&&yo()==="deferred"&&Is()},Gn=function(y,I){this.zoom=y,I?(this.now=I.now,this.fadeDuration=I.fadeDuration,this.zoomHistory=I.zoomHistory,this.transition=I.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new kt,this.transition={})};Gn.prototype.isSupportedScript=function(y){return Si(y,Ms.isLoaded())},Gn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Gn.prototype.getCrossfadeParameters=function(){var y=this.zoom,I=y-Math.floor(y),U=this.crossFadingFactor();return y>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:I+(1-I)*U}:{fromScale:.5,toScale:1,t:1-(1-U)*I}};var ja=function(y,I){this.property=y,this.value=I,this.expression=w(I===void 0?y.specification.default:I,y.specification)};ja.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ja.prototype.possiblyEvaluate=function(y,I,U){return this.property.possiblyEvaluate(this,y,I,U)};var Fo=function(y){this.property=y,this.value=new ja(y,void 0)};Fo.prototype.transitioned=function(y,I){return new $s(this.property,this.value,I,x({},y.transition,this.transition),y.now)},Fo.prototype.untransitioned=function(){return new $s(this.property,this.value,null,{},0)};var Uo=function(y){this._properties=y,this._values=Object.create(y.defaultTransitionablePropertyValues)};Uo.prototype.getValue=function(y){return j(this._values[y].value.value)},Uo.prototype.setValue=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].value=new ja(this._values[y].property,I===null?void 0:j(I))},Uo.prototype.getTransition=function(y){return j(this._values[y].transition)},Uo.prototype.setTransition=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].transition=j(I)||void 0},Uo.prototype.serialize=function(){for(var y={},I=0,U=Object.keys(this._values);Ithis.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if($he.zoomHistory.lastIntegerZoom?{from:U,to:$}:{from:ae,to:$}},y.prototype.interpolate=function(U){return U},y}(bt),Rr=function(y){this.specification=y};Rr.prototype.possiblyEvaluate=function(y,I,U,$){if(y.value!==void 0)if(y.expression.kind==="constant"){var ae=y.expression.evaluate(I,null,{},U,$);return this._calculate(ae,ae,ae,I)}else return this._calculate(y.expression.evaluate(new Gn(Math.floor(I.zoom-1),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom+1),I)),I)},Rr.prototype._calculate=function(y,I,U,$){var ae=$.zoom;return ae>$.zoomHistory.lastIntegerZoom?{from:y,to:I}:{from:U,to:I}},Rr.prototype.interpolate=function(y){return y};var jr=function(y){this.specification=y};jr.prototype.possiblyEvaluate=function(y,I,U,$){return!!y.expression.evaluate(I,null,{},U,$)},jr.prototype.interpolate=function(){return!1};var Nr=function(y){this.properties=y,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var I in y){var U=y[I];U.specification.overridable&&this.overridableProperties.push(I);var $=this.defaultPropertyValues[I]=new ja(U,void 0),ae=this.defaultTransitionablePropertyValues[I]=new Fo(U);this.defaultTransitioningPropertyValues[I]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=$.possiblyEvaluate({})}};X("DataDrivenProperty",bt),X("DataConstantProperty",Me),X("CrossFadedDataDrivenProperty",zt),X("CrossFadedProperty",Rr),X("ColorRampProperty",jr);var Gr="-transition",mi=function(m){function y(I,U){if(m.call(this),this.id=I.id,this.type=I.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},I.type!=="custom"&&(I=I,this.metadata=I.metadata,this.minzoom=I.minzoom,this.maxzoom=I.maxzoom,I.type!=="background"&&(this.source=I.source,this.sourceLayer=I["source-layer"],this.filter=I.filter),U.layout&&(this._unevaluatedLayout=new bu(U.layout)),U.paint)){this._transitionablePaint=new Uo(U.paint);for(var $ in I.paint)this.setPaintProperty($,I.paint[$],{validate:!1});for(var ae in I.layout)this.setLayoutProperty(ae,I.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Sc(U.paint)}}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},y.prototype.getLayoutProperty=function(U){return U==="visibility"?this.visibility:this._unevaluatedLayout.getValue(U)},y.prototype.setLayoutProperty=function(U,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".layout."+U;if(this._validate(Ul,he,U,$,ae))return}if(U==="visibility"){this.visibility=$;return}this._unevaluatedLayout.setValue(U,$)},y.prototype.getPaintProperty=function(U){return V(U,Gr)?this._transitionablePaint.getTransition(U.slice(0,-Gr.length)):this._transitionablePaint.getValue(U)},y.prototype.setPaintProperty=function(U,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".paint."+U;if(this._validate(hl,he,U,$,ae))return!1}if(V(U,Gr))return this._transitionablePaint.setTransition(U.slice(0,-Gr.length),$||void 0),!1;var Oe=this._transitionablePaint._values[U],rt=Oe.property.specification["property-type"]==="cross-faded-data-driven",gt=Oe.value.isDataDriven(),Et=Oe.value;this._transitionablePaint.setValue(U,$),this._handleSpecialPaintPropertyUpdate(U);var or=this._transitionablePaint._values[U].value,_r=or.isDataDriven();return _r||gt||rt||this._handleOverridablePaintPropertyUpdate(U,Et,or)},y.prototype._handleSpecialPaintPropertyUpdate=function(U){},y.prototype._handleOverridablePaintPropertyUpdate=function(U,$,ae){return!1},y.prototype.isHidden=function(U){return this.minzoom&&U=this.maxzoom?!0:this.visibility==="none"},y.prototype.updateTransitions=function(U){this._transitioningPaint=this._transitionablePaint.transitioned(U,this._transitioningPaint)},y.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},y.prototype.recalculate=function(U,$){U.getCrossfadeParameters&&(this._crossfadeParameters=U.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(U,void 0,$)),this.paint=this._transitioningPaint.possiblyEvaluate(U,void 0,$)},y.prototype.serialize=function(){var U={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(U.layout=U.layout||{},U.layout.visibility=this.visibility),Z(U,function($,ae){return $!==void 0&&!(ae==="layout"&&!Object.keys($).length)&&!(ae==="paint"&&!Object.keys($).length)})},y.prototype._validate=function(U,$,ae,he,Oe){return Oe===void 0&&(Oe={}),Oe&&Oe.validate===!1?!1:Lu(this,U.call(wo,{key:$,layerType:this.type,objectKey:ae,value:he,styleSpec:Rn,style:{glyphs:!0,sprite:!0}}))},y.prototype.is3D=function(){return!1},y.prototype.isTileClipped=function(){return!1},y.prototype.hasOffscreenPass=function(){return!1},y.prototype.resize=function(){},y.prototype.isStateDependent=function(){for(var U in this.paint._values){var $=this.paint.get(U);if(!(!($ instanceof dl)||!Ws($.property.specification))&&($.value.kind==="source"||$.value.kind==="composite")&&$.value.isStateDependent)return!0}return!1},y}(Wn),Ui={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},qi=function(y,I){this._structArray=y,this._pos1=I*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ei=128,Hn=5,en=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};en.serialize=function(y,I){return y._trim(),I&&(y.isTransferred=!0,I.push(y.arrayBuffer)),{length:y.length,arrayBuffer:y.arrayBuffer}},en.deserialize=function(y){var I=Object.create(this.prototype);return I.arrayBuffer=y.arrayBuffer,I.length=y.length,I.capacity=y.arrayBuffer.byteLength/I.bytesPerElement,I._refreshViews(),I},en.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},en.prototype.clear=function(){this.length=0},en.prototype.resize=function(y){this.reserve(y),this.length=y},en.prototype.reserve=function(y){if(y>this.capacity){this.capacity=Math.max(y,Math.floor(this.capacity*Hn),Ei),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},en.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Wi(m,y){y===void 0&&(y=1);var I=0,U=0,$=m.map(function(he){var Oe=si(he.type),rt=I=Mr(I,Math.max(y,Oe)),gt=he.components||1;return U=Math.max(U,Oe),I+=Oe*gt,{name:he.name,type:he.type,components:gt,offset:rt}}),ae=Mr(I,Math.max(U,y));return{members:$,size:ae,alignment:y}}function si(m){return Ui[m].BYTES_PER_ELEMENT}function Mr(m,y){return Math.ceil(m/y)*y}var Yr=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,U,$)},y.prototype.emplace=function(U,$,ae){var he=U*2;return this.int16[he+0]=$,this.int16[he+1]=ae,U},y}(en);Yr.prototype.bytesPerElement=4,X("StructArrayLayout2i4",Yr);var xi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,U,$,ae,he)},y.prototype.emplace=function(U,$,ae,he,Oe){var rt=U*4;return this.int16[rt+0]=$,this.int16[rt+1]=ae,this.int16[rt+2]=he,this.int16[rt+3]=Oe,U},y}(en);xi.prototype.bytesPerElement=8,X("StructArrayLayout4i8",xi);var Ri=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,U,$,ae,he,Oe,rt)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt){var Et=U*6;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.int16[Et+2]=he,this.int16[Et+3]=Oe,this.int16[Et+4]=rt,this.int16[Et+5]=gt,U},y}(en);Ri.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ri);var ci=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,U,$,ae,he,Oe,rt)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt){var Et=U*4,or=U*8;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.uint8[or+4]=he,this.uint8[or+5]=Oe,this.uint8[or+6]=rt,this.uint8[or+7]=gt,U},y}(en);ci.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",ci);var an=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,U,$)},y.prototype.emplace=function(U,$,ae){var he=U*2;return this.float32[he+0]=$,this.float32[he+1]=ae,U},y}(en);an.prototype.bytesPerElement=8,X("StructArrayLayout2f8",an);var Zi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Et,or,_r){var pr=this.length;return this.resize(pr+1),this.emplace(pr,U,$,ae,he,Oe,rt,gt,Et,or,_r)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Et,or,_r,pr){var Fr=U*10;return this.uint16[Fr+0]=$,this.uint16[Fr+1]=ae,this.uint16[Fr+2]=he,this.uint16[Fr+3]=Oe,this.uint16[Fr+4]=rt,this.uint16[Fr+5]=gt,this.uint16[Fr+6]=Et,this.uint16[Fr+7]=or,this.uint16[Fr+8]=_r,this.uint16[Fr+9]=pr,U},y}(en);Zi.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",Zi);var Bn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr){var oi=this.length;return this.resize(oi+1),this.emplace(oi,U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr,oi){var Hi=U*12;return this.int16[Hi+0]=$,this.int16[Hi+1]=ae,this.int16[Hi+2]=he,this.int16[Hi+3]=Oe,this.uint16[Hi+4]=rt,this.uint16[Hi+5]=gt,this.uint16[Hi+6]=Et,this.uint16[Hi+7]=or,this.int16[Hi+8]=_r,this.int16[Hi+9]=pr,this.int16[Hi+10]=Fr,this.int16[Hi+11]=oi,U},y}(en);Bn.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",Bn);var hi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*3;return this.float32[Oe+0]=$,this.float32[Oe+1]=ae,this.float32[Oe+2]=he,U},y}(en);hi.prototype.bytesPerElement=12,X("StructArrayLayout3f12",hi);var li=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},y.prototype.emplace=function(U,$){var ae=U*1;return this.uint32[ae+0]=$,U},y}(en);li.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",li);var mn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Et,or){var _r=this.length;return this.resize(_r+1),this.emplace(_r,U,$,ae,he,Oe,rt,gt,Et,or)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Et,or,_r){var pr=U*10,Fr=U*5;return this.int16[pr+0]=$,this.int16[pr+1]=ae,this.int16[pr+2]=he,this.int16[pr+3]=Oe,this.int16[pr+4]=rt,this.int16[pr+5]=gt,this.uint32[Fr+3]=Et,this.uint16[pr+8]=or,this.uint16[pr+9]=_r,U},y}(en);mn.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",mn);var Ji=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,U,$,ae,he,Oe,rt)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt){var Et=U*6;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.int16[Et+2]=he,this.int16[Et+3]=Oe,this.int16[Et+4]=rt,this.int16[Et+5]=gt,U},y}(en);Ji.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",Ji);var Vi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe){var rt=this.length;return this.resize(rt+1),this.emplace(rt,U,$,ae,he,Oe)},y.prototype.emplace=function(U,$,ae,he,Oe,rt){var gt=U*4,Et=U*8;return this.float32[gt+0]=$,this.float32[gt+1]=ae,this.float32[gt+2]=he,this.int16[Et+6]=Oe,this.int16[Et+7]=rt,U},y}(en);Vi.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",Vi);var Ni=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,U,$,ae,he)},y.prototype.emplace=function(U,$,ae,he,Oe){var rt=U*12,gt=U*3;return this.uint8[rt+0]=$,this.uint8[rt+1]=ae,this.float32[gt+1]=he,this.float32[gt+2]=Oe,U},y}(en);Ni.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",Ni);var pn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*3;return this.uint16[Oe+0]=$,this.uint16[Oe+1]=ae,this.uint16[Oe+2]=he,U},y}(en);pn.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",pn);var Vn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn){var xn=this.length;return this.resize(xn+1),this.emplace(xn,U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn){var Pn=U*24,Zn=U*12,ga=U*48;return this.int16[Pn+0]=$,this.int16[Pn+1]=ae,this.uint16[Pn+2]=he,this.uint16[Pn+3]=Oe,this.uint32[Zn+2]=rt,this.uint32[Zn+3]=gt,this.uint32[Zn+4]=Et,this.uint16[Pn+10]=or,this.uint16[Pn+11]=_r,this.uint16[Pn+12]=pr,this.float32[Zn+7]=Fr,this.float32[Zn+8]=oi,this.uint8[ga+36]=Hi,this.uint8[ga+37]=Ai,this.uint8[ga+38]=bn,this.uint32[Zn+10]=nn,this.int16[Pn+22]=xn,U},y}(en);Vn.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Vn);var na=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Ko,to,ao){var _s=this.length;return this.resize(_s+1),this.emplace(_s,U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Ko,to,ao)},y.prototype.emplace=function(U,$,ae,he,Oe,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Ko,to,ao,_s){var jo=U*34,El=U*17;return this.int16[jo+0]=$,this.int16[jo+1]=ae,this.int16[jo+2]=he,this.int16[jo+3]=Oe,this.int16[jo+4]=rt,this.int16[jo+5]=gt,this.int16[jo+6]=Et,this.int16[jo+7]=or,this.uint16[jo+8]=_r,this.uint16[jo+9]=pr,this.uint16[jo+10]=Fr,this.uint16[jo+11]=oi,this.uint16[jo+12]=Hi,this.uint16[jo+13]=Ai,this.uint16[jo+14]=bn,this.uint16[jo+15]=nn,this.uint16[jo+16]=xn,this.uint16[jo+17]=Pn,this.uint16[jo+18]=Zn,this.uint16[jo+19]=ga,this.uint16[jo+20]=ha,this.uint16[jo+21]=eo,this.uint16[jo+22]=za,this.uint32[El+12]=Za,this.float32[El+13]=Ko,this.float32[El+14]=to,this.float32[El+15]=ao,this.float32[El+16]=_s,U},y}(en);na.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",na);var Ki=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},y.prototype.emplace=function(U,$){var ae=U*1;return this.float32[ae+0]=$,U},y}(en);Ki.prototype.bytesPerElement=4,X("StructArrayLayout1f4",Ki);var kn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*3;return this.int16[Oe+0]=$,this.int16[Oe+1]=ae,this.int16[Oe+2]=he,U},y}(en);kn.prototype.bytesPerElement=6,X("StructArrayLayout3i6",kn);var ta=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,ae)},y.prototype.emplace=function(U,$,ae,he){var Oe=U*2,rt=U*4;return this.uint32[Oe+0]=$,this.uint16[rt+2]=ae,this.uint16[rt+3]=he,U},y}(en);ta.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",ta);var oa=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,U,$)},y.prototype.emplace=function(U,$,ae){var he=U*2;return this.uint16[he+0]=$,this.uint16[he+1]=ae,U},y}(en);oa.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",oa);var ba=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},y.prototype.emplace=function(U,$){var ae=U*1;return this.uint16[ae+0]=$,U},y}(en);ba.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",ba);var is=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,$,ae,he){var Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,U,$,ae,he)},y.prototype.emplace=function(U,$,ae,he,Oe){var rt=U*4;return this.float32[rt+0]=$,this.float32[rt+1]=ae,this.float32[rt+2]=he,this.float32[rt+3]=Oe,U},y}(en);is.prototype.bytesPerElement=16,X("StructArrayLayout4f16",is);var Zs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return I.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},I.x1.get=function(){return this._structArray.int16[this._pos2+2]},I.y1.get=function(){return this._structArray.int16[this._pos2+3]},I.x2.get=function(){return this._structArray.int16[this._pos2+4]},I.y2.get=function(){return this._structArray.int16[this._pos2+5]},I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(y.prototype,I),y}(qi);Zs.prototype.size=20;var Va=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new Zs(this,U)},y}(mn);X("CollisionBoxArray",Va);var Ml=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},I.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},I.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},I.segment.get=function(){return this._structArray.uint16[this._pos2+10]},I.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},I.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},I.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},I.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},I.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},I.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},I.placedOrientation.set=function(U){this._structArray.uint8[this._pos1+37]=U},I.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},I.hidden.set=function(U){this._structArray.uint8[this._pos1+38]=U},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},I.crossTileID.set=function(U){this._structArray.uint32[this._pos4+10]=U},I.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(y.prototype,I),y}(qi);Ml.prototype.size=48;var zo=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new Ml(this,U)},y}(Vn);X("PlacedSymbolArray",zo);var Qs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},I.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},I.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},I.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},I.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},I.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},I.key.get=function(){return this._structArray.uint16[this._pos2+8]},I.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},I.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},I.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},I.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},I.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},I.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},I.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},I.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},I.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},I.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},I.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},I.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},I.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},I.crossTileID.set=function(U){this._structArray.uint32[this._pos4+12]=U},I.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},I.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},I.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},I.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(y.prototype,I),y}(qi);Qs.prototype.size=68;var al=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new Qs(this,U)},y}(na);X("SymbolInstanceArray",al);var Vl=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getoffsetX=function(U){return this.float32[U*1+0]},y}(Ki);X("GlyphOffsetArray",Vl);var ss=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getx=function(U){return this.int16[U*3+0]},y.prototype.gety=function(U){return this.int16[U*3+1]},y.prototype.gettileUnitDistanceFromAnchor=function(U){return this.int16[U*3+2]},y}(kn);X("SymbolLineVertexArray",ss);var Vs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(y.prototype,I),y}(qi);Vs.prototype.size=8;var Ys=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(U){return new Vs(this,U)},y}(ta);X("FeatureIndexArray",Ys);var wa=Wi([{name:"a_pos",components:2,type:"Int16"}],4),ol=wa.members,io=function(y){y===void 0&&(y=[]),this.segments=y};io.prototype.prepareSegment=function(y,I,U,$){var ae=this.segments[this.segments.length-1];return y>io.MAX_VERTEX_ARRAY_LENGTH&&te("Max vertices per segment is "+io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+y),(!ae||ae.vertexLength+y>io.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==$)&&(ae={vertexOffset:I.length,primitiveOffset:U.length,vertexLength:0,primitiveLength:0},$!==void 0&&(ae.sortKey=$),this.segments.push(ae)),ae},io.prototype.get=function(){return this.segments},io.prototype.destroy=function(){for(var y=0,I=this.segments;y>>16)*rt&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*gt+(((Et>>>16)*gt&65535)<<16)&4294967295,he^=Et,he=he<<13|he>>>19,Oe=(he&65535)*5+(((he>>>16)*5&65535)<<16)&4294967295,he=(Oe&65535)+27492+(((Oe>>>16)+58964&65535)<<16);switch(Et=0,$){case 3:Et^=(I.charCodeAt(or+2)&255)<<16;case 2:Et^=(I.charCodeAt(or+1)&255)<<8;case 1:Et^=I.charCodeAt(or)&255,Et=(Et&65535)*rt+(((Et>>>16)*rt&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*gt+(((Et>>>16)*gt&65535)<<16)&4294967295,he^=Et}return he^=I.length,he^=he>>>16,he=(he&65535)*2246822507+(((he>>>16)*2246822507&65535)<<16)&4294967295,he^=he>>>13,he=(he&65535)*3266489909+(((he>>>16)*3266489909&65535)<<16)&4294967295,he^=he>>>16,he>>>0}m.exports=y}),q=a(function(m){function y(I,U){for(var $=I.length,ae=U^$,he=0,Oe;$>=4;)Oe=I.charCodeAt(he)&255|(I.charCodeAt(++he)&255)<<8|(I.charCodeAt(++he)&255)<<16|(I.charCodeAt(++he)&255)<<24,Oe=(Oe&65535)*1540483477+(((Oe>>>16)*1540483477&65535)<<16),Oe^=Oe>>>24,Oe=(Oe&65535)*1540483477+(((Oe>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^Oe,$-=4,++he;switch($){case 3:ae^=(I.charCodeAt(he+2)&255)<<16;case 2:ae^=(I.charCodeAt(he+1)&255)<<8;case 1:ae^=I.charCodeAt(he)&255,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)}return ae^=ae>>>13,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16),ae^=ae>>>15,ae>>>0}m.exports=y}),K=J,de=J,ne=q;K.murmur3=de,K.murmur2=ne;var we=function(){this.ids=[],this.positions=[],this.indexed=!1};we.prototype.add=function(y,I,U,$){this.ids.push(ft(y)),this.positions.push(I,U,$)},we.prototype.getPositions=function(y){for(var I=ft(y),U=0,$=this.ids.length-1;U<$;){var ae=U+$>>1;this.ids[ae]>=I?$=ae:U=ae+1}for(var he=[];this.ids[U]===I;){var Oe=this.positions[3*U],rt=this.positions[3*U+1],gt=this.positions[3*U+2];he.push({index:Oe,start:rt,end:gt}),U++}return he},we.serialize=function(y,I){var U=new Float64Array(y.ids),$=new Uint32Array(y.positions);return Xt(U,$,0,U.length-1),I&&I.push(U.buffer,$.buffer),{ids:U,positions:$}},we.deserialize=function(y){var I=new we;return I.ids=y.ids,I.positions=y.positions,I.indexed=!0,I};var Ue=Math.pow(2,53)-1;function ft(m){var y=+m;return!isNaN(y)&&y<=Ue?y:K(String(m))}function Xt(m,y,I,U){for(;I>1],ae=I-1,he=U+1;;){do ae++;while(m[ae]<$);do he--;while(m[he]>$);if(ae>=he)break;hr(m,ae,he),hr(y,3*ae,3*he),hr(y,3*ae+1,3*he+1),hr(y,3*ae+2,3*he+2)}he-Ihe.x+1||rthe.y+1)&&te("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return I}function Ja(m,y){return{type:m.type,id:m.id,properties:m.properties,geometry:y?zn(m):[]}}function co(m,y,I,U,$){m.emplaceBack(y*2+(U+1)/2,I*2+($+1)/2)}var ts=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Yr,this.indexArray=new pn,this.segments=new io,this.programConfigurations=new fi(y.layers,y.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ts.prototype.populate=function(y,I,U){var $=this.layers[0],ae=[],he=null;$.type==="circle"&&(he=$.layout.get("circle-sort-key"));for(var Oe=0,rt=y;Oe=Ci||_r<0||_r>=Ci)){var pr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,y.sortKey),Fr=pr.vertexLength;co(this.layoutVertexArray,or,_r,-1,-1),co(this.layoutVertexArray,or,_r,1,-1),co(this.layoutVertexArray,or,_r,1,1),co(this.layoutVertexArray,or,_r,-1,1),this.indexArray.emplaceBack(Fr,Fr+1,Fr+2),this.indexArray.emplaceBack(Fr,Fr+3,Fr+2),pr.vertexLength+=4,pr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,U,{},$)},X("CircleBucket",ts,{omit:["layers"]});function so(m,y){for(var I=0;I=3){for(var ae=0;ae<$.length;ae++)if(Td(m,$[ae]))return!0}if(Cv(m,$,I))return!0}return!1}function Cv(m,y,I){if(m.length>1){if(Lv(m,y))return!0;for(var U=0;U1?m.distSqr(I):m.distSqr(I.sub(y)._mult($)._add(y))}function pp(m,y){for(var I=!1,U,$,ae,he=0;hey.y!=ae.y>y.y&&y.x<(ae.x-$.x)*(y.y-$.y)/(ae.y-$.y)+$.x&&(I=!I)}return I}function Td(m,y){for(var I=!1,U=0,$=m.length-1;Uy.y!=he.y>y.y&&y.x<(he.x-ae.x)*(y.y-ae.y)/(he.y-ae.y)+ae.x&&(I=!I)}return I}function gp(m,y,I,U,$){for(var ae=0,he=m;ae=Oe.x&&$>=Oe.y)return!0}var rt=[new u(y,I),new u(y,$),new u(U,$),new u(U,I)];if(m.length>2)for(var gt=0,Et=rt;gt$.x&&y.x>$.x||m.y$.y&&y.y>$.y)return!1;var ae=oe(m,y,I[0]);return ae!==oe(m,y,I[1])||ae!==oe(m,y,I[2])||ae!==oe(m,y,I[3])}function Ad(m,y,I){var U=y.paint.get(m).value;return U.kind==="constant"?U.value:I.programConfigurations.get(y.id).getMaxValue(m)}function Pv(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Jv(m,y,I,U,$){if(!y[0]&&!y[1])return m;var ae=u.convert(y)._mult($);I==="viewport"&&ae._rotate(-U);for(var he=[],Oe=0;Oe0&&(ae=1/Math.sqrt(ae)),m[0]=y[0]*ae,m[1]=y[1]*ae,m[2]=y[2]*ae,m}function q9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]}function B9(m,y,I){var U=y[0],$=y[1],ae=y[2],he=I[0],Oe=I[1],rt=I[2];return m[0]=$*rt-ae*Oe,m[1]=ae*he-U*rt,m[2]=U*Oe-$*he,m}function N9(m,y,I){var U=y[0],$=y[1],ae=y[2];return m[0]=U*I[0]+$*I[3]+ae*I[6],m[1]=U*I[1]+$*I[4]+ae*I[7],m[2]=U*I[2]+$*I[5]+ae*I[8],m}var U9=sm,LQ=function(){var m=om();return function(y,I,U,$,ae,he){var Oe,rt;for(I||(I=3),U||(U=0),$?rt=Math.min($*I+U,y.length):rt=y.length,Oe=U;Oem.width||$.height>m.height||I.x>m.width-$.width||I.y>m.height-$.height)throw new RangeError("out of range source coordinates for image copy");if($.width>y.width||$.height>y.height||U.x>y.width-$.width||U.y>y.height-$.height)throw new RangeError("out of range destination coordinates for image copy");for(var he=m.data,Oe=y.data,rt=0;rt<$.height;rt++)for(var gt=((I.y+rt)*m.width+I.x)*ae,Et=((U.y+rt)*y.width+U.x)*ae,or=0;or<$.width*ae;or++)Oe[Et+or]=he[gt+or];return y}var Dv=function(y,I){Md(this,y,1,I)};Dv.prototype.resize=function(y){Lw(this,y,1)},Dv.prototype.clone=function(){return new Dv({width:this.width,height:this.height},new Uint8Array(this.data))},Dv.copy=function(y,I,U,$,ae){Pw(y,I,U,$,ae,1)};var Sh=function(y,I){Md(this,y,4,I)};Sh.prototype.resize=function(y){Lw(this,y,4)},Sh.prototype.replace=function(y,I){I?this.data.set(y):y instanceof Uint8ClampedArray?this.data=new Uint8Array(y.buffer):this.data=y},Sh.prototype.clone=function(){return new Sh({width:this.width,height:this.height},new Uint8Array(this.data))},Sh.copy=function(y,I,U,$,ae){Pw(y,I,U,$,ae,4)},X("AlphaImage",Dv),X("RGBAImage",Sh);var Gx=new Nr({"heatmap-radius":new bt(Rn.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bt(Rn.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Me(Rn.paint_heatmap["heatmap-intensity"]),"heatmap-color":new jr(Rn.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Me(Rn.paint_heatmap["heatmap-opacity"])}),A1={paint:Gx};function Hx(m){var y={},I=m.resolution||256,U=m.clips?m.clips.length:1,$=m.image||new Sh({width:I,height:U}),ae=function(bn,nn,xn){y[m.evaluationKey]=xn;var Pn=m.expression.evaluate(y);$.data[bn+nn+0]=Math.floor(Pn.r*255/Pn.a),$.data[bn+nn+1]=Math.floor(Pn.g*255/Pn.a),$.data[bn+nn+2]=Math.floor(Pn.b*255/Pn.a),$.data[bn+nn+3]=Math.floor(Pn.a*255)};if(m.clips)for(var gt=0,Et=0;gt80*I){Oe=gt=m[0],rt=Et=m[1];for(var Fr=I;Fr<$;Fr+=I)or=m[Fr],_r=m[Fr+1],orgt&&(gt=or),_r>Et&&(Et=_r);pr=Math.max(gt-Oe,Et-rt),pr=pr!==0?1/pr:0}return jx(ae,he,I,Oe,rt,pr),he}function Dw(m,y,I,U,$){var ae,he;if($===dS(m,y,I,U)>0)for(ae=y;ae=y;ae-=U)he=EC(ae,m[ae],m[ae+1],he);return he&&Xx(he,he.next)&&(Kx(he),he=he.next),he}function lm(m,y){if(!m)return m;y||(y=m);var I=m,U;do if(U=!1,!I.steiner&&(Xx(I,I.next)||Tf(I.prev,I,I.next)===0)){if(Kx(I),I=y=I.prev,I===I.next)break;U=!0}else I=I.next;while(U||I!==y);return y}function jx(m,y,I,U,$,ae,he){if(m){!he&&ae&&Fw(m,U,$,ae);for(var Oe=m,rt,gt;m.prev!==m.next;){if(rt=m.prev,gt=m.next,ae?AC(m,U,$,ae):TC(m)){y.push(rt.i/I),y.push(m.i/I),y.push(gt.i/I),Kx(m),m=gt.next,Oe=gt.next;continue}if(m=gt,m===Oe){he?he===1?(m=Wx(lm(m),y,I),jx(m,y,I,U,$,ae,2)):he===2&&d0(m,y,I,U,$,ae):jx(lm(m),y,I,U,$,ae,1);break}}}}function TC(m){var y=m.prev,I=m,U=m.next;if(Tf(y,I,U)>=0)return!1;for(var $=m.next.next;$!==m.prev;){if(cm(y.x,y.y,I.x,I.y,U.x,U.y,$.x,$.y)&&Tf($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function AC(m,y,I,U){var $=m.prev,ae=m,he=m.next;if(Tf($,ae,he)>=0)return!1;for(var Oe=$.xae.x?$.x>he.x?$.x:he.x:ae.x>he.x?ae.x:he.x,Et=$.y>ae.y?$.y>he.y?$.y:he.y:ae.y>he.y?ae.y:he.y,or=uS(Oe,rt,y,I,U),_r=uS(gt,Et,y,I,U),pr=m.prevZ,Fr=m.nextZ;pr&&pr.z>=or&&Fr&&Fr.z<=_r;){if(pr!==m.prev&&pr!==m.next&&cm($.x,$.y,ae.x,ae.y,he.x,he.y,pr.x,pr.y)&&Tf(pr.prev,pr,pr.next)>=0||(pr=pr.prevZ,Fr!==m.prev&&Fr!==m.next&&cm($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&Tf(Fr.prev,Fr,Fr.next)>=0))return!1;Fr=Fr.nextZ}for(;pr&&pr.z>=or;){if(pr!==m.prev&&pr!==m.next&&cm($.x,$.y,ae.x,ae.y,he.x,he.y,pr.x,pr.y)&&Tf(pr.prev,pr,pr.next)>=0)return!1;pr=pr.prevZ}for(;Fr&&Fr.z<=_r;){if(Fr!==m.prev&&Fr!==m.next&&cm($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&Tf(Fr.prev,Fr,Fr.next)>=0)return!1;Fr=Fr.nextZ}return!0}function Wx(m,y,I){var U=m;do{var $=U.prev,ae=U.next.next;!Xx($,ae)&&zw($,U,U.next,ae)&&Yx($,ae)&&Yx(ae,$)&&(y.push($.i/I),y.push(U.i/I),y.push(ae.i/I),Kx(U),Kx(U.next),U=m=ae),U=U.next}while(U!==m);return lm(U)}function d0(m,y,I,U,$,ae){var he=m;do{for(var Oe=he.next.next;Oe!==he.prev;){if(he.i!==Oe.i&&M1(he,Oe)){var rt=fS(he,Oe);he=lm(he,he.next),rt=lm(rt,rt.next),jx(he,y,I,U,$,ae),jx(rt,y,I,U,$,ae);return}Oe=Oe.next}he=he.next}while(he!==m)}function um(m,y,I,U){var $=[],ae,he,Oe,rt,gt;for(ae=0,he=y.length;ae=I.next.y&&I.next.y!==I.y){var Oe=I.x+($-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Oe<=U&&Oe>ae){if(ae=Oe,Oe===U){if($===I.y)return I;if($===I.next.y)return I.next}he=I.x=I.x&&I.x>=gt&&U!==I.x&&cm($he.x||I.x===he.x&&K9(he,I)))&&(he=I,or=_r)),I=I.next;while(I!==rt);return he}function K9(m,y){return Tf(m.prev,m,y.prev)<0&&Tf(y.next,m,m.next)<0}function Fw(m,y,I,U){var $=m;do $.z===null&&($.z=uS($.x,$.y,y,I,U)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==m);$.prevZ.nextZ=null,$.prevZ=null,lS($)}function lS(m){var y,I,U,$,ae,he,Oe,rt,gt=1;do{for(I=m,m=null,ae=null,he=0;I;){for(he++,U=I,Oe=0,y=0;y0||rt>0&&U;)Oe!==0&&(rt===0||!U||I.z<=U.z)?($=I,I=I.nextZ,Oe--):($=U,U=U.nextZ,rt--),ae?ae.nextZ=$:m=$,$.prevZ=ae,ae=$;I=U}ae.nextZ=null,gt*=2}while(he>1);return m}function uS(m,y,I,U,$){return m=32767*(m-I)*$,y=32767*(y-U)*$,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,m|y<<1}function cS(m){var y=m,I=m;do(y.x=0&&(m-he)*(U-Oe)-(I-he)*(y-Oe)>=0&&(I-he)*(ae-Oe)-($-he)*(U-Oe)>=0}function M1(m,y){return m.next.i!==y.i&&m.prev.i!==y.i&&!MC(m,y)&&(Yx(m,y)&&Yx(y,m)&&J9(m,y)&&(Tf(m.prev,m,y.prev)||Tf(m,y.prev,y))||Xx(m,y)&&Tf(m.prev,m,m.next)>0&&Tf(y.prev,y,y.next)>0)}function Tf(m,y,I){return(y.y-m.y)*(I.x-y.x)-(y.x-m.x)*(I.y-y.y)}function Xx(m,y){return m.x===y.x&&m.y===y.y}function zw(m,y,I,U){var $=cy(Tf(m,y,I)),ae=cy(Tf(m,y,U)),he=cy(Tf(I,U,m)),Oe=cy(Tf(I,U,y));return!!($!==ae&&he!==Oe||$===0&&Zx(m,I,y)||ae===0&&Zx(m,U,y)||he===0&&Zx(I,m,U)||Oe===0&&Zx(I,y,U))}function Zx(m,y,I){return y.x<=Math.max(m.x,I.x)&&y.x>=Math.min(m.x,I.x)&&y.y<=Math.max(m.y,I.y)&&y.y>=Math.min(m.y,I.y)}function cy(m){return m>0?1:m<0?-1:0}function MC(m,y){var I=m;do{if(I.i!==m.i&&I.next.i!==m.i&&I.i!==y.i&&I.next.i!==y.i&&zw(I,I.next,m,y))return!0;I=I.next}while(I!==m);return!1}function Yx(m,y){return Tf(m.prev,m,m.next)<0?Tf(m,y,m.next)>=0&&Tf(m,m.prev,y)>=0:Tf(m,y,m.prev)<0||Tf(m,m.next,y)<0}function J9(m,y){var I=m,U=!1,$=(m.x+y.x)/2,ae=(m.y+y.y)/2;do I.y>ae!=I.next.y>ae&&I.next.y!==I.y&&$<(I.next.x-I.x)*(ae-I.y)/(I.next.y-I.y)+I.x&&(U=!U),I=I.next;while(I!==m);return U}function fS(m,y){var I=new hS(m.i,m.x,m.y),U=new hS(y.i,y.x,y.y),$=m.next,ae=y.prev;return m.next=y,y.prev=m,I.next=$,$.prev=I,U.next=I,I.prev=U,ae.next=U,U.prev=ae,U}function EC(m,y,I,U){var $=new hS(m,y,I);return U?($.next=U.next,$.prev=U,U.next.prev=$,U.next=$):($.prev=$,$.next=$),$}function Kx(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function hS(m,y,I){this.i=m,this.x=y,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}S1.deviation=function(m,y,I,U){var $=y&&y.length,ae=$?y[0]*I:m.length,he=Math.abs(dS(m,0,ae,I));if($)for(var Oe=0,rt=y.length;Oe0&&(U+=m[$-1].length,I.holes.push(U))}return I},Rw.default=wC;function vS(m,y,I,U,$){dg(m,y,I||0,U||m.length-1,$||kC)}function dg(m,y,I,U,$){for(;U>I;){if(U-I>600){var ae=U-I+1,he=y-I+1,Oe=Math.log(ae),rt=.5*Math.exp(2*Oe/3),gt=.5*Math.sqrt(Oe*rt*(ae-rt)/ae)*(he-ae/2<0?-1:1),Et=Math.max(I,Math.floor(y-he*rt/ae+gt)),or=Math.min(U,Math.floor(y+(ae-he)*rt/ae+gt));dg(m,y,Et,or,$)}var _r=m[y],pr=I,Fr=U;for(E1(m,I,y),$(m[U],_r)>0&&E1(m,I,U);pr0;)Fr--}$(m[I],_r)===0?E1(m,I,Fr):(Fr++,E1(m,Fr,U)),Fr<=y&&(I=Fr+1),y<=Fr&&(U=Fr-1)}}function E1(m,y,I){var U=m[y];m[y]=m[I],m[I]=U}function kC(m,y){return my?1:0}function Ow(m,y){var I=m.length;if(I<=1)return[m];for(var U=[],$,ae,he=0;he1)for(var rt=0;rt>3}if(U--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),I===1&&(Oe&&he.push(Oe),Oe=[]),Oe.push(new u($,ae));else if(I===7)Oe&&Oe.push(Oe[0].clone());else throw new Error("unknown command "+I)}return Oe&&he.push(Oe),he},fy.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,U=0,$=0,ae=0,he=1/0,Oe=-1/0,rt=1/0,gt=-1/0;m.pos>3}if(U--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),$Oe&&(Oe=$),aegt&&(gt=ae);else if(I!==7)throw new Error("unknown command "+I)}return[he,rt,Oe,gt]},fy.prototype.toGeoJSON=function(m,y,I){var U=this.extent*Math.pow(2,I),$=this.extent*m,ae=this.extent*y,he=this.loadGeometry(),Oe=fy.types[this.type],rt,gt;function Et(pr){for(var Fr=0;Fr>3;y=U===1?m.readString():U===2?m.readFloat():U===3?m.readDouble():U===4?m.readVarint64():U===5?m.readVarint():U===6?m.readSVarint():U===7?m.readBoolean():null}return y}mS.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[m];var y=this._pbf.readVarint()+this._pbf.pos;return new gS(this._pbf,y,this.extent,this._keys,this._values)};var qC=Q9;function Q9(m,y){this.layers=m.readFields(eO,{},y)}function eO(m,y,I){if(m===3){var U=new vg(I,I.readVarint()+I.pos);U.length&&(y[U.name]=U)}}var BC=qC,k1=gS,NC=vg,pg={VectorTile:BC,VectorTileFeature:k1,VectorTileLayer:NC},UC=pg.VectorTileFeature.types,Bw=500,C1=Math.pow(2,13);function fm(m,y,I,U,$,ae,he,Oe){m.emplaceBack(y,I,Math.floor(U*C1)*2+he,$*C1*2,ae*C1*2,Math.round(Oe))}var Vp=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new pn,this.programConfigurations=new fi(y.layers,y.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Vp.prototype.populate=function(y,I,U){this.features=[],this.hasPattern=qw("fill-extrusion",this.layers,I);for(var $=0,ae=y;$=1){var xn=Hi[bn-1];if(!tO(nn,xn)){pr.vertexLength+4>io.MAX_VERTEX_ARRAY_LENGTH&&(pr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Pn=nn.sub(xn)._perp()._unit(),Zn=xn.dist(nn);Ai+Zn>32768&&(Ai=0),fm(this.layoutVertexArray,nn.x,nn.y,Pn.x,Pn.y,0,0,Ai),fm(this.layoutVertexArray,nn.x,nn.y,Pn.x,Pn.y,0,1,Ai),Ai+=Zn,fm(this.layoutVertexArray,xn.x,xn.y,Pn.x,Pn.y,0,0,Ai),fm(this.layoutVertexArray,xn.x,xn.y,Pn.x,Pn.y,0,1,Ai);var ga=pr.vertexLength;this.indexArray.emplaceBack(ga,ga+2,ga+1),this.indexArray.emplaceBack(ga+1,ga+2,ga+3),pr.vertexLength+=4,pr.primitiveLength+=2}}}}if(pr.vertexLength+gt>io.MAX_VERTEX_ARRAY_LENGTH&&(pr=this.segments.prepareSegment(gt,this.layoutVertexArray,this.indexArray)),UC[y.type]==="Polygon"){for(var ha=[],eo=[],za=pr.vertexLength,Za=0,Ko=rt;ZaCi)||m.y===y.y&&(m.y<0||m.y>Ci)}function rO(m){return m.every(function(y){return y.x<0})||m.every(function(y){return y.x>Ci})||m.every(function(y){return y.y<0})||m.every(function(y){return y.y>Ci})}var L1=new Nr({"fill-extrusion-opacity":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new zt(Rn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),sd={paint:L1},hm=function(m){function y(I){m.call(this,I,sd)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(U){return new Vp(U)},y.prototype.queryRadius=function(){return Pv(this.paint.get("fill-extrusion-translate"))},y.prototype.is3D=function(){return!0},y.prototype.queryIntersectsFeature=function(U,$,ae,he,Oe,rt,gt,Et){var or=Jv(U,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),rt.angle,gt),_r=this.paint.get("fill-extrusion-height").evaluate($,ae),pr=this.paint.get("fill-extrusion-base").evaluate($,ae),Fr=iO(or,Et,rt,0),oi=_S(he,pr,_r,Et),Hi=oi[0],Ai=oi[1];return VC(Hi,Ai,Fr)},y}(mi);function hy(m,y){return m.x*y.x+m.y*y.y}function yS(m,y){if(m.length===1){for(var I=0,U=y[I++],$;!$||U.equals($);)if($=y[I++],!$)return 1/0;for(;I=2&&y[gt-1].equals(y[gt-2]);)gt--;for(var Et=0;Et0;if(ha&&bn>Et){var za=pr.dist(Fr);if(za>2*or){var Za=pr.sub(pr.sub(Fr)._mult(or/za)._round());this.updateDistance(Fr,Za),this.addCurrentVertex(Za,Hi,0,0,_r),Fr=Za}}var Ko=Fr&&oi,to=Ko?U:rt?"butt":$;if(Ko&&to==="round"&&(Znae&&(to="bevel"),to==="bevel"&&(Zn>2&&(to="flipbevel"),Zn100)nn=Ai.mult(-1);else{var ao=Zn*Hi.add(Ai).mag()/Hi.sub(Ai).mag();nn._perp()._mult(ao*(eo?-1:1))}this.addCurrentVertex(pr,nn,0,0,_r),this.addCurrentVertex(pr,nn.mult(-1),0,0,_r)}else if(to==="bevel"||to==="fakeround"){var _s=-Math.sqrt(Zn*Zn-1),jo=eo?_s:0,El=eo?0:_s;if(Fr&&this.addCurrentVertex(pr,Hi,jo,El,_r),to==="fakeround")for(var Iu=Math.round(ga*180/Math.PI/bS),kl=1;kl2*or){var ch=pr.add(oi.sub(pr)._mult(or/Yh)._round());this.updateDistance(pr,ch),this.addCurrentVertex(ch,Ai,0,0,_r),pr=ch}}}}},sh.prototype.addCurrentVertex=function(y,I,U,$,ae,he){he===void 0&&(he=!1);var Oe=I.x+I.y*U,rt=I.y-I.x*U,gt=-I.x+I.y*$,Et=-I.y-I.x*$;this.addHalfVertex(y,Oe,rt,he,!1,U,ae),this.addHalfVertex(y,gt,Et,he,!0,-$,ae),this.distance>tb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(y,I,U,$,ae,he))},sh.prototype.addHalfVertex=function(y,I,U,$,ae,he,Oe){var rt=y.x,gt=y.y,Et=this.lineClips?this.scaledDistance*(tb-1):this.scaledDistance,or=Et*Uw;if(this.layoutVertexArray.emplaceBack((rt<<1)+($?1:0),(gt<<1)+(ae?1:0),Math.round(Nw*I)+128,Math.round(Nw*U)+128,(he===0?0:he<0?-1:1)+1|(or&63)<<2,or>>6),this.lineClips){var _r=this.scaledDistance-this.lineClips.start,pr=this.lineClips.end-this.lineClips.start,Fr=_r/pr;this.layoutVertexArray2.emplaceBack(Fr,this.lineClipsArray.length)}var oi=Oe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,oi),Oe.primitiveLength++),ae?this.e2=oi:this.e1=oi},sh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},sh.prototype.updateDistance=function(y,I){this.distance+=y.dist(I),this.updateScaledDistance()},X("LineBucket",sh,{omit:["layers","patternFeatures"]});var wS=new Nr({"line-cap":new Me(Rn.layout_line["line-cap"]),"line-join":new bt(Rn.layout_line["line-join"]),"line-miter-limit":new Me(Rn.layout_line["line-miter-limit"]),"line-round-limit":new Me(Rn.layout_line["line-round-limit"]),"line-sort-key":new bt(Rn.layout_line["line-sort-key"])}),TS=new Nr({"line-opacity":new bt(Rn.paint_line["line-opacity"]),"line-color":new bt(Rn.paint_line["line-color"]),"line-translate":new Me(Rn.paint_line["line-translate"]),"line-translate-anchor":new Me(Rn.paint_line["line-translate-anchor"]),"line-width":new bt(Rn.paint_line["line-width"]),"line-gap-width":new bt(Rn.paint_line["line-gap-width"]),"line-offset":new bt(Rn.paint_line["line-offset"]),"line-blur":new bt(Rn.paint_line["line-blur"]),"line-dasharray":new Rr(Rn.paint_line["line-dasharray"]),"line-pattern":new zt(Rn.paint_line["line-pattern"]),"line-gradient":new jr(Rn.paint_line["line-gradient"])}),Vw={paint:TS,layout:wS},aO=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.possiblyEvaluate=function(U,$){return $=new Gn(Math.floor($.zoom),{now:$.now,fadeDuration:$.fadeDuration,zoomHistory:$.zoomHistory,transition:$.transition}),m.prototype.possiblyEvaluate.call(this,U,$)},y.prototype.evaluate=function(U,$,ae,he){return $=x({},$,{zoom:Math.floor($.zoom)}),m.prototype.evaluate.call(this,U,$,ae,he)},y}(bt),R=new aO(Vw.paint.properties["line-width"].specification);R.useIntegerZoom=!0;var A=function(m){function y(I){m.call(this,I,Vw),this.gradientVersion=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._handleSpecialPaintPropertyUpdate=function(U){if(U==="line-gradient"){var $=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=$._styleExpression.expression instanceof _u,this.gradientVersion=(this.gradientVersion+1)%d}},y.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},y.prototype.recalculate=function(U,$){m.prototype.recalculate.call(this,U,$),this.paint._values["line-floorwidth"]=R.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,U)},y.prototype.createBucket=function(U){return new sh(U)},y.prototype.queryRadius=function(U){var $=U,ae=F(Ad("line-width",this,$),Ad("line-gap-width",this,$)),he=Ad("line-offset",this,$);return ae/2+Math.abs(he)+Pv(this.paint.get("line-translate"))},y.prototype.queryIntersectsFeature=function(U,$,ae,he,Oe,rt,gt){var Et=Jv(U,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),rt.angle,gt),or=gt/2*F(this.paint.get("line-width").evaluate($,ae),this.paint.get("line-gap-width").evaluate($,ae)),_r=this.paint.get("line-offset").evaluate($,ae);return _r&&(he=W(he,_r*gt)),ou(Et,he,or)},y.prototype.isTileClipped=function(){return!0},y}(mi);function F(m,y){return y>0?y+2*m:m}function W(m,y){for(var I=[],U=new u(0,0),$=0;$":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function un(m){for(var y="",I=0;I>1,Et=-7,or=I?$-1:0,_r=I?-1:1,pr=m[y+or];for(or+=_r,ae=pr&(1<<-Et)-1,pr>>=-Et,Et+=Oe;Et>0;ae=ae*256+m[y+or],or+=_r,Et-=8);for(he=ae&(1<<-Et)-1,ae>>=-Et,Et+=U;Et>0;he=he*256+m[y+or],or+=_r,Et-=8);if(ae===0)ae=1-gt;else{if(ae===rt)return he?NaN:(pr?-1:1)*(1/0);he=he+Math.pow(2,U),ae=ae-gt}return(pr?-1:1)*he*Math.pow(2,ae-U)},ro=function(m,y,I,U,$,ae){var he,Oe,rt,gt=ae*8-$-1,Et=(1<>1,_r=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,pr=U?0:ae-1,Fr=U?1:-1,oi=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(Oe=isNaN(y)?1:0,he=Et):(he=Math.floor(Math.log(y)/Math.LN2),y*(rt=Math.pow(2,-he))<1&&(he--,rt*=2),he+or>=1?y+=_r/rt:y+=_r*Math.pow(2,1-or),y*rt>=2&&(he++,rt/=2),he+or>=Et?(Oe=0,he=Et):he+or>=1?(Oe=(y*rt-1)*Math.pow(2,$),he=he+or):(Oe=y*Math.pow(2,or-1)*Math.pow(2,$),he=0));$>=8;m[I+pr]=Oe&255,pr+=Fr,Oe/=256,$-=8);for(he=he<<$|Oe,gt+=$;gt>0;m[I+pr]=he&255,pr+=Fr,he/=256,gt-=8);m[I+pr-Fr]|=oi*128},Vo={read:pa,write:ro},Xa=sa;function sa(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}sa.Varint=0,sa.Fixed64=1,sa.Bytes=2,sa.Fixed32=5;var Mo=65536*65536,fo=1/Mo,lo=12,Xn=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");sa.prototype={destroy:function(){this.buf=null},readFields:function(m,y,I){for(I=I||this.length;this.pos>3,ae=this.pos;this.type=U&7,m($,y,this),this.pos===ae&&this.skip(U)}return y},readMessage:function(m,y){return this.readFields(m,y,this.readVarint()+this.pos)},readFixed32:function(){var m=Wh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Fv(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Wh(this.buf,this.pos)+Wh(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readSFixed64:function(){var m=Wh(this.buf,this.pos)+Fv(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readFloat:function(){var m=Vo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Vo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var y=this.buf,I,U;return U=y[this.pos++],I=U&127,U<128||(U=y[this.pos++],I|=(U&127)<<7,U<128)||(U=y[this.pos++],I|=(U&127)<<14,U<128)||(U=y[this.pos++],I|=(U&127)<<21,U<128)?I:(U=y[this.pos],I|=(U&15)<<28,Ro(I,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,y=this.pos;return this.pos=m,m-y>=lo&&Xn?tu(this.buf,y,m):lv(this.buf,y,m)},readBytes:function(){var m=this.readVarint()+this.pos,y=this.buf.subarray(this.pos,m);return this.pos=m,y},readPackedVarint:function(m,y){if(this.type!==sa.Bytes)return m.push(this.readVarint(y));var I=uo(this);for(m=m||[];this.pos127;);else if(y===sa.Bytes)this.pos=this.readVarint()+this.pos;else if(y===sa.Fixed32)this.pos+=4;else if(y===sa.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+y)},writeTag:function(m,y){this.writeVarint(m<<3|y)},realloc:function(m){for(var y=this.length||16;y268435455||m<0){Ju(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var y=this.pos;this.pos=pc(this.buf,m,this.pos);var I=this.pos-y;I>=128&&Qv(y,I,this),this.pos=y-1,this.writeVarint(I),this.pos+=I},writeFloat:function(m){this.realloc(4),Vo.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Vo.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var y=m.length;this.writeVarint(y),this.realloc(y);for(var I=0;I=128&&Qv(I,U,this),this.pos=I-1,this.writeVarint(U),this.pos+=U},writeMessage:function(m,y,I){this.writeTag(m,sa.Bytes),this.writeRawMessage(y,I)},writePackedVarint:function(m,y){y.length&&this.writeMessage(m,ld,y)},writePackedSVarint:function(m,y){y.length&&this.writeMessage(m,Eh,y)},writePackedBoolean:function(m,y){y.length&&this.writeMessage(m,jd,y)},writePackedFloat:function(m,y){y.length&&this.writeMessage(m,Gd,y)},writePackedDouble:function(m,y){y.length&&this.writeMessage(m,Hd,y)},writePackedFixed32:function(m,y){y.length&&this.writeMessage(m,Af,y)},writePackedSFixed32:function(m,y){y.length&&this.writeMessage(m,kh,y)},writePackedFixed64:function(m,y){y.length&&this.writeMessage(m,Ed,y)},writePackedSFixed64:function(m,y){y.length&&this.writeMessage(m,ud,y)},writeBytesField:function(m,y){this.writeTag(m,sa.Bytes),this.writeBytes(y)},writeFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFixed32(y)},writeSFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeSFixed32(y)},writeFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeFixed64(y)},writeSFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeSFixed64(y)},writeVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeVarint(y)},writeSVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeSVarint(y)},writeStringField:function(m,y){this.writeTag(m,sa.Bytes),this.writeString(y)},writeFloatField:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFloat(y)},writeDoubleField:function(m,y){this.writeTag(m,sa.Fixed64),this.writeDouble(y)},writeBooleanField:function(m,y){this.writeVarintField(m,!!y)}};function Ro(m,y,I){var U=I.buf,$,ae;if(ae=U[I.pos++],$=(ae&112)>>4,ae<128||(ae=U[I.pos++],$|=(ae&127)<<3,ae<128)||(ae=U[I.pos++],$|=(ae&127)<<10,ae<128)||(ae=U[I.pos++],$|=(ae&127)<<17,ae<128)||(ae=U[I.pos++],$|=(ae&127)<<24,ae<128)||(ae=U[I.pos++],$|=(ae&1)<<31,ae<128))return $o(m,$,y);throw new Error("Expected varint not more than 10 bytes")}function uo(m){return m.type===sa.Bytes?m.readVarint()+m.pos:m.pos+1}function $o(m,y,I){return I?y*4294967296+(m>>>0):(y>>>0)*4294967296+(m>>>0)}function Ju(m,y){var I,U;if(m>=0?(I=m%4294967296|0,U=m/4294967296|0):(I=~(-m%4294967296),U=~(-m/4294967296),I^4294967295?I=I+1|0:(I=0,U=U+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");y.realloc(10),qu(I,U,y),Mh(U,y)}function qu(m,y,I){I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos]=m&127}function Mh(m,y){var I=(m&7)<<4;y.buf[y.pos++]|=I|((m>>>=3)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127)))))}function Qv(m,y,I){var U=y<=16383?1:y<=2097151?2:y<=268435455?3:Math.floor(Math.log(y)/(Math.LN2*7));I.realloc(U);for(var $=I.pos-1;$>=m;$--)I.buf[$+U]=I.buf[$]}function ld(m,y){for(var I=0;I>>8,m[I+2]=y>>>16,m[I+3]=y>>>24}function Fv(m,y){return(m[y]|m[y+1]<<8|m[y+2]<<16)+(m[y+3]<<24)}function lv(m,y,I){for(var U="",$=y;$239?4:ae>223?3:ae>191?2:1;if($+Oe>I)break;var rt,gt,Et;Oe===1?ae<128&&(he=ae):Oe===2?(rt=m[$+1],(rt&192)===128&&(he=(ae&31)<<6|rt&63,he<=127&&(he=null))):Oe===3?(rt=m[$+1],gt=m[$+2],(rt&192)===128&&(gt&192)===128&&(he=(ae&15)<<12|(rt&63)<<6|gt&63,(he<=2047||he>=55296&&he<=57343)&&(he=null))):Oe===4&&(rt=m[$+1],gt=m[$+2],Et=m[$+3],(rt&192)===128&&(gt&192)===128&&(Et&192)===128&&(he=(ae&15)<<18|(rt&63)<<12|(gt&63)<<6|Et&63,(he<=65535||he>=1114112)&&(he=null))),he===null?(he=65533,Oe=1):he>65535&&(he-=65536,U+=String.fromCharCode(he>>>10&1023|55296),he=56320|he&1023),U+=String.fromCharCode(he),$+=Oe}return U}function tu(m,y,I){return Xn.decode(m.subarray(y,I))}function pc(m,y,I){for(var U=0,$,ae;U55295&&$<57344)if(ae)if($<56320){m[I++]=239,m[I++]=191,m[I++]=189,ae=$;continue}else $=ae-55296<<10|$-56320|65536,ae=null;else{$>56319||U+1===y.length?(m[I++]=239,m[I++]=191,m[I++]=189):ae=$;continue}else ae&&(m[I++]=239,m[I++]=191,m[I++]=189,ae=null);$<128?m[I++]=$:($<2048?m[I++]=$>>6|192:($<65536?m[I++]=$>>12|224:(m[I++]=$>>18|240,m[I++]=$>>12&63|128),m[I++]=$>>6&63|128),m[I++]=$&63|128)}return I}var $u=3;function zv(m,y,I){m===1&&I.readMessage(ff,y)}function ff(m,y,I){if(m===3){var U=I.readMessage(P1,{}),$=U.id,ae=U.bitmap,he=U.width,Oe=U.height,rt=U.left,gt=U.top,Et=U.advance;y.push({id:$,bitmap:new Dv({width:he+2*$u,height:Oe+2*$u},ae),metrics:{width:he,height:Oe,left:rt,top:gt,advance:Et}})}}function P1(m,y,I){m===1?y.id=I.readVarint():m===2?y.bitmap=I.readBytes():m===3?y.width=I.readVarint():m===4?y.height=I.readVarint():m===5?y.left=I.readSVarint():m===6?y.top=I.readSVarint():m===7&&(y.advance=I.readVarint())}function v0(m){return new Xa(m).readFields(zv,[])}var Gp=$u;function ep(m){for(var y=0,I=0,U=0,$=m;U<$.length;U+=1){var ae=$[U];y+=ae.w*ae.h,I=Math.max(I,ae.w)}m.sort(function(Hi,Ai){return Ai.h-Hi.h});for(var he=Math.max(Math.ceil(Math.sqrt(y/.95)),I),Oe=[{x:0,y:0,w:he,h:1/0}],rt=0,gt=0,Et=0,or=m;Et=0;pr--){var Fr=Oe[pr];if(!(_r.w>Fr.w||_r.h>Fr.h)){if(_r.x=Fr.x,_r.y=Fr.y,gt=Math.max(gt,_r.y+_r.h),rt=Math.max(rt,_r.x+_r.w),_r.w===Fr.w&&_r.h===Fr.h){var oi=Oe.pop();pr=0&&$>=y&&g0[this.text.charCodeAt($)];$--)U--;this.text=this.text.substring(y,U),this.sectionIndex=this.sectionIndex.slice(y,U)},Xh.prototype.substring=function(y,I){var U=new Xh;return U.text=this.text.substring(y,I),U.sectionIndex=this.sectionIndex.slice(y,I),U.sections=this.sections,U},Xh.prototype.toString=function(){return this.text},Xh.prototype.getMaxScale=function(){var y=this;return this.sectionIndex.reduce(function(I,U){return Math.max(I,y.sections[U].scale)},0)},Xh.prototype.addTextSection=function(y,I){this.text+=y.text,this.sections.push(dy.forText(y.scale,y.fontStack||I));for(var U=this.sections.length-1,$=0;$=p0?null:++this.imageSectionID:(this.imageSectionID=Gw,this.imageSectionID)};function oO(m,y){for(var I=[],U=m.text,$=0,ae=0,he=y;ae=0,Et=0,or=0;or0&&ch>eo&&(eo=ch)}else{var Cl=I[Za.fontStack],yl=Cl&&Cl[to];if(yl&&yl.rect)jo=yl.rect,_s=yl.metrics;else{var Qu=y[Za.fontStack],gc=Qu&&Qu[to];if(!gc)continue;_s=gc.metrics}ao=(Pn-Za.scale)*Tn}kl?(m.verticalizable=!0,ha.push({glyph:to,imageName:El,x:_r,y:pr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Ko,metrics:_s,rect:jo}),_r+=Iu*Za.scale+gt):(ha.push({glyph:to,imageName:El,x:_r,y:pr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Ko,metrics:_s,rect:jo}),_r+=_s.advance*Za.scale+gt)}if(ha.length!==0){var Xd=_r-gt;Fr=Math.max(Xd,Fr),cO(ha,0,ha.length-1,Hi,eo)}_r=0;var Zd=ae*Pn+eo;ga.lineOffset=Math.max(eo,Zn),pr+=Zd,oi=Math.max(Zd,oi),++Ai}var Kh=pr-I1,fv=SS(he),hv=fv.horizontalAlign,Ch=fv.verticalAlign;kd(m.positionedLines,Hi,hv,Ch,Fr,oi,ae,Kh,$.length),m.top+=-Ch*Kh,m.bottom=m.top+Kh,m.left+=-hv*Fr,m.right=m.left+Fr}function cO(m,y,I,U,$){if(!(!U&&!$))for(var ae=m[I],he=ae.metrics.advance*ae.scale,Oe=(m[I].x+he)*U,rt=y;rt<=I;rt++)m[rt].x-=Oe,m[rt].y+=$}function kd(m,y,I,U,$,ae,he,Oe,rt){var gt=(y-I)*$,Et=0;ae!==he?Et=-Oe*U-I1:Et=(-U*rt+.5)*he;for(var or=0,_r=m;or<_r.length;or+=1)for(var pr=_r[or],Fr=0,oi=pr.positionedGlyphs;Fr-I/2;){if(he--,he<0)return!1;Oe-=m[he].dist(ae),ae=m[he]}Oe+=m[he].dist(m[he+1]),he++;for(var rt=[],gt=0;OeU;)gt-=rt.shift().angleDelta;if(gt>$)return!1;he++,Oe+=or.dist(_r)}return!0}function FQ(m){for(var y=0,I=0;Igt){var Fr=(gt-rt)/pr,oi=nl(or.x,_r.x,Fr),Hi=nl(or.y,_r.y,Fr),Ai=new Wd(oi,Hi,_r.angleTo(or),Et);return Ai._round(),!he||DQ(m,Ai,Oe,he,y)?Ai:void 0}rt+=pr}}function Eet(m,y,I,U,$,ae,he,Oe,rt){var gt=zQ(U,ae,he),Et=OQ(U,$),or=Et*he,_r=m[0].x===0||m[0].x===rt||m[0].y===0||m[0].y===rt;y-or=0&&xn=0&&Pn=0&&_r+gt<=Et){var Zn=new Wd(xn,Pn,bn,Fr);Zn._round(),(!U||DQ(m,Zn,ae,U,$))&&pr.push(Zn)}}or+=Ai}return!Oe&&!pr.length&&!he&&(pr=qQ(m,or/2,I,U,$,ae,he,!0,rt)),pr}function BQ(m,y,I,U,$){for(var ae=[],he=0;he=U&&or.x>=U)&&(Et.x>=U?Et=new u(U,Et.y+(or.y-Et.y)*((U-Et.x)/(or.x-Et.x)))._round():or.x>=U&&(or=new u(U,Et.y+(or.y-Et.y)*((U-Et.x)/(or.x-Et.x)))._round()),!(Et.y>=$&&or.y>=$)&&(Et.y>=$?Et=new u(Et.x+(or.x-Et.x)*(($-Et.y)/(or.y-Et.y)),$)._round():or.y>=$&&(or=new u(Et.x+(or.x-Et.x)*(($-Et.y)/(or.y-Et.y)),$)._round()),(!rt||!Et.equals(rt[rt.length-1]))&&(rt=[Et],ae.push(rt)),rt.push(or)))))}return ae}var Ww=Gc;function NQ(m,y,I,U){var $=[],ae=m.image,he=ae.pixelRatio,Oe=ae.paddedRect.w-2*Ww,rt=ae.paddedRect.h-2*Ww,gt=m.right-m.left,Et=m.bottom-m.top,or=ae.stretchX||[[0,Oe]],_r=ae.stretchY||[[0,rt]],pr=function(Cl,yl){return Cl+yl[1]-yl[0]},Fr=or.reduce(pr,0),oi=_r.reduce(pr,0),Hi=Oe-Fr,Ai=rt-oi,bn=0,nn=Fr,xn=0,Pn=oi,Zn=0,ga=Hi,ha=0,eo=Ai;if(ae.content&&U){var za=ae.content;bn=KC(or,0,za[0]),xn=KC(_r,0,za[1]),nn=KC(or,za[0],za[2]),Pn=KC(_r,za[1],za[3]),Zn=za[0]-bn,ha=za[1]-xn,ga=za[2]-za[0]-nn,eo=za[3]-za[1]-Pn}var Za=function(Cl,yl,Qu,gc){var Sf=JC(Cl.stretch-bn,nn,gt,m.left),Ff=$C(Cl.fixed-Zn,ga,Cl.stretch,Fr),Yh=JC(yl.stretch-xn,Pn,Et,m.top),ch=$C(yl.fixed-ha,eo,yl.stretch,oi),Xd=JC(Qu.stretch-bn,nn,gt,m.left),Zd=$C(Qu.fixed-Zn,ga,Qu.stretch,Fr),Kh=JC(gc.stretch-xn,Pn,Et,m.top),fv=$C(gc.fixed-ha,eo,gc.stretch,oi),hv=new u(Sf,Yh),Ch=new u(Xd,Yh),dv=new u(Xd,Kh),xp=new u(Sf,Kh),gy=new u(Ff/he,ch/he),F1=new u(Zd/he,fv/he),z1=y*Math.PI/180;if(z1){var O1=Math.sin(z1),e3=Math.cos(z1),m0=[e3,-O1,O1,e3];hv._matMult(m0),Ch._matMult(m0),xp._matMult(m0),dv._matMult(m0)}var n6=Cl.stretch+Cl.fixed,yO=Qu.stretch+Qu.fixed,a6=yl.stretch+yl.fixed,_O=gc.stretch+gc.fixed,Hp={x:ae.paddedRect.x+Ww+n6,y:ae.paddedRect.y+Ww+a6,w:yO-n6,h:_O-a6},t3=ga/he/gt,o6=eo/he/Et;return{tl:hv,tr:Ch,bl:xp,br:dv,tex:Hp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:gy,pixelOffsetBR:F1,minFontScaleX:t3,minFontScaleY:o6,isSDF:I}};if(!U||!ae.stretchX&&!ae.stretchY)$.push(Za({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Oe+1},{fixed:0,stretch:rt+1}));else for(var Ko=UQ(or,Hi,Fr),to=UQ(_r,Ai,oi),ao=0;ao0&&(Fr=Math.max(10,Fr),this.circleDiameter=Fr)}else{var oi=he.top*Oe-rt,Hi=he.bottom*Oe+rt,Ai=he.left*Oe-rt,bn=he.right*Oe+rt,nn=he.collisionPadding;if(nn&&(Ai-=nn[0]*Oe,oi-=nn[1]*Oe,bn+=nn[2]*Oe,Hi+=nn[3]*Oe),Et){var xn=new u(Ai,oi),Pn=new u(bn,oi),Zn=new u(Ai,Hi),ga=new u(bn,Hi),ha=Et*Math.PI/180;xn._rotate(ha),Pn._rotate(ha),Zn._rotate(ha),ga._rotate(ha),Ai=Math.min(xn.x,Pn.x,Zn.x,ga.x),bn=Math.max(xn.x,Pn.x,Zn.x,ga.x),oi=Math.min(xn.y,Pn.y,Zn.y,ga.y),Hi=Math.max(xn.y,Pn.y,Zn.y,ga.y)}y.emplaceBack(I.x,I.y,Ai,oi,bn,Hi,U,$,ae)}this.boxEndIndex=y.length},Xw=function(y,I){if(y===void 0&&(y=[]),I===void 0&&(I=Cet),this.data=y,this.length=this.data.length,this.compare=I,this.length>0)for(var U=(this.length>>1)-1;U>=0;U--)this._down(U)};Xw.prototype.push=function(y){this.data.push(y),this.length++,this._up(this.length-1)},Xw.prototype.pop=function(){if(this.length!==0){var y=this.data[0],I=this.data.pop();return this.length--,this.length>0&&(this.data[0]=I,this._down(0)),y}},Xw.prototype.peek=function(){return this.data[0]},Xw.prototype._up=function(y){for(var I=this,U=I.data,$=I.compare,ae=U[y];y>0;){var he=y-1>>1,Oe=U[he];if($(ae,Oe)>=0)break;U[y]=Oe,y=he}U[y]=ae},Xw.prototype._down=function(y){for(var I=this,U=I.data,$=I.compare,ae=this.length>>1,he=U[y];y=0)break;U[y]=rt,y=Oe}U[y]=he};function Cet(m,y){return my?1:0}function Let(m,y,I){y===void 0&&(y=1),I===void 0&&(I=!1);for(var U=1/0,$=1/0,ae=-1/0,he=-1/0,Oe=m[0],rt=0;rtae)&&(ae=gt.x),(!rt||gt.y>he)&&(he=gt.y)}var Et=ae-U,or=he-$,_r=Math.min(Et,or),pr=_r/2,Fr=new Xw([],Pet);if(_r===0)return new u(U,$);for(var oi=U;oiAi.d||!Ai.d)&&(Ai=nn,I&&console.log("found best %d after %d probes",Math.round(1e4*nn.d)/1e4,bn)),!(nn.max-Ai.d<=y)&&(pr=nn.h/2,Fr.push(new Zw(nn.p.x-pr,nn.p.y-pr,pr,m)),Fr.push(new Zw(nn.p.x+pr,nn.p.y-pr,pr,m)),Fr.push(new Zw(nn.p.x-pr,nn.p.y+pr,pr,m)),Fr.push(new Zw(nn.p.x+pr,nn.p.y+pr,pr,m)),bn+=4)}return I&&(console.log("num probes: "+bn),console.log("best distance: "+Ai.d)),Ai.p}function Pet(m,y){return y.max-m.max}function Zw(m,y,I,U){this.p=new u(m,y),this.h=I,this.d=Iet(this.p,U),this.max=this.d+this.h*Math.SQRT2}function Iet(m,y){for(var I=!1,U=1/0,$=0;$m.y!=Et.y>m.y&&m.x<(Et.x-gt.x)*(m.y-gt.y)/(Et.y-gt.y)+gt.x&&(I=!I),U=Math.min(U,cg(m,gt,Et))}return(I?1:-1)*Math.sqrt(U)}function Ret(m){for(var y=0,I=0,U=0,$=m[0],ae=0,he=$.length,Oe=he-1;ae=Ci||m0.y<0||m0.y>=Ci||zet(m,m0,e3,I,U,$,to,m.layers[0],m.collisionBoxArray,y.index,y.sourceLayerIndex,m.index,Ai,Pn,ha,rt,nn,Zn,eo,pr,y,ae,gt,Et,he)};if(za==="line")for(var _s=0,jo=BQ(y.geometry,0,0,Ci,Ci);_s1){var Yh=Met(Ff,ga,I.vertical||Fr,U,oi,bn);Yh&&ao(Ff,Yh)}}else if(y.type==="Polygon")for(var ch=0,Xd=Ow(y.geometry,0);chR1&&te(m.layerIds[0]+': Value for "text-size" is >= '+MS+'. Reduce your "text-size".')):Hi.kind==="composite"&&(Ai=[Cd*pr.compositeTextSizes[0].evaluate(he,{},Fr),Cd*pr.compositeTextSizes[1].evaluate(he,{},Fr)],(Ai[0]>R1||Ai[1]>R1)&&te(m.layerIds[0]+': Value for "text-size" is >= '+MS+'. Reduce your "text-size".')),m.addSymbols(m.text,oi,Ai,Oe,ae,he,gt,y,rt.lineStartIndex,rt.lineLength,_r,Fr);for(var bn=0,nn=Et;bnR1&&te(m.layerIds[0]+': Value for "icon-size" is >= '+MS+'. Reduce your "icon-size".')):hv.kind==="composite"&&(Ch=[Cd*Pn.compositeIconSizes[0].evaluate(xn,{},ga),Cd*Pn.compositeIconSizes[1].evaluate(xn,{},ga)],(Ch[0]>R1||Ch[1]>R1)&&te(m.layerIds[0]+': Value for "icon-size" is >= '+MS+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Kh,Ch,nn,bn,xn,!1,y,za.lineStartIndex,za.lineLength,-1,ga),kl=m.icon.placedSymbolArray.length-1,fv&&(jo=fv.length*4,m.addSymbols(m.icon,fv,Ch,nn,bn,xn,uv.vertical,y,za.lineStartIndex,za.lineLength,-1,ga),Cl=m.icon.placedSymbolArray.length-1)}for(var dv in U.horizontal){var xp=U.horizontal[dv];if(!Za){Qu=K(xp.text);var gy=Oe.layout.get("text-rotate").evaluate(xn,{},ga);Za=new QC(rt,y,gt,Et,or,xp,_r,pr,Fr,gy)}var F1=xp.positionedLines.length===1;if(El+=GQ(m,y,xp,ae,Oe,Fr,xn,oi,za,U.vertical?uv.horizontal:uv.horizontalOnly,F1?Object.keys(U.horizontal):[dv],yl,kl,Pn,ga),F1)break}U.vertical&&(Iu+=GQ(m,y,U.vertical,ae,Oe,Fr,xn,oi,za,uv.vertical,["vertical"],yl,Cl,Pn,ga));var z1=Za?Za.boxStartIndex:m.collisionBoxArray.length,O1=Za?Za.boxEndIndex:m.collisionBoxArray.length,e3=to?to.boxStartIndex:m.collisionBoxArray.length,m0=to?to.boxEndIndex:m.collisionBoxArray.length,n6=Ko?Ko.boxStartIndex:m.collisionBoxArray.length,yO=Ko?Ko.boxEndIndex:m.collisionBoxArray.length,a6=ao?ao.boxStartIndex:m.collisionBoxArray.length,_O=ao?ao.boxEndIndex:m.collisionBoxArray.length,Hp=-1,t3=function(CS,oee){return CS&&CS.circleDiameter?Math.max(CS.circleDiameter,oee):oee};Hp=t3(Za,Hp),Hp=t3(to,Hp),Hp=t3(Ko,Hp),Hp=t3(ao,Hp);var o6=Hp>-1?1:0;o6&&(Hp*=ha/Tn),m.glyphOffsetArray.length>=Pu.MAX_GLYPHS&&te("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xn.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,xn.sortKey),m.symbolInstances.emplaceBack(y.x,y.y,yl.right>=0?yl.right:-1,yl.center>=0?yl.center:-1,yl.left>=0?yl.left:-1,yl.vertical||-1,kl,Cl,Qu,z1,O1,e3,m0,n6,yO,a6,_O,gt,El,Iu,_s,jo,o6,0,_r,gc,Sf,Hp)}function Oet(m,y,I,U){var $=m.compareText;if(!(y in $))$[y]=[];else for(var ae=$[y],he=ae.length-1;he>=0;he--)if(U.dist(ae[he])0)&&(he.value.kind!=="constant"||he.value.value.length>0),Et=rt.value.kind!=="constant"||!!rt.value.value||Object.keys(rt.parameters).length>0,or=ae.get("symbol-sort-key");if(this.features=[],!(!gt&&!Et)){for(var _r=I.iconDependencies,pr=I.glyphDependencies,Fr=I.availableImages,oi=new Gn(this.zoom),Hi=0,Ai=y;Hi=0;for(var Iu=0,kl=eo.sections;Iu=0;rt--)he[rt]={x:I[rt].x,y:I[rt].y,tileUnitDistanceFromAnchor:ae},rt>0&&(ae+=I[rt-1].dist(I[rt]));for(var gt=0;gt0},Pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Pu.prototype.addIndicesForPlacedSymbol=function(y,I){for(var U=y.placedSymbolArray.get(I),$=U.vertexStartIndex+U.numGlyphs*4,ae=U.vertexStartIndex;ae<$;ae+=4)y.indexArray.emplaceBack(ae,ae+1,ae+2),y.indexArray.emplaceBack(ae+1,ae+2,ae+3)},Pu.prototype.getSortedSymbolIndexes=function(y){if(this.sortedAngle===y&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var I=Math.sin(y),U=Math.cos(y),$=[],ae=[],he=[],Oe=0;Oe1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(y),this.sortedAngle=y,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var U=0,$=this.symbolInstanceIndexes;U<$.length;U+=1){var ae=$[U],he=this.symbolInstances.get(ae);this.featureSortOrder.push(he.featureIndex),[he.rightJustifiedTextSymbolIndex,he.centerJustifiedTextSymbolIndex,he.leftJustifiedTextSymbolIndex].forEach(function(Oe,rt,gt){Oe>=0&>.indexOf(Oe)===rt&&I.addIndicesForPlacedSymbol(I.text,Oe)}),he.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,he.verticalPlacedTextSymbolIndex),he.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.placedIconSymbolIndex),he.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Pu,{omit:["layers","collisionBoxArray","features","compareText"]}),Pu.MAX_GLYPHS=65535,Pu.addDynamicAttributes=dO;function Uet(m,y){return y.replace(/{([^{}]+)}/g,function(I,U){return U in m?String(m[U]):""})}var Vet=new Nr({"symbol-placement":new Me(Rn.layout_symbol["symbol-placement"]),"symbol-spacing":new Me(Rn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Me(Rn.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bt(Rn.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Me(Rn.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Me(Rn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Me(Rn.layout_symbol["icon-ignore-placement"]),"icon-optional":new Me(Rn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Me(Rn.layout_symbol["icon-rotation-alignment"]),"icon-size":new bt(Rn.layout_symbol["icon-size"]),"icon-text-fit":new Me(Rn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Me(Rn.layout_symbol["icon-text-fit-padding"]),"icon-image":new bt(Rn.layout_symbol["icon-image"]),"icon-rotate":new bt(Rn.layout_symbol["icon-rotate"]),"icon-padding":new Me(Rn.layout_symbol["icon-padding"]),"icon-keep-upright":new Me(Rn.layout_symbol["icon-keep-upright"]),"icon-offset":new bt(Rn.layout_symbol["icon-offset"]),"icon-anchor":new bt(Rn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Me(Rn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Me(Rn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Me(Rn.layout_symbol["text-rotation-alignment"]),"text-field":new bt(Rn.layout_symbol["text-field"]),"text-font":new bt(Rn.layout_symbol["text-font"]),"text-size":new bt(Rn.layout_symbol["text-size"]),"text-max-width":new bt(Rn.layout_symbol["text-max-width"]),"text-line-height":new Me(Rn.layout_symbol["text-line-height"]),"text-letter-spacing":new bt(Rn.layout_symbol["text-letter-spacing"]),"text-justify":new bt(Rn.layout_symbol["text-justify"]),"text-radial-offset":new bt(Rn.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Me(Rn.layout_symbol["text-variable-anchor"]),"text-anchor":new bt(Rn.layout_symbol["text-anchor"]),"text-max-angle":new Me(Rn.layout_symbol["text-max-angle"]),"text-writing-mode":new Me(Rn.layout_symbol["text-writing-mode"]),"text-rotate":new bt(Rn.layout_symbol["text-rotate"]),"text-padding":new Me(Rn.layout_symbol["text-padding"]),"text-keep-upright":new Me(Rn.layout_symbol["text-keep-upright"]),"text-transform":new bt(Rn.layout_symbol["text-transform"]),"text-offset":new bt(Rn.layout_symbol["text-offset"]),"text-allow-overlap":new Me(Rn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Me(Rn.layout_symbol["text-ignore-placement"]),"text-optional":new Me(Rn.layout_symbol["text-optional"])}),Get=new Nr({"icon-opacity":new bt(Rn.paint_symbol["icon-opacity"]),"icon-color":new bt(Rn.paint_symbol["icon-color"]),"icon-halo-color":new bt(Rn.paint_symbol["icon-halo-color"]),"icon-halo-width":new bt(Rn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bt(Rn.paint_symbol["icon-halo-blur"]),"icon-translate":new Me(Rn.paint_symbol["icon-translate"]),"icon-translate-anchor":new Me(Rn.paint_symbol["icon-translate-anchor"]),"text-opacity":new bt(Rn.paint_symbol["text-opacity"]),"text-color":new bt(Rn.paint_symbol["text-color"],{runtimeType:ql,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new bt(Rn.paint_symbol["text-halo-color"]),"text-halo-width":new bt(Rn.paint_symbol["text-halo-width"]),"text-halo-blur":new bt(Rn.paint_symbol["text-halo-blur"]),"text-translate":new Me(Rn.paint_symbol["text-translate"]),"text-translate-anchor":new Me(Rn.paint_symbol["text-translate-anchor"])}),vO={paint:Get,layout:Vet},Jw=function(y){this.type=y.property.overrides?y.property.overrides.runtimeType:ac,this.defaultValue=y};Jw.prototype.evaluate=function(y){if(y.formattedSection){var I=this.defaultValue.property.overrides;if(I&&I.hasOverride(y.formattedSection))return I.getOverride(y.formattedSection)}return y.feature&&y.featureState?this.defaultValue.evaluate(y.feature,y.featureState):this.defaultValue.property.specification.default},Jw.prototype.eachChild=function(y){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;y(I._styleExpression.expression)}},Jw.prototype.outputDefined=function(){return!1},Jw.prototype.serialize=function(){return null},X("FormatSectionOverride",Jw,{omit:["defaultValue"]});var Het=function(m){function y(I){m.call(this,I,vO)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(U,$){if(m.prototype.recalculate.call(this,U,$),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var ae=this.layout.get("text-writing-mode");if(ae){for(var he=[],Oe=0,rt=ae;Oe",targetMapId:$,sourceMapId:he.mapId})}}},$w.prototype.receive=function(y){var I=y.data,U=I.id;if(U&&!(I.targetMapId&&this.mapId!==I.targetMapId))if(I.type===""){delete this.tasks[U];var $=this.cancelCallbacks[U];delete this.cancelCallbacks[U],$&&$()}else Ce()||I.mustQueue?(this.tasks[U]=I,this.taskQueue.push(U),this.invoker.trigger()):this.processTask(U,I)},$w.prototype.process=function(){if(this.taskQueue.length){var y=this.taskQueue.shift(),I=this.tasks[y];delete this.tasks[y],this.taskQueue.length&&this.invoker.trigger(),I&&this.processTask(y,I)}},$w.prototype.processTask=function(y,I){var U=this;if(I.type===""){var $=this.callbacks[y];delete this.callbacks[y],$&&(I.error?$(Ye(I.error)):$(null,Ye(I.data)))}else{var ae=!1,he=Se(this.globalScope)?void 0:[],Oe=I.hasCallback?function(_r,pr){ae=!0,delete U.cancelCallbacks[y],U.target.postMessage({id:y,type:"",sourceMapId:U.mapId,error:_r?He(_r):null,data:He(pr,he)},he)}:function(_r){ae=!0},rt=null,gt=Ye(I.data);if(this.parent[I.type])rt=this.parent[I.type](I.sourceMapId,gt,Oe);else if(this.parent.getWorkerSource){var Et=I.type.split("."),or=this.parent.getWorkerSource(I.sourceMapId,Et[0],gt.source);rt=or[Et[1]](gt,Oe)}else Oe(new Error("Could not find function "+I.type));!ae&&rt&&rt.cancel&&(this.cancelCallbacks[y]=rt.cancel)}},$w.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function ttt(m,y,I){y=Math.pow(2,I)-y-1;var U=YQ(m*256,y*256,I),$=YQ((m+1)*256,(y+1)*256,I);return U[0]+","+U[1]+","+$[0]+","+$[1]}function YQ(m,y,I){var U=2*Math.PI*6378137/256/Math.pow(2,I),$=m*U-2*Math.PI*6378137/2,ae=y*U-2*Math.PI*6378137/2;return[$,ae]}var lh=function(y,I){y&&(I?this.setSouthWest(y).setNorthEast(I):y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1]))};lh.prototype.setNorthEast=function(y){return this._ne=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.setSouthWest=function(y){return this._sw=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.extend=function(y){var I=this._sw,U=this._ne,$,ae;if(y instanceof Hc)$=y,ae=y;else if(y instanceof lh){if($=y._sw,ae=y._ne,!$||!ae)return this}else{if(Array.isArray(y))if(y.length===4||y.every(Array.isArray)){var he=y;return this.extend(lh.convert(he))}else{var Oe=y;return this.extend(Hc.convert(Oe))}return this}return!I&&!U?(this._sw=new Hc($.lng,$.lat),this._ne=new Hc(ae.lng,ae.lat)):(I.lng=Math.min($.lng,I.lng),I.lat=Math.min($.lat,I.lat),U.lng=Math.max(ae.lng,U.lng),U.lat=Math.max(ae.lat,U.lat)),this},lh.prototype.getCenter=function(){return new Hc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},lh.prototype.getSouthWest=function(){return this._sw},lh.prototype.getNorthEast=function(){return this._ne},lh.prototype.getNorthWest=function(){return new Hc(this.getWest(),this.getNorth())},lh.prototype.getSouthEast=function(){return new Hc(this.getEast(),this.getSouth())},lh.prototype.getWest=function(){return this._sw.lng},lh.prototype.getSouth=function(){return this._sw.lat},lh.prototype.getEast=function(){return this._ne.lng},lh.prototype.getNorth=function(){return this._ne.lat},lh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},lh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},lh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},lh.prototype.contains=function(y){var I=Hc.convert(y),U=I.lng,$=I.lat,ae=this._sw.lat<=$&&$<=this._ne.lat,he=this._sw.lng<=U&&U<=this._ne.lng;return this._sw.lng>this._ne.lng&&(he=this._sw.lng>=U&&U>=this._ne.lng),ae&&he},lh.convert=function(y){return!y||y instanceof lh?y:new lh(y)};var KQ=63710088e-1,Hc=function(y,I){if(isNaN(y)||isNaN(I))throw new Error("Invalid LngLat object: ("+y+", "+I+")");if(this.lng=+y,this.lat=+I,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Hc.prototype.wrap=function(){return new Hc(k(this.lng,-180,180),this.lat)},Hc.prototype.toArray=function(){return[this.lng,this.lat]},Hc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Hc.prototype.distanceTo=function(y){var I=Math.PI/180,U=this.lat*I,$=y.lat*I,ae=Math.sin(U)*Math.sin($)+Math.cos(U)*Math.cos($)*Math.cos((y.lng-this.lng)*I),he=KQ*Math.acos(Math.min(ae,1));return he},Hc.prototype.toBounds=function(y){y===void 0&&(y=0);var I=40075017,U=360*y/I,$=U/Math.cos(Math.PI/180*this.lat);return new lh(new Hc(this.lng-$,this.lat-U),new Hc(this.lng+$,this.lat+U))},Hc.convert=function(y){if(y instanceof Hc)return y;if(Array.isArray(y)&&(y.length===2||y.length===3))return new Hc(Number(y[0]),Number(y[1]));if(!Array.isArray(y)&&typeof y=="object"&&y!==null)return new Hc(Number("lng"in y?y.lng:y.lon),Number(y.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var JQ=2*Math.PI*KQ;function $Q(m){return JQ*Math.cos(m*Math.PI/180)}function QQ(m){return(180+m)/360}function eee(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function tee(m,y){return m/$Q(y)}function rtt(m){return m*360-180}function gO(m){var y=180-m*360;return 360/Math.PI*Math.atan(Math.exp(y*Math.PI/180))-90}function itt(m,y){return m*$Q(gO(y))}function ntt(m){return 1/Math.cos(m*Math.PI/180)}var nb=function(y,I,U){U===void 0&&(U=0),this.x=+y,this.y=+I,this.z=+U};nb.fromLngLat=function(y,I){I===void 0&&(I=0);var U=Hc.convert(y);return new nb(QQ(U.lng),eee(U.lat),tee(I,U.lat))},nb.prototype.toLngLat=function(){return new Hc(rtt(this.x),gO(this.y))},nb.prototype.toAltitude=function(){return itt(this.z,this.y)},nb.prototype.meterInMercatorCoordinateUnits=function(){return 1/JQ*ntt(gO(this.y))};var ab=function(y,I,U){this.z=y,this.x=I,this.y=U,this.key=kS(0,y,y,I,U)};ab.prototype.equals=function(y){return this.z===y.z&&this.x===y.x&&this.y===y.y},ab.prototype.url=function(y,I){var U=ttt(this.x,this.y,this.z),$=att(this.z,this.x,this.y);return y[(this.x+this.y)%y.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(I==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",$).replace("{bbox-epsg-3857}",U)},ab.prototype.getTilePoint=function(y){var I=Math.pow(2,this.z);return new u((y.x*I-this.x)*Ci,(y.y*I-this.y)*Ci)},ab.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var ree=function(y,I){this.wrap=y,this.canonical=I,this.key=kS(y,I.z,I.z,I.x,I.y)},uh=function(y,I,U,$,ae){this.overscaledZ=y,this.wrap=I,this.canonical=new ab(U,+$,+ae),this.key=kS(I,y,U,$,ae)};uh.prototype.equals=function(y){return this.overscaledZ===y.overscaledZ&&this.wrap===y.wrap&&this.canonical.equals(y.canonical)},uh.prototype.scaledTo=function(y){var I=this.canonical.z-y;return y>this.canonical.z?new uh(y,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uh(y,this.wrap,y,this.canonical.x>>I,this.canonical.y>>I)},uh.prototype.calculateScaledKey=function(y,I){var U=this.canonical.z-y;return y>this.canonical.z?kS(this.wrap*+I,y,this.canonical.z,this.canonical.x,this.canonical.y):kS(this.wrap*+I,y,y,this.canonical.x>>U,this.canonical.y>>U)},uh.prototype.isChildOf=function(y){if(y.wrap!==this.wrap)return!1;var I=this.canonical.z-y.canonical.z;return y.overscaledZ===0||y.overscaledZ>I&&y.canonical.y===this.canonical.y>>I},uh.prototype.children=function(y){if(this.overscaledZ>=y)return[new uh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var I=this.canonical.z+1,U=this.canonical.x*2,$=this.canonical.y*2;return[new uh(I,this.wrap,I,U,$),new uh(I,this.wrap,I,U+1,$),new uh(I,this.wrap,I,U,$+1),new uh(I,this.wrap,I,U+1,$+1)]},uh.prototype.isLessThan=function(y){return this.wrapy.wrap?!1:this.overscaledZy.overscaledZ?!1:this.canonical.xy.canonical.x?!1:this.canonical.y0;ae--)$=1<=this.dim+1||I<-1||I>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(I+1)*this.stride+(y+1)},vy.prototype._unpackMapbox=function(y,I,U){return(y*256*256+I*256+U)/10-1e4},vy.prototype._unpackTerrarium=function(y,I,U){return y*256+I+U/256-32768},vy.prototype.getPixels=function(){return new Sh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},vy.prototype.backfillBorder=function(y,I,U){if(this.dim!==y.dim)throw new Error("dem dimension mismatch");var $=I*this.dim,ae=I*this.dim+this.dim,he=U*this.dim,Oe=U*this.dim+this.dim;switch(I){case-1:$=ae-1;break;case 1:ae=$+1;break}switch(U){case-1:he=Oe-1;break;case 1:Oe=he+1;break}for(var rt=-I*this.dim,gt=-U*this.dim,Et=he;Et=0&&or[3]>=0&&rt.insert(Oe,or[0],or[1],or[2],or[3])}},py.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new pg.VectorTile(new Xa(this.rawTileData)).layers,this.sourceLayerCoder=new r6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},py.prototype.query=function(y,I,U,$){var ae=this;this.loadVTLayers();for(var he=y.params||{},Oe=Ci/y.tileSize/y.scale,rt=be(he.filter),gt=y.queryGeometry,Et=y.queryPadding*Oe,or=nee(gt),_r=this.grid.query(or.minX-Et,or.minY-Et,or.maxX+Et,or.maxY+Et),pr=nee(y.cameraQueryGeometry),Fr=this.grid3D.query(pr.minX-Et,pr.minY-Et,pr.maxX+Et,pr.maxY+Et,function(Zn,ga,ha,eo){return gp(y.cameraQueryGeometry,Zn-Et,ga-Et,ha+Et,eo+Et)}),oi=0,Hi=Fr;oi$)ae=!1;else if(!I)ae=!0;else if(this.expirationTime=Ha.maxzoom)&&Ha.visibility!=="none"){h(Wn,this.zoom,nr);var vo=$i[Ha.id]=Ha.createBucket({index:Oi.bucketLayerIDs.length,layers:Wn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ba,sourceID:this.source});vo.populate(ua,tn,this.tileID.canonical),Oi.bucketLayerIDs.push(Wn.map(function(Li){return Li.id}))}}}}var jn,Mt,kr,Jr,vi=i.mapObject(tn.glyphDependencies,function(Li){return Object.keys(Li).map(Number)});Object.keys(vi).length?Er.send("getGlyphs",{uid:this.uid,stacks:vi},function(Li,_n){jn||(jn=Li,Mt=_n,Mn.call(ri))}):Mt={};var hn=Object.keys(tn.iconDependencies);hn.length?Er.send("getImages",{icons:hn,source:this.source,tileID:this.tileID,type:"icons"},function(Li,_n){jn||(jn=Li,kr=_n,Mn.call(ri))}):kr={};var An=Object.keys(tn.patternDependencies);An.length?Er.send("getImages",{icons:An,source:this.source,tileID:this.tileID,type:"patterns"},function(Li,_n){jn||(jn=Li,Jr=_n,Mn.call(ri))}):Jr={},Mn.call(this);function Mn(){if(jn)return Xr(jn);if(Mt&&kr&&Jr){var Li=new c(Mt),_n=new i.ImageAtlas(kr,Jr);for(var ya in $i){var Jn=$i[ya];Jn instanceof i.SymbolBucket?(h(Jn.layers,this.zoom,nr),i.performSymbolLayout(Jn,Mt,Li.positions,kr,_n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Jn.hasPattern&&(Jn instanceof i.LineBucket||Jn instanceof i.FillBucket||Jn instanceof i.FillExtrusionBucket)&&(h(Jn.layers,this.zoom,nr),Jn.addFeatures(tn,this.tileID.canonical,_n.patternPositions))}this.status="done",Xr(null,{buckets:i.values($i).filter(function(Ma){return!Ma.isEmpty()}),featureIndex:Oi,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Li.image,imageAtlas:_n,glyphMap:this.returnDependencies?Mt:null,iconMap:this.returnDependencies?kr:null,glyphPositions:this.returnDependencies?Li.positions:null})}}};function h(Ut,wt,rr){for(var nr=new i.EvaluationParameters(wt),Er=0,Xr=Ut;Er=0!=!!wt&&Ut.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,x=function(wt){this._feature=wt,this.extent=i.EXTENT,this.type=wt.type,this.properties=wt.tags,"id"in wt&&!isNaN(wt.id)&&(this.id=parseInt(wt.id,10))};x.prototype.loadGeometry=function(){if(this._feature.type===1){for(var wt=[],rr=0,nr=this._feature.geometry;rr>31}function Ce(Ut,wt){for(var rr=Ut.loadGeometry(),nr=Ut.type,Er=0,Xr=0,ri=rr.length,Qr=0;Qr>1;Se(Ut,wt,ri,nr,Er,Xr%2),ie(Ut,wt,rr,nr,ri-1,Xr+1),ie(Ut,wt,rr,ri+1,Er,Xr+1)}}function Se(Ut,wt,rr,nr,Er,Xr){for(;Er>nr;){if(Er-nr>600){var ri=Er-nr+1,Qr=rr-nr+1,Oi=Math.log(ri),$i=.5*Math.exp(2*Oi/3),tn=.5*Math.sqrt(Oi*$i*(ri-$i)/ri)*(Qr-ri/2<0?-1:1),fn=Math.max(nr,Math.floor(rr-Qr*$i/ri+tn)),yn=Math.min(Er,Math.floor(rr+(ri-Qr)*$i/ri+tn));Se(Ut,wt,rr,fn,yn,Xr)}var Sn=wt[2*rr+Xr],Ba=nr,ua=Er;for(Le(Ut,wt,nr,rr),wt[2*Er+Xr]>Sn&&Le(Ut,wt,nr,Er);BaSn;)ua--}wt[2*nr+Xr]===Sn?Le(Ut,wt,nr,ua):(ua++,Le(Ut,wt,ua,Er)),ua<=rr&&(nr=ua+1),rr<=ua&&(Er=ua-1)}}function Le(Ut,wt,rr,nr){Ae(Ut,rr,nr),Ae(wt,2*rr,2*nr),Ae(wt,2*rr+1,2*nr+1)}function Ae(Ut,wt,rr){var nr=Ut[wt];Ut[wt]=Ut[rr],Ut[rr]=nr}function Fe(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=[0,Ut.length-1,0],Oi=[],$i,tn;Qr.length;){var fn=Qr.pop(),yn=Qr.pop(),Sn=Qr.pop();if(yn-Sn<=ri){for(var Ba=Sn;Ba<=yn;Ba++)$i=wt[2*Ba],tn=wt[2*Ba+1],$i>=rr&&$i<=Er&&tn>=nr&&tn<=Xr&&Oi.push(Ut[Ba]);continue}var ua=Math.floor((Sn+yn)/2);$i=wt[2*ua],tn=wt[2*ua+1],$i>=rr&&$i<=Er&&tn>=nr&&tn<=Xr&&Oi.push(Ut[ua]);var ma=(fn+1)%2;(fn===0?rr<=$i:nr<=tn)&&(Qr.push(Sn),Qr.push(ua-1),Qr.push(ma)),(fn===0?Er>=$i:Xr>=tn)&&(Qr.push(ua+1),Qr.push(yn),Qr.push(ma))}return Oi}function Pe(Ut,wt,rr,nr,Er,Xr){for(var ri=[0,Ut.length-1,0],Qr=[],Oi=Er*Er;ri.length;){var $i=ri.pop(),tn=ri.pop(),fn=ri.pop();if(tn-fn<=Xr){for(var yn=fn;yn<=tn;yn++)ge(wt[2*yn],wt[2*yn+1],rr,nr)<=Oi&&Qr.push(Ut[yn]);continue}var Sn=Math.floor((fn+tn)/2),Ba=wt[2*Sn],ua=wt[2*Sn+1];ge(Ba,ua,rr,nr)<=Oi&&Qr.push(Ut[Sn]);var ma=($i+1)%2;($i===0?rr-Er<=Ba:nr-Er<=ua)&&(ri.push(fn),ri.push(Sn-1),ri.push(ma)),($i===0?rr+Er>=Ba:nr+Er>=ua)&&(ri.push(Sn+1),ri.push(tn),ri.push(ma))}return Qr}function ge(Ut,wt,rr,nr){var Er=Ut-rr,Xr=wt-nr;return Er*Er+Xr*Xr}var Re=function(Ut){return Ut[0]},ce=function(Ut){return Ut[1]},Ze=function(wt,rr,nr,Er,Xr){rr===void 0&&(rr=Re),nr===void 0&&(nr=ce),Er===void 0&&(Er=64),Xr===void 0&&(Xr=Float64Array),this.nodeSize=Er,this.points=wt;for(var ri=wt.length<65536?Uint16Array:Uint32Array,Qr=this.ids=new ri(wt.length),Oi=this.coords=new Xr(wt.length*2),$i=0;$i=Er;tn--){var fn=+Date.now();Oi=this._cluster(Oi,tn),this.trees[tn]=new Ze(Oi,$e,St,ri,Float32Array),nr&&console.log("z%d: %d clusters in %dms",tn,Oi.length,+Date.now()-fn)}return nr&&console.timeEnd("total time"),this},pt.prototype.getClusters=function(wt,rr){var nr=((wt[0]+180)%360+360)%360-180,Er=Math.max(-90,Math.min(90,wt[1])),Xr=wt[2]===180?180:((wt[2]+180)%360+360)%360-180,ri=Math.max(-90,Math.min(90,wt[3]));if(wt[2]-wt[0]>=360)nr=-180,Xr=180;else if(nr>Xr){var Qr=this.getClusters([nr,Er,180,ri],rr),Oi=this.getClusters([-180,Er,Xr,ri],rr);return Qr.concat(Oi)}for(var $i=this.trees[this._limitZoom(rr)],tn=$i.range(Nt(nr),Jt(ri),Nt(Xr),Jt(Er)),fn=[],yn=0,Sn=tn;ynrr&&(ua+=Wo.numPoints||1)}if(ua>=Oi){for(var da=fn.x*Ba,Wn=fn.y*Ba,Ha=Qr&&Ba>1?this._map(fn,!0):null,vo=(tn<<5)+(rr+1)+this.points.length,jn=0,Mt=Sn;jn1)for(var hn=0,An=Sn;hn>5},pt.prototype._getOriginZoom=function(wt){return(wt-this.points.length)%32},pt.prototype._map=function(wt,rr){if(wt.numPoints)return rr?cr({},wt.properties):wt.properties;var nr=this.points[wt.index].properties,Er=this.options.map(nr);return rr&&Er===nr?cr({},Er):Er};function Zt(Ut,wt,rr,nr,Er){return{x:Ut,y:wt,zoom:1/0,id:rr,parentId:-1,numPoints:nr,properties:Er}}function st(Ut,wt){var rr=Ut.geometry.coordinates,nr=rr[0],Er=rr[1];return{x:Nt(nr),y:Jt(Er),zoom:1/0,index:wt,parentId:-1}}function lt(Ut){return{type:"Feature",id:Ut.id,properties:Gt(Ut),geometry:{type:"Point",coordinates:[sr(Ut.x),wr(Ut.y)]}}}function Gt(Ut){var wt=Ut.numPoints,rr=wt>=1e4?Math.round(wt/1e3)+"k":wt>=1e3?Math.round(wt/100)/10+"k":wt;return cr(cr({},Ut.properties),{cluster:!0,cluster_id:Ut.id,point_count:wt,point_count_abbreviated:rr})}function Nt(Ut){return Ut/360+.5}function Jt(Ut){var wt=Math.sin(Ut*Math.PI/180),rr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return rr<0?0:rr>1?1:rr}function sr(Ut){return(Ut-.5)*360}function wr(Ut){var wt=(180-Ut*360)*Math.PI/180;return 360*Math.atan(Math.exp(wt))/Math.PI-90}function cr(Ut,wt){for(var rr in wt)Ut[rr]=wt[rr];return Ut}function $e(Ut){return Ut.x}function St(Ut){return Ut.y}function Qt(Ut,wt,rr,nr){for(var Er=nr,Xr=rr-wt>>1,ri=rr-wt,Qr,Oi=Ut[wt],$i=Ut[wt+1],tn=Ut[rr],fn=Ut[rr+1],yn=wt+3;ynEr)Qr=yn,Er=Sn;else if(Sn===Er){var Ba=Math.abs(yn-Xr);Banr&&(Qr-wt>3&&Qt(Ut,wt,Qr,nr),Ut[Qr+2]=Er,rr-Qr>3&&Qt(Ut,Qr,rr,nr))}function Vt(Ut,wt,rr,nr,Er,Xr){var ri=Er-rr,Qr=Xr-nr;if(ri!==0||Qr!==0){var Oi=((Ut-rr)*ri+(wt-nr)*Qr)/(ri*ri+Qr*Qr);Oi>1?(rr=Er,nr=Xr):Oi>0&&(rr+=ri*Oi,nr+=Qr*Oi)}return ri=Ut-rr,Qr=wt-nr,ri*ri+Qr*Qr}function _t(Ut,wt,rr,nr){var Er={id:typeof Ut=="undefined"?null:Ut,type:wt,geometry:rr,tags:nr,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return It(Er),Er}function It(Ut){var wt=Ut.geometry,rr=Ut.type;if(rr==="Point"||rr==="MultiPoint"||rr==="LineString")mt(Ut,wt);else if(rr==="Polygon"||rr==="MultiLineString")for(var nr=0;nr0&&(nr?ri+=(Er*$i-Oi*Xr)/2:ri+=Math.sqrt(Math.pow(Oi-Er,2)+Math.pow($i-Xr,2))),Er=Oi,Xr=$i}var tn=wt.length-3;wt[2]=1,Qt(wt,0,tn,rr),wt[tn+2]=1,wt.size=Math.abs(ri),wt.start=0,wt.end=wt.size}function ti(Ut,wt,rr,nr){for(var Er=0;Er1?1:rr}function dt(Ut,wt,rr,nr,Er,Xr,ri,Qr){if(rr/=wt,nr/=wt,Xr>=rr&&ri=nr)return null;for(var Oi=[],$i=0;$i=rr&&Ba=nr)continue;var ua=[];if(yn==="Point"||yn==="MultiPoint")Ge(fn,ua,rr,nr,Er);else if(yn==="LineString")Je(fn,ua,rr,nr,Er,!1,Qr.lineMetrics);else if(yn==="MultiLineString")tt(fn,ua,rr,nr,Er,!1);else if(yn==="Polygon")tt(fn,ua,rr,nr,Er,!0);else if(yn==="MultiPolygon")for(var ma=0;ma=rr&&ri<=nr&&(wt.push(Ut[Xr]),wt.push(Ut[Xr+1]),wt.push(Ut[Xr+2]))}}function Je(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=je(Ut),Oi=Er===0?Ie:xe,$i=Ut.start,tn,fn,yn=0;ynrr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,rr),ri&&(Qr.start=$i+tn*fn)):Fa>nr?Wo=rr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,rr),da=!0),Wo>nr&&Fa<=nr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,nr),da=!0),!Xr&&da&&(ri&&(Qr.end=$i+tn*fn),wt.push(Qr),Qr=je(Ut)),ri&&($i+=tn)}var Wn=Ut.length-3;Sn=Ut[Wn],Ba=Ut[Wn+1],ua=Ut[Wn+2],Fa=Er===0?Sn:Ba,Fa>=rr&&Fa<=nr&&xt(Qr,Sn,Ba,ua),Wn=Qr.length-3,Xr&&Wn>=3&&(Qr[Wn]!==Qr[0]||Qr[Wn+1]!==Qr[1])&&xt(Qr,Qr[0],Qr[1],Qr[2]),Qr.length&&wt.push(Qr)}function je(Ut){var wt=[];return wt.size=Ut.size,wt.start=Ut.start,wt.end=Ut.end,wt}function tt(Ut,wt,rr,nr,Er,Xr){for(var ri=0;riri.maxX&&(ri.maxX=tn),fn>ri.maxY&&(ri.maxY=fn)}return ri}function pi(Ut,wt,rr,nr){var Er=wt.geometry,Xr=wt.type,ri=[];if(Xr==="Point"||Xr==="MultiPoint")for(var Qr=0;Qr0&&wt.size<(Er?ri:nr)){rr.numPoints+=wt.length/3;return}for(var Qr=[],Oi=0;Oiri)&&(rr.numSimplified++,Qr.push(wt[Oi]),Qr.push(wt[Oi+1])),rr.numPoints++;Er&&di(Qr,Xr),Ut.push(Qr)}function di(Ut,wt){for(var rr=0,nr=0,Er=Ut.length,Xr=Er-2;nr0===wt)for(nr=0,Er=Ut.length;nr24)throw new Error("maxZoom should be in the 0-24 range");if(wt.promoteId&&wt.generateId)throw new Error("promoteId and generateId cannot be used together.");var nr=er(Ut,wt);this.tiles={},this.tileCoords=[],rr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",wt.indexMaxZoom,wt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),nr=ke(nr,wt),nr.length&&this.splitTile(nr,0,0,0),rr&&(nr.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}In.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},In.prototype.splitTile=function(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=[Ut,wt,rr,nr],Oi=this.options,$i=Oi.debug;Qr.length;){nr=Qr.pop(),rr=Qr.pop(),wt=Qr.pop(),Ut=Qr.pop();var tn=1<1&&console.time("creation"),yn=this.tiles[fn]=ii(Ut,wt,rr,nr,Oi),this.tileCoords.push({z:wt,x:rr,y:nr}),$i)){$i>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",wt,rr,nr,yn.numFeatures,yn.numPoints,yn.numSimplified),console.timeEnd("creation"));var Sn="z"+wt;this.stats[Sn]=(this.stats[Sn]||0)+1,this.total++}if(yn.source=Ut,Er){if(wt===Oi.maxZoom||wt===Er)continue;var Ba=1<1&&console.time("clipping");var ua=.5*Oi.buffer/Oi.extent,ma=.5-ua,Wa=.5+ua,Fa=1+ua,Wo,da,Wn,Ha,vo,jn;Wo=da=Wn=Ha=null,vo=dt(Ut,tn,rr-ua,rr+Wa,0,yn.minX,yn.maxX,Oi),jn=dt(Ut,tn,rr+ma,rr+Fa,0,yn.minX,yn.maxX,Oi),Ut=null,vo&&(Wo=dt(vo,tn,nr-ua,nr+Wa,1,yn.minY,yn.maxY,Oi),da=dt(vo,tn,nr+ma,nr+Fa,1,yn.minY,yn.maxY,Oi),vo=null),jn&&(Wn=dt(jn,tn,nr-ua,nr+Wa,1,yn.minY,yn.maxY,Oi),Ha=dt(jn,tn,nr+ma,nr+Fa,1,yn.minY,yn.maxY,Oi),jn=null),$i>1&&console.timeEnd("clipping"),Qr.push(Wo||[],wt+1,rr*2,nr*2),Qr.push(da||[],wt+1,rr*2,nr*2+1),Qr.push(Wn||[],wt+1,rr*2+1,nr*2),Qr.push(Ha||[],wt+1,rr*2+1,nr*2+1)}}},In.prototype.getTile=function(Ut,wt,rr){var nr=this.options,Er=nr.extent,Xr=nr.debug;if(Ut<0||Ut>24)return null;var ri=1<1&&console.log("drilling down to z%d-%d-%d",Ut,wt,rr);for(var Oi=Ut,$i=wt,tn=rr,fn;!fn&&Oi>0;)Oi--,$i=Math.floor($i/2),tn=Math.floor(tn/2),fn=this.tiles[wi(Oi,$i,tn)];return!fn||!fn.source?null:(Xr>1&&console.log("found parent tile z%d-%d-%d",Oi,$i,tn),Xr>1&&console.time("drilling down"),this.splitTile(fn.source,Oi,$i,tn,Ut,wt,rr),Xr>1&&console.timeEnd("drilling down"),this.tiles[Qr]?ar(this.tiles[Qr],Er):null)};function wi(Ut,wt,rr){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function _(Y,D,J){var q,K,de,ne=i.browser.devicePixelRatio>1?"@2x":"",we=i.getJSON(D.transformRequest(D.normalizeSpriteURL(Y,ne,".json"),i.ResourceType.SpriteJSON),function(Xt,hr){we=null,de||(de=Xt,q=hr,ft())}),Ue=i.getImage(D.transformRequest(D.normalizeSpriteURL(Y,ne,".png"),i.ResourceType.SpriteImage),function(Xt,hr){Ue=null,de||(de=Xt,K=hr,ft())});function ft(){if(de)J(de);else if(q&&K){var Xt=i.browser.getImageData(K),hr={};for(var qt in q){var Ve=q[qt],Qe=Ve.width,at=Ve.height,Ct=Ve.x,Ot=Ve.y,Rt=Ve.sdf,Bt=Ve.pixelRatio,Dt=Ve.stretchX,yt=Ve.stretchY,Pt=Ve.content,ht=new i.RGBAImage({width:Qe,height:at});i.RGBAImage.copy(Xt,ht,{x:Ct,y:Ot},{x:0,y:0},{width:Qe,height:at}),hr[qt]={data:ht,pixelRatio:Bt,sdf:Rt,stretchX:Dt,stretchY:yt,content:Pt}}J(null,hr)}}return{cancel:function(){we&&(we.cancel(),we=null),Ue&&(Ue.cancel(),Ue=null)}}}function b(Y){var D=Y.userImage;if(D&&D.render){var J=D.render();if(J)return Y.data.replace(new Uint8Array(D.data.buffer)),!0}return!1}var p=1,k=function(Y){function D(){Y.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.isLoaded=function(){return this.loaded},D.prototype.setLoaded=function(q){if(this.loaded!==q&&(this.loaded=q,q)){for(var K=0,de=this.requestors;K=0?1.2:1))}C.prototype.draw=function(Y){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Y,this.buffer,this.middle);for(var D=this.ctx.getImageData(0,0,this.size,this.size),J=new Uint8ClampedArray(this.size*this.size),q=0;q65535){Xt(new Error("glyphs > 65535 not supported"));return}if(Ve.ranges[at]){Xt(null,{stack:hr,id:qt,glyph:Qe});return}var Ct=Ve.requests[at];Ct||(Ct=Ve.requests[at]=[],P.loadGlyphRange(hr,at,q.url,q.requestManager,function(Ot,Rt){if(Rt){for(var Bt in Rt)q._doesCharSupportLocalGlyph(+Bt)||(Ve.glyphs[+Bt]=Rt[+Bt]);Ve.ranges[at]=!0}for(var Dt=0,yt=Ct;Dt1&&(ft=D[++Ue]);var hr=Math.abs(Xt-ft.left),qt=Math.abs(Xt-ft.right),Ve=Math.min(hr,qt),Qe=void 0,at=de/q*(K+1);if(ft.isDash){var Ct=K-Math.abs(at);Qe=Math.sqrt(Ve*Ve+Ct*Ct)}else Qe=K-Math.sqrt(Ve*Ve+at*at);this.data[we+Xt]=Math.max(0,Math.min(255,Qe+128))}},G.prototype.addRegularDash=function(D){for(var J=D.length-1;J>=0;--J){var q=D[J],K=D[J+1];q.zeroLength?D.splice(J,1):K&&K.isDash===q.isDash&&(K.left=q.left,D.splice(J,1))}var de=D[0],ne=D[D.length-1];de.isDash===ne.isDash&&(de.left=ne.left-this.width,ne.right=de.right+this.width);for(var we=this.width*this.nextRow,Ue=0,ft=D[Ue],Xt=0;Xt1&&(ft=D[++Ue]);var hr=Math.abs(Xt-ft.left),qt=Math.abs(Xt-ft.right),Ve=Math.min(hr,qt),Qe=ft.isDash?Ve:-Ve;this.data[we+Xt]=Math.max(0,Math.min(255,Qe+128))}},G.prototype.addDash=function(D,J){var q=J?7:0,K=2*q+1;if(this.nextRow+K>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var de=0,ne=0;ne=q.minX&&D.x=q.minY&&D.y0&&(Xt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y-1).key]={backfilled:!1},Xt[new i.OverscaledTileID(q.overscaledZ,q.wrap,K.z,K.x,K.y-1).key]={backfilled:!1},Xt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y-1).key]={backfilled:!1}),K.y+10&&(de.resourceTiming=q._resourceTiming,q._resourceTiming=[]),q.fire(new i.Event("data",de))})},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setData=function(q){var K=this;return this._data=q,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(de){if(de){K.fire(new i.ErrorEvent(de));return}var ne={dataType:"source",sourceDataType:"content"};K._collectResourceTiming&&K._resourceTiming&&K._resourceTiming.length>0&&(ne.resourceTiming=K._resourceTiming,K._resourceTiming=[]),K.fire(new i.Event("data",ne))}),this},D.prototype.getClusterExpansionZoom=function(q,K){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:q,source:this.id},K),this},D.prototype.getClusterChildren=function(q,K){return this.actor.send("geojson.getClusterChildren",{clusterId:q,source:this.id},K),this},D.prototype.getClusterLeaves=function(q,K,de,ne){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:q,limit:K,offset:de},ne),this},D.prototype._updateWorkerData=function(q){var K=this;this._loaded=!1;var de=i.extend({},this.workerOptions),ne=this._data;typeof ne=="string"?(de.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ne),i.ResourceType.Source),de.request.collectResourceTiming=this._collectResourceTiming):de.data=JSON.stringify(ne),this.actor.send(this.type+".loadData",de,function(we,Ue){K._removed||Ue&&Ue.abandoned||(K._loaded=!0,Ue&&Ue.resourceTiming&&Ue.resourceTiming[K.id]&&(K._resourceTiming=Ue.resourceTiming[K.id].slice(0)),K.actor.send(K.type+".coalesce",{source:de.source},null),q(we))})},D.prototype.loaded=function(){return this._loaded},D.prototype.loadTile=function(q,K){var de=this,ne=q.actor?"reloadTile":"loadTile";q.actor=this.actor;var we={type:this.type,uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};q.request=this.actor.send(ne,we,function(Ue,ft){return delete q.request,q.unloadVectorData(),q.aborted?K(null):Ue?K(Ue):(q.loadVectorData(ft,de.map.painter,ne==="reloadTile"),K(null))})},D.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.aborted=!0},D.prototype.unloadTile=function(q){q.unloadVectorData(),this.actor.send("removeTile",{uid:q.uid,type:this.type,source:this.id})},D.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},D.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},D.prototype.hasTransition=function(){return!1},D}(i.Evented),Ee=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ce=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.coordinates=q.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(q,K){var de=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(ne,we){de._loaded=!0,ne?de.fire(new i.ErrorEvent(ne)):we&&(de.image=we,q&&(de.coordinates=q),K&&K(),de._finishLoading())})},D.prototype.loaded=function(){return this._loaded},D.prototype.updateImage=function(q){var K=this;return!this.image||!q.url?this:(this.options.url=q.url,this.load(q.coordinates,function(){K.texture=null}),this)},D.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setCoordinates=function(q){var K=this;this.coordinates=q;var de=q.map(i.MercatorCoordinate.fromLngLat);this.tileID=me(de),this.minzoom=this.maxzoom=this.tileID.z;var ne=de.map(function(we){return K.tileID.getTilePoint(we)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ne[0].x,ne[0].y,0,0),this._boundsArray.emplaceBack(ne[1].x,ne[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ne[3].x,ne[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ne[2].x,ne[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Ee.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(q,this.image,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.loadTile=function(q,K){this.tileID&&this.tileID.equals(q.tileID.canonical)?(this.tiles[String(q.tileID.wrap)]=q,q.buckets={},K(null)):(q.state="errored",K(null))},D.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return!1},D}(i.Evented);function me(Y){for(var D=1/0,J=1/0,q=-1/0,K=-1/0,de=0,ne=Y;deK.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+K.start(0)+" and "+K.end(0)+"-second mark."))):this.video.currentTime=q}},D.prototype.getVideo=function(){return this.video},D.prototype.onAdd=function(q){this.map||(this.map=q,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Ee.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE),K.texSubImage2D(K.TEXTURE_2D,0,0,0,K.RGBA,K.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(q,this.video,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this.video&&!this.video.paused},D}(Ce),Se=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),q.coordinates?(!Array.isArray(q.coordinates)||q.coordinates.length!==4||q.coordinates.some(function(ne){return!Array.isArray(ne)||ne.length!==2||ne.some(function(we){return typeof we!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "coordinates"'))),q.animate&&typeof q.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'optional "animate" property must be a boolean value'))),q.canvas?typeof q.canvas!="string"&&!(q.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "canvas"'))),this.options=q,this.animate=q.animate!==void 0?q.animate:!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},D.prototype.getCanvas=function(){return this.canvas},D.prototype.onAdd=function(q){this.map=q,this.load(),this.canvas&&this.animate&&this.play()},D.prototype.onRemove=function(){this.pause()},D.prototype.prepare=function(){var q=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,q=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,q=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var K=this.map.painter.context,de=K.gl;this.boundsBuffer||(this.boundsBuffer=K.createVertexBuffer(this._boundsArray,Ee.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(K,this.canvas,de.RGBA,{premultiply:!0});for(var ne in this.tiles){var we=this.tiles[ne];we.state!=="loaded"&&(we.state="loaded",we.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this._playing},D.prototype._hasInvalidDimensions=function(){for(var q=0,K=[this.canvas.width,this.canvas.height];qthis.max){var we=this._getAndRemoveByKey(this.order[0]);we&&this.onRemove(we)}return this},st.prototype.has=function(D){return D.wrapped().key in this.data},st.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},st.prototype._getAndRemoveByKey=function(D){var J=this.data[D].shift();return J.timeout&&clearTimeout(J.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),J.value},st.prototype.getByKey=function(D){var J=this.data[D];return J?J[0].value:null},st.prototype.get=function(D){if(!this.has(D))return null;var J=this.data[D.wrapped().key][0];return J.value},st.prototype.remove=function(D,J){if(!this.has(D))return this;var q=D.wrapped().key,K=J===void 0?0:this.data[q].indexOf(J),de=this.data[q][K];return this.data[q].splice(K,1),de.timeout&&clearTimeout(de.timeout),this.data[q].length===0&&delete this.data[q],this.onRemove(de.value),this.order.splice(this.order.indexOf(q),1),this},st.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this},st.prototype.filter=function(D){var J=[];for(var q in this.data)for(var K=0,de=this.data[q];K1||(Math.abs(hr)>1&&(Math.abs(hr+Ve)===1?hr+=Ve:Math.abs(hr-Ve)===1&&(hr-=Ve)),!(!Xt.dem||!ft.dem)&&(ft.dem.backfillBorder(Xt.dem,hr,qt),ft.neighboringTiles&&ft.neighboringTiles[Qe]&&(ft.neighboringTiles[Qe].backfilled=!0)))}},D.prototype.getTile=function(q){return this.getTileByID(q.key)},D.prototype.getTileByID=function(q){return this._tiles[q]},D.prototype._retainLoadedChildren=function(q,K,de,ne){for(var we in this._tiles){var Ue=this._tiles[we];if(!(ne[we]||!Ue.hasData()||Ue.tileID.overscaledZ<=K||Ue.tileID.overscaledZ>de)){for(var ft=Ue.tileID;Ue&&Ue.tileID.overscaledZ>K+1;){var Xt=Ue.tileID.scaledTo(Ue.tileID.overscaledZ-1);Ue=this._tiles[Xt.key],Ue&&Ue.hasData()&&(ft=Xt)}for(var hr=ft;hr.overscaledZ>K;)if(hr=hr.scaledTo(hr.overscaledZ-1),q[hr.key]){ne[ft.key]=ft;break}}}},D.prototype.findLoadedParent=function(q,K){if(q.key in this._loadedParentTiles){var de=this._loadedParentTiles[q.key];return de&&de.tileID.overscaledZ>=K?de:null}for(var ne=q.overscaledZ-1;ne>=K;ne--){var we=q.scaledTo(ne),Ue=this._getLoadedTile(we);if(Ue)return Ue}},D.prototype._getLoadedTile=function(q){var K=this._tiles[q.key];if(K&&K.hasData())return K;var de=this._cache.getByKey(q.wrapped().key);return de},D.prototype.updateCacheSize=function(q){var K=Math.ceil(q.width/this._source.tileSize)+1,de=Math.ceil(q.height/this._source.tileSize)+1,ne=K*de,we=5,Ue=Math.floor(ne*we),ft=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Ue):Ue;this._cache.setMaxSize(ft)},D.prototype.handleWrapJump=function(q){var K=this._prevLng===void 0?q:this._prevLng,de=q-K,ne=de/360,we=Math.round(ne);if(this._prevLng=q,we){var Ue={};for(var ft in this._tiles){var Xt=this._tiles[ft];Xt.tileID=Xt.tileID.unwrapTo(Xt.tileID.wrap+we),Ue[Xt.tileID.key]=Xt}this._tiles=Ue;for(var hr in this._timers)clearTimeout(this._timers[hr]),delete this._timers[hr];for(var qt in this._tiles){var Ve=this._tiles[qt];this._setTileReloadTimer(qt,Ve)}}},D.prototype.update=function(q){var K=this;if(this.transform=q,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var de;this.used?this._source.tileID?de=q.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Ur){return new i.OverscaledTileID(Ur.canonical.z,Ur.wrap,Ur.canonical.z,Ur.canonical.x,Ur.canonical.y)}):(de=q.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(de=de.filter(function(Ur){return K._source.hasTile(Ur)}))):de=[];var ne=q.coveringZoomLevel(this._source),we=Math.max(ne-D.maxOverzooming,this._source.minzoom),Ue=Math.max(ne+D.maxUnderzooming,this._source.minzoom),ft=this._updateRetainedTiles(de,ne);if(Oi(this._source.type)){for(var Xt={},hr={},qt=Object.keys(ft),Ve=0,Qe=qt;Vethis._source.maxzoom){var Rt=Ct.children(this._source.maxzoom)[0],Bt=this.getTile(Rt);if(Bt&&Bt.hasData()){de[Rt.key]=Rt;continue}}else{var Dt=Ct.children(this._source.maxzoom);if(de[Dt[0].key]&&de[Dt[1].key]&&de[Dt[2].key]&&de[Dt[3].key])continue}for(var yt=Ot.wasRequested(),Pt=Ct.overscaledZ-1;Pt>=we;--Pt){var ht=Ct.scaledTo(Pt);if(ne[ht.key]||(ne[ht.key]=!0,Ot=this.getTile(ht),!Ot&&yt&&(Ot=this._addTile(ht)),Ot&&(de[ht.key]=ht,yt=Ot.wasRequested(),Ot.hasData())))break}}}return de},D.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var q in this._tiles){for(var K=[],de=void 0,ne=this._tiles[q].tileID;ne.overscaledZ>0;){if(ne.key in this._loadedParentTiles){de=this._loadedParentTiles[ne.key];break}K.push(ne.key);var we=ne.scaledTo(ne.overscaledZ-1);if(de=this._getLoadedTile(we),de)break;ne=we}for(var Ue=0,ft=K;Ue0)&&(K.hasData()&&K.state!=="reloading"?this._cache.add(K.tileID,K,K.getExpiryTimeout()):(K.aborted=!0,this._abortTile(K),this._unloadTile(K))))},D.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var q in this._tiles)this._removeTile(q);this._cache.reset()},D.prototype.tilesIn=function(q,K,de){var ne=this,we=[],Ue=this.transform;if(!Ue)return we;for(var ft=de?Ue.getCameraQueryGeometry(q):q,Xt=q.map(function(Pt){return Ue.pointCoordinate(Pt)}),hr=ft.map(function(Pt){return Ue.pointCoordinate(Pt)}),qt=this.getIds(),Ve=1/0,Qe=1/0,at=-1/0,Ct=-1/0,Ot=0,Rt=hr;Ot=0&&Di[1].y+Ur>=0){var fi=Xt.map(function(gn){return ur.getTilePoint(gn)}),Ti=hr.map(function(gn){return ur.getTilePoint(gn)});we.push({tile:ht,tileID:ur,queryGeometry:fi,cameraQueryGeometry:Ti,scale:br})}}},yt=0;yt=i.browser.now())return!0}return!1},D.prototype.setFeatureState=function(q,K,de){q=q||"_geojsonTileLayer",this._state.updateState(q,K,de)},D.prototype.removeFeatureState=function(q,K,de){q=q||"_geojsonTileLayer",this._state.removeFeatureState(q,K,de)},D.prototype.getFeatureState=function(q,K){return q=q||"_geojsonTileLayer",this._state.getState(q,K)},D.prototype.setDependencies=function(q,K,de){var ne=this._tiles[q];ne&&ne.setDependencies(K,de)},D.prototype.reloadTilesForDependencies=function(q,K){for(var de in this._tiles){var ne=this._tiles[de];ne.hasDependency(q,K)&&this._reloadTile(de,"reloading")}this._cache.filter(function(we){return!we.hasDependency(q,K)})},D}(i.Evented);ri.maxOverzooming=10,ri.maxUnderzooming=3;function Qr(Y,D){var J=Math.abs(Y.wrap*2)-+(Y.wrap<0),q=Math.abs(D.wrap*2)-+(D.wrap<0);return Y.overscaledZ-D.overscaledZ||q-J||D.canonical.y-Y.canonical.y||D.canonical.x-Y.canonical.x}function Oi(Y){return Y==="raster"||Y==="image"||Y==="video"}function $i(){return new i.window.Worker(io.workerUrl)}var tn="mapboxgl_preloaded_worker_pool",fn=function(){this.active={}};fn.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length0?(K-ne)/we:0;return this.points[de].mult(1-Ue).add(this.points[J].mult(Ue))};var Li=function(D,J,q){var K=this.boxCells=[],de=this.circleCells=[];this.xCellCount=Math.ceil(D/q),this.yCellCount=Math.ceil(J/q);for(var ne=0;nethis.width||K<0||J>this.height)return de?!1:[];var we=[];if(D<=0&&J<=0&&this.width<=q&&this.height<=K){if(de)return!0;for(var Ue=0;Ue0:we}},Li.prototype._queryCircle=function(D,J,q,K,de){var ne=D-q,we=D+q,Ue=J-q,ft=J+q;if(we<0||ne>this.width||ft<0||Ue>this.height)return K?!1:[];var Xt=[],hr={hitTest:K,circle:{x:D,y:J,radius:q},seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Ue,we,ft,this._queryCellCircle,Xt,hr,de),K?Xt.length>0:Xt},Li.prototype.query=function(D,J,q,K,de){return this._query(D,J,q,K,!1,de)},Li.prototype.hitTest=function(D,J,q,K,de){return this._query(D,J,q,K,!0,de)},Li.prototype.hitTestCircle=function(D,J,q,K){return this._queryCircle(D,J,q,!0,K)},Li.prototype._queryCell=function(D,J,q,K,de,ne,we,Ue){var ft=we.seenUids,Xt=this.boxCells[de];if(Xt!==null)for(var hr=this.bboxes,qt=0,Ve=Xt;qt=hr[at+0]&&K>=hr[at+1]&&(!Ue||Ue(this.boxKeys[Qe]))){if(we.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[Qe],x1:hr[at],y1:hr[at+1],x2:hr[at+2],y2:hr[at+3]})}}}var Ct=this.circleCells[de];if(Ct!==null)for(var Ot=this.circles,Rt=0,Bt=Ct;Rtwe*we+Ue*Ue},Li.prototype._circleAndRectCollide=function(D,J,q,K,de,ne,we){var Ue=(ne-K)/2,ft=Math.abs(D-(K+Ue));if(ft>Ue+q)return!1;var Xt=(we-de)/2,hr=Math.abs(J-(de+Xt));if(hr>Xt+q)return!1;if(ft<=Ue||hr<=Xt)return!0;var qt=ft-Ue,Ve=hr-Xt;return qt*qt+Ve*Ve<=q*q};function _n(Y,D,J,q,K){var de=i.create();return D?(i.scale(de,de,[1/K,1/K,1]),J||i.rotateZ(de,de,q.angle)):i.multiply(de,q.labelPlaneMatrix,Y),de}function ya(Y,D,J,q,K){if(D){var de=i.clone(Y);return i.scale(de,de,[K,K,1]),J||i.rotateZ(de,de,-q.angle),de}else return q.glCoordMatrix}function Jn(Y,D){var J=[Y.x,Y.y,0,1];zl(J,J,D);var q=J[3];return{point:new i.Point(J[0]/q,J[1]/q),signedDistanceFromCamera:q}}function Ma(Y,D){return .5+.5*(Y/D)}function _o(Y,D){var J=Y[0]/Y[3],q=Y[1]/Y[3],K=J>=-D[0]&&J<=D[0]&&q>=-D[1]&&q<=D[1];return K}function No(Y,D,J,q,K,de,ne,we){var Ue=q?Y.textSizeData:Y.iconSizeData,ft=i.evaluateSizeForZoom(Ue,J.transform.zoom),Xt=[256/J.width*2+1,256/J.height*2+1],hr=q?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;hr.clear();for(var qt=Y.lineVertexArray,Ve=q?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Qe=J.transform.width/J.transform.height,at=!1,Ct=0;Ctde)return{useVertical:!0}}return(Y===i.WritingMode.vertical?D.yJ.x)?{needsFlipping:!0}:null}function ko(Y,D,J,q,K,de,ne,we,Ue,ft,Xt,hr,qt,Ve){var Qe=D/24,at=Y.lineOffsetX*Qe,Ct=Y.lineOffsetY*Qe,Ot;if(Y.numGlyphs>1){var Rt=Y.glyphStartIndex+Y.numGlyphs,Bt=Y.lineStartIndex,Dt=Y.lineStartIndex+Y.lineLength,yt=po(Qe,we,at,Ct,J,Xt,hr,Y,Ue,de,qt);if(!yt)return{notEnoughRoom:!0};var Pt=Jn(yt.first.point,ne).point,ht=Jn(yt.last.point,ne).point;if(q&&!J){var ur=Lo(Y.writingMode,Pt,ht,Ve);if(ur)return ur}Ot=[yt.first];for(var br=Y.glyphStartIndex+1;br0?Ti.point:Ds(hr,fi,Ur,1,K),rn=Lo(Y.writingMode,Ur,gn,Ve);if(rn)return rn}var Ci=Fs(Qe*we.getoffsetX(Y.glyphStartIndex),at,Ct,J,Xt,hr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,Ue,de,qt);if(!Ci)return{notEnoughRoom:!0};Ot=[Ci]}for(var Bi=0,Gi=Ot;Bi0?1:-1,Qe=0;q&&(Ve*=-1,Qe=Math.PI),Ve<0&&(Qe+=Math.PI);for(var at=Ve>0?we+ne:we+ne+1,Ct=K,Ot=K,Rt=0,Bt=0,Dt=Math.abs(qt),yt=[];Rt+Bt<=Dt;){if(at+=Ve,at=Ue)return null;if(Ot=Ct,yt.push(Ct),Ct=hr[at],Ct===void 0){var Pt=new i.Point(ft.getx(at),ft.gety(at)),ht=Jn(Pt,Xt);if(ht.signedDistanceFromCamera>0)Ct=hr[at]=ht.point;else{var ur=at-Ve,br=Rt===0?de:new i.Point(ft.getx(ur),ft.gety(ur));Ct=Ds(br,Pt,Ot,Dt-Rt+1,Xt)}}Rt+=Bt,Bt=Ot.dist(Ct)}var Ur=(Dt-Rt)/Bt,Di=Ct.sub(Ot),fi=Di.mult(Ur)._add(Ot);fi._add(Di._unit()._perp()._mult(J*Ve));var Ti=Qe+Math.atan2(Ct.y-Ot.y,Ct.x-Ot.x);return yt.push(fi),{point:fi,angle:Ti,path:yt}}var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ul(Y,D){for(var J=0;J=1;sn--)Gi.push(Ci.path[sn]);for(var zn=1;zn0){for(var so=Gi[0].clone(),Zo=Gi[0].clone(),ms=1;ms=Ti.x&&Zo.x<=gn.x&&so.y>=Ti.y&&Zo.y<=gn.y?ts=[Gi]:Zo.xgn.x||Zo.ygn.y?ts=[]:ts=i.clipLine([Gi],Ti.x,Ti.y,gn.x,gn.y)}for(var ou=0,Cv=ts;ou=this.screenRightBoundary||Kthis.screenBottomBoundary},il.prototype.isInsideGrid=function(D,J,q,K){return q>=0&&D=0&&J0){var Dt;return this.prevPlacement&&this.prevPlacement.variableOffsets[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID].text&&(Dt=this.prevPlacement.variableOffsets[qt.crossTileID].anchor),this.variableOffsets[qt.crossTileID]={textOffset:Ct,width:q,height:K,anchor:D,textBoxScale:de,prevAnchor:Dt},this.markUsedJustification(Ve,D,qt,Qe),Ve.allowVerticalPlacement&&(this.markUsedOrientation(Ve,Qe,qt),this.placedOrientations[qt.crossTileID]=Qe),{shift:Ot,placedGlyphBoxes:Rt}}},bs.prototype.placeLayerBucketPart=function(D,J,q){var K=this,de=D.parameters,ne=de.bucket,we=de.layout,Ue=de.posMatrix,ft=de.textLabelPlaneMatrix,Xt=de.labelToScreenMatrix,hr=de.textPixelRatio,qt=de.holdingForFade,Ve=de.collisionBoxArray,Qe=de.partiallyEvaluatedTextSize,at=de.collisionGroup,Ct=we.get("text-optional"),Ot=we.get("icon-optional"),Rt=we.get("text-allow-overlap"),Bt=we.get("icon-allow-overlap"),Dt=we.get("text-rotation-alignment")==="map",yt=we.get("text-pitch-alignment")==="map",Pt=we.get("icon-text-fit")!=="none",ht=we.get("symbol-z-order")==="viewport-y",ur=Rt&&(Bt||!ne.hasIconData()||Ot),br=Bt&&(Rt||!ne.hasTextData()||Ct);!ne.collisionArrays&&Ve&&ne.deserializeCollisionBoxes(Ve);var Ur=function(Ci,Bi){if(!J[Ci.crossTileID]){if(qt){K.placements[Ci.crossTileID]=new zs(!1,!1,!1);return}var Gi=!1,sn=!1,zn=!0,Ja=null,co={box:null,offscreen:null},ts={box:null,offscreen:null},so=null,Zo=null,ms=null,ou=0,Cv=0,Lv=0;Bi.textFeatureIndex?ou=Bi.textFeatureIndex:Ci.useRuntimeCollisionCircles&&(ou=Ci.featureIndex),Bi.verticalTextFeatureIndex&&(Cv=Bi.verticalTextFeatureIndex);var wd=Bi.textBox;if(wd){var Kv=function(vc){var eu=i.WritingMode.horizontal;if(ne.allowVerticalPlacement&&!vc&&K.prevPlacement){var Sd=K.prevPlacement.placedOrientations[Ci.crossTileID];Sd&&(K.placedOrientations[Ci.crossTileID]=Sd,eu=Sd,K.markUsedOrientation(ne,eu,Ci))}return eu},cg=function(vc,eu){if(ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&Bi.verticalTextBox)for(var Sd=0,ly=ne.writingModes;Sd0&&(Vd=Vd.filter(function(vc){return vc!==Ad.anchor}),Vd.unshift(Ad.anchor))}var Pv=function(vc,eu,Sd){for(var ly=vc.x2-vc.x1,T1=vc.y2-vc.y1,wu=Ci.textBoxScale,Nx=Pt&&!Bt?eu:null,om={box:[],offscreen:!1},kw=Rt?Vd.length*2:Vd.length,Rv=0;Rv=Vd.length,Ux=K.attemptAnchorPlacement(sm,vc,ly,T1,wu,Dt,yt,hr,Ue,at,Cw,Ci,ne,Sd,Nx);if(Ux&&(om=Ux.placedGlyphBoxes,om&&om.box&&om.box.length)){Gi=!0,Ja=Ux.shift;break}}return om},Jv=function(){return Pv(wd,Bi.iconBox,i.WritingMode.horizontal)},Iv=function(){var vc=Bi.verticalTextBox,eu=co&&co.box&&co.box.length;return ne.allowVerticalPlacement&&!eu&&Ci.numVerticalGlyphVertices>0&&vc?Pv(vc,Bi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};cg(Jv,Iv),co&&(Gi=co.box,zn=co.offscreen);var ay=Kv(co&&co.box);if(!Gi&&K.prevPlacement){var fg=K.prevPlacement.variableOffsets[Ci.crossTileID];fg&&(K.variableOffsets[Ci.crossTileID]=fg,K.markUsedJustification(ne,fg.anchor,Ci,ay))}}else{var pp=function(vc,eu){var Sd=K.collisionIndex.placeCollisionBox(vc,Rt,hr,Ue,at.predicate);return Sd&&Sd.box&&Sd.box.length&&(K.markUsedOrientation(ne,eu,Ci),K.placedOrientations[Ci.crossTileID]=eu),Sd},Td=function(){return pp(wd,i.WritingMode.horizontal)},gp=function(){var vc=Bi.verticalTextBox;return ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&vc?pp(vc,i.WritingMode.vertical):{box:null,offscreen:null}};cg(Td,gp),Kv(co&&co.box&&co.box.length)}}if(so=co,Gi=so&&so.box&&so.box.length>0,zn=so&&so.offscreen,Ci.useRuntimeCollisionCircles){var oh=ne.text.placedSymbolArray.get(Ci.centerJustifiedTextSymbolIndex),hg=i.evaluateSizeForFeature(ne.textSizeData,Qe,oh),oy=we.get("text-padding"),jh=Ci.collisionCircleDiameter;Zo=K.collisionIndex.placeCollisionCircles(Rt,oh,ne.lineVertexArray,ne.glyphOffsetArray,hg,Ue,ft,Xt,q,yt,at.predicate,jh,oy),Gi=Rt||Zo.circles.length>0&&!Zo.collisionDetected,zn=zn&&Zo.offscreen}if(Bi.iconFeatureIndex&&(Lv=Bi.iconFeatureIndex),Bi.iconBox){var im=function(vc){var eu=Pt&&Ja?nc(vc,Ja.x,Ja.y,Dt,yt,K.transform.angle):vc;return K.collisionIndex.placeCollisionBox(eu,Bt,hr,Ue,at.predicate)};ts&&ts.box&&ts.box.length&&Bi.verticalIconBox?(ms=im(Bi.verticalIconBox),sn=ms.box.length>0):(ms=im(Bi.iconBox),sn=ms.box.length>0),zn=zn&&ms.offscreen}var b1=Ct||Ci.numHorizontalGlyphVertices===0&&Ci.numVerticalGlyphVertices===0,w1=Ot||Ci.numIconVertices===0;if(!b1&&!w1?sn=Gi=sn&&Gi:w1?b1||(sn=sn&&Gi):Gi=sn&&Gi,Gi&&so&&so.box&&(ts&&ts.box&&Cv?K.collisionIndex.insertCollisionBox(so.box,we.get("text-ignore-placement"),ne.bucketInstanceId,Cv,at.ID):K.collisionIndex.insertCollisionBox(so.box,we.get("text-ignore-placement"),ne.bucketInstanceId,ou,at.ID)),sn&&ms&&K.collisionIndex.insertCollisionBox(ms.box,we.get("icon-ignore-placement"),ne.bucketInstanceId,Lv,at.ID),Zo&&(Gi&&K.collisionIndex.insertCollisionCircles(Zo.circles,we.get("text-ignore-placement"),ne.bucketInstanceId,ou,at.ID),q)){var sy=ne.bucketInstanceId,nm=K.collisionCircleArrays[sy];nm===void 0&&(nm=K.collisionCircleArrays[sy]=new Io);for(var am=0;am=0;--fi){var Ti=Di[fi];Ur(ne.symbolInstances.get(Ti),ne.collisionArrays[Ti])}else for(var gn=D.symbolInstanceStart;gn=0&&(ne>=0&&Xt!==ne?D.text.placedSymbolArray.get(Xt).crossTileID=0:D.text.placedSymbolArray.get(Xt).crossTileID=q.crossTileID)}},bs.prototype.markUsedOrientation=function(D,J,q){for(var K=J===i.WritingMode.horizontal||J===i.WritingMode.horizontalOnly?J:0,de=J===i.WritingMode.vertical?J:0,ne=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex],we=0,Ue=ne;we0||yt>0,Ur=Bt.numIconVertices>0,Di=K.placedOrientations[Bt.crossTileID],fi=Di===i.WritingMode.vertical,Ti=Di===i.WritingMode.horizontal||Di===i.WritingMode.horizontalOnly;if(br){var gn=ac(ur.text),rn=fi?aa:gn;Qe(D.text,Dt,rn);var Ci=Ti?aa:gn;Qe(D.text,yt,Ci);var Bi=ur.text.isHidden();[Bt.rightJustifiedTextSymbolIndex,Bt.centerJustifiedTextSymbolIndex,Bt.leftJustifiedTextSymbolIndex].forEach(function(Lv){Lv>=0&&(D.text.placedSymbolArray.get(Lv).hidden=Bi||fi?1:0)}),Bt.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Bt.verticalPlacedTextSymbolIndex).hidden=Bi||Ti?1:0);var Gi=K.variableOffsets[Bt.crossTileID];Gi&&K.markUsedJustification(D,Gi.anchor,Bt,Di);var sn=K.placedOrientations[Bt.crossTileID];sn&&(K.markUsedJustification(D,"left",Bt,sn),K.markUsedOrientation(D,sn,Bt))}if(Ur){var zn=ac(ur.icon),Ja=!(qt&&Bt.verticalPlacedIconSymbolIndex&&fi);if(Bt.placedIconSymbolIndex>=0){var co=Ja?zn:aa;Qe(D.icon,Bt.numIconVertices,co),D.icon.placedSymbolArray.get(Bt.placedIconSymbolIndex).hidden=ur.icon.isHidden()}if(Bt.verticalPlacedIconSymbolIndex>=0){var ts=Ja?aa:zn;Qe(D.icon,Bt.numVerticalIconVertices,ts),D.icon.placedSymbolArray.get(Bt.verticalPlacedIconSymbolIndex).hidden=ur.icon.isHidden()}}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var so=D.collisionArrays[Rt];if(so){var Zo=new i.Point(0,0);if(so.textBox||so.verticalTextBox){var ms=!0;if(ft){var ou=K.variableOffsets[Pt];ou?(Zo=Su(ou.anchor,ou.width,ou.height,ou.textOffset,ou.textBoxScale),Xt&&Zo._rotate(hr?K.transform.angle:-K.transform.angle)):ms=!1}so.textBox&&Rn(D.textCollisionBox.collisionVertexArray,ur.text.placed,!ms||fi,Zo.x,Zo.y),so.verticalTextBox&&Rn(D.textCollisionBox.collisionVertexArray,ur.text.placed,!ms||Ti,Zo.x,Zo.y)}var Cv=!!(!Ti&&so.verticalIconBox);so.iconBox&&Rn(D.iconCollisionBox.collisionVertexArray,ur.icon.placed,Cv,qt?Zo.x:0,qt?Zo.y:0),so.verticalIconBox&&Rn(D.iconCollisionBox.collisionVertexArray,ur.icon.placed,!Cv,qt?Zo.x:0,qt?Zo.y:0)}}},Ct=0;CtD},bs.prototype.setStale=function(){this.stale=!0};function Rn(Y,D,J,q,K){Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0)}var _a=Math.pow(2,25),Vu=Math.pow(2,24),Ol=Math.pow(2,17),xo=Math.pow(2,16),Yl=Math.pow(2,9),Ns=Math.pow(2,8),Hl=Math.pow(2,1);function ac(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var D=Y.placed?1:0,J=Math.floor(Y.opacity*127);return J*_a+D*Vu+J*Ol+D*xo+J*Yl+D*Ns+J*Hl+D}var aa=0,Oo=function(D){this._sortAcrossTiles=D.layout.get("symbol-z-order")!=="viewport-y"&&D.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oo.prototype.continuePlacement=function(D,J,q,K,de){for(var ne=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var we=D[this._currentPlacementIndex],Ue=J[we],ft=this.placement.collisionIndex.transform.zoom;if(Ue.type==="symbol"&&(!Ue.minzoom||Ue.minzoom<=ft)&&(!Ue.maxzoom||Ue.maxzoom>ft)){this._inProgressLayer||(this._inProgressLayer=new Oo(Ue));var Xt=this._inProgressLayer.continuePlacement(q[Ue.source],this.placement,this._showCollisionBoxes,Ue,ne);if(Xt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},qo.prototype.commit=function(D){return this.placement.commit(D),this.placement};var ql=512/i.EXTENT/2,Pc=function(D,J,q){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=q;for(var K=0;KD.overscaledZ)for(var ft in Ue){var Xt=Ue[ft];Xt.tileID.isChildOf(D)&&Xt.findMatches(J.symbolInstances,D,ne)}else{var hr=D.scaledTo(Number(we)),qt=Ue[hr.key];qt&&qt.findMatches(J.symbolInstances,D,ne)}}for(var Ve=0;Ve0)throw new Error("Unimplemented: "+ne.map(function(we){return we.command}).join(", ")+".");return de.forEach(function(we){we.command!=="setTransition"&&K[we.command].apply(K,we.args)}),this.stylesheet=q,!0},D.prototype.addImage=function(q,K){if(this.getImage(q))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(q,K),this._afterImageUpdated(q)},D.prototype.updateImage=function(q,K){this.imageManager.updateImage(q,K)},D.prototype.getImage=function(q){return this.imageManager.getImage(q)},D.prototype.removeImage=function(q){if(!this.getImage(q))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(q),this._afterImageUpdated(q)},D.prototype._afterImageUpdated=function(q){this._availableImages=this.imageManager.listImages(),this._changedImages[q]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},D.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},D.prototype.addSource=function(q,K,de){var ne=this;if(de===void 0&&(de={}),this._checkLoaded(),this.sourceCaches[q]!==void 0)throw new Error("There is already a source with this ID");if(!K.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(K).join(", ")+".");var we=["vector","raster","geojson","video","image"],Ue=we.indexOf(K.type)>=0;if(!(Ue&&this._validate(i.validateStyle.source,"sources."+q,K,null,de))){this.map&&this.map._collectResourceTiming&&(K.collectResourceTiming=!0);var ft=this.sourceCaches[q]=new ri(q,K,this.dispatcher);ft.style=this,ft.setEventedParent(this,function(){return{isSourceLoaded:ne.loaded(),source:ft.serialize(),sourceId:q}}),ft.onAdd(this.map),this._changed=!0}},D.prototype.removeSource=function(q){if(this._checkLoaded(),this.sourceCaches[q]===void 0)throw new Error("There is no source with this ID");for(var K in this._layers)if(this._layers[K].source===q)return this.fire(new i.ErrorEvent(new Error('Source "'+q+'" cannot be removed while layer "'+K+'" is using it.')));var de=this.sourceCaches[q];delete this.sourceCaches[q],delete this._updatedSources[q],de.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:q})),de.setEventedParent(null),de.clearTiles(),de.onRemove&&de.onRemove(this.map),this._changed=!0},D.prototype.setGeoJSONSourceData=function(q,K){this._checkLoaded();var de=this.sourceCaches[q].getSource();de.setData(K),this._changed=!0},D.prototype.getSource=function(q){return this.sourceCaches[q]&&this.sourceCaches[q].getSource()},D.prototype.addLayer=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=q.id;if(this.getLayer(ne)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ne+'" already exists on this map')));return}var we;if(q.type==="custom"){if(pl(this,i.validateCustomStyleLayer(q)))return;we=i.createStyleLayer(q)}else{if(typeof q.source=="object"&&(this.addSource(ne,q.source),q=i.clone$1(q),q=i.extend(q,{source:ne})),this._validate(i.validateStyle.layer,"layers."+ne,q,{arrayIndex:-1},de))return;we=i.createStyleLayer(q),this._validateLayer(we),we.setEventedParent(this,{layer:{id:ne}}),this._serializedLayers[we.id]=we.serialize()}var Ue=K?this._order.indexOf(K):this._order.length;if(K&&Ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}if(this._order.splice(Ue,0,ne),this._layerOrderChanged=!0,this._layers[ne]=we,this._removedLayers[ne]&&we.source&&we.type!=="custom"){var ft=this._removedLayers[ne];delete this._removedLayers[ne],ft.type!==we.type?this._updatedSources[we.source]="clear":(this._updatedSources[we.source]="reload",this.sourceCaches[we.source].pause())}this._updateLayer(we),we.onAdd&&we.onAdd(this.map)},D.prototype.moveLayer=function(q,K){this._checkLoaded(),this._changed=!0;var de=this._layers[q];if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be moved.")));return}if(q!==K){var ne=this._order.indexOf(q);this._order.splice(ne,1);var we=K?this._order.indexOf(K):this._order.length;if(K&&we===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}this._order.splice(we,0,q),this._layerOrderChanged=!0}},D.prototype.removeLayer=function(q){this._checkLoaded();var K=this._layers[q];if(!K){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be removed.")));return}K.setEventedParent(null);var de=this._order.indexOf(q);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[q]=K,delete this._layers[q],delete this._serializedLayers[q],delete this._updatedLayers[q],delete this._updatedPaintProps[q],K.onRemove&&K.onRemove(this.map)},D.prototype.getLayer=function(q){return this._layers[q]},D.prototype.hasLayer=function(q){return q in this._layers},D.prototype.setLayerZoomRange=function(q,K,de){this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot have zoom extent.")));return}ne.minzoom===K&&ne.maxzoom===de||(K!=null&&(ne.minzoom=K),de!=null&&(ne.maxzoom=de),this._updateLayer(ne))},D.prototype.setFilter=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ne.filter,K)){if(K==null){ne.filter=void 0,this._updateLayer(ne);return}this._validate(i.validateStyle.filter,"layers."+ne.id+".filter",K,null,de)||(ne.filter=i.clone$1(K),this._updateLayer(ne))}},D.prototype.getFilter=function(q){return i.clone$1(this.getLayer(q).filter)},D.prototype.setLayoutProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(we.getLayoutProperty(K),de)||(we.setLayoutProperty(K,de,ne),this._updateLayer(we))},D.prototype.getLayoutProperty=function(q,K){var de=this.getLayer(q);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style.")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(we.getPaintProperty(K),de)){var Ue=we.setPaintProperty(K,de,ne);Ue&&this._updateLayer(we),this._changed=!0,this._updatedPaintProps[q]=!0}},D.prototype.getPaintProperty=function(q,K){return this.getLayer(q).getPaintProperty(K)},D.prototype.setFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=q.sourceLayer,we=this.sourceCaches[de];if(we===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var Ue=we.getSource().type;if(Ue==="geojson"&&ne){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Ue==="vector"&&!ne){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}q.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),we.setFeatureState(ne,q.id,K)},D.prototype.removeFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var we=ne.getSource().type,Ue=we==="vector"?q.sourceLayer:void 0;if(we==="vector"&&!Ue){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(K&&typeof q.id!="string"&&typeof q.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ne.removeFeatureState(Ue,q.id,K)},D.prototype.getFeatureState=function(q){this._checkLoaded();var K=q.source,de=q.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+K+"' does not exist in the map's style.")));return}var we=ne.getSource().type;if(we==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return q.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ne.getFeatureState(de,q.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(q){return q.serialize()}),layers:this._serializeLayers(this._order)},function(q){return q!==void 0})},D.prototype._updateLayer=function(q){this._updatedLayers[q.id]=!0,q.source&&!this._updatedSources[q.source]&&this.sourceCaches[q.source].getSource().type!=="raster"&&(this._updatedSources[q.source]="reload",this.sourceCaches[q.source].pause()),this._changed=!0},D.prototype._flattenAndSortRenderedFeatures=function(q){for(var K=this,de=function(Ti){return K._layers[Ti].type==="fill-extrusion"},ne={},we=[],Ue=this._order.length-1;Ue>=0;Ue--){var ft=this._order[Ue];if(de(ft)){ne[ft]=Ue;for(var Xt=0,hr=q;Xt=0;Rt--){var Bt=this._order[Rt];if(de(Bt))for(var Dt=we.length-1;Dt>=0;Dt--){var yt=we[Dt].feature;if(ne[yt.layer.id] 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,Bl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,wh=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Qf=`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,_f="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Yc=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,eh="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",th=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,ju=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Hf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,cc=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,of=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Nl=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,Kc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Rc=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,gs=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,jf="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Gh=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,rh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,sf=`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Th=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Mu=`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,ih=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,js=Us(Cf,sc),Eu=Us(Vh,Lf),Dc=Us(cs,nf),ks=Us(Vf,Jl),bc=Us(fl,lc),hu=Us(Fu,Es),_u=Us(Hs,Go),nl=Us(ps,uc),nh=Us(xl,Gu),Ah=Us(qs,ad),zu=Us(Po,od),Fc=Us(Yo,Pa),wc=Us(af,Hu),bd=Us(bl,Gf),xf=Us(Ic,yf),Pf=Us(Bl,wh),Ou=Us(Qf,_f),bf=Us(Yc,eh),jl=Us(th,ju),lf=Us(Hf,cc),Hh=Us(of,Nl),If=Us(Kc,Rc),Cs=Us(gs,jf),du=Us(Gh,rh),ku=Us(sf,Th),Wf=Us(Mu,ih);function Us(Y,D){var J=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,q=D.match(/attribute ([\w]+) ([\w]+)/g),K=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=D.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ne=de?de.concat(K):K,we={};return Y=Y.replace(J,function(Ue,ft,Xt,hr,qt){return we[qt]=!0,ft==="define"?` #ifndef HAS_UNIFORM_u_`+qt+` varying `+Xt+" "+hr+" "+qt+`; #else uniform `+Xt+" "+hr+" u_"+qt+`; #endif `:` #ifdef HAS_UNIFORM_u_`+qt+` `+Xt+" "+hr+" "+qt+" = u_"+qt+`; #endif `}),D=D.replace(J,function(Ue,ft,Xt,hr,qt){var Ve=hr==="float"?"vec2":"vec4",Qe=qt.match(/color/)?"color":Ve;return we[qt]?ft==="define"?` #ifndef HAS_UNIFORM_u_`+qt+` uniform lowp float u_`+qt+`_t; attribute `+Xt+" "+Ve+" a_"+qt+`; varying `+Xt+" "+hr+" "+qt+`; #else uniform `+Xt+" "+hr+" u_"+qt+`; #endif `:Qe==="vec4"?` #ifndef HAS_UNIFORM_u_`+qt+` `+qt+" = a_"+qt+`; #else `+Xt+" "+hr+" "+qt+" = u_"+qt+`; #endif `:` #ifndef HAS_UNIFORM_u_`+qt+` `+qt+" = unpack_mix_"+Qe+"(a_"+qt+", u_"+qt+`_t); #else `+Xt+" "+hr+" "+qt+" = u_"+qt+`; #endif `:ft==="define"?` #ifndef HAS_UNIFORM_u_`+qt+` uniform lowp float u_`+qt+`_t; attribute `+Xt+" "+Ve+" a_"+qt+`; #else uniform `+Xt+" "+hr+" u_"+qt+`; #endif `:Qe==="vec4"?` #ifndef HAS_UNIFORM_u_`+qt+` `+Xt+" "+hr+" "+qt+" = a_"+qt+`; #else `+Xt+" "+hr+" "+qt+" = u_"+qt+`; #endif `:` #ifndef HAS_UNIFORM_u_`+qt+` `+Xt+" "+hr+" "+qt+" = unpack_mix_"+Qe+"(a_"+qt+", u_"+qt+`_t); #else `+Xt+" "+hr+" "+qt+" = u_"+qt+`; #endif `}),{fragmentSource:Y,vertexSource:D,staticAttributes:q,staticUniforms:ne}}var wf=Object.freeze({__proto__:null,prelude:js,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:nl,collisionCircle:nh,debug:Ah,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:xf,fillExtrusionPattern:Pf,hillshadePrepare:Ou,hillshade:bf,line:jl,lineGradient:lf,linePattern:Hh,lineSDF:If,raster:Cs,symbolIcon:du,symbolSDF:ku,symbolTextAndIcon:Wf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,q,K,de,ne,we,Ue){this.context=D;for(var ft=this.boundPaintVertexBuffers.length!==K.length,Xt=0;!ft&&Xt>16,we>>16],u_pixel_coord_lower:[ne&65535,we&65535]}}function uf(Y,D,J,q){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),we=ne.width,Ue=ne.height,ft=Math.pow(2,q.tileID.overscaledZ),Xt=q.tileSize*Math.pow(2,J.transform.tileZoom)/ft,hr=Xt*(q.tileID.canonical.x+q.tileID.wrap*ft),qt=Xt*q.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[we,Ue],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/As(q,1,J.transform.tileZoom),u_pixel_coord_upper:[hr>>16,qt>>16],u_pixel_coord_lower:[hr&65535,qt&65535]}}var Xf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,q){var K=D.style.light,de=K.properties.get("position"),ne=[de.x,de.y,de.z],we=i.create$1();K.properties.get("anchor")==="viewport"&&i.fromRotation(we,-D.transform.angle),i.transformMat3(ne,ne,we);var Ue=K.properties.get("color");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get("intensity"),u_lightcolor:[Ue.r,Ue.g,Ue.b],u_vertical_gradient:+J,u_opacity:q}},Zu=function(Y,D,J,q,K,de,ne){return i.extend(ah(Y,D,J,q),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},Oc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},qc=function(Y){return{u_matrix:Y}},cf=function(Y,D,J,q){return i.extend(qc(Y),Xu(J,D,q))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,q,K){return i.extend(cf(Y,D,J,q),{u_world:K})},At=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Wt=function(Y,D,J,q){var K=Y.transform,de,ne;if(q.paint.get("circle-pitch-alignment")==="map"){var we=As(J,1,K.zoom);de=!0,ne=[we,we]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(q.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,q.paint.get("circle-translate"),q.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},Cr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},Ar=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var q=As(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:q,u_extrude_scale:[D.pixelsToGLUnits[0]/(q*K),D.pixelsToGLUnits[1]/(q*K)],u_overscale_factor:de}},ki=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Xi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},dn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},wn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Nn=function(Y){return{u_matrix:Y}},Yi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Qi=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},on=function(Y,D,J,q){return{u_matrix:Y,u_extrude_scale:As(D,1,J),u_intensity:q}},Fi=function(Y,D,J,q){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:q,u_opacity:D.paint.get("heatmap-opacity")}},$n=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},Ca=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var q=J.paint.get("hillshade-shadow-color"),K=J.paint.get("hillshade-highlight-color"),de=J.paint.get("hillshade-accent-color"),ne=J.paint.get("hillshade-illumination-direction")*(Math.PI/180);J.paint.get("hillshade-illumination-anchor")==="viewport"&&(ne-=Y.transform.angle);var we=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),we),u_image:0,u_latrange:Na(Y,D.tileID),u_light:[J.paint.get("hillshade-exaggeration"),ne],u_shadow:q,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,q=i.create();return i.ortho(q,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(q,q,[0,-i.EXTENT,0]),{u_matrix:q,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Na(Y,D){var J=Math.pow(2,D.canonical.z),q=D.canonical.y;return[new i.MercatorCoordinate(0,q/J).toLngLat().lat,new i.MercatorCoordinate(0,(q+1)/J).toLngLat().lat]}var Yn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},Dn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Xo=function(Y,D,J){var q=Y.transform;return{u_matrix:ml(Y,D,J),u_ratio:1/As(D,1,q.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/q.pixelsToGLUnits[0],1/q.pixelsToGLUnits[1]]}},Ss=function(Y,D,J,q){return i.extend(Xo(Y,D,J),{u_image:0,u_image_height:q})},as=function(Y,D,J,q){var K=Y.transform,de=Ho(D,K);return{u_matrix:ml(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/As(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,q.fromScale,q.toScale],u_fade:q.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},ws=function(Y,D,J,q,K){var de=Y.transform,ne=Y.lineAtlas,we=Ho(D,de),Ue=J.layout.get("line-cap")==="round",ft=ne.getDash(q.from,Ue),Xt=ne.getDash(q.to,Ue),hr=ft.width*K.fromScale,qt=Xt.width*K.toScale;return i.extend(Xo(Y,D,J),{u_patternscale_a:[we/hr,-ft.height/2],u_patternscale_b:[we/qt,-Xt.height/2],u_sdfgamma:ne.width/(Math.min(hr,qt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ft.y,u_tex_y_b:Xt.y,u_mix:K.t})};function Ho(Y,D){return 1/As(Y,1,D.tileZoom)}function ml(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}var Ws=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ls=function(Y,D,J,q,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:q.mix,u_opacity:q.opacity*K.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get("raster-brightness-min"),u_brightness_high:K.paint.get("raster-brightness-max"),u_saturation_factor:ys(K.paint.get("raster-saturation")),u_contrast_factor:no(K.paint.get("raster-contrast")),u_spin_weights:va(K.paint.get("raster-hue-rotate"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function ys(Y){return Y>0?1-1/(1.001-Y):-Y}var rs=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},$l=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Cu=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,q,K,de,ne,we,Ue,ft){var Xt=K.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:we,u_is_text:+Ue,u_pitch_with_map:+q,u_texsize:ft,u_texture:0}},Nc=function(Y,D,J,q,K,de,ne,we,Ue,ft,Xt){var hr=K.transform;return i.extend(Yu(Y,D,J,q,K,de,ne,we,Ue,ft),{u_gamma_scale:q?Math.cos(hr._pitch)*hr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Xt})},pu=function(Y,D,J,q,K,de,ne,we,Ue,ft){return i.extend(Nc(Y,D,J,q,K,de,ne,we,!0,Ue,!0),{u_texsize_icon:ft,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Ua=function(Y,D,J,q,K,de){return i.extend(uf(q,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Xf,fillExtrusionPattern:Wl,fill:Oc,fillPattern:Tc,fillOutline:wl,fillOutlinePattern:vu,circle:At,collisionBox:Cr,collisionCircle:Ar,debug:Xi,clippingMask:wn,heatmap:Yi,heatmapTexture:Qi,hillshade:$n,hillshadePrepare:Ca,line:Yn,lineGradient:Dn,linePattern:Ka,lineSDF:bo,raster:Ws,symbolIcon:rs,symbolSDF:$l,symbolTextAndIcon:Cu,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,q,K,de,ne){for(var we=Y.context,Ue=we.gl,ft=Y.useProgram("collisionBox"),Xt=[],hr=0,qt=0,Ve=0;Ve0){var Dt=i.create(),yt=Ot;i.mul(Dt,Ct.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Dt,Dt,Ct.placementViewportMatrix),Xt.push({circleArray:Bt,circleOffset:qt,transform:yt,invTransform:Dt}),hr+=Bt.length/4,qt=hr}Rt&&ft.draw(we,Ue.LINES,wi.disabled,Fn.disabled,Y.colorModeForRenderPass(),Er.disabled,Kr(Ot,Y.transform,at),J.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,null,Y.transform.zoom,null,null,Rt.collisionVertexBuffer)}}if(!(!ne||!Xt.length)){var Pt=Y.useProgram("collisionCircle"),ht=new i.StructArrayLayout2f1f2i16;ht.resize(hr*4),ht._trim();for(var ur=0,br=0,Ur=Xt;br=0&&(Qe[Ct.associatedIconIndex]={shiftedAnchor:Ti,angle:gn})}}if(Xt){Ve.clear();for(var Ci=Y.icon.placedSymbolArray,Bi=0;Bi0){var ne=i.browser.now(),we=(ne-Y.timeAdded)/de,Ue=D?(ne-D.timeAdded)/de:-1,ft=J.getSource(),Xt=K.coveringZoomLevel({tileSize:ft.tileSize,roundZoom:ft.roundZoom}),hr=!D||Math.abs(D.tileID.overscaledZ-Xt)>Math.abs(Y.tileID.overscaledZ-Xt),qt=hr&&Y.refreshedUponExpiration?1:i.clamp(hr?we:1-Ue,0,1);return Y.refreshedUponExpiration&&we>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-qt}:{opacity:qt,mix:0}}else return{opacity:1,mix:0}}function tr(Y,D,J){var q=J.paint.get("background-color"),K=J.paint.get("background-opacity");if(K!==0){var de=Y.context,ne=de.gl,we=Y.transform,Ue=we.tileSize,ft=J.paint.get("background-pattern");if(!Y.isPatternMissing(ft)){var Xt=!ft&&q.a===1&&K===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Xt){var hr=Fn.disabled,qt=Y.depthModeForSublayer(0,Xt==="opaque"?wi.ReadWrite:wi.ReadOnly),Ve=Y.colorModeForRenderPass(),Qe=Y.useProgram(ft?"backgroundPattern":"background"),at=we.coveringTiles({tileSize:Ue});ft&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var Ct=J.getCrossfadeParameters(),Ot=0,Rt=at;Ot "+J.overscaledZ);var Ot=Ct+" "+Ve+"kb";$a(Y,Ot),ne.draw(q,K.TRIANGLES,we,Ue,wt.alphaBlended,Er.disabled,dn(de,i.Color.transparent,at),Xt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,q=Y.context.gl,K=Y.debugOverlayCanvas.getContext("2d");K.clearRect(0,0,J.width,J.height),K.shadowColor="white",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle="white",K.textBaseline="top",K.font="bold 36px Open Sans, sans-serif",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(q.LINEAR,q.CLAMP_TO_EDGE)}function Co(Y,D,J){var q=Y.context,K=J.implementation;if(Y.renderPass==="offscreen"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),de.call(K,q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),q.setStencilMode(Fn.disabled);var ne=K.renderingMode==="3d"?new wi(Y.context.gl.LEQUAL,wi.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,wi.ReadOnly);q.setDepthMode(ne),K.render(q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState(),q.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:ot,heatmap:Tt,line:Ir,fill:ve,"fill-extrusion":De,hillshade:et,raster:Ft,background:tr,debug:Ta,custom:Co},mo=function(D,J){this.context=new Xr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ri.maxUnderzooming+ri.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Uf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var q=0,K=this.style._order;q256&&this.clearStencil(),q.setColorMode(wt.disabled),q.setDepthMode(wi.disabled);var de=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ne=0,we=J;ne256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new Fn({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new Fn({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,q=this.context.gl,K=D.sort(function(ft,Xt){return Xt.overscaledZ-ft.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var we={},Ue=0;Ue=0;this.currentLayer--){var Dt=this.style._layers[K[this.currentLayer]],yt=de[Dt.source],Pt=Ue[Dt.source];this._renderTileClippingMasks(Dt,Pt),this.renderLayer(this,yt,Dt,Pt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),q=this.imageManager.getPattern(D.to.toString());return!J||!q},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var q=""+D+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[q]||(this.cache[q]=new Rf(this.context,D,wf[D],J,oo[D],this._showOverdrawInspector)),this.cache[q]},mo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,q){var K=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],de=Math.pow(2,q),ne=K.map(function(ft){return i.transformMat4([],ft,D)}).map(function(ft){return i.scale$1([],ft,1/ft[3]/J*de)}),we=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ue=we.map(function(ft){var Xt=i.sub([],ne[ft[0]],ne[ft[1]]),hr=i.sub([],ne[ft[2]],ne[ft[1]]),qt=i.normalize([],i.cross([],Xt,hr)),Ve=-i.dot(qt,ne[ft[1]]);return qt.concat(Ve)});return new Bo(ne,Ue)};var Ps=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ps.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],q=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de=0;if(ne===0)return 0;ne!==J.length&&(q=!1)}if(q)return 2;for(var Ue=0;Ue<3;Ue++){for(var ft=Number.MAX_VALUE,Xt=-Number.MAX_VALUE,hr=0;hrthis.max[Ue]-this.min[Ue])return 0}return 1};var Ts=function(D,J,q,K){if(D===void 0&&(D=0),J===void 0&&(J=0),q===void 0&&(q=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(q)||q<0||isNaN(K)||K<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=D,this.bottom=J,this.left=q,this.right=K};Ts.prototype.interpolate=function(D,J,q){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,q)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,q)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,q)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,q)),this},Ts.prototype.getCenter=function(D,J){var q=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(q,K)},Ts.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Ts.prototype.clone=function(){return new Ts(this.top,this.bottom,this.left,this.right)},Ts.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,q,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=q==null?0:q,this._maxPitch=K==null?60:K,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ts,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,q){this._unmodified=!1,this._edgeInsets.interpolate(D,J,q),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var q=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),we=Math.floor(Math.min(q.x,K.x,de.x,ne.x)),Ue=Math.floor(Math.max(q.x,K.x,de.x,ne.x)),ft=1,Xt=we-ft;Xt<=Ue+ft;Xt++)Xt!==0&&J.push(new i.UnwrappedTileID(Xt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),q=J;if(D.minzoom!==void 0&&JD.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],we=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Ue=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Ue=J);var ft=3,Xt=function(fi){return{aabb:new Ps([fi*de,0,0],[(fi+1)*de,de,0]),zoom:0,x:0,y:0,wrap:fi,fullyVisible:!1}},hr=[],qt=[],Ve=J,Qe=D.reparseOverscaled?q:J;if(this._renderWorldCopies)for(var at=1;at<=3;at++)hr.push(Xt(-at)),hr.push(Xt(at));for(hr.push(Xt(0));hr.length>0;){var Ct=hr.pop(),Ot=Ct.x,Rt=Ct.y,Bt=Ct.fullyVisible;if(!Bt){var Dt=Ct.aabb.intersects(we);if(Dt===0)continue;Bt=Dt===2}var yt=Ct.aabb.distanceX(ne),Pt=Ct.aabb.distanceY(ne),ht=Math.max(Math.abs(yt),Math.abs(Pt)),ur=ft+(1<ur&&Ct.zoom>=Ue){qt.push({tileID:new i.OverscaledTileID(Ct.zoom===Ve?Qe:Ct.zoom,Ct.wrap,Ct.zoom,Ot,Rt),distanceSq:i.sqrLen([ne[0]-.5-Ot,ne[1]-.5-Rt])});continue}for(var br=0;br<4;br++){var Ur=(Ot<<1)+br%2,Di=(Rt<<1)+(br>>1);hr.push({aabb:Ct.aabb.quadrant(br),zoom:Ct.zoom+1,x:Ur,y:Di,wrap:Ct.wrap,fullyVisible:Bt})}}return qt.sort(function(fi,Ti){return fi.distanceSq-Ti.distanceSq}).map(function(fi){return fi.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var q=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(q.x-K.x),de.y-(q.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,q=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(q,q,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=q[3],ne=K[3],we=q[0]/de,Ue=K[0]/ne,ft=q[1]/de,Xt=K[1]/ne,hr=q[2]/de,qt=K[2]/ne,Ve=hr===qt?0:(J-hr)/(qt-hr);return new i.MercatorCoordinate(i.number(we,Ue,Ve)/this.worldSize,i.number(ft,Xt,Ve)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},wo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var q=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[q])return K[q];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),we=de.x+Math.pow(2,de.z)*D.wrap,Ue=i.identity(new Float64Array(16));return i.translate(Ue,Ue,[we*ne,de.y*ne,0]),i.scale(Ue,Ue,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Ue,J?this.alignedProjMatrix:this.projMatrix,Ue),K[q]=new Float32Array(Ue),K[q]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,q=-180,K=180,de,ne,we,Ue,ft=this.size,Xt=this._unmodified;if(this.latRange){var hr=this.latRange;D=i.mercatorYfromLat(hr[1])*this.worldSize,J=i.mercatorYfromLat(hr[0])*this.worldSize,de=J-DJ&&(Ue=J-Ct)}if(this.lngRange){var Ot=Ve.x,Rt=ft.x/2;Ot-RtK&&(we=K-Rt)}(we!==void 0||Ue!==void 0)&&(this.center=this.unproject(new i.Point(we!==void 0?we:Ve.x,Ue!==void 0?Ue:Ve.y))),this._unmodified=Xt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var q=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-q-K,.01,Math.PI-.01)),ne=this.point,we=ne.x,Ue=ne.y,ft=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Xt=ft*1.01,hr=this.height/50,qt=new Float64Array(16);i.perspective(qt,this._fov,this.width/this.height,hr,Xt),qt[8]=-J.x*2/this.width,qt[9]=J.y*2/this.height,i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[0,0,-this.cameraToCenterDistance]),i.rotateX(qt,qt,this._pitch),i.rotateZ(qt,qt,this.angle),i.translate(qt,qt,[-we,-Ue,0]),this.mercatorMatrix=i.scale([],qt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(qt,qt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=qt,this.invProjMatrix=i.invert([],this.projMatrix);var Ve=this.width%2/2,Qe=this.height%2/2,at=Math.cos(this.angle),Ct=Math.sin(this.angle),Ot=we-Math.round(we)+at*Ve+Ct*Qe,Rt=Ue-Math.round(Ue)+at*Qe+Ct*Ve,Bt=new Float64Array(qt);if(i.translate(Bt,Bt,[Ot>.5?Ot-1:Ot,Rt>.5?Rt-1:Rt,0]),this.alignedProjMatrix=Bt,qt=i.create(),i.scale(qt,qt,[this.width/2,-this.height/2,1]),i.translate(qt,qt,[1,-1,0]),this.labelPlaneMatrix=qt,qt=i.create(),i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[-1,-1,0]),i.scale(qt,qt,[2/this.width,2/this.height,1]),this.glCoordMatrix=qt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),qt=i.invert(new Float64Array(16),this.pixelMatrix),!qt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=qt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],q=i.transformMat4(J,J,this.pixelMatrix);return q[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var q=J.x,K=J.y,de=J.x,ne=J.y,we=0,Ue=D;we=3&&!D.some(function(q){return isNaN(q)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),Js=i.extend({deceleration:20,maxSpeed:1400},Lu),Ql=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Tl=function(D){this._map=D,this.clear()};Tl.prototype.clear=function(){this._inertiaBuffer=[]},Tl.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Tl.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),q=160;D.length>0&&J-D[0].time>q;)D.shift()},Tl.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},q=0,K=this._inertiaBuffer;q=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},He.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},He.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},He.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},He.prototype.isEnabled=function(){return!0},He.prototype.isActive=function(){return!1},He.prototype.enable=function(){},He.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens("contextmenu")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var kt=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};kt.prototype.isEnabled=function(){return!!this._enabled},kt.prototype.isActive=function(){return!!this._active},kt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},kt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kt.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},kt.prototype.mousemoveWindow=function(D,J){if(this._active){var q=J;if(!(this._lastPos.equals(q)||!this._box&&q.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),q.length===this.numTouches&&(this.centroid=jt(J),this.touches=nt(q,J)))},qr.prototype.touchmove=function(D,J,q){if(!(this.aborted||!this.centroid)){var K=nt(q,J);for(var de in this.touches){var ne=this.touches[de],we=K[de];(!we||we.dist(ne)>Hr)&&(this.aborted=!0)}}},qr.prototype.touchend=function(D,J,q){if((!this.centroid||D.timeStamp-this.startTime>yr)&&(this.aborted=!0),q.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var _i=function(D){this.singleTap=new qr(D),this.numTaps=D.numTaps,this.reset()};_i.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},_i.prototype.touchstart=function(D,J,q){this.singleTap.touchstart(D,J,q)},_i.prototype.touchmove=function(D,J,q){this.singleTap.touchmove(D,J,q)},_i.prototype.touchend=function(D,J,q){var K=this.singleTap.touchend(D,J,q);if(K){var de=D.timeStamp-this.lastTime0&&(this._active=!0);var K=nt(q,J),de=new i.Point(0,0),ne=new i.Point(0,0),we=0;for(var Ue in K){var ft=K[Ue],Xt=this._touches[Ue];Xt&&(de._add(ft),ne._add(ft.sub(Xt)),we++,K[Ue]=ft)}if(this._touches=K,!(weMath.abs(Y.x)}var Gn=100,ja=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(q){this._lastPoints=q,Xs(q[0].sub(q[1]))&&(this._valid=!1)},D.prototype._move=function(q,K,de){var ne=q[0].sub(this._lastPoints[0]),we=q[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,we,de.timeStamp),!!this._valid){this._lastPoints=q,this._active=!0;var Ue=(ne.y+we.y)/2,ft=-.5;return{pitchDelta:Ue*ft}}},D.prototype.gestureBeginsVertically=function(q,K,de){if(this._valid!==void 0)return this._valid;var ne=2,we=q.mag()>=ne,Ue=K.mag()>=ne;if(!(!we&&!Ue)){if(!we||!Ue)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove0==K.y>0;return Xs(q)&&Xs(K)&&ft}},D}(ia),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var q=0,K=0,de=0,ne=0,we=0;switch(D.keyCode){case 61:case 107:case 171:case 187:q=1;break;case 189:case 109:case 173:q=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),we=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),we=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Ue){var ft=Ue.getZoom();Ue.easeTo({duration:300,easeId:"keyboardHandler",easing:$s,zoom:q?Math.round(ft)+q*(D.shiftKey?2:1):ft,bearing:Ue.getBearing()+K*J._bearingStep,pitch:Ue.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-we*J._panStep],center:Ue.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function $s(Y){return Y*(2-Y)}var Sl=4.000244140625,bu=1/100,dl=1/450,Sc=2,Me=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};Me.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Me.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Me.prototype.isEnabled=function(){return!!this._enabled},Me.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Me.prototype.isZooming=function(){return!!this._zooming},Me.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around==="center")},Me.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Me.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,q=i.browser.now(),K=q-(this._lastWheelEventTime||0);this._lastWheelEventTime=q,J!==0&&J%Sl===0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Me.prototype._onTimeout=function(D){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},Me.prototype._start=function(D){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Me.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var q=this._type==="wheel"&&Math.abs(this._delta)>Sl?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*q)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom=="number"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type==="wheel"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom=="number"?this._targetZoom:J.zoom,we=this._startZoom,Ue=this._easing,ft=!1,Xt;if(this._type==="wheel"&&we&&Ue){var hr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),qt=Ue(hr);Xt=i.number(we,ne,qt),hr<1?this._frameId||(this._frameId=!0):ft=!0}else Xt=ne,ft=!0;return this._active=!0,ft&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ft,zoomDelta:Xt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Me.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var q=this._prevEase,K=(i.browser.now()-q.start)/q.duration,de=q.easing(K+.01)-q.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,we=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,we,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Me.prototype.reset=function(){this._active=!1};var bt=function(D,J){this._clickZoom=D,this._tapZoom=J};bt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},bt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},bt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},bt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var zt=function(){this.reset()};zt.prototype.reset=function(){this._active=!1},zt.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(q){q.easeTo({duration:300,zoom:q.getZoom()+(D.shiftKey?-1:1),around:q.unproject(J)},{originalEvent:D})}}},zt.prototype.enable=function(){this._enabled=!0},zt.prototype.disable=function(){this._enabled=!1,this.reset()},zt.prototype.isEnabled=function(){return this._enabled},zt.prototype.isActive=function(){return this._active};var Rr=function(){this._tap=new _i({numTouches:1,numTaps:1}),this.reset()};Rr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Rr.prototype.touchstart=function(D,J,q){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>gr&&this.reset(),this._tapTime?q.length>0&&(this._swipePoint=J[0],this._swipeTouch=q[0].identifier):this._tap.touchstart(D,J,q))},Rr.prototype.touchmove=function(D,J,q){if(!this._tapTime)this._tap.touchmove(D,J,q);else if(this._swipePoint){if(q[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Rr.prototype.touchend=function(D,J,q){if(this._tapTime)this._swipePoint&&q.length===0&&this.reset();else{var K=this._tap.touchend(D,J,q);K&&(this._tapTime=D.timeStamp)}},Rr.prototype.touchcancel=function(){this.reset()},Rr.prototype.enable=function(){this._enabled=!0},Rr.prototype.disable=function(){this._enabled=!1,this.reset()},Rr.prototype.isEnabled=function(){return this._enabled},Rr.prototype.isActive=function(){return this._active};var jr=function(D,J,q){this._el=D,this._mousePan=J,this._touchPan=q};jr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},jr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},jr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},jr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Nr=function(D,J,q){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=q};Nr.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Nr.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Nr.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Nr.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Gr=function(D,J,q,K){this._el=D,this._touchZoom=J,this._touchRotate=q,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Gr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Gr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Gr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Gr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Gr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Gr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var mi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ui=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function qi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Ei=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tl(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll(["handleEvent","handleWindowEvent"],this);var q=this._el;this._listeners=[[q,"touchstart",{passive:!0}],[q,"touchmove",{passive:!1}],[q,"touchend",void 0],[q,"touchcancel",void 0],[q,"mousedown",void 0],[q,"mousemove",void 0],[q,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[q,"mouseover",void 0],[q,"mouseout",void 0],[q,"dblclick",void 0],[q,"click",void 0],[q,"keydown",{capture:!1}],[q,"keyup",void 0],[q,"wheel",{passive:!1}],[q,"contextmenu",void 0],[i.window,"blur",void 0]];for(var K=0,de=this._listeners;Kwe?Math.min(2,yt):Math.max(.5,yt),fi=Math.pow(Di,1-br),Ti=ne.unproject(Bt.add(Dt.mult(br*fi)).mult(Ur));ne.setLocationAtPoint(ne.renderWorldCopies?Ti.wrap():Ti,Ct)}de._fireMoveEvents(K)},function(br){de._afterEase(K,br)},q),this},D.prototype._prepareEase=function(q,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event("movestart",q)),this._zooming&&!de.zooming&&this.fire(new i.Event("zoomstart",q)),this._rotating&&!de.rotating&&this.fire(new i.Event("rotatestart",q)),this._pitching&&!de.pitching&&this.fire(new i.Event("pitchstart",q))},D.prototype._fireMoveEvents=function(q){this.fire(new i.Event("move",q)),this._zooming&&this.fire(new i.Event("zoom",q)),this._rotating&&this.fire(new i.Event("rotate",q)),this._pitching&&this.fire(new i.Event("pitch",q))},D.prototype._afterEase=function(q,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,we=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event("zoomend",q)),ne&&this.fire(new i.Event("rotateend",q)),we&&this.fire(new i.Event("pitchend",q)),this.fire(new i.Event("moveend",q))}},D.prototype.flyTo=function(q,K){var de=this;if(!q.essential&&i.browser.prefersReducedMotion){var ne=i.pick(q,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ne,K)}this.stop(),q=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},q);var we=this.transform,Ue=this.getZoom(),ft=this.getBearing(),Xt=this.getPitch(),hr=this.getPadding(),qt="zoom"in q?i.clamp(+q.zoom,we.minZoom,we.maxZoom):Ue,Ve="bearing"in q?this._normalizeBearing(q.bearing,ft):ft,Qe="pitch"in q?+q.pitch:Xt,at="padding"in q?q.padding:we.padding,Ct=we.zoomScale(qt-Ue),Ot=i.Point.convert(q.offset),Rt=we.centerPoint.add(Ot),Bt=we.pointLocation(Rt),Dt=i.LngLat.convert(q.center||Bt);this._normalizeCenter(Dt);var yt=we.project(Bt),Pt=we.project(Dt).sub(yt),ht=q.curve,ur=Math.max(we.width,we.height),br=ur/Ct,Ur=Pt.mag();if("minZoom"in q){var Di=i.clamp(Math.min(q.minZoom,Ue,qt),we.minZoom,we.maxZoom),fi=ur/we.zoomScale(Di-Ue);ht=Math.sqrt(fi/Ur*2)}var Ti=ht*ht;function gn(so){var Zo=(br*br-ur*ur+(so?-1:1)*Ti*Ti*Ur*Ur)/(2*(so?br:ur)*Ti*Ur);return Math.log(Math.sqrt(Zo*Zo+1)-Zo)}function rn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ci(so){return(Math.exp(so)+Math.exp(-so))/2}function Bi(so){return rn(so)/Ci(so)}var Gi=gn(0),sn=function(so){return Ci(Gi)/Ci(Gi+ht*so)},zn=function(so){return ur*((Ci(Gi)*Bi(Gi+ht*so)-rn(Gi))/Ti)/Ur},Ja=(gn(1)-Gi)/ht;if(Math.abs(Ur)<1e-6||!isFinite(Ja)){if(Math.abs(ur-br)<1e-6)return this.easeTo(q,K);var co=brq.maxDuration&&(q.duration=0),this._zooming=!0,this._rotating=ft!==Ve,this._pitching=Qe!==Xt,this._padding=!we.isPaddingEqual(at),this._prepareEase(K,!1),this._ease(function(so){var Zo=so*Ja,ms=1/sn(Zo);we.zoom=so===1?qt:Ue+we.scaleZoom(ms),de._rotating&&(we.bearing=i.number(ft,Ve,so)),de._pitching&&(we.pitch=i.number(Xt,Qe,so)),de._padding&&(we.interpolatePadding(hr,at,so),Rt=we.centerPoint.add(Ot));var ou=so===1?Dt:we.unproject(yt.add(Pt.mult(zn(Zo))).mult(ms));we.setLocationAtPoint(we.renderWorldCopies?ou.wrap():ou,Rt),de._fireMoveEvents(K)},function(){return de._afterEase(K)},q),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(q,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!q){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(q,K,de){de.animate===!1||de.duration===0?(q(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=q,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var q=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(q)),q<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(q,K){q=i.wrap(q,-180,180);var de=Math.abs(q-K);return Math.abs(q-360-K)180?-360:de<-180?360:0}},D}(i.Evented),en=function(D){D===void 0&&(D={}),this.options=D,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};en.prototype.getDefaultPosition=function(){return"bottom-right"},en.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),J&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),J===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},en.prototype.onRemove=function(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},en.prototype._setElementTitle=function(D,J){var q=this._map._getUIString("AttributionControl."+J);D.title=q,D.setAttribute("aria-label",q)},en.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},en.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(".mapbox-improve-map"));var J=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var q=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+"="+de.value+(ne=0)return!1;return!0});var we=D.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,D.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},en.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Wi=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};Wi.prototype.onAdd=function(D){this._map=D,this._container=o.create("div","mapboxgl-ctrl");var J=o.create("a","mapboxgl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://www.mapbox.com/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Wi.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Wi.prototype.getDefaultPosition=function(){return"bottom-left"},Wi.prototype._updateLogo=function(D){(!D||D.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Wi.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var q=D[J].getSource();if(q.mapbox_logo)return!0}return!1}},Wi.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add("mapboxgl-compact"):J.classList.remove("mapboxgl-compact")}};var si=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};si.prototype.add=function(D){var J=++this._id,q=this._queue;return q.push({callback:D,id:J,cancelled:!1}),J},si.prototype.remove=function(D){for(var J=this._currentlyRunning,q=J?this._queue.concat(J):this._queue,K=0,de=q;Kq.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(q.minPitch!=null&&q.maxPitch!=null&&q.minPitch>q.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(q.minPitch!=null&&q.minPitchBn)throw new Error("maxPitch must be less than or equal to "+Bn);var de=new wo(q.minZoom,q.maxZoom,q.minPitch,q.maxPitch,q.renderWorldCopies);if(Y.call(this,de,q),this._interactive=q.interactive,this._maxTileCacheSize=q.maxTileCacheSize,this._failIfMajorPerformanceCaveat=q.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=q.preserveDrawingBuffer,this._antialias=q.antialias,this._trackResize=q.trackResize,this._bearingSnap=q.bearingSnap,this._refreshExpiredTiles=q.refreshExpiredTiles,this._fadeDuration=q.fadeDuration,this._crossSourceCollisions=q.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=q.collectResourceTiming,this._renderTaskQueue=new si,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Mr,q.locale),this._clickTolerance=q.clickTolerance,this._requestManager=new i.RequestManager(q.transformRequest,q.accessToken),typeof q.container=="string"){if(this._container=i.window.document.getElementById(q.container),!this._container)throw new Error("Container '"+q.container+"' not found.")}else if(q.container instanceof xi)this._container=q.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(q.maxBounds&&this.setMaxBounds(q.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return K._update(!1)}),this.on("moveend",function(){return K._update(!1)}),this.on("zoom",function(){return K._update(!0)}),typeof i.window!="undefined"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ei(this,q);var ne=typeof q.hash=="string"&&q.hash||void 0;this._hash=q.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:q.center,zoom:q.zoom,bearing:q.bearing,pitch:q.pitch}),q.bounds&&(this.resize(),this.fitBounds(q.bounds,i.extend({},q.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=q.localIdeographFontFamily,q.style&&this.setStyle(q.style,{localIdeographFontFamily:q.localIdeographFontFamily}),q.attributionControl&&this.addControl(new en({customAttribution:q.customAttribution})),this.addControl(new Wi,q.logoPosition),this.on("style.load",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on("data",function(we){K._update(we.dataType==="style"),K.fire(new i.Event(we.dataType+"data",we))}),this.on("dataloading",function(we){K.fire(new i.Event(we.dataType+"dataloading",we))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de="top-right"),!K||!K.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ne=K.onAdd(this);this._controls.push(K);var we=this._controlPositions[de];return de.indexOf("bottom")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],we=de[1];this._resizeCanvas(ne,we),this.transform.resize(ne,we),this.painter.resize(ne,we);var Ue=!this._moving;return Ue&&(this.stop(),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K))),this.fire(new i.Event("resize",K)),Ue&&this.fire(new i.Event("moveend",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ci:K,K>=ci&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error("maxZoom must be greater than the current minZoom")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Zi:K,K=Zi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()Bn)throw new Error("maxPitch must be less than or equal to "+Bn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error("maxPitch must be greater than the current minPitch")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var we=this,Ue;if(K==="mouseenter"||K==="mouseover"){var ft=!1,Xt=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length?ft||(ft=!0,ne.call(we,new se(K,we,Ct.originalEvent,{features:Ot}))):ft=!1},hr=function(){ft=!1};return{layer:de,listener:ne,delegates:{mousemove:Xt,mouseout:hr}}}else if(K==="mouseleave"||K==="mouseout"){var qt=!1,Ve=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length?qt=!0:qt&&(qt=!1,ne.call(we,new se(K,we,Ct.originalEvent)))},Qe=function(Ct){qt&&(qt=!1,ne.call(we,new se(K,we,Ct.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ve,mouseout:Qe}}}else{var at=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length&&(Ct.features=Ot,ne.call(we,Ct),delete Ct.features)};return{layer:de,listener:ne,delegates:(Ue={},Ue[K]=at,Ue)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(we);for(var Ue in we.delegates)this.on(Ue,we.delegates[Ue]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);for(var Ue in we.delegates)this.once(Ue,we.delegates[Ue]);return this},D.prototype.off=function(K,de,ne){var we=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Ue=function(ft){for(var Xt=ft[K],hr=0;hr180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Vn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function na(Y,D,J){var q=Y.classList;for(var K in Vn)q.remove("mapboxgl-"+J+"-anchor-"+K);q.add("mapboxgl-"+J+"-anchor-"+D)}var Ki=function(Y){function D(J,q){if(Y.call(this),(J instanceof i.window.HTMLElement||q)&&(J=i.extend({element:J},q)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=J&&J.anchor||"center",this._color=J&&J.color||"#3FB1CE",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||"auto",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!=="auto"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var K=o.createNS("http://www.w3.org/2000/svg","svg"),de=41,ne=27;K.setAttributeNS(null,"display","block"),K.setAttributeNS(null,"height",de+"px"),K.setAttributeNS(null,"width",ne+"px"),K.setAttributeNS(null,"viewBox","0 0 "+ne+" "+de);var we=o.createNS("http://www.w3.org/2000/svg","g");we.setAttributeNS(null,"stroke","none"),we.setAttributeNS(null,"stroke-width","1"),we.setAttributeNS(null,"fill","none"),we.setAttributeNS(null,"fill-rule","evenodd");var Ue=o.createNS("http://www.w3.org/2000/svg","g");Ue.setAttributeNS(null,"fill-rule","nonzero");var ft=o.createNS("http://www.w3.org/2000/svg","g");ft.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ft.setAttributeNS(null,"fill","#000000");for(var Xt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],hr=0,qt=Xt;hr=K}this._isDragging&&(this._pos=q.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},D.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},D.prototype._addDragHandler=function(q){this._element.contains(q.originalEvent.target)&&(q.preventDefault(),this._positionDelta=q.point.sub(this._pos).add(this._offset),this._pointerdownPos=q.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},D.prototype.setDraggable=function(q){return this._draggable=!!q,this._map&&(q?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(q){return this._rotation=q||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(q){return this._rotationAlignment=q||"auto",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(q){return this._pitchAlignment=q&&q!=="auto"?q:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),kn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ta;function oa(Y){ta!==void 0?Y(ta):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(D){ta=D.state!=="denied",Y(ta)}):(ta=!!i.window.navigator.geolocation,Y(ta))}var ba=0,is=!1,Zs=function(Y){function D(J){Y.call(this),this.options=i.extend({},kn,J),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(q){return this._map=q,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),oa(this._setupUI),this._container},D.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ba=0,is=!1},D.prototype._isOutOfMapMaxBounds=function(q){var K=this._map.getMaxBounds(),de=q.coords;return K&&(de.longitudeK.getEast()||de.latitudeK.getNorth())},D.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},D.prototype._onSuccess=function(q){if(this._map){if(this._isOutOfMapMaxBounds(q)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",q)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=q,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(q),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(q),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",q)),this._finish()}},D.prototype._updateCamera=function(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude),de=q.coords.accuracy,ne=this._map.getBearing(),we=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),we,{geolocateSource:!0})},D.prototype._updateMarker=function(q){if(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=q.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var q=this._map._container.clientHeight/2,K=this._map.unproject([0,q]),de=this._map.unproject([1,q]),ne=K.distanceTo(de),we=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=we+"px",this._circleElement.style.height=we+"px"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(q){if(this._map){if(this.options.trackUserLocation)if(q.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var K=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=K,this._geolocateButton.setAttribute("aria-label",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(q.code===3&&is)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",q)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(q){var K=this;if(this._container.addEventListener("contextmenu",function(we){return we.preventDefault()}),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",q===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var de=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}else{var ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ki(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ki({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(we){var Ue=we.originalEvent&&we.originalEvent.type==="resize";!we.geolocateSource&&K._watchState==="ACTIVE_LOCK"&&!Ue&&(K._watchState="BACKGROUND",K._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),K._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),K.fire(new i.Event("trackuserlocationend")))})},D.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ba--,is=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ba++;var q;ba>1?(q={maximumAge:6e5,timeout:0},is=!0):(q=this.options.positionOptions,is=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,q)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},D}(i.Evented),Va={maxWidth:100,unit:"metric"},Ml=function(D){this.options=i.extend({},Va,D),i.bindAll(["_onMove","setUnit"],this)};Ml.prototype.getDefaultPosition=function(){return"bottom-left"},Ml.prototype._onMove=function(){zo(this._map,this._container,this.options)},Ml.prototype.onAdd=function(D){return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",D.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Ml.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Ml.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var q=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([q,K]),we=de.distanceTo(ne);if(J&&J.unit==="imperial"){var Ue=3.2808*we;if(Ue>5280){var ft=Ue/5280;Qs(D,q,ft,Y._getUIString("ScaleControl.Miles"))}else Qs(D,q,Ue,Y._getUIString("ScaleControl.Feet"))}else if(J&&J.unit==="nautical"){var Xt=we/1852;Qs(D,q,Xt,Y._getUIString("ScaleControl.NauticalMiles"))}else we>=1e3?Qs(D,q,we/1e3,Y._getUIString("ScaleControl.Kilometers")):Qs(D,q,we,Y._getUIString("ScaleControl.Meters"))}function Qs(Y,D,J,q){var K=Vl(J),de=K/J;Y.style.width=D*de+"px",Y.innerHTML=K+" "+q}function al(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(""+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:al(J),D*J}var ss=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};ss.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ss.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ss.prototype._setupUI=function(){var D=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",D).setAttribute("aria-hidden",!0),D.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute("aria-label",D),this._fullscreenButton.title=D},ss.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ss.prototype._isFullscreen=function(){return this._fullscreen},ss.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ss.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Vs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ys=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wa=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Vs),J),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(q){return this._map&&this.remove(),this._map=q,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},D.prototype.isOpen=function(){return!!this._map},D.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(q){return this._lngLat=i.LngLat.convert(q),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},D.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(q){return this.setDOMContent(i.window.document.createTextNode(q))},D.prototype.setHTML=function(q){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement("body"),ne;for(de.innerHTML=q;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(q){return this.options.maxWidth=q,this._update(),this},D.prototype.setDOMContent=function(q){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(q),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(q){this._container&&this._container.classList.add(q)},D.prototype.removeClassName=function(q){this._container&&this._container.classList.remove(q)},D.prototype.setOffset=function(q){return this.options.offset=q,this._update(),this},D.prototype.toggleClassName=function(q){if(this._container)return this._container.classList.toggle(q)},D.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},D.prototype._onMouseUp=function(q){this._update(q.point)},D.prototype._onMouseMove=function(q){this._update(q.point)},D.prototype._onDrag=function(q){this._update(q.point)},D.prototype._update=function(q){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!this._content)&&(this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ve){return K._container.classList.add(Ve)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!q))){var ne=this._pos=this._trackPointer&&q?q:this._map.project(this._lngLat),we=this.options.anchor,Ue=ol(this.options.offset);if(!we){var ft=this._container.offsetWidth,Xt=this._container.offsetHeight,hr;ne.y+Ue.bottom.ythis._map.transform.height-Xt?hr=["bottom"]:hr=[],ne.xthis._map.transform.width-ft/2&&hr.push("right"),hr.length===0?we="bottom":we=hr.join("-")}var qt=ne.add(Ue[we]).round();o.setTransform(this._container,Vn[we]+" translate("+qt.x+"px,"+qt.y+"px)"),na(this._container,we,"popup")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var q=this._container.querySelector(Ys);q&&q.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function ol(Y){if(Y)if(typeof Y=="number"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),"top-left":new i.Point(D,D),"top-right":new i.Point(-D,D),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(D,-D),"bottom-right":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,"top-left":J,"top-right":J,bottom:J,"bottom-left":J,"bottom-right":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),"top-left":i.Point.convert(Y["top-left"]||[0,0]),"top-right":i.Point.convert(Y["top-right"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),"bottom-left":i.Point.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Y["bottom-right"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return ol(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:li,NavigationControl:Vi,GeolocateControl:Zs,AttributionControl:en,ScaleControl:Ml,FullscreenControl:ss,Popup:wa,Marker:Ki,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:ua,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return fn.workerCount},set workerCount(Y){fn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:""};return io}),r})});var fGe=ye((_xr,cGe)=>{"use strict";var iw=Dr(),Fjt=ru().sanitizeHTML,zjt=iJ(),sGe=c1();function lGe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=sGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ig=lGe.prototype;ig.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=$z(t)};ig.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))};ig.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ig.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ig.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ig.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ig.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,!!$z(e)){var r=Ojt(e);t.addSource(this.idSource,r)}};ig.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function uGe(e){var t={},r={};switch(e.type){case"circle":iw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":iw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":iw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=zjt(n.textposition,n.iconsize);iw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),iw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":iw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Ojt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=Fjt(e.sourceattribution)),n}cGe.exports=function(t,r,n){var i=new lGe(t,r);return i.update(n),i}});var xGe=ye((xxr,_Ge)=>{"use strict";var cJ=uJ(),fJ=Dr(),pGe=ix(),hGe=qa(),qjt=ho(),Bjt=yv(),Qz=vf(),gGe=Eg(),Njt=gGe.drawMode,Ujt=gGe.selectMode,Vjt=Of().prepSelect,Gjt=Of().clearOutline,Hjt=Of().clearSelectionsCache,jjt=Of().selectOnClick,_x=c1(),Wjt=fGe();function mGe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Nh=mGe.prototype;Nh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Nh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=yGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new cJ.Map({container:i.div,style:o.style,center:hJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new cJ.AttributionControl({compact:!0}));u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once("load",f)})),c=c.concat(pGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Nh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=yGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(pGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Nh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&jjt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&Qz.click(n,l.originalEvent)}}};Nh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=fJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),Ujt(a)||Njt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){Vjt(l,u,c,t.dragOptions,a)},Bjt.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))};Nh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Nh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var dJ=Dr(),Xjt=k_(),Zjt=Yd(),bGe=Nk();wGe.exports=function(t,r,n){Xjt(t,r,n,{type:"mapbox",attributes:bGe,handleDefaults:Yjt,partition:"y",accessToken:r._mapboxAccessToken})};function Yjt(e,t,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),a=r("bounds.east"),o=r("bounds.south"),s=r("bounds.north");(i===void 0||a===void 0||o===void 0||s===void 0)&&delete t.bounds,Zjt(e,t,{name:"layers",handleItemDefaults:Kjt}),t._input=e}function Kjt(e,t){function r(l,u){return dJ.coerce(e,t,bGe.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",dJ.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"),dJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var e7=ye(Np=>{"use strict";var AGe=uJ(),rm=Dr(),vJ=rm.strTranslate,Jjt=rm.strScale,$jt=Id().getSubplotCalcData,Qjt=Wp(),eWt=Oa(),SGe=So(),tWt=ru(),rWt=xGe(),xx="mapbox",ey=Np.constants=c1();Np.name=xx;Np.attr="subplot";Np.idRoot=xx;Np.idRegex=Np.attrRegex=rm.counterRegex(xx);var iWt=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Np.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Np.layoutAttributes=Nk();Np.supplyLayoutDefaults=TGe();var MGe=!0;Np.plot=function(t){MGe&&(MGe=!1,rm.warn(iWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[xx];if(AGe.version!==ey.requiredVersion)throw new Error(ey.wrongVersionErrorMsg);var a=nWt(t,i);AGe.accessToken=a;for(var o=0;op/2){var k=d.split("|").join("
");_.text(k).attr("data-unformatted",k).call(tWt.convertToTspans,e),b=SGe.bBox(_.node())}_.attr("transform",vJ(-3,-b.height+8)),v.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var E=1;b.width+6>p&&(E=p/(b.width+6));var S=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",vJ(S[0],S[1])+Jjt(E))}};function nWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l1&&rm.warn(ey.multipleTokensErrorMsg),i[0]):(a.length&&rm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function EGe(e){return typeof e=="string"&&(ey.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[xx],n=0;n{"use strict";var Txr=["*scattermapbox* trace is deprecated!","Please consider switching to the *scattermap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");kGe.exports={attributes:Wz(),supplyDefaults:NVe(),colorbar:$d(),formatLabels:rJ(),calc:pF(),plot:eGe(),hoverPoints:Jz().hoverPoints,eventData:nGe(),selectPoints:oGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:e7(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var PGe=ye((Sxr,LGe)=>{"use strict";LGe.exports=CGe()});var pJ=ye((Mxr,IGe)=>{"use strict";var f1=t5(),aWt=Tu(),{hovertemplateAttrs:oWt,templatefallbackAttrs:sWt}=Ll(),lWt=Gl(),bx=Ao().extendFlat;IGe.exports=bx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:bx({},f1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:f1.text,hovertext:f1.hovertext,marker:{line:{color:bx({},f1.marker.line.color,{editType:"plot"}),width:bx({},f1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:bx({},f1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:bx({},f1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:bx({},f1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:f1.hoverinfo,hovertemplate:oWt({},{keys:["properties"]}),hovertemplatefallback:sWt(),showlegend:bx({},lWt.showlegend,{dflt:!1})},aWt("",{cLetter:"z",editTypeOverride:"calc"}))});var DGe=ye((Exr,RGe)=>{"use strict";var Hk=Dr(),uWt=Qh(),cWt=pJ();RGe.exports=function(t,r,n,i){function a(c,f){return Hk.coerce(t,r,cWt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!Hk.isArrayOrTypedArray(o)||!o.length||!Hk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||Hk.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"),uWt(t,r,i,a,{prefix:"",cLetter:"z"}),Hk.coerceSelectionMarkerOpacity(r,a)}});var gJ=ye((kxr,OGe)=>{"use strict";var fWt=Eo(),h1=Dr(),hWt=tc(),dWt=So(),vWt=tx().makeBlank,FGe=ix();function pWt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:vWt()};if(!r)return a;var o=FGe.extractTraceFeature(e);if(!o)return a;var s=hWt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;h1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var E=k.mo;return fWt(E)?+h1.constrain(E,0,1):0});var f;h1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;h1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var BGe=gJ().convert,gWt=gJ().convertOnSelect,qGe=c1().traceLayerPrefix;function NGe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",qGe+t+"-fill"],["line",qGe+t+"-line"]],this.below=null}var M5=NGe.prototype;M5.update=function(e){this._update(BGe(e)),e[0].trace._glTrace=this};M5.updateOnSelect=function(e){this._update(gWt(e))};M5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};M5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};UGe.exports=function(t,r){var n=r[0].trace,i=new NGe(t,n.uid),a=i.sourceId,o=BGe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var HGe=ye((Pxr,GGe)=>{"use strict";var Lxr=["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");GGe.exports={attributes:pJ(),supplyDefaults:DGe(),colorbar:S_(),calc:zF(),plot:VGe(),hoverPoints:qF(),eventData:BF(),selectPoints:NF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";jGe.exports=HGe()});var yJ=ye((Rxr,ZGe)=>{"use strict";var mWt=Tu(),{hovertemplateAttrs:yWt,templatefallbackAttrs:_Wt}=Ll(),XGe=Gl(),t7=Wz(),mJ=Ao().extendFlat;ZGe.exports=mJ({lon:t7.lon,lat:t7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t7.text,hovertext:t7.hovertext,hoverinfo:mJ({},XGe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:yWt(),hovertemplatefallback:_Wt(),showlegend:mJ({},XGe.showlegend,{dflt:!1})},mWt("",{cLetter:"z",editTypeOverride:"calc"}))});var KGe=ye((Dxr,YGe)=>{"use strict";var xWt=Dr(),bWt=Qh(),wWt=yJ();YGe.exports=function(t,r,n,i){function a(u,c){return xWt.coerce(t,r,wWt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),bWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var QGe=ye((Fxr,$Ge)=>{"use strict";var _J=Eo(),TWt=Dr().isArrayOrTypedArray,xJ=fs().BADNUM,AWt=gv(),JGe=Dr()._;$Ge.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=TWt(a)&&a.length,s=0;s{"use strict";var SWt=Eo(),bJ=Dr(),eHe=ka(),tHe=tc(),rHe=fs().BADNUM,MWt=tx().makeBlank;iHe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:MWt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=bJ.isArrayOrTypedArray(l)&&l.length,f=bJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=tHe.extractOpts(r),p=b.reversescale?tHe.flipScale(b.colorscale):b.colorscale,k=p[0][1],E=eHe.opacity(k)<1?k:eHe.addOpacity(k,0),S=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s{"use strict";var aHe=nHe(),EWt=c1().traceLayerPrefix;function oHe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",EWt+t+"-heatmap"]],this.below=null}var r7=oHe.prototype;r7.update=function(e){var t=this.subplot,r=this.layerList,n=aHe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};r7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};sHe.exports=function(t,r){var n=r[0].trace,i=new oHe(t,n.uid),a=i.sourceId,o=aHe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var cHe=ye((qxr,uHe)=>{"use strict";var kWt=ho(),CWt=Jz().hoverPoints,LWt=Jz().getExtraText;uHe.exports=function(t,r,n){var i=CWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=kWt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=LWt(s,l,o[0].t.labels),[a]}}});var hHe=ye((Bxr,fHe)=>{"use strict";fHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var vHe=ye((Uxr,dHe)=>{"use strict";var Nxr=["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");dHe.exports={attributes:yJ(),supplyDefaults:KGe(),colorbar:S_(),formatLabels:rJ(),calc:QGe(),plot:lHe(),hoverPoints:cHe(),eventData:hHe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";pHe.exports=vHe()});var yHe=ye((Gxr,mHe)=>{mHe.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © 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 xHe=ye((Hxr,_He)=>{_He.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 wx=ye((jxr,SHe)=>{"use strict";var PWt=Z1(),IWt=yHe(),RWt=xHe(),DWt='\xA9 OpenStreetMap contributors',bHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",wHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",i7="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",FWt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",zWt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",OWt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",AHe={basic:i7,streets:i7,outdoors:i7,light:bHe,dark:wHe,satellite:RWt,"satellite-streets":IWt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:DWt,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":bHe,"carto-darkmatter":wHe,"carto-voyager":i7,"carto-positron-nolabels":FWt,"carto-darkmatter-nolabels":zWt,"carto-voyager-nolabels":OWt},THe=PWt(AHe);SHe.exports={styleValueDflt:"basic",stylesMap:AHe,styleValuesMap:THe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",THe.join(", "),"or use a tile service."].join(` `),mapOnErrorMsg:"Map error."}});var jk=ye((Wxr,LHe)=>{"use strict";var MHe=Dr(),EHe=ka().defaultLine,qWt=Cc().attributes,BWt=ec(),NWt=pf().textposition,UWt=mc().overrideAll,VWt=vl().templatedArray,kHe=wx(),CHe=BWt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});CHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var GWt=LHe.exports=UWt({_arrayAttrRegexps:[MHe.counterRegex("map",".layers",!0)],domain:qWt({name:"map"}),style:{valType:"any",values:kHe.styleValuesMap,dflt:kHe.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:VWt("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:EHe},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:EHe}},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:CHe,textposition:MHe.extendFlat({},NWt,{arrayOk:!1})}})},"plot","from-root");GWt.uirevision={valType:"any",editType:"none"}});var n7=ye((Xxr,DHe)=>{"use strict";var{hovertemplateAttrs:HWt,texttemplateAttrs:jWt,templatefallbackAttrs:PHe}=Ll(),WWt=Cg(),Wk=j2(),E5=pf(),IHe=jk(),XWt=Gl(),ZWt=Tu(),nw=Ao().extendFlat,YWt=mc().overrideAll,KWt=jk(),RHe=Wk.line,k5=Wk.marker;DHe.exports=YWt({lon:Wk.lon,lat:Wk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:nw({},KWt.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:nw({},k5.opacity,{dflt:1})},mode:nw({},E5.mode,{dflt:"markers"}),text:nw({},E5.text,{}),texttemplate:jWt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:PHe({editType:"plot"}),hovertext:nw({},E5.hovertext,{}),line:{color:RHe.color,width:RHe.width},connectgaps:E5.connectgaps,marker:nw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:k5.opacity,size:k5.size,sizeref:k5.sizeref,sizemin:k5.sizemin,sizemode:k5.sizemode},ZWt("marker")),fill:Wk.fill,fillcolor:WWt(),textfont:IHe.layers.symbol.textfont,textposition:IHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:E5.selected.marker},unselected:{marker:E5.unselected.marker},hoverinfo:nw({},XWt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:HWt(),hovertemplatefallback:PHe()},"calc","nested")});var wJ=ye((Zxr,FHe)=>{"use strict";var JWt=["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"];FHe.exports={isSupportedFont:function(e){return JWt.indexOf(e)!==-1}}});var qHe=ye((Yxr,OHe)=>{"use strict";var Xk=Dr(),TJ=Ru(),$Wt=$p(),QWt=R0(),eXt=D0(),tXt=Rg(),zHe=n7(),rXt=wJ().isSupportedFont;OHe.exports=function(t,r,n,i){function a(p,k){return Xk.coerce(t,r,zHe,p,k)}function o(p,k){return Xk.coerce2(t,r,zHe,p,k)}var s=iXt(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"),TJ.hasMarkers(r)){$Wt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Xk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Xk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}TJ.hasLines(r)&&(QWt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,_=a("cluster.enabled",v);if(_||TJ.hasText(r)){var b=i.font.family;eXt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:rXt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&tXt(t,r,n,a),Xk.coerceSelectionMarkerOpacity(r,a)};function iXt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var AJ=ye((Kxr,NHe)=>{"use strict";var BHe=ho();NHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=BHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=BHe.tickText(o,o.c2l(s[1]),!0).text,i}});var SJ=ye((Jxr,VHe)=>{"use strict";var UHe=Dr();VHe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=UHe.isArrayOrTypedArray(r)?UHe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var ZHe=ye(($xr,XHe)=>{"use strict";var jHe=Eo(),ov=Dr(),nXt=fs().BADNUM,o7=tx(),GHe=tc(),aXt=So(),oXt=k3(),s7=Ru(),sXt=wJ().isSupportedFont,lXt=SJ(),uXt=ip().appendArrayPointValue,cXt=ru().NEWLINES,fXt=ru().BR_TAG_ALL;XHe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=s7.hasLines(n),s=s7.hasMarkers(n),l=s7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=a7("fill"),d=a7("line"),v=a7("circle"),_=a7("symbol"),b={fill:h,line:d,circle:v,symbol:_};if(!i)return b;var p;if((a||o)&&(p=o7.calcTraceToLineCoords(r)),a&&(h.geojson=o7.makePolygon(p),h.layout.visibility="visible",ov.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=o7.makeLine(p),d.layout.visibility="visible",ov.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=hXt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":EJ(n.cluster.color,n.cluster.step),"circle-radius":EJ(n.cluster.size,n.cluster.step),"circle-opacity":EJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":HHe(n),"text-size":12}}),ov.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(_.geojson=dXt(r,t),ov.extendFlat(_.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(ov.extendFlat(_.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&ov.extendFlat(_.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),_.layout["icon-allow-overlap"]=n.marker.allowoverlap,ov.extendFlat(_.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var E=(n.marker||{}).size,S=lXt(n.textposition,E);ov.extendFlat(_.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":HHe(n)}),ov.extendFlat(_.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function a7(e){return{type:e,geojson:o7.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function hXt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=ov.isArrayOrTypedArray(r.color),a=ov.isArrayOrTypedArray(r.size),o=ov.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&(GHe.hasColorscale(t,"marker")?c=GHe.makeColorScaleFuncFromTrace(r):c=ov.identity);var f;a&&(f=oXt(t));var h;o&&(h=function(E){var S=jHe(E)?+ov.constrain(E,0,1):0;return l(S)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),sXt(s)||(s=r);var l=s.split(", ");return l}});var $He=ye((Qxr,JHe)=>{"use strict";var vXt=Dr(),YHe=ZHe(),C5=wx().traceLayerPrefix,ng={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function KHe(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:C5+t+"-fill",line:C5+t+"-line",circle:C5+t+"-circle",symbol:C5+t+"-symbol",cluster:C5+t+"-cluster",clusterCount:C5+t+"-cluster-count"},this.below=null}var Zk=KHe.prototype;Zk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&vXt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};Zk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Zk.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=S[L];i.removeLayer(u.layerIds[x])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var S=ng.nonCluster,L=0;L=0;L--){var x=S[L];i.removeLayer(u.layerIds[x]),E||i.removeSource(u.sourceIds[x])}}function v(E){l?f(E):d(E)}function _(E){s?c(E):h(E)}function b(){for(var E=s?ng.cluster:ng.nonCluster,S=0;S=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};JHe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new KHe(t,n.uid,i,a),s=YHe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var pXt=vf(),kJ=Dr(),gXt=cT(),mXt=kJ.fillText,yXt=fs().BADNUM,_Xt=wx().traceLayerPrefix;function xXt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=_Xt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function _(M){var g=M.lonlat;if(g[0]===yXt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=kJ.modHalf(g[0],360),T=g[1],z=s.project([P,T]),O=z.x-a.c2p([v,T]),V=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+V*V)-G,1-3/G)}if(pXt.getClosest(n,_,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[kJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(k),S=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=S-L,e.y1=S+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=gXt(i,b),e.extraText=QHe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function QHe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&mXt(t,e,u),u.join("
")}eje.exports={hoverPoints:xXt,getExtraText:QHe}});var rje=ye((tbr,tje)=>{"use strict";tje.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var nje=ye((rbr,ije)=>{"use strict";var bXt=Dr(),wXt=Ru(),TXt=fs().BADNUM;ije.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!wXt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof CJ=="object"&&typeof LJ!="undefined"?LJ.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(CJ,function(){"use strict";var e={},t={};function r(i,a,o){if(t[i]=o,i==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(R,A,F,W){return new(F||(F=Promise))(function(re,fe){function pe(ct){try{Ke(W.next(ct))}catch(Lt){fe(Lt)}}function ze(ct){try{Ke(W.throw(ct))}catch(Lt){fe(Lt)}}function Ke(ct){var Lt;ct.done?re(ct.value):(Lt=ct.value,Lt instanceof F?Lt:new F(function($t){$t(Lt)})).then(pe,ze)}Ke((W=W.apply(R,A||[])).next())})}function o(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(R,A){this.x=R,this.y=A}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,A){return this.clone()._rotateAround(R,A)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var A=R.x-this.x,F=R.y-this.y;return A*A+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,A){return Math.atan2(this.x*A-this.y*R,this.x*R+this.y*A)},_matMult:function(R){var A=R[2]*this.x+R[3]*this.y;return this.x=R[0]*this.x+R[1]*this.y,this.y=A,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var A=Math.cos(R),F=Math.sin(R),W=F*this.x+A*this.y;return this.x=A*this.x-F*this.y,this.y=W,this},_rotateAround:function(R,A){var F=Math.cos(R),W=Math.sin(R),re=A.y+W*(this.x-A.x)+F*(this.y-A.y);return this.x=A.x+F*(this.x-A.x)-W*(this.y-A.y),this.y=re,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(R){return R instanceof l?R:Array.isArray(R)?new l(R[0],R[1]):R};var u=o(s),c=f;function f(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}f.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var re=this.sampleCurveX(F)-R;if(Math.abs(re)re?pe=F:ze=F,F=.5*(ze-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var h=o(c);let d,v;function _(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(v==null&&(v=!1,_())){let A=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(A){for(let W=0;W<5*5;W++){let re=4*W;A.fillStyle=`rgb(${re},${re+1},${re+2})`,A.fillRect(W%5,Math.floor(W/5),1,1)}let F=A.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&F[W]!==W){v=!0;break}}}return v||!1}function p(R,A,F,W){let re=new h(R,A,F,W);return fe=>re.solve(fe)}let k=p(.25,.1,.25,1);function E(R,A,F){return Math.min(F,Math.max(A,R))}function S(R,A,F){let W=F-A,re=((R-A)%W+W)%W+A;return re===A?F:re}function L(R,...A){for(let F of A)for(let W in F)R[W]=F[W];return R}let x=1;function C(R,A,F){let W={};for(let re in R)W[re]=A.call(this,R[re],re,R);return W}function M(R,A,F){let W={};for(let re in R)A.call(this,R[re],re,R)&&(W[re]=R[re]);return W}function g(R){return Array.isArray(R)?R.map(g):typeof R=="object"&&R?C(R,g):R}let P={};function T(R){P[R]||(typeof console!="undefined"&&console.warn(R),P[R]=!0)}function z(R,A,F){return(F.y-R.y)*(A.x-R.x)>(A.y-R.y)*(F.x-R.x)}function O(R){return typeof WorkerGlobalScope!="undefined"&&R!==void 0&&R instanceof WorkerGlobalScope}let V=null;function G(R){return typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap}let Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function j(R,A,F,W,re){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let fe=new VideoFrame(R,{timestamp:0});try{let pe=fe==null?void 0:fe.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let ze=pe.startsWith("BGR"),Ke=new Uint8ClampedArray(W*re*4);if(yield fe.copyTo(Ke,function(ct,Lt,$t,fr,mr){let Pr=4*Math.max(-Lt,0),zr=(Math.max(0,$t)-$t)*fr*4+Pr,ui=4*fr,yi=Math.max(0,Lt),vn=Math.max(0,$t);return{rect:{x:yi,y:vn,width:Math.min(ct.width,Lt+fr)-yi,height:Math.min(ct.height,$t+mr)-vn},layout:[{offset:zr,stride:ui}]}}(R,A,F,W,re)),ze)for(let ct=0;ctO(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(R,A){if(/:\/\//.test(R.url)&&!/^https?:|^file:/.test(R.url)){let W=Ee(R.url);if(W)return W(R,A);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:Ce},A)}if(!(/^file:/.test(F=R.url)||/^file:/.test(ie())&&!/^\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(W,re){return a(this,void 0,void 0,function*(){let fe=new Request(W.url,{method:W.method||"GET",body:W.body,credentials:W.credentials,headers:W.headers,cache:W.cache,referrer:ie(),signal:re.signal});W.type!=="json"||fe.headers.has("Accept")||fe.headers.set("Accept","application/json");let pe=yield fetch(fe);if(!pe.ok){let ct=yield pe.blob();throw new me(pe.status,pe.statusText,W.url,ct)}let ze;ze=W.type==="arrayBuffer"||W.type==="image"?pe.arrayBuffer():W.type==="json"?pe.json():pe.text();let Ke=yield ze;if(re.signal.aborted)throw oe();return{data:Ke,cacheControl:pe.headers.get("Cache-Control"),expires:pe.headers.get("Expires")}})}(R,A);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:Ce},A)}var F;return function(W,re){return new Promise((fe,pe)=>{var ze;let Ke=new XMLHttpRequest;Ke.open(W.method||"GET",W.url,!0),W.type!=="arrayBuffer"&&W.type!=="image"||(Ke.responseType="arraybuffer");for(let ct in W.headers)Ke.setRequestHeader(ct,W.headers[ct]);W.type==="json"&&(Ke.responseType="text",!((ze=W.headers)===null||ze===void 0)&&ze.Accept||Ke.setRequestHeader("Accept","application/json")),Ke.withCredentials=W.credentials==="include",Ke.onerror=()=>{pe(new Error(Ke.statusText))},Ke.onload=()=>{if(!re.signal.aborted)if((Ke.status>=200&&Ke.status<300||Ke.status===0)&&Ke.response!==null){let ct=Ke.response;if(W.type==="json")try{ct=JSON.parse(Ke.response)}catch(Lt){return void pe(Lt)}fe({data:ct,cacheControl:Ke.getResponseHeader("Cache-Control"),expires:Ke.getResponseHeader("Expires")})}else{let ct=new Blob([Ke.response],{type:Ke.getResponseHeader("Content-Type")});pe(new me(Ke.status,Ke.statusText,W.url,ct))}},re.signal.addEventListener("abort",()=>{Ke.abort(),pe(oe())}),Ke.send(W.body)})}(R,A)};function Le(R){if(!R||R.indexOf("://")<=0||R.indexOf("data:image/")===0||R.indexOf("blob:")===0)return!0;let A=new URL(R),F=window.location;return A.protocol===F.protocol&&A.host===F.host}function Ae(R,A,F){F[R]&&F[R].indexOf(A)!==-1||(F[R]=F[R]||[],F[R].push(A))}function Fe(R,A,F){if(F&&F[R]){let W=F[R].indexOf(A);W!==-1&&F[R].splice(W,1)}}class Pe{constructor(A,F={}){L(this,F),this.type=A}}class ge extends Pe{constructor(A,F={}){super("error",L({error:A},F))}}class Re{on(A,F){return this._listeners=this._listeners||{},Ae(A,F,this._listeners),this}off(A,F){return Fe(A,F,this._listeners),Fe(A,F,this._oneTimeListeners),this}once(A,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},Ae(A,F,this._oneTimeListeners),this):new Promise(W=>this.once(A,W))}fire(A,F){typeof A=="string"&&(A=new Pe(A,F||{}));let W=A.type;if(this.listens(W)){A.target=this;let re=this._listeners&&this._listeners[W]?this._listeners[W].slice():[];for(let ze of re)ze.call(this,A);let fe=this._oneTimeListeners&&this._oneTimeListeners[W]?this._oneTimeListeners[W].slice():[];for(let ze of fe)Fe(W,ze,this._oneTimeListeners),ze.call(this,A);let pe=this._eventedParent;pe&&(L(A,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),pe.fire(A))}else A instanceof ge&&console.error(A.error);return this}listens(A){return this._listeners&&this._listeners[A]&&this._listeners[A].length>0||this._oneTimeListeners&&this._oneTimeListeners[A]&&this._oneTimeListeners[A].length>0||this._eventedParent&&this._eventedParent.listens(A)}setEventedParent(A,F){return this._eventedParent=A,this._eventedParentData=F,this}}var ce={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let Ze=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ut(R,A){let F={};for(let W in R)W!=="ref"&&(F[W]=R[W]);return Ze.forEach(W=>{W in A&&(F[W]=A[W])}),F}function pt(R,A){if(Array.isArray(R)){if(!Array.isArray(A)||R.length!==A.length)return!1;for(let F=0;F`:R.itemType.kind==="value"?"array":`array<${A}>`}return R.kind}let je=[Vt,_t,It,mt,er,ti,lr,Ge(Tr),Br,Vr,dt];function tt(R,A){if(A.kind==="error")return null;if(R.kind==="array"){if(A.kind==="array"&&(A.N===0&&A.itemType.kind==="value"||!tt(R.itemType,A.itemType))&&(typeof R.N!="number"||R.N===A.N))return null}else{if(R.kind===A.kind)return null;if(R.kind==="value"){for(let F of je)if(!tt(F,A))return null}}return`Expected ${Je(R)} but found ${Je(A)} instead.`}function xt(R,A){return A.some(F=>F.kind===R.kind)}function Ie(R,A){return A.some(F=>F==="null"?R===null:F==="array"?Array.isArray(R):F==="object"?R&&!Array.isArray(R)&&typeof R=="object":F===typeof R)}function xe(R,A){return R.kind==="array"&&A.kind==="array"?R.itemType.kind===A.itemType.kind&&typeof R.N=="number":R.kind===A.kind}let ke=.96422,vt=.82521,ir=4/29,ar=6/29,vr=3*ar*ar,ii=ar*ar*ar,pi=Math.PI/180,$r=180/Math.PI;function di(R){return(R%=360)<0&&(R+=360),R}function ji([R,A,F,W]){let re,fe,pe=wi((.2225045*(R=In(R))+.7168786*(A=In(A))+.0606169*(F=In(F)))/1);R===A&&A===F?re=fe=pe:(re=wi((.4360747*R+.3850649*A+.1430804*F)/ke),fe=wi((.0139322*R+.0971045*A+.7141733*F)/vt));let ze=116*pe-16;return[ze<0?0:ze,500*(re-pe),200*(pe-fe),W]}function In(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function wi(R){return R>ii?Math.pow(R,1/3):R/vr+ir}function On([R,A,F,W]){let re=(R+16)/116,fe=isNaN(A)?re:re+A/500,pe=isNaN(F)?re:re-F/200;return re=1*Fn(re),fe=ke*Fn(fe),pe=vt*Fn(pe),[qn(3.1338561*fe-1.6168667*re-.4906146*pe),qn(-.9787684*fe+1.9161415*re+.033454*pe),qn(.0719453*fe-.2289914*re+1.4052427*pe),W]}function qn(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Fn(R){return R>ar?R*R*R:vr*(R-ir)}function ra(R){return parseInt(R.padEnd(2,R),16)/255}function la(R,A){return Ut(A?R/100:R,0,1)}function Ut(R,A,F){return Math.min(Math.max(A,R),F)}function wt(R){return!R.some(Number.isNaN)}let rr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class nr{constructor(A,F,W,re=1,fe=!0){this.r=A,this.g=F,this.b=W,this.a=re,fe||(this.r*=re,this.g*=re,this.b*=re,re||this.overwriteGetter("rgb",[A,F,W,re]))}static parse(A){if(A instanceof nr)return A;if(typeof A!="string")return;let F=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let re=rr[W];if(re){let[pe,ze,Ke]=re;return[pe/255,ze/255,Ke/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,ze=1;return[ra(W.slice(ze,ze+=pe)),ra(W.slice(ze,ze+=pe)),ra(W.slice(ze,ze+=pe)),ra(W.slice(ze,ze+pe)||"ff")]}if(W.startsWith("rgb")){let pe=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[ze,Ke,ct,Lt,$t,fr,mr,Pr,zr,ui,yi,vn]=pe,zi=[Lt||" ",mr||" ",ui].join("");if(zi===" "||zi===" /"||zi===",,"||zi===",,,"){let un=[ct,fr,zr].join(""),Tn=un==="%%%"?100:un===""?255:0;if(Tn){let pa=[Ut(+Ke/Tn,0,1),Ut(+$t/Tn,0,1),Ut(+Pr/Tn,0,1),yi?la(+yi,vn):1];if(wt(pa))return pa}}return}}let fe=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(fe){let[pe,ze,Ke,ct,Lt,$t,fr,mr,Pr]=fe,zr=[Ke||" ",Lt||" ",fr].join("");if(zr===" "||zr===" /"||zr===",,"||zr===",,,"){let ui=[+ze,Ut(+ct,0,100),Ut(+$t,0,100),mr?la(+mr,Pr):1];if(wt(ui))return function([yi,vn,zi,un]){function Tn(pa){let ro=(pa+yi/30)%12,Vo=vn*Math.min(zi,1-zi);return zi-Vo*Math.max(-1,Math.min(ro-3,9-ro,1))}return yi=di(yi),vn/=100,zi/=100,[Tn(0),Tn(8),Tn(4),un]}(ui)}}}(A);return F?new nr(...F,!1):void 0}get rgb(){let{r:A,g:F,b:W,a:re}=this,fe=re||1/0;return this.overwriteGetter("rgb",[A/fe,F/fe,W/fe,re])}get hcl(){return this.overwriteGetter("hcl",function(A){let[F,W,re,fe]=ji(A),pe=Math.sqrt(W*W+re*re);return[Math.round(1e4*pe)?di(Math.atan2(re,W)*$r):NaN,pe,F,fe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",ji(this.rgb))}overwriteGetter(A,F){return Object.defineProperty(this,A,{value:F}),F}toString(){let[A,F,W,re]=this.rgb;return`rgba(${[A,F,W].map(fe=>Math.round(255*fe)).join(",")},${re})`}}nr.black=new nr(0,0,0,1),nr.white=new nr(1,1,1,1),nr.transparent=new nr(0,0,0,0),nr.red=new nr(1,0,0,1);class Er{constructor(A,F,W){this.sensitivity=A?F?"variant":"case":F?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(A,F){return this.collator.compare(A,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Xr{constructor(A,F,W,re,fe){this.text=A,this.image=F,this.scale=W,this.fontStack=re,this.textColor=fe}}class ri{constructor(A){this.sections=A}static fromString(A){return new ri([new Xr(A,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(A=>A.text.length!==0||A.image&&A.image.name.length!==0)}static factory(A){return A instanceof ri?A:ri.fromString(A)}toString(){return this.sections.length===0?"":this.sections.map(A=>A.text).join("")}}class Qr{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof Qr)return A;if(typeof A=="number")return new Qr([A,A,A,A]);if(Array.isArray(A)&&!(A.length<1||A.length>4)){for(let F of A)if(typeof F!="number")return;switch(A.length){case 1:A=[A[0],A[0],A[0],A[0]];break;case 2:A=[A[0],A[1],A[0],A[1]];break;case 3:A=[A[0],A[1],A[2],A[1]]}return new Qr(A)}}toString(){return JSON.stringify(this.values)}}let Oi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $i{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof $i)return A;if(Array.isArray(A)&&!(A.length<1)&&A.length%2==0){for(let F=0;F=0&&R<=255&&typeof A=="number"&&A>=0&&A<=255&&typeof F=="number"&&F>=0&&F<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,A,F,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,A,F,W]:[R,A,F]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function yn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof nr||R instanceof Er||R instanceof ri||R instanceof Qr||R instanceof $i||R instanceof tn)return!0;if(Array.isArray(R)){for(let A of R)if(!yn(A))return!1;return!0}if(typeof R=="object"){for(let A in R)if(!yn(R[A]))return!1;return!0}return!1}function Sn(R){if(R===null)return Vt;if(typeof R=="string")return It;if(typeof R=="boolean")return mt;if(typeof R=="number")return _t;if(R instanceof nr)return er;if(R instanceof Er)return Lr;if(R instanceof ri)return ti;if(R instanceof Qr)return Br;if(R instanceof $i)return dt;if(R instanceof tn)return Vr;if(Array.isArray(R)){let A=R.length,F;for(let W of R){let re=Sn(W);if(F){if(F===re)continue;F=Tr;break}F=re}return Ge(F||Tr,A)}return lr}function Ba(R){let A=typeof R;return R===null?"":A==="string"||A==="number"||A==="boolean"?String(R):R instanceof nr||R instanceof ri||R instanceof Qr||R instanceof $i||R instanceof tn?R.toString():JSON.stringify(R)}class ua{constructor(A,F){this.type=A,this.value=F}static parse(A,F){if(A.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${A.length-1} instead.`);if(!yn(A[1]))return F.error("invalid value");let W=A[1],re=Sn(W),fe=F.expectedType;return re.kind!=="array"||re.N!==0||!fe||fe.kind!=="array"||typeof fe.N=="number"&&fe.N!==0||(re=fe),new ua(re,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ma{constructor(A){this.name="ExpressionEvaluationError",this.message=A}toJSON(){return this.message}}let Wa={string:It,number:_t,boolean:mt,object:lr};class Fa{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W,re=1,fe=A[0];if(fe==="array"){let ze,Ke;if(A.length>2){let ct=A[1];if(typeof ct!="string"||!(ct in Wa)||ct==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);ze=Wa[ct],re++}else ze=Tr;if(A.length>3){if(A[2]!==null&&(typeof A[2]!="number"||A[2]<0||A[2]!==Math.floor(A[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ke=A[2],re++}W=Ge(ze,Ke)}else{if(!Wa[fe])throw new Error(`Types doesn't contain name = ${fe}`);W=Wa[fe]}let pe=[];for(;reA.outputDefined())}}let Wo={"to-boolean":mt,"to-color":er,"to-number":_t,"to-string":It};class da{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[0];if(!Wo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&A.length!==2)return F.error("Expected one argument.");let re=Wo[W],fe=[];for(let pe=1;pe4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:fn(F[0],F[1],F[2],F[3]),!W))return new nr(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new ma(W||`Could not parse color from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"padding":{let F;for(let W of this.args){F=W.evaluate(A);let re=Qr.parse(F);if(re)return re}throw new ma(`Could not parse padding from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"variableAnchorOffsetCollection":{let F;for(let W of this.args){F=W.evaluate(A);let re=$i.parse(F);if(re)return re}throw new ma(`Could not parse variableAnchorOffsetCollection from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"number":{let F=null;for(let W of this.args){if(F=W.evaluate(A),F===null)return 0;let re=Number(F);if(!isNaN(re))return re}throw new ma(`Could not convert ${JSON.stringify(F)} to number.`)}case"formatted":return ri.fromString(Ba(this.args[0].evaluate(A)));case"resolvedImage":return tn.fromString(Ba(this.args[0].evaluate(A)));default:return Ba(this.args[0].evaluate(A))}}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}let Wn=["Unknown","Point","LineString","Polygon"];class Ha{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Wn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(A){let F=this._parseColorCache[A];return F||(F=this._parseColorCache[A]=nr.parse(A)),F}}class vo{constructor(A,F,W=[],re,fe=new Qt,pe=[]){this.registry=A,this.path=W,this.key=W.map(ze=>`[${ze}]`).join(""),this.scope=fe,this.errors=pe,this.expectedType=re,this._isConstant=F}parse(A,F,W,re,fe={}){return F?this.concat(F,W,re)._parse(A,fe):this._parse(A,fe)}_parse(A,F){function W(re,fe,pe){return pe==="assert"?new Fa(fe,[re]):pe==="coerce"?new da(fe,[re]):re}if(A!==null&&typeof A!="string"&&typeof A!="boolean"&&typeof A!="number"||(A=["literal",A]),Array.isArray(A)){if(A.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let re=A[0];if(typeof re!="string")return this.error(`Expression name must be a string, but found ${typeof re} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let fe=this.registry[re];if(fe){let pe=fe.parse(A,this);if(!pe)return null;if(this.expectedType){let ze=this.expectedType,Ke=pe.type;if(ze.kind!=="string"&&ze.kind!=="number"&&ze.kind!=="boolean"&&ze.kind!=="object"&&ze.kind!=="array"||Ke.kind!=="value")if(ze.kind!=="color"&&ze.kind!=="formatted"&&ze.kind!=="resolvedImage"||Ke.kind!=="value"&&Ke.kind!=="string")if(ze.kind!=="padding"||Ke.kind!=="value"&&Ke.kind!=="number"&&Ke.kind!=="array")if(ze.kind!=="variableAnchorOffsetCollection"||Ke.kind!=="value"&&Ke.kind!=="array"){if(this.checkSubtype(ze,Ke))return null}else pe=W(pe,ze,F.typeAnnotation||"coerce");else pe=W(pe,ze,F.typeAnnotation||"coerce");else pe=W(pe,ze,F.typeAnnotation||"coerce");else pe=W(pe,ze,F.typeAnnotation||"assert")}if(!(pe instanceof ua)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let ze=new Ha;try{pe=new ua(pe.type,pe.evaluate(ze))}catch(Ke){return this.error(Ke.message),null}}return pe}return this.error(`Unknown expression "${re}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(A===void 0?"'undefined' value invalid. Use null instead.":typeof A=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof A} instead.`)}concat(A,F,W){let re=typeof A=="number"?this.path.concat(A):this.path,fe=W?this.scope.concat(W):this.scope;return new vo(this.registry,this._isConstant,re,F||null,fe,this.errors)}error(A,...F){let W=`${this.key}${F.map(re=>`[${re}]`).join("")}`;this.errors.push(new St(W,A))}checkSubtype(A,F){let W=tt(A,F);return W&&this.error(W),W}}class jn{constructor(A,F){this.type=F.type,this.bindings=[].concat(A),this.result=F}evaluate(A){return this.result.evaluate(A)}eachChild(A){for(let F of this.bindings)A(F[1]);A(this.result)}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found ${A.length-1} instead.`);let W=[];for(let fe=1;fe=W.length)throw new ma(`Array index out of bounds: ${F} > ${W.length-1}.`);if(F!==Math.floor(F))throw new ma(`Array index must be an integer, but found ${F} instead.`);return W[F]}eachChild(A){A(this.index),A(this.input)}outputDefined(){return!1}}class Jr{constructor(A,F){this.type=mt,this.needle=A,this.haystack=F}static parse(A,F){if(A.length!==3)return F.error(`Expected 2 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,Tr),re=F.parse(A[2],2,Tr);return W&&re?xt(W.type,[mt,It,_t,Vt,Tr])?new Jr(W,re):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`):null}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!W)return!1;if(!Ie(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Sn(F))} instead.`);if(!Ie(W,["string","array"]))throw new ma(`Expected second argument to be of type array or string, but found ${Je(Sn(W))} instead.`);return W.indexOf(F)>=0}eachChild(A){A(this.needle),A(this.haystack)}outputDefined(){return!0}}class vi{constructor(A,F,W){this.type=_t,this.needle=A,this.haystack=F,this.fromIndex=W}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,Tr),re=F.parse(A[2],2,Tr);if(!W||!re)return null;if(!xt(W.type,[mt,It,_t,Vt,Tr]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,_t);return fe?new vi(W,re,fe):null}return new vi(W,re)}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!Ie(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Sn(F))} instead.`);let re;if(this.fromIndex&&(re=this.fromIndex.evaluate(A)),Ie(W,["string"])){let fe=W.indexOf(F,re);return fe===-1?-1:[...W.slice(0,fe)].length}if(Ie(W,["array"]))return W.indexOf(F,re);throw new ma(`Expected second argument to be of type array or string, but found ${Je(Sn(W))} instead.`)}eachChild(A){A(this.needle),A(this.haystack),this.fromIndex&&A(this.fromIndex)}outputDefined(){return!1}}class hn{constructor(A,F,W,re,fe,pe){this.inputType=A,this.type=F,this.input=W,this.cases=re,this.outputs=fe,this.otherwise=pe}static parse(A,F){if(A.length<5)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if(A.length%2!=1)return F.error("Expected an even number of arguments.");let W,re;F.expectedType&&F.expectedType.kind!=="value"&&(re=F.expectedType);let fe={},pe=[];for(let ct=2;ctNumber.MAX_SAFE_INTEGER)return fr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Pr=="number"&&Math.floor(Pr)!==Pr)return fr.error("Numeric branch labels must be integer values.");if(W){if(fr.checkSubtype(W,Sn(Pr)))return null}else W=Sn(Pr);if(fe[String(Pr)]!==void 0)return fr.error("Branch labels must be unique.");fe[String(Pr)]=pe.length}let mr=F.parse($t,ct,re);if(!mr)return null;re=re||mr.type,pe.push(mr)}let ze=F.parse(A[1],1,Tr);if(!ze)return null;let Ke=F.parse(A[A.length-1],A.length-1,re);return Ke?ze.type.kind!=="value"&&F.concat(1).checkSubtype(W,ze.type)?null:new hn(W,re,ze,fe,pe,Ke):null}evaluate(A){let F=this.input.evaluate(A);return(Sn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(A)}eachChild(A){A(this.input),this.outputs.forEach(A),A(this.otherwise)}outputDefined(){return this.outputs.every(A=>A.outputDefined())&&this.otherwise.outputDefined()}}class An{constructor(A,F,W){this.type=A,this.branches=F,this.otherwise=W}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found only ${A.length-1}.`);if(A.length%2!=0)return F.error("Expected an odd number of arguments.");let W;F.expectedType&&F.expectedType.kind!=="value"&&(W=F.expectedType);let re=[];for(let pe=1;peF.outputDefined())&&this.otherwise.outputDefined()}}class Mn{constructor(A,F,W,re){this.type=A,this.input=F,this.beginIndex=W,this.endIndex=re}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,Tr),re=F.parse(A[2],2,_t);if(!W||!re)return null;if(!xt(W.type,[Ge(Tr),It,Tr]))return F.error(`Expected first argument to be of type array or string, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,_t);return fe?new Mn(W.type,W,re,fe):null}return new Mn(W.type,W,re)}evaluate(A){let F=this.input.evaluate(A),W=this.beginIndex.evaluate(A),re;if(this.endIndex&&(re=this.endIndex.evaluate(A)),Ie(F,["string"]))return[...F].slice(W,re).join("");if(Ie(F,["array"]))return F.slice(W,re);throw new ma(`Expected first argument to be of type array or string, but found ${Je(Sn(F))} instead.`)}eachChild(A){A(this.input),A(this.beginIndex),this.endIndex&&A(this.endIndex)}outputDefined(){return!1}}function Li(R,A){let F=R.length-1,W,re,fe=0,pe=F,ze=0;for(;fe<=pe;)if(ze=Math.floor((fe+pe)/2),W=R[ze],re=R[ze+1],W<=A){if(ze===F||AA))throw new ma("Input is not a number.");pe=ze-1}return 0}class _n{constructor(A,F,W){this.type=A,this.input=F,this.labels=[],this.outputs=[];for(let[re,fe]of W)this.labels.push(re),this.outputs.push(fe)}static parse(A,F){if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");let W=F.parse(A[1],1,_t);if(!W)return null;let re=[],fe=null;F.expectedType&&F.expectedType.kind!=="value"&&(fe=F.expectedType);for(let pe=1;pe=ze)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ct);let $t=F.parse(Ke,Lt,fe);if(!$t)return null;fe=fe||$t.type,re.push([ze,$t])}return new _n(fe,W,re)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let re=this.input.evaluate(A);if(re<=F[0])return W[0].evaluate(A);let fe=F.length;return re>=F[fe-1]?W[fe-1].evaluate(A):W[Li(F,re)].evaluate(A)}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function ya(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Jn=Ma;function Ma(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}Ma.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var re=this.sampleCurveX(F)-R;if(Math.abs(re)re?pe=F:ze=F,F=.5*(ze-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var _o=ya(Jn);function No(R,A,F){return R+F*(A-R)}function po(R,A,F){return R.map((W,re)=>No(W,A[re],F))}let Lo={number:No,color:function(R,A,F,W="rgb"){switch(W){case"rgb":{let[re,fe,pe,ze]=po(R.rgb,A.rgb,F);return new nr(re,fe,pe,ze,!1)}case"hcl":{let[re,fe,pe,ze]=R.hcl,[Ke,ct,Lt,$t]=A.hcl,fr,mr;if(isNaN(re)||isNaN(Ke))isNaN(re)?isNaN(Ke)?fr=NaN:(fr=Ke,pe!==1&&pe!==0||(mr=ct)):(fr=re,Lt!==1&&Lt!==0||(mr=fe));else{let vn=Ke-re;Ke>re&&vn>180?vn-=360:Ke180&&(vn+=360),fr=re+F*vn}let[Pr,zr,ui,yi]=function([vn,zi,un,Tn]){return vn=isNaN(vn)?0:vn*pi,On([un,Math.cos(vn)*zi,Math.sin(vn)*zi,Tn])}([fr,mr!=null?mr:No(fe,ct,F),No(pe,Lt,F),No(ze,$t,F)]);return new nr(Pr,zr,ui,yi,!1)}case"lab":{let[re,fe,pe,ze]=On(po(R.lab,A.lab,F));return new nr(re,fe,pe,ze,!1)}}},array:po,padding:function(R,A,F){return new Qr(po(R.values,A.values,F))},variableAnchorOffsetCollection:function(R,A,F){let W=R.values,re=A.values;if(W.length!==re.length)throw new ma(`Cannot interpolate values of different length. from: ${R.toString()}, to: ${A.toString()}`);let fe=[];for(let pe=0;petypeof Lt!="number"||Lt<0||Lt>1))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);re={name:"cubic-bezier",controlPoints:ct}}}if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(fe=F.parse(fe,2,_t),!fe)return null;let ze=[],Ke=null;W==="interpolate-hcl"||W==="interpolate-lab"?Ke=er:F.expectedType&&F.expectedType.kind!=="value"&&(Ke=F.expectedType);for(let ct=0;ct=Lt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',fr);let Pr=F.parse($t,mr,Ke);if(!Pr)return null;Ke=Ke||Pr.type,ze.push([Lt,Pr])}return xe(Ke,_t)||xe(Ke,er)||xe(Ke,Br)||xe(Ke,dt)||xe(Ke,Ge(_t))?new ko(Ke,W,re,fe,ze):F.error(`Type ${Je(Ke)} is not interpolatable.`)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let re=this.input.evaluate(A);if(re<=F[0])return W[0].evaluate(A);let fe=F.length;if(re>=F[fe-1])return W[fe-1].evaluate(A);let pe=Li(F,re),ze=ko.interpolationFactor(this.interpolation,re,F[pe],F[pe+1]),Ke=W[pe].evaluate(A),ct=W[pe+1].evaluate(A);switch(this.operator){case"interpolate":return Lo[this.type.kind](Ke,ct,ze);case"interpolate-hcl":return Lo.color(Ke,ct,ze,"hcl");case"interpolate-lab":return Lo.color(Ke,ct,ze,"lab")}}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function Ds(R,A,F,W){let re=W-F,fe=R-F;return re===0?0:A===1?fe/re:(Math.pow(A,fe)-1)/(Math.pow(A,re)-1)}class Fs{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expectected at least one argument.");let W=null,re=F.expectedType;re&&re.kind!=="value"&&(W=re);let fe=[];for(let ze of A.slice(1)){let Ke=F.parse(ze,1+fe.length,W,void 0,{typeAnnotation:"omit"});if(!Ke)return null;W=W||Ke.type,fe.push(Ke)}if(!W)throw new Error("No output type");let pe=re&&fe.some(ze=>tt(re,ze.type));return new Fs(pe?Tr:W,fe)}evaluate(A){let F,W=null,re=0;for(let fe of this.args)if(re++,W=fe.evaluate(A),W&&W instanceof tn&&!W.available&&(F||(F=W.name),W=null,re===this.args.length&&(W=F)),W!==null)break;return W}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}function ll(R,A){return R==="=="||R==="!="?A.kind==="boolean"||A.kind==="string"||A.kind==="number"||A.kind==="null"||A.kind==="value":A.kind==="string"||A.kind==="number"||A.kind==="value"}function ul(R,A,F,W){return W.compare(A,F)===0}function zl(R,A,F){let W=R!=="=="&&R!=="!=";return class aje{constructor(fe,pe,ze){this.type=mt,this.lhs=fe,this.rhs=pe,this.collator=ze,this.hasUntypedArgument=fe.type.kind==="value"||pe.type.kind==="value"}static parse(fe,pe){if(fe.length!==3&&fe.length!==4)return pe.error("Expected two or three arguments.");let ze=fe[0],Ke=pe.parse(fe[1],1,Tr);if(!Ke)return null;if(!ll(ze,Ke.type))return pe.concat(1).error(`"${ze}" comparisons are not supported for type '${Je(Ke.type)}'.`);let ct=pe.parse(fe[2],2,Tr);if(!ct)return null;if(!ll(ze,ct.type))return pe.concat(2).error(`"${ze}" comparisons are not supported for type '${Je(ct.type)}'.`);if(Ke.type.kind!==ct.type.kind&&Ke.type.kind!=="value"&&ct.type.kind!=="value")return pe.error(`Cannot compare types '${Je(Ke.type)}' and '${Je(ct.type)}'.`);W&&(Ke.type.kind==="value"&&ct.type.kind!=="value"?Ke=new Fa(ct.type,[Ke]):Ke.type.kind!=="value"&&ct.type.kind==="value"&&(ct=new Fa(Ke.type,[ct])));let Lt=null;if(fe.length===4){if(Ke.type.kind!=="string"&&ct.type.kind!=="string"&&Ke.type.kind!=="value"&&ct.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(Lt=pe.parse(fe[3],3,Lr),!Lt)return null}return new aje(Ke,ct,Lt)}evaluate(fe){let pe=this.lhs.evaluate(fe),ze=this.rhs.evaluate(fe);if(W&&this.hasUntypedArgument){let Ke=Sn(pe),ct=Sn(ze);if(Ke.kind!==ct.kind||Ke.kind!=="string"&&Ke.kind!=="number")throw new ma(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ke.kind}, ${ct.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ke=Sn(pe),ct=Sn(ze);if(Ke.kind!=="string"||ct.kind!=="string")return A(fe,pe,ze)}return this.collator?F(fe,pe,ze,this.collator.evaluate(fe)):A(fe,pe,ze)}eachChild(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)}outputDefined(){return!0}}}let us=zl("==",function(R,A,F){return A===F},ul),il=zl("!=",function(R,A,F){return A!==F},function(R,A,F,W){return!ul(0,A,F,W)}),As=zl("<",function(R,A,F){return A",function(R,A,F){return A>F},function(R,A,F,W){return W.compare(A,F)>0}),Ks=zl("<=",function(R,A,F){return A<=F},function(R,A,F,W){return W.compare(A,F)<=0}),zs=zl(">=",function(R,A,F){return A>=F},function(R,A,F,W){return W.compare(A,F)>=0});class Io{constructor(A,F,W){this.type=Lr,this.locale=W,this.caseSensitive=A,this.diacriticSensitive=F}static parse(A,F){if(A.length!==2)return F.error("Expected one argument.");let W=A[1];if(typeof W!="object"||Array.isArray(W))return F.error("Collator options argument must be an object.");let re=F.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,mt);if(!re)return null;let fe=F.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,mt);if(!fe)return null;let pe=null;return W.locale&&(pe=F.parse(W.locale,1,It),!pe)?null:new Io(re,fe,pe)}evaluate(A){return new Er(this.caseSensitive.evaluate(A),this.diacriticSensitive.evaluate(A),this.locale?this.locale.evaluate(A):null)}eachChild(A){A(this.caseSensitive),A(this.diacriticSensitive),this.locale&&A(this.locale)}outputDefined(){return!1}}class ls{constructor(A,F,W,re,fe){this.type=It,this.number=A,this.locale=F,this.currency=W,this.minFractionDigits=re,this.maxFractionDigits=fe}static parse(A,F){if(A.length!==3)return F.error("Expected two arguments.");let W=F.parse(A[1],1,_t);if(!W)return null;let re=A[2];if(typeof re!="object"||Array.isArray(re))return F.error("NumberFormat options argument must be an object.");let fe=null;if(re.locale&&(fe=F.parse(re.locale,1,It),!fe))return null;let pe=null;if(re.currency&&(pe=F.parse(re.currency,1,It),!pe))return null;let ze=null;if(re["min-fraction-digits"]&&(ze=F.parse(re["min-fraction-digits"],1,_t),!ze))return null;let Ke=null;return re["max-fraction-digits"]&&(Ke=F.parse(re["max-fraction-digits"],1,_t),!Ke)?null:new ls(W,fe,pe,ze,Ke)}evaluate(A){return new Intl.NumberFormat(this.locale?this.locale.evaluate(A):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(A):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(A):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(A):void 0}).format(this.number.evaluate(A))}eachChild(A){A(this.number),this.locale&&A(this.locale),this.currency&&A(this.currency),this.minFractionDigits&&A(this.minFractionDigits),this.maxFractionDigits&&A(this.maxFractionDigits)}outputDefined(){return!1}}class Zl{constructor(A){this.type=ti,this.sections=A}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[1];if(!Array.isArray(W)&&typeof W=="object")return F.error("First argument must be an image or text section.");let re=[],fe=!1;for(let pe=1;pe<=A.length-1;++pe){let ze=A[pe];if(fe&&typeof ze=="object"&&!Array.isArray(ze)){fe=!1;let Ke=null;if(ze["font-scale"]&&(Ke=F.parse(ze["font-scale"],1,_t),!Ke))return null;let ct=null;if(ze["text-font"]&&(ct=F.parse(ze["text-font"],1,Ge(It)),!ct))return null;let Lt=null;if(ze["text-color"]&&(Lt=F.parse(ze["text-color"],1,er),!Lt))return null;let $t=re[re.length-1];$t.scale=Ke,$t.font=ct,$t.textColor=Lt}else{let Ke=F.parse(A[pe],1,Tr);if(!Ke)return null;let ct=Ke.type.kind;if(ct!=="string"&&ct!=="value"&&ct!=="null"&&ct!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");fe=!0,re.push({content:Ke,scale:null,font:null,textColor:null})}}return new Zl(re)}evaluate(A){return new ri(this.sections.map(F=>{let W=F.content.evaluate(A);return Sn(W)===Vr?new Xr("",W,null,null,null):new Xr(Ba(W),null,F.scale?F.scale.evaluate(A):null,F.font?F.font.evaluate(A).join(","):null,F.textColor?F.textColor.evaluate(A):null)}))}eachChild(A){for(let F of this.sections)A(F.content),F.scale&&A(F.scale),F.font&&A(F.font),F.textColor&&A(F.textColor)}outputDefined(){return!1}}class Su{constructor(A){this.type=Vr,this.input=A}static parse(A,F){if(A.length!==2)return F.error("Expected two arguments.");let W=F.parse(A[1],1,It);return W?new Su(W):F.error("No image name provided.")}evaluate(A){let F=this.input.evaluate(A),W=tn.fromString(F);return W&&A.availableImages&&(W.available=A.availableImages.indexOf(F)>-1),W}eachChild(A){A(this.input)}outputDefined(){return!1}}class nc{constructor(A){this.type=_t,this.input=A}static parse(A,F){if(A.length!==2)return F.error(`Expected 1 argument, but found ${A.length-1} instead.`);let W=F.parse(A[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?F.error(`Expected argument of type string or array, but found ${Je(W.type)} instead.`):new nc(W):null}evaluate(A){let F=this.input.evaluate(A);if(typeof F=="string")return[...F].length;if(Array.isArray(F))return F.length;throw new ma(`Expected value to be of type string or array, but found ${Je(Sn(F))} instead.`)}eachChild(A){A(this.input)}outputDefined(){return!1}}let bs=8192;function Rn(R,A){let F=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,re=Math.pow(2,A.z);return[Math.round(F*re*bs),Math.round(W*re*bs)]}function _a(R,A){let F=Math.pow(2,A.z);return[(re=(R[0]/bs+A.x)/F,360*re-180),(W=(R[1]/bs+A.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,re}function Vu(R,A){R[0]=Math.min(R[0],A[0]),R[1]=Math.min(R[1],A[1]),R[2]=Math.max(R[2],A[0]),R[3]=Math.max(R[3],A[1])}function Ol(R,A){return!(R[0]<=A[0]||R[2]>=A[2]||R[1]<=A[1]||R[3]>=A[3])}function xo(R,A,F){let W=R[0]-A[0],re=R[1]-A[1],fe=R[0]-F[0],pe=R[1]-F[1];return W*pe-fe*re==0&&W*fe<=0&&re*pe<=0}function Yl(R,A,F,W){return(re=[W[0]-F[0],W[1]-F[1]])[0]*(fe=[A[0]-R[0],A[1]-R[1]])[1]-re[1]*fe[0]!=0&&!(!qo(R,A,F,W)||!qo(F,W,R,A));var re,fe}function Ns(R,A,F){for(let W of F)for(let re=0;re(re=R)[1]!=(pe=ze[Ke+1])[1]>re[1]&&re[0]<(pe[0]-fe[0])*(re[1]-fe[1])/(pe[1]-fe[1])+fe[0]&&(W=!W)}var re,fe,pe;return W}function ac(R,A){for(let F of A)if(Hl(R,F))return!0;return!1}function aa(R,A){for(let F of R)if(!Hl(F,A))return!1;for(let F=0;F0&&ze<0||pe<0&&ze>0}function ql(R,A,F){let W=[];for(let re=0;reF[2]){let re=.5*W,fe=R[0]-F[0]>re?-W:F[0]-R[0]>re?W:0;fe===0&&(fe=R[0]-F[2]>re?-W:F[2]-R[0]>re?W:0),R[0]+=fe}Vu(A,R)}function rf(R,A,F,W){let re=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let ze of R)for(let Ke of ze){let ct=[Ke.x+fe[0],Ke.y+fe[1]];Do(ct,A,F,re),pe.push(ct)}return pe}function Uf(R,A,F,W){let re=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Ke of R){let ct=[];for(let Lt of Ke){let $t=[Lt.x+fe[0],Lt.y+fe[1]];Vu(A,$t),ct.push($t)}pe.push(ct)}if(A[2]-A[0]<=re/2){(ze=A)[0]=ze[1]=1/0,ze[2]=ze[3]=-1/0;for(let Ke of pe)for(let ct of Ke)Do(ct,A,F,re)}var ze;return pe}class pl{constructor(A,F){this.type=mt,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection"){let re=[];for(let fe of W.features){let{type:pe,coordinates:ze}=fe.geometry;pe==="Polygon"&&re.push(ze),pe==="MultiPolygon"&&re.push(...ze)}if(re.length)return new pl(W,{type:"MultiPolygon",coordinates:re})}else if(W.type==="Feature"){let re=W.geometry.type;if(re==="Polygon"||re==="MultiPolygon")return new pl(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new pl(W,W)}return F.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let re=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let ze=ql(W.coordinates,fe,pe),Ke=rf(F.geometry(),re,fe,pe);if(!Ol(re,fe))return!1;for(let ct of Ke)if(!Hl(ct,ze))return!1}if(W.type==="MultiPolygon"){let ze=Pc(W.coordinates,fe,pe),Ke=rf(F.geometry(),re,fe,pe);if(!Ol(re,fe))return!1;for(let ct of Ke)if(!ac(ct,ze))return!1}return!0}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let re=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let ze=ql(W.coordinates,fe,pe),Ke=Uf(F.geometry(),re,fe,pe);if(!Ol(re,fe))return!1;for(let ct of Ke)if(!aa(ct,ze))return!1}if(W.type==="MultiPolygon"){let ze=Pc(W.coordinates,fe,pe),Ke=Uf(F.geometry(),re,fe,pe);if(!Ol(re,fe))return!1;for(let ct of Ke)if(!Oo(ct,ze))return!1}return!0}(A,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Zc=class{constructor(R=[],A=(F,W)=>FW?1:0){if(this.data=R,this.length=this.data.length,this.compare=A,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],A=this.data.pop();return--this.length>0&&(this.data[0]=A,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:A,compare:F}=this,W=A[R];for(;R>0;){let re=R-1>>1,fe=A[re];if(F(W,fe)>=0)break;A[R]=fe,R=re}A[R]=W}_down(R){let{data:A,compare:F}=this,W=this.length>>1,re=A[R];for(;R=0)break;A[R]=A[fe],R=fe}A[R]=re}};function Kl(R,A,F,W,re){Os(R,A,F,W||R.length-1,re||oc)}function Os(R,A,F,W,re){for(;W>F;){if(W-F>600){var fe=W-F+1,pe=A-F+1,ze=Math.log(fe),Ke=.5*Math.exp(2*ze/3),ct=.5*Math.sqrt(ze*Ke*(fe-Ke)/fe)*(pe-fe/2<0?-1:1);Os(R,A,Math.max(F,Math.floor(A-pe*Ke/fe+ct)),Math.min(W,Math.floor(A+(fe-pe)*Ke/fe+ct)),re)}var Lt=R[A],$t=F,fr=W;for(yu(R,F,A),re(R[W],Lt)>0&&yu(R,F,W);$t0;)fr--}re(R[F],Lt)===0?yu(R,F,fr):yu(R,++fr,W),fr<=A&&(F=fr+1),A<=fr&&(W=fr-1)}}function yu(R,A,F){var W=R[A];R[A]=R[F],R[F]=W}function oc(R,A){return RA?1:0}function Cf(R,A){if(R.length<=1)return[R];let F=[],W,re;for(let fe of R){let pe=Vh(fe);pe!==0&&(fe.area=Math.abs(pe),re===void 0&&(re=pe<0),re===pe<0?(W&&F.push(W),W=[fe]):W.push(fe))}if(W&&F.push(W),A>1)for(let fe=0;fe1?(ct=A[Ke+1][0],Lt=A[Ke+1][1]):mr>0&&(ct+=$t/this.kx*mr,Lt+=fr/this.ky*mr)),$t=this.wrap(F[0]-ct)*this.kx,fr=(F[1]-Lt)*this.ky;let Pr=$t*$t+fr*fr;Pr180;)A-=360;return A}}function Jl(R,A){return A[0]-R[0]}function fl(R){return R[1]-R[0]+1}function lc(R,A){return R[1]>=R[0]&&R[1]R[1])return[null,null];let F=fl(R);if(A){if(F===2)return[R,null];let re=Math.floor(F/2);return[[R[0],R[0]+re],[R[0]+re,R[1]]]}if(F===1)return[R,null];let W=Math.floor(F/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function Es(R,A){if(!lc(A,R.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let W=A[0];W<=A[1];++W)Vu(F,R[W]);return F}function Hs(R){let A=[1/0,1/0,-1/0,-1/0];for(let F of R)for(let W of F)Vu(A,W);return A}function Go(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function ps(R,A,F){if(!Go(R)||!Go(A))return NaN;let W=0,re=0;return R[2]A[2]&&(W=R[0]-A[2]),R[1]>A[3]&&(re=R[1]-A[3]),R[3]=W)return W;if(Ol(re,fe)){if(od(R,A))return 0}else if(od(A,R))return 0;let pe=1/0;for(let ze of R)for(let Ke=0,ct=ze.length,Lt=ct-1;Ke0;){let Ke=pe.pop();if(Ke[0]>=fe)continue;let ct=Ke[1],Lt=A?50:100;if(fl(ct)<=Lt){if(!lc(ct,R.length))return NaN;if(A){let $t=Po(R,ct,F,W);if(isNaN($t)||$t===0)return $t;fe=Math.min(fe,$t)}else for(let $t=ct[0];$t<=ct[1];++$t){let fr=ad(R[$t],F,W);if(fe=Math.min(fe,fr),fe===0)return 0}}else{let $t=Fu(ct,A);Pa(pe,fe,W,R,ze,$t[0]),Pa(pe,fe,W,R,ze,$t[1])}}return fe}function bl(R,A,F,W,re,fe=1/0){let pe=Math.min(fe,re.distance(R[0],F[0]));if(pe===0)return pe;let ze=new Zc([[0,[0,R.length-1],[0,F.length-1]]],Jl);for(;ze.length>0;){let Ke=ze.pop();if(Ke[0]>=pe)continue;let ct=Ke[1],Lt=Ke[2],$t=A?50:100,fr=W?50:100;if(fl(ct)<=$t&&fl(Lt)<=fr){if(!lc(ct,R.length)&&lc(Lt,F.length))return NaN;let mr;if(A&&W)mr=Gu(R,ct,F,Lt,re),pe=Math.min(pe,mr);else if(A&&!W){let Pr=R.slice(ct[0],ct[1]+1);for(let zr=Lt[0];zr<=Lt[1];++zr)if(mr=uc(F[zr],Pr,re),pe=Math.min(pe,mr),pe===0)return pe}else if(!A&&W){let Pr=F.slice(Lt[0],Lt[1]+1);for(let zr=ct[0];zr<=ct[1];++zr)if(mr=uc(R[zr],Pr,re),pe=Math.min(pe,mr),pe===0)return pe}else mr=qs(R,ct,F,Lt,re),pe=Math.min(pe,mr)}else{let mr=Fu(ct,A),Pr=Fu(Lt,W);af(ze,pe,re,R,F,mr[0],Pr[0]),af(ze,pe,re,R,F,mr[0],Pr[1]),af(ze,pe,re,R,F,mr[1],Pr[0]),af(ze,pe,re,R,F,mr[1],Pr[1])}}return pe}function Gf(R){return R.type==="MultiPolygon"?R.coordinates.map(A=>({type:"Polygon",coordinates:A})):R.type==="MultiLineString"?R.coordinates.map(A=>({type:"LineString",coordinates:A})):R.type==="MultiPoint"?R.coordinates.map(A=>({type:"Point",coordinates:A})):[R]}class Ic{constructor(A,F){this.type=_t,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection")return new Ic(W,W.features.map(re=>Gf(re.geometry)).flat());if(W.type==="Feature")return new Ic(W,Gf(W.geometry));if("type"in W&&"coordinates"in W)return new Ic(W,Gf(W))}return F.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let re=F.geometry(),fe=re.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(re.length===0)return NaN;let pe=new Vf(fe[0][1]),ze=1/0;for(let Ke of W){switch(Ke.type){case"Point":ze=Math.min(ze,bl(fe,!1,[Ke.coordinates],!1,pe,ze));break;case"LineString":ze=Math.min(ze,bl(fe,!1,Ke.coordinates,!0,pe,ze));break;case"Polygon":ze=Math.min(ze,Hu(fe,!1,Ke.coordinates,pe,ze))}if(ze===0)return ze}return ze}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let re=F.geometry(),fe=re.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(re.length===0)return NaN;let pe=new Vf(fe[0][1]),ze=1/0;for(let Ke of W){switch(Ke.type){case"Point":ze=Math.min(ze,bl(fe,!0,[Ke.coordinates],!1,pe,ze));break;case"LineString":ze=Math.min(ze,bl(fe,!0,Ke.coordinates,!0,pe,ze));break;case"Polygon":ze=Math.min(ze,Hu(fe,!0,Ke.coordinates,pe,ze))}if(ze===0)return ze}return ze}(A,this.geometries);if(A.geometryType()==="Polygon")return function(F,W){let re=F.geometry();if(re.length===0||re[0].length===0)return NaN;let fe=Cf(re,0).map(Ke=>Ke.map(ct=>ct.map(Lt=>_a([Lt.x,Lt.y],F.canonical)))),pe=new Vf(fe[0][0][0][1]),ze=1/0;for(let Ke of W)for(let ct of fe){switch(Ke.type){case"Point":ze=Math.min(ze,Hu([Ke.coordinates],!1,ct,pe,ze));break;case"LineString":ze=Math.min(ze,Hu(Ke.coordinates,!0,ct,pe,ze));break;case"Polygon":ze=Math.min(ze,Yo(ct,Ke.coordinates,pe,ze))}if(ze===0)return ze}return ze}(A,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":us,"!=":il,">":cl,"<":As,">=":zs,"<=":Ks,array:Fa,at:kr,boolean:Fa,case:An,coalesce:Fs,collator:Io,format:Zl,image:Su,in:Jr,"index-of":vi,interpolate:ko,"interpolate-hcl":ko,"interpolate-lab":ko,length:nc,let:jn,literal:ua,match:hn,number:Fa,"number-format":ls,object:Fa,slice:Mn,step:_n,string:Fa,"to-boolean":da,"to-color":da,"to-number":da,"to-string":da,var:Mt,within:pl,distance:Ic};class Bl{constructor(A,F,W,re){this.name=A,this.type=F,this._evaluate=W,this.args=re}evaluate(A){return this._evaluate(A,this.args)}eachChild(A){this.args.forEach(A)}outputDefined(){return!1}static parse(A,F){let W=A[0],re=Bl.definitions[W];if(!re)return F.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let fe=Array.isArray(re)?re[0]:re.type,pe=Array.isArray(re)?[[re[1],re[2]]]:re.overloads,ze=pe.filter(([ct])=>!Array.isArray(ct)||ct.length===A.length-1),Ke=null;for(let[ct,Lt]of ze){Ke=new vo(F.registry,eh,F.path,null,F.scope);let $t=[],fr=!1;for(let mr=1;mr{return fr=$t,Array.isArray(fr)?`(${fr.map(Je).join(", ")})`:`(${Je(fr.type)}...)`;var fr}).join(" | "),Lt=[];for(let $t=1;$t{F=A?F&&eh(W):F&&W instanceof ua}),!!F&&th(R)&&Hf(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function th(R){if(R instanceof Bl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof pl||R instanceof Ic)return!1;let A=!0;return R.eachChild(F=>{A&&!th(F)&&(A=!1)}),A}function ju(R){if(R instanceof Bl&&R.name==="feature-state")return!1;let A=!0;return R.eachChild(F=>{A&&!ju(F)&&(A=!1)}),A}function Hf(R,A){if(R instanceof Bl&&A.indexOf(R.name)>=0)return!1;let F=!0;return R.eachChild(W=>{F&&!Hf(W,A)&&(F=!1)}),F}function cc(R){return{result:"success",value:R}}function of(R){return{result:"error",value:R}}function Nl(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Kc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Rc(R){return!!R.expression&&R.expression.interpolated}function gs(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function jf(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Gh(R){return R}function rh(R,A){let F=A.type==="color",W=R.stops&&typeof R.stops[0][0]=="object",re=W||!(W||R.property!==void 0),fe=R.type||(Rc(A)?"exponential":"interval");if(F||A.type==="padding"){let Lt=F?nr.parse:Qr.parse;(R=$e({},R)).stops&&(R.stops=R.stops.map($t=>[$t[0],Lt($t[1])])),R.default=Lt(R.default?R.default:A.default)}if(R.colorSpace&&(pe=R.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var pe;let ze,Ke,ct;if(fe==="exponential")ze=ih;else if(fe==="interval")ze=Mu;else if(fe==="categorical"){ze=Th,Ke=Object.create(null);for(let Lt of R.stops)Ke[Lt[0]]=Lt[1];ct=typeof R.stops[0][0]}else{if(fe!=="identity")throw new Error(`Unknown function type "${fe}"`);ze=js}if(W){let Lt={},$t=[];for(let Pr=0;PrPr[0]),evaluate:({zoom:Pr},zr)=>ih({stops:fr,base:R.base},A,Pr).evaluate(Pr,zr)}}if(re){let Lt=fe==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Lt,interpolationFactor:ko.interpolationFactor.bind(void 0,Lt),zoomStops:R.stops.map($t=>$t[0]),evaluate:({zoom:$t})=>ze(R,A,$t,Ke,ct)}}return{kind:"source",evaluate(Lt,$t){let fr=$t&&$t.properties?$t.properties[R.property]:void 0;return fr===void 0?sf(R.default,A.default):ze(R,A,fr,Ke,ct)}}}function sf(R,A,F){return R!==void 0?R:A!==void 0?A:F!==void 0?F:void 0}function Th(R,A,F,W,re){return sf(typeof F===re?W[F]:void 0,R.default,A.default)}function Mu(R,A,F){if(gs(F)!=="number")return sf(R.default,A.default);let W=R.stops.length;if(W===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[W-1][0])return R.stops[W-1][1];let re=Li(R.stops.map(fe=>fe[0]),F);return R.stops[re][1]}function ih(R,A,F){let W=R.base!==void 0?R.base:1;if(gs(F)!=="number")return sf(R.default,A.default);let re=R.stops.length;if(re===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[re-1][0])return R.stops[re-1][1];let fe=Li(R.stops.map(Lt=>Lt[0]),F),pe=function(Lt,$t,fr,mr){let Pr=mr-fr,zr=Lt-fr;return Pr===0?0:$t===1?zr/Pr:(Math.pow($t,zr)-1)/(Math.pow($t,Pr)-1)}(F,W,R.stops[fe][0],R.stops[fe+1][0]),ze=R.stops[fe][1],Ke=R.stops[fe+1][1],ct=Lo[A.type]||Gh;return typeof ze.evaluate=="function"?{evaluate(...Lt){let $t=ze.evaluate.apply(void 0,Lt),fr=Ke.evaluate.apply(void 0,Lt);if($t!==void 0&&fr!==void 0)return ct($t,fr,pe,R.colorSpace)}}:ct(ze,Ke,pe,R.colorSpace)}function js(R,A,F){switch(A.type){case"color":F=nr.parse(F);break;case"formatted":F=ri.fromString(F.toString());break;case"resolvedImage":F=tn.fromString(F.toString());break;case"padding":F=Qr.parse(F);break;default:gs(F)===A.type||A.type==="enum"&&A.values[F]||(F=void 0)}return sf(F,R.default,A.default)}Bl.register(yf,{error:[{kind:"error"},[It],(R,[A])=>{throw new ma(A.evaluate(R))}],typeof:[It,[Tr],(R,[A])=>Je(Sn(A.evaluate(R)))],"to-rgba":[Ge(_t,4),[er],(R,[A])=>{let[F,W,re,fe]=A.evaluate(R).rgb;return[255*F,255*W,255*re,fe]}],rgb:[er,[_t,_t,_t],wh],rgba:[er,[_t,_t,_t,_t],wh],has:{type:mt,overloads:[[[It],(R,[A])=>Qf(A.evaluate(R),R.properties())],[[It,lr],(R,[A,F])=>Qf(A.evaluate(R),F.evaluate(R))]]},get:{type:Tr,overloads:[[[It],(R,[A])=>_f(A.evaluate(R),R.properties())],[[It,lr],(R,[A,F])=>_f(A.evaluate(R),F.evaluate(R))]]},"feature-state":[Tr,[It],(R,[A])=>_f(A.evaluate(R),R.featureState||{})],properties:[lr,[],R=>R.properties()],"geometry-type":[It,[],R=>R.geometryType()],id:[Tr,[],R=>R.id()],zoom:[_t,[],R=>R.globals.zoom],"heatmap-density":[_t,[],R=>R.globals.heatmapDensity||0],"line-progress":[_t,[],R=>R.globals.lineProgress||0],accumulated:[Tr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[_t,Yc(_t),(R,A)=>{let F=0;for(let W of A)F+=W.evaluate(R);return F}],"*":[_t,Yc(_t),(R,A)=>{let F=1;for(let W of A)F*=W.evaluate(R);return F}],"-":{type:_t,overloads:[[[_t,_t],(R,[A,F])=>A.evaluate(R)-F.evaluate(R)],[[_t],(R,[A])=>-A.evaluate(R)]]},"/":[_t,[_t,_t],(R,[A,F])=>A.evaluate(R)/F.evaluate(R)],"%":[_t,[_t,_t],(R,[A,F])=>A.evaluate(R)%F.evaluate(R)],ln2:[_t,[],()=>Math.LN2],pi:[_t,[],()=>Math.PI],e:[_t,[],()=>Math.E],"^":[_t,[_t,_t],(R,[A,F])=>Math.pow(A.evaluate(R),F.evaluate(R))],sqrt:[_t,[_t],(R,[A])=>Math.sqrt(A.evaluate(R))],log10:[_t,[_t],(R,[A])=>Math.log(A.evaluate(R))/Math.LN10],ln:[_t,[_t],(R,[A])=>Math.log(A.evaluate(R))],log2:[_t,[_t],(R,[A])=>Math.log(A.evaluate(R))/Math.LN2],sin:[_t,[_t],(R,[A])=>Math.sin(A.evaluate(R))],cos:[_t,[_t],(R,[A])=>Math.cos(A.evaluate(R))],tan:[_t,[_t],(R,[A])=>Math.tan(A.evaluate(R))],asin:[_t,[_t],(R,[A])=>Math.asin(A.evaluate(R))],acos:[_t,[_t],(R,[A])=>Math.acos(A.evaluate(R))],atan:[_t,[_t],(R,[A])=>Math.atan(A.evaluate(R))],min:[_t,Yc(_t),(R,A)=>Math.min(...A.map(F=>F.evaluate(R)))],max:[_t,Yc(_t),(R,A)=>Math.max(...A.map(F=>F.evaluate(R)))],abs:[_t,[_t],(R,[A])=>Math.abs(A.evaluate(R))],round:[_t,[_t],(R,[A])=>{let F=A.evaluate(R);return F<0?-Math.round(-F):Math.round(F)}],floor:[_t,[_t],(R,[A])=>Math.floor(A.evaluate(R))],ceil:[_t,[_t],(R,[A])=>Math.ceil(A.evaluate(R))],"filter-==":[mt,[It,Tr],(R,[A,F])=>R.properties()[A.value]===F.value],"filter-id-==":[mt,[Tr],(R,[A])=>R.id()===A.value],"filter-type-==":[mt,[It],(R,[A])=>R.geometryType()===A.value],"filter-<":[mt,[It,Tr],(R,[A,F])=>{let W=R.properties()[A.value],re=F.value;return typeof W==typeof re&&W{let F=R.id(),W=A.value;return typeof F==typeof W&&F":[mt,[It,Tr],(R,[A,F])=>{let W=R.properties()[A.value],re=F.value;return typeof W==typeof re&&W>re}],"filter-id->":[mt,[Tr],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>W}],"filter-<=":[mt,[It,Tr],(R,[A,F])=>{let W=R.properties()[A.value],re=F.value;return typeof W==typeof re&&W<=re}],"filter-id-<=":[mt,[Tr],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F<=W}],"filter->=":[mt,[It,Tr],(R,[A,F])=>{let W=R.properties()[A.value],re=F.value;return typeof W==typeof re&&W>=re}],"filter-id->=":[mt,[Tr],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>=W}],"filter-has":[mt,[Tr],(R,[A])=>A.value in R.properties()],"filter-has-id":[mt,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[mt,[Ge(It)],(R,[A])=>A.value.indexOf(R.geometryType())>=0],"filter-id-in":[mt,[Ge(Tr)],(R,[A])=>A.value.indexOf(R.id())>=0],"filter-in-small":[mt,[It,Ge(Tr)],(R,[A,F])=>F.value.indexOf(R.properties()[A.value])>=0],"filter-in-large":[mt,[It,Ge(Tr)],(R,[A,F])=>function(W,re,fe,pe){for(;fe<=pe;){let ze=fe+pe>>1;if(re[ze]===W)return!0;re[ze]>W?pe=ze-1:fe=ze+1}return!1}(R.properties()[A.value],F.value,0,F.value.length-1)],all:{type:mt,overloads:[[[mt,mt],(R,[A,F])=>A.evaluate(R)&&F.evaluate(R)],[Yc(mt),(R,A)=>{for(let F of A)if(!F.evaluate(R))return!1;return!0}]]},any:{type:mt,overloads:[[[mt,mt],(R,[A,F])=>A.evaluate(R)||F.evaluate(R)],[Yc(mt),(R,A)=>{for(let F of A)if(F.evaluate(R))return!0;return!1}]]},"!":[mt,[mt],(R,[A])=>!A.evaluate(R)],"is-supported-script":[mt,[It],(R,[A])=>{let F=R.globals&&R.globals.isSupportedScript;return!F||F(A.evaluate(R))}],upcase:[It,[It],(R,[A])=>A.evaluate(R).toUpperCase()],downcase:[It,[It],(R,[A])=>A.evaluate(R).toLowerCase()],concat:[It,Yc(Tr),(R,A)=>A.map(F=>Ba(F.evaluate(R))).join("")],"resolved-locale":[It,[Lr],(R,[A])=>A.evaluate(R).resolvedLocale()]});class Eu{constructor(A,F){var W;this.expression=A,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=F?(W=F).type==="color"&&jf(W.default)?new nr(0,0,0,0):W.type==="color"?nr.parse(W.default)||null:W.type==="padding"?Qr.parse(W.default)||null:W.type==="variableAnchorOffsetCollection"?$i.parse(W.default)||null:W.default===void 0?null:W.default:null,this._enumValues=F&&F.type==="enum"?F.values:null}evaluateWithoutErrorHandling(A,F,W,re,fe,pe){return this._evaluator.globals=A,this._evaluator.feature=F,this._evaluator.featureState=W,this._evaluator.canonical=re,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(A,F,W,re,fe,pe){this._evaluator.globals=A,this._evaluator.feature=F||null,this._evaluator.featureState=W||null,this._evaluator.canonical=re,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe||null;try{let ze=this.expression.evaluate(this._evaluator);if(ze==null||typeof ze=="number"&&ze!=ze)return this._defaultValue;if(this._enumValues&&!(ze in this._enumValues))throw new ma(`Expected value to be one of ${Object.keys(this._enumValues).map(Ke=>JSON.stringify(Ke)).join(", ")}, but found ${JSON.stringify(ze)} instead.`);return ze}catch(ze){return this._warningHistory[ze.message]||(this._warningHistory[ze.message]=!0,typeof console!="undefined"&&console.warn(ze.message)),this._defaultValue}}}function Dc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in yf}function ks(R,A){let F=new vo(yf,eh,[],A?function(re){let fe={color:er,string:It,number:_t,enum:It,boolean:mt,formatted:ti,padding:Br,resolvedImage:Vr,variableAnchorOffsetCollection:dt};return re.type==="array"?Ge(fe[re.value]||Tr,re.length):fe[re.type]}(A):void 0),W=F.parse(R,void 0,void 0,void 0,A&&A.type==="string"?{typeAnnotation:"coerce"}:void 0);return W?cc(new Eu(W,A)):of(F.errors)}class bc{constructor(A,F){this.kind=A,this._styleExpression=F,this.isStateDependent=A!=="constant"&&!ju(F.expression)}evaluateWithoutErrorHandling(A,F,W,re,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,re,fe,pe)}evaluate(A,F,W,re,fe,pe){return this._styleExpression.evaluate(A,F,W,re,fe,pe)}}class hu{constructor(A,F,W,re){this.kind=A,this.zoomStops=W,this._styleExpression=F,this.isStateDependent=A!=="camera"&&!ju(F.expression),this.interpolationType=re}evaluateWithoutErrorHandling(A,F,W,re,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,re,fe,pe)}evaluate(A,F,W,re,fe,pe){return this._styleExpression.evaluate(A,F,W,re,fe,pe)}interpolationFactor(A,F,W){return this.interpolationType?ko.interpolationFactor(this.interpolationType,A,F,W):0}}function _u(R,A){let F=ks(R,A);if(F.result==="error")return F;let W=F.value.expression,re=th(W);if(!re&&!Nl(A))return of([new St("","data expressions not supported")]);let fe=Hf(W,["zoom"]);if(!fe&&!Kc(A))return of([new St("","zoom expressions not supported")]);let pe=nh(W);return pe||fe?pe instanceof St?of([pe]):pe instanceof ko&&!Rc(A)?of([new St("",'"interpolate" expressions cannot be used with this property')]):cc(pe?new hu(re?"camera":"composite",F.value,pe.labels,pe instanceof ko?pe.interpolation:void 0):new bc(re?"constant":"source",F.value)):of([new St("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class nl{constructor(A,F){this._parameters=A,this._specification=F,$e(this,rh(this._parameters,this._specification))}static deserialize(A){return new nl(A._parameters,A._specification)}static serialize(A){return{_parameters:A._parameters,_specification:A._specification}}}function nh(R){let A=null;if(R instanceof jn)A=nh(R.result);else if(R instanceof Fs){for(let F of R.args)if(A=nh(F),A)break}else(R instanceof _n||R instanceof ko)&&R.input instanceof Bl&&R.input.name==="zoom"&&(A=R);return A instanceof St||R.eachChild(F=>{let W=nh(F);W instanceof St?A=W:!A&&W?A=new St("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):A&&W&&A!==W&&(A=new St("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),A}function Ah(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let A of R.slice(1))if(!Ah(A)&&typeof A!="boolean")return!1;return!0;default:return!0}}let zu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fc(R){if(R==null)return{filter:()=>!0,needGeometry:!1};Ah(R)||(R=xf(R));let A=ks(R,zu);if(A.result==="error")throw new Error(A.value.map(F=>`${F.key}: ${F.message}`).join(", "));return{filter:(F,W,re)=>A.value.evaluate(F,W,{},re),needGeometry:bd(R)}}function wc(R,A){return RA?1:0}function bd(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let A=1;A"||A==="<="||A===">="?Pf(R[1],R[2],A):A==="any"?(F=R.slice(1),["any"].concat(F.map(xf))):A==="all"?["all"].concat(R.slice(1).map(xf)):A==="none"?["all"].concat(R.slice(1).map(xf).map(jl)):A==="in"?Ou(R[1],R.slice(2)):A==="!in"?jl(Ou(R[1],R.slice(2))):A==="has"?bf(R[1]):A!=="!has"||jl(bf(R[1]));var F}function Pf(R,A,F){switch(R){case"$type":return[`filter-type-${F}`,A];case"$id":return[`filter-id-${F}`,A];default:return[`filter-${F}`,R,A]}}function Ou(R,A){if(A.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",A]];case"$id":return["filter-id-in",["literal",A]];default:return A.length>200&&!A.some(F=>typeof F!=typeof A[0])?["filter-in-large",R,["literal",A.sort(wc)]]:["filter-in-small",R,["literal",A]]}}function bf(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function jl(R){return["!",R]}function lf(R){let A=typeof R;if(A==="number"||A==="boolean"||A==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let re="[";for(let fe of R)re+=`${lf(fe)},`;return`${re}]`}let F=Object.keys(R).sort(),W="{";for(let re=0;reW.maximum?[new cr(A,F,`${F} is greater than the maximum value ${W.maximum}`)]:[]}function wf(R){let A=R.valueSpec,F=Cs(R.value.type),W,re,fe,pe={},ze=F!=="categorical"&&R.value.property===void 0,Ke=!ze,ct=gs(R.value.stops)==="array"&&gs(R.value.stops[0])==="array"&&gs(R.value.stops[0][0])==="object",Lt=ku({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(mr){if(F==="identity")return[new cr(mr.key,mr.value,'identity function may not have a "stops" property')];let Pr=[],zr=mr.value;return Pr=Pr.concat(Wf({key:mr.key,value:zr,valueSpec:mr.valueSpec,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,arrayElementValidator:$t})),gs(zr)==="array"&&zr.length===0&&Pr.push(new cr(mr.key,zr,"array must have at least one stop")),Pr},default:function(mr){return mr.validateSpec({key:mr.key,value:mr.value,valueSpec:A,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec})}}});return F==="identity"&&ze&&Lt.push(new cr(R.key,R.value,'missing required property "property"')),F==="identity"||R.value.stops||Lt.push(new cr(R.key,R.value,'missing required property "stops"')),F==="exponential"&&R.valueSpec.expression&&!Rc(R.valueSpec)&&Lt.push(new cr(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ke&&!Nl(R.valueSpec)?Lt.push(new cr(R.key,R.value,"property functions not supported")):ze&&!Kc(R.valueSpec)&&Lt.push(new cr(R.key,R.value,"zoom functions not supported"))),F!=="categorical"&&!ct||R.value.property!==void 0||Lt.push(new cr(R.key,R.value,'"property" property is required')),Lt;function $t(mr){let Pr=[],zr=mr.value,ui=mr.key;if(gs(zr)!=="array")return[new cr(ui,zr,`array expected, ${gs(zr)} found`)];if(zr.length!==2)return[new cr(ui,zr,`array length 2 expected, length ${zr.length} found`)];if(ct){if(gs(zr[0])!=="object")return[new cr(ui,zr,`object expected, ${gs(zr[0])} found`)];if(zr[0].zoom===void 0)return[new cr(ui,zr,"object stop key must have zoom")];if(zr[0].value===void 0)return[new cr(ui,zr,"object stop key must have value")];if(fe&&fe>Cs(zr[0].zoom))return[new cr(ui,zr[0].zoom,"stop zoom values must appear in ascending order")];Cs(zr[0].zoom)!==fe&&(fe=Cs(zr[0].zoom),re=void 0,pe={}),Pr=Pr.concat(ku({key:`${ui}[0]`,value:zr[0],valueSpec:{zoom:{}},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,objectElementValidators:{zoom:Us,value:fr}}))}else Pr=Pr.concat(fr({key:`${ui}[0]`,value:zr[0],valueSpec:{},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec},zr));return Dc(du(zr[1]))?Pr.concat([new cr(`${ui}[1]`,zr[1],"expressions are not allowed in function stops.")]):Pr.concat(mr.validateSpec({key:`${ui}[1]`,value:zr[1],valueSpec:A,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec}))}function fr(mr,Pr){let zr=gs(mr.value),ui=Cs(mr.value),yi=mr.value!==null?mr.value:Pr;if(W){if(zr!==W)return[new cr(mr.key,yi,`${zr} stop domain type must match previous stop domain type ${W}`)]}else W=zr;if(zr!=="number"&&zr!=="string"&&zr!=="boolean")return[new cr(mr.key,yi,"stop domain value must be a number, string, or boolean")];if(zr!=="number"&&F!=="categorical"){let vn=`number expected, ${zr} found`;return Nl(A)&&F===void 0&&(vn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new cr(mr.key,yi,vn)]}return F!=="categorical"||zr!=="number"||isFinite(ui)&&Math.floor(ui)===ui?F!=="categorical"&&zr==="number"&&re!==void 0&&uinew cr(`${R.key}${W.key}`,R.value,W.message));let F=A.value.expression||A.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!F.outputDefined())return[new cr(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!ju(F))return[new cr(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!ju(F))return[new cr(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!Hf(F,["zoom","feature-state"]))return[new cr(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!th(F))return[new cr(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wu(R){let A=R.key,F=R.value,W=R.valueSpec,re=[];return Array.isArray(W.values)?W.values.indexOf(Cs(F))===-1&&re.push(new cr(A,F,`expected one of [${W.values.join(", ")}], ${JSON.stringify(F)} found`)):Object.keys(W.values).indexOf(Cs(F))===-1&&re.push(new cr(A,F,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(F)} found`)),re}function Rf(R){return Ah(du(R.value))?zc($e({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xu(R)}function Xu(R){let A=R.value,F=R.key;if(gs(A)!=="array")return[new cr(F,A,`array expected, ${gs(A)} found`)];let W=R.styleSpec,re,fe=[];if(A.length<1)return[new cr(F,A,"filter array must have at least 1 element")];switch(fe=fe.concat(Wu({key:`${F}[0]`,value:A[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),Cs(A[0])){case"<":case"<=":case">":case">=":A.length>=2&&Cs(A[1])==="$type"&&fe.push(new cr(F,A,`"$type" cannot be use with operator "${A[0]}"`));case"==":case"!=":A.length!==3&&fe.push(new cr(F,A,`filter array for operator "${A[0]}" must have 3 elements`));case"in":case"!in":A.length>=2&&(re=gs(A[1]),re!=="string"&&fe.push(new cr(`${F}[1]`,A[1],`string expected, ${re} found`)));for(let pe=2;pe{ct in F&&A.push(new cr(W,F[ct],`"${ct}" is prohibited for ref layers`))}),re.layers.forEach(ct=>{Cs(ct.id)===ze&&(Ke=ct)}),Ke?Ke.ref?A.push(new cr(W,F.ref,"ref cannot reference another ref layer")):pe=Cs(Ke.type):A.push(new cr(W,F.ref,`ref layer "${ze}" not found`))}else if(pe!=="background")if(F.source){let Ke=re.sources&&re.sources[F.source],ct=Ke&&Cs(Ke.type);Ke?ct==="vector"&&pe==="raster"?A.push(new cr(W,F.source,`layer "${F.id}" requires a raster source`)):ct!=="raster-dem"&&pe==="hillshade"?A.push(new cr(W,F.source,`layer "${F.id}" requires a raster-dem source`)):ct==="raster"&&pe!=="raster"?A.push(new cr(W,F.source,`layer "${F.id}" requires a vector source`)):ct!=="vector"||F["source-layer"]?ct==="raster-dem"&&pe!=="hillshade"?A.push(new cr(W,F.source,"raster-dem source can only be used with layer type 'hillshade'.")):pe!=="line"||!F.paint||!F.paint["line-gradient"]||ct==="geojson"&&Ke.lineMetrics||A.push(new cr(W,F,`layer "${F.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):A.push(new cr(W,F,`layer "${F.id}" must specify a "source-layer"`)):A.push(new cr(W,F.source,`source "${F.source}" not found`))}else A.push(new cr(W,F,'missing required property "source"'));return A=A.concat(ku({key:W,value:F,valueSpec:fe.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${W}.type`,value:F.type,valueSpec:fe.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:F,objectKey:"type"}),filter:Rf,layout:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ct=>Wl($e({layerType:pe},ct))}}),paint:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ct=>Xf($e({layerType:pe},ct))}})}})),A}function Zu(R){let A=R.value,F=R.key,W=gs(A);return W!=="string"?[new cr(F,A,`string expected, ${W} found`)]:[]}let Oc={promoteId:function({key:R,value:A}){if(gs(A)==="string")return Zu({key:R,value:A});{let F=[];for(let W in A)F.push(...Zu({key:`${R}.${W}`,value:A[W]}));return F}}};function Tc(R){let A=R.value,F=R.key,W=R.styleSpec,re=R.style,fe=R.validateSpec;if(!A.type)return[new cr(F,A,'"type" is required')];let pe=Cs(A.type),ze;switch(pe){case"vector":case"raster":return ze=ku({key:F,value:A,valueSpec:W[`source_${pe.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:Oc,validateSpec:fe}),ze;case"raster-dem":return ze=function(Ke){var ct;let Lt=(ct=Ke.sourceName)!==null&&ct!==void 0?ct:"",$t=Ke.value,fr=Ke.styleSpec,mr=fr.source_raster_dem,Pr=Ke.style,zr=[],ui=gs($t);if($t===void 0)return zr;if(ui!=="object")return zr.push(new cr("source_raster_dem",$t,`object expected, ${ui} found`)),zr;let yi=Cs($t.encoding)==="custom",vn=["redFactor","greenFactor","blueFactor","baseShift"],zi=Ke.value.encoding?`"${Ke.value.encoding}"`:"Default";for(let un in $t)!yi&&vn.includes(un)?zr.push(new cr(un,$t[un],`In "${Lt}": "${un}" is only valid when "encoding" is set to "custom". ${zi} encoding found`)):mr[un]?zr=zr.concat(Ke.validateSpec({key:un,value:$t[un],valueSpec:mr[un],validateSpec:Ke.validateSpec,style:Pr,styleSpec:fr})):zr.push(new cr(un,$t[un],`unknown property "${un}"`));return zr}({sourceName:F,value:A,style:R.style,styleSpec:W,validateSpec:fe}),ze;case"geojson":if(ze=ku({key:F,value:A,valueSpec:W.source_geojson,style:re,styleSpec:W,validateSpec:fe,objectElementValidators:Oc}),A.cluster)for(let Ke in A.clusterProperties){let[ct,Lt]=A.clusterProperties[Ke],$t=typeof ct=="string"?[ct,["accumulated"],["get",Ke]]:ct;ze.push(...zc({key:`${F}.${Ke}.map`,value:Lt,validateSpec:fe,expressionContext:"cluster-map"})),ze.push(...zc({key:`${F}.${Ke}.reduce`,value:$t,validateSpec:fe,expressionContext:"cluster-reduce"}))}return ze;case"video":return ku({key:F,value:A,valueSpec:W.source_video,style:re,validateSpec:fe,styleSpec:W});case"image":return ku({key:F,value:A,valueSpec:W.source_image,style:re,validateSpec:fe,styleSpec:W});case"canvas":return[new cr(F,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wu({key:`${F}.type`,value:A.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:re,validateSpec:fe,styleSpec:W})}}function wl(R){let A=R.value,F=R.styleSpec,W=F.light,re=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new cr("light",A,`object expected, ${pe} found`)]),fe;for(let ze in A){let Ke=ze.match(/^(.*)-transition$/);fe=fe.concat(Ke&&W[Ke[1]]&&W[Ke[1]].transition?R.validateSpec({key:ze,value:A[ze],valueSpec:F.transition,validateSpec:R.validateSpec,style:re,styleSpec:F}):W[ze]?R.validateSpec({key:ze,value:A[ze],valueSpec:W[ze],validateSpec:R.validateSpec,style:re,styleSpec:F}):[new cr(ze,A[ze],`unknown property "${ze}"`)])}return fe}function vu(R){let A=R.value,F=R.styleSpec,W=F.sky,re=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new cr("sky",A,`object expected, ${fe} found`)];let pe=[];for(let ze in A)pe=pe.concat(W[ze]?R.validateSpec({key:ze,value:A[ze],valueSpec:W[ze],style:re,styleSpec:F}):[new cr(ze,A[ze],`unknown property "${ze}"`)]);return pe}function qc(R){let A=R.value,F=R.styleSpec,W=F.terrain,re=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new cr("terrain",A,`object expected, ${pe} found`)]),fe;for(let ze in A)fe=fe.concat(W[ze]?R.validateSpec({key:ze,value:A[ze],valueSpec:W[ze],validateSpec:R.validateSpec,style:re,styleSpec:F}):[new cr(ze,A[ze],`unknown property "${ze}"`)]);return fe}function cf(R){let A=[],F=R.value,W=R.key;if(Array.isArray(F)){let re=[],fe=[];for(let pe in F)F[pe].id&&re.includes(F[pe].id)&&A.push(new cr(W,F,`all the sprites' ids must be unique, but ${F[pe].id} is duplicated`)),re.push(F[pe].id),F[pe].url&&fe.includes(F[pe].url)&&A.push(new cr(W,F,`all the sprites' URLs must be unique, but ${F[pe].url} is duplicated`)),fe.push(F[pe].url),A=A.concat(ku({key:`${W}[${pe}]`,value:F[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return A}return Zu({key:W,value:F})}let fc={"*":()=>[],array:Wf,boolean:function(R){let A=R.value,F=R.key,W=gs(A);return W!=="boolean"?[new cr(F,A,`boolean expected, ${W} found`)]:[]},number:Us,color:function(R){let A=R.key,F=R.value,W=gs(F);return W!=="string"?[new cr(A,F,`color expected, ${W} found`)]:nr.parse(String(F))?[]:[new cr(A,F,`color expected, "${F}" found`)]},constants:If,enum:Wu,filter:Rf,function:wf,layer:ah,object:ku,source:Tc,light:wl,sky:vu,terrain:qc,projection:function(R){let A=R.value,F=R.styleSpec,W=F.projection,re=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new cr("projection",A,`object expected, ${fe} found`)];let pe=[];for(let ze in A)pe=pe.concat(W[ze]?R.validateSpec({key:ze,value:A[ze],valueSpec:W[ze],style:re,styleSpec:F}):[new cr(ze,A[ze],`unknown property "${ze}"`)]);return pe},string:Zu,formatted:function(R){return Zu(R).length===0?[]:zc(R)},resolvedImage:function(R){return Zu(R).length===0?[]:zc(R)},padding:function(R){let A=R.key,F=R.value;if(gs(F)==="array"){if(F.length<1||F.length>4)return[new cr(A,F,`padding requires 1 to 4 values; ${F.length} values found`)];let W={type:"number"},re=[];for(let fe=0;fe[]}})),R.constants&&(F=F.concat(If({key:"constants",value:R.constants,style:R,styleSpec:A,validateSpec:Bc}))),Ar(F)}function Cr(R){return function(A){return R(q1(mg({},A),{validateSpec:Bc}))}}function Ar(R){return[].concat(R).sort((A,F)=>A.line-F.line)}function Kr(R){return function(...A){return Ar(R.apply(this,A))}}Wt.source=Kr(Cr(Tc)),Wt.sprite=Kr(Cr(cf)),Wt.glyphs=Kr(Cr(At)),Wt.light=Kr(Cr(wl)),Wt.sky=Kr(Cr(vu)),Wt.terrain=Kr(Cr(qc)),Wt.layer=Kr(Cr(ah)),Wt.filter=Kr(Cr(Rf)),Wt.paintProperty=Kr(Cr(Xf)),Wt.layoutProperty=Kr(Cr(Wl));let ki=Wt,Xi=ki.light,dn=ki.sky,wn=ki.paintProperty,Nn=ki.layoutProperty;function Yi(R,A){let F=!1;if(A&&A.length)for(let W of A)R.fire(new ge(new Error(W.message))),F=!0;return F}class Qi{constructor(A,F,W){let re=this.cells=[];if(A instanceof ArrayBuffer){this.arrayBuffer=A;let pe=new Int32Array(this.arrayBuffer);A=pe[0],this.d=(F=pe[1])+2*(W=pe[2]);for(let Ke=0;Ke=$t[Pr+0]&&re>=$t[Pr+1])?(ze[mr]=!0,pe.push(Lt[mr])):ze[mr]=!1}}}}_forEachCell(A,F,W,re,fe,pe,ze,Ke){let ct=this._convertToCellCoord(A),Lt=this._convertToCellCoord(F),$t=this._convertToCellCoord(W),fr=this._convertToCellCoord(re);for(let mr=ct;mr<=$t;mr++)for(let Pr=Lt;Pr<=fr;Pr++){let zr=this.d*Pr+mr;if((!Ke||Ke(this._convertFromCellCoord(mr),this._convertFromCellCoord(Pr),this._convertFromCellCoord(mr+1),this._convertFromCellCoord(Pr+1)))&&fe.call(this,A,F,W,re,zr,pe,ze,Ke))return}}_convertFromCellCoord(A){return(A-this.padding)/this.scale}_convertToCellCoord(A){return Math.max(0,Math.min(this.d-1,Math.floor(A*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let A=this.cells,F=3+this.cells.length+1+1,W=0;for(let pe=0;pe=0)continue;let pe=R[fe];re[fe]=on[F].shallow.indexOf(fe)>=0?pe:La(pe,A)}R instanceof Error&&(re.message=R.message)}if(re.$name)throw new Error("$name property is reserved for worker serialization logic.");return F!=="Object"&&(re.$name=F),re}function Na(R){if(Ra(R))return R;if(Array.isArray(R))return R.map(Na);if(typeof R!="object")throw new Error("can't deserialize object of type "+typeof R);let A=Ca(R)||"Object";if(!on[A])throw new Error(`can't deserialize unregistered class ${A}`);let{klass:F}=on[A];if(!F)throw new Error(`can't deserialize unregistered class ${A}`);if(F.deserialize)return F.deserialize(R);let W=Object.create(F.prototype);for(let re of Object.keys(R)){if(re==="$name")continue;let fe=R[re];W[re]=on[A].shallow.indexOf(re)>=0?fe:Na(fe)}return W}class Yn{constructor(){this.first=!0}update(A,F){let W=Math.floor(A);return this.first?(this.first=!1,this.lastIntegerZoom=W,this.lastIntegerZoomTime=0,this.lastZoom=A,this.lastFloorZoom=W,!0):(this.lastFloorZoom>W?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=F):this.lastFloorZoomR>=128&&R<=255,"Hangul Jamo":R=>R>=4352&&R<=4607,Khmer:R=>R>=6016&&R<=6143,"General Punctuation":R=>R>=8192&&R<=8303,"Letterlike Symbols":R=>R>=8448&&R<=8527,"Number Forms":R=>R>=8528&&R<=8591,"Miscellaneous Technical":R=>R>=8960&&R<=9215,"Control Pictures":R=>R>=9216&&R<=9279,"Optical Character Recognition":R=>R>=9280&&R<=9311,"Enclosed Alphanumerics":R=>R>=9312&&R<=9471,"Geometric Shapes":R=>R>=9632&&R<=9727,"Miscellaneous Symbols":R=>R>=9728&&R<=9983,"Miscellaneous Symbols and Arrows":R=>R>=11008&&R<=11263,"Ideographic Description Characters":R=>R>=12272&&R<=12287,"CJK Symbols and Punctuation":R=>R>=12288&&R<=12351,Katakana:R=>R>=12448&&R<=12543,Kanbun:R=>R>=12688&&R<=12703,"CJK Strokes":R=>R>=12736&&R<=12783,"Enclosed CJK Letters and Months":R=>R>=12800&&R<=13055,"CJK Compatibility":R=>R>=13056&&R<=13311,"Yijing Hexagram Symbols":R=>R>=19904&&R<=19967,"Private Use Area":R=>R>=57344&&R<=63743,"Vertical Forms":R=>R>=65040&&R<=65055,"CJK Compatibility Forms":R=>R>=65072&&R<=65103,"Small Form Variants":R=>R>=65104&&R<=65135,"Halfwidth and Fullwidth Forms":R=>R>=65280&&R<=65519};function Ka(R){for(let A of R)if(Ho(A.charCodeAt(0)))return!0;return!1}function bo(R){for(let A of R)if(!as(A.charCodeAt(0)))return!1;return!0}function Xo(R){let A=R.map(F=>{try{return new RegExp(`\\p{sc=${F}}`,"u").source}catch(W){return null}}).filter(F=>F);return new RegExp(A.join("|"),"u")}let Ss=Xo(["Arab","Dupl","Mong","Ougr","Syrc"]);function as(R){return!Ss.test(String.fromCodePoint(R))}let ws=Xo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ho(R){return!(R!==746&&R!==747&&(R<4352||!(Dn["CJK Compatibility Forms"](R)&&!(R>=65097&&R<=65103)||Dn["CJK Compatibility"](R)||Dn["CJK Strokes"](R)||!(!Dn["CJK Symbols and Punctuation"](R)||R>=12296&&R<=12305||R>=12308&&R<=12319||R===12336)||Dn["Enclosed CJK Letters and Months"](R)||Dn["Ideographic Description Characters"](R)||Dn.Kanbun(R)||Dn.Katakana(R)&&R!==12540||!(!Dn["Halfwidth and Fullwidth Forms"](R)||R===65288||R===65289||R===65293||R>=65306&&R<=65310||R===65339||R===65341||R===65343||R>=65371&&R<=65503||R===65507||R>=65512&&R<=65519)||!(!Dn["Small Form Variants"](R)||R>=65112&&R<=65118||R>=65123&&R<=65126)||Dn["Vertical Forms"](R)||Dn["Yijing Hexagram Symbols"](R)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(R))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(R))||ws.test(String.fromCodePoint(R)))))}function ml(R){return!(Ho(R)||function(A){return!!(Dn["Latin-1 Supplement"](A)&&(A===167||A===169||A===174||A===177||A===188||A===189||A===190||A===215||A===247)||Dn["General Punctuation"](A)&&(A===8214||A===8224||A===8225||A===8240||A===8241||A===8251||A===8252||A===8258||A===8263||A===8264||A===8265||A===8273)||Dn["Letterlike Symbols"](A)||Dn["Number Forms"](A)||Dn["Miscellaneous Technical"](A)&&(A>=8960&&A<=8967||A>=8972&&A<=8991||A>=8996&&A<=9e3||A===9003||A>=9085&&A<=9114||A>=9150&&A<=9165||A===9167||A>=9169&&A<=9179||A>=9186&&A<=9215)||Dn["Control Pictures"](A)&&A!==9251||Dn["Optical Character Recognition"](A)||Dn["Enclosed Alphanumerics"](A)||Dn["Geometric Shapes"](A)||Dn["Miscellaneous Symbols"](A)&&!(A>=9754&&A<=9759)||Dn["Miscellaneous Symbols and Arrows"](A)&&(A>=11026&&A<=11055||A>=11088&&A<=11097||A>=11192&&A<=11243)||Dn["CJK Symbols and Punctuation"](A)||Dn.Katakana(A)||Dn["Private Use Area"](A)||Dn["CJK Compatibility Forms"](A)||Dn["Small Form Variants"](A)||Dn["Halfwidth and Fullwidth Forms"](A)||A===8734||A===8756||A===8757||A>=9984&&A<=10087||A>=10102&&A<=10131||A===65532||A===65533)}(R))}let Ws=Xo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Ls(R){return Ws.test(String.fromCodePoint(R))}function va(R,A){return!(!A&&Ls(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Dn.Khmer(R))}function no(R){for(let A of R)if(Ls(A.charCodeAt(0)))return!0;return!1}let ys=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class rs{constructor(A,F){this.zoom=A,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Yn,this.transition={})}isSupportedScript(A){return function(F,W){for(let re of F)if(!va(re.charCodeAt(0),W))return!1;return!0}(A,ys.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let A=this.zoom,F=A-Math.floor(A),W=this.crossFadingFactor();return A>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*F}}}class $l{constructor(A,F){this.property=A,this.value=F,this.expression=function(W,re){if(jf(W))return new nl(W,re);if(Dc(W)){let fe=_u(W,re);if(fe.result==="error")throw new Error(fe.value.map(pe=>`${pe.key}: ${pe.message}`).join(", "));return fe.value}{let fe=W;return re.type==="color"&&typeof W=="string"?fe=nr.parse(W):re.type!=="padding"||typeof W!="number"&&!Array.isArray(W)?re.type==="variableAnchorOffsetCollection"&&Array.isArray(W)&&(fe=$i.parse(W)):fe=Qr.parse(W),{kind:"constant",evaluate:()=>fe}}}(F===void 0?A.specification.default:F,A.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(A,F,W){return this.property.possiblyEvaluate(this,A,F,W)}}class Cu{constructor(A){this.property=A,this.value=new $l(A,void 0)}transitioned(A,F){return new Nc(this.property,this.value,F,L({},A.transition,this.transition),A.now)}untransitioned(){return new Nc(this.property,this.value,null,{},0)}}class Yu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitionablePropertyValues)}getValue(A){return g(this._values[A].value.value)}setValue(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].value=new $l(this._values[A].property,F===null?void 0:g(F))}getTransition(A){return g(this._values[A].transition)}setTransition(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].transition=g(F)||void 0}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W);let re=this.getTransition(F);re!==void 0&&(A[`${F}-transition`]=re)}return A}transitioned(A,F){let W=new pu(this._properties);for(let re of Object.keys(this._values))W._values[re]=this._values[re].transitioned(A,F._values[re]);return W}untransitioned(){let A=new pu(this._properties);for(let F of Object.keys(this._values))A._values[F]=this._values[F].untransitioned();return A}}class Nc{constructor(A,F,W,re,fe){this.property=A,this.value=F,this.begin=fe+re.delay||0,this.end=this.begin+re.duration||0,A.specification.transition&&(re.delay||re.duration)&&(this.prior=W)}possiblyEvaluate(A,F,W){let re=A.now||0,fe=this.value.possiblyEvaluate(A,F,W),pe=this.prior;if(pe){if(re>this.end)return this.prior=null,fe;if(this.value.isDataDriven())return this.prior=null,fe;if(re=1)return 1;let ct=Ke*Ke,Lt=ct*Ke;return 4*(Ke<.5?Lt:3*(Ke-ct)+Lt-.75)}(ze))}}return fe}}class pu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitioningPropertyValues)}possiblyEvaluate(A,F,W){let re=new Ac(this._properties);for(let fe of Object.keys(this._values))re._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return re}hasTransition(){for(let A of Object.keys(this._values))if(this._values[A].prior)return!0;return!1}}class Uc{constructor(A){this._properties=A,this._values=Object.create(A.defaultPropertyValues)}hasValue(A){return this._values[A].value!==void 0}getValue(A){return g(this._values[A].value)}setValue(A,F){this._values[A]=new $l(this._values[A].property,F===null?void 0:g(F))}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W)}return A}possiblyEvaluate(A,F,W){let re=new Ac(this._properties);for(let fe of Object.keys(this._values))re._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return re}}class xu{constructor(A,F,W){this.property=A,this.value=F,this.parameters=W}isConstant(){return this.value.kind==="constant"}constantOr(A){return this.value.kind==="constant"?this.value.value:A}evaluate(A,F,W,re){return this.property.evaluate(this.value,this.parameters,A,F,W,re)}}class Ac{constructor(A){this._properties=A,this._values=Object.create(A.defaultPossiblyEvaluatedValues)}get(A){return this._values[A]}}class Ua{constructor(A){this.specification=A}possiblyEvaluate(A,F){if(A.isDataDriven())throw new Error("Value should not be data driven");return A.expression.evaluate(F)}interpolate(A,F,W){let re=Lo[this.specification.type];return re?re(A,F,W):A}}class oo{constructor(A,F){this.specification=A,this.overrides=F}possiblyEvaluate(A,F,W,re){return new xu(this,A.expression.kind==="constant"||A.expression.kind==="camera"?{kind:"constant",value:A.expression.evaluate(F,null,{},W,re)}:A.expression,F)}interpolate(A,F,W){if(A.value.kind!=="constant"||F.value.kind!=="constant")return A;if(A.value.value===void 0||F.value.value===void 0)return new xu(this,{kind:"constant",value:void 0},A.parameters);let re=Lo[this.specification.type];if(re){let fe=re(A.value.value,F.value.value,W);return new xu(this,{kind:"constant",value:fe},A.parameters)}return A}evaluate(A,F,W,re,fe,pe){return A.kind==="constant"?A.value:A.evaluate(F,W,re,fe,pe)}}class Vc extends oo{possiblyEvaluate(A,F,W,re){if(A.value===void 0)return new xu(this,{kind:"constant",value:void 0},F);if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,re),pe=A.property.specification.type==="resolvedImage"&&typeof fe!="string"?fe.name:fe,ze=this._calculate(pe,pe,pe,F);return new xu(this,{kind:"constant",value:ze},F)}if(A.expression.kind==="camera"){let fe=this._calculate(A.expression.evaluate({zoom:F.zoom-1}),A.expression.evaluate({zoom:F.zoom}),A.expression.evaluate({zoom:F.zoom+1}),F);return new xu(this,{kind:"constant",value:fe},F)}return new xu(this,A.expression,F)}evaluate(A,F,W,re,fe,pe){if(A.kind==="source"){let ze=A.evaluate(F,W,re,fe,pe);return this._calculate(ze,ze,ze,F)}return A.kind==="composite"?this._calculate(A.evaluate({zoom:Math.floor(F.zoom)-1},W,re),A.evaluate({zoom:Math.floor(F.zoom)},W,re),A.evaluate({zoom:Math.floor(F.zoom)+1},W,re),F):A.value}_calculate(A,F,W,re){return re.zoom>re.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class hc{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,re){if(A.value!==void 0){if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,re);return this._calculate(fe,fe,fe,F)}return this._calculate(A.expression.evaluate(new rs(Math.floor(F.zoom-1),F)),A.expression.evaluate(new rs(Math.floor(F.zoom),F)),A.expression.evaluate(new rs(Math.floor(F.zoom+1),F)),F)}}_calculate(A,F,W,re){return re.zoom>re.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class Ku{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,re){return!!A.expression.evaluate(F,null,{},W,re)}interpolate(){return!1}}class ue{constructor(A){this.properties=A,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in A){let W=A[F];W.specification.overridable&&this.overridableProperties.push(F);let re=this.defaultPropertyValues[F]=new $l(W,void 0),fe=this.defaultTransitionablePropertyValues[F]=new Cu(W);this.defaultTransitioningPropertyValues[F]=fe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=re.possiblyEvaluate({})}}}Fi("DataDrivenProperty",oo),Fi("DataConstantProperty",Ua),Fi("CrossFadedDataDrivenProperty",Vc),Fi("CrossFadedProperty",hc),Fi("ColorRampProperty",Ku);let w="-transition";class B extends Re{constructor(A,F){if(super(),this.id=A.id,this.type=A.type,this._featureFilter={filter:()=>!0,needGeometry:!1},A.type!=="custom"&&(this.metadata=A.metadata,this.minzoom=A.minzoom,this.maxzoom=A.maxzoom,A.type!=="background"&&(this.source=A.source,this.sourceLayer=A["source-layer"],this.filter=A.filter),F.layout&&(this._unevaluatedLayout=new Uc(F.layout)),F.paint)){this._transitionablePaint=new Yu(F.paint);for(let W in A.paint)this.setPaintProperty(W,A.paint[W],{validate:!1});for(let W in A.layout)this.setLayoutProperty(W,A.layout[W],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ac(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(A){return A==="visibility"?this.visibility:this._unevaluatedLayout.getValue(A)}setLayoutProperty(A,F,W={}){F!=null&&this._validate(Nn,`layers.${this.id}.layout.${A}`,A,F,W)||(A!=="visibility"?this._unevaluatedLayout.setValue(A,F):this.visibility=F)}getPaintProperty(A){return A.endsWith(w)?this._transitionablePaint.getTransition(A.slice(0,-11)):this._transitionablePaint.getValue(A)}setPaintProperty(A,F,W={}){if(F!=null&&this._validate(wn,`layers.${this.id}.paint.${A}`,A,F,W))return!1;if(A.endsWith(w))return this._transitionablePaint.setTransition(A.slice(0,-11),F||void 0),!1;{let re=this._transitionablePaint._values[A],fe=re.property.specification["property-type"]==="cross-faded-data-driven",pe=re.value.isDataDriven(),ze=re.value;this._transitionablePaint.setValue(A,F),this._handleSpecialPaintPropertyUpdate(A);let Ke=this._transitionablePaint._values[A].value;return Ke.isDataDriven()||pe||fe||this._handleOverridablePaintPropertyUpdate(A,ze,Ke)}}_handleSpecialPaintPropertyUpdate(A){}_handleOverridablePaintPropertyUpdate(A,F,W){return!1}isHidden(A){return!!(this.minzoom&&A=this.maxzoom)||this.visibility==="none"}updateTransitions(A){this._transitioningPaint=this._transitionablePaint.transitioned(A,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(A,F){A.getCrossfadeParameters&&(this._crossfadeParameters=A.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(A,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(A,void 0,F)}serialize(){let A={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(A.layout=A.layout||{},A.layout.visibility=this.visibility),M(A,(F,W)=>!(F===void 0||W==="layout"&&!Object.keys(F).length||W==="paint"&&!Object.keys(F).length))}_validate(A,F,W,re,fe={}){return(!fe||fe.validate!==!1)&&Yi(this,A.call(ki,{key:F,layerType:this.type,objectKey:W,value:re,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let A in this.paint._values){let F=this.paint.get(A);if(F instanceof xu&&Nl(F.property.specification)&&(F.value.kind==="source"||F.value.kind==="composite")&&F.value.isStateDependent)return!0}return!1}}let Q={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ee{constructor(A,F){this._structArray=A,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class le{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(A,F){return A._trim(),F&&(A.isTransferred=!0,F.push(A.arrayBuffer)),{length:A.length,arrayBuffer:A.arrayBuffer}}static deserialize(A){let F=Object.create(this.prototype);return F.arrayBuffer=A.arrayBuffer,F.length=A.length,F.capacity=A.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(A){this.reserve(A),this.length=A}reserve(A){if(A>this.capacity){this.capacity=Math.max(A,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function qe(R,A=1){let F=0,W=0;return{members:R.map(re=>{let fe=Q[re.type].BYTES_PER_ELEMENT,pe=F=Xe(F,Math.max(A,fe)),ze=re.components||1;return W=Math.max(W,fe),F+=fe*ze,{name:re.name,type:re.type,components:ze,offset:pe}}),size:Xe(F,Math.max(W,A)),alignment:A}}function Xe(R,A){return Math.ceil(R/A)*A}class ot extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let re=2*A;return this.int16[re+0]=F,this.int16[re+1]=W,A}}ot.prototype.bytesPerElement=4,Fi("StructArrayLayout2i4",ot);class Tt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W){let re=this.length;return this.resize(re+1),this.emplace(re,A,F,W)}emplace(A,F,W,re){let fe=3*A;return this.int16[fe+0]=F,this.int16[fe+1]=W,this.int16[fe+2]=re,A}}Tt.prototype.bytesPerElement=6,Fi("StructArrayLayout3i6",Tt);class Yt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,re){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,re)}emplace(A,F,W,re,fe){let pe=4*A;return this.int16[pe+0]=F,this.int16[pe+1]=W,this.int16[pe+2]=re,this.int16[pe+3]=fe,A}}Yt.prototype.bytesPerElement=8,Fi("StructArrayLayout4i8",Yt);class Kt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,A,F,W,re,fe,pe)}emplace(A,F,W,re,fe,pe,ze){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=re,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=ze,A}}Kt.prototype.bytesPerElement=12,Fi("StructArrayLayout2i4i12",Kt);class xr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,A,F,W,re,fe,pe)}emplace(A,F,W,re,fe,pe,ze){let Ke=4*A,ct=8*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.uint8[ct+4]=re,this.uint8[ct+5]=fe,this.uint8[ct+6]=pe,this.uint8[ct+7]=ze,A}}xr.prototype.bytesPerElement=8,Fi("StructArrayLayout2i4ub8",xr);class Ir extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let re=2*A;return this.float32[re+0]=F,this.float32[re+1]=W,A}}Ir.prototype.bytesPerElement=8,Fi("StructArrayLayout2f8",Ir);class ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe,ze,Ke,ct,Lt){let $t=this.length;return this.resize($t+1),this.emplace($t,A,F,W,re,fe,pe,ze,Ke,ct,Lt)}emplace(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t){let fr=10*A;return this.uint16[fr+0]=F,this.uint16[fr+1]=W,this.uint16[fr+2]=re,this.uint16[fr+3]=fe,this.uint16[fr+4]=pe,this.uint16[fr+5]=ze,this.uint16[fr+6]=Ke,this.uint16[fr+7]=ct,this.uint16[fr+8]=Lt,this.uint16[fr+9]=$t,A}}ve.prototype.bytesPerElement=20,Fi("StructArrayLayout10ui20",ve);class be extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr){let mr=this.length;return this.resize(mr+1),this.emplace(mr,A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr)}emplace(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr){let Pr=12*A;return this.int16[Pr+0]=F,this.int16[Pr+1]=W,this.int16[Pr+2]=re,this.int16[Pr+3]=fe,this.uint16[Pr+4]=pe,this.uint16[Pr+5]=ze,this.uint16[Pr+6]=Ke,this.uint16[Pr+7]=ct,this.int16[Pr+8]=Lt,this.int16[Pr+9]=$t,this.int16[Pr+10]=fr,this.int16[Pr+11]=mr,A}}be.prototype.bytesPerElement=24,Fi("StructArrayLayout4i4ui4i24",be);class De extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let re=this.length;return this.resize(re+1),this.emplace(re,A,F,W)}emplace(A,F,W,re){let fe=3*A;return this.float32[fe+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=re,A}}De.prototype.bytesPerElement=12,Fi("StructArrayLayout3f12",De);class Be extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint32[1*A+0]=F,A}}Be.prototype.bytesPerElement=4,Fi("StructArrayLayout1ul4",Be);class et extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe,ze,Ke,ct){let Lt=this.length;return this.resize(Lt+1),this.emplace(Lt,A,F,W,re,fe,pe,ze,Ke,ct)}emplace(A,F,W,re,fe,pe,ze,Ke,ct,Lt){let $t=10*A,fr=5*A;return this.int16[$t+0]=F,this.int16[$t+1]=W,this.int16[$t+2]=re,this.int16[$t+3]=fe,this.int16[$t+4]=pe,this.int16[$t+5]=ze,this.uint32[fr+3]=Ke,this.uint16[$t+8]=ct,this.uint16[$t+9]=Lt,A}}et.prototype.bytesPerElement=20,Fi("StructArrayLayout6i1ul2ui20",et);class We extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,A,F,W,re,fe,pe)}emplace(A,F,W,re,fe,pe,ze){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=re,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=ze,A}}We.prototype.bytesPerElement=12,Fi("StructArrayLayout2i2i2i12",We);class it extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe){let pe=this.length;return this.resize(pe+1),this.emplace(pe,A,F,W,re,fe)}emplace(A,F,W,re,fe,pe){let ze=4*A,Ke=8*A;return this.float32[ze+0]=F,this.float32[ze+1]=W,this.float32[ze+2]=re,this.int16[Ke+6]=fe,this.int16[Ke+7]=pe,A}}it.prototype.bytesPerElement=16,Fi("StructArrayLayout2f1f2i16",it);class Ft extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe){let ze=this.length;return this.resize(ze+1),this.emplace(ze,A,F,W,re,fe,pe)}emplace(A,F,W,re,fe,pe,ze){let Ke=16*A,ct=4*A,Lt=8*A;return this.uint8[Ke+0]=F,this.uint8[Ke+1]=W,this.float32[ct+1]=re,this.float32[ct+2]=fe,this.int16[Lt+6]=pe,this.int16[Lt+7]=ze,A}}Ft.prototype.bytesPerElement=16,Fi("StructArrayLayout2ub2f2i16",Ft);class Ht extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let re=this.length;return this.resize(re+1),this.emplace(re,A,F,W)}emplace(A,F,W,re){let fe=3*A;return this.uint16[fe+0]=F,this.uint16[fe+1]=W,this.uint16[fe+2]=re,A}}Ht.prototype.bytesPerElement=6,Fi("StructArrayLayout3ui6",Ht);class tr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr,zr,ui,yi){let vn=this.length;return this.resize(vn+1),this.emplace(vn,A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr,zr,ui,yi)}emplace(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr,zr,ui,yi,vn){let zi=24*A,un=12*A,Tn=48*A;return this.int16[zi+0]=F,this.int16[zi+1]=W,this.uint16[zi+2]=re,this.uint16[zi+3]=fe,this.uint32[un+2]=pe,this.uint32[un+3]=ze,this.uint32[un+4]=Ke,this.uint16[zi+10]=ct,this.uint16[zi+11]=Lt,this.uint16[zi+12]=$t,this.float32[un+7]=fr,this.float32[un+8]=mr,this.uint8[Tn+36]=Pr,this.uint8[Tn+37]=zr,this.uint8[Tn+38]=ui,this.uint32[un+10]=yi,this.int16[zi+22]=vn,A}}tr.prototype.bytesPerElement=48,Fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",tr);class dr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo){let lo=this.length;return this.resize(lo+1),this.emplace(lo,A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo)}emplace(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo,lo){let Xn=32*A,Ro=16*A;return this.int16[Xn+0]=F,this.int16[Xn+1]=W,this.int16[Xn+2]=re,this.int16[Xn+3]=fe,this.int16[Xn+4]=pe,this.int16[Xn+5]=ze,this.int16[Xn+6]=Ke,this.int16[Xn+7]=ct,this.uint16[Xn+8]=Lt,this.uint16[Xn+9]=$t,this.uint16[Xn+10]=fr,this.uint16[Xn+11]=mr,this.uint16[Xn+12]=Pr,this.uint16[Xn+13]=zr,this.uint16[Xn+14]=ui,this.uint16[Xn+15]=yi,this.uint16[Xn+16]=vn,this.uint16[Xn+17]=zi,this.uint16[Xn+18]=un,this.uint16[Xn+19]=Tn,this.uint16[Xn+20]=pa,this.uint16[Xn+21]=ro,this.uint16[Xn+22]=Vo,this.uint32[Ro+12]=Xa,this.float32[Ro+13]=sa,this.float32[Ro+14]=Mo,this.uint16[Xn+30]=fo,this.uint16[Xn+31]=lo,A}}dr.prototype.bytesPerElement=64,Fi("StructArrayLayout8i15ui1ul2f2ui64",dr);class Sr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.float32[1*A+0]=F,A}}Sr.prototype.bytesPerElement=4,Fi("StructArrayLayout1f4",Sr);class Or extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let re=this.length;return this.resize(re+1),this.emplace(re,A,F,W)}emplace(A,F,W,re){let fe=3*A;return this.uint16[6*A+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=re,A}}Or.prototype.bytesPerElement=12,Fi("StructArrayLayout1ui2f12",Or);class Wr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let re=this.length;return this.resize(re+1),this.emplace(re,A,F,W)}emplace(A,F,W,re){let fe=4*A;return this.uint32[2*A+0]=F,this.uint16[fe+2]=W,this.uint16[fe+3]=re,A}}Wr.prototype.bytesPerElement=8,Fi("StructArrayLayout1ul2ui8",Wr);class ni extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let re=2*A;return this.uint16[re+0]=F,this.uint16[re+1]=W,A}}ni.prototype.bytesPerElement=4,Fi("StructArrayLayout2ui4",ni);class Pi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint16[1*A+0]=F,A}}Pi.prototype.bytesPerElement=2,Fi("StructArrayLayout1ui2",Pi);class cn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,re){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,re)}emplace(A,F,W,re,fe){let pe=4*A;return this.float32[pe+0]=F,this.float32[pe+1]=W,this.float32[pe+2]=re,this.float32[pe+3]=fe,A}}cn.prototype.bytesPerElement=16,Fi("StructArrayLayout4f16",cn);class ln extends ee{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}ln.prototype.size=20;class Cn extends et{get(A){return new ln(this,A)}}Fi("CollisionBoxArray",Cn);class Kn extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(A){this._structArray.uint8[this._pos1+37]=A}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(A){this._structArray.uint8[this._pos1+38]=A}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(A){this._structArray.uint32[this._pos4+10]=A}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Kn.prototype.size=48;class Ta extends tr{get(A){return new Kn(this,A)}}Fi("PlacedSymbolArray",Ta);class fa extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(A){this._structArray.uint32[this._pos4+12]=A}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}fa.prototype.size=64;class $a extends dr{get(A){return new fa(this,A)}}Fi("SymbolInstanceArray",$a);class Co extends Sr{getoffsetX(A){return this.float32[1*A+0]}}Fi("GlyphOffsetArray",Co);class Qa extends Tt{getx(A){return this.int16[3*A+0]}gety(A){return this.int16[3*A+1]}gettileUnitDistanceFromAnchor(A){return this.int16[3*A+2]}}Fi("SymbolLineVertexArray",Qa);class mo extends ee{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}mo.prototype.size=12;class Bo extends Or{get(A){return new mo(this,A)}}Fi("TextAnchorOffsetArray",Bo);class Ps extends ee{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ps.prototype.size=8;class Ts extends Wr{get(A){return new Ps(this,A)}}Fi("FeatureIndexArray",Ts);class wo extends ot{}class To extends ot{}class hl extends ot{}class Ul extends Kt{}class Lu extends xr{}class au extends Ir{}class Js extends ve{}class Ql extends be{}class dc extends De{}class Tl extends Be{}class Al extends We{}class X extends Ft{}class se extends Ht{}class Te extends ni{}let Ne=qe([{name:"a_pos",components:2,type:"Int16"}],4),{members:He}=Ne;class Ye{constructor(A=[]){this.segments=A}prepareSegment(A,F,W,re){let fe=this.segments[this.segments.length-1];return A>Ye.MAX_VERTEX_ARRAY_LENGTH&&T(`Max vertices per segment is ${Ye.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${A}`),(!fe||fe.vertexLength+A>Ye.MAX_VERTEX_ARRAY_LENGTH||fe.sortKey!==re)&&(fe={vertexOffset:F.length,primitiveOffset:W.length,vertexLength:0,primitiveLength:0},re!==void 0&&(fe.sortKey=re),this.segments.push(fe)),fe}get(){return this.segments}destroy(){for(let A of this.segments)for(let F in A.vaos)A.vaos[F].destroy()}static simpleSegment(A,F,W,re){return new Ye([{vertexOffset:A,primitiveOffset:F,vertexLength:W,primitiveLength:re,vaos:{},sortKey:0}])}}function kt(R,A){return 256*(R=E(Math.floor(R),0,255))+E(Math.floor(A),0,255)}Ye.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Fi("SegmentVector",Ye);let nt=qe([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var jt={exports:{}},gr={exports:{}};gr.exports=function(R,A){var F,W,re,fe,pe,ze,Ke,ct;for(W=R.length-(F=3&R.length),re=A,pe=3432918353,ze=461845907,ct=0;ct>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*ze+(((Ke>>>16)*ze&65535)<<16)&4294967295)<<13|re>>>19))+((5*(re>>>16)&65535)<<16)&4294967295))+((58964+(fe>>>16)&65535)<<16);switch(Ke=0,F){case 3:Ke^=(255&R.charCodeAt(ct+2))<<16;case 2:Ke^=(255&R.charCodeAt(ct+1))<<8;case 1:re^=Ke=(65535&(Ke=(Ke=(65535&(Ke^=255&R.charCodeAt(ct)))*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*ze+(((Ke>>>16)*ze&65535)<<16)&4294967295}return re^=R.length,re=2246822507*(65535&(re^=re>>>16))+((2246822507*(re>>>16)&65535)<<16)&4294967295,re=3266489909*(65535&(re^=re>>>13))+((3266489909*(re>>>16)&65535)<<16)&4294967295,(re^=re>>>16)>>>0};var yr=gr.exports,Hr={exports:{}};Hr.exports=function(R,A){for(var F,W=R.length,re=A^W,fe=0;W>=4;)F=1540483477*(65535&(F=255&R.charCodeAt(fe)|(255&R.charCodeAt(++fe))<<8|(255&R.charCodeAt(++fe))<<16|(255&R.charCodeAt(++fe))<<24))+((1540483477*(F>>>16)&65535)<<16),re=1540483477*(65535&re)+((1540483477*(re>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),W-=4,++fe;switch(W){case 3:re^=(255&R.charCodeAt(fe+2))<<16;case 2:re^=(255&R.charCodeAt(fe+1))<<8;case 1:re=1540483477*(65535&(re^=255&R.charCodeAt(fe)))+((1540483477*(re>>>16)&65535)<<16)}return re=1540483477*(65535&(re^=re>>>13))+((1540483477*(re>>>16)&65535)<<16),(re^=re>>>15)>>>0};var qr=yr,_i=Hr.exports;jt.exports=qr,jt.exports.murmur3=qr,jt.exports.murmur2=_i;var bi=o(jt.exports);class Zr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(A,F,W,re){this.ids.push(ai(A)),this.positions.push(F,W,re)}getPositions(A){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let F=ai(A),W=0,re=this.ids.length-1;for(;W>1;this.ids[pe]>=F?re=pe:W=pe+1}let fe=[];for(;this.ids[W]===F;)fe.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return fe}static serialize(A,F){let W=new Float64Array(A.ids),re=new Uint32Array(A.positions);return gi(W,re,0,W.length-1),F&&F.push(W.buffer,re.buffer),{ids:W,positions:re}}static deserialize(A){let F=new Zr;return F.ids=A.ids,F.positions=A.positions,F.indexed=!0,F}}function ai(R){let A=+R;return!isNaN(A)&&A<=Number.MAX_SAFE_INTEGER?A:bi(String(R))}function gi(R,A,F,W){for(;F>1],fe=F-1,pe=W+1;for(;;){do fe++;while(R[fe]re);if(fe>=pe)break;Ii(R,fe,pe),Ii(A,3*fe,3*pe),Ii(A,3*fe+1,3*pe+1),Ii(A,3*fe+2,3*pe+2)}pe-F`u_${re}`),this.type=W}setUniform(A,F,W){A.set(W.constantOr(this.value))}getBinding(A,F,W){return this.type==="color"?new En(A,F):new ei(A,F)}}class Ia{constructor(A,F){this.uniformNames=F.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(A,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=A.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=A.tlbr}setUniform(A,F,W,re){let fe=re==="u_pattern_to"?this.patternTo:re==="u_pattern_from"?this.patternFrom:re==="u_pixel_ratio_to"?this.pixelRatioTo:re==="u_pixel_ratio_from"?this.pixelRatioFrom:null;fe&&A.set(fe)}getBinding(A,F,W){return W.substr(0,9)==="u_pattern"?new Ln(A,F):new ei(A,F)}}class yo{constructor(A,F,W,re){this.expression=A,this.type=W,this.maxValue=0,this.paintVertexAttributes=F.map(fe=>({name:`a_${fe}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new re}populatePaintArray(A,F,W,re,fe){let pe=this.paintVertexArray.length,ze=this.expression.evaluate(new rs(0),F,{},re,[],fe);this.paintVertexArray.resize(A),this._setPaintValue(pe,A,ze)}updatePaintArray(A,F,W,re){let fe=this.expression.evaluate({zoom:0},W,re);this._setPaintValue(A,F,fe)}_setPaintValue(A,F,W){if(this.type==="color"){let re=ia(W);for(let fe=A;fe`u_${ze}_t`),this.type=W,this.useIntegerZoom=re,this.zoom=fe,this.maxValue=0,this.paintVertexAttributes=F.map(ze=>({name:`a_${ze}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(A,F,W,re,fe){let pe=this.expression.evaluate(new rs(this.zoom),F,{},re,[],fe),ze=this.expression.evaluate(new rs(this.zoom+1),F,{},re,[],fe),Ke=this.paintVertexArray.length;this.paintVertexArray.resize(A),this._setPaintValue(Ke,A,pe,ze)}updatePaintArray(A,F,W,re){let fe=this.expression.evaluate({zoom:this.zoom},W,re),pe=this.expression.evaluate({zoom:this.zoom+1},W,re);this._setPaintValue(A,F,fe,pe)}_setPaintValue(A,F,W,re){if(this.type==="color"){let fe=ia(W),pe=ia(re);for(let ze=A;ze`#define HAS_UNIFORM_${re}`))}return A}getBinderAttributes(){let A=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof yo||W instanceof Da)for(let re=0;re!0){this.programConfigurations={};for(let re of A)this.programConfigurations[re.id]=new Is(re,F,W);this.needsUpload=!1,this._featureMap=new Zr,this._bufferOffset=0}populatePaintArrays(A,F,W,re,fe,pe){for(let ze in this.programConfigurations)this.programConfigurations[ze].populatePaintArrays(A,F,re,fe,pe);F.id!==void 0&&this._featureMap.add(F.id,W,this._bufferOffset,A),this._bufferOffset=A,this.needsUpload=!0}updatePaintArrays(A,F,W,re){for(let fe of W)this.needsUpload=this.programConfigurations[fe.id].updatePaintArrays(A,this._featureMap,F,fe,re)||this.needsUpload}get(A){return this.programConfigurations[A]}upload(A){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(A);this.needsUpload=!1}}destroy(){for(let A in this.programConfigurations)this.programConfigurations[A].destroy()}}function Xs(R,A){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${A}-`,"").replace(/-/g,"_")]}function Gn(R,A,F){let W={color:{source:Ir,composite:cn},number:{source:Sr,composite:Ir}},re=function(fe){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[fe]}(R);return re&&re[F]||W[A][F]}Fi("ConstantBinder",Ea),Fi("CrossFadedConstantBinder",Ia),Fi("SourceExpressionBinder",yo),Fi("CrossFadedCompositeBinder",go),Fi("CompositeExpressionBinder",Da),Fi("ProgramConfiguration",Is,{omit:["_buffers"]}),Fi("ProgramConfigurationSet",Ms);let ja=8192,Fo=Math.pow(2,14)-1,Uo=-Fo-1;function $s(R){let A=ja/R.extent,F=R.loadGeometry();for(let W=0;Wpe.x+1||Kepe.y+1)&&T("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return F}function Sl(R,A){return{type:R.type,id:R.id,properties:R.properties,geometry:A?$s(R):[]}}function bu(R,A,F,W,re){R.emplaceBack(2*A+(W+1)/2,2*F+(re+1)/2)}class dl{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new To,this.indexArray=new se,this.segments=new Ye,this.programConfigurations=new Ms(A.layers,A.zoom),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){let re=this.layers[0],fe=[],pe=null,ze=!1;re.type==="circle"&&(pe=re.layout.get("circle-sort-key"),ze=!pe.isConstant());for(let{feature:Ke,id:ct,index:Lt,sourceLayerIndex:$t}of A){let fr=this.layers[0]._featureFilter.needGeometry,mr=Sl(Ke,fr);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),mr,W))continue;let Pr=ze?pe.evaluate(mr,{},W):void 0,zr={id:ct,properties:Ke.properties,type:Ke.type,sourceLayerIndex:$t,index:Lt,geometry:fr?mr.geometry:$s(Ke),patterns:{},sortKey:Pr};fe.push(zr)}ze&&fe.sort((Ke,ct)=>Ke.sortKey-ct.sortKey);for(let Ke of fe){let{geometry:ct,index:Lt,sourceLayerIndex:$t}=Ke,fr=A[Lt].feature;this.addFeature(Ke,ct,Lt,W),F.featureIndex.insert(fr,ct,Lt,$t,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,He),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(A,F,W,re){for(let fe of F)for(let pe of fe){let ze=pe.x,Ke=pe.y;if(ze<0||ze>=ja||Ke<0||Ke>=ja)continue;let ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,A.sortKey),Lt=ct.vertexLength;bu(this.layoutVertexArray,ze,Ke,-1,-1),bu(this.layoutVertexArray,ze,Ke,1,-1),bu(this.layoutVertexArray,ze,Ke,1,1),bu(this.layoutVertexArray,ze,Ke,-1,1),this.indexArray.emplaceBack(Lt,Lt+1,Lt+2),this.indexArray.emplaceBack(Lt,Lt+3,Lt+2),ct.vertexLength+=4,ct.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,{},re)}}function Sc(R,A){for(let F=0;F1){if(Rr(R,A))return!0;for(let W=0;W1?F:F.sub(A)._mult(re)._add(A))}function mi(R,A){let F,W,re,fe=!1;for(let pe=0;peA.y!=re.y>A.y&&A.x<(re.x-W.x)*(A.y-W.y)/(re.y-W.y)+W.x&&(fe=!fe)}return fe}function Ui(R,A){let F=!1;for(let W=0,re=R.length-1;WA.y!=pe.y>A.y&&A.x<(pe.x-fe.x)*(A.y-fe.y)/(pe.y-fe.y)+fe.x&&(F=!F)}return F}function qi(R,A,F){let W=F[0],re=F[2];if(R.xre.x&&A.x>re.x||R.yre.y&&A.y>re.y)return!1;let fe=z(R,A,F[0]);return fe!==z(R,A,F[1])||fe!==z(R,A,F[2])||fe!==z(R,A,F[3])}function Ei(R,A,F){let W=A.paint.get(R).value;return W.kind==="constant"?W.value:F.programConfigurations.get(A.id).getMaxValue(R)}function Hn(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function en(R,A,F,W,re){if(!A[0]&&!A[1])return R;let fe=u.convert(A)._mult(re);F==="viewport"&&fe._rotate(-W);let pe=[];for(let ze=0;zeli(ui,zr))}(ct,Ke),mr=$t?Lt*ze:Lt;for(let Pr of re)for(let zr of Pr){let ui=$t?zr:li(zr,Ke),yi=mr,vn=Bn([],[zr.x,zr.y,0,1],Ke);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?yi*=vn[3]/pe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(yi*=pe.cameraToCenterDistance/vn[3]),Me(fr,ui,yi))return!0}return!1}}function li(R,A){let F=Bn([],[R.x,R.y,0,1],A);return new u(F[0]/F[3],F[1]/F[3])}class mn extends dl{}let Ji;Fi("HeatmapBucket",mn,{omit:["layers"]});var Vi={get paint(){return Ji=Ji||new ue({"heatmap-radius":new oo(ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new oo(ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ua(ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ku(ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ua(ce.paint_heatmap["heatmap-opacity"])})}};function Ni(R,{width:A,height:F},W,re){if(re){if(re instanceof Uint8ClampedArray)re=new Uint8Array(re.buffer);else if(re.length!==A*F*W)throw new RangeError(`mismatched image size. expected: ${re.length} but got: ${A*F*W}`)}else re=new Uint8Array(A*F*W);return R.width=A,R.height=F,R.data=re,R}function pn(R,{width:A,height:F},W){if(A===R.width&&F===R.height)return;let re=Ni({},{width:A,height:F},W);Vn(R,re,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,A),height:Math.min(R.height,F)},W),R.width=A,R.height=F,R.data=re.data}function Vn(R,A,F,W,re,fe){if(re.width===0||re.height===0)return A;if(re.width>R.width||re.height>R.height||F.x>R.width-re.width||F.y>R.height-re.height)throw new RangeError("out of range source coordinates for image copy");if(re.width>A.width||re.height>A.height||W.x>A.width-re.width||W.y>A.height-re.height)throw new RangeError("out of range destination coordinates for image copy");let pe=R.data,ze=A.data;if(pe===ze)throw new Error("srcData equals dstData, so image is already copied");for(let Ke=0;Ke{A[R.evaluationKey]=Ke;let ct=R.expression.evaluate(A);re.data[pe+ze+0]=Math.floor(255*ct.r/ct.a),re.data[pe+ze+1]=Math.floor(255*ct.g/ct.a),re.data[pe+ze+2]=Math.floor(255*ct.b/ct.a),re.data[pe+ze+3]=Math.floor(255*ct.a)};if(R.clips)for(let pe=0,ze=0;pe80*F){ze=1/0,Ke=1/0;let Lt=-1/0,$t=-1/0;for(let fr=F;frLt&&(Lt=mr),Pr>$t&&($t=Pr)}ct=Math.max(Lt-ze,$t-Ke),ct=ct!==0?32767/ct:0}return Vl(fe,pe,F,ze,Ke,ct,0),pe}function Qs(R,A,F,W,re){let fe;if(re===function(pe,ze,Ke,ct){let Lt=0;for(let $t=ze,fr=Ke-ct;$t0)for(let pe=A;pe=A;pe-=W)fe=qt(pe/W|0,R[pe],R[pe+1],fe);return fe&&ne(fe,fe.next)&&(Ve(fe),fe=fe.next),fe}function al(R,A){if(!R)return R;A||(A=R);let F,W=R;do if(F=!1,W.steiner||!ne(W,W.next)&&de(W.prev,W,W.next)!==0)W=W.next;else{if(Ve(W),W=A=W.prev,W===W.next)break;F=!0}while(F||W!==A);return A}function Vl(R,A,F,W,re,fe,pe){if(!R)return;!pe&&fe&&function(Ke,ct,Lt,$t){let fr=Ke;do fr.z===0&&(fr.z=D(fr.x,fr.y,ct,Lt,$t)),fr.prevZ=fr.prev,fr.nextZ=fr.next,fr=fr.next;while(fr!==Ke);fr.prevZ.nextZ=null,fr.prevZ=null,function(mr){let Pr,zr=1;do{let ui,yi=mr;mr=null;let vn=null;for(Pr=0;yi;){Pr++;let zi=yi,un=0;for(let pa=0;pa0||Tn>0&&zi;)un!==0&&(Tn===0||!zi||yi.z<=zi.z)?(ui=yi,yi=yi.nextZ,un--):(ui=zi,zi=zi.nextZ,Tn--),vn?vn.nextZ=ui:mr=ui,ui.prevZ=vn,vn=ui;yi=zi}vn.nextZ=null,zr*=2}while(Pr>1)}(fr)}(R,W,re,fe);let ze=R;for(;R.prev!==R.next;){let Ke=R.prev,ct=R.next;if(fe?Vs(R,W,re,fe):ss(R))A.push(Ke.i,R.i,ct.i),Ve(R),R=ct.next,ze=ct.next;else if((R=ct)===ze){pe?pe===1?Vl(R=Ys(al(R),A),A,F,W,re,fe,2):pe===2&&wa(R,A,F,W,re,fe):Vl(al(R),A,F,W,re,fe,1);break}}}function ss(R){let A=R.prev,F=R,W=R.next;if(de(A,F,W)>=0)return!1;let re=A.x,fe=F.x,pe=W.x,ze=A.y,Ke=F.y,ct=W.y,Lt=refe?re>pe?re:pe:fe>pe?fe:pe,mr=ze>Ke?ze>ct?ze:ct:Ke>ct?Ke:ct,Pr=W.next;for(;Pr!==A;){if(Pr.x>=Lt&&Pr.x<=fr&&Pr.y>=$t&&Pr.y<=mr&&q(re,ze,fe,Ke,pe,ct,Pr.x,Pr.y)&&de(Pr.prev,Pr,Pr.next)>=0)return!1;Pr=Pr.next}return!0}function Vs(R,A,F,W){let re=R.prev,fe=R,pe=R.next;if(de(re,fe,pe)>=0)return!1;let ze=re.x,Ke=fe.x,ct=pe.x,Lt=re.y,$t=fe.y,fr=pe.y,mr=zeKe?ze>ct?ze:ct:Ke>ct?Ke:ct,ui=Lt>$t?Lt>fr?Lt:fr:$t>fr?$t:fr,yi=D(mr,Pr,A,F,W),vn=D(zr,ui,A,F,W),zi=R.prevZ,un=R.nextZ;for(;zi&&zi.z>=yi&&un&&un.z<=vn;){if(zi.x>=mr&&zi.x<=zr&&zi.y>=Pr&&zi.y<=ui&&zi!==re&&zi!==pe&&q(ze,Lt,Ke,$t,ct,fr,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0||(zi=zi.prevZ,un.x>=mr&&un.x<=zr&&un.y>=Pr&&un.y<=ui&&un!==re&&un!==pe&&q(ze,Lt,Ke,$t,ct,fr,un.x,un.y)&&de(un.prev,un,un.next)>=0))return!1;un=un.nextZ}for(;zi&&zi.z>=yi;){if(zi.x>=mr&&zi.x<=zr&&zi.y>=Pr&&zi.y<=ui&&zi!==re&&zi!==pe&&q(ze,Lt,Ke,$t,ct,fr,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0)return!1;zi=zi.prevZ}for(;un&&un.z<=vn;){if(un.x>=mr&&un.x<=zr&&un.y>=Pr&&un.y<=ui&&un!==re&&un!==pe&&q(ze,Lt,Ke,$t,ct,fr,un.x,un.y)&&de(un.prev,un,un.next)>=0)return!1;un=un.nextZ}return!0}function Ys(R,A){let F=R;do{let W=F.prev,re=F.next.next;!ne(W,re)&&we(W,F,F.next,re)&&Xt(W,re)&&Xt(re,W)&&(A.push(W.i,F.i,re.i),Ve(F),Ve(F.next),F=R=re),F=F.next}while(F!==R);return al(F)}function wa(R,A,F,W,re,fe){let pe=R;do{let ze=pe.next.next;for(;ze!==pe.prev;){if(pe.i!==ze.i&&K(pe,ze)){let Ke=hr(pe,ze);return pe=al(pe,pe.next),Ke=al(Ke,Ke.next),Vl(pe,A,F,W,re,fe,0),void Vl(Ke,A,F,W,re,fe,0)}ze=ze.next}pe=pe.next}while(pe!==R)}function ol(R,A){return R.x-A.x}function io(R,A){let F=function(re,fe){let pe=fe,ze=re.x,Ke=re.y,ct,Lt=-1/0;do{if(Ke<=pe.y&&Ke>=pe.next.y&&pe.next.y!==pe.y){let zr=pe.x+(Ke-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(zr<=ze&&zr>Lt&&(Lt=zr,ct=pe.x=pe.x&&pe.x>=fr&&ze!==pe.x&&q(Kect.x||pe.x===ct.x&&Y(ct,pe)))&&(ct=pe,Pr=zr)}pe=pe.next}while(pe!==$t);return ct}(R,A);if(!F)return A;let W=hr(F,R);return al(W,W.next),al(F,F.next)}function Y(R,A){return de(R.prev,R,A.prev)<0&&de(A.next,R,R.next)<0}function D(R,A,F,W,re){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-F)*re|0)|R<<8))|R<<4))|R<<2))|R<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=(A-W)*re|0)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function J(R){let A=R,F=R;do(A.x=(R-pe)*(fe-ze)&&(R-pe)*(W-ze)>=(F-pe)*(A-ze)&&(F-pe)*(fe-ze)>=(re-pe)*(W-ze)}function K(R,A){return R.next.i!==A.i&&R.prev.i!==A.i&&!function(F,W){let re=F;do{if(re.i!==F.i&&re.next.i!==F.i&&re.i!==W.i&&re.next.i!==W.i&&we(re,re.next,F,W))return!0;re=re.next}while(re!==F);return!1}(R,A)&&(Xt(R,A)&&Xt(A,R)&&function(F,W){let re=F,fe=!1,pe=(F.x+W.x)/2,ze=(F.y+W.y)/2;do re.y>ze!=re.next.y>ze&&re.next.y!==re.y&&pe<(re.next.x-re.x)*(ze-re.y)/(re.next.y-re.y)+re.x&&(fe=!fe),re=re.next;while(re!==F);return fe}(R,A)&&(de(R.prev,R,A.prev)||de(R,A.prev,A))||ne(R,A)&&de(R.prev,R,R.next)>0&&de(A.prev,A,A.next)>0)}function de(R,A,F){return(A.y-R.y)*(F.x-A.x)-(A.x-R.x)*(F.y-A.y)}function ne(R,A){return R.x===A.x&&R.y===A.y}function we(R,A,F,W){let re=ft(de(R,A,F)),fe=ft(de(R,A,W)),pe=ft(de(F,W,R)),ze=ft(de(F,W,A));return re!==fe&&pe!==ze||!(re!==0||!Ue(R,F,A))||!(fe!==0||!Ue(R,W,A))||!(pe!==0||!Ue(F,R,W))||!(ze!==0||!Ue(F,A,W))}function Ue(R,A,F){return A.x<=Math.max(R.x,F.x)&&A.x>=Math.min(R.x,F.x)&&A.y<=Math.max(R.y,F.y)&&A.y>=Math.min(R.y,F.y)}function ft(R){return R>0?1:R<0?-1:0}function Xt(R,A){return de(R.prev,R,R.next)<0?de(R,A,R.next)>=0&&de(R,R.prev,A)>=0:de(R,A,R.prev)<0||de(R,R.next,A)<0}function hr(R,A){let F=Qe(R.i,R.x,R.y),W=Qe(A.i,A.x,A.y),re=R.next,fe=A.prev;return R.next=A,A.prev=R,F.next=re,re.prev=F,W.next=F,F.prev=W,fe.next=W,W.prev=fe,W}function qt(R,A,F,W){let re=Qe(R,A,F);return W?(re.next=W.next,re.prev=W,W.next.prev=re,W.next=re):(re.prev=re,re.next=re),re}function Ve(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function Qe(R,A,F){return{i:R,x:A,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function at(R,A,F){let W=F.patternDependencies,re=!1;for(let fe of A){let pe=fe.paint.get(`${R}-pattern`);pe.isConstant()||(re=!0);let ze=pe.constantOr(null);ze&&(re=!0,W[ze.to]=!0,W[ze.from]=!0)}return re}function Ct(R,A,F,W,re){let fe=re.patternDependencies;for(let pe of A){let ze=pe.paint.get(`${R}-pattern`).value;if(ze.kind!=="constant"){let Ke=ze.evaluate({zoom:W-1},F,{},re.availableImages),ct=ze.evaluate({zoom:W},F,{},re.availableImages),Lt=ze.evaluate({zoom:W+1},F,{},re.availableImages);Ke=Ke&&Ke.name?Ke.name:Ke,ct=ct&&ct.name?ct.name:ct,Lt=Lt&&Lt.name?Lt.name:Lt,fe[Ke]=!0,fe[ct]=!0,fe[Lt]=!0,F.patterns[pe.id]={min:Ke,mid:ct,max:Lt}}}return F}class Ot{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new hl,this.indexArray=new se,this.indexArray2=new Te,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.segments2=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=at("fill",this.layers,F);let re=this.layers[0].layout.get("fill-sort-key"),fe=!re.isConstant(),pe=[];for(let{feature:ze,id:Ke,index:ct,sourceLayerIndex:Lt}of A){let $t=this.layers[0]._featureFilter.needGeometry,fr=Sl(ze,$t);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),fr,W))continue;let mr=fe?re.evaluate(fr,{},W,F.availableImages):void 0,Pr={id:Ke,properties:ze.properties,type:ze.type,sourceLayerIndex:Lt,index:ct,geometry:$t?fr.geometry:$s(ze),patterns:{},sortKey:mr};pe.push(Pr)}fe&&pe.sort((ze,Ke)=>ze.sortKey-Ke.sortKey);for(let ze of pe){let{geometry:Ke,index:ct,sourceLayerIndex:Lt}=ze;if(this.hasPattern){let $t=Ct("fill",this.layers,ze,this.zoom,F);this.patternFeatures.push($t)}else this.addFeature(ze,Ke,ct,W,{});F.featureIndex.insert(A[ct].feature,Ke,ct,Lt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let re of this.patternFeatures)this.addFeature(re,re.geometry,re.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ml),this.indexBuffer=A.createIndexBuffer(this.indexArray),this.indexBuffer2=A.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(A,F,W,re,fe){for(let pe of Cf(F,500)){let ze=0;for(let mr of pe)ze+=mr.length;let Ke=this.segments.prepareSegment(ze,this.layoutVertexArray,this.indexArray),ct=Ke.vertexLength,Lt=[],$t=[];for(let mr of pe){if(mr.length===0)continue;mr!==pe[0]&&$t.push(Lt.length/2);let Pr=this.segments2.prepareSegment(mr.length,this.layoutVertexArray,this.indexArray2),zr=Pr.vertexLength;this.layoutVertexArray.emplaceBack(mr[0].x,mr[0].y),this.indexArray2.emplaceBack(zr+mr.length-1,zr),Lt.push(mr[0].x),Lt.push(mr[0].y);for(let ui=1;ui>3}if(re--,W===1||W===2)fe+=R.readSVarint(),pe+=R.readSVarint(),W===1&&(A&&ze.push(A),A=[]),A.push(new Ur(fe,pe));else{if(W!==7)throw new Error("unknown command "+W);A&&A.push(A[0].clone())}}return A&&ze.push(A),ze},fi.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var A=R.readVarint()+R.pos,F=1,W=0,re=0,fe=0,pe=1/0,ze=-1/0,Ke=1/0,ct=-1/0;R.pos>3}if(W--,F===1||F===2)(re+=R.readSVarint())ze&&(ze=re),(fe+=R.readSVarint())ct&&(ct=fe);else if(F!==7)throw new Error("unknown command "+F)}return[pe,Ke,ze,ct]},fi.prototype.toGeoJSON=function(R,A,F){var W,re,fe=this.extent*Math.pow(2,F),pe=this.extent*R,ze=this.extent*A,Ke=this.loadGeometry(),ct=fi.types[this.type];function Lt(mr){for(var Pr=0;Pr>3;re=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}return re}(F))}Bi.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var A=this._pbf.readVarint()+this._pbf.pos;return new rn(this._pbf,A,this.extent,this._keys,this._values)};var sn=Ci;function zn(R,A,F){if(R===3){var W=new sn(F,F.readVarint()+F.pos);W.length&&(A[W.name]=W)}}br.VectorTile=function(R,A){this.layers=R.readFields(zn,{},A)},br.VectorTileFeature=Di,br.VectorTileLayer=Ci;let Ja=br.VectorTileFeature.types,co=Math.pow(2,13);function ts(R,A,F,W,re,fe,pe,ze){R.emplaceBack(A,F,2*Math.floor(W*co)+pe,re*co*2,fe*co*2,Math.round(ze))}class so{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new Ul,this.centroidVertexArray=new wo,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.features=[],this.hasPattern=at("fill-extrusion",this.layers,F);for(let{feature:re,id:fe,index:pe,sourceLayerIndex:ze}of A){let Ke=this.layers[0]._featureFilter.needGeometry,ct=Sl(re,Ke);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ct,W))continue;let Lt={id:fe,sourceLayerIndex:ze,index:pe,geometry:Ke?ct.geometry:$s(re),properties:re.properties,type:re.type,patterns:{}};this.hasPattern?this.features.push(Ct("fill-extrusion",this.layers,Lt,this.zoom,F)):this.addFeature(Lt,Lt.geometry,pe,W,{}),F.featureIndex.insert(re,Lt.geometry,pe,ze,this.index,!0)}}addFeatures(A,F,W){for(let re of this.features){let{geometry:fe}=re;this.addFeature(re,fe,re.index,F,W)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,ur),this.centroidVertexBuffer=A.createVertexBuffer(this.centroidVertexArray,ht.members,!0),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(A,F,W,re,fe){for(let pe of Cf(F,500)){let ze={x:0,y:0,vertexCount:0},Ke=0;for(let Pr of pe)Ke+=Pr.length;let ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Pr of pe){if(Pr.length===0||ms(Pr))continue;let zr=0;for(let ui=0;ui=1){let vn=Pr[ui-1];if(!Zo(yi,vn)){ct.vertexLength+4>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let zi=yi.sub(vn)._perp()._unit(),un=vn.dist(yi);zr+un>32768&&(zr=0),ts(this.layoutVertexArray,yi.x,yi.y,zi.x,zi.y,0,0,zr),ts(this.layoutVertexArray,yi.x,yi.y,zi.x,zi.y,0,1,zr),ze.x+=2*yi.x,ze.y+=2*yi.y,ze.vertexCount+=2,zr+=un,ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,0,zr),ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,1,zr),ze.x+=2*vn.x,ze.y+=2*vn.y,ze.vertexCount+=2;let Tn=ct.vertexLength;this.indexArray.emplaceBack(Tn,Tn+2,Tn+1),this.indexArray.emplaceBack(Tn+1,Tn+2,Tn+3),ct.vertexLength+=4,ct.primitiveLength+=2}}}}if(ct.vertexLength+Ke>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ct=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),Ja[A.type]!=="Polygon")continue;let Lt=[],$t=[],fr=ct.vertexLength;for(let Pr of pe)if(Pr.length!==0){Pr!==pe[0]&&$t.push(Lt.length/2);for(let zr=0;zrja)||R.y===A.y&&(R.y<0||R.y>ja)}function ms(R){return R.every(A=>A.x<0)||R.every(A=>A.x>ja)||R.every(A=>A.y<0)||R.every(A=>A.y>ja)}let ou;Fi("FillExtrusionBucket",so,{omit:["layers","features"]});var Cv={get paint(){return ou=ou||new ue({"fill-extrusion-opacity":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new oo(ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Vc(ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new oo(ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new oo(ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Lv extends B{constructor(A){super(A,Cv)}createBucket(A){return new so(A)}queryRadius(){return Hn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(A,F,W,re,fe,pe,ze,Ke){let ct=en(A,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),pe.angle,ze),Lt=this.paint.get("fill-extrusion-height").evaluate(F,W),$t=this.paint.get("fill-extrusion-base").evaluate(F,W),fr=function(Pr,zr,ui,yi){let vn=[];for(let zi of Pr){let un=[zi.x,zi.y,0,1];Bn(un,un,zr),vn.push(new u(un[0]/un[3],un[1]/un[3]))}return vn}(ct,Ke),mr=function(Pr,zr,ui,yi){let vn=[],zi=[],un=yi[8]*zr,Tn=yi[9]*zr,pa=yi[10]*zr,ro=yi[11]*zr,Vo=yi[8]*ui,Xa=yi[9]*ui,sa=yi[10]*ui,Mo=yi[11]*ui;for(let fo of Pr){let lo=[],Xn=[];for(let Ro of fo){let uo=Ro.x,$o=Ro.y,Ju=yi[0]*uo+yi[4]*$o+yi[12],qu=yi[1]*uo+yi[5]*$o+yi[13],Mh=yi[2]*uo+yi[6]*$o+yi[14],Qv=yi[3]*uo+yi[7]*$o+yi[15],ld=Mh+pa,Eh=Qv+ro,Gd=Ju+Vo,Hd=qu+Xa,jd=Mh+sa,Af=Qv+Mo,kh=new u((Ju+un)/Eh,(qu+Tn)/Eh);kh.z=ld/Eh,lo.push(kh);let Ed=new u(Gd/Af,Hd/Af);Ed.z=jd/Af,Xn.push(Ed)}vn.push(lo),zi.push(Xn)}return[vn,zi]}(re,$t,Lt,Ke);return function(Pr,zr,ui){let yi=1/0;bt(ui,zr)&&(yi=Kv(ui,zr[0]));for(let vn=0;vnF.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(F=>{this.gradients[F.id]={}}),this.layoutVertexArray=new Lu,this.layoutVertexArray2=new au,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=at("line",this.layers,F);let re=this.layers[0].layout.get("line-sort-key"),fe=!re.isConstant(),pe=[];for(let{feature:ze,id:Ke,index:ct,sourceLayerIndex:Lt}of A){let $t=this.layers[0]._featureFilter.needGeometry,fr=Sl(ze,$t);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),fr,W))continue;let mr=fe?re.evaluate(fr,{},W):void 0,Pr={id:Ke,properties:ze.properties,type:ze.type,sourceLayerIndex:Lt,index:ct,geometry:$t?fr.geometry:$s(ze),patterns:{},sortKey:mr};pe.push(Pr)}fe&&pe.sort((ze,Ke)=>ze.sortKey-Ke.sortKey);for(let ze of pe){let{geometry:Ke,index:ct,sourceLayerIndex:Lt}=ze;if(this.hasPattern){let $t=Ct("line",this.layers,ze,this.zoom,F);this.patternFeatures.push($t)}else this.addFeature(ze,Ke,ct,W,{});F.featureIndex.insert(A[ct].feature,Ke,ct,Lt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let re of this.patternFeatures)this.addFeature(re,re.geometry,re.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=A.createVertexBuffer(this.layoutVertexArray2,gp)),this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,pp),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(A){if(A.properties&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_end"))return{start:+A.properties.mapbox_clip_start,end:+A.properties.mapbox_clip_end}}addFeature(A,F,W,re,fe){let pe=this.layers[0].layout,ze=pe.get("line-join").evaluate(A,{}),Ke=pe.get("line-cap"),ct=pe.get("line-miter-limit"),Lt=pe.get("line-round-limit");this.lineClips=this.lineFeatureClips(A);for(let $t of F)this.addLine($t,A,ze,Ke,ct,Lt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,fe,re)}addLine(A,F,W,re,fe,pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let yi=0;yi=2&&A[Ke-1].equals(A[Ke-2]);)Ke--;let ct=0;for(;ct0;if(ro&&yi>ct){let Mo=fr.dist(mr);if(Mo>2*Lt){let fo=fr.sub(fr.sub(mr)._mult(Lt/Mo)._round());this.updateDistance(mr,fo),this.addCurrentVertex(fo,zr,0,0,$t),mr=fo}}let Xa=mr&&Pr,sa=Xa?W:ze?"butt":re;if(Xa&&sa==="round"&&(Tnfe&&(sa="bevel"),sa==="bevel"&&(Tn>2&&(sa="flipbevel"),Tn100)vn=ui.mult(-1);else{let Mo=Tn*zr.add(ui).mag()/zr.sub(ui).mag();vn._perp()._mult(Mo*(Vo?-1:1))}this.addCurrentVertex(fr,vn,0,0,$t),this.addCurrentVertex(fr,vn.mult(-1),0,0,$t)}else if(sa==="bevel"||sa==="fakeround"){let Mo=-Math.sqrt(Tn*Tn-1),fo=Vo?Mo:0,lo=Vo?0:Mo;if(mr&&this.addCurrentVertex(fr,zr,fo,lo,$t),sa==="fakeround"){let Xn=Math.round(180*pa/Math.PI/20);for(let Ro=1;Ro2*Lt){let fo=fr.add(Pr.sub(fr)._mult(Lt/Mo)._round());this.updateDistance(fr,fo),this.addCurrentVertex(fo,ui,0,0,$t),fr=fo}}}}addCurrentVertex(A,F,W,re,fe,pe=!1){let ze=F.y*re-F.x,Ke=-F.y-F.x*re;this.addHalfVertex(A,F.x+F.y*W,F.y-F.x*W,pe,!1,W,fe),this.addHalfVertex(A,ze,Ke,pe,!0,-re,fe),this.distance>Pv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(A,F,W,re,fe,pe))}addHalfVertex({x:A,y:F},W,re,fe,pe,ze,Ke){let ct=.5*(this.lineClips?this.scaledDistance*(Pv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((A<<1)+(fe?1:0),(F<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*re)+128,1+(ze===0?0:ze<0?-1:1)|(63&ct)<<2,ct>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Lt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Lt),Ke.primitiveLength++),pe?this.e2=Lt:this.e1=Lt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(A,F){this.distance+=A.dist(F),this.updateScaledDistance()}}let Iv,ay;Fi("LineBucket",Jv,{omit:["layers","patternFeatures"]});var fg={get paint(){return ay=ay||new ue({"line-opacity":new oo(ce.paint_line["line-opacity"]),"line-color":new oo(ce.paint_line["line-color"]),"line-translate":new Ua(ce.paint_line["line-translate"]),"line-translate-anchor":new Ua(ce.paint_line["line-translate-anchor"]),"line-width":new oo(ce.paint_line["line-width"]),"line-gap-width":new oo(ce.paint_line["line-gap-width"]),"line-offset":new oo(ce.paint_line["line-offset"]),"line-blur":new oo(ce.paint_line["line-blur"]),"line-dasharray":new hc(ce.paint_line["line-dasharray"]),"line-pattern":new Vc(ce.paint_line["line-pattern"]),"line-gradient":new Ku(ce.paint_line["line-gradient"])})},get layout(){return Iv=Iv||new ue({"line-cap":new Ua(ce.layout_line["line-cap"]),"line-join":new oo(ce.layout_line["line-join"]),"line-miter-limit":new Ua(ce.layout_line["line-miter-limit"]),"line-round-limit":new Ua(ce.layout_line["line-round-limit"]),"line-sort-key":new oo(ce.layout_line["line-sort-key"])})}};class oh extends oo{possiblyEvaluate(A,F){return F=new rs(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(A,F)}evaluate(A,F,W,re){return F=L({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(A,F,W,re)}}let hg;class oy extends B{constructor(A){super(A,fg),this.gradientVersion=0,hg||(hg=new oh(fg.paint.properties["line-width"].specification),hg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(A){if(A==="line-gradient"){let F=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(F)&&F._styleExpression.expression instanceof _n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(A,F){super.recalculate(A,F),this.paint._values["line-floorwidth"]=hg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,A)}createBucket(A){return new Jv(A)}queryRadius(A){let F=A,W=jh(Ei("line-width",this,F),Ei("line-gap-width",this,F)),re=Ei("line-offset",this,F);return W/2+Math.abs(re)+Hn(this.paint.get("line-translate"))}queryIntersectsFeature(A,F,W,re,fe,pe,ze){let Ke=en(A,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),pe.angle,ze),ct=ze/2*jh(this.paint.get("line-width").evaluate(F,W),this.paint.get("line-gap-width").evaluate(F,W)),Lt=this.paint.get("line-offset").evaluate(F,W);return Lt&&(re=function($t,fr){let mr=[];for(let Pr=0;Pr<$t.length;Pr++){let zr=$t[Pr],ui=[];for(let yi=0;yi=3){for(let ui=0;ui0?A+2*R:R}let im=qe([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),b1=qe([{name:"a_projected_pos",components:3,type:"Float32"}],4);qe([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let w1=qe([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);qe([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let sy=qe([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nm=qe([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function am(R,A,F){return R.sections.forEach(W=>{W.text=function(re,fe,pe){let ze=fe.layout.get("text-transform").evaluate(pe,{});return ze==="uppercase"?re=re.toLocaleUpperCase():ze==="lowercase"&&(re=re.toLocaleLowerCase()),ys.applyArabicShaping&&(re=ys.applyArabicShaping(re)),re}(W.text,A,F)}),R}qe([{name:"triangle",components:3,type:"Uint16"}]),qe([{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"}]),qe([{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"}]),qe([{type:"Float32",name:"offsetX"}]),qe([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),qe([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let vc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var eu=24,Sd=wu,ly=function(R,A,F,W,re){var fe,pe,ze=8*re-W-1,Ke=(1<>1,Lt=-7,$t=F?re-1:0,fr=F?-1:1,mr=R[A+$t];for($t+=fr,fe=mr&(1<<-Lt)-1,mr>>=-Lt,Lt+=ze;Lt>0;fe=256*fe+R[A+$t],$t+=fr,Lt-=8);for(pe=fe&(1<<-Lt)-1,fe>>=-Lt,Lt+=W;Lt>0;pe=256*pe+R[A+$t],$t+=fr,Lt-=8);if(fe===0)fe=1-ct;else{if(fe===Ke)return pe?NaN:1/0*(mr?-1:1);pe+=Math.pow(2,W),fe-=ct}return(mr?-1:1)*pe*Math.pow(2,fe-W)},T1=function(R,A,F,W,re,fe){var pe,ze,Ke,ct=8*fe-re-1,Lt=(1<>1,fr=re===23?Math.pow(2,-24)-Math.pow(2,-77):0,mr=W?0:fe-1,Pr=W?1:-1,zr=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(ze=isNaN(A)?1:0,pe=Lt):(pe=Math.floor(Math.log(A)/Math.LN2),A*(Ke=Math.pow(2,-pe))<1&&(pe--,Ke*=2),(A+=pe+$t>=1?fr/Ke:fr*Math.pow(2,1-$t))*Ke>=2&&(pe++,Ke/=2),pe+$t>=Lt?(ze=0,pe=Lt):pe+$t>=1?(ze=(A*Ke-1)*Math.pow(2,re),pe+=$t):(ze=A*Math.pow(2,$t-1)*Math.pow(2,re),pe=0));re>=8;R[F+mr]=255&ze,mr+=Pr,ze/=256,re-=8);for(pe=pe<0;R[F+mr]=255&pe,mr+=Pr,pe/=256,ct-=8);R[F+mr-Pr]|=128*zr};function wu(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}wu.Varint=0,wu.Fixed64=1,wu.Bytes=2,wu.Fixed32=5;var Nx=4294967296,om=1/Nx,kw=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Rv(R){return R.type===wu.Bytes?R.readVarint()+R.pos:R.pos+1}function sm(R,A,F){return F?4294967296*A+(R>>>0):4294967296*(A>>>0)+(R>>>0)}function Cw(R,A,F){var W=A<=16383?1:A<=2097151?2:A<=268435455?3:Math.floor(Math.log(A)/(7*Math.LN2));F.realloc(W);for(var re=F.pos-1;re>=R;re--)F.buf[re+W]=F.buf[re]}function Ux(R,A){for(var F=0;F>>8,R[F+2]=A>>>16,R[F+3]=A>>>24}function mC(R,A){return(R[A]|R[A+1]<<8|R[A+2]<<16)+(R[A+3]<<24)}wu.prototype={destroy:function(){this.buf=null},readFields:function(R,A,F){for(F=F||this.length;this.pos>3,fe=this.pos;this.type=7&W,R(re,A,this),this.pos===fe&&this.skip(W)}return A},readMessage:function(R,A){return this.readFields(R,A,this.readVarint()+this.pos)},readFixed32:function(){var R=uy(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=mC(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=uy(this.buf,this.pos)+uy(this.buf,this.pos+4)*Nx;return this.pos+=8,R},readSFixed64:function(){var R=uy(this.buf,this.pos)+mC(this.buf,this.pos+4)*Nx;return this.pos+=8,R},readFloat:function(){var R=ly(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=ly(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var A,F,W=this.buf;return A=127&(F=W[this.pos++]),F<128?A:(A|=(127&(F=W[this.pos++]))<<7,F<128?A:(A|=(127&(F=W[this.pos++]))<<14,F<128?A:(A|=(127&(F=W[this.pos++]))<<21,F<128?A:function(re,fe,pe){var ze,Ke,ct=pe.buf;if(ze=(112&(Ke=ct[pe.pos++]))>>4,Ke<128||(ze|=(127&(Ke=ct[pe.pos++]))<<3,Ke<128)||(ze|=(127&(Ke=ct[pe.pos++]))<<10,Ke<128)||(ze|=(127&(Ke=ct[pe.pos++]))<<17,Ke<128)||(ze|=(127&(Ke=ct[pe.pos++]))<<24,Ke<128)||(ze|=(1&(Ke=ct[pe.pos++]))<<31,Ke<128))return sm(re,ze,fe);throw new Error("Expected varint not more than 10 bytes")}(A|=(15&(F=W[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,A=this.pos;return this.pos=R,R-A>=12&&kw?function(F,W,re){return kw.decode(F.subarray(W,re))}(this.buf,A,R):function(F,W,re){for(var fe="",pe=W;pe239?4:Lt>223?3:Lt>191?2:1;if(pe+fr>re)break;fr===1?Lt<128&&($t=Lt):fr===2?(192&(ze=F[pe+1]))==128&&($t=(31&Lt)<<6|63&ze)<=127&&($t=null):fr===3?(Ke=F[pe+2],(192&(ze=F[pe+1]))==128&&(192&Ke)==128&&(($t=(15&Lt)<<12|(63&ze)<<6|63&Ke)<=2047||$t>=55296&&$t<=57343)&&($t=null)):fr===4&&(Ke=F[pe+2],ct=F[pe+3],(192&(ze=F[pe+1]))==128&&(192&Ke)==128&&(192&ct)==128&&(($t=(15&Lt)<<18|(63&ze)<<12|(63&Ke)<<6|63&ct)<=65535||$t>=1114112)&&($t=null)),$t===null?($t=65533,fr=1):$t>65535&&($t-=65536,fe+=String.fromCharCode($t>>>10&1023|55296),$t=56320|1023&$t),fe+=String.fromCharCode($t),pe+=fr}return fe}(this.buf,A,R)},readBytes:function(){var R=this.readVarint()+this.pos,A=this.buf.subarray(this.pos,R);return this.pos=R,A},readPackedVarint:function(R,A){if(this.type!==wu.Bytes)return R.push(this.readVarint(A));var F=Rv(this);for(R=R||[];this.pos127;);else if(A===wu.Bytes)this.pos=this.readVarint()+this.pos;else if(A===wu.Fixed32)this.pos+=4;else{if(A!==wu.Fixed64)throw new Error("Unimplemented type: "+A);this.pos+=8}},writeTag:function(R,A){this.writeVarint(R<<3|A)},realloc:function(R){for(var A=this.length||16;A268435455||R<0?function(A,F){var W,re;if(A>=0?(W=A%4294967296|0,re=A/4294967296|0):(re=~(-A/4294967296),4294967295^(W=~(-A%4294967296))?W=W+1|0:(W=0,re=re+1|0)),A>=18446744073709552e3||A<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");F.realloc(10),function(fe,pe,ze){ze.buf[ze.pos++]=127&fe|128,fe>>>=7,ze.buf[ze.pos++]=127&fe|128,fe>>>=7,ze.buf[ze.pos++]=127&fe|128,fe>>>=7,ze.buf[ze.pos++]=127&fe|128,ze.buf[ze.pos]=127&(fe>>>=7)}(W,0,F),function(fe,pe){var ze=(7&fe)<<4;pe.buf[pe.pos++]|=ze|((fe>>>=3)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe)))))}(re,F)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var A=this.pos;this.pos=function(W,re,fe){for(var pe,ze,Ke=0;Ke55295&&pe<57344){if(!ze){pe>56319||Ke+1===re.length?(W[fe++]=239,W[fe++]=191,W[fe++]=189):ze=pe;continue}if(pe<56320){W[fe++]=239,W[fe++]=191,W[fe++]=189,ze=pe;continue}pe=ze-55296<<10|pe-56320|65536,ze=null}else ze&&(W[fe++]=239,W[fe++]=191,W[fe++]=189,ze=null);pe<128?W[fe++]=pe:(pe<2048?W[fe++]=pe>>6|192:(pe<65536?W[fe++]=pe>>12|224:(W[fe++]=pe>>18|240,W[fe++]=pe>>12&63|128),W[fe++]=pe>>6&63|128),W[fe++]=63&pe|128)}return fe}(this.buf,R,this.pos);var F=this.pos-A;F>=128&&Cw(A,F,this),this.pos=A-1,this.writeVarint(F),this.pos+=F},writeFloat:function(R){this.realloc(4),T1(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),T1(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var A=R.length;this.writeVarint(A),this.realloc(A);for(var F=0;F=128&&Cw(F,W,this),this.pos=F-1,this.writeVarint(W),this.pos+=W},writeMessage:function(R,A,F){this.writeTag(R,wu.Bytes),this.writeRawMessage(A,F)},writePackedVarint:function(R,A){A.length&&this.writeMessage(R,Ux,A)},writePackedSVarint:function(R,A){A.length&&this.writeMessage(R,q9,A)},writePackedBoolean:function(R,A){A.length&&this.writeMessage(R,U9,A)},writePackedFloat:function(R,A){A.length&&this.writeMessage(R,B9,A)},writePackedDouble:function(R,A){A.length&&this.writeMessage(R,N9,A)},writePackedFixed32:function(R,A){A.length&&this.writeMessage(R,LQ,A)},writePackedSFixed32:function(R,A){A.length&&this.writeMessage(R,V9,A)},writePackedFixed64:function(R,A){A.length&&this.writeMessage(R,G9,A)},writePackedSFixed64:function(R,A){A.length&&this.writeMessage(R,H9,A)},writeBytesField:function(R,A){this.writeTag(R,wu.Bytes),this.writeBytes(A)},writeFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFixed32(A)},writeSFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeSFixed32(A)},writeFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeFixed64(A)},writeSFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeSFixed64(A)},writeVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeVarint(A)},writeSVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeSVarint(A)},writeStringField:function(R,A){this.writeTag(R,wu.Bytes),this.writeString(A)},writeFloatField:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFloat(A)},writeDoubleField:function(R,A){this.writeTag(R,wu.Fixed64),this.writeDouble(A)},writeBooleanField:function(R,A){this.writeVarintField(R,!!A)}};var nS=o(Sd);let aS=3;function PQ(R,A,F){R===1&&F.readMessage(j9,A)}function j9(R,A,F){if(R===3){let{id:W,bitmap:re,width:fe,height:pe,left:ze,top:Ke,advance:ct}=F.readMessage(yC,{});A.push({id:W,bitmap:new na({width:fe+2*aS,height:pe+2*aS},re),metrics:{width:fe,height:pe,left:ze,top:Ke,advance:ct}})}}function yC(R,A,F){R===1?A.id=F.readVarint():R===2?A.bitmap=F.readBytes():R===3?A.width=F.readVarint():R===4?A.height=F.readVarint():R===5?A.left=F.readSVarint():R===6?A.top=F.readSVarint():R===7&&(A.advance=F.readVarint())}let _C=aS;function oS(R){let A=0,F=0;for(let pe of R)A+=pe.w*pe.h,F=Math.max(F,pe.w);R.sort((pe,ze)=>ze.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(A/.95)),F),h:1/0}],re=0,fe=0;for(let pe of R)for(let ze=W.length-1;ze>=0;ze--){let Ke=W[ze];if(!(pe.w>Ke.w||pe.h>Ke.h)){if(pe.x=Ke.x,pe.y=Ke.y,fe=Math.max(fe,pe.y+pe.h),re=Math.max(re,pe.x+pe.w),pe.w===Ke.w&&pe.h===Ke.h){let ct=W.pop();ze=0&&W>=A&&Iw[this.text.charCodeAt(W)];W--)F--;this.text=this.text.substring(A,F),this.sectionIndex=this.sectionIndex.slice(A,F)}substring(A,F){let W=new A1;return W.text=this.text.substring(A,F),W.sectionIndex=this.sectionIndex.slice(A,F),W.sections=this.sections,W}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((A,F)=>Math.max(A,this.sections[F].scale),0)}addTextSection(A,F){this.text+=A.text,this.sections.push(Gx.forText(A.scale,A.fontStack||F));let W=this.sections.length-1;for(let re=0;re=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Hx(R,A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr){let zr=A1.fromFeature(R,re),ui;$t===i.ah.vertical&&zr.verticalizePunctuation();let{processBidirectionalText:yi,processStyledBidirectionalText:vn}=ys;if(yi&&zr.sections.length===1){ui=[];let Tn=yi(zr.toString(),S1(zr,ct,fe,A,W,mr));for(let pa of Tn){let ro=new A1;ro.text=pa,ro.sections=zr.sections;for(let Vo=0;Vo0&&tp>Df&&(Df=tp)}else{let Gc=ro[tu.fontStack],Zf=Gc&&Gc[$u];if(Zf&&Zf.rect)P1=Zf.rect,ff=Zf.metrics;else{let tp=pa[tu.fontStack],gg=tp&&tp[$u];if(!gg)continue;ff=gg.metrics}zv=(kh-tu.scale)*eu}ep?(Tn.verticalizable=!0,Wh.push({glyph:$u,imageName:v0,x:$o,y:Ju+zv,vertical:ep,scale:tu.scale,fontStack:tu.fontStack,sectionIndex:pc,metrics:ff,rect:P1}),$o+=Gp*tu.scale+Xn):(Wh.push({glyph:$u,imageName:v0,x:$o,y:Ju+zv,vertical:ep,scale:tu.scale,fontStack:tu.fontStack,sectionIndex:pc,metrics:ff,rect:P1}),$o+=ff.advance*tu.scale+Xn)}Wh.length!==0&&(qu=Math.max($o-Xn,qu),lm(Wh,0,Wh.length-1,Qv,Df)),$o=0;let Fv=sa*kh+Df;ud.lineOffset=Math.max(Df,Ed),Ju+=Fv,Mh=Math.max(Fv,Mh),++ld}var Eh;let Gd=Ju-Sh,{horizontalAlign:Hd,verticalAlign:jd}=Dw(Mo);(function(Af,kh,Ed,ud,Wh,Df,Fv,lv,tu){let pc=(kh-Ed)*Wh,$u=0;$u=Df!==Fv?-lv*ud-Sh:(-ud*tu+.5)*Fv;for(let zv of Af)for(let ff of zv.positionedGlyphs)ff.x+=pc,ff.y+=$u})(Tn.positionedLines,Qv,Hd,jd,qu,Mh,sa,Gd,Xa.length),Tn.top+=-jd*Gd,Tn.bottom=Tn.top+Gd,Tn.left+=-Hd*qu,Tn.right=Tn.left+qu}(un,A,F,W,ui,pe,ze,Ke,$t,ct,fr,Pr),!function(Tn){for(let pa of Tn)if(pa.positionedGlyphs.length!==0)return!1;return!0}(zi)&&un}let Iw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},W9={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},X9={40:!0};function xC(R,A,F,W,re,fe){if(A.imageName){let pe=W[A.imageName];return pe?pe.displaySize[0]*A.scale*eu/fe+re:0}{let pe=F[A.fontStack],ze=pe&&pe[R];return ze?ze.metrics.advance*A.scale+re:0}}function bC(R,A,F,W){let re=Math.pow(R-A,2);return W?R=0,ct=0;for(let $t=0;$tct){let Lt=Math.ceil(fe/ct);re*=Lt/pe,pe=Lt}return{x1:W,y1:re,x2:W+fe,y2:re+pe}}function AC(R,A,F,W,re,fe){let pe=R.image,ze;if(pe.content){let ui=pe.content,yi=pe.pixelRatio||1;ze=[ui[0]/yi,ui[1]/yi,pe.displaySize[0]-ui[2]/yi,pe.displaySize[1]-ui[3]/yi]}let Ke=A.left*fe,ct=A.right*fe,Lt,$t,fr,mr;F==="width"||F==="both"?(mr=re[0]+Ke-W[3],$t=re[0]+ct+W[1]):(mr=re[0]+(Ke+ct-pe.displaySize[0])/2,$t=mr+pe.displaySize[0]);let Pr=A.top*fe,zr=A.bottom*fe;return F==="height"||F==="both"?(Lt=re[1]+Pr-W[0],fr=re[1]+zr+W[2]):(Lt=re[1]+(Pr+zr-pe.displaySize[1])/2,fr=Lt+pe.displaySize[1]),{image:pe,top:Lt,right:$t,bottom:fr,left:mr,collisionPadding:ze}}let Wx=255,d0=128,um=Wx*d0;function SC(R,A){let{expression:F}=A;if(F.kind==="constant")return{kind:"constant",layoutSize:F.evaluate(new rs(R+1))};if(F.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:re}=F,fe=0;for(;fepe.id),this.index=A.index,this.pixelRatio=A.pixelRatio,this.sourceLayerIndex=A.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ri([]),this.placementViewportMatrix=Ri([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=SC(this.zoom,F["text-size"]),this.iconSizeData=SC(this.zoom,F["icon-size"]);let W=this.layers[0].layout,re=W.get("symbol-sort-key"),fe=W.get("symbol-z-order");this.canOverlap=sS(W,"text-overlap","text-allow-overlap")!=="never"||sS(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=fe!=="viewport-y"&&!re.isConstant(),this.sortFeaturesByY=(fe==="viewport-y"||fe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(pe=>i.ah[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=A.sourceID}createArrays(){this.text=new cS(new Ms(this.layers,this.zoom,A=>/^text/.test(A))),this.icon=new cS(new Ms(this.layers,this.zoom,A=>/^icon/.test(A))),this.glyphOffsetArray=new Co,this.lineVertexArray=new Qa,this.symbolInstances=new $a,this.textAnchorOffsets=new Bo}calculateGlyphDependencies(A,F,W,re,fe){for(let pe=0;pe0)&&(pe.value.kind!=="constant"||pe.value.value.length>0),Lt=Ke.value.kind!=="constant"||!!Ke.value.value||Object.keys(Ke.parameters).length>0,$t=fe.get("symbol-sort-key");if(this.features=[],!ct&&!Lt)return;let fr=F.iconDependencies,mr=F.glyphDependencies,Pr=F.availableImages,zr=new rs(this.zoom);for(let{feature:ui,id:yi,index:vn,sourceLayerIndex:zi}of A){let un=re._featureFilter.needGeometry,Tn=Sl(ui,un);if(!re._featureFilter.filter(zr,Tn,W))continue;let pa,ro;if(un||(Tn.geometry=$s(ui)),ct){let Xa=re.getValueAndResolveTokens("text-field",Tn,W,Pr),sa=ri.factory(Xa),Mo=this.hasRTLText=this.hasRTLText||uS(sa);(!Mo||ys.getRTLTextPluginStatus()==="unavailable"||Mo&&ys.isParsed())&&(pa=am(sa,re,Tn))}if(Lt){let Xa=re.getValueAndResolveTokens("icon-image",Tn,W,Pr);ro=Xa instanceof tn?Xa:tn.fromString(Xa)}if(!pa&&!ro)continue;let Vo=this.sortFeaturesByKey?$t.evaluate(Tn,{},W):void 0;if(this.features.push({id:yi,text:pa,icon:ro,index:vn,sourceLayerIndex:zi,geometry:Tn.geometry,properties:ui.properties,type:Y9[ui.type],sortKey:Vo}),ro&&(fr[ro.name]=!0),pa){let Xa=pe.evaluate(Tn,{},W).join(","),sa=fe.get("text-rotation-alignment")!=="viewport"&&fe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let Mo of pa.sections)if(Mo.image)fr[Mo.image.name]=!0;else{let fo=Ka(pa.toString()),lo=Mo.fontStack||Xa,Xn=mr[lo]=mr[lo]||{};this.calculateGlyphDependencies(Mo.text,Xn,sa,this.allowVerticalPlacement,fo)}}}fe.get("symbol-placement")==="line"&&(this.features=function(ui){let yi={},vn={},zi=[],un=0;function Tn(Xa){zi.push(ui[Xa]),un++}function pa(Xa,sa,Mo){let fo=vn[Xa];return delete vn[Xa],vn[sa]=fo,zi[fo].geometry[0].pop(),zi[fo].geometry[0]=zi[fo].geometry[0].concat(Mo[0]),fo}function ro(Xa,sa,Mo){let fo=yi[sa];return delete yi[sa],yi[Xa]=fo,zi[fo].geometry[0].shift(),zi[fo].geometry[0]=Mo[0].concat(zi[fo].geometry[0]),fo}function Vo(Xa,sa,Mo){let fo=Mo?sa[0][sa[0].length-1]:sa[0][0];return`${Xa}:${fo.x}:${fo.y}`}for(let Xa=0;XaXa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ui,yi)=>ui.sortKey-yi.sortKey)}update(A,F,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(A,F,this.layers,W),this.icon.programConfigurations.updatePaintArrays(A,F,this.layers,W))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(A){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(A),this.iconCollisionBox.upload(A)),this.text.upload(A,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(A,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(A,F){let W=this.lineVertexArray.length;if(A.segment!==void 0){let re=A.dist(F[A.segment+1]),fe=A.dist(F[A.segment]),pe={};for(let ze=A.segment+1;ze=0;ze--)pe[ze]={x:F[ze].x,y:F[ze].y,tileUnitDistanceFromAnchor:fe},ze>0&&(fe+=F[ze-1].dist(F[ze]));for(let ze=0;ze0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(A,F){let W=A.placedSymbolArray.get(F),re=W.vertexStartIndex+4*W.numGlyphs;for(let fe=W.vertexStartIndex;fere[ze]-re[Ke]||fe[Ke]-fe[ze]),pe}addToSortKeyRanges(A,F){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W&&W.sortKey===F?W.symbolInstanceEnd=A+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:A,symbolInstanceEnd:A+1})}sortFeatures(A){if(this.sortFeaturesByY&&this.sortedAngle!==A&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(A),this.sortedAngle=A,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let W=this.symbolInstances.get(F);this.featureSortOrder.push(W.featureIndex),[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex].forEach((re,fe,pe)=>{re>=0&&pe.indexOf(re)===fe&&this.addIndicesForPlacedSymbol(this.text,re)}),W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Tf,Xx;Fi("SymbolBucket",M1,{omit:["layers","collisionBoxArray","features","compareText"]}),M1.MAX_GLYPHS=65535,M1.addDynamicAttributes=lS;var zw={get paint(){return Xx=Xx||new ue({"icon-opacity":new oo(ce.paint_symbol["icon-opacity"]),"icon-color":new oo(ce.paint_symbol["icon-color"]),"icon-halo-color":new oo(ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new oo(ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oo(ce.paint_symbol["icon-halo-blur"]),"icon-translate":new Ua(ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ua(ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new oo(ce.paint_symbol["text-opacity"]),"text-color":new oo(ce.paint_symbol["text-color"],{runtimeType:er,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new oo(ce.paint_symbol["text-halo-color"]),"text-halo-width":new oo(ce.paint_symbol["text-halo-width"]),"text-halo-blur":new oo(ce.paint_symbol["text-halo-blur"]),"text-translate":new Ua(ce.paint_symbol["text-translate"]),"text-translate-anchor":new Ua(ce.paint_symbol["text-translate-anchor"])})},get layout(){return Tf=Tf||new ue({"symbol-placement":new Ua(ce.layout_symbol["symbol-placement"]),"symbol-spacing":new Ua(ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ua(ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oo(ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ua(ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ua(ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ua(ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ua(ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ua(ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ua(ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new oo(ce.layout_symbol["icon-size"]),"icon-text-fit":new Ua(ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ua(ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new oo(ce.layout_symbol["icon-image"]),"icon-rotate":new oo(ce.layout_symbol["icon-rotate"]),"icon-padding":new oo(ce.layout_symbol["icon-padding"]),"icon-keep-upright":new Ua(ce.layout_symbol["icon-keep-upright"]),"icon-offset":new oo(ce.layout_symbol["icon-offset"]),"icon-anchor":new oo(ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ua(ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ua(ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ua(ce.layout_symbol["text-rotation-alignment"]),"text-field":new oo(ce.layout_symbol["text-field"]),"text-font":new oo(ce.layout_symbol["text-font"]),"text-size":new oo(ce.layout_symbol["text-size"]),"text-max-width":new oo(ce.layout_symbol["text-max-width"]),"text-line-height":new Ua(ce.layout_symbol["text-line-height"]),"text-letter-spacing":new oo(ce.layout_symbol["text-letter-spacing"]),"text-justify":new oo(ce.layout_symbol["text-justify"]),"text-radial-offset":new oo(ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ua(ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new oo(ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new oo(ce.layout_symbol["text-anchor"]),"text-max-angle":new Ua(ce.layout_symbol["text-max-angle"]),"text-writing-mode":new Ua(ce.layout_symbol["text-writing-mode"]),"text-rotate":new oo(ce.layout_symbol["text-rotate"]),"text-padding":new Ua(ce.layout_symbol["text-padding"]),"text-keep-upright":new Ua(ce.layout_symbol["text-keep-upright"]),"text-transform":new oo(ce.layout_symbol["text-transform"]),"text-offset":new oo(ce.layout_symbol["text-offset"]),"text-allow-overlap":new Ua(ce.layout_symbol["text-allow-overlap"]),"text-overlap":new Ua(ce.layout_symbol["text-overlap"]),"text-ignore-placement":new Ua(ce.layout_symbol["text-ignore-placement"]),"text-optional":new Ua(ce.layout_symbol["text-optional"])})}};class Zx{constructor(A){if(A.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=A.property.overrides?A.property.overrides.runtimeType:Vt,this.defaultValue=A}evaluate(A){if(A.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(A.formattedSection))return F.getOverride(A.formattedSection)}return A.feature&&A.featureState?this.defaultValue.evaluate(A.feature,A.featureState):this.defaultValue.property.specification.default}eachChild(A){this.defaultValue.isConstant()||A(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Fi("FormatSectionOverride",Zx,{omit:["defaultValue"]});class cy extends B{constructor(A){super(A,zw)}recalculate(A,F){if(super.recalculate(A,F),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let re=[];for(let fe of W)re.indexOf(fe)<0&&re.push(fe);this.layout._values["text-writing-mode"]=re}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(A,F,W,re){let fe=this.layout.get(A).evaluate(F,{},W,re),pe=this._unevaluatedLayout._values[A];return pe.isDataDriven()||Dc(pe.value)||!fe?fe:function(ze,Ke){return Ke.replace(/{([^{}]+)}/g,(ct,Lt)=>ze&&Lt in ze?String(ze[Lt]):"")}(F.properties,fe)}createBucket(A){return new M1(A)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let A of zw.paint.overridableProperties){if(!cy.hasPaintOverride(this.layout,A))continue;let F=this.paint.get(A),W=new Zx(F),re=new Eu(W,F.property.specification),fe=null;fe=F.value.kind==="constant"||F.value.kind==="source"?new bc("source",re):new hu("composite",re,F.value.zoomStops),this.paint._values[A]=new xu(F.property,fe,F.parameters)}}_handleOverridablePaintPropertyUpdate(A,F,W){return!(!this.layout||F.isDataDriven()||W.isDataDriven())&&cy.hasPaintOverride(this.layout,A)}static hasPaintOverride(A,F){let W=A.get("text-field"),re=zw.paint.properties[F],fe=!1,pe=ze=>{for(let Ke of ze)if(re.overrides&&re.overrides.hasOverride(Ke))return void(fe=!0)};if(W.value.kind==="constant"&&W.value.value instanceof ri)pe(W.value.value.sections);else if(W.value.kind==="source"){let ze=ct=>{fe||(ct instanceof ua&&Sn(ct.value)===ti?pe(ct.value.sections):ct instanceof Zl?pe(ct.sections):ct.eachChild(ze))},Ke=W.value;Ke._styleExpression&&ze(Ke._styleExpression.expression)}return fe}}let MC;var Yx={get paint(){return MC=MC||new ue({"background-color":new Ua(ce.paint_background["background-color"]),"background-pattern":new hc(ce.paint_background["background-pattern"]),"background-opacity":new Ua(ce.paint_background["background-opacity"])})}};class J9 extends B{constructor(A){super(A,Yx)}}let fS;var EC={get paint(){return fS=fS||new ue({"raster-opacity":new Ua(ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ua(ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ua(ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ua(ce.paint_raster["raster-brightness-max"]),"raster-saturation":new Ua(ce.paint_raster["raster-saturation"]),"raster-contrast":new Ua(ce.paint_raster["raster-contrast"]),"raster-resampling":new Ua(ce.paint_raster["raster-resampling"]),"raster-fade-duration":new Ua(ce.paint_raster["raster-fade-duration"])})}};class Kx extends B{constructor(A){super(A,EC)}}class hS extends B{constructor(A){super(A,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=A}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class dS{constructor(A){this._methodToThrottle=A,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let vS=63710088e-1;class dg{constructor(A,F){if(isNaN(A)||isNaN(F))throw new Error(`Invalid LngLat object: (${A}, ${F})`);if(this.lng=+A,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dg(S(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(A){let F=Math.PI/180,W=this.lat*F,re=A.lat*F,fe=Math.sin(W)*Math.sin(re)+Math.cos(W)*Math.cos(re)*Math.cos((A.lng-this.lng)*F);return vS*Math.acos(Math.min(fe,1))}static convert(A){if(A instanceof dg)return A;if(Array.isArray(A)&&(A.length===2||A.length===3))return new dg(Number(A[0]),Number(A[1]));if(!Array.isArray(A)&&typeof A=="object"&&A!==null)return new dg(Number("lng"in A?A.lng:A.lon),Number(A.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let E1=2*Math.PI*vS;function kC(R){return E1*Math.cos(R*Math.PI/180)}function Ow(R){return(180+R)/360}function CC(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function qw(R,A){return R/kC(A)}function Jx(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}class $x{constructor(A,F,W=0){this.x=+A,this.y=+F,this.z=+W}static fromLngLat(A,F=0){let W=dg.convert(A);return new $x(Ow(W.lng),CC(W.lat),qw(F,W.lat))}toLngLat(){return new dg(360*this.x-180,Jx(this.y))}toAltitude(){return this.z*kC(Jx(this.y))}meterInMercatorCoordinateUnits(){return 1/E1*(A=Jx(this.y),1/Math.cos(A*Math.PI/180));var A}}function mp(R,A,F){var W=2*Math.PI*6378137/256/Math.pow(2,F);return[R*W-2*Math.PI*6378137/2,A*W-2*Math.PI*6378137/2]}class pS{constructor(A,F,W){if(!function(re,fe,pe){return!(re<0||re>25||pe<0||pe>=Math.pow(2,re)||fe<0||fe>=Math.pow(2,re))}(A,F,W))throw new Error(`x=${F}, y=${W}, z=${A} outside of bounds. 0<=x<${Math.pow(2,A)}, 0<=y<${Math.pow(2,A)} 0<=z<=25 `);this.z=A,this.x=F,this.y=W,this.key=Qx(0,A,A,F,W)}equals(A){return this.z===A.z&&this.x===A.x&&this.y===A.y}url(A,F,W){let re=(pe=this.y,ze=this.z,Ke=mp(256*(fe=this.x),256*(pe=Math.pow(2,ze)-pe-1),ze),ct=mp(256*(fe+1),256*(pe+1),ze),Ke[0]+","+Ke[1]+","+ct[0]+","+ct[1]);var fe,pe,ze,Ke,ct;let Lt=function($t,fr,mr){let Pr,zr="";for(let ui=$t;ui>0;ui--)Pr=1<1?"@2x":"").replace(/{quadkey}/g,Lt).replace(/{bbox-epsg-3857}/g,re)}isChildOf(A){let F=this.z-A.z;return F>0&&A.x===this.x>>F&&A.y===this.y>>F}getTilePoint(A){let F=Math.pow(2,this.z);return new u((A.x*F-this.x)*ja,(A.y*F-this.y)*ja)}toString(){return`${this.z}/${this.x}/${this.y}`}}class LC{constructor(A,F){this.wrap=A,this.canonical=F,this.key=Qx(A,F.z,F.z,F.x,F.y)}}class $v{constructor(A,F,W,re,fe){if(A= z; overscaledZ = ${A}; z = ${W}`);this.overscaledZ=A,this.wrap=F,this.canonical=new pS(W,+re,+fe),this.key=Qx(F,A,W,re,fe)}clone(){return new $v(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(A){return this.overscaledZ===A.overscaledZ&&this.wrap===A.wrap&&this.canonical.equals(A.canonical)}scaledTo(A){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-A;return A>this.canonical.z?new $v(A,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $v(A,this.wrap,A,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(A,F){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-A;return A>this.canonical.z?Qx(this.wrap*+F,A,this.canonical.z,this.canonical.x,this.canonical.y):Qx(this.wrap*+F,A,A,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(A){if(A.wrap!==this.wrap)return!1;let F=this.canonical.z-A.canonical.z;return A.overscaledZ===0||A.overscaledZ>F&&A.canonical.y===this.canonical.y>>F}children(A){if(this.overscaledZ>=A)return[new $v(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,W=2*this.canonical.x,re=2*this.canonical.y;return[new $v(F,this.wrap,F,W,re),new $v(F,this.wrap,F,W+1,re),new $v(F,this.wrap,F,W,re+1),new $v(F,this.wrap,F,W+1,re+1)]}isLessThan(A){return this.wrapA.wrap)&&(this.overscaledZA.overscaledZ)&&(this.canonical.xA.canonical.x)&&this.canonical.ythis.max&&(this.max=$t),$t=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(A+1)}unpack(A,F,W){return A*this.redFactor+F*this.greenFactor+W*this.blueFactor-this.baseShift}getPixels(){return new Ki({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(A,F,W){if(this.dim!==A.dim)throw new Error("dem dimension mismatch");let re=F*this.dim,fe=F*this.dim+this.dim,pe=W*this.dim,ze=W*this.dim+this.dim;switch(F){case-1:re=fe-1;break;case 1:fe=re+1}switch(W){case-1:pe=ze-1;break;case 1:ze=pe+1}let Ke=-F*this.dim,ct=-W*this.dim;for(let Lt=pe;Lt=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${A} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[A]}}class gS{constructor(A,F,W,re,fe){this.type="Feature",this._vectorTileFeature=A,A._z=F,A._x=W,A._y=re,this.properties=A.properties,this.id=fe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(A){this._geometry=A}toJSON(){let A={geometry:this.geometry};for(let F in this)F!=="_geometry"&&F!=="_vectorTileFeature"&&(A[F]=this[F]);return A}}class fy{constructor(A,F){this.tileID=A,this.x=A.canonical.x,this.y=A.canonical.y,this.z=A.canonical.z,this.grid=new Qi(ja,16,0),this.grid3D=new Qi(ja,16,0),this.featureIndexArray=new Ts,this.promoteId=F}insert(A,F,W,re,fe,pe){let ze=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(W,re,fe);let Ke=pe?this.grid3D:this.grid;for(let ct=0;ct=0&&$t[3]>=0&&Ke.insert(ze,$t[0],$t[1],$t[2],$t[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new br.VectorTile(new nS(this.rawTileData)).layers,this.sourceLayerCoder=new IC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(A,F,W,re){this.loadVTLayers();let fe=A.params||{},pe=ja/A.tileSize/A.scale,ze=Fc(fe.filter),Ke=A.queryGeometry,ct=A.queryPadding*pe,Lt=DC(Ke),$t=this.grid.query(Lt.minX-ct,Lt.minY-ct,Lt.maxX+ct,Lt.maxY+ct),fr=DC(A.cameraQueryGeometry),mr=this.grid3D.query(fr.minX-ct,fr.minY-ct,fr.maxX+ct,fr.maxY+ct,(ui,yi,vn,zi)=>function(un,Tn,pa,ro,Vo){for(let sa of un)if(Tn<=sa.x&&pa<=sa.y&&ro>=sa.x&&Vo>=sa.y)return!0;let Xa=[new u(Tn,pa),new u(Tn,Vo),new u(ro,Vo),new u(ro,pa)];if(un.length>2){for(let sa of Xa)if(Ui(un,sa))return!0}for(let sa=0;sa(zi||(zi=$s(un)),Tn.queryIntersectsFeature(Ke,un,pa,zi,this.z,A.transform,pe,A.pixelPosMatrix)))}return Pr}loadMatchingFeature(A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t){let fr=this.bucketLayerIDs[F];if(pe&&!function(ui,yi){for(let vn=0;vn=0)return!0;return!1}(pe,fr))return;let mr=this.sourceLayerCoder.decode(W),Pr=this.vtLayers[mr].feature(re);if(fe.needGeometry){let ui=Sl(Pr,!0);if(!fe.filter(new rs(this.tileID.overscaledZ),ui,this.tileID.canonical))return}else if(!fe.filter(new rs(this.tileID.overscaledZ),Pr))return;let zr=this.getId(Pr,mr);for(let ui=0;ui{let ze=A instanceof Ac?A.get(pe):null;return ze&&ze.evaluate?ze.evaluate(F,W,re):ze})}function DC(R){let A=1/0,F=1/0,W=-1/0,re=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),re=Math.max(re,fe.y);return{minX:A,minY:F,maxX:W,maxY:re}}function $9(R,A){return A-R}function FC(R,A,F,W,re){let fe=[];for(let pe=0;pe=W&&$t.x>=W||(Lt.x>=W?Lt=new u(W,Lt.y+(W-Lt.x)/($t.x-Lt.x)*($t.y-Lt.y))._round():$t.x>=W&&($t=new u(W,Lt.y+(W-Lt.x)/($t.x-Lt.x)*($t.y-Lt.y))._round()),Lt.y>=re&&$t.y>=re||(Lt.y>=re?Lt=new u(Lt.x+(re-Lt.y)/($t.y-Lt.y)*($t.x-Lt.x),re)._round():$t.y>=re&&($t=new u(Lt.x+(re-Lt.y)/($t.y-Lt.y)*($t.x-Lt.x),re)._round()),Ke&&Lt.equals(Ke[Ke.length-1])||(Ke=[Lt],fe.push(Ke)),Ke.push($t)))))}}return fe}Fi("FeatureIndex",fy,{omit:["rawTileData","sourceLayerCoder"]});class vg extends u{constructor(A,F,W,re){super(A,F),this.angle=W,re!==void 0&&(this.segment=re)}clone(){return new vg(this.x,this.y,this.angle,this.segment)}}function mS(R,A,F,W,re){if(A.segment===void 0||F===0)return!0;let fe=A,pe=A.segment+1,ze=0;for(;ze>-F/2;){if(pe--,pe<0)return!1;ze-=R[pe].dist(fe),fe=R[pe]}ze+=R[pe].dist(R[pe+1]),pe++;let Ke=[],ct=0;for(;zeW;)ct-=Ke.shift().angleDelta;if(ct>re)return!1;pe++,ze+=Lt.dist($t)}return!0}function zC(R){let A=0;for(let F=0;Fct){let Pr=(ct-Ke)/mr,zr=Lo.number($t.x,fr.x,Pr),ui=Lo.number($t.y,fr.y,Pr),yi=new vg(zr,ui,fr.angleTo($t),Lt);return yi._round(),!pe||mS(R,yi,ze,pe,A)?yi:void 0}Ke+=mr}}function eO(R,A,F,W,re,fe,pe,ze,Ke){let ct=OC(W,fe,pe),Lt=qC(W,re),$t=Lt*pe,fr=R[0].x===0||R[0].x===Ke||R[0].y===0||R[0].y===Ke;return A-$t=0&&un=0&&Tn=0&&fr+ct<=Lt){let pa=new vg(un,Tn,vn,Pr);pa._round(),W&&!mS(R,pa,fe,W,re)||mr.push(pa)}}$t+=yi}return ze||mr.length||pe||(mr=BC(R,$t/2,F,W,re,fe,pe,!0,Ke)),mr}Fi("Anchor",vg);let k1=Md;function NC(R,A,F,W){let re=[],fe=R.image,pe=fe.pixelRatio,ze=fe.paddedRect.w-2*k1,Ke=fe.paddedRect.h-2*k1,ct={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Lt=fe.stretchX||[[0,ze]],$t=fe.stretchY||[[0,Ke]],fr=(Xn,Ro)=>Xn+Ro[1]-Ro[0],mr=Lt.reduce(fr,0),Pr=$t.reduce(fr,0),zr=ze-mr,ui=Ke-Pr,yi=0,vn=mr,zi=0,un=Pr,Tn=0,pa=zr,ro=0,Vo=ui;if(fe.content&&W){let Xn=fe.content,Ro=Xn[2]-Xn[0],uo=Xn[3]-Xn[1];(fe.textFitWidth||fe.textFitHeight)&&(ct=TC(R)),yi=pg(Lt,0,Xn[0]),zi=pg($t,0,Xn[1]),vn=pg(Lt,Xn[0],Xn[2]),un=pg($t,Xn[1],Xn[3]),Tn=Xn[0]-yi,ro=Xn[1]-zi,pa=Ro-vn,Vo=uo-un}let Xa=ct.x1,sa=ct.y1,Mo=ct.x2-Xa,fo=ct.y2-sa,lo=(Xn,Ro,uo,$o)=>{let Ju=Bw(Xn.stretch-yi,vn,Mo,Xa),qu=C1(Xn.fixed-Tn,pa,Xn.stretch,mr),Mh=Bw(Ro.stretch-zi,un,fo,sa),Qv=C1(Ro.fixed-ro,Vo,Ro.stretch,Pr),ld=Bw(uo.stretch-yi,vn,Mo,Xa),Eh=C1(uo.fixed-Tn,pa,uo.stretch,mr),Gd=Bw($o.stretch-zi,un,fo,sa),Hd=C1($o.fixed-ro,Vo,$o.stretch,Pr),jd=new u(Ju,Mh),Af=new u(ld,Mh),kh=new u(ld,Gd),Ed=new u(Ju,Gd),ud=new u(qu/pe,Qv/pe),Wh=new u(Eh/pe,Hd/pe),Df=A*Math.PI/180;if(Df){let tu=Math.sin(Df),pc=Math.cos(Df),$u=[pc,-tu,tu,pc];jd._matMult($u),Af._matMult($u),Ed._matMult($u),kh._matMult($u)}let Fv=Xn.stretch+Xn.fixed,lv=Ro.stretch+Ro.fixed;return{tl:jd,tr:Af,bl:Ed,br:kh,tex:{x:fe.paddedRect.x+k1+Fv,y:fe.paddedRect.y+k1+lv,w:uo.stretch+uo.fixed-Fv,h:$o.stretch+$o.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ud,pixelOffsetBR:Wh,minFontScaleX:pa/pe/Mo,minFontScaleY:Vo/pe/fo,isSDF:F}};if(W&&(fe.stretchX||fe.stretchY)){let Xn=UC(Lt,zr,mr),Ro=UC($t,ui,Pr);for(let uo=0;uo0&&(zr=Math.max(10,zr),this.circleDiameter=zr)}else{let fr=!(($t=pe.image)===null||$t===void 0)&&$t.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?TC(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};fr.y1=fr.y1*ze-Ke[0],fr.y2=fr.y2*ze+Ke[2],fr.x1=fr.x1*ze-Ke[3],fr.x2=fr.x2*ze+Ke[1];let mr=pe.collisionPadding;if(mr&&(fr.x1-=mr[0]*ze,fr.y1-=mr[1]*ze,fr.x2+=mr[2]*ze,fr.y2+=mr[3]*ze),Lt){let Pr=new u(fr.x1,fr.y1),zr=new u(fr.x2,fr.y1),ui=new u(fr.x1,fr.y2),yi=new u(fr.x2,fr.y2),vn=Lt*Math.PI/180;Pr._rotate(vn),zr._rotate(vn),ui._rotate(vn),yi._rotate(vn),fr.x1=Math.min(Pr.x,zr.x,ui.x,yi.x),fr.x2=Math.max(Pr.x,zr.x,ui.x,yi.x),fr.y1=Math.min(Pr.y,zr.y,ui.y,yi.y),fr.y2=Math.max(Pr.y,zr.y,ui.y,yi.y)}A.emplaceBack(F.x,F.y,fr.x1,fr.y1,fr.x2,fr.y2,W,re,fe)}this.boxEndIndex=A.length}}class Vp{constructor(A=[],F=(W,re)=>Wre?1:0){if(this.data=A,this.length=this.data.length,this.compare=F,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(A){this.data.push(A),this._up(this.length++)}pop(){if(this.length===0)return;let A=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),A}peek(){return this.data[0]}_up(A){let{data:F,compare:W}=this,re=F[A];for(;A>0;){let fe=A-1>>1,pe=F[fe];if(W(re,pe)>=0)break;F[A]=pe,A=fe}F[A]=re}_down(A){let{data:F,compare:W}=this,re=this.length>>1,fe=F[A];for(;A=0)break;F[A]=F[pe],A=pe}F[A]=fe}}function tO(R,A=1,F=!1){let W=1/0,re=1/0,fe=-1/0,pe=-1/0,ze=R[0];for(let mr=0;mrfe)&&(fe=Pr.x),(!mr||Pr.y>pe)&&(pe=Pr.y)}let Ke=Math.min(fe-W,pe-re),ct=Ke/2,Lt=new Vp([],rO);if(Ke===0)return new u(W,re);for(let mr=W;mr$t.d||!$t.d)&&($t=mr,F&&console.log("found best %d after %d probes",Math.round(1e4*mr.d)/1e4,fr)),mr.max-$t.d<=A||(ct=mr.h/2,Lt.push(new L1(mr.p.x-ct,mr.p.y-ct,ct,R)),Lt.push(new L1(mr.p.x+ct,mr.p.y-ct,ct,R)),Lt.push(new L1(mr.p.x-ct,mr.p.y+ct,ct,R)),Lt.push(new L1(mr.p.x+ct,mr.p.y+ct,ct,R)),fr+=4)}return F&&(console.log(`num probes: ${fr}`),console.log(`best distance: ${$t.d}`)),$t.p}function rO(R,A){return A.max-R.max}function L1(R,A,F,W){this.p=new u(R,A),this.h=F,this.d=function(re,fe){let pe=!1,ze=1/0;for(let Ke=0;Kere.y!=Pr.y>re.y&&re.x<(Pr.x-mr.x)*(re.y-mr.y)/(Pr.y-mr.y)+mr.x&&(pe=!pe),ze=Math.min(ze,Gr(re,mr,Pr))}}return(pe?1:-1)*Math.sqrt(ze)}(this.p,W),this.max=this.d+this.h*Math.SQRT2}var sd;i.aq=void 0,(sd=i.aq||(i.aq={}))[sd.center=1]="center",sd[sd.left=2]="left",sd[sd.right=3]="right",sd[sd.top=4]="top",sd[sd.bottom=5]="bottom",sd[sd["top-left"]=6]="top-left",sd[sd["top-right"]=7]="top-right",sd[sd["bottom-left"]=8]="bottom-left",sd[sd["bottom-right"]=9]="bottom-right";let hm=7,hy=Number.POSITIVE_INFINITY;function yS(R,A){return A[1]!==hy?function(F,W,re){let fe=0,pe=0;switch(W=Math.abs(W),re=Math.abs(re),F){case"top-right":case"top-left":case"top":pe=re-hm;break;case"bottom-right":case"bottom-left":case"bottom":pe=-re+hm}switch(F){case"top-right":case"bottom-right":case"right":fe=-W;break;case"top-left":case"bottom-left":case"left":fe=W}return[fe,pe]}(R,A[0],A[1]):function(F,W){let re=0,fe=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(F){case"top-right":case"top-left":fe=pe-hm;break;case"bottom-right":case"bottom-left":fe=-pe+hm;break;case"bottom":fe=-W+hm;break;case"top":fe=W-hm}switch(F){case"top-right":case"bottom-right":re=-pe;break;case"top-left":case"bottom-left":re=pe;break;case"left":re=W;break;case"right":re=-W}return[re,fe]}(R,A[0])}function VC(R,A,F){var W;let re=R.layout,fe=(W=re.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(A,{},F);if(fe){let ze=fe.values,Ke=[];for(let ct=0;ctfr*eu);Lt.startsWith("top")?$t[1]-=hm:Lt.startsWith("bottom")&&($t[1]+=hm),Ke[ct+1]=$t}return new $i(Ke)}let pe=re.get("text-variable-anchor");if(pe){let ze;ze=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[re.get("text-radial-offset").evaluate(A,{},F)*eu,hy]:re.get("text-offset").evaluate(A,{},F).map(ct=>ct*eu);let Ke=[];for(let ct of pe)Ke.push(ct,yS(ct,ze));return new $i(Ke)}return null}function _S(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function iO(R,A,F,W,re,fe,pe,ze,Ke,ct,Lt){let $t=fe.textMaxSize.evaluate(A,{});$t===void 0&&($t=pe);let fr=R.layers[0].layout,mr=fr.get("icon-offset").evaluate(A,{},Lt),Pr=HC(F.horizontal),zr=pe/24,ui=R.tilePixelRatio*zr,yi=R.tilePixelRatio*$t/24,vn=R.tilePixelRatio*ze,zi=R.tilePixelRatio*fr.get("symbol-spacing"),un=fr.get("text-padding")*R.tilePixelRatio,Tn=function(Xn,Ro,uo,$o=1){let Ju=Xn.get("icon-padding").evaluate(Ro,{},uo),qu=Ju&&Ju.values;return[qu[0]*$o,qu[1]*$o,qu[2]*$o,qu[3]*$o]}(fr,A,Lt,R.tilePixelRatio),pa=fr.get("text-max-angle")/180*Math.PI,ro=fr.get("text-rotation-alignment")!=="viewport"&&fr.get("symbol-placement")!=="point",Vo=fr.get("icon-rotation-alignment")==="map"&&fr.get("symbol-placement")!=="point",Xa=fr.get("symbol-placement"),sa=zi/2,Mo=fr.get("icon-text-fit"),fo;W&&Mo!=="none"&&(R.allowVerticalPlacement&&F.vertical&&(fo=AC(W,F.vertical,Mo,fr.get("icon-text-fit-padding"),mr,zr)),Pr&&(W=AC(W,Pr,Mo,fr.get("icon-text-fit-padding"),mr,zr)));let lo=(Xn,Ro)=>{Ro.x<0||Ro.x>=ja||Ro.y<0||Ro.y>=ja||function(uo,$o,Ju,qu,Mh,Qv,ld,Eh,Gd,Hd,jd,Af,kh,Ed,ud,Wh,Df,Fv,lv,tu,pc,$u,zv,ff,P1){let v0=uo.addToLineVertexArray($o,Ju),Gp,ep,Gc,Zf,tp=0,gg=0,uv=0,I1=0,AS=-1,Gw=-1,p0={},dy=bi("");if(uo.allowVerticalPlacement&&qu.vertical){let kd=Eh.layout.get("text-rotate").evaluate(pc,{},ff)+90;Gc=new fm(Gd,$o,Hd,jd,Af,qu.vertical,kh,Ed,ud,kd),ld&&(Zf=new fm(Gd,$o,Hd,jd,Af,ld,Df,Fv,ud,kd))}if(Mh){let kd=Eh.layout.get("icon-rotate").evaluate(pc,{}),rp=Eh.layout.get("icon-text-fit")!=="none",dm=NC(Mh,kd,zv,rp),Wd=ld?NC(ld,kd,zv,rp):void 0;ep=new fm(Gd,$o,Hd,jd,Af,Mh,Df,Fv,!1,kd),tp=4*dm.length;let Cd=uo.iconSizeData,_p=null;Cd.kind==="source"?(_p=[d0*Eh.layout.get("icon-size").evaluate(pc,{})],_p[0]>um&&T(`${uo.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)):Cd.kind==="composite"&&(_p=[d0*$u.compositeIconSizes[0].evaluate(pc,{},ff),d0*$u.compositeIconSizes[1].evaluate(pc,{},ff)],(_p[0]>um||_p[1]>um)&&T(`${uo.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)),uo.addSymbols(uo.icon,dm,_p,tu,lv,pc,i.ah.none,$o,v0.lineStartIndex,v0.lineLength,-1,ff),AS=uo.icon.placedSymbolArray.length-1,Wd&&(gg=4*Wd.length,uo.addSymbols(uo.icon,Wd,_p,tu,lv,pc,i.ah.vertical,$o,v0.lineStartIndex,v0.lineLength,-1,ff),Gw=uo.icon.placedSymbolArray.length-1)}let Xh=Object.keys(qu.horizontal);for(let kd of Xh){let rp=qu.horizontal[kd];if(!Gp){dy=bi(rp.text);let Wd=Eh.layout.get("text-rotate").evaluate(pc,{},ff);Gp=new fm(Gd,$o,Hd,jd,Af,rp,kh,Ed,ud,Wd)}let dm=rp.positionedLines.length===1;if(uv+=GC(uo,$o,rp,Qv,Eh,ud,pc,Wh,v0,qu.vertical?i.ah.horizontal:i.ah.horizontalOnly,dm?Xh:[kd],p0,AS,$u,ff),dm)break}qu.vertical&&(I1+=GC(uo,$o,qu.vertical,Qv,Eh,ud,pc,Wh,v0,i.ah.vertical,["vertical"],p0,Gw,$u,ff));let oO=Gp?Gp.boxStartIndex:uo.collisionBoxArray.length,Hw=Gp?Gp.boxEndIndex:uo.collisionBoxArray.length,g0=Gc?Gc.boxStartIndex:uo.collisionBoxArray.length,cv=Gc?Gc.boxEndIndex:uo.collisionBoxArray.length,ZC=ep?ep.boxStartIndex:uo.collisionBoxArray.length,sO=ep?ep.boxEndIndex:uo.collisionBoxArray.length,YC=Zf?Zf.boxStartIndex:uo.collisionBoxArray.length,lO=Zf?Zf.boxEndIndex:uo.collisionBoxArray.length,yp=-1,rb=(kd,rp)=>kd&&kd.circleDiameter?Math.max(kd.circleDiameter,rp):rp;yp=rb(Gp,yp),yp=rb(Gc,yp),yp=rb(ep,yp),yp=rb(Zf,yp);let jw=yp>-1?1:0;jw&&(yp*=P1/eu),uo.glyphOffsetArray.length>=M1.MAX_GLYPHS&&T("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pc.sortKey!==void 0&&uo.addToSortKeyRanges(uo.symbolInstances.length,pc.sortKey);let SS=VC(Eh,pc,ff),[uO,cO]=function(kd,rp){let dm=kd.length,Wd=rp==null?void 0:rp.values;if((Wd==null?void 0:Wd.length)>0)for(let Cd=0;Cd=0?p0.right:-1,p0.center>=0?p0.center:-1,p0.left>=0?p0.left:-1,p0.vertical||-1,AS,Gw,dy,oO,Hw,g0,cv,ZC,sO,YC,lO,Hd,uv,I1,tp,gg,jw,0,kh,yp,uO,cO)}(R,Ro,Xn,F,W,re,fo,R.layers[0],R.collisionBoxArray,A.index,A.sourceLayerIndex,R.index,ui,[un,un,un,un],ro,Ke,vn,Tn,Vo,mr,A,fe,ct,Lt,pe)};if(Xa==="line")for(let Xn of FC(A.geometry,0,0,ja,ja)){let Ro=eO(Xn,zi,pa,F.vertical||Pr,W,24,yi,R.overscaling,ja);for(let uo of Ro)Pr&&nO(R,Pr.text,sa,uo)||lo(Xn,uo)}else if(Xa==="line-center"){for(let Xn of A.geometry)if(Xn.length>1){let Ro=Q9(Xn,pa,F.vertical||Pr,W,24,yi);Ro&&lo(Xn,Ro)}}else if(A.type==="Polygon")for(let Xn of Cf(A.geometry,0)){let Ro=tO(Xn,16);lo(Xn[0],new vg(Ro.x,Ro.y,0))}else if(A.type==="LineString")for(let Xn of A.geometry)lo(Xn,new vg(Xn[0].x,Xn[0].y,0));else if(A.type==="Point")for(let Xn of A.geometry)for(let Ro of Xn)lo([Ro],new vg(Ro.x,Ro.y,0))}function GC(R,A,F,W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr){let zr=function(vn,zi,un,Tn,pa,ro,Vo,Xa){let sa=Tn.layout.get("text-rotate").evaluate(ro,{})*Math.PI/180,Mo=[];for(let fo of zi.positionedLines)for(let lo of fo.positionedGlyphs){if(!lo.rect)continue;let Xn=lo.rect||{},Ro=_C+1,uo=!0,$o=1,Ju=0,qu=(pa||Xa)&&lo.vertical,Mh=lo.metrics.advance*lo.scale/2;if(Xa&&zi.verticalizable&&(Ju=fo.lineOffset/2-(lo.imageName?-(eu-lo.metrics.width*lo.scale)/2:(lo.scale-1)*eu)),lo.imageName){let tu=Vo[lo.imageName];uo=tu.sdf,$o=tu.pixelRatio,Ro=Md/$o}let Qv=pa?[lo.x+Mh,lo.y]:[0,0],ld=pa?[0,0]:[lo.x+Mh+un[0],lo.y+un[1]-Ju],Eh=[0,0];qu&&(Eh=ld,ld=[0,0]);let Gd=lo.metrics.isDoubleResolution?2:1,Hd=(lo.metrics.left-Ro)*lo.scale-Mh+ld[0],jd=(-lo.metrics.top-Ro)*lo.scale+ld[1],Af=Hd+Xn.w/Gd*lo.scale/$o,kh=jd+Xn.h/Gd*lo.scale/$o,Ed=new u(Hd,jd),ud=new u(Af,jd),Wh=new u(Hd,kh),Df=new u(Af,kh);if(qu){let tu=new u(-Mh,Mh-Sh),pc=-Math.PI/2,$u=eu/2-Mh,zv=new u(5-Sh-$u,-(lo.imageName?$u:0)),ff=new u(...Eh);Ed._rotateAround(pc,tu)._add(zv)._add(ff),ud._rotateAround(pc,tu)._add(zv)._add(ff),Wh._rotateAround(pc,tu)._add(zv)._add(ff),Df._rotateAround(pc,tu)._add(zv)._add(ff)}if(sa){let tu=Math.sin(sa),pc=Math.cos(sa),$u=[pc,-tu,tu,pc];Ed._matMult($u),ud._matMult($u),Wh._matMult($u),Df._matMult($u)}let Fv=new u(0,0),lv=new u(0,0);Mo.push({tl:Ed,tr:ud,bl:Wh,br:Df,tex:Xn,writingMode:zi.writingMode,glyphOffset:Qv,sectionIndex:lo.sectionIndex,isSDF:uo,pixelOffsetTL:Fv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return Mo}(0,F,ze,re,fe,pe,W,R.allowVerticalPlacement),ui=R.textSizeData,yi=null;ui.kind==="source"?(yi=[d0*re.layout.get("text-size").evaluate(pe,{})],yi[0]>um&&T(`${R.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)):ui.kind==="composite"&&(yi=[d0*mr.compositeTextSizes[0].evaluate(pe,{},Pr),d0*mr.compositeTextSizes[1].evaluate(pe,{},Pr)],(yi[0]>um||yi[1]>um)&&T(`${R.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)),R.addSymbols(R.text,zr,yi,ze,fe,pe,ct,A,Ke.lineStartIndex,Ke.lineLength,fr,Pr);for(let vn of Lt)$t[vn]=R.text.placedSymbolArray.length-1;return 4*zr.length}function HC(R){for(let A in R)return R[A];return null}function nO(R,A,F,W){let re=R.compareText;if(A in re){let fe=re[A];for(let pe=fe.length-1;pe>=0;pe--)if(W.dist(fe[pe])>4;if(re!==1)throw new Error(`Got v${re} data when expected v1.`);let fe=jC[15&W];if(!fe)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(A,2,1),[ze]=new Uint32Array(A,4,1);return new xS(ze,pe,fe,A)}constructor(A,F=64,W=Float64Array,re){if(isNaN(A)||A<0)throw new Error(`Unpexpected numItems value: ${A}.`);this.numItems=+A,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=W,this.IndexArrayType=A<65536?Uint16Array:Uint32Array;let fe=jC.indexOf(this.ArrayType),pe=2*A*this.ArrayType.BYTES_PER_ELEMENT,ze=A*this.IndexArrayType.BYTES_PER_ELEMENT,Ke=(8-ze%8)%8;if(fe<0)throw new Error(`Unexpected typed array class: ${W}.`);re&&re instanceof ArrayBuffer?(this.data=re,this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+ze+Ke,2*A),this._pos=2*A,this._finished=!0):(this.data=new ArrayBuffer(8+pe+ze+Ke),this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+ze+Ke,2*A),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fe]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=A)}add(A,F){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=A,this.coords[this._pos++]=F,W}finish(){let A=this._pos>>1;if(A!==this.numItems)throw new Error(`Added ${A} items when expected ${this.numItems}.`);return Nw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(A,F,W,re){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:fe,coords:pe,nodeSize:ze}=this,Ke=[0,fe.length-1,0],ct=[];for(;Ke.length;){let Lt=Ke.pop()||0,$t=Ke.pop()||0,fr=Ke.pop()||0;if($t-fr<=ze){for(let ui=fr;ui<=$t;ui++){let yi=pe[2*ui],vn=pe[2*ui+1];yi>=A&&yi<=W&&vn>=F&&vn<=re&&ct.push(fe[ui])}continue}let mr=fr+$t>>1,Pr=pe[2*mr],zr=pe[2*mr+1];Pr>=A&&Pr<=W&&zr>=F&&zr<=re&&ct.push(fe[mr]),(Lt===0?A<=Pr:F<=zr)&&(Ke.push(fr),Ke.push(mr-1),Ke.push(1-Lt)),(Lt===0?W>=Pr:re>=zr)&&(Ke.push(mr+1),Ke.push($t),Ke.push(1-Lt))}return ct}within(A,F,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:re,coords:fe,nodeSize:pe}=this,ze=[0,re.length-1,0],Ke=[],ct=W*W;for(;ze.length;){let Lt=ze.pop()||0,$t=ze.pop()||0,fr=ze.pop()||0;if($t-fr<=pe){for(let ui=fr;ui<=$t;ui++)XC(fe[2*ui],fe[2*ui+1],A,F)<=ct&&Ke.push(re[ui]);continue}let mr=fr+$t>>1,Pr=fe[2*mr],zr=fe[2*mr+1];XC(Pr,zr,A,F)<=ct&&Ke.push(re[mr]),(Lt===0?A-W<=Pr:F-W<=zr)&&(ze.push(fr),ze.push(mr-1),ze.push(1-Lt)),(Lt===0?A+W>=Pr:F+W>=zr)&&(ze.push(mr+1),ze.push($t),ze.push(1-Lt))}return Ke}}function Nw(R,A,F,W,re,fe){if(re-W<=F)return;let pe=W+re>>1;WC(R,A,pe,W,re,fe),Nw(R,A,F,W,pe-1,1-fe),Nw(R,A,F,pe+1,re,1-fe)}function WC(R,A,F,W,re,fe){for(;re>W;){if(re-W>600){let ct=re-W+1,Lt=F-W+1,$t=Math.log(ct),fr=.5*Math.exp(2*$t/3),mr=.5*Math.sqrt($t*fr*(ct-fr)/ct)*(Lt-ct/2<0?-1:1);WC(R,A,F,Math.max(W,Math.floor(F-Lt*fr/ct+mr)),Math.min(re,Math.floor(F+(ct-Lt)*fr/ct+mr)),fe)}let pe=A[2*F+fe],ze=W,Ke=re;for(eb(R,A,W,F),A[2*re+fe]>pe&&eb(R,A,W,re);zepe;)Ke--}A[2*W+fe]===pe?eb(R,A,W,Ke):(Ke++,eb(R,A,Ke,re)),Ke<=F&&(W=Ke+1),F<=Ke&&(re=Ke-1)}}function eb(R,A,F,W){bS(R,F,W),bS(A,2*F,2*W),bS(A,2*F+1,2*W+1)}function bS(R,A,F){let W=R[A];R[A]=R[F],R[F]=W}function XC(R,A,F,W){let re=R-F,fe=A-W;return re*re+fe*fe}var Uw;i.bg=void 0,(Uw=i.bg||(i.bg={})).create="create",Uw.load="load",Uw.fullLoad="fullLoad";let tb=null,sh=[],wS=1e3/60,TS="loadTime",Vw="fullLoadTime",aO={mark(R){performance.mark(R)},frame(R){let A=R;tb!=null&&sh.push(A-tb),tb=A},clearMetrics(){tb=null,sh=[],performance.clearMeasures(TS),performance.clearMeasures(Vw);for(let R in i.bg)performance.clearMarks(i.bg[R])},getPerformanceMetrics(){performance.measure(TS,i.bg.create,i.bg.load),performance.measure(Vw,i.bg.create,i.bg.fullLoad);let R=performance.getEntriesByName(TS)[0].duration,A=performance.getEntriesByName(Vw)[0].duration,F=sh.length,W=1/(sh.reduce((fe,pe)=>fe+pe,0)/F/1e3),re=sh.filter(fe=>fe>wS).reduce((fe,pe)=>fe+(pe-wS)/wS,0);return{loadTime:R,fullLoadTime:A,fps:W,percentDroppedFrames:re/(F+re)*100,totalFrames:F}}};i.$=class extends Yt{},i.A=xi,i.B=dn,i.C=function(R){if(V==null){let A=R.navigator?R.navigator.userAgent:null;V=!!R.safari||!(!A||!(/\b(iPad|iPhone|iPod)\b/.test(A)||A.match("Safari")&&!A.match("Chrome")))}return V},i.D=Ua,i.E=Re,i.F=class{constructor(R,A){this.target=R,this.mapId=A,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new dS(()=>this.process()),this.subscription=function(F,W,re,fe){return F.addEventListener(W,re,!1),{unsubscribe:()=>{F.removeEventListener(W,re,!1)}}}(this.target,"message",F=>this.receive(F)),this.globalScope=O(self)?R:window}registerMessageHandler(R,A){this.messageHandlers[R]=A}sendAsync(R,A){return new Promise((F,W)=>{let re=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[re]={resolve:F,reject:W},A&&A.signal.addEventListener("abort",()=>{delete this.resolveRejects[re];let ze={id:re,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ze)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:re,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let A=R.data,F=A.id;if(!(A.origin!=="file://"&&location.origin!=="file://"&&A.origin!=="resource://android"&&location.origin!=="resource://android"&&A.origin!==location.origin||A.targetMapId&&this.mapId!==A.targetMapId)){if(A.type===""){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(O(self)||A.mustQueue)return this.tasks[F]=A,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,A)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),A=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),A&&this.processTask(R,A)}processTask(R,A){return a(this,void 0,void 0,function*(){if(A.type===""){let re=this.resolveRejects[R];return delete this.resolveRejects[R],re?void(A.error?re.reject(Na(A.error)):re.resolve(Na(A.data))):void 0}if(!this.messageHandlers[A.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${A.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let F=Na(A.data),W=new AbortController;this.abortControllers[R]=W;try{let re=yield this.messageHandlers[A.type](A.sourceMapId,F,W);this.completeTask(R,null,re)}catch(re){this.completeTask(R,re)}})}completeTask(R,A,F){let W=[];delete this.abortControllers[R];let re={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:A?La(A):null,data:La(F,W)};this.target.postMessage(re,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Ce,i.H=function(){var R=new xi(16);return xi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},i.I=Lw,i.J=function(R,A,F){var W,re,fe,pe,ze,Ke,ct,Lt,$t,fr,mr,Pr,zr=F[0],ui=F[1],yi=F[2];return A===R?(R[12]=A[0]*zr+A[4]*ui+A[8]*yi+A[12],R[13]=A[1]*zr+A[5]*ui+A[9]*yi+A[13],R[14]=A[2]*zr+A[6]*ui+A[10]*yi+A[14],R[15]=A[3]*zr+A[7]*ui+A[11]*yi+A[15]):(re=A[1],fe=A[2],pe=A[3],ze=A[4],Ke=A[5],ct=A[6],Lt=A[7],$t=A[8],fr=A[9],mr=A[10],Pr=A[11],R[0]=W=A[0],R[1]=re,R[2]=fe,R[3]=pe,R[4]=ze,R[5]=Ke,R[6]=ct,R[7]=Lt,R[8]=$t,R[9]=fr,R[10]=mr,R[11]=Pr,R[12]=W*zr+ze*ui+$t*yi+A[12],R[13]=re*zr+Ke*ui+fr*yi+A[13],R[14]=fe*zr+ct*ui+mr*yi+A[14],R[15]=pe*zr+Lt*ui+Pr*yi+A[15]),R},i.K=function(R,A,F){var W=F[0],re=F[1],fe=F[2];return R[0]=A[0]*W,R[1]=A[1]*W,R[2]=A[2]*W,R[3]=A[3]*W,R[4]=A[4]*re,R[5]=A[5]*re,R[6]=A[6]*re,R[7]=A[7]*re,R[8]=A[8]*fe,R[9]=A[9]*fe,R[10]=A[10]*fe,R[11]=A[11]*fe,R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15],R},i.L=ci,i.M=function(R,A){let F={};for(let W=0;W{let A=window.document.createElement("video");return A.muted=!0,new Promise(F=>{A.onloadstart=()=>{F(A)};for(let W of R){let re=window.document.createElement("source");Le(W)||(A.crossOrigin="Anonymous"),re.src=W,A.appendChild(re)}})},i.a4=function(){return x++},i.a5=Cn,i.a6=M1,i.a7=Fc,i.a8=Sl,i.a9=gS,i.aA=function(R){if(R.type==="custom")return new hS(R);switch(R.type){case"background":return new J9(R);case"circle":return new hi(R);case"fill":return new yt(R);case"fill-extrusion":return new Lv(R);case"heatmap":return new oa(R);case"hillshade":return new Zs(R);case"line":return new oy(R);case"raster":return new Kx(R);case"symbol":return new cy(R)}},i.aB=g,i.aC=function(R,A){if(!R)return[{command:"setStyle",args:[A]}];let F=[];try{if(!pt(R.version,A.version))return[{command:"setStyle",args:[A]}];pt(R.center,A.center)||F.push({command:"setCenter",args:[A.center]}),pt(R.zoom,A.zoom)||F.push({command:"setZoom",args:[A.zoom]}),pt(R.bearing,A.bearing)||F.push({command:"setBearing",args:[A.bearing]}),pt(R.pitch,A.pitch)||F.push({command:"setPitch",args:[A.pitch]}),pt(R.sprite,A.sprite)||F.push({command:"setSprite",args:[A.sprite]}),pt(R.glyphs,A.glyphs)||F.push({command:"setGlyphs",args:[A.glyphs]}),pt(R.transition,A.transition)||F.push({command:"setTransition",args:[A.transition]}),pt(R.light,A.light)||F.push({command:"setLight",args:[A.light]}),pt(R.terrain,A.terrain)||F.push({command:"setTerrain",args:[A.terrain]}),pt(R.sky,A.sky)||F.push({command:"setSky",args:[A.sky]}),pt(R.projection,A.projection)||F.push({command:"setProjection",args:[A.projection]});let W={},re=[];(function(pe,ze,Ke,ct){let Lt;for(Lt in ze=ze||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,Lt)&&(Object.prototype.hasOwnProperty.call(ze,Lt)||lt(Lt,Ke,ct));for(Lt in ze)Object.prototype.hasOwnProperty.call(ze,Lt)&&(Object.prototype.hasOwnProperty.call(pe,Lt)?pt(pe[Lt],ze[Lt])||(pe[Lt].type==="geojson"&&ze[Lt].type==="geojson"&&Nt(pe,ze,Lt)?Zt(Ke,{command:"setGeoJSONSourceData",args:[Lt,ze[Lt].data]}):Gt(Lt,ze,Ke,ct)):st(Lt,ze,Ke))})(R.sources,A.sources,re,W);let fe=[];R.layers&&R.layers.forEach(pe=>{"source"in pe&&W[pe.source]?F.push({command:"removeLayer",args:[pe.id]}):fe.push(pe)}),F=F.concat(re),function(pe,ze,Ke){ze=ze||[];let ct=(pe=pe||[]).map(sr),Lt=ze.map(sr),$t=pe.reduce(wr,{}),fr=ze.reduce(wr,{}),mr=ct.slice(),Pr=Object.create(null),zr,ui,yi,vn,zi;for(let un=0,Tn=0;un@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(F,W,re,fe)=>{let pe=re||fe;return A[W]=!pe||pe.toLowerCase(),""}),A["max-age"]){let F=parseInt(A["max-age"],10);isNaN(F)?delete A["max-age"]:A["max-age"]=F}return A},i.ab=function(R,A){let F=[];for(let W in R)W in A||F.push(W);return F},i.ac=E,i.ad=function(R,A,F){var W=Math.sin(F),re=Math.cos(F),fe=A[0],pe=A[1],ze=A[2],Ke=A[3],ct=A[4],Lt=A[5],$t=A[6],fr=A[7];return A!==R&&(R[8]=A[8],R[9]=A[9],R[10]=A[10],R[11]=A[11],R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15]),R[0]=fe*re+ct*W,R[1]=pe*re+Lt*W,R[2]=ze*re+$t*W,R[3]=Ke*re+fr*W,R[4]=ct*re-fe*W,R[5]=Lt*re-pe*W,R[6]=$t*re-ze*W,R[7]=fr*re-Ke*W,R},i.ae=function(R){var A=new xi(16);return A[0]=R[0],A[1]=R[1],A[2]=R[2],A[3]=R[3],A[4]=R[4],A[5]=R[5],A[6]=R[6],A[7]=R[7],A[8]=R[8],A[9]=R[9],A[10]=R[10],A[11]=R[11],A[12]=R[12],A[13]=R[13],A[14]=R[14],A[15]=R[15],A},i.af=Bn,i.ag=function(R,A){let F=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:re,minZoom:fe,maxZoom:pe}=R,ze=re?E(ko.interpolationFactor(re,A,fe,pe),0,1):0;R.kind==="camera"?W=Lo.number(R.minSize,R.maxSize,ze):F=ze}return{uSizeT:F,uSize:W}},i.ai=function(R,{uSize:A,uSizeT:F},{lowerSize:W,upperSize:re}){return R.kind==="source"?W/d0:R.kind==="composite"?Lo.number(W/d0,re/d0,F):A},i.aj=lS,i.ak=function(R,A,F,W){let re=A.y-R.y,fe=A.x-R.x,pe=W.y-F.y,ze=W.x-F.x,Ke=pe*fe-ze*re;if(Ke===0)return null;let ct=(ze*(R.y-F.y)-pe*(R.x-F.x))/Ke;return new u(R.x+ct*fe,R.y+ct*re)},i.al=FC,i.am=Sc,i.an=Ri,i.ao=function(R){let A=1/0,F=1/0,W=-1/0,re=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),re=Math.max(re,fe.y);return[A,F,W,re]},i.ap=eu,i.ar=sS,i.as=function(R,A){var F=A[0],W=A[1],re=A[2],fe=A[3],pe=A[4],ze=A[5],Ke=A[6],ct=A[7],Lt=A[8],$t=A[9],fr=A[10],mr=A[11],Pr=A[12],zr=A[13],ui=A[14],yi=A[15],vn=F*ze-W*pe,zi=F*Ke-re*pe,un=F*ct-fe*pe,Tn=W*Ke-re*ze,pa=W*ct-fe*ze,ro=re*ct-fe*Ke,Vo=Lt*zr-$t*Pr,Xa=Lt*ui-fr*Pr,sa=Lt*yi-mr*Pr,Mo=$t*ui-fr*zr,fo=$t*yi-mr*zr,lo=fr*yi-mr*ui,Xn=vn*lo-zi*fo+un*Mo+Tn*sa-pa*Xa+ro*Vo;return Xn?(R[0]=(ze*lo-Ke*fo+ct*Mo)*(Xn=1/Xn),R[1]=(re*fo-W*lo-fe*Mo)*Xn,R[2]=(zr*ro-ui*pa+yi*Tn)*Xn,R[3]=(fr*pa-$t*ro-mr*Tn)*Xn,R[4]=(Ke*sa-pe*lo-ct*Xa)*Xn,R[5]=(F*lo-re*sa+fe*Xa)*Xn,R[6]=(ui*un-Pr*ro-yi*zi)*Xn,R[7]=(Lt*ro-fr*un+mr*zi)*Xn,R[8]=(pe*fo-ze*sa+ct*Vo)*Xn,R[9]=(W*sa-F*fo-fe*Vo)*Xn,R[10]=(Pr*pa-zr*un+yi*vn)*Xn,R[11]=($t*un-Lt*pa-mr*vn)*Xn,R[12]=(ze*Xa-pe*Mo-Ke*Vo)*Xn,R[13]=(F*Mo-W*Xa+re*Vo)*Xn,R[14]=(zr*zi-Pr*Tn-ui*vn)*Xn,R[15]=(Lt*Tn-$t*zi+fr*vn)*Xn,R):null},i.at=_S,i.au=Dw,i.av=xS,i.aw=function(){let R={},A=ce.$version;for(let F in ce.$root){let W=ce.$root[F];if(W.required){let re=null;re=F==="version"?A:W.type==="array"?[]:{},re!=null&&(R[F]=re)}}return R},i.ax=Yn,i.ay=ie,i.az=function(R){R=R.slice();let A=Object.create(null);for(let F=0;F25||W<0||W>=1||F<0||F>=1)},i.bc=function(R,A){return R[0]=A[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=A[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=A[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},i.bd=class extends Tt{},i.be=vS,i.bf=aO,i.bh=me,i.bi=function(R,A){_e.REGISTERED_PROTOCOLS[R]=A},i.bj=function(R){delete _e.REGISTERED_PROTOCOLS[R]},i.bk=function(R,A){let F={};for(let re=0;relo*eu)}let Xa=pe?"center":F.get("text-justify").evaluate(ct,{},R.canonical),sa=F.get("symbol-placement")==="point"?F.get("text-max-width").evaluate(ct,{},R.canonical)*eu:1/0,Mo=()=>{R.bucket.allowVerticalPlacement&&Ka(un)&&(Pr.vertical=Hx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,"left",pa,yi,i.ah.vertical,!0,fr,$t))};if(!pe&&Vo){let fo=new Set;if(Xa==="auto")for(let Xn=0;Xna(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let A=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(A)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((A,F)=>{let W=new Image;W.onload=()=>{A(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let re=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(re):Z}),i.g=Ee,i.h=(R,A)=>Se(L(R,{type:"json"}),A),i.i=O,i.j=ge,i.k=Pe,i.l=(R,A)=>Se(L(R,{type:"arrayBuffer"}),A),i.m=Se,i.n=function(R){return new nS(R).readFields(PQ,[])},i.o=na,i.p=oS,i.q=ue,i.r=Xi,i.s=Le,i.t=Yi,i.u=ki,i.v=ce,i.w=T,i.x=function([R,A,F]){return A+=90,A*=Math.PI/180,F*=Math.PI/180,{x:R*Math.cos(A)*Math.sin(F),y:R*Math.sin(A)*Math.sin(F),z:R*Math.cos(F)}},i.y=Lo,i.z=rs}),r("worker",["./shared"],function(i){"use strict";class a{constructor(Ge){this.keyCache={},Ge&&this.replace(Ge)}replace(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])}update(Ge,Je){for(let tt of Ge){this._layerConfigs[tt.id]=tt;let xt=this._layers[tt.id]=i.aA(tt);xt._featureFilter=i.a7(xt.filter),this.keyCache[tt.id]&&delete this.keyCache[tt.id]}for(let tt of Je)delete this.keyCache[tt],delete this._layerConfigs[tt],delete this._layers[tt];this.familiesBySource={};let je=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let tt of je){let xt=tt.map(ar=>this._layers[ar.id]),Ie=xt[0];if(Ie.visibility==="none")continue;let xe=Ie.source||"",ke=this.familiesBySource[xe];ke||(ke=this.familiesBySource[xe]={});let vt=Ie.sourceLayer||"_geojsonTileLayer",ir=ke[vt];ir||(ir=ke[vt]=[]),ir.push(xt)}}}class o{constructor(Ge){let Je={},je=[];for(let xe in Ge){let ke=Ge[xe],vt=Je[xe]={};for(let ir in ke){let ar=ke[+ir];if(!ar||ar.bitmap.width===0||ar.bitmap.height===0)continue;let vr={x:0,y:0,w:ar.bitmap.width+2,h:ar.bitmap.height+2};je.push(vr),vt[ir]={rect:vr,metrics:ar.metrics}}}let{w:tt,h:xt}=i.p(je),Ie=new i.o({width:tt||1,height:xt||1});for(let xe in Ge){let ke=Ge[xe];for(let vt in ke){let ir=ke[+vt];if(!ir||ir.bitmap.width===0||ir.bitmap.height===0)continue;let ar=Je[xe][vt].rect;i.o.copy(ir.bitmap,Ie,{x:0,y:0},{x:ar.x+1,y:ar.y+1},ir.bitmap)}}this.image=Ie,this.positions=Je}}i.bl("GlyphAtlas",o);class s{constructor(Ge){this.tileID=new i.S(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId,this.inFlightDependencies=[]}parse(Ge,Je,je,tt){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ge,this.collisionBoxArray=new i.a5;let xt=new i.bm(Object.keys(Ge.layers).sort()),Ie=new i.bn(this.tileID,this.promoteId);Ie.bucketLayerIDs=[];let xe={},ke={featureIndex:Ie,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:je},vt=Je.familiesBySource[this.source];for(let qn in vt){let Fn=Ge.layers[qn];if(!Fn)continue;Fn.version===1&&i.w(`Vector tile source "${this.source}" layer "${qn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ra=xt.encode(qn),la=[];for(let Ut=0;Ut=wt.maxzoom||wt.visibility!=="none"&&(l(Ut,this.zoom,je),(xe[wt.id]=wt.createBucket({index:Ie.bucketLayerIDs.length,layers:Ut,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ra,sourceID:this.source})).populate(la,ke,this.tileID.canonical),Ie.bucketLayerIDs.push(Ut.map(rr=>rr.id)))}}let ir=i.aF(ke.glyphDependencies,qn=>Object.keys(qn).map(Number));this.inFlightDependencies.forEach(qn=>qn==null?void 0:qn.abort()),this.inFlightDependencies=[];let ar=Promise.resolve({});if(Object.keys(ir).length){let qn=new AbortController;this.inFlightDependencies.push(qn),ar=tt.sendAsync({type:"GG",data:{stacks:ir,source:this.source,tileID:this.tileID,type:"glyphs"}},qn)}let vr=Object.keys(ke.iconDependencies),ii=Promise.resolve({});if(vr.length){let qn=new AbortController;this.inFlightDependencies.push(qn),ii=tt.sendAsync({type:"GI",data:{icons:vr,source:this.source,tileID:this.tileID,type:"icons"}},qn)}let pi=Object.keys(ke.patternDependencies),$r=Promise.resolve({});if(pi.length){let qn=new AbortController;this.inFlightDependencies.push(qn),$r=tt.sendAsync({type:"GI",data:{icons:pi,source:this.source,tileID:this.tileID,type:"patterns"}},qn)}let[di,ji,In]=yield Promise.all([ar,ii,$r]),wi=new o(di),On=new i.bo(ji,In);for(let qn in xe){let Fn=xe[qn];Fn instanceof i.a6?(l(Fn.layers,this.zoom,je),i.bp({bucket:Fn,glyphMap:di,glyphPositions:wi.positions,imageMap:ji,imagePositions:On.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Fn.hasPattern&&(Fn instanceof i.bq||Fn instanceof i.br||Fn instanceof i.bs)&&(l(Fn.layers,this.zoom,je),Fn.addFeatures(ke,this.tileID.canonical,On.patternPositions))}return this.status="done",{buckets:Object.values(xe).filter(qn=>!qn.isEmpty()),featureIndex:Ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:wi.image,imageAtlas:On,glyphMap:this.returnDependencies?di:null,iconMap:this.returnDependencies?ji:null,glyphPositions:this.returnDependencies?wi.positions:null}})}}function l(dt,Ge,Je){let je=new i.z(Ge);for(let tt of dt)tt.recalculate(je,Je)}class u{constructor(Ge,Je,je){this.actor=Ge,this.layerIndex=Je,this.availableImages=je,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let je=yield i.l(Ge.request,Je);try{return{vectorTile:new i.bt.VectorTile(new i.bu(je.data)),rawData:je.data,cacheControl:je.cacheControl,expires:je.expires}}catch(tt){let xt=new Uint8Array(je.data),Ie=`Unable to parse the tile at ${Ge.request.url}, `;throw Ie+=xt[0]===31&&xt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${tt.message}`,new Error(Ie)}})}loadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid,je=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request),tt=new s(Ge);this.loading[Je]=tt;let xt=new AbortController;tt.abort=xt;try{let Ie=yield this.loadVectorTile(Ge,xt);if(delete this.loading[Je],!Ie)return null;let xe=Ie.rawData,ke={};Ie.expires&&(ke.expires=Ie.expires),Ie.cacheControl&&(ke.cacheControl=Ie.cacheControl);let vt={};if(je){let ar=je.finish();ar&&(vt.resourceTiming=JSON.parse(JSON.stringify(ar)))}tt.vectorTile=Ie.vectorTile;let ir=tt.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=tt,this.fetching[Je]={rawTileData:xe,cacheControl:ke,resourceTiming:vt};try{let ar=yield ir;return i.e({rawTileData:xe.slice(0)},ar,ke,vt)}finally{delete this.fetching[Je]}}catch(Ie){throw delete this.loading[Je],tt.status="done",this.loaded[Je]=tt,Ie}})}reloadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid;if(!this.loaded||!this.loaded[Je])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let je=this.loaded[Je];if(je.showCollisionBoxes=Ge.showCollisionBoxes,je.status==="parsing"){let tt=yield je.parse(je.vectorTile,this.layerIndex,this.availableImages,this.actor),xt;if(this.fetching[Je]){let{rawTileData:Ie,cacheControl:xe,resourceTiming:ke}=this.fetching[Je];delete this.fetching[Je],xt=i.e({rawTileData:Ie.slice(0)},tt,xe,ke)}else xt=tt;return xt}if(je.status==="done"&&je.vectorTile)return je.parse(je.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ge){return i._(this,void 0,void 0,function*(){let Je=this.loading,je=Ge.uid;Je&&Je[je]&&Je[je].abort&&(Je[je].abort.abort(),delete Je[je])})}removeTile(Ge){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ge.uid]&&delete this.loaded[Ge.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ge){return i._(this,void 0,void 0,function*(){let{uid:Je,encoding:je,rawImageData:tt,redFactor:xt,greenFactor:Ie,blueFactor:xe,baseShift:ke}=Ge,vt=tt.width+2,ir=tt.height+2,ar=i.b(tt)?new i.R({width:vt,height:ir},yield i.bw(tt,-1,-1,vt,ir)):tt,vr=new i.bx(Je,ar,je,xt,Ie,xe,ke);return this.loaded=this.loaded||{},this.loaded[Je]=vr,vr})}removeTile(Ge){let Je=this.loaded,je=Ge.uid;Je&&Je[je]&&delete Je[je]}}function f(dt,Ge){if(dt.length!==0){h(dt[0],Ge);for(var Je=1;Je=Math.abs(xe)?Je-ke+xe:xe-ke+Je,Je=ke}Je+je>=0!=!!Ge&&dt.reverse()}var d=i.by(function dt(Ge,Je){var je,tt=Ge&&Ge.type;if(tt==="FeatureCollection")for(je=0;je>31}function O(dt,Ge){for(var Je=dt.loadGeometry(),je=dt.type,tt=0,xt=0,Ie=Je.length,xe=0;xedt},j=Math.fround||(N=new Float32Array(1),dt=>(N[0]=+dt,N[0]));var N;let H=3,te=5,oe=6;class _e{constructor(Ge){this.options=Object.assign(Object.create(Z),Ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ge){let{log:Je,minZoom:je,maxZoom:tt}=this.options;Je&&console.time("total time");let xt=`prepare ${Ge.length} points`;Je&&console.time(xt),this.points=Ge;let Ie=[];for(let ke=0;ke=je;ke--){let vt=+Date.now();xe=this.trees[ke]=this._createTree(this._cluster(xe,ke)),Je&&console.log("z%d: %d clusters in %dms",ke,xe.numItems,+Date.now()-vt)}return Je&&console.timeEnd("total time"),this}getClusters(Ge,Je){let je=((Ge[0]+180)%360+360)%360-180,tt=Math.max(-90,Math.min(90,Ge[1])),xt=Ge[2]===180?180:((Ge[2]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)je=-180,xt=180;else if(je>xt){let ar=this.getClusters([je,tt,180,Ie],Je),vr=this.getClusters([-180,tt,xt,Ie],Je);return ar.concat(vr)}let xe=this.trees[this._limitZoom(Je)],ke=xe.range(me(je),ie(Ie),me(xt),ie(tt)),vt=xe.data,ir=[];for(let ar of ke){let vr=this.stride*ar;ir.push(vt[vr+te]>1?Ee(vt,vr,this.clusterProps):this.points[vt[vr+H]])}return ir}getChildren(Ge){let Je=this._getOriginId(Ge),je=this._getOriginZoom(Ge),tt="No cluster with the specified id.",xt=this.trees[je];if(!xt)throw new Error(tt);let Ie=xt.data;if(Je*this.stride>=Ie.length)throw new Error(tt);let xe=this.options.radius/(this.options.extent*Math.pow(2,je-1)),ke=xt.within(Ie[Je*this.stride],Ie[Je*this.stride+1],xe),vt=[];for(let ir of ke){let ar=ir*this.stride;Ie[ar+4]===Ge&&vt.push(Ie[ar+te]>1?Ee(Ie,ar,this.clusterProps):this.points[Ie[ar+H]])}if(vt.length===0)throw new Error(tt);return vt}getLeaves(Ge,Je,je){let tt=[];return this._appendLeaves(tt,Ge,Je=Je||10,je=je||0,0),tt}getTile(Ge,Je,je){let tt=this.trees[this._limitZoom(Ge)],xt=Math.pow(2,Ge),{extent:Ie,radius:xe}=this.options,ke=xe/Ie,vt=(je-ke)/xt,ir=(je+1+ke)/xt,ar={features:[]};return this._addTileFeatures(tt.range((Je-ke)/xt,vt,(Je+1+ke)/xt,ir),tt.data,Je,je,xt,ar),Je===0&&this._addTileFeatures(tt.range(1-ke/xt,vt,1,ir),tt.data,xt,je,xt,ar),Je===xt-1&&this._addTileFeatures(tt.range(0,vt,ke/xt,ir),tt.data,-1,je,xt,ar),ar.features.length?ar:null}getClusterExpansionZoom(Ge){let Je=this._getOriginZoom(Ge)-1;for(;Je<=this.options.maxZoom;){let je=this.getChildren(Ge);if(Je++,je.length!==1)break;Ge=je[0].properties.cluster_id}return Je}_appendLeaves(Ge,Je,je,tt,xt){let Ie=this.getChildren(Je);for(let xe of Ie){let ke=xe.properties;if(ke&&ke.cluster?xt+ke.point_count<=tt?xt+=ke.point_count:xt=this._appendLeaves(Ge,ke.cluster_id,je,tt,xt):xt1,ir,ar,vr;if(vt)ir=Ce(Je,ke,this.clusterProps),ar=Je[ke],vr=Je[ke+1];else{let $r=this.points[Je[ke+H]];ir=$r.properties;let[di,ji]=$r.geometry.coordinates;ar=me(di),vr=ie(ji)}let ii={type:1,geometry:[[Math.round(this.options.extent*(ar*xt-je)),Math.round(this.options.extent*(vr*xt-tt))]],tags:ir},pi;pi=vt||this.options.generateId?Je[ke+H]:this.points[Je[ke+H]].id,pi!==void 0&&(ii.id=pi),Ie.features.push(ii)}}_limitZoom(Ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ge),this.options.maxZoom+1))}_cluster(Ge,Je){let{radius:je,extent:tt,reduce:xt,minPoints:Ie}=this.options,xe=je/(tt*Math.pow(2,Je)),ke=Ge.data,vt=[],ir=this.stride;for(let ar=0;arJe&&(di+=ke[In+te])}if(di>$r&&di>=Ie){let ji,In=vr*$r,wi=ii*$r,On=-1,qn=((ar/ir|0)<<5)+(Je+1)+this.points.length;for(let Fn of pi){let ra=Fn*ir;if(ke[ra+2]<=Je)continue;ke[ra+2]=Je;let la=ke[ra+te];In+=ke[ra]*la,wi+=ke[ra+1]*la,ke[ra+4]=qn,xt&&(ji||(ji=this._map(ke,ar,!0),On=this.clusterProps.length,this.clusterProps.push(ji)),xt(ji,this._map(ke,ra)))}ke[ar+4]=qn,vt.push(In/di,wi/di,1/0,qn,-1,di),xt&&vt.push(On)}else{for(let ji=0;ji1)for(let ji of pi){let In=ji*ir;if(!(ke[In+2]<=Je)){ke[In+2]=Je;for(let wi=0;wi>5}_getOriginZoom(Ge){return(Ge-this.points.length)%32}_map(Ge,Je,je){if(Ge[Je+te]>1){let Ie=this.clusterProps[Ge[Je+oe]];return je?Object.assign({},Ie):Ie}let tt=this.points[Ge[Je+H]].properties,xt=this.options.map(tt);return je&&xt===tt?Object.assign({},xt):xt}}function Ee(dt,Ge,Je){return{type:"Feature",id:dt[Ge+H],properties:Ce(dt,Ge,Je),geometry:{type:"Point",coordinates:[(je=dt[Ge],360*(je-.5)),Se(dt[Ge+1])]}};var je}function Ce(dt,Ge,Je){let je=dt[Ge+te],tt=je>=1e4?`${Math.round(je/1e3)}k`:je>=1e3?Math.round(je/100)/10+"k":je,xt=dt[Ge+oe],Ie=xt===-1?{}:Object.assign({},Je[xt]);return Object.assign(Ie,{cluster:!0,cluster_id:dt[Ge+H],point_count:je,point_count_abbreviated:tt})}function me(dt){return dt/360+.5}function ie(dt){let Ge=Math.sin(dt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Se(dt){let Ge=(180-360*dt)*Math.PI/180;return 360*Math.atan(Math.exp(Ge))/Math.PI-90}function Le(dt,Ge,Je,je){let tt=je,xt=Ge+(Je-Ge>>1),Ie,xe=Je-Ge,ke=dt[Ge],vt=dt[Ge+1],ir=dt[Je],ar=dt[Je+1];for(let vr=Ge+3;vrtt)Ie=vr,tt=ii;else if(ii===tt){let pi=Math.abs(vr-xt);pije&&(Ie-Ge>3&&Le(dt,Ge,Ie,je),dt[Ie+2]=tt,Je-Ie>3&&Le(dt,Ie,Je,je))}function Ae(dt,Ge,Je,je,tt,xt){let Ie=tt-Je,xe=xt-je;if(Ie!==0||xe!==0){let ke=((dt-Je)*Ie+(Ge-je)*xe)/(Ie*Ie+xe*xe);ke>1?(Je=tt,je=xt):ke>0&&(Je+=Ie*ke,je+=xe*ke)}return Ie=dt-Je,xe=Ge-je,Ie*Ie+xe*xe}function Fe(dt,Ge,Je,je){let tt={id:dt==null?null:dt,type:Ge,geometry:Je,tags:je,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ge==="Point"||Ge==="MultiPoint"||Ge==="LineString")Pe(tt,Je);else if(Ge==="Polygon")Pe(tt,Je[0]);else if(Ge==="MultiLineString")for(let xt of Je)Pe(tt,xt);else if(Ge==="MultiPolygon")for(let xt of Je)Pe(tt,xt[0]);return tt}function Pe(dt,Ge){for(let Je=0;Je0&&(Ie+=je?(tt*ir-vt*xt)/2:Math.sqrt(Math.pow(vt-tt,2)+Math.pow(ir-xt,2))),tt=vt,xt=ir}let xe=Ge.length-3;Ge[2]=1,Le(Ge,0,xe,Je),Ge[xe+2]=1,Ge.size=Math.abs(Ie),Ge.start=0,Ge.end=Ge.size}function Ze(dt,Ge,Je,je){for(let tt=0;tt1?1:Je}function Zt(dt,Ge,Je,je,tt,xt,Ie,xe){if(je/=Ge,xt>=(Je/=Ge)&&Ie=je)return null;let ke=[];for(let vt of dt){let ir=vt.geometry,ar=vt.type,vr=tt===0?vt.minX:vt.minY,ii=tt===0?vt.maxX:vt.maxY;if(vr>=Je&&ii=je)continue;let pi=[];if(ar==="Point"||ar==="MultiPoint")st(ir,pi,Je,je,tt);else if(ar==="LineString")lt(ir,pi,Je,je,tt,!1,xe.lineMetrics);else if(ar==="MultiLineString")Nt(ir,pi,Je,je,tt,!1);else if(ar==="Polygon")Nt(ir,pi,Je,je,tt,!0);else if(ar==="MultiPolygon")for(let $r of ir){let di=[];Nt($r,di,Je,je,tt,!0),di.length&&pi.push(di)}if(pi.length){if(xe.lineMetrics&&ar==="LineString"){for(let $r of pi)ke.push(Fe(vt.id,ar,$r,vt.tags));continue}ar!=="LineString"&&ar!=="MultiLineString"||(pi.length===1?(ar="LineString",pi=pi[0]):ar="MultiLineString"),ar!=="Point"&&ar!=="MultiPoint"||(ar=pi.length===3?"Point":"MultiPoint"),ke.push(Fe(vt.id,ar,pi,vt.tags))}}return ke.length?ke:null}function st(dt,Ge,Je,je,tt){for(let xt=0;xt=Je&&Ie<=je&&Jt(Ge,dt[xt],dt[xt+1],dt[xt+2])}}function lt(dt,Ge,Je,je,tt,xt,Ie){let xe=Gt(dt),ke=tt===0?sr:wr,vt,ir,ar=dt.start;for(let di=0;diJe&&(ir=ke(xe,ji,In,On,qn,Je),Ie&&(xe.start=ar+vt*ir)):Fn>je?ra=Je&&(ir=ke(xe,ji,In,On,qn,Je),la=!0),ra>je&&Fn<=je&&(ir=ke(xe,ji,In,On,qn,je),la=!0),!xt&&la&&(Ie&&(xe.end=ar+vt*ir),Ge.push(xe),xe=Gt(dt)),Ie&&(ar+=vt)}let vr=dt.length-3,ii=dt[vr],pi=dt[vr+1],$r=tt===0?ii:pi;$r>=Je&&$r<=je&&Jt(xe,ii,pi,dt[vr+2]),vr=xe.length-3,xt&&vr>=3&&(xe[vr]!==xe[0]||xe[vr+1]!==xe[1])&&Jt(xe,xe[0],xe[1],xe[2]),xe.length&&Ge.push(xe)}function Gt(dt){let Ge=[];return Ge.size=dt.size,Ge.start=dt.start,Ge.end=dt.end,Ge}function Nt(dt,Ge,Je,je,tt,xt){for(let Ie of dt)lt(Ie,Ge,Je,je,tt,xt,!1)}function Jt(dt,Ge,Je,je){dt.push(Ge,Je,je)}function sr(dt,Ge,Je,je,tt,xt){let Ie=(xt-Ge)/(je-Ge);return Jt(dt,xt,Je+(tt-Je)*Ie,1),Ie}function wr(dt,Ge,Je,je,tt,xt){let Ie=(xt-Je)/(tt-Je);return Jt(dt,Ge+(je-Ge)*Ie,xt,1),Ie}function cr(dt,Ge){let Je=[];for(let je=0;je0&&Ge.size<(tt?Ie:je))return void(Je.numPoints+=Ge.length/3);let xe=[];for(let ke=0;keIe)&&(Je.numSimplified++,xe.push(Ge[ke],Ge[ke+1])),Je.numPoints++;tt&&function(ke,vt){let ir=0;for(let ar=0,vr=ke.length,ii=vr-2;ar0===vt)for(let ar=0,vr=ke.length;ar24)throw new Error("maxZoom should be in the 0-24 range");if(Je.promoteId&&Je.generateId)throw new Error("promoteId and generateId cannot be used together.");let tt=function(xt,Ie){let xe=[];if(xt.type==="FeatureCollection")for(let ke=0;ke1&&console.time("creation"),ii=this.tiles[vr]=Vt(Ge,Je,je,tt,vt),this.tileCoords.push({z:Je,x:je,y:tt}),ir)){ir>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Je,je,tt,ii.numFeatures,ii.numPoints,ii.numSimplified),console.timeEnd("creation"));let la=`z${Je}`;this.stats[la]=(this.stats[la]||0)+1,this.total++}if(ii.source=Ge,xt==null){if(Je===vt.indexMaxZoom||ii.numPoints<=vt.indexMaxPoints)continue}else{if(Je===vt.maxZoom||Je===xt)continue;if(xt!=null){let la=xt-Je;if(je!==Ie>>la||tt!==xe>>la)continue}}if(ii.source=null,Ge.length===0)continue;ir>1&&console.time("clipping");let pi=.5*vt.buffer/vt.extent,$r=.5-pi,di=.5+pi,ji=1+pi,In=null,wi=null,On=null,qn=null,Fn=Zt(Ge,ar,je-pi,je+di,0,ii.minX,ii.maxX,vt),ra=Zt(Ge,ar,je+$r,je+ji,0,ii.minX,ii.maxX,vt);Ge=null,Fn&&(In=Zt(Fn,ar,tt-pi,tt+di,1,ii.minY,ii.maxY,vt),wi=Zt(Fn,ar,tt+$r,tt+ji,1,ii.minY,ii.maxY,vt),Fn=null),ra&&(On=Zt(ra,ar,tt-pi,tt+di,1,ii.minY,ii.maxY,vt),qn=Zt(ra,ar,tt+$r,tt+ji,1,ii.minY,ii.maxY,vt),ra=null),ir>1&&console.timeEnd("clipping"),ke.push(In||[],Je+1,2*je,2*tt),ke.push(wi||[],Je+1,2*je,2*tt+1),ke.push(On||[],Je+1,2*je+1,2*tt),ke.push(qn||[],Je+1,2*je+1,2*tt+1)}}getTile(Ge,Je,je){Ge=+Ge,Je=+Je,je=+je;let tt=this.options,{extent:xt,debug:Ie}=tt;if(Ge<0||Ge>24)return null;let xe=1<1&&console.log("drilling down to z%d-%d-%d",Ge,Je,je);let vt,ir=Ge,ar=Je,vr=je;for(;!vt&&ir>0;)ir--,ar>>=1,vr>>=1,vt=this.tiles[lr(ir,ar,vr)];return vt&&vt.source?(Ie>1&&(console.log("found parent tile z%d-%d-%d",ir,ar,vr),console.time("drilling down")),this.splitTile(vt.source,ir,ar,vr,Ge,Je,je),Ie>1&&console.timeEnd("drilling down"),this.tiles[ke]?St(this.tiles[ke],xt):null):null}}function lr(dt,Ge,Je){return 32*((1<{ar.properties=ii;let pi={};for(let $r of vr)pi[$r]=ke[$r].evaluate(ir,ar);return pi},Ie.reduce=(ii,pi)=>{ar.properties=pi;for(let $r of vr)ir.accumulated=ii[$r],ii[$r]=vt[$r].evaluate(ir,ar)},Ie}(Ge)).load((yield this._pendingData).features):(tt=yield this._pendingData,new er(tt,Ge.geojsonVtOptions)),this.loaded={};let xt={};if(je){let Ie=je.finish();Ie&&(xt.resourceTiming={},xt.resourceTiming[Ge.source]=JSON.parse(JSON.stringify(Ie)))}return xt}catch(xt){if(delete this._pendingRequest,i.bB(xt))return{abandoned:!0};throw xt}var tt})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ge){let Je=this.loaded;return Je&&Je[Ge.uid]?super.reloadTile(Ge):this.loadTile(Ge)}loadAndProcessGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let je=yield this.loadGeoJSON(Ge,Je);if(delete this._pendingRequest,typeof je!="object")throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(d(je,!0),Ge.filter){let tt=i.bC(Ge.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(tt.result==="error")throw new Error(tt.value.map(Ie=>`${Ie.key}: ${Ie.message}`).join(", "));je={type:"FeatureCollection",features:je.features.filter(Ie=>tt.value.evaluate({zoom:0},Ie))}}return je})}loadGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let{promoteId:je}=Ge;if(Ge.request){let tt=yield i.h(Ge.request,Je);return this._dataUpdateable=Lr(tt.data,je)?ti(tt.data,je):void 0,tt.data}if(typeof Ge.data=="string")try{let tt=JSON.parse(Ge.data);return this._dataUpdateable=Lr(tt,je)?ti(tt,je):void 0,tt}catch(tt){throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`)}if(!Ge.dataDiff)throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ge.source}`);return function(tt,xt,Ie){var xe,ke,vt,ir;if(xt.removeAll&&tt.clear(),xt.remove)for(let ar of xt.remove)tt.delete(ar);if(xt.add)for(let ar of xt.add){let vr=Tr(ar,Ie);vr!=null&&tt.set(vr,ar)}if(xt.update)for(let ar of xt.update){let vr=tt.get(ar.id);if(vr==null)continue;let ii=!ar.removeAllProperties&&(((xe=ar.removeProperties)===null||xe===void 0?void 0:xe.length)>0||((ke=ar.addOrUpdateProperties)===null||ke===void 0?void 0:ke.length)>0);if((ar.newGeometry||ar.removeAllProperties||ii)&&(vr=Object.assign({},vr),tt.set(ar.id,vr),ii&&(vr.properties=Object.assign({},vr.properties))),ar.newGeometry&&(vr.geometry=ar.newGeometry),ar.removeAllProperties)vr.properties={};else if(((vt=ar.removeProperties)===null||vt===void 0?void 0:vt.length)>0)for(let pi of ar.removeProperties)Object.prototype.hasOwnProperty.call(vr.properties,pi)&&delete vr.properties[pi];if(((ir=ar.addOrUpdateProperties)===null||ir===void 0?void 0:ir.length)>0)for(let{key:pi,value:$r}of ar.addOrUpdateProperties)vr.properties[pi]=$r}}(this._dataUpdateable,Ge.dataDiff,je),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ge){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ge){return this._geoJSONIndex.getClusterExpansionZoom(Ge.clusterId)}getClusterChildren(Ge){return this._geoJSONIndex.getChildren(Ge.clusterId)}getClusterLeaves(Ge){return this._geoJSONIndex.getLeaves(Ge.clusterId,Ge.limit,Ge.offset)}}class Vr{constructor(Ge){this.self=Ge,this.actor=new i.F(Ge),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,je)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name "${Je}" already registered.`);this.externalWorkerSourceTypes[Je]=je},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Je=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Je)},this.actor.registerMessageHandler("LDT",(Je,je)=>this._getDEMWorkerSource(Je,je.source).loadTile(je)),this.actor.registerMessageHandler("RDT",(Je,je)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,je.source).removeTile(je)})),this.actor.registerMessageHandler("GCEZ",(Je,je)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,je.type,je.source).getClusterExpansionZoom(je)})),this.actor.registerMessageHandler("GCC",(Je,je)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,je.type,je.source).getClusterChildren(je)})),this.actor.registerMessageHandler("GCL",(Je,je)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,je.type,je.source).getClusterLeaves(je)})),this.actor.registerMessageHandler("LD",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).loadData(je)),this.actor.registerMessageHandler("GD",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).getData()),this.actor.registerMessageHandler("LT",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).loadTile(je)),this.actor.registerMessageHandler("RT",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).reloadTile(je)),this.actor.registerMessageHandler("AT",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).abortTile(je)),this.actor.registerMessageHandler("RMT",(Je,je)=>this._getWorkerSource(Je,je.type,je.source).removeTile(je)),this.actor.registerMessageHandler("RS",(Je,je)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][je.type]||!this.workerSources[Je][je.type][je.source])return;let tt=this.workerSources[Je][je.type][je.source];delete this.workerSources[Je][je.type][je.source],tt.removeSource!==void 0&&tt.removeSource(je)})),this.actor.registerMessageHandler("RM",Je=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler("SR",(Je,je)=>i._(this,void 0,void 0,function*(){this.referrer=je})),this.actor.registerMessageHandler("SRPS",(Je,je)=>this._syncRTLPluginState(Je,je)),this.actor.registerMessageHandler("IS",(Je,je)=>i._(this,void 0,void 0,function*(){this.self.importScripts(je)})),this.actor.registerMessageHandler("SI",(Je,je)=>this._setImages(Je,je)),this.actor.registerMessageHandler("UL",(Je,je)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(je.layers,je.removedIds)})),this.actor.registerMessageHandler("SL",(Je,je)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(je)}))}_setImages(Ge,Je){return i._(this,void 0,void 0,function*(){this.availableImages[Ge]=Je;for(let je in this.workerSources[Ge]){let tt=this.workerSources[Ge][je];for(let xt in tt)tt[xt].availableImages=Je}})}_syncRTLPluginState(Ge,Je){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Je.pluginStatus!=="loading")return i.bD.setState(Je),Je;let je=Je.pluginURL;if(this.self.importScripts(je),i.bD.isParsed()){let tt={pluginStatus:"loaded",pluginURL:je};return i.bD.setState(tt),tt}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${je}`)})}_getAvailableImages(Ge){let Je=this.availableImages[Ge];return Je||(Je=[]),Je}_getLayerIndex(Ge){let Je=this.layerIndexes[Ge];return Je||(Je=this.layerIndexes[Ge]=new a),Je}_getWorkerSource(Ge,Je,je){if(this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][Je]||(this.workerSources[Ge][Je]={}),!this.workerSources[Ge][Je][je]){let tt={sendAsync:(xt,Ie)=>(xt.targetMapId=Ge,this.actor.sendAsync(xt,Ie))};switch(Je){case"vector":this.workerSources[Ge][Je][je]=new u(tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;case"geojson":this.workerSources[Ge][Je][je]=new Br(tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;default:this.workerSources[Ge][Je][je]=new this.externalWorkerSourceTypes[Je](tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge))}}return this.workerSources[Ge][Je][je]}_getDEMWorkerSource(Ge,Je){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][Je]||(this.demWorkerSources[Ge][Je]=new c),this.demWorkerSources[Ge][Je]}}return i.i(self)&&(self.worker=new Vr(self)),Vr}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,l,u={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:ue=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);ue.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(ue,w=0){return this.getImageCanvasContext(ue).getImageData(-w,-w,ue.width+2*w,ue.height+2*w)},getImageCanvasContext(ue){let w=window.document.createElement("canvas"),B=w.getContext("2d",{willReadFrequently:!0});if(!B)throw new Error("failed to create canvas 2d context");return w.width=ue.width,w.height=ue.height,B.drawImage(ue,0,0,ue.width,ue.height),B},resolveURL:ue=>(s||(s=document.createElement("a")),s.href=ue,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia("(prefers-reduced-motion: reduce)")),l.matches)}};class c{static testProp(w){if(!c.docStyle)return w[0];for(let B=0;B{window.removeEventListener("click",c.suppressClickInternal,!0)},0)}static getScale(w){let B=w.getBoundingClientRect();return{x:B.width/w.offsetWidth||1,y:B.height/w.offsetHeight||1,boundingClientRect:B}}static getPoint(w,B,Q){let ee=B.boundingClientRect;return new a.P((Q.clientX-ee.left)/B.x-w.clientLeft,(Q.clientY-ee.top)/B.y-w.clientTop)}static mousePos(w,B){let Q=c.getScale(w);return c.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=c.getScale(w);for(let le=0;le{h&&b(h),h=null,_=!0},d.onerror=()=>{v=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(ue){let w,B,Q,ee;ue.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},ue.addThrottleControl=ot=>{let Tt=Q++;return ee[Tt]=ot,Tt},ue.removeThrottleControl=ot=>{delete ee[ot],qe()},ue.getImage=(ot,Tt,Yt=!0)=>new Promise((Kt,xr)=>{f.supported&&(ot.headers||(ot.headers={}),ot.headers.accept="image/webp,*/*"),a.e(ot,{type:"image"}),w.push({abortController:Tt,requestParameters:ot,supportImageRefresh:Yt,state:"queued",onError:Ir=>{xr(Ir)},onSuccess:Ir=>{Kt(Ir)}}),qe()});let le=ot=>a._(this,void 0,void 0,function*(){ot.state="running";let{requestParameters:Tt,supportImageRefresh:Yt,onError:Kt,onSuccess:xr,abortController:Ir}=ot,ve=Yt===!1&&!a.i(self)&&!a.g(Tt.url)&&(!Tt.headers||Object.keys(Tt.headers).reduce((Be,et)=>Be&&et==="accept",!0));B++;let be=ve?Xe(Tt,Ir):a.m(Tt,Ir);try{let Be=yield be;delete ot.abortController,ot.state="completed",Be.data instanceof HTMLImageElement||a.b(Be.data)?xr(Be):Be.data&&xr({data:yield(De=Be.data,typeof createImageBitmap=="function"?a.d(De):a.f(De)),cacheControl:Be.cacheControl,expires:Be.expires})}catch(Be){delete ot.abortController,Kt(Be)}finally{B--,qe()}var De}),qe=()=>{let ot=(()=>{for(let Tt of Object.keys(ee))if(ee[Tt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Tt=B;Tt0;Tt++){let Yt=w.shift();Yt.abortController.signal.aborted?Tt--:le(Yt)}},Xe=(ot,Tt)=>new Promise((Yt,Kt)=>{let xr=new Image,Ir=ot.url,ve=ot.credentials;ve&&ve==="include"?xr.crossOrigin="use-credentials":(ve&&ve==="same-origin"||!a.s(Ir))&&(xr.crossOrigin="anonymous"),Tt.signal.addEventListener("abort",()=>{xr.src="",Kt(a.c())}),xr.fetchPriority="high",xr.onload=()=>{xr.onerror=xr.onload=null,Yt({data:xr})},xr.onerror=()=>{xr.onerror=xr.onload=null,Tt.signal.aborted||Kt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},xr.src=Ir})}(p||(p={})),p.resetRequestQueue();class k{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function E(ue){var w=new a.A(3);return w[0]=ue[0],w[1]=ue[1],w[2]=ue[2],w}var S,L=function(ue,w,B){return ue[0]=w[0]-B[0],ue[1]=w[1]-B[1],ue[2]=w[2]-B[2],ue};S=new a.A(3),a.A!=Float32Array&&(S[0]=0,S[1]=0,S[2]=0);var x=function(ue){var w=ue[0],B=ue[1];return w*w+B*B};function C(ue){let w=[];if(typeof ue=="string")w.push({id:"default",url:ue});else if(ue&&ue.length>0){let B=[];for(let{id:Q,url:ee}of ue){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function M(ue,w,B){let Q=ue.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var ue=new a.A(2);a.A!=Float32Array&&(ue[0]=0,ue[1]=0)})();class g{constructor(w,B,Q,ee){this.context=w,this.format=Q,this.texture=w.gl.createTexture(),this.update(B,ee)}update(w,B,Q){let{width:ee,height:le}=w,qe=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:Xe}=this,{gl:ot}=Xe;if(this.useMipmap=!!(B&&B.useMipmap),ot.bindTexture(ot.TEXTURE_2D,this.texture),Xe.pixelStoreUnpackFlipY.set(!1),Xe.pixelStoreUnpack.set(1),Xe.pixelStoreUnpackPremultiplyAlpha.set(this.format===ot.RGBA&&(!B||B.premultiply!==!1)),qe)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ot.texImage2D(ot.TEXTURE_2D,0,this.format,this.format,ot.UNSIGNED_BYTE,w):ot.texImage2D(ot.TEXTURE_2D,0,this.format,ee,le,0,this.format,ot.UNSIGNED_BYTE,w.data);else{let{x:Tt,y:Yt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ot.texSubImage2D(ot.TEXTURE_2D,0,Tt,Yt,ot.RGBA,ot.UNSIGNED_BYTE,w):ot.texSubImage2D(ot.TEXTURE_2D,0,Tt,Yt,ee,le,ot.RGBA,ot.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&ot.generateMipmap(ot.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:le}=ee;le.bindTexture(le.TEXTURE_2D,this.texture),Q!==le.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=le.LINEAR),w!==this.filter&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,w),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,B),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,B),this.wrap=B)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:w}=this.context;w.deleteTexture(this.texture),this.texture=null}}function P(ue){let{userImage:w}=ue;return!!(w&&w.render&&w.render())&&(ue.data.replace(new Uint8Array(w.data.buffer)),!0)}class T extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(w){if(this.loaded!==w&&(this.loaded=w,w)){for(let{ids:B,promiseResolve:Q}of this.requestors)Q(this._getImagesForIds(B));this.requestors=[]}}getImage(w){let B=this.images[w];if(B&&!B.data&&B.spriteData){let Q=B.spriteData;B.data=new a.R({width:Q.width,height:Q.height},Q.context.getImageData(Q.x,Q.y,Q.width,Q.height).data),B.spriteData=null}return B}addImage(w,B){if(this.images[w])throw new Error(`Image id ${w} already exist, use updateImage instead`);this._validate(w,B)&&(this.images[w]=B)}_validate(w,B){let Q=!0,ee=B.data||B.spriteData;return this._validateStretch(B.stretchX,ee&&ee.width)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchX" value`))),Q=!1),this._validateStretch(B.stretchY,ee&&ee.height)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchY" value`))),Q=!1),this._validateContent(B.content,B)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "content" value`))),Q=!1),Q}_validateStretch(w,B){if(!w)return!0;let Q=0;for(let ee of w){if(ee[0]{let ee=!0;if(!this.isLoaded())for(let le of w)this.images[le]||(ee=!1);this.isLoaded()||ee?B(this._getImagesForIds(w)):this.requestors.push({ids:w,promiseResolve:B})})}_getImagesForIds(w){let B={};for(let Q of w){let ee=this.getImage(Q);ee||(this.fire(new a.k("styleimagemissing",{id:Q})),ee=this.getImage(Q)),ee?B[Q]={data:ee.data.clone(),pixelRatio:ee.pixelRatio,sdf:ee.sdf,version:ee.version,stretchX:ee.stretchX,stretchY:ee.stretchY,content:ee.content,textFitWidth:ee.textFitWidth,textFitHeight:ee.textFitHeight,hasRenderCallback:!!(ee.userImage&&ee.userImage.render)}:a.w(`Image "${Q}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return B}getPixelSize(){let{width:w,height:B}=this.atlasImage;return{width:w,height:B}}getPattern(w){let B=this.patterns[w],Q=this.getImage(w);if(!Q)return null;if(B&&B.position.version===Q.version)return B.position;if(B)B.position.version=Q.version;else{let ee={w:Q.data.width+2,h:Q.data.height+2,x:0,y:0},le=new a.I(ee,Q);this.patterns[w]={bin:ee,position:le}}return this._updatePatternAtlas(),this.patterns[w].position}bind(w){let B=w.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new g(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let le in this.patterns)w.push(this.patterns[le].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let le in this.patterns){let{bin:qe}=this.patterns[le],Xe=qe.x+1,ot=qe.y+1,Tt=this.getImage(le).data,Yt=Tt.width,Kt=Tt.height;a.R.copy(Tt,ee,{x:0,y:0},{x:Xe,y:ot},{width:Yt,height:Kt}),a.R.copy(Tt,ee,{x:0,y:Kt-1},{x:Xe,y:ot-1},{width:Yt,height:1}),a.R.copy(Tt,ee,{x:0,y:0},{x:Xe,y:ot+Kt},{width:Yt,height:1}),a.R.copy(Tt,ee,{x:Yt-1,y:0},{x:Xe-1,y:ot},{width:1,height:Kt}),a.R.copy(Tt,ee,{x:0,y:0},{x:Xe+Yt,y:ot},{width:1,height:Kt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(w){for(let B of w){if(this.callbackDispatchedThisFrame[B])continue;this.callbackDispatchedThisFrame[B]=!0;let Q=this.getImage(B);Q||a.w(`Image with ID: "${B}" was not found`),P(Q)&&this.updateImage(B,Q)}}}let z=1e20;function O(ue,w,B,Q,ee,le,qe,Xe,ot){for(let Tt=w;Tt-1);ot++,le[ot]=Xe,qe[ot]=Tt,qe[ot+1]=z}for(let Xe=0,ot=0;Xe65535)throw new Error("glyphs > 65535 not supported");if(Q.ranges[le])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error("glyphsUrl is not set");if(!Q.requests[le]){let Xe=G.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=Xe}let qe=yield Q.requests[le];for(let Xe in qe)this._doesCharSupportLocalGlyph(+Xe)||(Q.glyphs[+Xe]=qe[+Xe]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:qe[B]||null}})}_doesCharSupportLocalGlyph(w){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(w))}_tinySDF(w,B,Q){let ee=this.localIdeographFontFamily;if(!ee||!this._doesCharSupportLocalGlyph(Q))return;let le=w.tinySDF;if(!le){let Xe="400";/bold/i.test(B)?Xe="900":/medium/i.test(B)?Xe="500":/light/i.test(B)&&(Xe="200"),le=w.tinySDF=new G.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:Xe})}let qe=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:qe.width||60,height:qe.height||60},qe.data),metrics:{width:qe.glyphWidth/2||24,height:qe.glyphHeight/2||24,left:qe.glyphLeft/2+.5||0,top:qe.glyphTop/2-27.5||-8,advance:qe.glyphAdvance/2||24,isDoubleResolution:!0}}}}G.loadGlyphRange=function(ue,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,qe=Q.transformRequest(B.replace("{fontstack}",ue).replace("{range}",`${ee}-${le}`),"Glyphs"),Xe=yield a.l(qe,new AbortController);if(!Xe||!Xe.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let ot={};for(let Tt of a.n(Xe.data))ot[Tt.id]=Tt;return ot})},G.TinySDF=class{constructor({fontSize:ue=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:qe="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let Xe=this.size=ue+4*w,ot=this._createCanvas(Xe),Tt=this.ctx=ot.getContext("2d",{willReadFrequently:!0});Tt.font=`${qe} ${le} ${ue}px ${ee}`,Tt.textBaseline="alphabetic",Tt.textAlign="left",Tt.fillStyle="black",this.gridOuter=new Float64Array(Xe*Xe),this.gridInner=new Float64Array(Xe*Xe),this.f=new Float64Array(Xe),this.z=new Float64Array(Xe+1),this.v=new Uint16Array(Xe)}_createCanvas(ue){let w=document.createElement("canvas");return w.width=w.height=ue,w}draw(ue){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(ue),qe=Math.ceil(B),Xe=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),ot=Math.min(this.size-this.buffer,qe+Math.ceil(Q)),Tt=Xe+2*this.buffer,Yt=ot+2*this.buffer,Kt=Math.max(Tt*Yt,0),xr=new Uint8ClampedArray(Kt),Ir={data:xr,width:Tt,height:Yt,glyphWidth:Xe,glyphHeight:ot,glyphTop:qe,glyphLeft:0,glyphAdvance:w};if(Xe===0||ot===0)return Ir;let{ctx:ve,buffer:be,gridInner:De,gridOuter:Be}=this;ve.clearRect(be,be,Xe,ot),ve.fillText(ue,be,be+qe);let et=ve.getImageData(be,be,Xe,ot);Be.fill(z,0,Kt),De.fill(0,0,Kt);for(let We=0;We0?tr*tr:0,De[Ht]=tr<0?tr*tr:0}}O(Be,0,0,Tt,Yt,Tt,this.f,this.v,this.z),O(De,be,be,Xe,ot,Tt,this.f,this.v,this.z);for(let We=0;We1&&(ot=w[++Xe]);let Yt=Math.abs(Tt-ot.left),Kt=Math.abs(Tt-ot.right),xr=Math.min(Yt,Kt),Ir,ve=le/Q*(ee+1);if(ot.isDash){let be=ee-Math.abs(ve);Ir=Math.sqrt(xr*xr+be*be)}else Ir=ee-Math.sqrt(xr*xr+ve*ve);this.data[qe+Tt]=Math.max(0,Math.min(255,Ir+128))}}}addRegularDash(w){for(let Xe=w.length-1;Xe>=0;--Xe){let ot=w[Xe],Tt=w[Xe+1];ot.zeroLength?w.splice(Xe,1):Tt&&Tt.isDash===ot.isDash&&(Tt.left=ot.left,w.splice(Xe,1))}let B=w[0],Q=w[w.length-1];B.isDash===Q.isDash&&(B.left=Q.left-this.width,Q.right=B.right+this.width);let ee=this.width*this.nextRow,le=0,qe=w[le];for(let Xe=0;Xe1&&(qe=w[++le]);let ot=Math.abs(Xe-qe.left),Tt=Math.abs(Xe-qe.right),Yt=Math.min(ot,Tt);this.data[ee+Xe]=Math.max(0,Math.min(255,(qe.isDash?Yt:-Yt)+128))}}addDash(w,B){let Q=B?7:0,ee=2*Q+1;if(this.nextRow+ee>this.height)return a.w("LineAtlas out of space"),null;let le=0;for(let Xe=0;Xe{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let Ce=Math.floor(u.hardwareConcurrency/2),me,ie;function Se(){return me||(me=new Ee),me}Ee.workerCount=a.C(globalThis)?Math.max(Math.min(Ce,3),1):1;class Le{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function Ae(){return ie||(ie=new Le(Se(),a.G),ie.registerMessageHandler("GR",(ue,w,B)=>a.m(w,B))),ie}function Fe(ue,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*ue.width,.5*ue.height,1]),a.L(B,B,ue.calculatePosMatrix(w.toUnwrapped()))}function Pe(ue,w,B,Q,ee,le){let qe=function(Kt,xr,Ir){if(Kt)for(let ve of Kt){let be=xr[ve];if(be&&be.source===Ir&&be.type==="fill-extrusion")return!0}else for(let ve in xr){let be=xr[ve];if(be.source===Ir&&be.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,ue.id),Xe=le.maxPitchScaleFactor(),ot=ue.tilesIn(Q,Xe,qe);ot.sort(ge);let Tt=[];for(let Kt of ot)Tt.push({wrappedTileID:Kt.tileID.wrapped().key,queryResults:Kt.tile.queryRenderedFeatures(w,B,ue._state,Kt.queryGeometry,Kt.cameraQueryGeometry,Kt.scale,ee,le,Xe,Fe(ue.transform,Kt.tileID))});let Yt=function(Kt){let xr={},Ir={};for(let ve of Kt){let be=ve.queryResults,De=ve.wrappedTileID,Be=Ir[De]=Ir[De]||{};for(let et in be){let We=be[et],it=Be[et]=Be[et]||{},Ft=xr[et]=xr[et]||[];for(let Ht of We)it[Ht.featureIndex]||(it[Ht.featureIndex]=!0,Ft.push(Ht))}}return xr}(Tt);for(let Kt in Yt)Yt[Kt].forEach(xr=>{let Ir=xr.feature,ve=ue.getFeatureState(Ir.layer["source-layer"],Ir.id);Ir.source=Ir.layer.source,Ir.layer["source-layer"]&&(Ir.sourceLayer=Ir.layer["source-layer"]),Ir.state=ve});return Yt}function ge(ue,w){let B=ue.tileID,Q=w.tileID;return B.overscaledZ-Q.overscaledZ||B.canonical.y-Q.canonical.y||B.wrap-Q.wrap||B.canonical.x-Q.canonical.x}function Re(ue,w,B){return a._(this,void 0,void 0,function*(){let Q=ue;if(ue.url?Q=(yield a.h(w.transformRequest(ue.url,"Source"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,ue),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(le=>le.id)),ee})}class ce{constructor(w,B){w&&(B?this.setSouthWest(w).setNorthEast(B):Array.isArray(w)&&(w.length===4?this.setSouthWest([w[0],w[1]]).setNorthEast([w[2],w[3]]):this.setSouthWest(w[0]).setNorthEast(w[1])))}setNorthEast(w){return this._ne=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}setSouthWest(w){return this._sw=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}extend(w){let B=this._sw,Q=this._ne,ee,le;if(w instanceof a.N)ee=w,le=w;else{if(!(w instanceof ce))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(ce.convert(w)):this.extend(a.N.convert(w)):w&&("lng"in w||"lon"in w)&&"lat"in w?this.extend(a.N.convert(w)):this;if(ee=w._sw,le=w._ne,!ee||!le)return this}return B||Q?(B.lng=Math.min(ee.lng,B.lng),B.lat=Math.min(ee.lat,B.lat),Q.lng=Math.max(le.lng,Q.lng),Q.lat=Math.max(le.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(le.lng,le.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(w){let{lng:B,lat:Q}=a.N.convert(w),ee=this._sw.lng<=B&&B<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ee=this._sw.lng>=B&&B>=this._ne.lng),this._sw.lat<=Q&&Q<=this._ne.lat&&ee}static convert(w){return w instanceof ce?w:w&&new ce(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new ce(new a.N(w.lng-ee,w.lat-Q),new a.N(w.lng+ee,w.lat+Q))}adjustAntiMeridian(){let w=new a.N(this._sw.lng,this._sw.lat),B=new a.N(this._ne.lng,this._ne.lat);return new ce(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class Ze{constructor(w,B,Q){this.bounds=ce.convert(this.validateBounds(w)),this.minzoom=B||0,this.maxzoom=Q||24}validateBounds(w){return Array.isArray(w)&&w.length===4?[Math.max(-180,w[0]),Math.max(-90,w[1]),Math.min(180,w[2]),Math.min(90,w[3])]:[-180,-90,180,90]}contains(w){let B=Math.pow(2,w.z),Q=Math.floor(a.O(this.bounds.getWest())*B),ee=Math.floor(a.Q(this.bounds.getNorth())*B),le=Math.ceil(a.O(this.bounds.getEast())*B),qe=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x=ee&&w.y{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q={request:this.map._requestManager.transformRequest(B,"Tile"),uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,tileSize:this.tileSize*w.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request.collectResourceTiming=this._collectResourceTiming;let ee="RT";if(w.actor&&w.state!=="expired"){if(w.state==="loading")return new Promise((le,qe)=>{w.reloadPromise={resolve:le,reject:qe}})}else w.actor=this.dispatcher.getActor(),ee="LT";w.abortController=new AbortController;try{let le=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,le)}catch(le){if(delete w.abortController,w.aborted)return;if(le&&le.status!==404)throw le;this._afterTileLoadWorkerResponse(w,null)}})}_afterTileLoadWorkerResponse(w,B){if(B&&B.resourceTiming&&(w.resourceTiming=B.resourceTiming),B&&this.map._refreshExpiredTiles&&w.setExpiryData(B),w.loadVectorData(B,this.map.painter),w.reloadPromise){let Q=w.reloadPromise;w.reloadPromise=null,this.loadTile(w).then(Q.resolve).catch(Q.reject)}}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.actor&&(yield w.actor.sendAsync({type:"AT",data:{uid:w.uid,type:this.type,source:this.id}}))})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),w.actor&&(yield w.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class pt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.setEventedParent(ee),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},B),a.e(this,a.M(B,["url","scheme","tileSize"]))}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let w=yield Re(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new Ze(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}onAdd(w){this.map=w,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(w){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}serialize(){return a.e({},this._options)}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);w.abortController=new AbortController;try{let Q=yield p.getImage(this.map._requestManager.transformRequest(B,"Tile"),w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(Q&&Q.data){this.map._refreshExpiredTiles&&Q.cacheControl&&Q.expires&&w.setExpiryData({cacheControl:Q.cacheControl,expires:Q.expires});let ee=this.map.painter.context,le=ee.gl,qe=Q.data;w.texture=this.map.painter.getTileTexture(qe.width),w.texture?w.texture.update(qe,{useMipmap:!0}):(w.texture=new g(ee,qe,le.RGBA,{useMipmap:!0}),w.texture.bind(le.LINEAR,le.CLAMP_TO_EDGE,le.LINEAR_MIPMAP_NEAREST)),w.state="loaded"}}catch(Q){if(delete w.abortController,w.aborted)w.state="unloaded";else if(Q)throw w.state="errored",Q}})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController)})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.texture&&this.map.painter.saveTileTexture(w.texture)})}hasTransition(){return!1}}class Zt extends pt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},B),this.encoding=B.encoding||"mapbox",this.redFactor=B.redFactor,this.greenFactor=B.greenFactor,this.blueFactor=B.blueFactor,this.baseShift=B.baseShift}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q=this.map._requestManager.transformRequest(B,"Tile");w.neighboringTiles=this._getNeighboringTiles(w.tileID),w.abortController=new AbortController;try{let ee=yield p.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(ee&&ee.data){let le=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let qe=a.b(le)&&a.U()?le:yield this.readImageNow(le),Xe={type:this.type,uid:w.uid,source:this.id,rawImageData:qe,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!w.actor||w.state==="expired"){w.actor=this.dispatcher.getActor();let ot=yield w.actor.sendAsync({type:"LDT",data:Xe});w.dem=ot,w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0,w.state="loaded"}}}catch(ee){if(delete w.abortController,w.aborted)w.state="unloaded";else if(ee)throw w.state="errored",ee}})}readImageNow(w){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame!="undefined"&&a.V()){let B=w.width+2,Q=w.height+2;try{return new a.R({width:B,height:Q},yield a.W(w,-1,-1,B,Q))}catch(ee){}}return u.getImageData(w,1)})}_getNeighboringTiles(w){let B=w.canonical,Q=Math.pow(2,B.z),ee=(B.x-1+Q)%Q,le=B.x===0?w.wrap-1:w.wrap,qe=(B.x+1+Q)%Q,Xe=B.x+1===Q?w.wrap+1:w.wrap,ot={};return ot[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},ot[new a.S(w.overscaledZ,Xe,B.z,qe,B.y).key]={backfilled:!1},B.y>0&&(ot[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},ot[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},ot[new a.S(w.overscaledZ,Xe,B.z,qe,B.y-1).key]={backfilled:!1}),B.y+10&&a.e(le,{resourceTiming:ee}),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"content"})))}catch(Q){if(this._pendingLoads--,this._removed)return void this.fire(new a.k("dataabort",{dataType:"source"}));this.fire(new a.j(Q))}})}loaded(){return this._pendingLoads===0}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.actor?"RT":"LT";w.actor=this.actor;let Q={type:this.type,uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};w.abortController=new AbortController;let ee=yield this.actor.sendAsync({type:B,data:Q},w.abortController);delete w.abortController,w.unloadVectorData(),w.aborted||w.loadVectorData(ee,this.map.painter,B==="RT")})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.aborted=!0})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var lt=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Gt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.coordinates=B.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ee),this.options=B}load(w){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let B=yield p.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,B&&B.data&&(this.image=B.data,w&&(this.coordinates=w),this._finishLoading())}catch(B){this._request=null,this._loaded=!0,this.fire(new a.j(B))}})}loaded(){return this._loaded}updateImage(w){return w.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=w.url,this.load(w.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(w){this.map=w,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(w){this.coordinates=w;let B=w.map(a.Z.fromLngLat);this.tileID=function(ee){let le=1/0,qe=1/0,Xe=-1/0,ot=-1/0;for(let xr of ee)le=Math.min(le,xr.x),qe=Math.min(qe,xr.y),Xe=Math.max(Xe,xr.x),ot=Math.max(ot,xr.y);let Tt=Math.max(Xe-le,ot-qe),Yt=Math.max(0,Math.floor(-Math.log(Tt)/Math.LN2)),Kt=Math.pow(2,Yt);return new a.a1(Yt,Math.floor((le+Xe)/2*Kt),Math.floor((qe+ot)/2*Kt))}(B),this.minzoom=this.maxzoom=this.tileID.z;let Q=B.map(ee=>this.tileID.getTilePoint(ee)._round());return this._boundsArray=new a.$,this._boundsArray.emplaceBack(Q[0].x,Q[0].y,0,0),this._boundsArray.emplaceBack(Q[1].x,Q[1].y,a.X,0),this._boundsArray.emplaceBack(Q[3].x,Q[3].y,0,a.X),this._boundsArray.emplaceBack(Q[2].x,Q[2].y,a.X,a.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,lt.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new g(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(w){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(w.tileID.canonical)?(this.tiles[String(w.tileID.wrap)]=w,w.buckets={}):w.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Nt extends Gt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.roundZoom=!0,this.type="video",this.options=B}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let w=this.options;this.urls=[];for(let B of w.urls)this.urls.push(this.map._requestManager.transformRequest(B,"Source").url);try{let B=yield a.a3(this.urls);if(this._loaded=!0,!B)return;this.video=B,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(B){this.fire(new a.j(B))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(w){if(this.video){let B=this.video.seekable;wB.end(0)?this.fire(new a.j(new a.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${B.start(0)} and ${B.end(0)}-second mark.`))):this.video.currentTime=w}}getVideo(){return this.video}onAdd(w){this.map||(this.map=w,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,lt.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE),B.texSubImage2D(B.TEXTURE_2D,0,0,0,B.RGBA,B.UNSIGNED_BYTE,this.video)):(this.texture=new g(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Jt extends Gt{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(le=>!Array.isArray(le)||le.length!==2||le.some(qe=>typeof qe!="number"))||this.fire(new a.j(new a.a2(`sources.${w}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property "coordinates"'))),B.animate&&typeof B.animate!="boolean"&&this.fire(new a.j(new a.a2(`sources.${w}`,null,'optional "animate" property must be a boolean value'))),B.canvas?typeof B.canvas=="string"||B.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.a2(`sources.${w}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property "canvas"'))),this.options=B,this.animate=B.animate===void 0||B.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(w){this.map=w,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let w=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,w=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,w=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let B=this.map.painter.context,Q=B.gl;this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,lt.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(w||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new g(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let qe=this.tiles[le];qe.state!=="loaded"&&(qe.state="loaded",qe.texture=this.texture,ee=!0)}ee&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let w of[this.canvas.width,this.canvas.height])if(isNaN(w)||w<=0)return!0;return!1}}let sr={},wr=ue=>{switch(ue){case"geojson":return st;case"image":return Gt;case"raster":return pt;case"raster-dem":return Zt;case"vector":return ut;case"video":return Nt;case"canvas":return Jt}return sr[ue]},cr="RTLPluginLoaded";class $e extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Ae()}_syncState(w){return this.status=w,this.dispatcher.broadcast("SRPS",{pluginStatus:w,pluginURL:this.url}).catch(B=>{throw this.status="error",B})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(w){return a._(this,arguments,void 0,function*(B,Q=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=u.resolveURL(B),!this.url)throw new Error(`requested url ${B} is invalid`);if(this.status==="unavailable"){if(!Q)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.k(cr))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let St=null;function Qt(){return St||(St=new $e),St}class Vt{constructor(w,B){this.timeAdded=0,this.fadeEndTime=0,this.tileID=w,this.uid=a.a4(),this.uses=0,this.tileSize=B,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(w){let B=w+this.timeAdded;Ble.getLayer(Tt)).filter(Boolean);if(ot.length!==0){Xe.layers=ot,Xe.stateDependentLayerIds&&(Xe.stateDependentLayers=Xe.stateDependentLayerIds.map(Tt=>ot.filter(Yt=>Yt.id===Tt)[0]));for(let Tt of ot)qe[Tt.id]=Xe}}return qe}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;le.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6&&le.hasRTLText){this.hasRTLText=!0,Qt().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let le=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(le))}w.imageAtlas&&(this.imageAtlas=w.imageAtlas),w.glyphAtlasImage&&(this.glyphAtlasImage=w.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let w in this.buckets)this.buckets[w].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(w){return this.buckets[w.id]}upload(w){for(let Q in this.buckets){let ee=this.buckets[Q];ee.uploadPending()&&ee.upload(w)}let B=w.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new g(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new g(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,qe,Xe,ot,Tt,Yt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:qe,tileSize:this.tileSize,pixelPosMatrix:Yt,transform:ot,params:Xe,queryPadding:this.queryPadding*Tt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),le=B&&B.sourceLayer?B.sourceLayer:"",qe=ee._geojsonTileLayer||ee[le];if(!qe)return;let Xe=a.a7(B&&B.filter),{z:ot,x:Tt,y:Yt}=this.tileID.canonical,Kt={z:ot,x:Tt,y:Yt};for(let xr=0;xrQ)ee=!1;else if(B)if(this.expirationTime{this.remove(w,le)},Q)),this.data[ee].push(le),this.order.push(ee),this.order.length>this.max){let qe=this._getAndRemoveByKey(this.order[0]);qe&&this.onRemove(qe)}return this}has(w){return w.wrapped().key in this.data}getAndRemove(w){return this.has(w)?this._getAndRemoveByKey(w.wrapped().key):null}_getAndRemoveByKey(w){let B=this.data[w].shift();return B.timeout&&clearTimeout(B.timeout),this.data[w].length===0&&delete this.data[w],this.order.splice(this.order.indexOf(w),1),B.value}getByKey(w){let B=this.data[w];return B?B[0].value:null}get(w){return this.has(w)?this.data[w.wrapped().key][0].value:null}remove(w,B){if(!this.has(w))return this;let Q=w.wrapped().key,ee=B===void 0?0:this.data[Q].indexOf(B),le=this.data[Q][ee];return this.data[Q].splice(ee,1),le.timeout&&clearTimeout(le.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(le.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class It{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let le in this.state[w])le!==ee&&(this.deletedStates[w][le]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let le in this.state[w][ee])Q[le]||(this.deletedStates[w][ee][le]=null)}else for(let le in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][le]===null&&delete this.deletedStates[w][ee][le]}removeFeatureState(w,B,Q){if(this.deletedStates[w]===null)return;let ee=String(B);if(this.deletedStates[w]=this.deletedStates[w]||{},Q&&B!==void 0)this.deletedStates[w][ee]!==null&&(this.deletedStates[w][ee]=this.deletedStates[w][ee]||{},this.deletedStates[w][ee][Q]=null);else if(B!==void 0)if(this.stateChanges[w]&&this.stateChanges[w][ee])for(Q in this.deletedStates[w][ee]={},this.stateChanges[w][ee])this.deletedStates[w][ee][Q]=null;else this.deletedStates[w][ee]=null;else this.deletedStates[w]=null}getState(w,B){let Q=String(B),ee=a.e({},(this.state[w]||{})[Q],(this.stateChanges[w]||{})[Q]);if(this.deletedStates[w]===null)return{};if(this.deletedStates[w]){let le=this.deletedStates[w][B];if(le===null)return{};for(let qe in le)delete ee[qe]}return ee}initializeTileState(w,B){w.setFeatureState(this.state,B)}coalesceChanges(w,B){let Q={};for(let ee in this.stateChanges){this.state[ee]=this.state[ee]||{};let le={};for(let qe in this.stateChanges[ee])this.state[ee][qe]||(this.state[ee][qe]={}),a.e(this.state[ee][qe],this.stateChanges[ee][qe]),le[qe]=this.state[ee][qe];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let qe in this.state[ee])le[qe]={},this.state[ee][qe]={};else for(let qe in this.deletedStates[ee]){if(this.deletedStates[ee][qe]===null)this.state[ee][qe]={};else for(let Xe of Object.keys(this.deletedStates[ee][qe]))delete this.state[ee][qe][Xe];le[qe]=this.state[ee][qe]}Q[ee]=Q[ee]||{},a.e(Q[ee],le)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class mt extends a.E{constructor(w,B,Q){super(),this.id=w,this.dispatcher=Q,this.on("data",ee=>this._dataHandler(ee)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ee,le,qe,Xe)=>{let ot=new(wr(le.type))(ee,le,qe,Xe);if(ot.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${ot.id}`);return ot})(w,B,Q,this),this._tiles={},this._cache=new _t(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new It,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!=="loaded"&&B.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state="errored",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k("dataabort",{tile:w,coord:w.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(er).map(w=>w.key)}getRenderableIds(w){let B=[];for(let Q in this._tiles)this._isIdRenderable(Q,w)&&B.push(this._tiles[Q]);return w?B.sort((Q,ee)=>{let le=Q.tileID,qe=ee.tileID,Xe=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),ot=new a.P(qe.canonical.x,qe.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-qe.overscaledZ||ot.y-Xe.y||ot.x-Xe.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(er).map(Q=>Q.key)}hasRenderableParent(w){let B=this.findLoadedParent(w,0);return!!B&&this._isIdRenderable(B.tileID.key)}_isIdRenderable(w,B){return this._tiles[w]&&this._tiles[w].hasData()&&!this._coveredTiles[w]&&(B||!this._tiles[w].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let w in this._tiles)this._tiles[w].state!=="errored"&&this._reloadTile(w,"reloading")}}_reloadTile(w,B){return a._(this,void 0,void 0,function*(){let Q=this._tiles[w];Q&&(Q.state!=="loading"&&(Q.state=B),yield this._loadTile(Q,w,B))})}_tileLoaded(w,B,Q){w.timeAdded=u.now(),Q==="expired"&&(w.refreshedUponExpiration=!0),this._setTileReloadTimer(B,w),this.getSource().type==="raster-dem"&&w.dem&&this._backfillDEM(w),this._state.initializeTileState(w,this.map?this.map.painter:null),w.aborted||this._source.fire(new a.k("data",{dataType:"source",tile:w,coord:w.tileID}))}_backfillDEM(w){let B=this.getRenderableIds();for(let ee=0;ee1||(Math.abs(qe)>1&&(Math.abs(qe+ot)===1?qe+=ot:Math.abs(qe-ot)===1&&(qe-=ot)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,qe,Xe),ee.neighboringTiles&&ee.neighboringTiles[Tt]&&(ee.neighboringTiles[Tt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let le in this._tiles){let qe=this._tiles[le];if(ee[le]||!qe.hasData()||qe.tileID.overscaledZ<=B||qe.tileID.overscaledZ>Q)continue;let Xe=qe.tileID;for(;qe&&qe.tileID.overscaledZ>B+1;){let Tt=qe.tileID.scaledTo(qe.tileID.overscaledZ-1);qe=this._tiles[Tt.key],qe&&qe.hasData()&&(Xe=Tt)}let ot=Xe;for(;ot.overscaledZ>B;)if(ot=ot.scaledTo(ot.overscaledZ-1),w[ot.key]){ee[Xe.key]=Xe;break}}}findLoadedParent(w,B){if(w.key in this._loadedParentTiles){let Q=this._loadedParentTiles[w.key];return Q&&Q.tileID.overscaledZ>=B?Q:null}for(let Q=w.overscaledZ-1;Q>=B;Q--){let ee=w.scaledTo(Q),le=this._getLoadedTile(ee);if(le)return le}}findLoadedSibling(w){return this._getLoadedTile(w)}_getLoadedTile(w){let B=this._tiles[w.key];return B&&B.hasData()?B:this._cache.getByKey(w.wrapped().key)}updateCacheSize(w){let B=Math.ceil(w.width/this._source.tileSize)+1,Q=Math.ceil(w.height/this._source.tileSize)+1,ee=Math.floor(B*Q*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),le=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(le)}handleWrapJump(w){let B=Math.round((w-(this._prevLng===void 0?w:this._prevLng))/360);if(this._prevLng=w,B){let Q={};for(let ee in this._tiles){let le=this._tiles[ee];le.tileID=le.tileID.unwrapTo(le.tileID.wrap+B),Q[le.tileID.key]=le}this._tiles=Q;for(let ee in this._timers)clearTimeout(this._timers[ee]),delete this._timers[ee];for(let ee in this._tiles)this._setTileReloadTimer(ee,this._tiles[ee])}}_updateCoveredAndRetainedTiles(w,B,Q,ee,le,qe){let Xe={},ot={},Tt=Object.keys(w),Yt=u.now();for(let Kt of Tt){let xr=w[Kt],Ir=this._tiles[Kt];if(!Ir||Ir.fadeEndTime!==0&&Ir.fadeEndTime<=Yt)continue;let ve=this.findLoadedParent(xr,B),be=this.findLoadedSibling(xr),De=ve||be||null;De&&(this._addTile(De.tileID),Xe[De.tileID.key]=De.tileID),ot[Kt]=xr}this._retainLoadedChildren(ot,ee,Q,w);for(let Kt in Xe)w[Kt]||(this._coveredTiles[Kt]=!0,w[Kt]=Xe[Kt]);if(qe){let Kt={},xr={};for(let Ir of le)this._tiles[Ir.key].hasData()?Kt[Ir.key]=Ir:xr[Ir.key]=Ir;for(let Ir in xr){let ve=xr[Ir].children(this._source.maxzoom);this._tiles[ve[0].key]&&this._tiles[ve[1].key]&&this._tiles[ve[2].key]&&this._tiles[ve[3].key]&&(Kt[ve[0].key]=w[ve[0].key]=ve[0],Kt[ve[1].key]=w[ve[1].key]=ve[1],Kt[ve[2].key]=w[ve[2].key]=ve[2],Kt[ve[3].key]=w[ve[3].key]=ve[3],delete xr[Ir])}for(let Ir in xr){let ve=xr[Ir],be=this.findLoadedParent(ve,this._source.minzoom),De=this.findLoadedSibling(ve),Be=be||De||null;if(Be){Kt[Be.tileID.key]=w[Be.tileID.key]=Be.tileID;for(let et in Kt)Kt[et].isChildOf(Be.tileID)&&delete Kt[et]}}for(let Ir in this._tiles)Kt[Ir]||(this._coveredTiles[Ir]=!0)}}update(w,B){if(!this._sourceLoaded||this._paused)return;let Q;this.transform=w,this.terrain=B,this.updateCacheSize(w),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Q=w.getVisibleUnwrappedCoordinates(this._source.tileID).map(Yt=>new a.S(Yt.canonical.z,Yt.wrap,Yt.canonical.z,Yt.canonical.x,Yt.canonical.y)):(Q=w.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:B}),this._source.hasTile&&(Q=Q.filter(Yt=>this._source.hasTile(Yt)))):Q=[];let ee=w.coveringZoomLevel(this._source),le=Math.max(ee-mt.maxOverzooming,this._source.minzoom),qe=Math.max(ee+mt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Yt={};for(let Kt of Q)if(Kt.canonical.z>this._source.minzoom){let xr=Kt.scaledTo(Kt.canonical.z-1);Yt[xr.key]=xr;let Ir=Kt.scaledTo(Math.max(this._source.minzoom,Math.min(Kt.canonical.z,5)));Yt[Ir.key]=Ir}Q=Q.concat(Object.values(Yt))}let Xe=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Xe&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let ot=this._updateRetainedTiles(Q,ee);lr(this._source.type)&&this._updateCoveredAndRetainedTiles(ot,le,qe,ee,Q,B);for(let Yt in ot)this._tiles[Yt].clearFadeHold();let Tt=a.ab(this._tiles,ot);for(let Yt of Tt){let Kt=this._tiles[Yt];Kt.hasSymbolBuckets&&!Kt.holdingForFade()?Kt.setHoldDuration(this.map._fadeDuration):Kt.hasSymbolBuckets&&!Kt.symbolFadeFinished()||this._removeTile(Yt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let w in this._tiles)this._tiles[w].holdingForFade()&&this._removeTile(w)}_updateRetainedTiles(w,B){var Q;let ee={},le={},qe=Math.max(B-mt.maxOverzooming,this._source.minzoom),Xe=Math.max(B+mt.maxUnderzooming,this._source.minzoom),ot={};for(let Tt of w){let Yt=this._addTile(Tt);ee[Tt.key]=Tt,Yt.hasData()||Bthis._source.maxzoom){let xr=Tt.children(this._source.maxzoom)[0],Ir=this.getTile(xr);if(Ir&&Ir.hasData()){ee[xr.key]=xr;continue}}else{let xr=Tt.children(this._source.maxzoom);if(ee[xr[0].key]&&ee[xr[1].key]&&ee[xr[2].key]&&ee[xr[3].key])continue}let Kt=Yt.wasRequested();for(let xr=Tt.overscaledZ-1;xr>=qe;--xr){let Ir=Tt.scaledTo(xr);if(le[Ir.key])break;if(le[Ir.key]=!0,Yt=this.getTile(Ir),!Yt&&Kt&&(Yt=this._addTile(Ir)),Yt){let ve=Yt.hasData();if((ve||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Kt)&&(ee[Ir.key]=Ir),Kt=Yt.wasRequested(),ve)break}}}return ee}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let w in this._tiles){let B=[],Q,ee=this._tiles[w].tileID;for(;ee.overscaledZ>0;){if(ee.key in this._loadedParentTiles){Q=this._loadedParentTiles[ee.key];break}B.push(ee.key);let le=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(le),Q)break;ee=le}for(let le of B)this._loadedParentTiles[le]=Q}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let w in this._tiles){let B=this._tiles[w].tileID,Q=this._getLoadedTile(B);this._loadedSiblingTiles[B.key]=Q}}_addTile(w){let B=this._tiles[w.key];if(B)return B;B=this._cache.getAndRemove(w),B&&(this._setTileReloadTimer(w.key,B),B.tileID=w,this._state.initializeTileState(B,this.map?this.map.painter:null),this._cacheTimers[w.key]&&(clearTimeout(this._cacheTimers[w.key]),delete this._cacheTimers[w.key],this._setTileReloadTimer(w.key,B)));let Q=B;return B||(B=new Vt(w,this._source.tileSize*w.overscaleFactor()),this._loadTile(B,w.key,B.state)),B.uses++,this._tiles[w.key]=B,Q||this._source.fire(new a.k("dataloading",{tile:B,coord:B.tileID,dataType:"source"})),B}_setTileReloadTimer(w,B){w in this._timers&&(clearTimeout(this._timers[w]),delete this._timers[w]);let Q=B.getExpiryTimeout();Q&&(this._timers[w]=setTimeout(()=>{this._reloadTile(w,"expired"),delete this._timers[w]},Q))}_removeTile(w){let B=this._tiles[w];B&&(B.uses--,delete this._tiles[w],this._timers[w]&&(clearTimeout(this._timers[w]),delete this._timers[w]),B.uses>0||(B.hasData()&&B.state!=="reloading"?this._cache.add(B.tileID,B,B.getExpiryTimeout()):(B.aborted=!0,this._abortTile(B),this._unloadTile(B))))}_dataHandler(w){let B=w.sourceDataType;w.dataType==="source"&&B==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&w.dataType==="source"&&B==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let w in this._tiles)this._removeTile(w);this._cache.reset()}tilesIn(w,B,Q){let ee=[],le=this.transform;if(!le)return ee;let qe=Q?le.getCameraQueryGeometry(w):w,Xe=w.map(ve=>le.pointCoordinate(ve,this.terrain)),ot=qe.map(ve=>le.pointCoordinate(ve,this.terrain)),Tt=this.getIds(),Yt=1/0,Kt=1/0,xr=-1/0,Ir=-1/0;for(let ve of ot)Yt=Math.min(Yt,ve.x),Kt=Math.min(Kt,ve.y),xr=Math.max(xr,ve.x),Ir=Math.max(Ir,ve.y);for(let ve=0;ve=0&&We[1].y+et>=0){let it=Xe.map(Ht=>De.getTilePoint(Ht)),Ft=ot.map(Ht=>De.getTilePoint(Ht));ee.push({tile:be,tileID:De,queryGeometry:it,cameraQueryGeometry:Ft,scale:Be})}}return ee}getVisibleCoordinates(w){let B=this.getRenderableIds(w).map(Q=>this._tiles[Q].tileID);for(let Q of B)Q.posMatrix=this.transform.calculatePosMatrix(Q.toUnwrapped());return B}hasTransition(){if(this._source.hasTransition())return!0;if(lr(this._source.type)){let w=u.now();for(let B in this._tiles)if(this._tiles[B].fadeEndTime>=w)return!0}return!1}setFeatureState(w,B,Q){this._state.updateState(w=w||"_geojsonTileLayer",B,Q)}removeFeatureState(w,B,Q){this._state.removeFeatureState(w=w||"_geojsonTileLayer",B,Q)}getFeatureState(w,B){return this._state.getState(w=w||"_geojsonTileLayer",B)}setDependencies(w,B,Q){let ee=this._tiles[w];ee&&ee.setDependencies(B,Q)}reloadTilesForDependencies(w,B){for(let Q in this._tiles)this._tiles[Q].hasDependency(w,B)&&this._reloadTile(Q,"reloading");this._cache.filter(Q=>!Q.hasDependency(w,B))}}function er(ue,w){let B=Math.abs(2*ue.wrap)-+(ue.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return ue.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-ue.canonical.y||w.canonical.x-ue.canonical.x}function lr(ue){return ue==="raster"||ue==="image"||ue==="video"}mt.maxOverzooming=10,mt.maxUnderzooming=3;class Tr{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-qe)/Xe:0;return this.points[le].mult(1-ot).add(this.points[B].mult(ot))}}function Lr(ue,w){let B=!0;return ue==="always"||ue!=="never"&&w!=="never"||(B=!1),B}class ti{constructor(w,B,Q){let ee=this.boxCells=[],le=this.circleCells=[];this.xCellCount=Math.ceil(w/Q),this.yCellCount=Math.ceil(B/Q);for(let qe=0;qethis.width||ee<0||B>this.height)return[];let ot=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(le)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let Tt=0;Tt0}hitTestCircle(w,B,Q,ee,le){let qe=w-Q,Xe=w+Q,ot=B-Q,Tt=B+Q;if(Xe<0||qe>this.width||Tt<0||ot>this.height)return!1;let Yt=[];return this._forEachCell(qe,ot,Xe,Tt,this._queryCellCircle,Yt,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},le),Yt.length>0}_queryCell(w,B,Q,ee,le,qe,Xe,ot){let{seenUids:Tt,hitTest:Yt,overlapMode:Kt}=Xe,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Tt.box[be]){Tt.box[be]=!0;let De=4*be,Be=this.boxKeys[be];if(w<=ve[De+2]&&B<=ve[De+3]&&Q>=ve[De+0]&&ee>=ve[De+1]&&(!ot||ot(Be))&&(!Yt||!Lr(Kt,Be.overlapMode))&&(qe.push({key:Be,x1:ve[De],y1:ve[De+1],x2:ve[De+2],y2:ve[De+3]}),Yt))return!0}}let Ir=this.circleCells[le];if(Ir!==null){let ve=this.circles;for(let be of Ir)if(!Tt.circle[be]){Tt.circle[be]=!0;let De=3*be,Be=this.circleKeys[be];if(this._circleAndRectCollide(ve[De],ve[De+1],ve[De+2],w,B,Q,ee)&&(!ot||ot(Be))&&(!Yt||!Lr(Kt,Be.overlapMode))){let et=ve[De],We=ve[De+1],it=ve[De+2];if(qe.push({key:Be,x1:et-it,y1:We-it,x2:et+it,y2:We+it}),Yt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,qe,Xe,ot){let{circle:Tt,seenUids:Yt,overlapMode:Kt}=Xe,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Yt.box[be]){Yt.box[be]=!0;let De=4*be,Be=this.boxKeys[be];if(this._circleAndRectCollide(Tt.x,Tt.y,Tt.radius,ve[De+0],ve[De+1],ve[De+2],ve[De+3])&&(!ot||ot(Be))&&!Lr(Kt,Be.overlapMode))return qe.push(!0),!0}}let Ir=this.circleCells[le];if(Ir!==null){let ve=this.circles;for(let be of Ir)if(!Yt.circle[be]){Yt.circle[be]=!0;let De=3*be,Be=this.circleKeys[be];if(this._circlesCollide(ve[De],ve[De+1],ve[De+2],Tt.x,Tt.y,Tt.radius)&&(!ot||ot(Be))&&!Lr(Kt,Be.overlapMode))return qe.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,qe,Xe,ot){let Tt=this._convertToXCellCoord(w),Yt=this._convertToYCellCoord(B),Kt=this._convertToXCellCoord(Q),xr=this._convertToYCellCoord(ee);for(let Ir=Tt;Ir<=Kt;Ir++)for(let ve=Yt;ve<=xr;ve++)if(le.call(this,w,B,Q,ee,this.xCellCount*ve+Ir,qe,Xe,ot))return}_convertToXCellCoord(w){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(w*this.xScale)))}_convertToYCellCoord(w){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(w*this.yScale)))}_circlesCollide(w,B,Q,ee,le,qe){let Xe=ee-w,ot=le-B,Tt=Q+qe;return Tt*Tt>Xe*Xe+ot*ot}_circleAndRectCollide(w,B,Q,ee,le,qe,Xe){let ot=(qe-ee)/2,Tt=Math.abs(w-(ee+ot));if(Tt>ot+Q)return!1;let Yt=(Xe-le)/2,Kt=Math.abs(B-(le+Yt));if(Kt>Yt+Q)return!1;if(Tt<=ot||Kt<=Yt)return!0;let xr=Tt-ot,Ir=Kt-Yt;return xr*xr+Ir*Ir<=Q*Q}}function Br(ue,w,B,Q,ee){let le=a.H();return w?(a.K(le,le,[1/ee,1/ee,1]),B||a.ad(le,le,Q.angle)):a.L(le,Q.labelPlaneMatrix,ue),le}function Vr(ue,w,B,Q,ee){if(w){let le=a.ae(ue);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function dt(ue,w,B,Q){let ee;Q?(ee=[ue,w,Q(ue,w),1],a.af(ee,ee,B)):(ee=[ue,w,0,1],$r(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function Ge(ue,w){return .5+ue/w*.5}function Je(ue,w){return ue.x>=-w[0]&&ue.x<=w[0]&&ue.y>=-w[1]&&ue.y<=w[1]}function je(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,Kt,xr,Ir,ve){let be=Q?ue.textSizeData:ue.iconSizeData,De=a.ag(be,B.transform.zoom),Be=[256/B.width*2+1,256/B.height*2+1],et=Q?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;et.clear();let We=ue.lineVertexArray,it=Q?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,Ft=B.transform.width/B.transform.height,Ht=!1;for(let tr=0;trMath.abs(B.x-w.x)*Q?{useVertical:!0}:(ue===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function Ie(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Yt){let Kt=B/24,xr=w.lineOffsetX*Kt,Ir=w.lineOffsetY*Kt,ve;if(w.numGlyphs>1){let be=w.glyphStartIndex+w.numGlyphs,De=w.lineStartIndex,Be=w.lineStartIndex+w.lineLength,et=tt(Kt,Xe,xr,Ir,Q,w,Yt,ue);if(!et)return{notEnoughRoom:!0};let We=dt(et.first.point.x,et.first.point.y,qe,ue.getElevation).point,it=dt(et.last.point.x,et.last.point.y,qe,ue.getElevation).point;if(ee&&!Q){let Ft=xt(w.writingMode,We,it,Tt);if(Ft)return Ft}ve=[et.first];for(let Ft=w.glyphStartIndex+1;Ft0?We.point:function(Ht,tr,dr,Sr,Or,Wr){return xe(Ht,tr,dr,1,Or,Wr)}(ue.tileAnchorPoint,et,De,0,le,ue),Ft=xt(w.writingMode,De,it,Tt);if(Ft)return Ft}let be=vr(Kt*Xe.getoffsetX(w.glyphStartIndex),xr,Ir,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,ue,Yt);if(!be||ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ve=[be]}for(let be of ve)a.aj(ot,be.point,be.angle);return{}}function xe(ue,w,B,Q,ee,le){let qe=ue.add(ue.sub(w)._unit()),Xe=ee!==void 0?dt(qe.x,qe.y,ee,le.getElevation).point:vt(qe.x,qe.y,le).point,ot=B.sub(Xe);return B.add(ot._mult(Q/ot.mag()))}function ke(ue,w,B){let Q=w.projectionCache;if(Q.projections[ue])return Q.projections[ue];let ee=new a.P(w.lineVertexArray.getx(ue),w.lineVertexArray.gety(ue)),le=vt(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[ue]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let qe=ue-B.direction;return function(Xe,ot,Tt,Yt,Kt){return xe(Xe,ot,Tt,Yt,void 0,Kt)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(qe),w.lineVertexArray.gety(qe)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function vt(ue,w,B){let Q=ue+B.translation[0],ee=w+B.translation[1],le;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(le=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),le.point.x=(.5*le.point.x+.5)*B.width,le.point.y=(.5*-le.point.y+.5)*B.height):(le=dt(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function ir(ue,w,B){return ue._unit()._perp()._mult(w*B)}function ar(ue,w,B,Q,ee,le,qe,Xe,ot){if(Xe.projectionCache.offsets[ue])return Xe.projectionCache.offsets[ue];let Tt=B.add(w);if(ue+ot.direction=ee)return Xe.projectionCache.offsets[ue]=Tt,Tt;let Yt=ke(ue+ot.direction,Xe,ot),Kt=ir(Yt.sub(B),qe,ot.direction),xr=B.add(Kt),Ir=Yt.add(Kt);return Xe.projectionCache.offsets[ue]=a.ak(le,Tt,xr,Ir)||Tt,Xe.projectionCache.offsets[ue]}function vr(ue,w,B,Q,ee,le,qe,Xe,ot){let Tt=Q?ue-w:ue+w,Yt=Tt>0?1:-1,Kt=0;Q&&(Yt*=-1,Kt=Math.PI),Yt<0&&(Kt+=Math.PI);let xr,Ir=Yt>0?le+ee:le+ee+1;Xe.projectionCache.cachedAnchorPoint?xr=Xe.projectionCache.cachedAnchorPoint:(xr=vt(Xe.tileAnchorPoint.x,Xe.tileAnchorPoint.y,Xe).point,Xe.projectionCache.cachedAnchorPoint=xr);let ve,be,De=xr,Be=xr,et=0,We=0,it=Math.abs(Tt),Ft=[],Ht;for(;et+We<=it;){if(Ir+=Yt,Ir=qe)return null;et+=We,Be=De,be=ve;let Sr={absOffsetX:it,direction:Yt,distanceFromAnchor:et,previousVertex:Be};if(De=ke(Ir,Xe,Sr),B===0)Ft.push(Be),Ht=De.sub(Be);else{let Or,Wr=De.sub(Be);Or=Wr.mag()===0?ir(ke(Ir+Yt,Xe,Sr).sub(De),B,Yt):ir(Wr,B,Yt),be||(be=Be.add(Or)),ve=ar(Ir,Or,De,le,qe,be,B,Xe,Sr),Ft.push(be),Ht=ve.sub(be)}We=Ht.mag()}let tr=Ht._mult((it-et)/We)._add(be||Be),dr=Kt+Math.atan2(De.y-Be.y,De.x-Be.x);return Ft.push(tr),{point:tr,angle:ot?dr:0,path:Ft}}let ii=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function pi(ue,w){for(let B=0;B=1;fa--)Cn.push(cn.path[fa]);for(let fa=1;fa$a.signedDistanceFromCamera<=0)?[]:fa.map($a=>$a.point)}let Ta=[];if(Cn.length>0){let fa=Cn[0].clone(),$a=Cn[0].clone();for(let Co=1;Co=Wr.x&&$a.x<=ni.x&&fa.y>=Wr.y&&$a.y<=ni.y?[Cn]:$a.xni.x||$a.yni.y?[]:a.al([Cn],Wr.x,Wr.y,ni.x,ni.y)}for(let fa of Ta){Pi.reset(fa,.25*Or);let $a=0;$a=Pi.length<=.5*Or?1:Math.ceil(Pi.paddedLength/Kn)+1;for(let Co=0;Co<$a;Co++){let Qa=Co/Math.max($a-1,1),mo=Pi.lerp(Qa),Bo=mo.x+di,Ps=mo.y+di;Be.push(Bo,Ps,Or,0);let Ts=Bo-Or,wo=Ps-Or,To=Bo+Or,hl=Ps+Or;if(Sr=Sr&&this.isOffscreen(Ts,wo,To,hl),dr=dr||this.isInsideGrid(Ts,wo,To,hl),w!=="always"&&this.grid.hitTestCircle(Bo,Ps,Or,w,xr)&&(tr=!0,!Yt))return{circles:[],offscreen:!1,collisionDetected:tr}}}}return{circles:!Yt&&tr||!dr||Wedt(ee.x,ee.y,Q,B.getElevation))}queryRenderedSymbols(w){if(w.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let B=[],Q=1/0,ee=1/0,le=-1/0,qe=-1/0;for(let Yt of w){let Kt=new a.P(Yt.x+di,Yt.y+di);Q=Math.min(Q,Kt.x),ee=Math.min(ee,Kt.y),le=Math.max(le,Kt.x),qe=Math.max(qe,Kt.y),B.push(Kt)}let Xe=this.grid.query(Q,ee,le,qe).concat(this.ignoredGrid.query(Q,ee,le,qe)),ot={},Tt={};for(let Yt of Xe){let Kt=Yt.key;if(ot[Kt.bucketInstanceId]===void 0&&(ot[Kt.bucketInstanceId]={}),ot[Kt.bucketInstanceId][Kt.featureIndex])continue;let xr=[new a.P(Yt.x1,Yt.y1),new a.P(Yt.x2,Yt.y1),new a.P(Yt.x2,Yt.y2),new a.P(Yt.x1,Yt.y2)];a.am(B,xr)&&(ot[Kt.bucketInstanceId][Kt.featureIndex]=!0,Tt[Kt.bucketInstanceId]===void 0&&(Tt[Kt.bucketInstanceId]=[]),Tt[Kt.bucketInstanceId].push(Kt.featureIndex))}return Tt}insertCollisionBox(w,B,Q,ee,le,qe){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:qe,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,qe){let Xe=Q?this.ignoredGrid:this.grid,ot={bucketInstanceId:ee,featureIndex:le,collisionGroupID:qe,overlapMode:B};for(let Tt=0;Tt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,Or.x,Or.y,ee,Tt));dr=Sr.some(Or=>!Or.isOccluded),tr=Sr.map(Or=>Or.point)}else dr=!0;return{box:a.ao(tr),allPointsOccluded:!dr}}}function In(ue,w,B){return w*(a.X/(ue.tileSize*Math.pow(2,B-ue.tileID.overscaledZ)))}class wi{constructor(w,B,Q,ee){this.opacity=w?Math.max(0,Math.min(1,w.opacity+(w.placed?B:-B))):ee&&Q?1:0,this.placed=Q}isHidden(){return this.opacity===0&&!this.placed}}class On{constructor(w,B,Q,ee,le){this.text=new wi(w?w.text:null,B,Q,le),this.icon=new wi(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class qn{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Fn{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class ra{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class la{constructor(w){this.crossSourceCollisions=w,this.maxGroupID=0,this.collisionGroups={}}get(w){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[w]){let B=++this.maxGroupID;this.collisionGroups[w]={ID:B,predicate:Q=>Q.collisionGroupID===B}}return this.collisionGroups[w]}}function Ut(ue,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:qe}=a.au(ue);return new a.P(-(le-.5)*w+Q[0]*ee,-(qe-.5)*B+Q[1]*ee)}class wt{constructor(w,B,Q,ee,le,qe){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new ji(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new la(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=qe,qe&&(qe.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(w){let B=this.terrain;return B?(Q,ee)=>B.getElevation(w,Q,ee):null}getBucketParts(w,B,Q,ee){let le=Q.getBucket(B),qe=Q.latestFeatureIndex;if(!le||!qe||B.id!==le.layerIds[0])return;let Xe=Q.collisionBoxArray,ot=le.layers[0].layout,Tt=le.layers[0].paint,Yt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Kt=Q.tileSize/a.X,xr=Q.tileID.toUnwrapped(),Ir=this.transform.calculatePosMatrix(xr),ve=ot.get("text-pitch-alignment")==="map",be=ot.get("text-rotation-alignment")==="map",De=In(Q,1,this.transform.zoom),Be=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get("text-translate"),Tt.get("text-translate-anchor")),et=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get("icon-translate"),Tt.get("icon-translate-anchor")),We=Br(Ir,ve,be,this.transform,De),it=null;if(ve){let Ht=Vr(Ir,ve,be,this.transform,De);it=a.L([],this.transform.labelPlaneMatrix,Ht)}this.retainedQueryData[le.bucketInstanceId]=new ra(le.bucketInstanceId,qe,le.sourceLayerIndex,le.index,Q.tileID);let Ft={bucket:le,layout:ot,translationText:Be,translationIcon:et,posMatrix:Ir,unwrappedTileID:xr,textLabelPlaneMatrix:We,labelToScreenMatrix:it,scale:Yt,textPixelRatio:Kt,holdingForFade:Q.holdingForFade(),collisionBoxArray:Xe,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Ht of le.sortKeyRanges){let{sortKey:tr,symbolInstanceStart:dr,symbolInstanceEnd:Sr}=Ht;w.push({sortKey:tr,symbolInstanceStart:dr,symbolInstanceEnd:Sr,parameters:Ft})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:Ft})}attemptAnchorPlacement(w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,Kt,xr,Ir,ve,be,De,Be,et,We){let it=a.aq[w.textAnchor],Ft=[w.textOffset0,w.textOffset1],Ht=Ut(it,Q,ee,Ft,le),tr=this.collisionIndex.placeCollisionBox(B,xr,ot,Tt,Yt,Xe,qe,De,Kt.predicate,We,Ht);if((!et||this.collisionIndex.placeCollisionBox(et,xr,ot,Tt,Yt,Xe,qe,Be,Kt.predicate,We,Ht).placeable)&&tr.placeable){let dr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Ir.crossTileID]&&this.prevPlacement.placements[Ir.crossTileID]&&this.prevPlacement.placements[Ir.crossTileID].text&&(dr=this.prevPlacement.variableOffsets[Ir.crossTileID].anchor),Ir.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Ir.crossTileID]={textOffset:Ft,width:Q,height:ee,anchor:it,textBoxScale:le,prevAnchor:dr},this.markUsedJustification(ve,it,Ir,be),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,be,Ir),this.placedOrientations[Ir.crossTileID]=be),{shift:Ht,placedGlyphBoxes:tr}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:qe,translationIcon:Xe,posMatrix:ot,unwrappedTileID:Tt,textLabelPlaneMatrix:Yt,labelToScreenMatrix:Kt,textPixelRatio:xr,holdingForFade:Ir,collisionBoxArray:ve,partiallyEvaluatedTextSize:be,collisionGroup:De}=w.parameters,Be=le.get("text-optional"),et=le.get("icon-optional"),We=a.ar(le,"text-overlap","text-allow-overlap"),it=We==="always",Ft=a.ar(le,"icon-overlap","icon-allow-overlap"),Ht=Ft==="always",tr=le.get("text-rotation-alignment")==="map",dr=le.get("text-pitch-alignment")==="map",Sr=le.get("icon-text-fit")!=="none",Or=le.get("symbol-z-order")==="viewport-y",Wr=it&&(Ht||!ee.hasIconData()||et),ni=Ht&&(it||!ee.hasTextData()||Be);!ee.collisionArrays&&ve&&ee.deserializeCollisionBoxes(ve);let Pi=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),cn=(ln,Cn,Kn)=>{var Ta,fa;if(B[ln.crossTileID])return;if(Ir)return void(this.placements[ln.crossTileID]=new qn(!1,!1,!1));let $a=!1,Co=!1,Qa=!0,mo=null,Bo={box:null,placeable:!1,offscreen:null},Ps={box:null,placeable:!1,offscreen:null},Ts=null,wo=null,To=null,hl=0,Ul=0,Lu=0;Cn.textFeatureIndex?hl=Cn.textFeatureIndex:ln.useRuntimeCollisionCircles&&(hl=ln.featureIndex),Cn.verticalTextFeatureIndex&&(Ul=Cn.verticalTextFeatureIndex);let au=Cn.textBox;if(au){let Tl=Te=>{let Ne=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Te&&this.prevPlacement){let He=this.prevPlacement.placedOrientations[ln.crossTileID];He&&(this.placedOrientations[ln.crossTileID]=He,Ne=He,this.markUsedOrientation(ee,Ne,ln))}return Ne},Al=(Te,Ne)=>{if(ee.allowVerticalPlacement&&ln.numVerticalGlyphVertices>0&&Cn.verticalTextBox){for(let He of ee.writingModes)if(He===a.ah.vertical?(Bo=Ne(),Ps=Bo):Bo=Te(),Bo&&Bo.placeable)break}else Bo=Te()},X=ln.textAnchorOffsetStartIndex,se=ln.textAnchorOffsetEndIndex;if(se===X){let Te=(Ne,He)=>{let Ye=this.collisionIndex.placeCollisionBox(Ne,We,xr,ot,Tt,dr,tr,qe,De.predicate,Pi);return Ye&&Ye.placeable&&(this.markUsedOrientation(ee,He,ln),this.placedOrientations[ln.crossTileID]=He),Ye};Al(()=>Te(au,a.ah.horizontal),()=>{let Ne=Cn.verticalTextBox;return ee.allowVerticalPlacement&&ln.numVerticalGlyphVertices>0&&Ne?Te(Ne,a.ah.vertical):{box:null,offscreen:null}}),Tl(Bo&&Bo.placeable)}else{let Te=a.aq[(fa=(Ta=this.prevPlacement)===null||Ta===void 0?void 0:Ta.variableOffsets[ln.crossTileID])===null||fa===void 0?void 0:fa.anchor],Ne=(Ye,kt,nt)=>{let jt=Ye.x2-Ye.x1,gr=Ye.y2-Ye.y1,yr=ln.textBoxScale,Hr=Sr&&Ft==="never"?kt:null,qr=null,_i=We==="never"?1:2,bi="never";Te&&_i++;for(let Zr=0;Zr<_i;Zr++){for(let ai=X;aiNe(au,Cn.iconBox,a.ah.horizontal),()=>{let Ye=Cn.verticalTextBox;return ee.allowVerticalPlacement&&(!Bo||!Bo.placeable)&&ln.numVerticalGlyphVertices>0&&Ye?Ne(Ye,Cn.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Bo&&($a=Bo.placeable,Qa=Bo.offscreen);let He=Tl(Bo&&Bo.placeable);if(!$a&&this.prevPlacement){let Ye=this.prevPlacement.variableOffsets[ln.crossTileID];Ye&&(this.variableOffsets[ln.crossTileID]=Ye,this.markUsedJustification(ee,Ye.anchor,ln,He))}}}if(Ts=Bo,$a=Ts&&Ts.placeable,Qa=Ts&&Ts.offscreen,ln.useRuntimeCollisionCircles){let Tl=ee.text.placedSymbolArray.get(ln.centerJustifiedTextSymbolIndex),Al=a.ai(ee.textSizeData,be,Tl),X=le.get("text-padding");wo=this.collisionIndex.placeCollisionCircles(We,Tl,ee.lineVertexArray,ee.glyphOffsetArray,Al,ot,Tt,Yt,Kt,Q,dr,De.predicate,ln.collisionCircleDiameter,X,qe,Pi),wo.circles.length&&wo.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),$a=it||wo.circles.length>0&&!wo.collisionDetected,Qa=Qa&&wo.offscreen}if(Cn.iconFeatureIndex&&(Lu=Cn.iconFeatureIndex),Cn.iconBox){let Tl=Al=>this.collisionIndex.placeCollisionBox(Al,Ft,xr,ot,Tt,dr,tr,Xe,De.predicate,Pi,Sr&&mo?mo:void 0);Ps&&Ps.placeable&&Cn.verticalIconBox?(To=Tl(Cn.verticalIconBox),Co=To.placeable):(To=Tl(Cn.iconBox),Co=To.placeable),Qa=Qa&&To.offscreen}let Js=Be||ln.numHorizontalGlyphVertices===0&&ln.numVerticalGlyphVertices===0,Ql=et||ln.numIconVertices===0;Js||Ql?Ql?Js||(Co=Co&&$a):$a=Co&&$a:Co=$a=Co&&$a;let dc=Co&&To.placeable;if($a&&Ts.placeable&&this.collisionIndex.insertCollisionBox(Ts.box,We,le.get("text-ignore-placement"),ee.bucketInstanceId,Ps&&Ps.placeable&&Ul?Ul:hl,De.ID),dc&&this.collisionIndex.insertCollisionBox(To.box,Ft,le.get("icon-ignore-placement"),ee.bucketInstanceId,Lu,De.ID),wo&&$a&&this.collisionIndex.insertCollisionCircles(wo.circles,We,le.get("text-ignore-placement"),ee.bucketInstanceId,hl,De.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Kn,Cn,Ts,To,wo),ln.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ee.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ln.crossTileID]=new qn($a||Wr,Co||ni,Qa||ee.justReloaded),B[ln.crossTileID]=!0};if(Or){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ln=ee.getSortedSymbolIndexes(this.transform.angle);for(let Cn=ln.length-1;Cn>=0;--Cn){let Kn=ln[Cn];cn(ee.symbolInstances.get(Kn),ee.collisionArrays[Kn],Kn)}}else for(let ln=w.symbolInstanceStart;ln=0&&(w.text.placedSymbolArray.get(Xe).crossTileID=le>=0&&Xe!==le?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,le=B===a.ah.vertical?B:0,qe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let Xe of qe)w.text.placedSymbolArray.get(Xe).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=le)}commit(w){this.commitTime=w,this.zoomAtLastRecencyCheck=this.transform.zoom;let B=this.prevPlacement,Q=!1;this.prevZoomAdjustment=B?B.zoomAdjustment(this.transform.zoom):0;let ee=B?B.symbolFadeChange(w):1,le=B?B.opacities:{},qe=B?B.variableOffsets:{},Xe=B?B.placedOrientations:{};for(let ot in this.placements){let Tt=this.placements[ot],Yt=le[ot];Yt?(this.opacities[ot]=new On(Yt,ee,Tt.text,Tt.icon),Q=Q||Tt.text!==Yt.text.placed||Tt.icon!==Yt.icon.placed):(this.opacities[ot]=new On(null,ee,Tt.text,Tt.icon,Tt.skipFade),Q=Q||Tt.text||Tt.icon)}for(let ot in le){let Tt=le[ot];if(!this.opacities[ot]){let Yt=new On(Tt,ee,!1,!1);Yt.isHidden()||(this.opacities[ot]=Yt,Q=Q||Tt.text.placed||Tt.icon.placed)}}for(let ot in qe)this.variableOffsets[ot]||!this.opacities[ot]||this.opacities[ot].isHidden()||(this.variableOffsets[ot]=qe[ot]);for(let ot in Xe)this.placedOrientations[ot]||!this.opacities[ot]||this.opacities[ot].isHidden()||(this.placedOrientations[ot]=Xe[ot]);if(B&&B.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Q?this.lastPlacementChangeTime=w:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=B?B.lastPlacementChangeTime:w)}updateLayerOpacities(w,B){let Q={};for(let ee of B){let le=ee.getBucket(w);le&&ee.latestFeatureIndex&&w.id===le.layerIds[0]&&this.updateBucketOpacities(le,ee.tileID,Q,ee.collisionBoxArray)}}updateBucketOpacities(w,B,Q,ee){w.hasTextData()&&(w.text.opacityVertexArray.clear(),w.text.hasVisibleVertices=!1),w.hasIconData()&&(w.icon.opacityVertexArray.clear(),w.icon.hasVisibleVertices=!1),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexArray.clear(),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexArray.clear();let le=w.layers[0],qe=le.layout,Xe=new On(null,0,!1,!1,!0),ot=qe.get("text-allow-overlap"),Tt=qe.get("icon-allow-overlap"),Yt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Kt=qe.get("text-rotation-alignment")==="map",xr=qe.get("text-pitch-alignment")==="map",Ir=qe.get("icon-text-fit")!=="none",ve=new On(null,0,ot&&(Tt||!w.hasIconData()||qe.get("icon-optional")),Tt&&(ot||!w.hasTextData()||qe.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let be=(Be,et,We)=>{for(let it=0;it0,dr=this.placedOrientations[et.crossTileID],Sr=dr===a.ah.vertical,Or=dr===a.ah.horizontal||dr===a.ah.horizontalOnly;if(We>0||it>0){let ni=tn(Ht.text);be(w.text,We,Sr?fn:ni),be(w.text,it,Or?fn:ni);let Pi=Ht.text.isHidden();[et.rightJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.leftJustifiedTextSymbolIndex].forEach(Cn=>{Cn>=0&&(w.text.placedSymbolArray.get(Cn).hidden=Pi||Sr?1:0)}),et.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(et.verticalPlacedTextSymbolIndex).hidden=Pi||Or?1:0);let cn=this.variableOffsets[et.crossTileID];cn&&this.markUsedJustification(w,cn.anchor,et,dr);let ln=this.placedOrientations[et.crossTileID];ln&&(this.markUsedJustification(w,"left",et,ln),this.markUsedOrientation(w,ln,et))}if(tr){let ni=tn(Ht.icon),Pi=!(Ir&&et.verticalPlacedIconSymbolIndex&&Sr);et.placedIconSymbolIndex>=0&&(be(w.icon,et.numIconVertices,Pi?ni:fn),w.icon.placedSymbolArray.get(et.placedIconSymbolIndex).hidden=Ht.icon.isHidden()),et.verticalPlacedIconSymbolIndex>=0&&(be(w.icon,et.numVerticalIconVertices,Pi?fn:ni),w.icon.placedSymbolArray.get(et.verticalPlacedIconSymbolIndex).hidden=Ht.icon.isHidden())}let Wr=De&&De.has(Be)?De.get(Be):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let ni=w.collisionArrays[Be];if(ni){let Pi=new a.P(0,0);if(ni.textBox||ni.verticalTextBox){let cn=!0;if(Yt){let ln=this.variableOffsets[Ft];ln?(Pi=Ut(ln.anchor,ln.width,ln.height,ln.textOffset,ln.textBoxScale),Kt&&Pi._rotate(xr?this.transform.angle:-this.transform.angle)):cn=!1}if(ni.textBox||ni.verticalTextBox){let ln;ni.textBox&&(ln=Sr),ni.verticalTextBox&&(ln=Or),rr(w.textCollisionBox.collisionVertexArray,Ht.text.placed,!cn||ln,Wr.text,Pi.x,Pi.y)}}if(ni.iconBox||ni.verticalIconBox){let cn=!!(!Or&&ni.verticalIconBox),ln;ni.iconBox&&(ln=cn),ni.verticalIconBox&&(ln=!cn),rr(w.iconCollisionBox.collisionVertexArray,Ht.icon.placed,ln,Wr.icon,Ir?Pi.x:0,Ir?Pi.y:0)}}}}if(w.sortFeatures(this.transform.angle),this.retainedQueryData[w.bucketInstanceId]&&(this.retainedQueryData[w.bucketInstanceId].featureSortOrder=w.featureSortOrder),w.hasTextData()&&w.text.opacityVertexBuffer&&w.text.opacityVertexBuffer.updateData(w.text.opacityVertexArray),w.hasIconData()&&w.icon.opacityVertexBuffer&&w.icon.opacityVertexBuffer.updateData(w.icon.opacityVertexArray),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexBuffer&&w.iconCollisionBox.collisionVertexBuffer.updateData(w.iconCollisionBox.collisionVertexArray),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexBuffer&&w.textCollisionBox.collisionVertexBuffer.updateData(w.textCollisionBox.collisionVertexArray),w.text.opacityVertexArray.length!==w.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${w.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${w.text.layoutVertexArray.length}) / 4`);if(w.icon.opacityVertexArray.length!==w.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${w.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${w.icon.layoutVertexArray.length}) / 4`);if(w.bucketInstanceId in this.collisionCircleArrays){let Be=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=Be.invProjMatrix,w.placementViewportMatrix=Be.viewportMatrix,w.collisionCircleArray=Be.circles,delete this.collisionCircleArrays[w.bucketInstanceId]}}symbolFadeChange(w){return this.fadeDuration===0?1:(w-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(w){return Math.max(0,(this.transform.zoom-w)/1.5)}hasTransitions(w){return this.stale||w-this.lastPlacementChangeTimew}setStale(){this.stale=!0}}function rr(ue,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let qe=Q[0]-di,Xe=Q[1]-di,ot=Q[2]-di,Tt=Q[3]-di;ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,qe,Xe),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ot,Xe),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ot,Tt),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,qe,Tt)}let nr=Math.pow(2,25),Er=Math.pow(2,24),Xr=Math.pow(2,17),ri=Math.pow(2,16),Qr=Math.pow(2,9),Oi=Math.pow(2,8),$i=Math.pow(2,1);function tn(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;let w=ue.placed?1:0,B=Math.floor(127*ue.opacity);return B*nr+w*Er+B*Xr+w*ri+B*Qr+w*Oi+B*$i+w}let fn=0;function yn(){return{isOccluded:(ue,w,B)=>!1,getPitchedTextCorrection:(ue,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(ue,w,B,Q){throw new Error("Not implemented.")},translatePosition:(ue,w,B,Q)=>function(ee,le,qe,Xe,ot=!1){if(!qe[0]&&!qe[1])return[0,0];let Tt=ot?Xe==="map"?ee.angle:0:Xe==="viewport"?-ee.angle:0;if(Tt){let Yt=Math.sin(Tt),Kt=Math.cos(Tt);qe=[qe[0]*Kt-qe[1]*Yt,qe[0]*Yt+qe[1]*Kt]}return[ot?qe[0]:In(le,qe[0],ee.zoom),ot?qe[1]:In(le,qe[1],ee.zoom)]}(ue,w,B,Q),getCircleRadiusCorrection:ue=>1}}class Sn{constructor(w){this._sortAcrossTiles=w.layout.get("symbol-z-order")!=="viewport-y"&&!w.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(w,B,Q,ee,le){let qe=this._bucketParts;for(;this._currentTileIndexXe.sortKey-ot.sortKey));this._currentPartIndex!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let qe=B[w[this._currentPlacementIndex]],Xe=this.placement.collisionIndex.transform.zoom;if(qe.type==="symbol"&&(!qe.minzoom||qe.minzoom<=Xe)&&(!qe.maxzoom||qe.maxzoom>Xe)){if(this._inProgressLayer||(this._inProgressLayer=new Sn(qe)),this._inProgressLayer.continuePlacement(Q[qe.source],this.placement,this._showCollisionBoxes,qe,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let ua=512/a.X/2;class ma{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le({x:Math.floor(ot.anchorX*ua),y:Math.floor(ot.anchorY*ua)})),crossTileIDs:qe.map(ot=>ot.crossTileID)};if(Xe.positions.length>128){let ot=new a.av(Xe.positions.length,16,Uint16Array);for(let{x:Tt,y:Yt}of Xe.positions)ot.add(Tt,Yt);ot.finish(),delete Xe.positions,Xe.index=ot}this._symbolsByKey[le]=Xe}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:qe,y:Xe,z:ot}=B.canonical,Tt=ua/Math.pow(2,ot-le),Yt=(Xe*a.X+w.anchorY)*Tt,Kt=ee*a.X*ua;return{x:Math.floor((qe*a.X+w.anchorX)*Tt-Q*a.X*ua),y:Math.floor(Yt-Kt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class Wa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fa{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(w){let B=Math.round((w-this.lng)/360);if(B!==0)for(let Q in this.indexes){let ee=this.indexes[Q],le={};for(let qe in ee){let Xe=ee[qe];Xe.tileID=Xe.tileID.unwrapTo(Xe.tileID.wrap+B),le[Xe.tileID.key]=Xe}this.indexes[Q]=le}this.lng=w}addBucket(w,B,Q){if(this.indexes[w.overscaledZ]&&this.indexes[w.overscaledZ][w.key]){if(this.indexes[w.overscaledZ][w.key].bucketInstanceId===B.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(w.overscaledZ,this.indexes[w.overscaledZ][w.key])}for(let le=0;lew.overscaledZ)for(let Xe in qe){let ot=qe[Xe];ot.tileID.isChildOf(w)&&ot.findMatches(B.symbolInstances,w,ee)}else{let Xe=qe[w.scaledTo(Number(le)).key];Xe&&Xe.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let da=(ue,w)=>a.t(ue,w&&w.filter(B=>B.identifier!=="source.canvas")),Wn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Le(Se(),w._getMapId()),this.dispatcher.registerMessageHandler("GG",(Q,ee)=>this.getGlyphs(Q,ee)),this.dispatcher.registerMessageHandler("GI",(Q,ee)=>this.getImages(Q,ee)),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new G(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new Wo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.ay()),Qt().on(cr,this._rtlPluginLoaded),this.on("data",Q=>{if(Q.dataType!=="source"||Q.sourceDataType!=="metadata")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let le=ee.getSource();if(le&&le.vectorLayerIds)for(let qe in this._layers){let Xe=this._layers[qe];Xe.source===le.id&&this._validateLayer(Xe)}})}loadURL(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),B.validate=typeof B.validate!="boolean"||B.validate;let ee=this.map._requestManager.transformRequest(w,"Style");this._loadStyleRequest=new AbortController;let le=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(qe=>{this._loadStyleRequest=null,this._load(qe.data,B,Q)}).catch(qe=>{this._loadStyleRequest=null,qe&&!le.signal.aborted&&this.fire(new a.j(qe))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,B.validate=B.validate!==!1,this._load(w,B,Q)}).catch(()=>{})}loadEmpty(){this.fire(new a.k("dataloading",{dataType:"style"})),this._load(Wn,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!da(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let qe in le.sources)this.addSource(qe,le.sources[qe],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new te(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,qe,Xe,ot){return a._(this,void 0,void 0,function*(){let Tt=C(le),Yt=Xe>1?"@2x":"",Kt={},xr={};for(let{id:Ir,url:ve}of Tt){let be=qe.transformRequest(M(ve,Yt,".json"),"SpriteJSON");Kt[Ir]=a.h(be,ot);let De=qe.transformRequest(M(ve,Yt,".png"),"SpriteImage");xr[Ir]=p.getImage(De,ot)}return yield Promise.all([...Object.values(Kt),...Object.values(xr)]),function(Ir,ve){return a._(this,void 0,void 0,function*(){let be={};for(let De in Ir){be[De]={};let Be=u.getImageCanvasContext((yield ve[De]).data),et=(yield Ir[De]).data;for(let We in et){let{width:it,height:Ft,x:Ht,y:tr,sdf:dr,pixelRatio:Sr,stretchX:Or,stretchY:Wr,content:ni,textFitWidth:Pi,textFitHeight:cn}=et[We];be[De][We]={data:null,pixelRatio:Sr,sdf:dr,stretchX:Or,stretchY:Wr,content:ni,textFitWidth:Pi,textFitHeight:cn,spriteData:{width:it,height:Ft,x:Ht,y:tr,context:Be}}}}return be})}(Kt,xr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let qe in le){this._spritesImagesIds[qe]=[];let Xe=this._spritesImagesIds[qe]?this._spritesImagesIds[qe].filter(ot=>!(ot in le)):[];for(let ot of Xe)this.imageManager.removeImage(ot),this._changedImages[ot]=!0;for(let ot in le[qe]){let Tt=qe==="default"?ot:`${qe}:${ot}`;this._spritesImagesIds[qe].push(Tt),Tt in this.imageManager.images?this.imageManager.updateImage(Tt,le[qe][ot],!1):this.imageManager.addImage(Tt,le[qe][ot]),B&&(this._changedImages[Tt]=!0)}}}).catch(le=>{this._spriteRequest=null,ee=le,this.fire(new a.j(ee))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),B&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"})),Q&&Q(ee)})}_unloadSprite(){for(let w of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(w),this._changedImages[w]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}_validateLayer(w){let B=this.sourceCaches[w.source];if(!B)return;let Q=w.sourceLayer;if(!Q)return;let ee=B.getSource();(ee.type==="geojson"||ee.vectorLayerIds&&ee.vectorLayerIds.indexOf(Q)===-1)&&this.fire(new a.j(new Error(`Source layer "${Q}" does not exist on source "${ee.id}" as specified by style layer "${w.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let w in this.sourceCaches)if(!this.sourceCaches[w].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(w,B=!1){let Q=this._serializedAllLayers();if(!w||w.length===0)return Object.values(B?a.aB(Q):Q);let ee=[];for(let le of w)if(Q[le]){let qe=B?a.aB(Q[le]):Q[le];ee.push(qe)}return ee}_serializedAllLayers(){let w=this._serializedLayers;if(w)return w;w=this._serializedLayers={};let B=Object.keys(this._layers);for(let Q of B){let ee=this._layers[Q];ee.type!=="custom"&&(w[Q]=ee.serialize())}return w}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let w in this.sourceCaches)if(this.sourceCaches[w].hasTransition())return!0;for(let w in this._layers)if(this._layers[w].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(w){if(!this._loaded)return;let B=this._changed;if(B){let ee=Object.keys(this._updatedLayers),le=Object.keys(this._removedLayers);(ee.length||le.length)&&this._updateWorkerLayers(ee,le);for(let qe in this._updatedSources){let Xe=this._updatedSources[qe];if(Xe==="reload")this._reloadSource(qe);else{if(Xe!=="clear")throw new Error(`Invalid action ${Xe}`);this._clearSource(qe)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let qe in this._updatedPaintProps)this._layers[qe].updateTransitions(w);this.light.updateTransitions(w),this.sky.updateTransitions(w),this._resetUpdates()}let Q={};for(let ee in this.sourceCaches){let le=this.sourceCaches[ee];Q[ee]=le.used,le.used=!1}for(let ee of this._order){let le=this._layers[ee];le.recalculate(w,this._availableImages),!le.isHidden(w.zoom)&&le.source&&(this.sourceCaches[le.source].used=!0)}for(let ee in Q){let le=this.sourceCaches[ee];!!Q[ee]!=!!le.used&&le.fire(new a.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:ee}))}this.light.recalculate(w),this.sky.recalculate(w),this.z=w.zoom,B&&this.fire(new a.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let w=Object.keys(this._changedImages);if(w.length){for(let B in this.sourceCaches)this.sourceCaches[B].reloadTilesForDependencies(["icons","patterns"],w);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let w in this.sourceCaches)this.sourceCaches[w].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(w,B){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(w,!1),removedIds:B})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(w,B={}){var Q;this._checkLoaded();let ee=this.serialize();if(w=B.transformStyle?B.transformStyle(ee,w):w,((Q=B.validate)===null||Q===void 0||Q)&&da(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),qe=this._getOperationsToPerform(le);if(qe.unimplemented.length>0)throw new Error(`Unimplemented: ${qe.unimplemented.join(", ")}.`);if(qe.operations.length===0)return!1;for(let Xe of qe.operations)Xe();return this.stylesheet=w,this._serializedLayers=null,!0}_getOperationsToPerform(w){let B=[],Q=[];for(let ee of w)switch(ee.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":B.push(()=>this.addLayer.apply(this,ee.args));break;case"removeLayer":B.push(()=>this.removeLayer.apply(this,ee.args));break;case"setPaintProperty":B.push(()=>this.setPaintProperty.apply(this,ee.args));break;case"setLayoutProperty":B.push(()=>this.setLayoutProperty.apply(this,ee.args));break;case"setFilter":B.push(()=>this.setFilter.apply(this,ee.args));break;case"addSource":B.push(()=>this.addSource.apply(this,ee.args));break;case"removeSource":B.push(()=>this.removeSource.apply(this,ee.args));break;case"setLayerZoomRange":B.push(()=>this.setLayerZoomRange.apply(this,ee.args));break;case"setLight":B.push(()=>this.setLight.apply(this,ee.args));break;case"setGeoJSONSourceData":B.push(()=>this.setGeoJSONSourceData.apply(this,ee.args));break;case"setGlyphs":B.push(()=>this.setGlyphs.apply(this,ee.args));break;case"setSprite":B.push(()=>this.setSprite.apply(this,ee.args));break;case"setSky":B.push(()=>this.setSky.apply(this,ee.args));break;case"setTerrain":B.push(()=>this.map.setTerrain.apply(this,ee.args));break;case"setTransition":B.push(()=>{});break;default:Q.push(ee.command)}return{operations:B,unimplemented:Q}}addImage(w,B){if(this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" already exists.`)));this.imageManager.addImage(w,B),this._afterImageUpdated(w)}updateImage(w,B){this.imageManager.updateImage(w,B)}getImage(w){return this.imageManager.getImage(w)}removeImage(w){if(!this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" does not exist.`)));this.imageManager.removeImage(w),this._afterImageUpdated(w)}_afterImageUpdated(w){this._availableImages=this.imageManager.listImages(),this._changedImages[w]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(w,B,Q={}){if(this._checkLoaded(),this.sourceCaches[w]!==void 0)throw new Error(`Source "${w}" already exists.`);if(!B.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(B).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(B.type)>=0&&this._validate(a.u.source,`sources.${w}`,B,null,Q))return;this.map&&this.map._collectResourceTiming&&(B.collectResourceTiming=!0);let ee=this.sourceCaches[w]=new mt(w,B,this.dispatcher);ee.style=this,ee.setEventedParent(this,()=>({isSourceLoaded:ee.loaded(),source:ee.serialize(),sourceId:w})),ee.onAdd(this.map),this._changed=!0}removeSource(w){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error("There is no source with this ID");for(let Q in this._layers)if(this._layers[Q].source===w)return this.fire(new a.j(new Error(`Source "${w}" cannot be removed while layer "${Q}" is using it.`)));let B=this.sourceCaches[w];delete this.sourceCaches[w],delete this._updatedSources[w],B.fire(new a.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:w})),B.setEventedParent(null),B.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(w,B){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(`There is no source with this ID=${w}`);let Q=this.sourceCaches[w].getSource();if(Q.type!=="geojson")throw new Error(`geojsonSource.type is ${Q.type}, which is !== 'geojson`);Q.setData(B),this._changed=!0}getSource(w){return this.sourceCaches[w]&&this.sourceCaches[w].getSource()}addLayer(w,B,Q={}){this._checkLoaded();let ee=w.id;if(this.getLayer(ee))return void this.fire(new a.j(new Error(`Layer "${ee}" already exists on this map.`)));let le;if(w.type==="custom"){if(da(this,a.aD(w)))return;le=a.aA(w)}else{if("source"in w&&typeof w.source=="object"&&(this.addSource(ee,w.source),w=a.aB(w),w=a.e(w,{source:ee})),this._validate(a.u.layer,`layers.${ee}`,w,{arrayIndex:-1},Q))return;le=a.aA(w),this._validateLayer(le),le.setEventedParent(this,{layer:{id:ee}})}let qe=B?this._order.indexOf(B):this._order.length;if(B&&qe===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(qe,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let Xe=this._removedLayers[ee];delete this._removedLayers[ee],Xe.type!==le.type?this._updatedSources[le.source]="clear":(this._updatedSources[le.source]="reload",this.sourceCaches[le.source].pause())}this._updateLayer(le),le.onAdd&&le.onAdd(this.map)}}moveLayer(w,B){if(this._checkLoaded(),this._changed=!0,!this._layers[w])return void this.fire(new a.j(new Error(`The layer '${w}' does not exist in the map's style and cannot be moved.`)));if(w===B)return;let Q=this._order.indexOf(w);this._order.splice(Q,1);let ee=B?this._order.indexOf(B):this._order.length;B&&ee===-1?this.fire(new a.j(new Error(`Cannot move layer "${w}" before non-existing layer "${B}".`))):(this._order.splice(ee,0,w),this._layerOrderChanged=!0)}removeLayer(w){this._checkLoaded();let B=this._layers[w];if(!B)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer "${w}".`)));B.setEventedParent(null);let Q=this._order.indexOf(w);this._order.splice(Q,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[w]=B,delete this._layers[w],this._serializedLayers&&delete this._serializedLayers[w],delete this._updatedLayers[w],delete this._updatedPaintProps[w],B.onRemove&&B.onRemove(this.map)}getLayer(w){return this._layers[w]}getLayersOrder(){return[...this._order]}hasLayer(w){return w in this._layers}setLayerZoomRange(w,B,Q){this._checkLoaded();let ee=this.getLayer(w);ee?ee.minzoom===B&&ee.maxzoom===Q||(B!=null&&(ee.minzoom=B),Q!=null&&(ee.maxzoom=Q),this._updateLayer(ee)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer "${w}".`)))}setFilter(w,B,Q={}){this._checkLoaded();let ee=this.getLayer(w);if(ee){if(!a.aE(ee.filter,B))return B==null?(ee.filter=void 0,void this._updateLayer(ee)):void(this._validate(a.u.filter,`layers.${ee.id}.filter`,B,null,Q)||(ee.filter=a.aB(B),this._updateLayer(ee)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer "${w}".`)))}getFilter(w){return a.aB(this.getLayer(w).filter)}setLayoutProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getLayoutProperty(B),Q)||(le.setLayoutProperty(B,Q,ee),this._updateLayer(le)):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getLayoutProperty(w,B){let Q=this.getLayer(w);if(Q)return Q.getLayoutProperty(B);this.fire(new a.j(new Error(`Cannot get style of non-existing layer "${w}".`)))}setPaintProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getPaintProperty(B),Q)||(le.setPaintProperty(B,Q,ee)&&this._updateLayer(le),this._changed=!0,this._updatedPaintProps[w]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getPaintProperty(w,B){return this.getLayer(w).getPaintProperty(B)}setFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=w.sourceLayer,le=this.sourceCaches[Q];if(le===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let qe=le.getSource().type;qe==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):qe!=="vector"||ee?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),le.setFeatureState(ee,w.id,B)):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=this.sourceCaches[Q];if(ee===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let le=ee.getSource().type,qe=le==="vector"?w.sourceLayer:void 0;le!=="vector"||qe?B&&typeof w.id!="string"&&typeof w.id!="number"?this.fire(new a.j(new Error("A feature id is required to remove its specific state property."))):ee.removeFeatureState(qe,w.id,B):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(w){this._checkLoaded();let B=w.source,Q=w.sourceLayer,ee=this.sourceCaches[B];if(ee!==void 0)return ee.getSource().type!=="vector"||Q?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),ee.getFeatureState(Q,w.id)):void this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.j(new Error(`The source '${B}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let w=a.aF(this.sourceCaches,le=>le.serialize()),B=this._serializeByIds(this._order,!0),Q=this.map.getTerrain()||void 0,ee=this.stylesheet;return a.aG({version:ee.version,name:ee.name,metadata:ee.metadata,light:ee.light,sky:ee.sky,center:ee.center,zoom:ee.zoom,bearing:ee.bearing,pitch:ee.pitch,sprite:ee.sprite,glyphs:ee.glyphs,transition:ee.transition,sources:w,layers:B,terrain:Q},le=>le!==void 0)}_updateLayer(w){this._updatedLayers[w.id]=!0,w.source&&!this._updatedSources[w.source]&&this.sourceCaches[w.source].getSource().type!=="raster"&&(this._updatedSources[w.source]="reload",this.sourceCaches[w.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(w){let B=qe=>this._layers[qe].type==="fill-extrusion",Q={},ee=[];for(let qe=this._order.length-1;qe>=0;qe--){let Xe=this._order[qe];if(B(Xe)){Q[Xe]=qe;for(let ot of w){let Tt=ot[Xe];if(Tt)for(let Yt of Tt)ee.push(Yt)}}}ee.sort((qe,Xe)=>Xe.intersectionZ-qe.intersectionZ);let le=[];for(let qe=this._order.length-1;qe>=0;qe--){let Xe=this._order[qe];if(B(Xe))for(let ot=ee.length-1;ot>=0;ot--){let Tt=ee[ot].feature;if(Q[Tt.layer.id]{let dr=Be.featureSortOrder;if(dr){let Sr=dr.indexOf(Ht.featureIndex);return dr.indexOf(tr.featureIndex)-Sr}return tr.featureIndex-Ht.featureIndex});for(let Ht of Ft)it.push(Ht)}}for(let Be in ve)ve[Be].forEach(et=>{let We=et.feature,it=Tt[Xe[Be].source].getFeatureState(We.layer["source-layer"],We.id);We.source=We.layer.source,We.layer["source-layer"]&&(We.sourceLayer=We.layer["source-layer"]),We.state=it});return ve}(this._layers,qe,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(le)}querySourceFeatures(w,B){B&&B.filter&&this._validate(a.u.filter,"querySourceFeatures.filter",B.filter,null,B);let Q=this.sourceCaches[w];return Q?function(ee,le){let qe=ee.getRenderableIds().map(Tt=>ee.getTileByID(Tt)),Xe=[],ot={};for(let Tt=0;Ttxr.getTileByID(Ir)).sort((Ir,ve)=>ve.tileID.overscaledZ-Ir.tileID.overscaledZ||(Ir.tileID.isLessThan(ve.tileID)?-1:1))}let Kt=this.crossTileSymbolIndex.addLayer(Yt,ot[Yt.source],w.center.lng);qe=qe||Kt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new Ba(w,this.map.terrain,this._order,le,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ot),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),Xe=!0),qe&&this.pauseablePlacement.placement.setStale()),Xe||qe)for(let Tt of this._order){let Yt=this._layers[Tt];Yt.type==="symbol"&&this.placement.updateLayerOpacities(Yt,ot[Yt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let w in this.sourceCaches)this.sourceCaches[w].releaseSymbolFadeTiles()}getImages(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.imageManager.getImages(B.icons);this._updateTilesForChangedImages();let ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,B.icons),Q})}getGlyphs(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.glyphManager.getGlyphs(B.stacks),ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,[""]),Q})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(w,B={}){this._checkLoaded(),w&&this._validate(a.u.glyphs,"glyphs",w,null,B)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=w,this.glyphManager.entries={},this.glyphManager.setURL(w))}addSprite(w,B,Q={},ee){this._checkLoaded();let le=[{id:w,url:B}],qe=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",qe,null,Q)||(this.stylesheet.sprite=qe,this._loadSprite(le,!0,ee))}removeSprite(w){this._checkLoaded();let B=C(this.stylesheet.sprite);if(B.find(Q=>Q.id===w)){if(this._spritesImagesIds[w])for(let Q of this._spritesImagesIds[w])this.imageManager.removeImage(Q),this._changedImages[Q]=!0;B.splice(B.findIndex(Q=>Q.id===w),1),this.stylesheet.sprite=B.length>0?B:void 0,delete this._spritesImagesIds[w],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}else this.fire(new a.j(new Error(`Sprite "${w}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(w,B={},Q){this._checkLoaded(),w&&this._validate(a.u.sprite,"sprite",w,null,B)||(this.stylesheet.sprite=w,w?this._loadSprite(w,!0,Q):(this._unloadSprite(),Q&&Q(null)))}}var vo=a.Y([{name:"a_pos",type:"Int16",components:2}]);let jn={prelude:Mt(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif `,`#ifdef GL_ES precision highp float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} #ifdef TERRAIN3D uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; #endif const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { #ifdef TERRAIN3D highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); #else return 1.0; #endif }float calculate_visibility(vec4 pos) { #ifdef TERRAIN3D vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; #else return 1.0; #endif }float ele(vec2 pos) { #ifdef TERRAIN3D vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif }float get_elevation(vec2 pos) { #ifdef TERRAIN3D vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif }`),background:Mt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Mt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Mt(`varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Mt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Mt(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Mt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Mt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Mt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Mt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Mt(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_FragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Mt(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Mt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Mt(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Mt(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; #ifdef TERRAIN3D attribute vec2 a_centroid; #endif varying vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 normal=a_normal_ed.xyz; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Mt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; #ifdef TERRAIN3D attribute vec2 a_centroid; #endif varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Mt(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Mt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Mt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),lineGradient:Mt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),linePattern:Mt(`#ifdef GL_ES precision highp float; #endif uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Mt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Mt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Mt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Mt(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Mt(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Mt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Mt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Mt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Mt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Mt(ue,w){let B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=w.match(/attribute ([\w]+) ([\w]+)/g),ee=ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),le=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),qe=le?le.concat(ee):ee,Xe={};return{fragmentSource:ue=ue.replace(B,(ot,Tt,Yt,Kt,xr)=>(Xe[xr]=!0,Tt==="define"?` #ifndef HAS_UNIFORM_u_${xr} varying ${Yt} ${Kt} ${xr}; #else uniform ${Yt} ${Kt} u_${xr}; #endif `:` #ifdef HAS_UNIFORM_u_${xr} ${Yt} ${Kt} ${xr} = u_${xr}; #endif `)),vertexSource:w=w.replace(B,(ot,Tt,Yt,Kt,xr)=>{let Ir=Kt==="float"?"vec2":"vec4",ve=xr.match(/color/)?"color":Ir;return Xe[xr]?Tt==="define"?` #ifndef HAS_UNIFORM_u_${xr} uniform lowp float u_${xr}_t; attribute ${Yt} ${Ir} a_${xr}; varying ${Yt} ${Kt} ${xr}; #else uniform ${Yt} ${Kt} u_${xr}; #endif `:ve==="vec4"?` #ifndef HAS_UNIFORM_u_${xr} ${xr} = a_${xr}; #else ${Yt} ${Kt} ${xr} = u_${xr}; #endif `:` #ifndef HAS_UNIFORM_u_${xr} ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t); #else ${Yt} ${Kt} ${xr} = u_${xr}; #endif `:Tt==="define"?` #ifndef HAS_UNIFORM_u_${xr} uniform lowp float u_${xr}_t; attribute ${Yt} ${Ir} a_${xr}; #else uniform ${Yt} ${Kt} u_${xr}; #endif `:ve==="vec4"?` #ifndef HAS_UNIFORM_u_${xr} ${Yt} ${Kt} ${xr} = a_${xr}; #else ${Yt} ${Kt} ${xr} = u_${xr}; #endif `:` #ifndef HAS_UNIFORM_u_${xr} ${Yt} ${Kt} ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t); #else ${Yt} ${Kt} ${xr} = u_${xr}; #endif `}),staticAttributes:Q,staticUniforms:qe}}class kr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(w,B,Q,ee,le,qe,Xe,ot,Tt){this.context=w;let Yt=this.boundPaintVertexBuffers.length!==ee.length;for(let Kt=0;!Yt&&Kt({u_matrix:ue,u_texture:0,u_ele_delta:w,u_fog_matrix:B,u_fog_color:Q?Q.properties.get("fog-color"):a.aM.white,u_fog_ground_blend:Q?Q.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Q?Q.calculateFogBlendOpacity(ee):0,u_horizon_color:Q?Q.properties.get("horizon-color"):a.aM.white,u_horizon_fog_blend:Q?Q.properties.get("horizon-fog-blend"):1});function vi(ue){let w=[];for(let B=0;B({u_depth:new a.aH(Ht,tr.u_depth),u_terrain:new a.aH(Ht,tr.u_terrain),u_terrain_dim:new a.aI(Ht,tr.u_terrain_dim),u_terrain_matrix:new a.aJ(Ht,tr.u_terrain_matrix),u_terrain_unpack:new a.aK(Ht,tr.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Ht,tr.u_terrain_exaggeration)}))(w,Ft),this.binderUniforms=Q?Q.getUniforms(w,Ft):[]}draw(w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,Kt,xr,Ir,ve,be,De,Be,et){let We=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(qe),ot){w.activeTexture.set(We.TEXTURE2),We.bindTexture(We.TEXTURE_2D,ot.depthTexture),w.activeTexture.set(We.TEXTURE3),We.bindTexture(We.TEXTURE_2D,ot.texture);for(let Ft in this.terrainUniforms)this.terrainUniforms[Ft].set(ot[Ft])}for(let Ft in this.fixedUniforms)this.fixedUniforms[Ft].set(Xe[Ft]);be&&be.setUniforms(w,this.binderUniforms,Ir,{zoom:ve});let it=0;switch(B){case We.LINES:it=2;break;case We.TRIANGLES:it=3;break;case We.LINE_STRIP:it=1}for(let Ft of xr.get()){let Ht=Ft.vaos||(Ft.vaos={});(Ht[Tt]||(Ht[Tt]=new kr)).bind(w,this,Yt,be?be.getPaintVertexBuffers():[],Kt,Ft.vertexOffset,De,Be,et),We.drawElements(B,Ft.primitiveLength*it,We.UNSIGNED_SHORT,Ft.primitiveOffset*it*2)}}}function An(ue,w,B){let Q=1/In(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,qe=le*(B.tileID.canonical.x+B.tileID.wrap*ee),Xe=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,ue.fromScale,ue.toScale],u_fade:ue.t,u_pixel_coord_upper:[qe>>16,Xe>>16],u_pixel_coord_lower:[65535&qe,65535&Xe]}}let Mn=(ue,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),qe=[le.x,le.y,le.z],Xe=function(){var Tt=new a.A(9);return a.A!=Float32Array&&(Tt[1]=0,Tt[2]=0,Tt[3]=0,Tt[5]=0,Tt[6]=0,Tt[7]=0),Tt[0]=1,Tt[4]=1,Tt[8]=1,Tt}();ee.properties.get("anchor")==="viewport"&&function(Tt,Yt){var Kt=Math.sin(Yt),xr=Math.cos(Yt);Tt[0]=xr,Tt[1]=Kt,Tt[2]=0,Tt[3]=-Kt,Tt[4]=xr,Tt[5]=0,Tt[6]=0,Tt[7]=0,Tt[8]=1}(Xe,-w.transform.angle),function(Tt,Yt,Kt){var xr=Yt[0],Ir=Yt[1],ve=Yt[2];Tt[0]=xr*Kt[0]+Ir*Kt[3]+ve*Kt[6],Tt[1]=xr*Kt[1]+Ir*Kt[4]+ve*Kt[7],Tt[2]=xr*Kt[2]+Ir*Kt[5]+ve*Kt[8]}(qe,qe,Xe);let ot=ee.properties.get("color");return{u_matrix:ue,u_lightpos:qe,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[ot.r,ot.g,ot.b],u_vertical_gradient:+B,u_opacity:Q}},Li=(ue,w,B,Q,ee,le,qe)=>a.e(Mn(ue,w,B,Q),An(le,w,qe),{u_height_factor:-Math.pow(2,ee.overscaledZ)/qe.tileSize/8}),_n=ue=>({u_matrix:ue}),ya=(ue,w,B,Q)=>a.e(_n(ue),An(B,w,Q)),Jn=(ue,w)=>({u_matrix:ue,u_world:w}),Ma=(ue,w,B,Q,ee)=>a.e(ya(ue,w,B,Q),{u_world:ee}),_o=(ue,w,B,Q)=>{let ee=ue.transform,le,qe;if(Q.paint.get("circle-pitch-alignment")==="map"){let Xe=In(B,1,ee.zoom);le=!0,qe=[Xe,Xe]}else le=!1,qe=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:ue.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:ue.pixelRatio,u_extrude_scale:qe}},No=(ue,w,B)=>({u_matrix:ue,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),po=(ue,w,B=1)=>({u_matrix:ue,u_color:w,u_overlay:0,u_overlay_scale:B}),Lo=ue=>({u_matrix:ue}),ko=(ue,w,B,Q)=>({u_matrix:ue,u_extrude_scale:In(w,1,B),u_intensity:Q}),Ds=(ue,w,B,Q)=>{let ee=a.H();a.aP(ee,0,ue.width,ue.height,0,0,1);let le=ue.context.gl;return{u_matrix:ee,u_world:[le.drawingBufferWidth,le.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get("heatmap-opacity")}};function Fs(ue,w){let B=Math.pow(2,w.canonical.z),Q=w.canonical.y;return[new a.Z(0,Q/B).toLngLat().lat,new a.Z(0,(Q+1)/B).toLngLat().lat]}let ll=(ue,w,B,Q)=>{let ee=ue.transform;return{u_matrix:As(ue,w,B,Q),u_ratio:1/In(w,1,ee.zoom),u_device_pixel_ratio:ue.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},ul=(ue,w,B,Q,ee)=>a.e(ll(ue,w,B,ee),{u_image:0,u_image_height:Q}),zl=(ue,w,B,Q,ee)=>{let le=ue.transform,qe=il(w,le);return{u_matrix:As(ue,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/In(w,1,le.zoom),u_device_pixel_ratio:ue.pixelRatio,u_image:0,u_scale:[qe,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},us=(ue,w,B,Q,ee,le)=>{let qe=ue.lineAtlas,Xe=il(w,ue.transform),ot=B.layout.get("line-cap")==="round",Tt=qe.getDash(Q.from,ot),Yt=qe.getDash(Q.to,ot),Kt=Tt.width*ee.fromScale,xr=Yt.width*ee.toScale;return a.e(ll(ue,w,B,le),{u_patternscale_a:[Xe/Kt,-Tt.height/2],u_patternscale_b:[Xe/xr,-Yt.height/2],u_sdfgamma:qe.width/(256*Math.min(Kt,xr)*ue.pixelRatio)/2,u_image:0,u_tex_y_a:Tt.y,u_tex_y_b:Yt.y,u_mix:ee.t})};function il(ue,w){return 1/In(ue,1,w.tileZoom)}function As(ue,w,B,Q){return ue.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let cl=(ue,w,B,Q,ee)=>{return{u_matrix:ue,u_tl_parent:w,u_scale_parent:B,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*ee.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ee.paint.get("raster-brightness-min"),u_brightness_high:ee.paint.get("raster-brightness-max"),u_saturation_factor:(qe=ee.paint.get("raster-saturation"),qe>0?1-1/(1.001-qe):-qe),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ks(ee.paint.get("raster-hue-rotate"))};var le,qe};function Ks(ue){ue*=Math.PI/180;let w=Math.sin(ue),B=Math.cos(ue);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let zs=(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,Kt,xr,Ir)=>{let ve=qe.transform;return{u_is_size_zoom_constant:+(ue==="constant"||ue==="source"),u_is_size_feature_constant:+(ue==="constant"||ue==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ve.cameraToCenterDistance,u_pitch:ve.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ve.width/ve.height,u_fade_change:qe.options.fadeDuration?qe.symbolFadeChange:1,u_matrix:Xe,u_label_plane_matrix:ot,u_coord_matrix:Tt,u_is_text:+Kt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:xr,u_texture:0,u_translation:Yt,u_pitched_scale:Ir}},Io=(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,Kt,xr,Ir,ve)=>{let be=qe.transform;return a.e(zs(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,Kt,xr,ve),{u_gamma_scale:Q?Math.cos(be._pitch)*be.cameraToCenterDistance:1,u_device_pixel_ratio:qe.pixelRatio,u_is_halo:+Ir})},ls=(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,Kt,xr,Ir)=>a.e(Io(ue,w,B,Q,ee,le,qe,Xe,ot,Tt,Yt,!0,Kt,!0,Ir),{u_texsize_icon:xr,u_texture_icon:1}),Zl=(ue,w,B)=>({u_matrix:ue,u_opacity:w,u_color:B}),Su=(ue,w,B,Q,ee,le)=>a.e(function(qe,Xe,ot,Tt){let Yt=ot.imageManager.getPattern(qe.from.toString()),Kt=ot.imageManager.getPattern(qe.to.toString()),{width:xr,height:Ir}=ot.imageManager.getPixelSize(),ve=Math.pow(2,Tt.tileID.overscaledZ),be=Tt.tileSize*Math.pow(2,ot.transform.tileZoom)/ve,De=be*(Tt.tileID.canonical.x+Tt.tileID.wrap*ve),Be=be*Tt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Yt.tl,u_pattern_br_a:Yt.br,u_pattern_tl_b:Kt.tl,u_pattern_br_b:Kt.br,u_texsize:[xr,Ir],u_mix:Xe.t,u_pattern_size_a:Yt.displaySize,u_pattern_size_b:Kt.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/In(Tt,1,ot.transform.tileZoom),u_pixel_coord_upper:[De>>16,Be>>16],u_pixel_coord_lower:[65535&De,65535&Be]}}(Q,le,B,ee),{u_matrix:ue,u_opacity:w}),nc={fillExtrusion:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_opacity:new a.aI(ue,w.u_opacity)}),fillExtrusionPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_height_factor:new a.aI(ue,w.u_height_factor),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade),u_opacity:new a.aI(ue,w.u_opacity)}),fill:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),fillPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),fillOutline:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world)}),fillOutlinePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),circle:(ue,w)=>({u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(ue,w.u_scale_with_map),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_extrude_scale:new a.aO(ue,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_matrix:new a.aJ(ue,w.u_matrix)}),collisionBox:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_pixel_extrude_scale:new a.aO(ue,w.u_pixel_extrude_scale)}),collisionCircle:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_inv_matrix:new a.aJ(ue,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_viewport_size:new a.aO(ue,w.u_viewport_size)}),debug:(ue,w)=>({u_color:new a.aL(ue,w.u_color),u_matrix:new a.aJ(ue,w.u_matrix),u_overlay:new a.aH(ue,w.u_overlay),u_overlay_scale:new a.aI(ue,w.u_overlay_scale)}),clippingMask:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),heatmap:(ue,w)=>({u_extrude_scale:new a.aI(ue,w.u_extrude_scale),u_intensity:new a.aI(ue,w.u_intensity),u_matrix:new a.aJ(ue,w.u_matrix)}),heatmapTexture:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_color_ramp:new a.aH(ue,w.u_color_ramp),u_opacity:new a.aI(ue,w.u_opacity)}),hillshade:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_latrange:new a.aO(ue,w.u_latrange),u_light:new a.aO(ue,w.u_light),u_shadow:new a.aL(ue,w.u_shadow),u_highlight:new a.aL(ue,w.u_highlight),u_accent:new a.aL(ue,w.u_accent)}),hillshadePrepare:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_dimension:new a.aO(ue,w.u_dimension),u_zoom:new a.aI(ue,w.u_zoom),u_unpack:new a.aK(ue,w.u_unpack)}),line:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels)}),lineGradient:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_image:new a.aH(ue,w.u_image),u_image_height:new a.aI(ue,w.u_image_height)}),linePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texsize:new a.aO(ue,w.u_texsize),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_image:new a.aH(ue,w.u_image),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),lineSDF:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_patternscale_a:new a.aO(ue,w.u_patternscale_a),u_patternscale_b:new a.aO(ue,w.u_patternscale_b),u_sdfgamma:new a.aI(ue,w.u_sdfgamma),u_image:new a.aH(ue,w.u_image),u_tex_y_a:new a.aI(ue,w.u_tex_y_a),u_tex_y_b:new a.aI(ue,w.u_tex_y_b),u_mix:new a.aI(ue,w.u_mix)}),raster:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_tl_parent:new a.aO(ue,w.u_tl_parent),u_scale_parent:new a.aI(ue,w.u_scale_parent),u_buffer_scale:new a.aI(ue,w.u_buffer_scale),u_fade_t:new a.aI(ue,w.u_fade_t),u_opacity:new a.aI(ue,w.u_opacity),u_image0:new a.aH(ue,w.u_image0),u_image1:new a.aH(ue,w.u_image1),u_brightness_low:new a.aI(ue,w.u_brightness_low),u_brightness_high:new a.aI(ue,w.u_brightness_high),u_saturation_factor:new a.aI(ue,w.u_saturation_factor),u_contrast_factor:new a.aI(ue,w.u_contrast_factor),u_spin_weights:new a.aN(ue,w.u_spin_weights)}),symbolIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolSDF:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolTextAndIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texsize_icon:new a.aO(ue,w.u_texsize_icon),u_texture:new a.aH(ue,w.u_texture),u_texture_icon:new a.aH(ue,w.u_texture_icon),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),background:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_color:new a.aL(ue,w.u_color)}),backgroundPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_image:new a.aH(ue,w.u_image),u_pattern_tl_a:new a.aO(ue,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(ue,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(ue,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(ue,w.u_pattern_br_b),u_texsize:new a.aO(ue,w.u_texsize),u_mix:new a.aI(ue,w.u_mix),u_pattern_size_a:new a.aO(ue,w.u_pattern_size_a),u_pattern_size_b:new a.aO(ue,w.u_pattern_size_b),u_scale_a:new a.aI(ue,w.u_scale_a),u_scale_b:new a.aI(ue,w.u_scale_b),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(ue,w.u_tile_units_to_pixels)}),terrain:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_ele_delta:new a.aI(ue,w.u_ele_delta),u_fog_matrix:new a.aJ(ue,w.u_fog_matrix),u_fog_color:new a.aL(ue,w.u_fog_color),u_fog_ground_blend:new a.aI(ue,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(ue,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon_fog_blend:new a.aI(ue,w.u_horizon_fog_blend)}),terrainDepth:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),terrainCoords:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_terrain_coords_id:new a.aI(ue,w.u_terrain_coords_id),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),sky:(ue,w)=>({u_sky_color:new a.aL(ue,w.u_sky_color),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon:new a.aI(ue,w.u_horizon),u_sky_horizon_blend:new a.aI(ue,w.u_sky_horizon_blend)})};class bs{constructor(w,B,Q){this.context=w;let ee=w.gl;this.buffer=ee.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),w.bindElementBuffer.set(this.buffer),ee.bufferData(ee.ELEMENT_ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?ee.DYNAMIC_DRAW:ee.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(w){let B=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),B.bufferSubData(B.ELEMENT_ARRAY_BUFFER,0,w.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Rn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _a{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let le=w.gl;this.buffer=le.createBuffer(),w.bindVertexBuffer.set(this.buffer),le.bufferData(le.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?le.DYNAMIC_DRAW:le.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(w){if(w.length!==this.length)throw new Error(`Length of new data is ${w.length}, which doesn't match current length of ${this.length}`);let B=this.context.gl;this.bind(),B.bufferSubData(B.ARRAY_BUFFER,0,w.arrayBuffer)}enableAttributes(w,B){for(let Q=0;Q0){let Ht=a.H();a.aQ(Ht,We.placementInvProjMatrix,ue.transform.glCoordMatrix),a.aQ(Ht,Ht,We.placementViewportMatrix),ot.push({circleArray:Ft,circleOffset:Yt,transform:et.posMatrix,invTransform:Ht,coord:et}),Tt+=Ft.length/4,Yt=Tt}it&&Xe.draw(le,qe.LINES,Po.disabled,Yo.disabled,ue.colorModeForRenderPass(),Pa.disabled,{u_matrix:et.posMatrix,u_pixel_extrude_scale:[1/(Kt=ue.transform).width,1/Kt.height]},ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(et),B.id,it.layoutVertexBuffer,it.indexBuffer,it.segments,null,ue.transform.zoom,null,null,it.collisionVertexBuffer)}var Kt;if(!ee||!ot.length)return;let xr=ue.useProgram("collisionCircle"),Ir=new a.aR;Ir.resize(4*Tt),Ir._trim();let ve=0;for(let Be of ot)for(let et=0;et=0&&(Be[We.associatedIconIndex]={shiftedAnchor:Kn,angle:Ta})}else pi(We.numGlyphs,be)}if(Tt){De.clear();let et=ue.icon.placedSymbolArray;for(let We=0;Weue.style.map.terrain.getElevation(Wr,nt,jt):null,kt=B.layout.get("text-rotation-alignment")==="map";je(Pi,Wr.posMatrix,ue,ee,Ul,au,Be,Tt,kt,be,Wr.toUnwrapped(),ve.width,ve.height,Js,Ye)}let Tl=Wr.posMatrix,Al=ee&&dr||dc,X=et||Al?bl:Ul,se=Lu,Te=Cn&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Ne;Ne=Cn?Pi.iconsInText?ls(Kn.kind,$a,We,Be,et,Al,ue,Tl,X,se,Js,Qa,Ts,Or):Io(Kn.kind,$a,We,Be,et,Al,ue,Tl,X,se,Js,ee,Qa,!0,Or):zs(Kn.kind,$a,We,Be,et,Al,ue,Tl,X,se,Js,ee,Qa,Or);let He={program:fa,buffers:cn,uniformValues:Ne,atlasTexture:mo,atlasTextureIcon:wo,atlasInterpolation:Bo,atlasInterpolationIcon:Ps,isSDF:Cn,hasHalo:Te};if(Ft&&Pi.canOverlap){Ht=!0;let Ye=cn.segments.get();for(let kt of Ye)Sr.push({segments:new a.a0([kt]),sortKey:kt.sortKey,state:He,terrainData:Co})}else Sr.push({segments:cn.segments,sortKey:0,state:He,terrainData:Co})}Ht&&Sr.sort((Wr,ni)=>Wr.sortKey-ni.sortKey);for(let Wr of Sr){let ni=Wr.state;if(xr.activeTexture.set(Ir.TEXTURE0),ni.atlasTexture.bind(ni.atlasInterpolation,Ir.CLAMP_TO_EDGE),ni.atlasTextureIcon&&(xr.activeTexture.set(Ir.TEXTURE1),ni.atlasTextureIcon&&ni.atlasTextureIcon.bind(ni.atlasInterpolationIcon,Ir.CLAMP_TO_EDGE)),ni.isSDF){let Pi=ni.uniformValues;ni.hasHalo&&(Pi.u_is_halo=1,Qf(ni.buffers,Wr.segments,B,ue,ni.program,tr,Yt,Kt,Pi,Wr.terrainData)),Pi.u_is_halo=0}Qf(ni.buffers,Wr.segments,B,ue,ni.program,tr,Yt,Kt,ni.uniformValues,Wr.terrainData)}}function Qf(ue,w,B,Q,ee,le,qe,Xe,ot,Tt){let Yt=Q.context;ee.draw(Yt,Yt.gl.TRIANGLES,le,qe,Xe,Pa.disabled,ot,Tt,B.id,ue.layoutVertexBuffer,ue.indexBuffer,w,B.paint,Q.transform.zoom,ue.programConfigurations.get(B.id),ue.dynamicLayoutVertexBuffer,ue.opacityVertexBuffer)}function _f(ue,w,B,Q){let ee=ue.context,le=ee.gl,qe=Yo.disabled,Xe=new qs([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),ot=w.getBucket(B);if(!ot)return;let Tt=Q.key,Yt=B.heatmapFbos.get(Tt);Yt||(Yt=eh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(Tt,Yt)),ee.bindFramebuffer.set(Yt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Kt=ot.programConfigurations.get(B.id),xr=ue.useProgram("heatmap",Kt),Ir=ue.style.map.terrain.getTerrainData(Q);xr.draw(ee,le.TRIANGLES,Po.disabled,qe,Xe,Pa.disabled,ko(Q.posMatrix,w,ue.transform.zoom,B.paint.get("heatmap-intensity")),Ir,B.id,ot.layoutVertexBuffer,ot.indexBuffer,ot.segments,B.paint,ue.transform.zoom,Kt)}function Yc(ue,w,B){let Q=ue.context,ee=Q.gl;Q.setColorMode(ue.colorModeForRenderPass());let le=th(Q,w),qe=B.key,Xe=w.heatmapFbos.get(qe);Xe&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Xe.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ue.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Po.disabled,Yo.disabled,ue.colorModeForRenderPass(),Pa.disabled,Ds(ue,w,0,1),null,w.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments,w.paint,ue.transform.zoom),Xe.destroy(),w.heatmapFbos.delete(qe))}function eh(ue,w,B){var Q,ee;let le=ue.gl,qe=le.createTexture();le.bindTexture(le.TEXTURE_2D,qe),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR);let Xe=(Q=ue.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,ot=(ee=ue.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,ot,w,B,0,le.RGBA,Xe,null);let Tt=ue.createFramebuffer(w,B,!1,!1);return Tt.colorAttachment.set(qe),Tt}function th(ue,w){return w.colorRampTexture||(w.colorRampTexture=new g(ue,w.colorRamp,ue.gl.RGBA)),w.colorRampTexture}function ju(ue,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,qe=le[B.to.toString()],Xe=le[B.from.toString()];if(!qe&&Xe&&(qe=Xe),!Xe&&qe&&(Xe=qe),!qe||!Xe){let ot=ee.getPaintProperty(w);qe=le[ot],Xe=le[ot]}qe&&Xe&&ue.setConstantPatternPositions(qe,Xe)}function Hf(ue,w,B,Q,ee,le,qe){let Xe=ue.context.gl,ot="fill-pattern",Tt=B.paint.get(ot),Yt=Tt&&Tt.constantOr(1),Kt=B.getCrossfadeParameters(),xr,Ir,ve,be,De;qe?(Ir=Yt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",xr=Xe.LINES):(Ir=Yt?"fillPattern":"fill",xr=Xe.TRIANGLES);let Be=Tt.constantOr(null);for(let et of Q){let We=w.getTile(et);if(Yt&&!We.patternsLoaded())continue;let it=We.getBucket(B);if(!it)continue;let Ft=it.programConfigurations.get(B.id),Ht=ue.useProgram(Ir,Ft),tr=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(et);Yt&&(ue.context.activeTexture.set(Xe.TEXTURE0),We.imageAtlasTexture.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE),Ft.updatePaintBuffers(Kt)),ju(Ft,ot,Be,We,B);let dr=tr?et:null,Sr=ue.translatePosMatrix(dr?dr.posMatrix:et.posMatrix,We,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(qe){be=it.indexBuffer2,De=it.segments2;let Or=[Xe.drawingBufferWidth,Xe.drawingBufferHeight];ve=Ir==="fillOutlinePattern"&&Yt?Ma(Sr,ue,Kt,We,Or):Jn(Sr,Or)}else be=it.indexBuffer,De=it.segments,ve=Yt?ya(Sr,ue,Kt,We):_n(Sr);Ht.draw(ue.context,xr,ee,ue.stencilModeForClipping(et),le,Pa.disabled,ve,tr,B.id,it.layoutVertexBuffer,be,De,B.paint,ue.transform.zoom,Ft)}}function cc(ue,w,B,Q,ee,le,qe){let Xe=ue.context,ot=Xe.gl,Tt="fill-extrusion-pattern",Yt=B.paint.get(Tt),Kt=Yt.constantOr(1),xr=B.getCrossfadeParameters(),Ir=B.paint.get("fill-extrusion-opacity"),ve=Yt.constantOr(null);for(let be of Q){let De=w.getTile(be),Be=De.getBucket(B);if(!Be)continue;let et=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(be),We=Be.programConfigurations.get(B.id),it=ue.useProgram(Kt?"fillExtrusionPattern":"fillExtrusion",We);Kt&&(ue.context.activeTexture.set(ot.TEXTURE0),De.imageAtlasTexture.bind(ot.LINEAR,ot.CLAMP_TO_EDGE),We.updatePaintBuffers(xr)),ju(We,Tt,ve,De,B);let Ft=ue.translatePosMatrix(be.posMatrix,De,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Ht=B.paint.get("fill-extrusion-vertical-gradient"),tr=Kt?Li(Ft,ue,Ht,Ir,be,xr,De):Mn(Ft,ue,Ht,Ir);it.draw(Xe,Xe.gl.TRIANGLES,ee,le,qe,Pa.backCCW,tr,et,B.id,Be.layoutVertexBuffer,Be.indexBuffer,Be.segments,B.paint,ue.transform.zoom,We,ue.style.map.terrain&&Be.centroidVertexBuffer)}}function of(ue,w,B,Q,ee,le,qe){let Xe=ue.context,ot=Xe.gl,Tt=B.fbo;if(!Tt)return;let Yt=ue.useProgram("hillshade"),Kt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(w);Xe.activeTexture.set(ot.TEXTURE0),ot.bindTexture(ot.TEXTURE_2D,Tt.colorAttachment.get()),Yt.draw(Xe,ot.TRIANGLES,ee,le,qe,Pa.disabled,((xr,Ir,ve,be)=>{let De=ve.paint.get("hillshade-shadow-color"),Be=ve.paint.get("hillshade-highlight-color"),et=ve.paint.get("hillshade-accent-color"),We=ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(We-=xr.transform.angle);let it=!xr.options.moving;return{u_matrix:be?be.posMatrix:xr.transform.calculatePosMatrix(Ir.tileID.toUnwrapped(),it),u_image:0,u_latrange:Fs(0,Ir.tileID),u_light:[ve.paint.get("hillshade-exaggeration"),We],u_shadow:De,u_highlight:Be,u_accent:et}})(ue,B,Q,Kt?w:null),Kt,Q.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments)}function Nl(ue,w,B,Q,ee,le){let qe=ue.context,Xe=qe.gl,ot=w.dem;if(ot&&ot.data){let Tt=ot.dim,Yt=ot.stride,Kt=ot.getPixels();if(qe.activeTexture.set(Xe.TEXTURE1),qe.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||ue.getTileTexture(Yt),w.demTexture){let Ir=w.demTexture;Ir.update(Kt,{premultiply:!1}),Ir.bind(Xe.NEAREST,Xe.CLAMP_TO_EDGE)}else w.demTexture=new g(qe,Kt,Xe.RGBA,{premultiply:!1}),w.demTexture.bind(Xe.NEAREST,Xe.CLAMP_TO_EDGE);qe.activeTexture.set(Xe.TEXTURE0);let xr=w.fbo;if(!xr){let Ir=new g(qe,{width:Tt,height:Tt,data:null},Xe.RGBA);Ir.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE),xr=w.fbo=qe.createFramebuffer(Tt,Tt,!0,!1),xr.colorAttachment.set(Ir.texture)}qe.bindFramebuffer.set(xr.framebuffer),qe.viewport.set([0,0,Tt,Tt]),ue.useProgram("hillshadePrepare").draw(qe,Xe.TRIANGLES,Q,ee,le,Pa.disabled,((Ir,ve)=>{let be=ve.stride,De=a.H();return a.aP(De,0,a.X,-a.X,0,0,1),a.J(De,De,[0,-a.X,0]),{u_matrix:De,u_image:1,u_dimension:[be,be],u_zoom:Ir.overscaledZ,u_unpack:ve.getUnpackVector()}})(w.tileID,ot),null,B.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Kc(ue,w,B,Q,ee,le){let qe=Q.paint.get("raster-fade-duration");if(!le&&qe>0){let Xe=u.now(),ot=(Xe-ue.timeAdded)/qe,Tt=w?(Xe-w.timeAdded)/qe:-1,Yt=B.getSource(),Kt=ee.coveringZoomLevel({tileSize:Yt.tileSize,roundZoom:Yt.roundZoom}),xr=!w||Math.abs(w.tileID.overscaledZ-Kt)>Math.abs(ue.tileID.overscaledZ-Kt),Ir=xr&&ue.refreshedUponExpiration?1:a.ac(xr?ot:1-Tt,0,1);return ue.refreshedUponExpiration&&ot>=1&&(ue.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Ir}:{opacity:Ir,mix:0}}return{opacity:1,mix:0}}let Rc=new a.aM(1,0,0,1),gs=new a.aM(0,1,0,1),jf=new a.aM(0,0,1,1),Gh=new a.aM(1,0,1,1),rh=new a.aM(0,1,1,1);function sf(ue,w,B,Q){Mu(ue,0,w+B/2,ue.transform.width,B,Q)}function Th(ue,w,B,Q){Mu(ue,w-B/2,0,B,ue.transform.height,Q)}function Mu(ue,w,B,Q,ee,le){let qe=ue.context,Xe=qe.gl;Xe.enable(Xe.SCISSOR_TEST),Xe.scissor(w*ue.pixelRatio,B*ue.pixelRatio,Q*ue.pixelRatio,ee*ue.pixelRatio),qe.clear({color:le}),Xe.disable(Xe.SCISSOR_TEST)}function ih(ue,w,B){let Q=ue.context,ee=Q.gl,le=B.posMatrix,qe=ue.useProgram("debug"),Xe=Po.disabled,ot=Yo.disabled,Tt=ue.colorModeForRenderPass(),Yt="$debug",Kt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let xr=w.getTileByID(B.key).latestRawTileData,Ir=Math.floor((xr&&xr.byteLength||0)/1024),ve=w.getTile(B).tileSize,be=512/Math.min(ve,512)*(B.overscaledZ/ue.transform.zoom)*.5,De=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(De+=` => ${B.overscaledZ}`),function(Be,et){Be.initDebugOverlayCanvas();let We=Be.debugOverlayCanvas,it=Be.context.gl,Ft=Be.debugOverlayCanvas.getContext("2d");Ft.clearRect(0,0,We.width,We.height),Ft.shadowColor="white",Ft.shadowBlur=2,Ft.lineWidth=1.5,Ft.strokeStyle="white",Ft.textBaseline="top",Ft.font="bold 36px Open Sans, sans-serif",Ft.fillText(et,5,5),Ft.strokeText(et,5,5),Be.debugOverlayTexture.update(We),Be.debugOverlayTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE)}(ue,`${De} ${Ir}kB`),qe.draw(Q,ee.TRIANGLES,Xe,ot,qs.alphaBlended,Pa.disabled,po(le,a.aM.transparent,be),null,Yt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments),qe.draw(Q,ee.LINE_STRIP,Xe,ot,Tt,Pa.disabled,po(le,a.aM.red),Kt,Yt,ue.debugBuffer,ue.tileBorderIndexBuffer,ue.debugSegments)}function js(ue,w,B){let Q=ue.context,ee=Q.gl,le=ue.colorModeForRenderPass(),qe=new Po(ee.LEQUAL,Po.ReadWrite,ue.depthRangeFor3D),Xe=ue.useProgram("terrain"),ot=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,ue.width,ue.height]);for(let Tt of B){let Yt=ue.renderToTexture.getTexture(Tt),Kt=w.getTerrainData(Tt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Yt.texture);let xr=ue.transform.calculatePosMatrix(Tt.tileID.toUnwrapped()),Ir=w.getMeshFrameDelta(ue.transform.zoom),ve=ue.transform.calculateFogMatrix(Tt.tileID.toUnwrapped()),be=Jr(xr,Ir,ve,ue.style.sky,ue.transform.pitch);Xe.draw(Q,ee.TRIANGLES,qe,Yo.disabled,le,Pa.backCCW,be,Kt,"terrain",ot.vertexBuffer,ot.indexBuffer,ot.segments)}}class Eu{constructor(w,B,Q){this.vertexBuffer=w,this.indexBuffer=B,this.segments=Q}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Dc{constructor(w,B){this.context=new ad(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=mt.maxUnderzooming+mt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Wo}resize(w,B,Q){if(this.width=Math.floor(w*Q),this.height=Math.floor(B*Q),this.pixelRatio=Q,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ee of this.style._order)this.style._layers[ee].resize()}setup(){let w=this.context,B=new a.aX;B.emplaceBack(0,0),B.emplaceBack(a.X,0),B.emplaceBack(0,a.X),B.emplaceBack(a.X,a.X),this.tileExtentBuffer=w.createVertexBuffer(B,vo.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);let Q=new a.aX;Q.emplaceBack(0,0),Q.emplaceBack(a.X,0),Q.emplaceBack(0,a.X),Q.emplaceBack(a.X,a.X),this.debugBuffer=w.createVertexBuffer(Q,vo.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);let ee=new a.$;ee.emplaceBack(0,0,0,0),ee.emplaceBack(a.X,0,a.X,0),ee.emplaceBack(0,a.X,0,a.X),ee.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=w.createVertexBuffer(ee,lt.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let le=new a.aX;le.emplaceBack(0,0),le.emplaceBack(1,0),le.emplaceBack(0,1),le.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(le,vo.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let qe=new a.aZ;qe.emplaceBack(0),qe.emplaceBack(1),qe.emplaceBack(3),qe.emplaceBack(2),qe.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(qe);let Xe=new a.aY;Xe.emplaceBack(0,1,2),Xe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(Xe);let ot=this.context.gl;this.stencilClearMode=new Yo({func:ot.ALWAYS,mask:0},0,255,ot.ZERO,ot.ZERO,ot.ZERO)}clearStencil(){let w=this.context,B=w.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Q=a.H();a.aP(Q,0,this.width,this.height,0,0,1),a.K(Q,Q,[B.drawingBufferWidth,B.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(w,B.TRIANGLES,Po.disabled,this.stencilClearMode,qs.disabled,Pa.disabled,Lo(Q),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(w,B){if(this.currentStencilSource===w.source||!w.isTileClipped()||!B||!B.length)return;this.currentStencilSource=w.source;let Q=this.context,ee=Q.gl;this.nextStencilID+B.length>256&&this.clearStencil(),Q.setColorMode(qs.disabled),Q.setDepthMode(Po.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let qe of B){let Xe=this._tileClippingMaskIDs[qe.key]=this.nextStencilID++,ot=this.style.map.terrain&&this.style.map.terrain.getTerrainData(qe);le.draw(Q,ee.TRIANGLES,Po.disabled,new Yo({func:ee.ALWAYS,mask:0},Xe,255,ee.KEEP,ee.KEEP,ee.REPLACE),qs.disabled,Pa.disabled,Lo(qe.posMatrix),ot,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let w=this.nextStencilID++,B=this.context.gl;return new Yo({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new Yo({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[w.key],0,B.KEEP,B.KEEP,B.REPLACE)}stencilConfigForOverlap(w){let B=this.context.gl,Q=w.sort((qe,Xe)=>Xe.overscaledZ-qe.overscaledZ),ee=Q[Q.length-1].overscaledZ,le=Q[0].overscaledZ-ee+1;if(le>1){this.currentStencilSource=void 0,this.nextStencilID+le>256&&this.clearStencil();let qe={};for(let Xe=0;Xe({u_sky_color:Be.properties.get("sky-color"),u_horizon_color:Be.properties.get("horizon-color"),u_horizon:(et.height/2+et.getHorizon())*We,u_sky_horizon_blend:Be.properties.get("sky-horizon-blend")*et.height/2*We}))(Tt,ot.style.map.transform,ot.pixelRatio),Ir=new Po(Kt.LEQUAL,Po.ReadWrite,[0,1]),ve=Yo.disabled,be=ot.colorModeForRenderPass(),De=ot.useProgram("sky");if(!Tt.mesh){let Be=new a.aX;Be.emplaceBack(-1,-1),Be.emplaceBack(1,-1),Be.emplaceBack(1,1),Be.emplaceBack(-1,1);let et=new a.aY;et.emplaceBack(0,1,2),et.emplaceBack(0,2,3),Tt.mesh=new Eu(Yt.createVertexBuffer(Be,vo.members),Yt.createIndexBuffer(et),a.a0.simpleSegment(0,0,Be.length,et.length))}De.draw(Yt,Kt.TRIANGLES,Ir,ve,be,Pa.disabled,xr,void 0,"sky",Tt.mesh.vertexBuffer,Tt.mesh.indexBuffer,Tt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=B.showOverdrawInspector,this.depthRangeFor3D=[0,1-(w._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Q.length-1;this.currentLayer>=0;this.currentLayer--){let ot=this.style._layers[Q[this.currentLayer]],Tt=ee[ot.source],Yt=le[ot.source];this._renderTileClippingMasks(ot,Yt),this.renderLayer(this,Tt,ot,Yt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerDe.source&&!De.isHidden(Yt)?[Tt.sourceCaches[De.source]]:[]),Ir=xr.filter(De=>De.getSource().type==="vector"),ve=xr.filter(De=>De.getSource().type!=="vector"),be=De=>{(!Kt||Kt.getSource().maxzoombe(De)),Kt||ve.forEach(De=>be(De)),Kt}(this.style,this.transform.zoom);ot&&function(Tt,Yt,Kt){for(let xr=0;xr0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,qe){let Xe=le.context,ot=Xe.gl,Tt=qs.unblended,Yt=new Po(ot.LEQUAL,Po.ReadWrite,[0,1]),Kt=qe.getTerrainMesh(),xr=qe.sourceCache.getRenderableTiles(),Ir=le.useProgram("terrainDepth");Xe.bindFramebuffer.set(qe.getFramebuffer("depth").framebuffer),Xe.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Xe.clear({color:a.aM.transparent,depth:1});for(let ve of xr){let be=qe.getTerrainData(ve.tileID),De={u_matrix:le.transform.calculatePosMatrix(ve.tileID.toUnwrapped()),u_ele_delta:qe.getMeshFrameDelta(le.transform.zoom)};Ir.draw(Xe,ot.TRIANGLES,Yt,Yo.disabled,Tt,Pa.backCCW,De,be,"terrain",Kt.vertexBuffer,Kt.indexBuffer,Kt.segments)}Xe.bindFramebuffer.set(null),Xe.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,qe){let Xe=le.context,ot=Xe.gl,Tt=qs.unblended,Yt=new Po(ot.LEQUAL,Po.ReadWrite,[0,1]),Kt=qe.getTerrainMesh(),xr=qe.getCoordsTexture(),Ir=qe.sourceCache.getRenderableTiles(),ve=le.useProgram("terrainCoords");Xe.bindFramebuffer.set(qe.getFramebuffer("coords").framebuffer),Xe.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Xe.clear({color:a.aM.transparent,depth:1}),qe.coordsIndex=[];for(let be of Ir){let De=qe.getTerrainData(be.tileID);Xe.activeTexture.set(ot.TEXTURE0),ot.bindTexture(ot.TEXTURE_2D,xr.texture);let Be={u_matrix:le.transform.calculatePosMatrix(be.tileID.toUnwrapped()),u_terrain_coords_id:(255-qe.coordsIndex.length)/255,u_texture:0,u_ele_delta:qe.getMeshFrameDelta(le.transform.zoom)};ve.draw(Xe,ot.TRIANGLES,Yt,Yo.disabled,Tt,Pa.backCCW,Be,De,"terrain",Kt.vertexBuffer,Kt.indexBuffer,Kt.segments),qe.coordsIndex.push(be.tileID.key)}Xe.bindFramebuffer.set(null),Xe.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain))}renderLayer(w,B,Q,ee){if(!Q.isHidden(this.transform.zoom)&&(Q.type==="background"||Q.type==="custom"||(ee||[]).length))switch(this.id=Q.id,Q.type){case"symbol":(function(le,qe,Xe,ot,Tt){if(le.renderPass!=="translucent")return;let Yt=Yo.disabled,Kt=le.colorModeForRenderPass();(Xe._unevaluatedLayout.hasValue("text-variable-anchor")||Xe._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(xr,Ir,ve,be,De,Be,et,We,it){let Ft=Ir.transform,Ht=yn(),tr=De==="map",dr=Be==="map";for(let Sr of xr){let Or=be.getTile(Sr),Wr=Or.getBucket(ve);if(!Wr||!Wr.text||!Wr.text.segments.get().length)continue;let ni=a.ag(Wr.textSizeData,Ft.zoom),Pi=In(Or,1,Ir.transform.zoom),cn=Br(Sr.posMatrix,dr,tr,Ir.transform,Pi),ln=ve.layout.get("icon-text-fit")!=="none"&&Wr.hasIconData();if(ni){let Cn=Math.pow(2,Ft.zoom-Or.tileID.overscaledZ),Kn=Ir.style.map.terrain?(fa,$a)=>Ir.style.map.terrain.getElevation(Sr,fa,$a):null,Ta=Ht.translatePosition(Ft,Or,et,We);yf(Wr,tr,dr,it,Ft,cn,Sr.posMatrix,Cn,ni,ln,Ht,Ta,Sr.toUnwrapped(),Kn)}}}(ot,le,Xe,qe,Xe.layout.get("text-rotation-alignment"),Xe.layout.get("text-pitch-alignment"),Xe.paint.get("text-translate"),Xe.paint.get("text-translate-anchor"),Tt),Xe.paint.get("icon-opacity").constantOr(1)!==0&&wh(le,qe,Xe,ot,!1,Xe.paint.get("icon-translate"),Xe.paint.get("icon-translate-anchor"),Xe.layout.get("icon-rotation-alignment"),Xe.layout.get("icon-pitch-alignment"),Xe.layout.get("icon-keep-upright"),Yt,Kt),Xe.paint.get("text-opacity").constantOr(1)!==0&&wh(le,qe,Xe,ot,!0,Xe.paint.get("text-translate"),Xe.paint.get("text-translate-anchor"),Xe.layout.get("text-rotation-alignment"),Xe.layout.get("text-pitch-alignment"),Xe.layout.get("text-keep-upright"),Yt,Kt),qe.map.showCollisionBoxes&&(Hu(le,qe,Xe,ot,!0),Hu(le,qe,Xe,ot,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,qe,Xe,ot){if(le.renderPass!=="translucent")return;let Tt=Xe.paint.get("circle-opacity"),Yt=Xe.paint.get("circle-stroke-width"),Kt=Xe.paint.get("circle-stroke-opacity"),xr=!Xe.layout.get("circle-sort-key").isConstant();if(Tt.constantOr(1)===0&&(Yt.constantOr(1)===0||Kt.constantOr(1)===0))return;let Ir=le.context,ve=Ir.gl,be=le.depthModeForSublayer(0,Po.ReadOnly),De=Yo.disabled,Be=le.colorModeForRenderPass(),et=[];for(let We=0;WeWe.sortKey-it.sortKey);for(let We of et){let{programConfiguration:it,program:Ft,layoutVertexBuffer:Ht,indexBuffer:tr,uniformValues:dr,terrainData:Sr}=We.state;Ft.draw(Ir,ve.TRIANGLES,be,De,Be,Pa.disabled,dr,Sr,Xe.id,Ht,tr,We.segments,Xe.paint,le.transform.zoom,it)}})(w,B,Q,ee);break;case"heatmap":(function(le,qe,Xe,ot){if(Xe.paint.get("heatmap-opacity")===0)return;let Tt=le.context;if(le.style.map.terrain){for(let Yt of ot){let Kt=qe.getTile(Yt);qe.hasRenderableParent(Yt)||(le.renderPass==="offscreen"?_f(le,Kt,Xe,Yt):le.renderPass==="translucent"&&Yc(le,Xe,Yt))}Tt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Yt,Kt,xr,Ir){let ve=Yt.context,be=ve.gl,De=Yo.disabled,Be=new qs([be.ONE,be.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(et,We,it){let Ft=et.gl;et.activeTexture.set(Ft.TEXTURE1),et.viewport.set([0,0,We.width/4,We.height/4]);let Ht=it.heatmapFbos.get(a.aU);Ht?(Ft.bindTexture(Ft.TEXTURE_2D,Ht.colorAttachment.get()),et.bindFramebuffer.set(Ht.framebuffer)):(Ht=eh(et,We.width/4,We.height/4),it.heatmapFbos.set(a.aU,Ht))})(ve,Yt,xr),ve.clear({color:a.aM.transparent});for(let et=0;et20&&Yt.texParameterf(Yt.TEXTURE_2D,Tt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Tt.extTextureFilterAnisotropicMax);let Wr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(et),ni=Wr?et:null,Pi=ni?ni.posMatrix:le.transform.calculatePosMatrix(et.toUnwrapped(),Be),cn=cl(Pi,Sr||[0,0],dr||1,tr,Xe);Kt instanceof Gt?xr.draw(Tt,Yt.TRIANGLES,We,Yo.disabled,Ir,Pa.disabled,cn,Wr,Xe.id,Kt.boundsBuffer,le.quadTriangleIndexBuffer,Kt.boundsSegments):xr.draw(Tt,Yt.TRIANGLES,We,ve[et.overscaledZ],Ir,Pa.disabled,cn,Wr,Xe.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,qe,Xe,ot){let Tt=Xe.paint.get("background-color"),Yt=Xe.paint.get("background-opacity");if(Yt===0)return;let Kt=le.context,xr=Kt.gl,Ir=le.transform,ve=Ir.tileSize,be=Xe.paint.get("background-pattern");if(le.isPatternMissing(be))return;let De=!be&&Tt.a===1&&Yt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==De)return;let Be=Yo.disabled,et=le.depthModeForSublayer(0,De==="opaque"?Po.ReadWrite:Po.ReadOnly),We=le.colorModeForRenderPass(),it=le.useProgram(be?"backgroundPattern":"background"),Ft=ot||Ir.coveringTiles({tileSize:ve,terrain:le.style.map.terrain});be&&(Kt.activeTexture.set(xr.TEXTURE0),le.imageManager.bind(le.context));let Ht=Xe.getCrossfadeParameters();for(let tr of Ft){let dr=ot?tr.posMatrix:le.transform.calculatePosMatrix(tr.toUnwrapped()),Sr=be?Su(dr,Yt,le,be,{tileID:tr,tileSize:ve},Ht):Zl(dr,Yt,Tt),Or=le.style.map.terrain&&le.style.map.terrain.getTerrainData(tr);it.draw(Kt,xr.TRIANGLES,et,Be,We,Pa.disabled,Sr,Or,Xe.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,qe,Xe){let ot=le.context,Tt=Xe.implementation;if(le.renderPass==="offscreen"){let Yt=Tt.prerender;Yt&&(le.setCustomLayerDefaults(),ot.setColorMode(le.colorModeForRenderPass()),Yt.call(Tt,ot.gl,le.transform.customLayerMatrix()),ot.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),ot.setColorMode(le.colorModeForRenderPass()),ot.setStencilMode(Yo.disabled);let Yt=Tt.renderingMode==="3d"?new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Po.ReadOnly);ot.setDepthMode(Yt),Tt.render(ot.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),ot.setDirty(),le.setBaseState(),ot.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let qe=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(qe){let Tt=Math.sin(qe),Yt=Math.cos(qe);Q=[Q[0]*Yt-Q[1]*Tt,Q[0]*Tt+Q[1]*Yt]}let Xe=[le?Q[0]:In(B,Q[0],this.transform.zoom),le?Q[1]:In(B,Q[1],this.transform.zoom),0],ot=new Float32Array(16);return a.J(ot,w,Xe),ot}saveTileTexture(w){let B=this._tileTextures[w.size[0]];B?B.push(w):this._tileTextures[w.size[0]]=[w]}getTileTexture(w){let B=this._tileTextures[w];return B&&B.length>0?B.pop():null}isPatternMissing(w){if(!w)return!1;if(!w.from||!w.to)return!0;let B=this.imageManager.getPattern(w.from.toString()),Q=this.imageManager.getPattern(w.to.toString());return!B||!Q}useProgram(w,B){this.cache=this.cache||{};let Q=w+(B?B.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Q]||(this.cache[Q]=new hn(this.context,jn[w],B,nc[w],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let w=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(w.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new g(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:w,drawingBufferHeight:B}=this.context.gl;return this.width!==w||this.height!==B}}class ks{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),le=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Xe=>{let ot=1/(Xe=a.af([],Xe,w))[3]/B*ee;return a.b1(Xe,Xe,[ot,ot,1/Xe[3],ot])}),qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Xe=>{let ot=function(xr,Ir){var ve=Ir[0],be=Ir[1],De=Ir[2],Be=ve*ve+be*be+De*De;return Be>0&&(Be=1/Math.sqrt(Be)),xr[0]=Ir[0]*Be,xr[1]=Ir[1]*Be,xr[2]=Ir[2]*Be,xr}([],function(xr,Ir,ve){var be=Ir[0],De=Ir[1],Be=Ir[2],et=ve[0],We=ve[1],it=ve[2];return xr[0]=De*it-Be*We,xr[1]=Be*et-be*it,xr[2]=be*We-De*et,xr}([],L([],le[Xe[0]],le[Xe[1]]),L([],le[Xe[2]],le[Xe[1]]))),Tt=-((Yt=ot)[0]*(Kt=le[Xe[1]])[0]+Yt[1]*Kt[1]+Yt[2]*Kt[2]);var Yt,Kt;return ot.concat(Tt)});return new ks(le,qe)}}class bc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,le){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,le){return Q[0]=ee[0]+le[0],Q[1]=ee[1]+le[1],Q[2]=ee[2]+le[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=E(this.min),ee=E(this.max);for(let le=0;le=0&&qe++;if(qe===0)return 0;qe!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,qe=-Number.MAX_VALUE;for(let Xe=0;Xethis.max[ee]-this.min[ee])return 0}return 1}}class hu{constructor(w=0,B=0,Q=0,ee=0){if(isNaN(w)||w<0||isNaN(B)||B<0||isNaN(Q)||Q<0||isNaN(ee)||ee<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=w,this.bottom=B,this.left=Q,this.right=ee}interpolate(w,B,Q){return B.top!=null&&w.top!=null&&(this.top=a.y.number(w.top,B.top,Q)),B.bottom!=null&&w.bottom!=null&&(this.bottom=a.y.number(w.bottom,B.bottom,Q)),B.left!=null&&w.left!=null&&(this.left=a.y.number(w.left,B.left,Q)),B.right!=null&&w.right!=null&&(this.right=a.y.number(w.right,B.right,Q)),this}getCenter(w,B){let Q=a.ac((this.left+w-this.right)/2,0,w),ee=a.ac((this.top+B-this.bottom)/2,0,B);return new a.P(Q,ee)}equals(w){return this.top===w.top&&this.bottom===w.bottom&&this.left===w.left&&this.right===w.right}clone(){return new hu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let _u=85.051129;class nl{constructor(w,B,Q,ee,le){this.tileSize=512,this._renderWorldCopies=le===void 0||!!le,this._minZoom=w||0,this._maxZoom=B||22,this._minPitch=Q==null?0:Q,this._maxPitch=ee==null?60:ee,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new hu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new nl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return w.apply(this),w}apply(w){this.tileSize=w.tileSize,this.latRange=w.latRange,this.lngRange=w.lngRange,this.width=w.width,this.height=w.height,this._center=w._center,this._elevation=w._elevation,this.minElevationForCurrentTile=w.minElevationForCurrentTile,this.zoom=w.zoom,this.angle=w.angle,this._fov=w._fov,this._pitch=w._pitch,this._unmodified=w._unmodified,this._edgeInsets=w._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(w){this._minZoom!==w&&(this._minZoom=w,this.zoom=Math.max(this.zoom,w))}get maxZoom(){return this._maxZoom}set maxZoom(w){this._maxZoom!==w&&(this._maxZoom=w,this.zoom=Math.min(this.zoom,w))}get minPitch(){return this._minPitch}set minPitch(w){this._minPitch!==w&&(this._minPitch=w,this.pitch=Math.max(this.pitch,w))}get maxPitch(){return this._maxPitch}set maxPitch(w){this._maxPitch!==w&&(this._maxPitch=w,this.pitch=Math.min(this.pitch,w))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(w){w===void 0?w=!0:w===null&&(w=!1),this._renderWorldCopies=w}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(w){let B=-a.b3(w,-180,180)*Math.PI/180;this.angle!==B&&(this._unmodified=!1,this.angle=B,this._calcMatrices(),this.rotationMatrix=function(){var Q=new a.A(4);return a.A!=Float32Array&&(Q[1]=0,Q[2]=0),Q[0]=1,Q[3]=1,Q}(),function(Q,ee,le){var qe=ee[0],Xe=ee[1],ot=ee[2],Tt=ee[3],Yt=Math.sin(le),Kt=Math.cos(le);Q[0]=qe*Kt+ot*Yt,Q[1]=Xe*Kt+Tt*Yt,Q[2]=qe*-Yt+ot*Kt,Q[3]=Xe*-Yt+Tt*Kt}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(w){let B=a.ac(w,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==B&&(this._unmodified=!1,this._pitch=B,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(w){w=Math.max(.01,Math.min(60,w)),this._fov!==w&&(this._unmodified=!1,this._fov=w/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(w){let B=Math.min(Math.max(w,this.minZoom),this.maxZoom);this._zoom!==B&&(this._unmodified=!1,this._zoom=B,this.tileZoom=Math.max(0,Math.floor(B)),this.scale=this.zoomScale(B),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(w){w.lat===this._center.lat&&w.lng===this._center.lng||(this._unmodified=!1,this._center=w,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(w){w!==this._elevation&&(this._elevation=w,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(w){this._edgeInsets.equals(w)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,w,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(w){return this._edgeInsets.equals(w)}interpolatePadding(w,B,Q){this._unmodified=!1,this._edgeInsets.interpolate(w,B,Q),this._constrain(),this._calcMatrices()}coveringZoomLevel(w){let B=(w.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/w.tileSize));return Math.max(0,B)}getVisibleUnwrappedCoordinates(w){let B=[new a.b4(0,w)];if(this._renderWorldCopies){let Q=this.pointCoordinate(new a.P(0,0)),ee=this.pointCoordinate(new a.P(this.width,0)),le=this.pointCoordinate(new a.P(this.width,this.height)),qe=this.pointCoordinate(new a.P(0,this.height)),Xe=Math.floor(Math.min(Q.x,ee.x,le.x,qe.x)),ot=Math.floor(Math.max(Q.x,ee.x,le.x,qe.x)),Tt=1;for(let Yt=Xe-Tt;Yt<=ot+Tt;Yt++)Yt!==0&&B.push(new a.b4(Yt,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),le=ee;if(w.minzoom!==void 0&&eew.maxzoom&&(ee=w.maxzoom);let qe=this.pointCoordinate(this.getCameraPoint()),Xe=a.Z.fromLngLat(this.center),ot=Math.pow(2,ee),Tt=[ot*qe.x,ot*qe.y,0],Yt=[ot*Xe.x,ot*Xe.y,0],Kt=ks.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),xr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(xr=ee);let Ir=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ve=We=>({aabb:new bc([We*ot,0,0],[(We+1)*ot,ot,0]),zoom:0,x:0,y:0,wrap:We,fullyVisible:!1}),be=[],De=[],Be=ee,et=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let We=1;We<=3;We++)be.push(ve(-We)),be.push(ve(We));for(be.push(ve(0));be.length>0;){let We=be.pop(),it=We.x,Ft=We.y,Ht=We.fullyVisible;if(!Ht){let Wr=We.aabb.intersects(Kt);if(Wr===0)continue;Ht=Wr===2}let tr=w.terrain?Tt:Yt,dr=We.aabb.distanceX(tr),Sr=We.aabb.distanceY(tr),Or=Math.max(Math.abs(dr),Math.abs(Sr));if(We.zoom===Be||Or>Ir+(1<=xr){let Wr=Be-We.zoom,ni=Tt[0]-.5-(it<>1),cn=We.zoom+1,ln=We.aabb.quadrant(Wr);if(w.terrain){let Cn=new a.S(cn,We.wrap,cn,ni,Pi),Kn=w.terrain.getMinMaxElevation(Cn),Ta=(B=Kn.minElevation)!==null&&B!==void 0?B:this.elevation,fa=(Q=Kn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;ln=new bc([ln.min[0],ln.min[1],Ta],[ln.max[0],ln.max[1],fa])}be.push({aabb:ln,zoom:cn,x:ni,y:Pi,wrap:We.wrap,fullyVisible:Ht})}}return De.sort((We,it)=>We.distanceSq-it.distanceSq).map(We=>We.tileID)}resize(w,B){this.width=w,this.height=B,this.pixelsToGLUnits=[2/w,-2/B],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(w){return Math.pow(2,w)}scaleZoom(w){return Math.log(w)/Math.LN2}project(w){let B=a.ac(w.lat,-85.051129,_u);return new a.P(a.O(w.lng)*this.worldSize,a.Q(B)*this.worldSize)}unproject(w){return new a.Z(w.x/this.worldSize,w.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(w){let B=this.elevation,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ee=this.pointLocation(this.centerPoint,w),le=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-le))return;let qe=Q+B-le,Xe=Math.cos(this._pitch)*this.cameraToCenterDistance/qe/a.b5(1,ee.lat),ot=this.scaleZoom(Xe/this.tileSize);this._elevation=le,this._center=ee,this.zoom=ot}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),qe=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(qe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(w,B){return B?this.coordinatePoint(this.locationCoordinate(w),B.getElevationForLngLatZoom(w,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(w))}pointLocation(w,B){return this.coordinateLocation(this.pointCoordinate(w,B))}locationCoordinate(w){return a.Z.fromLngLat(w)}coordinateLocation(w){return w&&w.toLngLat()}pointCoordinate(w,B){if(B){let xr=B.pointCoordinate(w);if(xr!=null)return xr}let Q=[w.x,w.y,0,1],ee=[w.x,w.y,1,1];a.af(Q,Q,this.pixelMatrixInverse),a.af(ee,ee,this.pixelMatrixInverse);let le=Q[3],qe=ee[3],Xe=Q[1]/le,ot=ee[1]/qe,Tt=Q[2]/le,Yt=ee[2]/qe,Kt=Tt===Yt?0:(0-Tt)/(Yt-Tt);return new a.Z(a.y.number(Q[0]/le,ee[0]/qe,Kt)/this.worldSize,a.y.number(Xe,ot,Kt)/this.worldSize)}coordinatePoint(w,B=0,Q=this.pixelMatrix){let ee=[w.x*this.worldSize,w.y*this.worldSize,B,1];return a.af(ee,ee,Q),new a.P(ee[0]/ee[3],ee[1]/ee[3])}getBounds(){let w=Math.max(0,this.height/2-this.getHorizon());return new ce().extend(this.pointLocation(new a.P(0,w))).extend(this.pointLocation(new a.P(this.width,w))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(w){w?(this.lngRange=[w.getWest(),w.getEast()],this.latRange=[w.getSouth(),w.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,_u])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,le=a.an(new Float64Array(16));return a.J(le,le,[ee*Q,B.y*Q,0]),a.K(le,le,[Q/a.X,Q/a.X,1]),le}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let le=this.calculateTileMatrix(w);return a.L(le,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,le),ee[Q]=new Float32Array(le),ee[Q]}calculateFogMatrix(w){let B=w.key,Q=this._fogMatrixCache;if(Q[B])return Q[B];let ee=this.calculateTileMatrix(w);return a.L(ee,this.fogMatrix,ee),Q[B]=new Float32Array(ee),Q[B]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(w,B){B=a.ac(+B,this.minZoom,this.maxZoom);let Q={center:new a.N(w.lng,w.lat),zoom:B},ee=this.lngRange;if(!this._renderWorldCopies&&ee===null){let We=179.9999999999;ee=[-We,We]}let le=this.tileSize*this.zoomScale(Q.zoom),qe=0,Xe=le,ot=0,Tt=le,Yt=0,Kt=0,{x:xr,y:Ir}=this.size;if(this.latRange){let We=this.latRange;qe=a.Q(We[1])*le,Xe=a.Q(We[0])*le,Xe-qeXe&&(Be=Xe-We)}if(ee){let We=(ot+Tt)/2,it=ve;this._renderWorldCopies&&(it=a.b3(ve,We-le/2,We+le/2));let Ft=xr/2;it-FtTt&&(De=Tt-Ft)}if(De!==void 0||Be!==void 0){let We=new a.P(De!=null?De:ve,Be!=null?Be:be);Q.center=this.unproject.call({worldSize:le},We).wrap()}return Q}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let w=this._unmodified,{center:B,zoom:Q}=this.getConstrained(this.center,this.zoom);this.center=B,this.zoom=Q,this._unmodified=w,this._constraining=!1}_calcMatrices(){if(!this.height)return;let w=this.centerOffset,B=this.point.x,Q=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let ee=a.an(new Float64Array(16));a.K(ee,ee,[this.width/2,-this.height/2,1]),a.J(ee,ee,[1,-1,0]),this.labelPlaneMatrix=ee,ee=a.an(new Float64Array(16)),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[-1,-1,0]),a.K(ee,ee,[2/this.width,2/this.height,1]),this.glCoordMatrix=ee;let le=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),qe=Math.min(this.elevation,this.minElevationForCurrentTile),Xe=le-qe*this._pixelPerMeter/Math.cos(this._pitch),ot=qe<0?Xe:le,Tt=Math.PI/2+this._pitch,Yt=this._fov*(.5+w.y/this.height),Kt=Math.sin(Yt)*ot/Math.sin(a.ac(Math.PI-Tt-Yt,.01,Math.PI-.01)),xr=this.getHorizon(),Ir=2*Math.atan(xr/this.cameraToCenterDistance)*(.5+w.y/(2*xr)),ve=Math.sin(Ir)*ot/Math.sin(a.ac(Math.PI-Tt-Ir,.01,Math.PI-.01)),be=Math.min(Kt,ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*be+ot),this.nearZ=this.height/50,ee=new Float64Array(16),a.b6(ee,this._fov,this.width/this.height,this.nearZ,this.farZ),ee[8]=2*-w.x/this.width,ee[9]=2*w.y/this.height,this.projectionMatrix=a.ae(ee),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[0,0,-this.cameraToCenterDistance]),a.b7(ee,ee,this._pitch),a.ad(ee,ee,this.angle),a.J(ee,ee,[-B,-Q,0]),this.mercatorMatrix=a.K([],ee,[this.worldSize,this.worldSize,this.worldSize]),a.K(ee,ee,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.L(new Float64Array(16),this.labelPlaneMatrix,ee),a.J(ee,ee,[0,0,-this.elevation]),this.modelViewProjectionMatrix=ee,this.invModelViewProjectionMatrix=a.as([],ee),this.fogMatrix=new Float64Array(16),a.b6(this.fogMatrix,this._fov,this.width/this.height,le,this.farZ),this.fogMatrix[8]=2*-w.x/this.width,this.fogMatrix[9]=2*w.y/this.height,a.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b7(this.fogMatrix,this.fogMatrix,this._pitch),a.ad(this.fogMatrix,this.fogMatrix,this.angle),a.J(this.fogMatrix,this.fogMatrix,[-B,-Q,0]),a.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=a.L(new Float64Array(16),this.labelPlaneMatrix,ee);let De=this.width%2/2,Be=this.height%2/2,et=Math.cos(this.angle),We=Math.sin(this.angle),it=B-Math.round(B)+et*De+We*Be,Ft=Q-Math.round(Q)+et*Be+We*De,Ht=new Float64Array(ee);if(a.J(Ht,Ht,[it>.5?it-1:it,Ft>.5?Ft-1:Ft,0]),this.alignedModelViewProjectionMatrix=Ht,ee=a.as(new Float64Array(16),this.pixelMatrix),!ee)throw new Error("failed to invert matrix");this.pixelMatrixInverse=ee,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let w=this.pointCoordinate(new a.P(0,0)),B=[w.x*this.worldSize,w.y*this.worldSize,0,1];return a.af(B,B,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let w=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(0,w))}getCameraQueryGeometry(w){let B=this.getCameraPoint();if(w.length===1)return[w[0],B];{let Q=B.x,ee=B.y,le=B.x,qe=B.y;for(let Xe of w)Q=Math.min(Q,Xe.x),ee=Math.min(ee,Xe.y),le=Math.max(le,Xe.x),qe=Math.max(qe,Xe.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,qe),new a.P(Q,qe),new a.P(Q,ee)]}}lngLatToCameraDepth(w,B){let Q=this.locationCoordinate(w),ee=[Q.x*this.worldSize,Q.y*this.worldSize,B,1];return a.af(ee,ee,this.modelViewProjectionMatrix),ee[2]/ee[3]}}function nh(ue,w){let B,Q=!1,ee=null,le=null,qe=()=>{ee=null,Q&&(ue.apply(le,B),ee=setTimeout(qe,w),Q=!1)};return(...Xe)=>(Q=!0,le=this,B=Xe,ee||qe(),ee)}class Ah{constructor(w){this._getCurrentHash=()=>{let B=window.location.hash.replace("#","");if(this._hashName){let Q;return B.split("&").map(ee=>ee.split("=")).forEach(ee=>{ee[0]===this._hashName&&(Q=ee)}),(Q&&Q[1]||"").split("/")}return B.split("/")},this._onHashChange=()=>{let B=this._getCurrentHash();if(B.length>=3&&!B.some(Q=>isNaN(Q))){let Q=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(B[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+B[2],+B[1]],zoom:+B[0],bearing:Q,pitch:+(B[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let B=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,B)},this._removeHash=()=>{let B=this._getCurrentHash();if(B.length===0)return;let Q=B.join("/"),ee=Q;ee.split("&").length>0&&(ee=ee.split("&")[0]),this._hashName&&(ee=`${this._hashName}=${Q}`);let le=window.location.hash.replace(ee,"");le.startsWith("#&")?le=le.slice(0,1)+le.slice(2):le==="#"&&(le="");let qe=window.location.href.replace(/(#.+)?$/,le);qe=qe.replace("&&","&"),window.history.replaceState(window.history.state,null,qe)},this._updateHash=nh(this._updateHashUnthrottled,300),this._hashName=w&&encodeURIComponent(w)}addTo(w){return this._map=w,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(w){let B=this._map.getCenter(),Q=Math.round(100*this._map.getZoom())/100,ee=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),le=Math.pow(10,ee),qe=Math.round(B.lng*le)/le,Xe=Math.round(B.lat*le)/le,ot=this._map.getBearing(),Tt=this._map.getPitch(),Yt="";if(Yt+=w?`/${qe}/${Xe}/${Q}`:`${Q}/${Xe}/${qe}`,(ot||Tt)&&(Yt+="/"+Math.round(10*ot)/10),Tt&&(Yt+=`/${Math.round(Tt)}`),this._hashName){let Kt=this._hashName,xr=!1,Ir=window.location.hash.slice(1).split("&").map(ve=>{let be=ve.split("=")[0];return be===Kt?(xr=!0,`${be}=${Yt}`):ve}).filter(ve=>ve);return xr||Ir.push(`${Kt}=${Yt}`),`#${Ir.join("&")}`}return`#${Yt}`}}let zu={linearity:.3,easing:a.b8(0,0,.3,1)},Fc=a.e({deceleration:2500,maxSpeed:1400},zu),wc=a.e({deceleration:20,maxSpeed:1400},zu),bd=a.e({deceleration:1e3,maxSpeed:360},zu),xf=a.e({deceleration:1e3,maxSpeed:90},zu);class Pf{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=u.now();for(;w.length>0&&B-w[0].time>160;)w.shift()}_onMoveEnd(w){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let B={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:le}of this._inertiaBuffer)B.zoom+=le.zoomDelta||0,B.bearing+=le.bearingDelta||0,B.pitch+=le.pitchDelta||0,le.panDelta&&B.pan._add(le.panDelta),le.around&&(B.around=le.around),le.pinchAround&&(B.pinchAround=le.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let le=bf(B.pan.mag(),Q,a.e({},Fc,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,Ou(ee,le)}if(B.zoom){let le=bf(B.zoom,Q,wc);ee.zoom=this._map.transform.zoom+le.amount,Ou(ee,le)}if(B.bearing){let le=bf(B.bearing,Q,bd);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),Ou(ee,le)}if(B.pitch){let le=bf(B.pitch,Q,xf);ee.pitch=this._map.transform.pitch+le.amount,Ou(ee,le)}if(ee.zoom||ee.bearing){let le=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=le?this._map.unproject(le):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function Ou(ue,w){(!ue.duration||ue.durationB.unproject(ot)),Xe=le.reduce((ot,Tt,Yt,Kt)=>ot.add(Tt.div(Kt.length)),new a.P(0,0));super(w,{points:le,point:Xe,lngLats:qe,lngLat:B.unproject(Xe),originalEvent:Q}),this._defaultPrevented=!1}}class Hh extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class If{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new Hh(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new jl(w.type,this._map,w))}mouseup(w){this._map.fire(new jl(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new jl(w.type,this._map,w))}dblclick(w){return this._firePreventable(new jl(w.type,this._map,w))}mouseover(w){this._map.fire(new jl(w.type,this._map,w))}mouseout(w){this._map.fire(new jl(w.type,this._map,w))}touchstart(w){return this._firePreventable(new lf(w.type,this._map,w))}touchmove(w){this._map.fire(new lf(w.type,this._map,w))}touchend(w){this._map.fire(new lf(w.type,this._map,w))}touchcancel(w){this._map.fire(new lf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Cs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new jl(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new jl(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(w){this._map=w}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(w){return this.transform.pointLocation(a.P.convert(w),this._map.terrain)}}class ku{constructor(w,B){this._map=w,this._tr=new du(w),this._el=w.getCanvasContainer(),this._container=w.getContainer(),this._clickTolerance=B.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(w,B){this.isEnabled()&&w.shiftKey&&w.button===0&&(c.disableDrag(),this._startPos=this._lastPos=B,this._active=!0)}mousemoveWindow(w,B){if(!this._active)return;let Q=B;if(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)le.fitScreenCoordinates(Q,ee,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",w)}keydown(w){this._active&&w.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",w))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function Wf(ue,w){if(ue.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${ue.length}, points ${w.length}`);let B={};for(let Q=0;Qthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=w.timeStamp),Q.length===this.numTouches&&(this.centroid=function(ee){let le=new a.P(0,0);for(let qe of ee)le._add(qe);return le.div(ee.length)}(B),this.touches=Wf(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Wf(Q,B);for(let le in this.touches){let qe=ee[le];(!qe||qe.dist(this.touches[le])>30)&&(this.aborted=!0)}}touchend(w,B,Q){if((!this.centroid||w.timeStamp-this.startTime>500)&&(this.aborted=!0),Q.length===0){let ee=!this.aborted&&this.centroid;if(this.reset(),ee)return ee}}}class wf{constructor(w){this.singleTap=new Us(w),this.numTaps=w.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(w,B,Q){this.singleTap.touchstart(w,B,Q)}touchmove(w,B,Q){this.singleTap.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this.singleTap.touchend(w,B,Q);if(ee){let le=w.timeStamp-this.lastTime<500,qe=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&qe||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class zc{constructor(w){this._tr=new du(w),this._zoomIn=new wf({numTouches:1,numTaps:2}),this._zoomOut=new wf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(w,B,Q){this._zoomIn.touchstart(w,B,Q),this._zoomOut.touchstart(w,B,Q)}touchmove(w,B,Q){this._zoomIn.touchmove(w,B,Q),this._zoomOut.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this._zoomIn.touchend(w,B,Q),le=this._zoomOut.touchend(w,B,Q),qe=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:qe.zoom+1,around:qe.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:qe.zoom-1,around:qe.unproject(le)},{originalEvent:w})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wu{constructor(w){this._enabled=!!w.enable,this._moveStateManager=w.moveStateManager,this._clickTolerance=w.clickTolerance||1,this._moveFunction=w.move,this._activateOnStart=!!w.activateOnStart,w.assignEvents(this),this.reset()}reset(w){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(w)}_move(...w){let B=this._moveFunction(...w);if(B.bearingDelta||B.pitchDelta||B.around||B.panDelta)return this._active=!0,B}dragStart(w,B){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(w)&&(this._moveStateManager.startMove(w),this._lastPoint=B.length?B[0]:B,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(w,B){if(!this.isEnabled())return;let Q=this._lastPoint;if(!Q)return;if(w.preventDefault(),!this._moveStateManager.isValidMoveEvent(w))return void this.reset(w);let ee=B.length?B[0]:B;return!this._moved&&ee.dist(Q){ue.mousedown=ue.dragStart,ue.mousemoveWindow=ue.dragMove,ue.mouseup=ue.dragEnd,ue.contextmenu=w=>{w.preventDefault()}},Wl=({enable:ue,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:ue,assignEvents:Xf})},ah=({enable:ue,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:ue,assignEvents:Xf})};class Zu{constructor(w,B){this._clickTolerance=w.clickTolerance||1,this._map=B,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(w){return w<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(w,B,Q){return this._calculateTransform(w,B,Q)}touchmove(w,B,Q){if(this._active){if(!this._shouldBePrevented(Q.length))return w.preventDefault(),this._calculateTransform(w,B,Q);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",w)}}touchend(w,B,Q){this._calculateTransform(w,B,Q),this._active&&this._shouldBePrevented(Q.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(w,B,Q){Q.length>0&&(this._active=!0);let ee=Wf(Q,B),le=new a.P(0,0),qe=new a.P(0,0),Xe=0;for(let Tt in ee){let Yt=ee[Tt],Kt=this._touches[Tt];Kt&&(le._add(Yt),qe._add(Yt.sub(Kt)),Xe++,ee[Tt]=Yt)}if(this._touches=ee,this._shouldBePrevented(Xe)||!qe.mag())return;let ot=qe.div(Xe);return this._sum._add(ot),this._sum.mag()Math.abs(ue.x)}class Bc extends Oc{constructor(w){super(),this._currentTouchCount=0,this._map=w}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(w,B,Q){super.touchstart(w,B,Q),this._currentTouchCount=Q.length}_start(w){this._lastPoints=w,fc(w[0].sub(w[1]))&&(this._valid=!1)}_move(w,B,Q){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ee=w[0].sub(this._lastPoints[0]),le=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,le,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+le.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,le=B.mag()>=2;if(!ee&&!le)return;if(!ee||!le)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let qe=w.y>0==B.y>0;return fc(w)&&fc(B)&&qe}}let At={panStep:100,bearingStep:15,pitchStep:10};class Wt{constructor(w){this._tr=new du(w);let B=At;this._panStep=B.panStep,this._bearingStep=B.bearingStep,this._pitchStep=B.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(w){if(w.altKey||w.ctrlKey||w.metaKey)return;let B=0,Q=0,ee=0,le=0,qe=0;switch(w.keyCode){case 61:case 107:case 171:case 187:B=1;break;case 189:case 109:case 173:B=-1;break;case 37:w.shiftKey?Q=-1:(w.preventDefault(),le=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),le=1);break;case 38:w.shiftKey?ee=1:(w.preventDefault(),qe=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),qe=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:Xe=>{let ot=this._tr;Xe.easeTo({duration:300,easeId:"keyboardHandler",easing:Cr,zoom:B?Math.round(ot.zoom)+B*(w.shiftKey?2:1):ot.zoom,bearing:ot.bearing+Q*this._bearingStep,pitch:ot.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-qe*this._panStep],center:ot.center},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Cr(ue){return ue*(2-ue)}let Ar=4.000244140625;class Kr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new du(w),this._triggerRenderFrame=B,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(w){this._defaultZoomRate=w}setWheelZoomRate(w){this._wheelZoomRate=w}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(w){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!w&&w.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(w){return!!this._map.cooperativeGestures.isEnabled()&&!(w.ctrlKey||this._map.cooperativeGestures.isBypassed(w))}wheel(w){if(!this.isEnabled())return;if(this._shouldBePrevented(w))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",w);let B=w.deltaMode===WheelEvent.DOM_DELTA_LINE?40*w.deltaY:w.deltaY,Q=u.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%Ar==0?this._type="wheel":B!==0&&Math.abs(B)<4?this._type="trackpad":ee>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40,w)):this._type||(this._type=Math.abs(ee*B)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),w.shiftKey&&B&&(B/=4),this._type&&(this._lastWheelEvent=w,this._delta-=B,this._active||this._start(w)),w.preventDefault()}_start(w){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let B=c.mousePos(this._map.getCanvas(),w),Q=this._tr;this._around=B.y>Q.transform.height/2-Q.transform.getHorizon()?a.N.convert(this._aroundCenter?Q.center:Q.unproject(B)):a.N.convert(Q.center),this._aroundPoint=Q.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let w=this._tr.transform;if(this._delta!==0){let ot=this._type==="wheel"&&Math.abs(this._delta)>Ar?this._wheelZoomRate:this._defaultZoomRate,Tt=2/(1+Math.exp(-Math.abs(this._delta*ot)));this._delta<0&&Tt!==0&&(Tt=1/Tt);let Yt=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Yt*Tt))),this._type==="wheel"&&(this._startZoom=w.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let B=typeof this._targetZoom=="number"?this._targetZoom:w.zoom,Q=this._startZoom,ee=this._easing,le,qe=!1,Xe=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&Xe){let ot=Math.min(Xe/200,1),Tt=ee(ot);le=a.y.number(Q,B,Tt),ot<1?this._frameId||(this._frameId=!0):qe=!0}else le=B,qe=!0;return this._active=!0,qe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!qe,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(u.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),qe=.27/Math.sqrt(le*le+1e-4)*.01,Xe=Math.sqrt(.0729-qe*qe);B=a.b8(qe,Xe,.25,1)}return this._prevEase={start:u.now(),duration:w,easing:B},B}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ki{constructor(w,B){this._clickZoom=w,this._tapZoom=B}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Xi{constructor(w){this._tr=new du(w),this.reset()}reset(){this._active=!1}dblclick(w,B){return w.preventDefault(),{cameraAnimation:Q=>{Q.easeTo({duration:300,zoom:this._tr.zoom+(w.shiftKey?-1:1),around:this._tr.unproject(B)},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dn{constructor(){this._tap=new wf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(w,B,Q){if(!this._swipePoint)if(this._tapTime){let ee=B[0],le=w.timeStamp-this._tapTime<500,qe=this._tapPoint.dist(ee)<30;le&&qe?Q.length>0&&(this._swipePoint=ee,this._swipeTouch=Q[0].identifier):this.reset()}else this._tap.touchstart(w,B,Q)}touchmove(w,B,Q){if(this._tapTime){if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;let ee=B[0],le=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:le/128}}}else this._tap.touchmove(w,B,Q)}touchend(w,B,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{let ee=this._tap.touchend(w,B,Q);ee&&(this._tapTime=w.timeStamp,this._tapPoint=ee)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wn{constructor(w,B,Q){this._el=w,this._mousePan=B,this._touchPan=Q}enable(w){this._inertiaOptions=w||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Nn{constructor(w,B,Q){this._pitchWithRotate=w.pitchWithRotate,this._mouseRotate=B,this._mousePitch=Q}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Yi{constructor(w,B,Q,ee){this._el=w,this._touchZoom=B,this._touchRotate=Q,this._tapDragZoom=ee,this._rotationDisabled=!1,this._enabled=!0}enable(w){this._touchZoom.enable(w),this._rotationDisabled||this._touchRotate.enable(w),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Qi{constructor(w,B){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=w,this._options=B,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let w=this._map.getCanvasContainer();w.classList.add("maplibregl-cooperative-gestures"),this._container=c.create("div","maplibregl-cooperative-gesture-screen",w);let B=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(B=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Q=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ee=document.createElement("div");ee.className="maplibregl-desktop-message",ee.textContent=B,this._container.appendChild(ee);let le=document.createElement("div");le.className="maplibregl-mobile-message",le.textContent=Q,this._container.appendChild(le),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(w){return w[this._bypassKey]}notifyGestureBlocked(w,B){this._enabled&&(this._map.fire(new a.k("cooperativegestureprevented",{gestureType:w,originalEvent:B})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let on=ue=>ue.zoom||ue.drag||ue.pitch||ue.rotate;class Fi extends a.k{}function $n(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}class Ca{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,le)=>{if(ee.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let qe=ee.type==="renderFrame"?void 0:ee,Xe={needsRenderFrame:!1},ot={},Tt={},Yt=ee.touches,Kt=Yt?this._getMapTouches(Yt):void 0,xr=Kt?c.touchPos(this._map.getCanvas(),Kt):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:be,handler:De,allowed:Be}of this._handlers){if(!De.isEnabled())continue;let et;this._blockedByActive(Tt,Be,be)?De.reset():De[le||ee.type]&&(et=De[le||ee.type](ee,xr,Kt),this.mergeHandlerResult(Xe,ot,et,be,qe),et&&et.needsRenderFrame&&this._triggerRenderFrame()),(et||De.isActive())&&(Tt[be]=De)}let Ir={};for(let be in this._previousActiveHandlers)Tt[be]||(Ir[be]=qe);this._previousActiveHandlers=Tt,(Object.keys(Ir).length||$n(Xe))&&(this._changes.push([Xe,ot,Ir]),this._triggerRenderFrame()),(Object.keys(Tt).length||$n(Xe))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ve}=Xe;ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ve(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pf(w),this._bearingSnap=B.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(B);let Q=this._el;this._listeners=[[Q,"touchstart",{passive:!0}],[Q,"touchmove",{passive:!1}],[Q,"touchend",void 0],[Q,"touchcancel",void 0],[Q,"mousedown",void 0],[Q,"mousemove",void 0],[Q,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Q,"mouseover",void 0],[Q,"mouseout",void 0],[Q,"dblclick",void 0],[Q,"click",void 0],[Q,"keydown",{capture:!1}],[Q,"keyup",void 0],[Q,"wheel",{passive:!1}],[Q,"contextmenu",void 0],[window,"blur",void 0]];for(let[ee,le,qe]of this._listeners)c.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,qe)}destroy(){for(let[w,B,Q]of this._listeners)c.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new If(B,w));let ee=B.boxZoom=new ku(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new Qi(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let qe=new zc(B),Xe=new Xi(B);B.doubleClickZoom=new ki(Xe,qe),this._add("tapZoom",qe),this._add("clickZoom",Xe),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let ot=new dn;this._add("tapDragZoom",ot);let Tt=B.touchPitch=new Bc(B);this._add("touchPitch",Tt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Yt=Wl(w),Kt=ah(w);B.dragRotate=new Nn(w,Yt,Kt),this._add("mouseRotate",Yt,["mousePitch"]),this._add("mousePitch",Kt,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let xr=(({enable:et,clickTolerance:We})=>{let it=new Xu({checkCorrectEvent:Ft=>c.mouseButton(Ft)===0&&!Ft.ctrlKey});return new Wu({clickTolerance:We,move:(Ft,Ht)=>({around:Ht,panDelta:Ht.sub(Ft)}),activateOnStart:!0,moveStateManager:it,enable:et,assignEvents:Xf})})(w),Ir=new Zu(w,B);B.dragPan=new wn(Q,xr,Ir),this._add("mousePan",xr),this._add("touchPan",Ir,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ve=new cf,be=new vu;B.touchZoomRotate=new Yi(Q,be,ve,ot),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",be,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let De=B.scrollZoom=new Kr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",De,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let Be=B.keyboard=new Wt(B);this._add("keyboard",Be),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Cs(B))}_add(w,B,Q){this._handlers.push({handlerName:w,handler:B,allowed:Q}),this._handlersById[w]=B}stop(w){if(!this._updatingCamera){for(let{handler:B}of this._handlers)B.reset();this._inertia.clear(),this._fireEvents({},{},w),this._changes=[]}}isActive(){for(let{handler:w}of this._handlers)if(w.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!on(this._eventsInProgress)||this.isZooming()}_blockedByActive(w,B,Q){for(let ee in w)if(ee!==Q&&(!B||B.indexOf(ee)<0))return!0;return!1}_getMapTouches(w){let B=[];for(let Q of w)this._el.contains(Q.target)&&B.push(Q);return B}mergeHandlerResult(w,B,Q,ee,le){if(!Q)return;a.e(w,Q);let qe={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=qe),Q.panDelta!==void 0&&(B.drag=qe),Q.pitchDelta!==void 0&&(B.pitch=qe),Q.bearingDelta!==void 0&&(B.rotate=qe)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,qe]of this._changes)ee.panDelta&&(w.panDelta=(w.panDelta||new a.P(0,0))._add(ee.panDelta)),ee.zoomDelta&&(w.zoomDelta=(w.zoomDelta||0)+ee.zoomDelta),ee.bearingDelta&&(w.bearingDelta=(w.bearingDelta||0)+ee.bearingDelta),ee.pitchDelta&&(w.pitchDelta=(w.pitchDelta||0)+ee.pitchDelta),ee.around!==void 0&&(w.around=ee.around),ee.pinchAround!==void 0&&(w.pinchAround=ee.pinchAround),ee.noInertia&&(w.noInertia=ee.noInertia),a.e(B,le),a.e(Q,qe);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),qe=ee.terrain;if(!($n(w)||qe&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:Xe,zoomDelta:ot,bearingDelta:Tt,pitchDelta:Yt,around:Kt,pinchAround:xr}=w;xr!==void 0&&(Kt=xr),ee._stop(!0),Kt=Kt||ee.transform.centerPoint;let Ir=le.pointLocation(Xe?Kt.sub(Xe):Kt);Tt&&(le.bearing+=Tt),Yt&&(le.pitch+=Yt),ot&&(le.zoom+=ot),qe?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub(Xe)):le.setLocationAtPoint(Ir,Kt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Ir,Kt)):le.setLocationAtPoint(Ir,Kt),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=on(this._eventsInProgress),le=on(w),qe={};for(let Kt in w){let{originalEvent:xr}=w[Kt];this._eventsInProgress[Kt]||(qe[`${Kt}start`]=xr),this._eventsInProgress[Kt]=w[Kt]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let Kt in qe)this._fireEvent(Kt,qe[Kt]);le&&this._fireEvent("move",le.originalEvent);for(let Kt in w){let{originalEvent:xr}=w[Kt];this._fireEvent(Kt,xr)}let Xe={},ot;for(let Kt in this._eventsInProgress){let{handlerName:xr,originalEvent:Ir}=this._eventsInProgress[Kt];this._handlersById[xr].isActive()||(delete this._eventsInProgress[Kt],ot=B[xr]||Ir,Xe[`${Kt}end`]=ot)}for(let Kt in Xe)this._fireEvent(Kt,Xe[Kt]);let Tt=on(this._eventsInProgress),Yt=(ee||le)&&!Tt;if(Yt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Kt=this._map._getTransformForUpdate();Kt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Kt)}if(Q&&Yt){this._updatingCamera=!0;let Kt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),xr=Ir=>Ir!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ra extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=w,this._bearingSnap=B.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(w,B){return this.jumpTo({center:w},B)}panBy(w,B,Q){return w=a.P.convert(w).mult(-1),this.panTo(this.transform.center,a.e({offset:w},B),Q)}panTo(w,B,Q){return this.easeTo(a.e({center:w},B),Q)}getZoom(){return this.transform.zoom}setZoom(w,B){return this.jumpTo({zoom:w},B),this}zoomTo(w,B,Q){return this.easeTo(a.e({zoom:w},B),Q)}zoomIn(w,B){return this.zoomTo(this.getZoom()+1,w,B),this}zoomOut(w,B){return this.zoomTo(this.getZoom()-1,w,B),this}getBearing(){return this.transform.bearing}setBearing(w,B){return this.jumpTo({bearing:w},B),this}getPadding(){return this.transform.padding}setPadding(w,B){return this.jumpTo({padding:w},B),this}rotateTo(w,B,Q){return this.easeTo(a.e({bearing:w},B),Q)}resetNorth(w,B){return this.rotateTo(0,a.e({duration:1e3},w),B),this}resetNorthPitch(w,B){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},w),B),this}snapToNorth(w,B){return Math.abs(this.getBearing()){if(this._zooming&&(ee.zoom=a.y.number(le,De,tr)),this._rotating&&(ee.bearing=a.y.number(qe,Tt,tr)),this._pitching&&(ee.pitch=a.y.number(Xe,Yt,tr)),this._padding&&(ee.interpolatePadding(ot,Kt,tr),Ir=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(tr),it)ee.setLocationAtPoint(it,Ft);else{let dr=ee.zoomScale(ee.zoom-le),Sr=De>le?Math.min(2,We):Math.max(.5,We),Or=Math.pow(Sr,1-tr),Wr=ee.unproject(Be.add(et.mult(tr*Or)).mult(dr));ee.setLocationAtPoint(ee.renderWorldCopies?Wr.wrap():Wr,Ir)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},tr=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,tr)},w),this}_prepareEase(w,B,Q={}){this._moving=!0,B||Q.moving||this.fire(new a.k("movestart",w)),this._zooming&&!Q.zooming&&this.fire(new a.k("zoomstart",w)),this._rotating&&!Q.rotating&&this.fire(new a.k("rotatestart",w)),this._pitching&&!Q.pitching&&this.fire(new a.k("pitchstart",w))}_prepareElevation(w){this._elevationCenter=w,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(w,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(w){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let B=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(w<1&&B!==this._elevationTarget){let Q=this._elevationTarget-this._elevationStart;this._elevationStart+=w*(Q-(B-(Q*w+this._elevationStart))/(1-w)),this._elevationTarget=B}this.transform.elevation=a.y.number(this._elevationStart,this._elevationTarget,w)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(w){let B=w.getCameraPosition(),Q=this.terrain.getElevationForLngLatZoom(B.lngLat,w.zoom);if(B.altitudethis._elevateCameraIfInsideTerrain(ee)),this.transformCameraUpdate&&B.push(ee=>this.transformCameraUpdate(ee)),!B.length)return;let Q=w.clone();for(let ee of B){let le=Q.clone(),{center:qe,zoom:Xe,pitch:ot,bearing:Tt,elevation:Yt}=ee(le);qe&&(le.center=qe),Xe!==void 0&&(le.zoom=Xe),ot!==void 0&&(le.pitch=ot),Tt!==void 0&&(le.bearing=Tt),Yt!==void 0&&(le.elevation=Yt),Q.apply(le)}this.transform.apply(Q)}_fireMoveEvents(w){this.fire(new a.k("move",w)),this._zooming&&this.fire(new a.k("zoom",w)),this._rotating&&this.fire(new a.k("rotate",w)),this._pitching&&this.fire(new a.k("pitch",w))}_afterEase(w,B){if(this._easeId&&B&&this._easeId===B)return;delete this._easeId;let Q=this._zooming,ee=this._rotating,le=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Q&&this.fire(new a.k("zoomend",w)),ee&&this.fire(new a.k("rotateend",w)),le&&this.fire(new a.k("pitchend",w)),this.fire(new a.k("moveend",w))}flyTo(w,B){var Q;if(!w.essential&&u.prefersReducedMotion){let Cn=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Cn,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),le=ee.zoom,qe=ee.bearing,Xe=ee.pitch,ot=ee.padding,Tt="bearing"in w?this._normalizeBearing(w.bearing,qe):qe,Yt="pitch"in w?+w.pitch:Xe,Kt="padding"in w?w.padding:ee.padding,xr=a.P.convert(w.offset),Ir=ee.centerPoint.add(xr),ve=ee.pointLocation(Ir),{center:be,zoom:De}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(be,ee);let Be=ee.zoomScale(De-le),et=ee.project(ve),We=ee.project(be).sub(et),it=w.curve,Ft=Math.max(ee.width,ee.height),Ht=Ft/Be,tr=We.mag();if("minZoom"in w){let Cn=a.ac(Math.min(w.minZoom,le,De),ee.minZoom,ee.maxZoom),Kn=Ft/ee.zoomScale(Cn-le);it=Math.sqrt(Kn/tr*2)}let dr=it*it;function Sr(Cn){let Kn=(Ht*Ht-Ft*Ft+(Cn?-1:1)*dr*dr*tr*tr)/(2*(Cn?Ht:Ft)*dr*tr);return Math.log(Math.sqrt(Kn*Kn+1)-Kn)}function Or(Cn){return(Math.exp(Cn)-Math.exp(-Cn))/2}function Wr(Cn){return(Math.exp(Cn)+Math.exp(-Cn))/2}let ni=Sr(!1),Pi=function(Cn){return Wr(ni)/Wr(ni+it*Cn)},cn=function(Cn){return Ft*((Wr(ni)*(Or(Kn=ni+it*Cn)/Wr(Kn))-Or(ni))/dr)/tr;var Kn},ln=(Sr(!0)-ni)/it;if(Math.abs(tr)<1e-6||!isFinite(ln)){if(Math.abs(Ft-Ht)<1e-6)return this.easeTo(w,B);let Cn=Ht0,Pi=Kn=>Math.exp(Cn*it*Kn)}return w.duration="duration"in w?+w.duration:1e3*ln/("screenSpeed"in w?+w.screenSpeed/it:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=qe!==Tt,this._pitching=Yt!==Xe,this._padding=!ee.isPaddingEqual(Kt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(be),this._ease(Cn=>{let Kn=Cn*ln,Ta=1/Pi(Kn);ee.zoom=Cn===1?De:le+ee.scaleZoom(Ta),this._rotating&&(ee.bearing=a.y.number(qe,Tt,Cn)),this._pitching&&(ee.pitch=a.y.number(Xe,Yt,Cn)),this._padding&&(ee.interpolatePadding(ot,Kt,Cn),Ir=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Cn);let fa=Cn===1?be:ee.unproject(et.add(We.mult(cn(Kn))).mult(Ta));ee.setLocationAtPoint(ee.renderWorldCopies?fa.wrap():fa,Ir),this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},()=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B)},w),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(w,B){var Q;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ee=this._onEaseEnd;delete this._onEaseEnd,ee.call(this,B)}return w||(Q=this.handlers)===null||Q===void 0||Q.stop(!1),this}_ease(w,B,Q){Q.animate===!1||Q.duration===0?(w(1),B()):(this._easeStart=u.now(),this._easeOptions=Q,this._onEaseFrame=w,this._onEaseEnd=B,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(w,B){w=a.b3(w,-180,180);let Q=Math.abs(w-B);return Math.abs(w-360-B)180?-360:Q<-180?360:0}queryTerrainElevation(w){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(w),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'MapLibre'};class Na{constructor(w=La){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=B=>{!B||B.sourceDataType!=="metadata"&&B.sourceDataType!=="visibility"&&B.dataType!=="style"&&B.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=w}getDefaultPosition(){return"bottom-right"}onAdd(w){return this._map=w,this._compact=this.options.compact,this._container=c.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=c.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(w,B){let Q=this._map._getUIString(`AttributionControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)}_updateAttributions(){if(!this._map.style)return;let w=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?w=w.concat(this.options.customAttribution.map(ee=>typeof ee!="string"?"":ee)):typeof this.options.customAttribution=="string"&&w.push(this.options.customAttribution)),this._map.style.stylesheet){let ee=this._map.style.stylesheet;this.styleOwner=ee.owner,this.styleId=ee.id}let B=this._map.style.sourceCaches;for(let ee in B){let le=B[ee];if(le.used||le.usedForTerrain){let qe=le.getSource();qe.attribution&&w.indexOf(qe.attribution)<0&&w.push(qe.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let qe=le+1;qe=0)return!1;return!0});let Q=w.join(" | ");Q!==this._attribHTML&&(this._attribHTML=Q,w.length?(this._innerContainer.innerHTML=Q,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Yn{constructor(w={}){this._updateCompact=()=>{let B=this._container.children;if(B.length){let Q=B[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Q.classList.add("maplibregl-compact"):Q.classList.remove("maplibregl-compact")}},this.options=w}getDefaultPosition(){return"bottom-left"}onAdd(w){this._map=w,this._compact=this.options&&this.options.compact,this._container=c.create("div","maplibregl-ctrl");let B=c.create("a","maplibregl-ctrl-logo");return B.target="_blank",B.rel="noopener nofollow",B.href="https://maplibre.org/",B.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),B.setAttribute("rel","noopener nofollow"),this._container.appendChild(B),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Dn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(w){let B=++this._id;return this._queue.push({callback:w,id:B,cancelled:!1}),B}remove(w){let B=this._currentlyRunning,Q=B?this._queue.concat(B):this._queue;for(let ee of Q)if(ee.id===w)return void(ee.cancelled=!0)}run(w=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let B=this._currentlyRunning=this._queue;this._queue=[];for(let Q of B)if(!Q.cancelled&&(Q.callback(w),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ka=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class bo extends a.E{constructor(w){super(),this.sourceCache=w,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,w.usedForTerrain=!0,w.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(w,B){this.sourceCache.update(w,B),this._renderableTilesKeys=[];let Q={};for(let ee of w.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:B}))Q[ee.key]=!0,this._renderableTilesKeys.push(ee.key),this._tiles[ee.key]||(ee.posMatrix=new Float64Array(16),a.aP(ee.posMatrix,0,a.X,0,a.X,0,1),this._tiles[ee.key]=new Vt(ee,this.tileSize));for(let ee in this._tiles)Q[ee]||delete this._tiles[ee]}freeRtt(w){for(let B in this._tiles){let Q=this._tiles[B];(!w||Q.tileID.equals(w)||Q.tileID.isChildOf(w)||w.isChildOf(Q.tileID))&&(Q.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(w=>this.getTileByID(w))}getTileByID(w){return this._tiles[w]}getTerrainCoords(w){let B={};for(let Q of this._renderableTilesKeys){let ee=this._tiles[Q].tileID;if(ee.canonical.equals(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16),a.aP(le.posMatrix,0,a.X,0,a.X,0,1),B[Q]=le}else if(ee.canonical.isChildOf(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let qe=ee.canonical.z-w.canonical.z,Xe=ee.canonical.x-(ee.canonical.x>>qe<>qe<>qe;a.aP(le.posMatrix,0,Tt,0,Tt,0,1),a.J(le.posMatrix,le.posMatrix,[-Xe*Tt,-ot*Tt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let qe=w.canonical.z-ee.canonical.z,Xe=w.canonical.x-(w.canonical.x>>qe<>qe<>qe;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[Xe*Tt,ot*Tt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**qe,1/2**qe,0]),B[Q]=le}}return B}getSourceTile(w,B){let Q=this.sourceCache._source,ee=w.overscaledZ-this.deltaZoom;if(ee>Q.maxzoom&&(ee=Q.maxzoom),ee=Q.minzoom&&(!le||!le.dem);)le=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return le}tilesAfterTime(w=Date.now()){return Object.values(this._tiles).filter(B=>B.timeAdded>=w)}}class Xo{constructor(w,B,Q){this.painter=w,this.sourceCache=new bo(B),this.options=Q,this.exaggeration=typeof Q.exaggeration=="number"?Q.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(w,B,Q,ee=a.X){var le;if(!(B>=0&&B=0&&Qw.canonical.z&&(w.canonical.z>=ee?le=w.canonical.z-ee:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let qe=w.canonical.x-(w.canonical.x>>le<>le<>8<<4|le>>8,B[qe+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new g(w,Q,w.gl.RGBA,{premultiply:!1});return ee.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._coordsTexture=ee,ee}pointCoordinate(w){this.painter.maybeDrawDepthAndCoords(!0);let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl,le=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),qe=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),Xe=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,Xe-qe-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let ot=B[0]+(B[2]>>4<<8),Tt=B[1]+((15&B[2])<<8),Yt=this.coordsIndex[255-B[3]],Kt=Yt&&this.sourceCache.getTileByID(Yt);if(!Kt)return null;let xr=this._coordsTextureSize,Ir=(1<w.id!==B),this._recentlyUsed.push(w.id)}stampObject(w){w.stamp=++this._stamp}getOrCreateFreeObject(){for(let B of this._recentlyUsed)if(!this._objects[B].inUse)return this._objects[B];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let w=this._createObject(this._objects.length);return this._objects.push(w),w}freeObject(w){w.inUse=!1}freeAllObjects(){for(let w of this._objects)this.freeObject(w)}isFull(){return!(this._objects.length!w.inUse)===!1}}let as={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ws{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ss(w.context,30,B.sourceCache.tileSize*B.qualityFactor)}destruct(){this.pool.destruct()}getTexture(w){return this.pool.getObjectForId(w.rtt[this._stacks.length-1].id).texture}prepareForRender(w,B){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=w._order.filter(Q=>!w._layers[Q].isHidden(B)),this._coordsDescendingInv={};for(let Q in w.sourceCaches){this._coordsDescendingInv[Q]={};let ee=w.sourceCaches[Q].getVisibleCoordinates();for(let le of ee){let qe=this.terrain.sourceCache.getTerrainCoords(le);for(let Xe in qe)this._coordsDescendingInv[Q][Xe]||(this._coordsDescendingInv[Q][Xe]=[]),this._coordsDescendingInv[Q][Xe].push(qe[Xe])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(as[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let qe in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][qe]=this._coordsDescendingInv[le][qe].map(Xe=>Xe.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let le=this._coordsDescendingInvStr[ee][Q.tileID.key];le&&le!==Q.rttCoords[ee]&&(Q.rtt=[])}}renderLayer(w){if(w.isHidden(this.painter.transform.zoom))return!1;let B=w.type,Q=this.painter,ee=this._renderableLayerIds[this._renderableLayerIds.length-1]===w.id;if(as[B]&&(this._prevType&&as[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(as[this._prevType]||as[B]&&ee){this._prevType=B;let le=this._stacks.length-1,qe=this._stacks[le]||[];for(let Xe of this._renderableTiles){if(this.pool.isFull()&&(js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Xe),Xe.rtt[le]){let Tt=this.pool.getObjectForId(Xe.rtt[le].id);if(Tt.stamp===Xe.rtt[le].stamp){this.pool.useObject(Tt);continue}}let ot=this.pool.getOrCreateFreeObject();this.pool.useObject(ot),this.pool.stampObject(ot),Xe.rtt[le]={id:ot.id,stamp:ot.stamp},Q.context.bindFramebuffer.set(ot.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let Tt=0;Tt{ue.touchstart=ue.dragStart,ue.touchmoveWindow=ue.dragMove,ue.touchend=ue.dragEnd},va={showCompass:!0,showZoom:!0,visualizePitch:!1};class no{constructor(w,B,Q=!1){this.mousedown=qe=>{this.startMouse(a.e({},qe,{ctrlKey:!0,preventDefault:()=>qe.preventDefault()}),c.mousePos(this.element,qe)),c.addEventListener(window,"mousemove",this.mousemove),c.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=qe=>{this.moveMouse(qe,c.mousePos(this.element,qe))},this.mouseup=qe=>{this.mouseRotate.dragEnd(qe),this.mousePitch&&this.mousePitch.dragEnd(qe),this.offTemp()},this.touchstart=qe=>{qe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,qe.targetTouches)[0],this.startTouch(qe,this._startPos),c.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.addEventListener(window,"touchend",this.touchend))},this.touchmove=qe=>{qe.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,qe.targetTouches)[0],this.moveTouch(qe,this._lastPos))},this.touchend=qe=>{qe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let ee=w.dragRotate._mouseRotate.getClickTolerance(),le=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Wl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:qe,clickTolerance:Xe,bearingDegreesPerPixelMoved:ot=.8})=>{let Tt=new uf;return new Wu({clickTolerance:Xe,move:(Yt,Kt)=>({bearingDelta:(Kt.x-Yt.x)*ot}),moveStateManager:Tt,enable:qe,assignEvents:Ls})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=ah({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:qe,clickTolerance:Xe,pitchDegreesPerPixelMoved:ot=-.5})=>{let Tt=new uf;return new Wu({clickTolerance:Xe,move:(Yt,Kt)=>({pitchDelta:(Kt.y-Yt.y)*ot}),moveStateManager:Tt,enable:qe,assignEvents:Ls})})({clickTolerance:le,enable:!0})),c.addEventListener(B,"mousedown",this.mousedown),c.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),c.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),c.disableDrag()}moveMouse(w,B){let Q=this.map,{bearingDelta:ee}=this.mouseRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.mousePitch){let{pitchDelta:le}=this.mousePitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}moveTouch(w,B){let Q=this.map,{bearingDelta:ee}=this.touchRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.touchPitch){let{pitchDelta:le}=this.touchPitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}off(){let w=this.element;c.removeEventListener(w,"mousedown",this.mousedown),c.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend),c.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,"mousemove",this.mousemove),c.removeEventListener(window,"mouseup",this.mouseup),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend)}}let ys;function rs(ue,w,B){let Q=new a.N(ue.lng,ue.lat);if(ue=new a.N(ue.lng,ue.lat),w){let ee=new a.N(ue.lng-360,ue.lat),le=new a.N(ue.lng+360,ue.lat),qe=B.locationPoint(ue).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(ue);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;ue.lng>B.center.lng?ue.lng-=360:ue.lng+=360}return ue.lng!==Q.lng&&B.locationPoint(ue).y>B.height/2-B.getHorizon()?ue:Q}let $l={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Cu(ue,w,B){let Q=ue.classList;for(let ee in $l)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Yu extends a.E{constructor(w){if(super(),this._onKeyPress=B=>{let Q=B.code,ee=B.charCode||B.keyCode;Q!=="Space"&&Q!=="Enter"&&ee!==32&&ee!==13||this.togglePopup()},this._onMapClick=B=>{let Q=B.originalEvent.target,ee=this._element;this._popup&&(Q===ee||ee.contains(Q))&&this.togglePopup()},this._update=B=>{var Q;if(!this._map)return;let ee=this._map.loaded()&&!this._map.isMoving();((B==null?void 0:B.type)==="terrain"||(B==null?void 0:B.type)==="render"&&!ee)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?rs(this._lngLat,this._flatPos,this._map.transform):(Q=this._lngLat)===null||Q===void 0?void 0:Q.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let le="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?le=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(le=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let qe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?qe="rotateX(0deg)":this._pitchAlignment==="map"&&(qe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),c.setTransform(this._element,`${$l[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${qe} ${le}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(B&&B.type==="moveend")}).catch(()=>{})},this._onMove=B=>{if(!this._isDragging){let Q=this._clickTolerance||this._map._clickTolerance;this._isDragging=B.point.dist(this._pointerdownPos)>=Q}this._isDragging&&(this._pos=B.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.k("dragstart"))),this.fire(new a.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.k("dragend")),this._state="inactive"},this._addDragHandler=B=>{this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._pointerdownPos=B.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=w&&w.anchor||"center",this._color=w&&w.color||"#3FB1CE",this._scale=w&&w.scale||1,this._draggable=w&&w.draggable||!1,this._clickTolerance=w&&w.clickTolerance||0,this._subpixelPositioning=w&&w.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=w&&w.rotation||0,this._rotationAlignment=w&&w.rotationAlignment||"auto",this._pitchAlignment=w&&w.pitchAlignment&&w.pitchAlignment!=="auto"?w.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(w==null?void 0:w.opacity,w==null?void 0:w.opacityWhenCovered),w&&w.element)this._element=w.element,this._offset=a.P.convert(w&&w.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create("div");let B=c.createNS("http://www.w3.org/2000/svg","svg"),Q=41,ee=27;B.setAttributeNS(null,"display","block"),B.setAttributeNS(null,"height",`${Q}px`),B.setAttributeNS(null,"width",`${ee}px`),B.setAttributeNS(null,"viewBox",`0 0 ${ee} ${Q}`);let le=c.createNS("http://www.w3.org/2000/svg","g");le.setAttributeNS(null,"stroke","none"),le.setAttributeNS(null,"stroke-width","1"),le.setAttributeNS(null,"fill","none"),le.setAttributeNS(null,"fill-rule","evenodd");let qe=c.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"fill-rule","nonzero");let Xe=c.createNS("http://www.w3.org/2000/svg","g");Xe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Xe.setAttributeNS(null,"fill","#000000");let ot=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let Be of ot){let et=c.createNS("http://www.w3.org/2000/svg","ellipse");et.setAttributeNS(null,"opacity","0.04"),et.setAttributeNS(null,"cx","10.5"),et.setAttributeNS(null,"cy","5.80029008"),et.setAttributeNS(null,"rx",Be.rx),et.setAttributeNS(null,"ry",Be.ry),Xe.appendChild(et)}let Tt=c.createNS("http://www.w3.org/2000/svg","g");Tt.setAttributeNS(null,"fill",this._color);let Yt=c.createNS("http://www.w3.org/2000/svg","path");Yt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Tt.appendChild(Yt);let Kt=c.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"opacity","0.25"),Kt.setAttributeNS(null,"fill","#000000");let xr=c.createNS("http://www.w3.org/2000/svg","path");xr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Kt.appendChild(xr);let Ir=c.createNS("http://www.w3.org/2000/svg","g");Ir.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ir.setAttributeNS(null,"fill","#FFFFFF");let ve=c.createNS("http://www.w3.org/2000/svg","g");ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");let be=c.createNS("http://www.w3.org/2000/svg","circle");be.setAttributeNS(null,"fill","#000000"),be.setAttributeNS(null,"opacity","0.25"),be.setAttributeNS(null,"cx","5.5"),be.setAttributeNS(null,"cy","5.5"),be.setAttributeNS(null,"r","5.4999962");let De=c.createNS("http://www.w3.org/2000/svg","circle");De.setAttributeNS(null,"fill","#FFFFFF"),De.setAttributeNS(null,"cx","5.5"),De.setAttributeNS(null,"cy","5.5"),De.setAttributeNS(null,"r","5.4999962"),ve.appendChild(be),ve.appendChild(De),qe.appendChild(Xe),qe.appendChild(Tt),qe.appendChild(Kt),qe.appendChild(Ir),qe.appendChild(ve),B.appendChild(qe),B.setAttributeNS(null,"height",Q*this._scale+"px"),B.setAttributeNS(null,"width",ee*this._scale+"px"),this._element.appendChild(B),this._offset=a.P.convert(w&&w.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",B=>{B.preventDefault()}),this._element.addEventListener("mousedown",B=>{B.preventDefault()}),Cu(this._element,this._anchor,"marker"),w&&w.className)for(let B of w.className.split(" "))this._element.classList.add(B);this._popup=null}addTo(w){return this.remove(),this._map=w,this._element.setAttribute("aria-label",w._getUIString("Marker.Title")),w.getCanvasContainer().appendChild(this._element),w.on("move",this._update),w.on("moveend",this._update),w.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.N.convert(w),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(w){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),w){if(!("offset"in w.options)){let ee=Math.abs(13.5)/Math.SQRT2;w.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ee,-1*(38.1-13.5+ee)],"bottom-right":[-ee,-1*(38.1-13.5+ee)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=w,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(w){return this._subpixelPositioning=w,this}getPopup(){return this._popup}togglePopup(){let w=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:w?(w.isOpen()?w.remove():(w.setLngLat(this._lngLat),w.addTo(this._map)),this):this}_updateOpacity(w=!1){var B,Q;if(!(!((B=this._map)===null||B===void 0)&&B.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(w)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let ee=this._map,le=ee.terrain.depthAtPoint(this._pos),qe=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,qe)-le<.006)return void(this._element.style.opacity=this._opacity);let Xe=-this._offset.y/ee.transform._pixelPerMeter,ot=Math.sin(ee.getPitch()*Math.PI/180)*Xe,Tt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Yt=ee.transform.lngLatToCameraDepth(this._lngLat,qe+ot)-Tt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Yt&&this._popup.remove(),this._element.style.opacity=Yt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(w){return this._offset=a.P.convert(w),this._update(),this}addClassName(w){this._element.classList.add(w)}removeClassName(w){this._element.classList.remove(w)}toggleClassName(w){return this._element.classList.toggle(w)}setDraggable(w){return this._draggable=!!w,this._map&&(w?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(w){return this._rotation=w||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(w){return this._rotationAlignment=w||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(w){return this._pitchAlignment=w&&w!=="auto"?w:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(w,B){return w===void 0&&B===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),w!==void 0&&(this._opacity=w),B!==void 0&&(this._opacityWhenCovered=B),this._map&&this._updateOpacity(!0),this}}let Nc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},pu=0,Uc=!1,xu={maxWidth:100,unit:"metric"};function Ac(ue,w,B){let Q=B&&B.maxWidth||100,ee=ue._container.clientHeight/2,le=ue.unproject([0,ee]),qe=ue.unproject([Q,ee]),Xe=le.distanceTo(qe);if(B&&B.unit==="imperial"){let ot=3.2808*Xe;ot>5280?Ua(w,Q,ot/5280,ue._getUIString("ScaleControl.Miles")):Ua(w,Q,ot,ue._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Ua(w,Q,Xe/1852,ue._getUIString("ScaleControl.NauticalMiles")):Xe>=1e3?Ua(w,Q,Xe/1e3,ue._getUIString("ScaleControl.Kilometers")):Ua(w,Q,Xe,ue._getUIString("ScaleControl.Meters"))}function Ua(ue,w,B,Q){let ee=function(le){let qe=Math.pow(10,`${Math.floor(le)}`.length-1),Xe=le/qe;return Xe=Xe>=10?10:Xe>=5?5:Xe>=3?3:Xe>=2?2:Xe>=1?1:function(ot){let Tt=Math.pow(10,Math.ceil(-Math.log(ot)/Math.LN10));return Math.round(ot*Tt)/Tt}(Xe),qe*Xe}(B);ue.style.width=w*(ee/B)+"px",ue.innerHTML=`${ee} ${Q}`}let oo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Vc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function hc(ue){if(ue){if(typeof ue=="number"){let w=Math.round(Math.abs(ue)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,ue),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-ue),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(ue,0),right:new a.P(-ue,0)}}if(ue instanceof a.P||Array.isArray(ue)){let w=a.P.convert(ue);return{center:w,top:w,"top-left":w,"top-right":w,bottom:w,"bottom-left":w,"bottom-right":w,left:w,right:w}}return{center:a.P.convert(ue.center||[0,0]),top:a.P.convert(ue.top||[0,0]),"top-left":a.P.convert(ue["top-left"]||[0,0]),"top-right":a.P.convert(ue["top-right"]||[0,0]),bottom:a.P.convert(ue.bottom||[0,0]),"bottom-left":a.P.convert(ue["bottom-left"]||[0,0]),"bottom-right":a.P.convert(ue["bottom-right"]||[0,0]),left:a.P.convert(ue.left||[0,0]),right:a.P.convert(ue.right||[0,0])}}return hc(new a.P(0,0))}let Ku=o;i.AJAXError=a.bh,i.Evented=a.E,i.LngLat=a.N,i.MercatorCoordinate=a.Z,i.Point=a.P,i.addProtocol=a.bi,i.config=a.a,i.removeProtocol=a.bj,i.AttributionControl=Na,i.BoxZoomHandler=ku,i.CanvasSource=Jt,i.CooperativeGesturesHandler=Qi,i.DoubleClickZoomHandler=ki,i.DragPanHandler=wn,i.DragRotateHandler=Nn,i.EdgeInsets=hu,i.FullscreenControl=class extends a.E{constructor(ue={}){super(),this._onFullscreenChange=()=>{var w;let B=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((w=B==null?void 0:B.shadowRoot)===null||w===void 0)&&w.fullscreenElement;)B=B.shadowRoot.fullscreenElement;B===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ue&&ue.container&&(ue.container instanceof HTMLElement?this._container=ue.container:a.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(ue){return this._map=ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let ue=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",ue).setAttribute("aria-hidden","true"),ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ue),this._fullscreenButton.title=ue}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new a.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},i.GeoJSONSource=st,i.GeolocateControl=class extends a.E{constructor(ue){super(),this._onSuccess=w=>{if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.k("outofmaxbounds",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.k("geolocate",w)),this._finish()}},this._updateCamera=w=>{let B=new a.N(w.coords.longitude,w.coords.latitude),Q=w.coords.accuracy,ee=this._map.getBearing(),le=a.e({bearing:ee},this.options.fitBoundsOptions),qe=ce.fromLngLat(B,Q);this._map.fitBounds(qe,le,{geolocateSource:!0})},this._updateMarker=w=>{if(w){let B=new a.N(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(B).addTo(this._map),this._userLocationDotMarker.setLngLat(B).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=w=>{if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&Uc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.k("error",w)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",w=>w.preventDefault()),this._geolocateButton=c.create("button","maplibregl-ctrl-geolocate",this._container),c.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=w=>{if(this._map){if(w===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}else{let B=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Yu({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",B=>{B.geolocateSource||this._watchState!=="ACTIVE_LOCK"||B.originalEvent&&B.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.k("trackuserlocationend")),this.fire(new a.k("userlocationlostfocus")))})}},this.options=a.e({},Nc,ue)}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(ys!==void 0&&!w)return ys;if(window.navigator.permissions===void 0)return ys=!!window.navigator.geolocation,ys;try{ys=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){ys=!!window.navigator.geolocation}return ys})}().then(w=>this._finishSetupUI(w)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,pu=0,Uc=!1}_isOutOfMapMaxBounds(ue){let w=this._map.getMaxBounds(),B=ue.coords;return w&&(B.longitudew.getEast()||B.latitudew.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let ue=this._map.getBounds(),w=ue.getSouthEast(),B=ue.getNorthEast(),Q=w.distanceTo(B),ee=Math.ceil(this._accuracy/(Q/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ee}px`,this._circleElement.style.height=`${ee}px`}trigger(){if(!this._setup)return a.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pu--,Uc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new a.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k("trackuserlocationstart")),this.fire(new a.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pu++,pu>1?(ue={maximumAge:6e5,timeout:0},Uc=!0):(ue=this.options.positionOptions,Uc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=Ah,i.ImageSource=Gt,i.KeyboardHandler=Wt,i.LngLatBounds=ce,i.LogoControl=Yn,i.Map=class extends Ra{constructor(ue){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Ws),ue);if(w.minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(w.minPitch!=null&&w.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new nl(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=a.a4(),this._contextLost=B=>{B.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k("webglcontextlost",{originalEvent:B}))},this._contextRestored=B=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k("webglcontextrestored",{originalEvent:B}))},this._onMapScroll=B=>{if(B.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=w.interactive,this._maxTileCacheSize=w.maxTileCacheSize,this._maxTileCacheZoomLevels=w.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=w.preserveDrawingBuffer===!0,this._antialias=w.antialias===!0,this._trackResize=w.trackResize===!0,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles===!0,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions===!0,this._collectResourceTiming=w.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ho),w.locale),this._clickTolerance=w.clickTolerance,this._overridePixelRatio=w.pixelRatio,this._maxCanvasSize=w.maxCanvasSize,this.transformCameraUpdate=w.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=w.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new k(w.transformRequest),typeof w.container=="string"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window!="undefined"){addEventListener("online",this._onWindowOnline,!1);let B=!1,Q=nh(ee=>{this._trackResize&&!this._removed&&(this.resize(ee),this.redraw())},50);this._resizeObserver=new ResizeObserver(ee=>{B?Q(ee):B=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ca(this,w),this._hash=w.hash&&new Ah(typeof w.hash=="string"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.e({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,this._validateStyle=w.validateStyle,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Na(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Yn,w.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",B=>{this._update(B.dataType==="style"),this.fire(new a.k(`${B.dataType}data`,B))}),this.on("dataloading",B=>{this.fire(new a.k(`${B.dataType}dataloading`,B))}),this.on("dataabort",B=>{this.fire(new a.k("sourcedataabort",B))})}_getMapId(){return this._mapId}addControl(ue,w){if(w===void 0&&(w=ue.getDefaultPosition?ue.getDefaultPosition():"top-right"),!ue||!ue.onAdd)return this.fire(new a.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let B=ue.onAdd(this);this._controls.push(ue);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(ue){if(!ue||!ue.onRemove)return this.fire(new a.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let w=this._controls.indexOf(ue);return w>-1&&this._controls.splice(w,1),ue.onRemove(this),this}hasControl(ue){return this._controls.indexOf(ue)>-1}calculateCameraOptionsFromTo(ue,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ue,w,B,Q)}resize(ue){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],le=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,le),this.painter.resize(Q,ee,le),this.painter.overLimit()){let Xe=this.painter.context.gl;this._maxCanvasSize=[Xe.drawingBufferWidth,Xe.drawingBufferHeight];let ot=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,ot),this.painter.resize(Q,ee,ot)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let qe=!this._moving;return qe&&(this.stop(),this.fire(new a.k("movestart",ue)).fire(new a.k("move",ue))),this.fire(new a.k("resize",ue)),qe&&this.fire(new a.k("moveend",ue)),this}_getClampedPixelRatio(ue,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=ue*ee,qe=w*ee;return Math.min(le>B?B/le:1,qe>Q?Q/qe:1)*ee}getPixelRatio(){var ue;return(ue=this._overridePixelRatio)!==null&&ue!==void 0?ue:devicePixelRatio}setPixelRatio(ue){this._overridePixelRatio=ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ue){return this.transform.setMaxBounds(ce.convert(ue)),this._update()}setMinZoom(ue){if((ue=ue==null?-2:ue)>=-2&&ue<=this.transform.maxZoom)return this.transform.minZoom=ue,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ue,this._update(),this.getZoom()>ue&&this.setZoom(ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ue){if((ue=ue==null?0:ue)<0)throw new Error("minPitch must be greater than or equal to 0");if(ue>=0&&ue<=this.transform.maxPitch)return this.transform.minPitch=ue,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(ue>=this.transform.minPitch)return this.transform.maxPitch=ue,this._update(),this.getPitch()>ue&&this.setPitch(ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ue){return this.transform.renderWorldCopies=ue,this._update()}project(ue){return this.transform.locationPoint(a.N.convert(ue),this.style&&this.terrain)}unproject(ue){return this.transform.pointLocation(a.P.convert(ue),this.terrain)}isMoving(){var ue;return this._moving||((ue=this.handlers)===null||ue===void 0?void 0:ue.isMoving())}isZooming(){var ue;return this._zooming||((ue=this.handlers)===null||ue===void 0?void 0:ue.isZooming())}isRotating(){var ue;return this._rotating||((ue=this.handlers)===null||ue===void 0?void 0:ue.isRotating())}_createDelegatedListener(ue,w,B){if(ue==="mouseenter"||ue==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let qe=w.filter(ot=>this.getLayer(ot)),Xe=qe.length!==0?this.queryRenderedFeatures(le.point,{layers:qe}):[];Xe.length?Q||(Q=!0,B.call(this,new jl(ue,this,le.originalEvent,{features:Xe}))):Q=!1},mouseout:()=>{Q=!1}}}}if(ue==="mouseleave"||ue==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:qe=>{let Xe=w.filter(ot=>this.getLayer(ot));(Xe.length!==0?this.queryRenderedFeatures(qe.point,{layers:Xe}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new jl(ue,this,qe.originalEvent)))},mouseout:qe=>{Q&&(Q=!1,B.call(this,new jl(ue,this,qe.originalEvent)))}}}}{let Q=ee=>{let le=w.filter(Xe=>this.getLayer(Xe)),qe=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];qe.length&&(ee.features=qe,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[ue]:Q}}}}_saveDelegatedListener(ue,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ue]=this._delegatedListeners[ue]||[],this._delegatedListeners[ue].push(w)}_removeDelegatedListener(ue,w,B){if(!this._delegatedListeners||!this._delegatedListeners[ue])return;let Q=this._delegatedListeners[ue];for(let ee=0;eew.includes(qe))){for(let qe in le.delegates)this.off(qe,le.delegates[qe]);return void Q.splice(ee,1)}}}on(ue,w,B){if(B===void 0)return super.on(ue,w);let Q=this._createDelegatedListener(ue,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(ue,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(ue,w,B){if(B===void 0)return super.once(ue,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(ue,Q,B);for(let le in ee.delegates){let qe=ee.delegates[le];ee.delegates[le]=(...Xe)=>{this._removeDelegatedListener(ue,Q,B),qe(...Xe)}}this._saveDelegatedListener(ue,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(ue,w,B){return B===void 0?super.off(ue,w):(this._removeDelegatedListener(ue,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(ue,w){if(!this.style)return[];let B,Q=ue instanceof a.P||Array.isArray(ue),ee=Q?ue:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:ue)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),qe=a.P.convert(ee[1]);B=[le,new a.P(qe.x,le.y),qe,new a.P(le.x,qe.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(ue,w){return this.style.querySourceFeatures(ue,w)}setStyle(ue,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ue?(this._diffStyle(ue,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(ue,w))}setTransformRequest(ue){return this._requestManager.setTransformRequest(ue),this}_getUIString(ue){let w=this._locale[ue];if(w==null)throw new Error(`Missing UI string '${ue}'`);return w}_updateStyle(ue,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(ue,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ue)),ue?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof ue=="string"?this.style.loadURL(ue,w,B):this.style.loadJSON(ue,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ha(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ue,w){if(typeof ue=="string"){let B=this._requestManager.transformRequest(ue,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof ue=="object"&&this._updateDiff(ue,w)}_updateDiff(ue,w){try{this.style.setState(ue,w)&&this._update(!0)}catch(B){a.w(`Unable to perform style diff: ${B.message||B.error||B}. Rebuilding the style from scratch.`),this._updateStyle(ue,w)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(ue,w){return this._lazyInitEmptyStyle(),this.style.addSource(ue,w),this._update(!0)}isSourceLoaded(ue){let w=this.style&&this.style.sourceCaches[ue];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${ue}'`)))}setTerrain(ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),ue){let w=this.style.sourceCaches[ue.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${ue.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===ue.source&&a.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Xo(this.painter,w,ue),this.painter.renderToTexture=new ws(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=B=>{B.dataType==="style"?this.terrain.sourceCache.freeRtt():B.dataType==="source"&&B.tile&&(B.sourceId!==ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(B.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k("terrain",{terrain:ue})),this}getTerrain(){var ue,w;return(w=(ue=this.terrain)===null||ue===void 0?void 0:ue.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let ue=this.style&&this.style.sourceCaches;for(let w in ue){let B=ue[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(ue){return this.style.removeSource(ue),this._update(!0)}getSource(ue){return this.style.getSource(ue)}addImage(ue,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:qe,content:Xe,textFitWidth:ot,textFitHeight:Tt}=B;if(this._lazyInitEmptyStyle(),!(w instanceof HTMLImageElement||a.b(w))){if(w.width===void 0||w.height===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Yt,height:Kt,data:xr}=w,Ir=w;return this.style.addImage(ue,{data:new a.R({width:Yt,height:Kt},new Uint8Array(xr)),pixelRatio:Q,stretchX:le,stretchY:qe,content:Xe,textFitWidth:ot,textFitHeight:Tt,sdf:ee,version:0,userImage:Ir}),Ir.onAdd&&Ir.onAdd(this,ue),this}}{let{width:Yt,height:Kt,data:xr}=u.getImageData(w);this.style.addImage(ue,{data:new a.R({width:Yt,height:Kt},xr),pixelRatio:Q,stretchX:le,stretchY:qe,content:Xe,textFitWidth:ot,textFitHeight:Tt,sdf:ee,version:0})}}updateImage(ue,w){let B=this.style.getImage(ue);if(!B)return this.fire(new a.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Q=w instanceof HTMLImageElement||a.b(w)?u.getImageData(w):w,{width:ee,height:le,data:qe}=Q;if(ee===void 0||le===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ee!==B.data.width||le!==B.data.height)return this.fire(new a.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Xe=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(qe,Xe),this.style.updateImage(ue,B),this}getImage(ue){return this.style.getImage(ue)}hasImage(ue){return ue?!!this.style.getImage(ue):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(ue){this.style.removeImage(ue)}loadImage(ue){return p.getImage(this._requestManager.transformRequest(ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ue,w){return this._lazyInitEmptyStyle(),this.style.addLayer(ue,w),this._update(!0)}moveLayer(ue,w){return this.style.moveLayer(ue,w),this._update(!0)}removeLayer(ue){return this.style.removeLayer(ue),this._update(!0)}getLayer(ue){return this.style.getLayer(ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ue,w,B){return this.style.setLayerZoomRange(ue,w,B),this._update(!0)}setFilter(ue,w,B={}){return this.style.setFilter(ue,w,B),this._update(!0)}getFilter(ue){return this.style.getFilter(ue)}setPaintProperty(ue,w,B,Q={}){return this.style.setPaintProperty(ue,w,B,Q),this._update(!0)}getPaintProperty(ue,w){return this.style.getPaintProperty(ue,w)}setLayoutProperty(ue,w,B,Q={}){return this.style.setLayoutProperty(ue,w,B,Q),this._update(!0)}getLayoutProperty(ue,w){return this.style.getLayoutProperty(ue,w)}setGlyphs(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ue,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ue,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ue,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ue,w,B=>{B||this._update(!0)}),this}setLight(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(ue,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(ue){return this._lazyInitEmptyStyle(),this.style.setSky(ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ue,w){return this.style.setFeatureState(ue,w),this._update()}removeFeatureState(ue,w){return this.style.removeFeatureState(ue,w),this._update()}getFeatureState(ue){return this.style.getFeatureState(ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ue=0,w=0;return this._container&&(ue=this._container.clientWidth||400,w=this._container.clientHeight||300),[ue,w]}_setupContainer(){let ue=this._container;ue.classList.add("maplibregl-map");let w=this._canvasContainer=c.create("div","maplibregl-canvas-container",ue);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=c.create("canvas","maplibregl-canvas",w),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let B=this._containerDimensions(),Q=this._getClampedPixelRatio(B[0],B[1]);this._resizeCanvas(B[0],B[1],Q);let ee=this._controlContainer=c.create("div","maplibregl-control-container",ue),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(qe=>{le[qe]=c.create("div",`maplibregl-ctrl-${qe} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(ue,w,B){this._canvas.width=Math.floor(B*ue),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${ue}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},w=null;this._canvas.addEventListener("webglcontextcreationerror",Q=>{w={requestedAttributes:ue},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",ue)||this._canvas.getContext("webgl",ue);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Dc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ue){return this._update(),this._renderTaskQueue.add(ue)}_cancelRenderFrame(ue){this._renderTaskQueue.remove(ue)}_render(ue){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ue),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=u.now();this.style.zoomHistory.update(ee,le);let qe=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Xe=qe.crossFadingFactor();Xe===1&&Xe===this._crossFadingFactor||(B=!0,this._crossFadingFactor=Xe),this.style.update(qe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,showPadding:this.showPadding}),this.fire(new a.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k("load"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Q=this._sourcesDirty||this._styleDirty||this._placementDirty;return Q||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k("idle")),!this._loaded||this._fullyLoaded||Q||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ue;this._hash&&this._hash.remove();for(let B of this._controls)B.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(ue=this._resizeObserver)===null||ue===void 0||ue.disconnect();let w=this.painter.context.gl.getExtension("WEBGL_lose_context");w!=null&&w.loseContext&&w.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(ue=>{a.bf.frame(ue),this._frameRequest=null,this._render(ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ue){this._showTileBoundaries!==ue&&(this._showTileBoundaries=ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ue){this._showPadding!==ue&&(this._showPadding=ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ue){this._showCollisionBoxes!==ue&&(this._showCollisionBoxes=ue,ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ue){this._showOverdrawInspector!==ue&&(this._showOverdrawInspector=ue,this._update())}get repaint(){return!!this._repaint}set repaint(ue){this._repaint!==ue&&(this._repaint=ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ue){this._vertices=ue,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=jl,i.MapTouchEvent=lf,i.MapWheelEvent=Hh,i.Marker=Yu,i.NavigationControl=class{constructor(ue){this._updateZoomButtons=()=>{let w=this._map.getZoom(),B=w===this._map.getMaxZoom(),Q=w===this._map.getMinZoom();this._zoomInButton.disabled=B,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute("aria-disabled",B.toString()),this._zoomOutButton.setAttribute("aria-disabled",Q.toString())},this._rotateCompassArrow=()=>{let w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w},this._setButtonTitle=(w,B)=>{let Q=this._map._getUIString(`NavigationControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)},this.options=a.e({},va,ue),this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",w=>w.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",w=>this._map.zoomIn({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",w=>this._map.zoomOut({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",w=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:w}):this._map.resetNorth({},{originalEvent:w})}),this._compassIcon=c.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(ue){return this._map=ue,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new no(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ue,w){let B=c.create("button",ue,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(ue){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new a.k("close"))),this),this._onMouseUp=w=>{this._update(w.point)},this._onMouseMove=w=>{this._update(w.point)},this._onDrag=w=>{this._update(w.point)},this._update=w=>{var B;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create("div","maplibregl-popup",this._map.getContainer()),this._tip=c.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Xe of this.options.className.split(" "))this._container.classList.add(Xe);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?rs(this._lngLat,this._flatPos,this._map.transform):(B=this._lngLat)===null||B===void 0?void 0:B.wrap(),this._trackPointer&&!w)return;let Q=this._flatPos=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&w?w:this._map.transform.locationPoint(this._lngLat));let ee=this.options.anchor,le=hc(this.options.offset);if(!ee){let Xe=this._container.offsetWidth,ot=this._container.offsetHeight,Tt;Tt=Q.y+le.bottom.ythis._map.transform.height-ot?["bottom"]:[],Q.xthis._map.transform.width-Xe/2&&Tt.push("right"),ee=Tt.length===0?"bottom":Tt.join("-")}let qe=Q.add(le[ee]);this.options.subpixelPositioning||(qe=qe.round()),c.setTransform(this._container,`${$l[ee]} translate(${qe.x}px,${qe.y}px)`),Cu(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(oo),ue)}addTo(ue){return this._map&&this.remove(),this._map=ue,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ue){return this._lngLat=a.N.convert(ue),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(ue){return this.setDOMContent(document.createTextNode(ue))}setHTML(ue){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=ue;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var ue;return(ue=this._container)===null||ue===void 0?void 0:ue.style.maxWidth}setMaxWidth(ue){return this.options.maxWidth=ue,this._update(),this}setDOMContent(ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ue){return this._container&&this._container.classList.add(ue),this}removeClassName(ue){return this._container&&this._container.classList.remove(ue),this}setOffset(ue){return this.options.offset=ue,this._update(),this}toggleClassName(ue){if(this._container)return this._container.classList.toggle(ue)}setSubpixelPositioning(ue){this.options.subpixelPositioning=ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let ue=this._container.querySelector(Vc);ue&&ue.focus()}},i.RasterDEMTileSource=Zt,i.RasterTileSource=pt,i.ScaleControl=class{constructor(ue){this._onMove=()=>{Ac(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Ac(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xu),ue)}getDefaultPosition(){return"bottom-left"}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",ue.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Kr,i.Style=Ha,i.TerrainControl=class{constructor(ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=ue}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=c.create("button","maplibregl-ctrl-terrain",this._container),c.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=Bc,i.TwoFingersTouchRotateHandler=cf,i.TwoFingersTouchZoomHandler=vu,i.TwoFingersTouchZoomRotateHandler=Yi,i.VectorTileSource=ut,i.VideoSource=Nt,i.addSourceType=(ue,w)=>a._(void 0,void 0,void 0,function*(){if(wr(ue))throw new Error(`A source type called "${ue}" already exists.`);((B,Q)=>{sr[B]=Q})(ue,w)}),i.clearPrewarmedResources=function(){let ue=me;ue&&(ue.isPreloaded()&&ue.numActive()===1?(ue.release(_e),me=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return Qt().getRTLTextPluginStatus()},i.getVersion=function(){return Ku},i.getWorkerCount=function(){return Ee.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(ue){return Ae().broadcast("IS",ue)},i.prewarm=function(){Se().acquire(_e)},i.setMaxParallelImageRequests=function(ue){a.a.MAX_PARALLEL_IMAGE_REQUESTS=ue},i.setRTLTextPlugin=function(ue,w){return Qt().setRTLTextPlugin(ue,w)},i.setWorkerCount=function(ue){Ee.workerCount=ue},i.setWorkerUrl=function(ue){a.a.WORKER_URL=ue}});var n=e;return n})});var fje=ye((Ebr,cje)=>{"use strict";var aw=Dr(),AXt=ru().sanitizeHTML,SXt=SJ(),sje=wx();function lje(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=sje.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=lje.prototype;ag.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=c7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!c7(e)){var r=MXt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function uje(e){var t={},r={};switch(e.type){case"circle":aw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":aw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":aw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=SXt(n.textposition,n.iconsize);aw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),aw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":aw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function MXt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=AXt(e.sourceattribution)),n}cje.exports=function(t,r,n){var i=new lje(t,r);return i.update(n),i}});var _je=ye((kbr,yje)=>{"use strict";var PJ=oje(),IJ=Dr(),vje=ix(),hje=qa(),EXt=ho(),kXt=yv(),f7=vf(),pje=Eg(),CXt=pje.drawMode,LXt=pje.selectMode,PXt=Of().prepSelect,IXt=Of().clearOutline,RXt=Of().clearSelectionsCache,DXt=Of().selectOnClick,ow=wx(),FXt=fje();function gje(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Uh=gje.prototype;Uh.plot=function(e,t,r){var n=this,i;n.map?i=new Promise(function(a,o){n.updateMap(e,t,a,o)}):i=new Promise(function(a,o){n.createMap(e,t,a,o)}),r.push(i)};Uh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=mje(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new PJ.Map({container:i.div,style:o.style,center:RJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new PJ.AttributionControl({compact:!0})),c={};u.on("styleimagemissing",function(h){var d=h.id;if(!c[d]&&d.includes("-15")){c[d]=!0;var v=new Image(15,15);v.onload=function(){u.addImage(d,v)},v.crossOrigin="Anonymous",v.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),u.setTransformRequest(function(h){return h=h.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:h}}),u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(h){u.once("load",h)})),f=f.concat(vje.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Uh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=mje(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(vje.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Uh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&DXt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&f7.click(n,l.originalEvent)}}};Uh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=IJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),LXt(a)||CXt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){PXt(l,u,c,t.dragOptions,a)},kXt.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))};Uh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Uh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var DJ=Dr(),OXt=k_(),qXt=Yd(),xje=jk();bje.exports=function(t,r,n){OXt(t,r,n,{type:"map",attributes:xje,handleDefaults:BXt,partition:"y"})};function BXt(e,t,r){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var n=r("bounds.west"),i=r("bounds.east"),a=r("bounds.south"),o=r("bounds.north");(n===void 0||i===void 0||a===void 0||o===void 0)&&delete t.bounds,qXt(e,t,{name:"layers",handleItemDefaults:NXt}),t._input=e}function NXt(e,t){function r(l,u){return DJ.coerce(e,t,xje.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",DJ.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"),DJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var d7=ye(l0=>{"use strict";var h7=Dr(),Tje=h7.strTranslate,UXt=h7.strScale,VXt=Id().getSubplotCalcData,GXt=Wp(),HXt=Oa(),Aje=So(),jXt=ru(),WXt=_je(),Tx="map";l0.name=Tx;l0.attr="subplot";l0.idRoot=Tx;l0.idRegex=l0.attrRegex=h7.counterRegex(Tx);l0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};l0.layoutAttributes=jk();l0.supplyLayoutDefaults=wje();l0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[Tx],a=0;a_/2){var b=f.split("|").join("
");d.text(b).attr("data-unformatted",b).call(jXt.convertToTspans,e),v=Aje.bBox(d.node())}d.attr("transform",Tje(-3,-v.height+8)),h.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var p=1;v.width+6>_&&(p=_/(v.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",Tje(k[0],k[1])+UXt(p))}};l0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Tx],n=0;n{"use strict";Sje.exports={attributes:n7(),supplyDefaults:qHe(),colorbar:$d(),formatLabels:AJ(),calc:pF(),plot:$He(),hoverPoints:u7().hoverPoints,eventData:rje(),selectPoints:nje(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:d7(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var kje=ye((Ibr,Eje)=>{"use strict";Eje.exports=Mje()});var FJ=ye((Rbr,Cje)=>{"use strict";var d1=t5(),XXt=Tu(),{hovertemplateAttrs:ZXt,templatefallbackAttrs:YXt}=Ll(),KXt=Gl(),Ax=Ao().extendFlat;Cje.exports=Ax({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Ax({},d1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d1.text,hovertext:d1.hovertext,marker:{line:{color:Ax({},d1.marker.line.color,{editType:"plot"}),width:Ax({},d1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Ax({},d1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Ax({},d1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Ax({},d1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d1.hoverinfo,hovertemplate:ZXt({},{keys:["properties"]}),hovertemplatefallback:YXt(),showlegend:Ax({},KXt.showlegend,{dflt:!1})},XXt("",{cLetter:"z",editTypeOverride:"calc"}))});var Pje=ye((Dbr,Lje)=>{"use strict";var Yk=Dr(),JXt=Qh(),$Xt=FJ();Lje.exports=function(t,r,n,i){function a(c,f){return Yk.coerce(t,r,$Xt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!Yk.isArrayOrTypedArray(o)||!o.length||!Yk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||Yk.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"),JXt(t,r,i,a,{prefix:"",cLetter:"z"}),Yk.coerceSelectionMarkerOpacity(r,a)}});var zJ=ye((Fbr,Dje)=>{"use strict";var QXt=Eo(),v1=Dr(),eZt=tc(),tZt=So(),rZt=tx().makeBlank,Ije=ix();function iZt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:rZt()};if(!r)return a;var o=Ije.extractTraceFeature(e);if(!o)return a;var s=eZt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;v1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var E=k.mo;return QXt(E)?+v1.constrain(E,0,1):0});var f;v1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;v1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var zje=zJ().convert,nZt=zJ().convertOnSelect,Fje=wx().traceLayerPrefix;function Oje(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",Fje+t+"-fill"],["line",Fje+t+"-line"]],this.below=null}var L5=Oje.prototype;L5.update=function(e){this._update(zje(e)),e[0].trace._glTrace=this};L5.updateOnSelect=function(e){this._update(nZt(e))};L5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};L5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};qje.exports=function(t,r){var n=r[0].trace,i=new Oje(t,n.uid),a=i.sourceId,o=zje(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var Uje=ye((Obr,Nje)=>{"use strict";Nje.exports={attributes:FJ(),supplyDefaults:Pje(),colorbar:S_(),calc:zF(),plot:Bje(),hoverPoints:qF(),eventData:BF(),selectPoints:NF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";Vje.exports=Uje()});var qJ=ye((Bbr,jje)=>{"use strict";var aZt=Tu(),{hovertemplateAttrs:oZt,templatefallbackAttrs:sZt}=Ll(),Hje=Gl(),v7=n7(),OJ=Ao().extendFlat;jje.exports=OJ({lon:v7.lon,lat:v7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:v7.text,hovertext:v7.hovertext,hoverinfo:OJ({},Hje.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:oZt(),hovertemplatefallback:sZt(),showlegend:OJ({},Hje.showlegend,{dflt:!1})},aZt("",{cLetter:"z",editTypeOverride:"calc"}))});var Xje=ye((Nbr,Wje)=>{"use strict";var lZt=Dr(),uZt=Qh(),cZt=qJ();Wje.exports=function(t,r,n,i){function a(u,c){return lZt.coerce(t,r,cZt,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"),uZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var Kje=ye((Ubr,Yje)=>{"use strict";var BJ=Eo(),fZt=Dr().isArrayOrTypedArray,NJ=fs().BADNUM,hZt=gv(),Zje=Dr()._;Yje.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=fZt(a)&&a.length,s=0;s{"use strict";var dZt=Eo(),UJ=Dr(),Jje=ka(),$je=tc(),Qje=fs().BADNUM,vZt=tx().makeBlank;eWe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:vZt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=UJ.isArrayOrTypedArray(l)&&l.length,f=UJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=$je.extractOpts(r),p=b.reversescale?$je.flipScale(b.colorscale):b.colorscale,k=p[0][1],E=Jje.opacity(k)<1?k:Jje.addOpacity(k,0),S=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s{"use strict";var rWe=tWe(),pZt=wx().traceLayerPrefix;function iWe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",pZt+t+"-heatmap"]],this.below=null}var p7=iWe.prototype;p7.update=function(e){var t=this.subplot,r=this.layerList,n=rWe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};p7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};nWe.exports=function(t,r){var n=r[0].trace,i=new iWe(t,n.uid),a=i.sourceId,o=rWe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var sWe=ye((Hbr,oWe)=>{"use strict";var gZt=ho(),mZt=u7().hoverPoints,yZt=u7().getExtraText;oWe.exports=function(t,r,n){var i=mZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=gZt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=yZt(s,l,o[0].t.labels),[a]}}});var uWe=ye((jbr,lWe)=>{"use strict";lWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var fWe=ye((Wbr,cWe)=>{"use strict";cWe.exports={attributes:qJ(),supplyDefaults:Xje(),colorbar:S_(),formatLabels:AJ(),calc:Kje(),plot:aWe(),hoverPoints:sWe(),eventData:uWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";hWe.exports=fWe()});var GJ=ye((Ybr,yWe)=>{"use strict";var _Zt=ec(),xZt=Gl(),vWe=Lh(),VJ=a3(),bZt=Cc().attributes,{hovertemplateAttrs:pWe,templatefallbackAttrs:gWe}=Ll(),wZt=Tu(),TZt=vl().templatedArray,AZt=df().descriptionOnlyNumbers,mWe=Ao().extendFlat,SZt=mc().overrideAll,Zbr=yWe.exports=SZt({hoverinfo:mWe({},xZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:VJ.hoverlabel,domain:bZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:AZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:_Zt({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:vWe.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:VJ.hoverlabel,hovertemplate:pWe({},{keys:["value","label"]}),hovertemplatefallback:gWe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:vWe.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:VJ.hoverlabel,hovertemplate:pWe({},{keys:["value","label"]}),hovertemplatefallback:gWe(),colorscales:TZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:mWe(wZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var TWe=ye((Kbr,wWe)=>{"use strict";var P5=Dr(),g7=GJ(),MZt=ka(),_We=cd(),EZt=Cc().defaults,xWe=hM(),bWe=vl(),kZt=Yd();wWe.exports=function(t,r,n,i){function a(S,L){return P5.coerce(t,r,g7,S,L)}var o=P5.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=bWe.newContainer(r,"node");function u(S,L){return P5.coerce(s,l,g7.node,S,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),xWe(s,l,u,o),u("hovertemplate"),u("align");var c=i.colorway,f=function(S){return c[S%c.length]};u("color",l.label.map(function(S,L){return MZt.addOpacity(f(L),.8)})),u("customdata");var h=t.link||{},d=bWe.newContainer(r,"link");function v(S,L){return P5.coerce(h,d,g7.link,S,L)}v("label"),v("arrowlen"),v("source"),v("target"),v("value"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),xWe(h,d,v,o),v("hovertemplate");var _=_We(i.paper_bgcolor).getLuminance()<.333,b=_?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=v("color",b);function k(S){var L=_We(S);if(!L.isValid())return S;var x=L.getAlpha();return x<=.8?L.setAlpha(x+.2):L=_?L.brighten():L.darken(),L.toRgbString()}v("hovercolor",Array.isArray(p)?p.map(k):k(p)),v("customdata"),kZt(h,d,{name:"colorscales",handleItemDefaults:CZt}),EZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var E;l.x.length&&l.y.length&&(E="freeform"),a("arrangement",E),P5.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function CZt(e,t){function r(n,i){return P5.coerce(e,t,g7.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var HJ=ye((Jbr,AWe)=>{"use strict";AWe.exports=LZt;function LZt(e){for(var t=e.length,r=new Array(t),n=new Array(t),i=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){b=k[k.length-1];var E=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=S}else{if(n[b]===r[b]){for(var x=[],C=[],M=0,S=p.length-1;S>=0;--S){var g=p[S];if(i[g]=!1,x.push(g),C.push(s[g]),M+=s[g].length,o[g]=c.length,g===b){p.length=S;break}}c.push(x);for(var P=new Array(M),S=0;S{"use strict";var PZt=HJ(),I5=Dr(),IZt=Jm().wrap,Kk=I5.isArrayOrTypedArray,SWe=I5.isIndex,MWe=tc();function RZt(e){var t=e.node,r=e.link,n=[],i=Kk(r.color),a=Kk(r.hovercolor),o=Kk(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cv&&(v=r.source[c]),r.target[c]>v&&(v=r.target[c]);var _=v+1;e.node._count=_;var b,p=e.node.groups,k={};for(c=0;c0&&SWe(M,_)&&SWe(g,_)&&!(k.hasOwnProperty(M)&&k.hasOwnProperty(g)&&k[M]===k[g])){k.hasOwnProperty(g)&&(g=k[g]),k.hasOwnProperty(M)&&(M=k[M]),M=+M,g=+g,s[M]=s[g]=!0;var P="";r.label&&r.label[c]&&(P=r.label[c]);var T=null;P&&l.hasOwnProperty(P)&&(T=l[P]),n.push({pointNumber:c,label:P,color:i?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:T,source:M,target:g,value:+C}),x.source.push(M),x.target.push(g)}}var z=_+p.length,O=Kk(t.color),V=Kk(t.customdata),G=[];for(c=0;c_-1,childrenNodes:[],pointNumber:c,label:Z,color:O?t.color[c]:t.color,customdata:V?t.customdata[c]:t.customdata})}var j=!1;return DZt(z,x.source,x.target)&&(j=!0),{circular:j,links:n,nodes:G,groups:p,groupLookup:k}}function DZt(e,t,r){for(var n=I5.init2dArray(e,0),i=0;i1})}EWe.exports=function(t,r){var n=RZt(r);return IZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var LWe=ye((m7,CWe)=>{(function(e,t){typeof m7=="object"&&typeof CWe!="undefined"?t(m7):(e=e||self,t(e.d3=e.d3||{}))})(m7,function(e){"use strict";function t(C){var M=+this._x.call(null,C),g=+this._y.call(null,C);return r(this.cover(M,g),M,g,C)}function r(C,M,g,P){if(isNaN(M)||isNaN(g))return C;var T,z=C._root,O={data:P},V=C._x0,G=C._y0,Z=C._x1,j=C._y1,N,H,te,oe,_e,Ee,Ce,me;if(!z)return C._root=O,C;for(;z.length;)if((_e=M>=(N=(V+Z)/2))?V=N:Z=N,(Ee=g>=(H=(G+j)/2))?G=H:j=H,T=z,!(z=z[Ce=Ee<<1|_e]))return T[Ce]=O,C;if(te=+C._x.call(null,z.data),oe=+C._y.call(null,z.data),M===te&&g===oe)return O.next=z,T?T[Ce]=O:C._root=O,C;do T=T?T[Ce]=new Array(4):C._root=new Array(4),(_e=M>=(N=(V+Z)/2))?V=N:Z=N,(Ee=g>=(H=(G+j)/2))?G=H:j=H;while((Ce=Ee<<1|_e)===(me=(oe>=H)<<1|te>=N));return T[me]=z,T[Ce]=O,C}function n(C){var M,g,P=C.length,T,z,O=new Array(P),V=new Array(P),G=1/0,Z=1/0,j=-1/0,N=-1/0;for(g=0;gj&&(j=T),zN&&(N=z));if(G>j||Z>N)return this;for(this.cover(G,Z).cover(j,N),g=0;gC||C>=T||P>M||M>=z;)switch(Z=(Mj||(V=oe.y0)>N||(G=oe.x1)=Ce)<<1|C>=Ee)&&(oe=H[H.length-1],H[H.length-1]=H[H.length-1-_e],H[H.length-1-_e]=oe)}else{var me=C-+this._x.call(null,te.data),ie=M-+this._y.call(null,te.data),Se=me*me+ie*ie;if(Se=(H=(O+G)/2))?O=H:G=H,(_e=N>=(te=(V+Z)/2))?V=te:Z=te,M=g,!(g=g[Ee=_e<<1|oe]))return this;if(!g.length)break;(M[Ee+1&3]||M[Ee+2&3]||M[Ee+3&3])&&(P=M,Ce=Ee)}for(;g.data!==C;)if(T=g,!(g=g.next))return this;return(z=g.next)&&delete g.next,T?(z?T.next=z:delete T.next,this):M?(z?M[Ee]=z:delete M[Ee],(g=M[0]||M[1]||M[2]||M[3])&&g===(M[3]||M[2]||M[1]||M[0])&&!g.length&&(P?P[Ce]=g:this._root=g),this):(this._root=z,this)}function c(C){for(var M=0,g=C.length;M{(function(e,t){t(typeof y7=="object"&&typeof PWe!="undefined"?y7:e.d3=e.d3||{})})(y7,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(_){return t+_ in this},get:function(_){return this[t+_]},set:function(_,b){return this[t+_]=b,this},remove:function(_){var b=t+_;return b in this&&delete this[b]},clear:function(){for(var _ in this)_[0]===t&&delete this[_]},keys:function(){var _=[];for(var b in this)b[0]===t&&_.push(b.slice(1));return _},values:function(){var _=[];for(var b in this)b[0]===t&&_.push(this[b]);return _},entries:function(){var _=[];for(var b in this)b[0]===t&&_.push({key:b.slice(1),value:this[b]});return _},size:function(){var _=0;for(var b in this)b[0]===t&&++_;return _},empty:function(){for(var _ in this)if(_[0]===t)return!1;return!0},each:function(_){for(var b in this)b[0]===t&&_(this[b],b.slice(1),this)}};function n(_,b){var p=new r;if(_ instanceof r)_.each(function(x,C){p.set(C,x)});else if(Array.isArray(_)){var k=-1,E=_.length,S;if(b==null)for(;++k=_.length)return p!=null&&x.sort(p),k!=null?k(x):x;for(var P=-1,T=x.length,z=_[C++],O,V,G=n(),Z,j=M();++P_.length)return x;var M,g=b[C-1];return k!=null&&C>=_.length?M=x.entries():(M=[],x.each(function(P,T){M.push({key:T,values:L(P,C)})})),g!=null?M.sort(function(P,T){return g(P.key,T.key)}):M}return E={object:function(x){return S(x,0,a,o)},map:function(x){return S(x,0,s,l)},entries:function(x){return L(S(x,0,s,l),0)},key:function(x){return _.push(x),E},sortKeys:function(x){return b[_.length-1]=x,E},sortValues:function(x){return p=x,E},rollup:function(x){return k=x,E}}}function a(){return{}}function o(_,b,p){_[b]=p}function s(){return n()}function l(_,b,p){_.set(b,p)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(_){return _+="",this[t+_]=_,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(_,b){var p=new u;if(_ instanceof u)_.each(function(S){p.add(S)});else if(_){var k=-1,E=_.length;if(b==null)for(;++k{(function(e,t){typeof x7=="object"&&typeof IWe!="undefined"?t(x7):(e=e||self,t(e.d3=e.d3||{}))})(x7,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}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=i(s+"",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h0)for(var u=new Array(f),c=0,f,h;c{(function(e,t){typeof b7=="object"&&typeof DWe!="undefined"?t(b7):(e=e||self,t(e.d3=e.d3||{}))})(b7,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function v(){this._call=this._time=this._next=null}v.prototype=_.prototype={constructor:v,restart:function(C,M,g){if(typeof C!="function")throw new TypeError("callback is not a function");g=(g==null?h():+g)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=g,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};function _(C,M,g){var P=new v;return P.restart(C,M,g),P}function b(){h(),++t;for(var C=a,M;C;)(M=l-C._time)>=0&&C._call.call(null,M),C=C._next;--t}function p(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,E(),l=0}}function k(){var C=c.now(),M=C-s;M>i&&(u-=M,s=C)}function E(){for(var C,M=a,g,P=1/0;M;)M._call?(P>M._time&&(P=M._time),C=M,M=M._next):(g=M._next,M._next=null,M=C?C._next=g:a=g);o=C,S(P)}function S(C){if(!t){r&&(r=clearTimeout(r));var M=C-l;M>24?(C<1/0&&(r=setTimeout(p,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(k,i)),t=1,f(p))}}function L(C,M,g){var P=new v;return M=M==null?0:+M,P.restart(function(T){P.stop(),C(T+M)},M,g),P}function x(C,M,g){var P=new v,T=M;return M==null?(P.restart(C,M,g),P):(M=+M,g=g==null?h():+g,P.restart(function z(O){O+=T,P.restart(z,T+=M,g),C(O)},M,g),P)}e.interval=x,e.now=h,e.timeout=L,e.timer=_,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var OWe=ye((w7,zWe)=>{(function(e,t){typeof w7=="object"&&typeof zWe!="undefined"?t(w7,LWe(),_7(),RWe(),FWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(w7,function(e,t,r,n,i){"use strict";function a(C,M){var g;C==null&&(C=0),M==null&&(M=0);function P(){var T,z=g.length,O,V=0,G=0;for(T=0;TN.index){var Re=H-Fe.x-Fe.vx,ce=te-Fe.y-Fe.vy,Ze=Re*Re+ce*ce;ZeH+ge||Lete+ge||AeG.r&&(G.r=G[Z].r)}function V(){if(M){var G,Z=M.length,j;for(g=new Array(Z),G=0;G1?(_e==null?V.remove(oe):V.set(oe,te(_e)),M):V.get(oe)},find:function(oe,_e,Ee){var Ce=0,me=C.length,ie,Se,Le,Ae,Fe;for(Ee==null?Ee=1/0:Ee*=Ee,Ce=0;Ce1?(Z.on(oe,_e),M):Z.on(oe)}}}function E(){var C,M,g,P=o(-30),T,z=1,O=1/0,V=.81;function G(H){var te,oe=C.length,_e=t.quadtree(C,v,_).visitAfter(j);for(g=H,te=0;te=O)return;(H.data!==M||H.next)&&(Ee===0&&(Ee=s(),ie+=Ee*Ee),Ce===0&&(Ce=s(),ie+=Ce*Ce),ie{(function(e,t){typeof T7=="object"&&typeof qWe!="undefined"?t(T7):(e=e||self,t(e.d3=e.d3||{}))})(T7,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,v=u-s,_=c-l,b=h-s,p=d-l,k=b*b+p*p;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(k>n)if(!(Math.abs(p*v-_*b)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var E=u-h,S=c-d,L=v*v+_*_,x=E*E+S*S,C=Math.sqrt(L),M=Math.sqrt(k),g=f*Math.tan((t-Math.acos((L+k-x)/(2*C*M)))/2),P=g/M,T=g/C;Math.abs(P-1)>n&&(this._+="L"+(s+P*b)+","+(l+P*p)),this._+="A"+f+","+f+",0,0,"+ +(p*E>b*S)+","+(this._x1=s+T*v)+","+(this._y1=l+T*_)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),v=u*Math.sin(c),_=s+d,b=l+v,p=1^h,k=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+_+","+b:(Math.abs(this._x1-_)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+_+","+b),u&&(k<0&&(k=k%r+r),k>i?this._+="A"+u+","+u+",0,1,"+p+","+(s-d)+","+(l-v)+"A"+u+","+u+",0,1,"+p+","+(this._x1=_)+","+(this._y1=b):k>n&&(this._+="A"+u+","+u+",0,"+ +(k>=t)+","+p+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var jJ=ye((A7,NWe)=>{(function(e,t){typeof A7=="object"&&typeof NWe!="undefined"?t(A7,BWe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(A7,function(e,t){"use strict";function r(Mt){return function(){return Mt}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function v(Mt){return Mt>1?0:Mt<-1?f:Math.acos(Mt)}function _(Mt){return Mt>=1?h:Mt<=-1?-h:Math.asin(Mt)}function b(Mt){return Mt.innerRadius}function p(Mt){return Mt.outerRadius}function k(Mt){return Mt.startAngle}function E(Mt){return Mt.endAngle}function S(Mt){return Mt&&Mt.padAngle}function L(Mt,kr,Jr,vi,hn,An,Mn,Li){var _n=Jr-Mt,ya=vi-kr,Jn=Mn-hn,Ma=Li-An,_o=Ma*_n-Jn*ya;if(!(_o*_oZl*Zl+Su*Su&&(As=Ks,cl=zs),{cx:As,cy:cl,x01:-Jn,y01:-Ma,x11:As*(hn/zl-1),y11:cl*(hn/zl-1)}}function C(){var Mt=b,kr=p,Jr=r(0),vi=null,hn=k,An=E,Mn=S,Li=null;function _n(){var ya,Jn,Ma=+Mt.apply(this,arguments),_o=+kr.apply(this,arguments),No=hn.apply(this,arguments)-h,po=An.apply(this,arguments)-h,Lo=n(po-No),ko=po>No;if(Li||(Li=ya=t.path()),_oc))Li.moveTo(0,0);else if(Lo>d-c)Li.moveTo(_o*a(No),_o*l(No)),Li.arc(0,0,_o,No,po,!ko),Ma>c&&(Li.moveTo(Ma*a(po),Ma*l(po)),Li.arc(0,0,Ma,po,No,ko));else{var Ds=No,Fs=po,ll=No,ul=po,zl=Lo,us=Lo,il=Mn.apply(this,arguments)/2,As=il>c&&(vi?+vi.apply(this,arguments):u(Ma*Ma+_o*_o)),cl=s(n(_o-Ma)/2,+Jr.apply(this,arguments)),Ks=cl,zs=cl,Io,ls;if(As>c){var Zl=_(As/Ma*l(il)),Su=_(As/_o*l(il));(zl-=Zl*2)>c?(Zl*=ko?1:-1,ll+=Zl,ul-=Zl):(zl=0,ll=ul=(No+po)/2),(us-=Su*2)>c?(Su*=ko?1:-1,Ds+=Su,Fs-=Su):(us=0,Ds=Fs=(No+po)/2)}var nc=_o*a(Ds),bs=_o*l(Ds),Rn=Ma*a(ul),_a=Ma*l(ul);if(cl>c){var Vu=_o*a(Fs),Ol=_o*l(Fs),xo=Ma*a(ll),Yl=Ma*l(ll),Ns;if(Loc?zs>c?(Io=x(xo,Yl,nc,bs,_o,zs,ko),ls=x(Vu,Ol,Rn,_a,_o,zs,ko),Li.moveTo(Io.cx+Io.x01,Io.cy+Io.y01),zsc)||!(zl>c)?Li.lineTo(Rn,_a):Ks>c?(Io=x(Rn,_a,Vu,Ol,Ma,-Ks,ko),ls=x(nc,bs,xo,Yl,Ma,-Ks,ko),Li.lineTo(Io.cx+Io.x01,Io.cy+Io.y01),Ks=_o;--No)Li.point(Fs[No],ll[No]);Li.lineEnd(),Li.areaEnd()}ko&&(Fs[Ma]=+Mt(Lo,Ma,Jn),ll[Ma]=+Jr(Lo,Ma,Jn),Li.point(kr?+kr(Lo,Ma,Jn):Fs[Ma],vi?+vi(Lo,Ma,Jn):ll[Ma]))}if(Ds)return Li=null,Ds+""||null}function ya(){return z().defined(hn).curve(Mn).context(An)}return _n.x=function(Jn){return arguments.length?(Mt=typeof Jn=="function"?Jn:r(+Jn),kr=null,_n):Mt},_n.x0=function(Jn){return arguments.length?(Mt=typeof Jn=="function"?Jn:r(+Jn),_n):Mt},_n.x1=function(Jn){return arguments.length?(kr=Jn==null?null:typeof Jn=="function"?Jn:r(+Jn),_n):kr},_n.y=function(Jn){return arguments.length?(Jr=typeof Jn=="function"?Jn:r(+Jn),vi=null,_n):Jr},_n.y0=function(Jn){return arguments.length?(Jr=typeof Jn=="function"?Jn:r(+Jn),_n):Jr},_n.y1=function(Jn){return arguments.length?(vi=Jn==null?null:typeof Jn=="function"?Jn:r(+Jn),_n):vi},_n.lineX0=_n.lineY0=function(){return ya().x(Mt).y(Jr)},_n.lineY1=function(){return ya().x(Mt).y(vi)},_n.lineX1=function(){return ya().x(kr).y(Jr)},_n.defined=function(Jn){return arguments.length?(hn=typeof Jn=="function"?Jn:r(!!Jn),_n):hn},_n.curve=function(Jn){return arguments.length?(Mn=Jn,An!=null&&(Li=Mn(An)),_n):Mn},_n.context=function(Jn){return arguments.length?(Jn==null?An=Li=null:Li=Mn(An=Jn),_n):An},_n}function V(Mt,kr){return krMt?1:kr>=Mt?0:NaN}function G(Mt){return Mt}function Z(){var Mt=G,kr=V,Jr=null,vi=r(0),hn=r(d),An=r(0);function Mn(Li){var _n,ya=Li.length,Jn,Ma,_o=0,No=new Array(ya),po=new Array(ya),Lo=+vi.apply(this,arguments),ko=Math.min(d,Math.max(-d,hn.apply(this,arguments)-Lo)),Ds,Fs=Math.min(Math.abs(ko)/ya,An.apply(this,arguments)),ll=Fs*(ko<0?-1:1),ul;for(_n=0;_n0&&(_o+=ul);for(kr!=null?No.sort(function(zl,us){return kr(po[zl],po[us])}):Jr!=null&&No.sort(function(zl,us){return Jr(Li[zl],Li[us])}),_n=0,Ma=_o?(ko-ya*ll)/_o:0;_n0?ul*Ma:0)+ll,po[Jn]={data:Li[Jn],index:_n,value:ul,startAngle:Lo,endAngle:Ds,padAngle:Fs};return po}return Mn.value=function(Li){return arguments.length?(Mt=typeof Li=="function"?Li:r(+Li),Mn):Mt},Mn.sortValues=function(Li){return arguments.length?(kr=Li,Jr=null,Mn):kr},Mn.sort=function(Li){return arguments.length?(Jr=Li,kr=null,Mn):Jr},Mn.startAngle=function(Li){return arguments.length?(vi=typeof Li=="function"?Li:r(+Li),Mn):vi},Mn.endAngle=function(Li){return arguments.length?(hn=typeof Li=="function"?Li:r(+Li),Mn):hn},Mn.padAngle=function(Li){return arguments.length?(An=typeof Li=="function"?Li:r(+Li),Mn):An},Mn}var j=H(g);function N(Mt){this._curve=Mt}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Mt,kr){this._curve.point(kr*Math.sin(Mt),kr*-Math.cos(Mt))}};function H(Mt){function kr(Jr){return new N(Mt(Jr))}return kr._curve=Mt,kr}function te(Mt){var kr=Mt.curve;return Mt.angle=Mt.x,delete Mt.x,Mt.radius=Mt.y,delete Mt.y,Mt.curve=function(Jr){return arguments.length?kr(H(Jr)):kr()._curve},Mt}function oe(){return te(z().curve(j))}function _e(){var Mt=O().curve(j),kr=Mt.curve,Jr=Mt.lineX0,vi=Mt.lineX1,hn=Mt.lineY0,An=Mt.lineY1;return Mt.angle=Mt.x,delete Mt.x,Mt.startAngle=Mt.x0,delete Mt.x0,Mt.endAngle=Mt.x1,delete Mt.x1,Mt.radius=Mt.y,delete Mt.y,Mt.innerRadius=Mt.y0,delete Mt.y0,Mt.outerRadius=Mt.y1,delete Mt.y1,Mt.lineStartAngle=function(){return te(Jr())},delete Mt.lineX0,Mt.lineEndAngle=function(){return te(vi())},delete Mt.lineX1,Mt.lineInnerRadius=function(){return te(hn())},delete Mt.lineY0,Mt.lineOuterRadius=function(){return te(An())},delete Mt.lineY1,Mt.curve=function(Mn){return arguments.length?kr(H(Mn)):kr()._curve},Mt}function Ee(Mt,kr){return[(kr=+kr)*Math.cos(Mt-=Math.PI/2),kr*Math.sin(Mt)]}var Ce=Array.prototype.slice;function me(Mt){return Mt.source}function ie(Mt){return Mt.target}function Se(Mt){var kr=me,Jr=ie,vi=P,hn=T,An=null;function Mn(){var Li,_n=Ce.call(arguments),ya=kr.apply(this,_n),Jn=Jr.apply(this,_n);if(An||(An=Li=t.path()),Mt(An,+vi.apply(this,(_n[0]=ya,_n)),+hn.apply(this,_n),+vi.apply(this,(_n[0]=Jn,_n)),+hn.apply(this,_n)),Li)return An=null,Li+""||null}return Mn.source=function(Li){return arguments.length?(kr=Li,Mn):kr},Mn.target=function(Li){return arguments.length?(Jr=Li,Mn):Jr},Mn.x=function(Li){return arguments.length?(vi=typeof Li=="function"?Li:r(+Li),Mn):vi},Mn.y=function(Li){return arguments.length?(hn=typeof Li=="function"?Li:r(+Li),Mn):hn},Mn.context=function(Li){return arguments.length?(An=Li==null?null:Li,Mn):An},Mn}function Le(Mt,kr,Jr,vi,hn){Mt.moveTo(kr,Jr),Mt.bezierCurveTo(kr=(kr+vi)/2,Jr,kr,hn,vi,hn)}function Ae(Mt,kr,Jr,vi,hn){Mt.moveTo(kr,Jr),Mt.bezierCurveTo(kr,Jr=(Jr+hn)/2,vi,Jr,vi,hn)}function Fe(Mt,kr,Jr,vi,hn){var An=Ee(kr,Jr),Mn=Ee(kr,Jr=(Jr+hn)/2),Li=Ee(vi,Jr),_n=Ee(vi,hn);Mt.moveTo(An[0],An[1]),Mt.bezierCurveTo(Mn[0],Mn[1],Li[0],Li[1],_n[0],_n[1])}function Pe(){return Se(Le)}function ge(){return Se(Ae)}function Re(){var Mt=Se(Fe);return Mt.angle=Mt.x,delete Mt.x,Mt.radius=Mt.y,delete Mt.y,Mt}var ce={draw:function(Mt,kr){var Jr=Math.sqrt(kr/f);Mt.moveTo(Jr,0),Mt.arc(0,0,Jr,0,d)}},Ze={draw:function(Mt,kr){var Jr=Math.sqrt(kr/5)/2;Mt.moveTo(-3*Jr,-Jr),Mt.lineTo(-Jr,-Jr),Mt.lineTo(-Jr,-3*Jr),Mt.lineTo(Jr,-3*Jr),Mt.lineTo(Jr,-Jr),Mt.lineTo(3*Jr,-Jr),Mt.lineTo(3*Jr,Jr),Mt.lineTo(Jr,Jr),Mt.lineTo(Jr,3*Jr),Mt.lineTo(-Jr,3*Jr),Mt.lineTo(-Jr,Jr),Mt.lineTo(-3*Jr,Jr),Mt.closePath()}},ut=Math.sqrt(1/3),pt=ut*2,Zt={draw:function(Mt,kr){var Jr=Math.sqrt(kr/pt),vi=Jr*ut;Mt.moveTo(0,-Jr),Mt.lineTo(vi,0),Mt.lineTo(0,Jr),Mt.lineTo(-vi,0),Mt.closePath()}},st=.8908130915292852,lt=Math.sin(f/10)/Math.sin(7*f/10),Gt=Math.sin(d/10)*lt,Nt=-Math.cos(d/10)*lt,Jt={draw:function(Mt,kr){var Jr=Math.sqrt(kr*st),vi=Gt*Jr,hn=Nt*Jr;Mt.moveTo(0,-Jr),Mt.lineTo(vi,hn);for(var An=1;An<5;++An){var Mn=d*An/5,Li=Math.cos(Mn),_n=Math.sin(Mn);Mt.lineTo(_n*Jr,-Li*Jr),Mt.lineTo(Li*vi-_n*hn,_n*vi+Li*hn)}Mt.closePath()}},sr={draw:function(Mt,kr){var Jr=Math.sqrt(kr),vi=-Jr/2;Mt.rect(vi,vi,Jr,Jr)}},wr=Math.sqrt(3),cr={draw:function(Mt,kr){var Jr=-Math.sqrt(kr/(wr*3));Mt.moveTo(0,Jr*2),Mt.lineTo(-wr*Jr,-Jr),Mt.lineTo(wr*Jr,-Jr),Mt.closePath()}},$e=-.5,St=Math.sqrt(3)/2,Qt=1/Math.sqrt(12),Vt=(Qt/2+1)*3,_t={draw:function(Mt,kr){var Jr=Math.sqrt(kr/Vt),vi=Jr/2,hn=Jr*Qt,An=vi,Mn=Jr*Qt+Jr,Li=-An,_n=Mn;Mt.moveTo(vi,hn),Mt.lineTo(An,Mn),Mt.lineTo(Li,_n),Mt.lineTo($e*vi-St*hn,St*vi+$e*hn),Mt.lineTo($e*An-St*Mn,St*An+$e*Mn),Mt.lineTo($e*Li-St*_n,St*Li+$e*_n),Mt.lineTo($e*vi+St*hn,$e*hn-St*vi),Mt.lineTo($e*An+St*Mn,$e*Mn-St*An),Mt.lineTo($e*Li+St*_n,$e*_n-St*Li),Mt.closePath()}},It=[ce,Ze,Zt,sr,Jt,cr,_t];function mt(){var Mt=r(ce),kr=r(64),Jr=null;function vi(){var hn;if(Jr||(Jr=hn=t.path()),Mt.apply(this,arguments).draw(Jr,+kr.apply(this,arguments)),hn)return Jr=null,hn+""||null}return vi.type=function(hn){return arguments.length?(Mt=typeof hn=="function"?hn:r(hn),vi):Mt},vi.size=function(hn){return arguments.length?(kr=typeof hn=="function"?hn:r(+hn),vi):kr},vi.context=function(hn){return arguments.length?(Jr=hn==null?null:hn,vi):Jr},vi}function er(){}function lr(Mt,kr,Jr){Mt._context.bezierCurveTo((2*Mt._x0+Mt._x1)/3,(2*Mt._y0+Mt._y1)/3,(Mt._x0+2*Mt._x1)/3,(Mt._y0+2*Mt._y1)/3,(Mt._x0+4*Mt._x1+kr)/6,(Mt._y0+4*Mt._y1+Jr)/6)}function Tr(Mt){this._context=Mt}Tr.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:lr(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(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);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:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function Lr(Mt){return new Tr(Mt)}function ti(Mt){this._context=Mt}ti.prototype={areaStart:er,areaEnd:er,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(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._x2=Mt,this._y2=kr;break;case 1:this._point=2,this._x3=Mt,this._y3=kr;break;case 2:this._point=3,this._x4=Mt,this._y4=kr,this._context.moveTo((this._x0+4*this._x1+Mt)/6,(this._y0+4*this._y1+kr)/6);break;default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function Br(Mt){return new ti(Mt)}function Vr(Mt){this._context=Mt}Vr.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(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Jr=(this._x0+4*this._x1+Mt)/6,vi=(this._y0+4*this._y1+kr)/6;this._line?this._context.lineTo(Jr,vi):this._context.moveTo(Jr,vi);break;case 3:this._point=4;default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function dt(Mt){return new Vr(Mt)}function Ge(Mt,kr){this._basis=new Tr(Mt),this._beta=kr}Ge.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Mt=this._x,kr=this._y,Jr=Mt.length-1;if(Jr>0)for(var vi=Mt[0],hn=kr[0],An=Mt[Jr]-vi,Mn=kr[Jr]-hn,Li=-1,_n;++Li<=Jr;)_n=Li/Jr,this._basis.point(this._beta*Mt[Li]+(1-this._beta)*(vi+_n*An),this._beta*kr[Li]+(1-this._beta)*(hn+_n*Mn));this._x=this._y=null,this._basis.lineEnd()},point:function(Mt,kr){this._x.push(+Mt),this._y.push(+kr)}};var Je=function Mt(kr){function Jr(vi){return kr===1?new Tr(vi):new Ge(vi,kr)}return Jr.beta=function(vi){return Mt(+vi)},Jr}(.85);function je(Mt,kr,Jr){Mt._context.bezierCurveTo(Mt._x1+Mt._k*(Mt._x2-Mt._x0),Mt._y1+Mt._k*(Mt._y2-Mt._y0),Mt._x2+Mt._k*(Mt._x1-kr),Mt._y2+Mt._k*(Mt._y1-Jr),Mt._x2,Mt._y2)}function tt(Mt,kr){this._context=Mt,this._k=(1-kr)/6}tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:je(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2,this._x1=Mt,this._y1=kr;break;case 2:this._point=3;default:je(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var xt=function Mt(kr){function Jr(vi){return new tt(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function Ie(Mt,kr){this._context=Mt,this._k=(1-kr)/6}Ie.prototype={areaStart:er,areaEnd:er,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(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._x3=Mt,this._y3=kr;break;case 1:this._point=2,this._context.moveTo(this._x4=Mt,this._y4=kr);break;case 2:this._point=3,this._x5=Mt,this._y5=kr;break;default:je(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var xe=function Mt(kr){function Jr(vi){return new Ie(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function ke(Mt,kr){this._context=Mt,this._k=(1-kr)/6}ke.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(Mt,kr){switch(Mt=+Mt,kr=+kr,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:je(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var vt=function Mt(kr){function Jr(vi){return new ke(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function ir(Mt,kr,Jr){var vi=Mt._x1,hn=Mt._y1,An=Mt._x2,Mn=Mt._y2;if(Mt._l01_a>c){var Li=2*Mt._l01_2a+3*Mt._l01_a*Mt._l12_a+Mt._l12_2a,_n=3*Mt._l01_a*(Mt._l01_a+Mt._l12_a);vi=(vi*Li-Mt._x0*Mt._l12_2a+Mt._x2*Mt._l01_2a)/_n,hn=(hn*Li-Mt._y0*Mt._l12_2a+Mt._y2*Mt._l01_2a)/_n}if(Mt._l23_a>c){var ya=2*Mt._l23_2a+3*Mt._l23_a*Mt._l12_a+Mt._l12_2a,Jn=3*Mt._l23_a*(Mt._l23_a+Mt._l12_a);An=(An*ya+Mt._x1*Mt._l23_2a-kr*Mt._l12_2a)/Jn,Mn=(Mn*ya+Mt._y1*Mt._l23_2a-Jr*Mt._l12_2a)/Jn}Mt._context.bezierCurveTo(vi,hn,An,Mn,Mt._x2,Mt._y2)}function ar(Mt,kr){this._context=Mt,this._alpha=kr}ar.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(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3;default:ir(this,Mt,kr);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=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var vr=function Mt(kr){function Jr(vi){return kr?new ar(vi,kr):new tt(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function ii(Mt,kr){this._context=Mt,this._alpha=kr}ii.prototype={areaStart:er,areaEnd:er,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(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Mt,this._y3=kr;break;case 1:this._point=2,this._context.moveTo(this._x4=Mt,this._y4=kr);break;case 2:this._point=3,this._x5=Mt,this._y5=kr;break;default:ir(this,Mt,kr);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=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var pi=function Mt(kr){function Jr(vi){return kr?new ii(vi,kr):new Ie(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function $r(Mt,kr){this._context=Mt,this._alpha=kr}$r.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(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,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:ir(this,Mt,kr);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=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var di=function Mt(kr){function Jr(vi){return kr?new $r(vi,kr):new ke(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function ji(Mt){this._context=Mt}ji.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Mt,kr){Mt=+Mt,kr=+kr,this._point?this._context.lineTo(Mt,kr):(this._point=1,this._context.moveTo(Mt,kr))}};function In(Mt){return new ji(Mt)}function wi(Mt){return Mt<0?-1:1}function On(Mt,kr,Jr){var vi=Mt._x1-Mt._x0,hn=kr-Mt._x1,An=(Mt._y1-Mt._y0)/(vi||hn<0&&-0),Mn=(Jr-Mt._y1)/(hn||vi<0&&-0),Li=(An*hn+Mn*vi)/(vi+hn);return(wi(An)+wi(Mn))*Math.min(Math.abs(An),Math.abs(Mn),.5*Math.abs(Li))||0}function qn(Mt,kr){var Jr=Mt._x1-Mt._x0;return Jr?(3*(Mt._y1-Mt._y0)/Jr-kr)/2:kr}function Fn(Mt,kr,Jr){var vi=Mt._x0,hn=Mt._y0,An=Mt._x1,Mn=Mt._y1,Li=(An-vi)/3;Mt._context.bezierCurveTo(vi+Li,hn+Li*kr,An-Li,Mn-Li*Jr,An,Mn)}function ra(Mt){this._context=Mt}ra.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:Fn(this,this._t0,qn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){var Jr=NaN;if(Mt=+Mt,kr=+kr,!(Mt===this._x1&&kr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3,Fn(this,qn(this,Jr=On(this,Mt,kr)),Jr);break;default:Fn(this,this._t0,Jr=On(this,Mt,kr));break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr,this._t0=Jr}}};function la(Mt){this._context=new Ut(Mt)}(la.prototype=Object.create(ra.prototype)).point=function(Mt,kr){ra.prototype.point.call(this,kr,Mt)};function Ut(Mt){this._context=Mt}Ut.prototype={moveTo:function(Mt,kr){this._context.moveTo(kr,Mt)},closePath:function(){this._context.closePath()},lineTo:function(Mt,kr){this._context.lineTo(kr,Mt)},bezierCurveTo:function(Mt,kr,Jr,vi,hn,An){this._context.bezierCurveTo(kr,Mt,vi,Jr,An,hn)}};function wt(Mt){return new ra(Mt)}function rr(Mt){return new la(Mt)}function nr(Mt){this._context=Mt}nr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Mt=this._x,kr=this._y,Jr=Mt.length;if(Jr)if(this._line?this._context.lineTo(Mt[0],kr[0]):this._context.moveTo(Mt[0],kr[0]),Jr===2)this._context.lineTo(Mt[1],kr[1]);else for(var vi=Er(Mt),hn=Er(kr),An=0,Mn=1;Mn=0;--kr)hn[kr]=(Mn[kr]-hn[kr+1])/An[kr];for(An[Jr-1]=(Mt[Jr]+hn[Jr-1])/2,kr=0;kr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kr),this._context.lineTo(Mt,kr);else{var Jr=this._x*(1-this._t)+Mt*this._t;this._context.lineTo(Jr,this._y),this._context.lineTo(Jr,kr)}break}}this._x=Mt,this._y=kr}};function Qr(Mt){return new ri(Mt,.5)}function Oi(Mt){return new ri(Mt,0)}function $i(Mt){return new ri(Mt,1)}function tn(Mt,kr){if((Mn=Mt.length)>1)for(var Jr=1,vi,hn,An=Mt[kr[0]],Mn,Li=An.length;Jr=0;)Jr[kr]=kr;return Jr}function yn(Mt,kr){return Mt[kr]}function Sn(){var Mt=r([]),kr=fn,Jr=tn,vi=yn;function hn(An){var Mn=Mt.apply(this,arguments),Li,_n=An.length,ya=Mn.length,Jn=new Array(ya),Ma;for(Li=0;Li0){for(var Jr,vi,hn=0,An=Mt[0].length,Mn;hn0)for(var Jr,vi=0,hn,An,Mn,Li,_n,ya=Mt[kr[0]].length;vi0?(hn[0]=Mn,hn[1]=Mn+=An):An<0?(hn[1]=Li,hn[0]=Li+=An):(hn[0]=0,hn[1]=An)}function ma(Mt,kr){if((hn=Mt.length)>0){for(var Jr=0,vi=Mt[kr[0]],hn,An=vi.length;Jr0)||!((An=(hn=Mt[kr[0]]).length)>0))){for(var Jr=0,vi=1,hn,An,Mn;viAn&&(An=hn,Jr=kr);return Jr}function da(Mt){var kr=Mt.map(Wn);return fn(Mt).sort(function(Jr,vi){return kr[Jr]-kr[vi]})}function Wn(Mt){for(var kr=0,Jr=-1,vi=Mt.length,hn;++Jr{(function(e,t){typeof S7=="object"&&typeof UWe!="undefined"?t(S7,nk(),_7(),jJ()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(S7,function(e,t,r,n){"use strict";function i(g){return g.target.depth}function a(g){return g.depth}function o(g,P){return P-1-g.height}function s(g,P){return g.sourceLinks.length?g.depth:P-1}function l(g){return g.targetLinks.length?g.depth:g.sourceLinks.length?t.min(g.sourceLinks,i)-1:0}function u(g){return function(){return g}}function c(g,P){return h(g.source,P.source)||g.index-P.index}function f(g,P){return h(g.target,P.target)||g.index-P.index}function h(g,P){return g.y0-P.y0}function d(g){return g.value}function v(g){return(g.y0+g.y1)/2}function _(g){return v(g.source)*g.value}function b(g){return v(g.target)*g.value}function p(g){return g.index}function k(g){return g.nodes}function E(g){return g.links}function S(g,P){var T=g.get(P);if(!T)throw new Error("missing: "+P);return T}var L=function(){var g=0,P=0,T=1,z=1,O=24,V=8,G=p,Z=s,j=k,N=E,H=32,te=2/3;function oe(){var Se={nodes:j.apply(null,arguments),links:N.apply(null,arguments)};return _e(Se),Ee(Se),Ce(Se),me(Se,H),ie(Se),Se}oe.update=function(Se){return ie(Se),Se},oe.nodeId=function(Se){return arguments.length?(G=typeof Se=="function"?Se:u(Se),oe):G},oe.nodeAlign=function(Se){return arguments.length?(Z=typeof Se=="function"?Se:u(Se),oe):Z},oe.nodeWidth=function(Se){return arguments.length?(O=+Se,oe):O},oe.nodePadding=function(Se){return arguments.length?(V=+Se,oe):V},oe.nodes=function(Se){return arguments.length?(j=typeof Se=="function"?Se:u(Se),oe):j},oe.links=function(Se){return arguments.length?(N=typeof Se=="function"?Se:u(Se),oe):N},oe.size=function(Se){return arguments.length?(g=P=0,T=+Se[0],z=+Se[1],oe):[T-g,z-P]},oe.extent=function(Se){return arguments.length?(g=+Se[0][0],T=+Se[1][0],P=+Se[0][1],z=+Se[1][1],oe):[[g,P],[T,z]]},oe.iterations=function(Se){return arguments.length?(H=+Se,oe):H};function _e(Se){Se.nodes.forEach(function(Ae,Fe){Ae.index=Fe,Ae.sourceLinks=[],Ae.targetLinks=[]});var Le=r.map(Se.nodes,G);Se.links.forEach(function(Ae,Fe){Ae.index=Fe;var Pe=Ae.source,ge=Ae.target;typeof Pe!="object"&&(Pe=Ae.source=S(Le,Pe)),typeof ge!="object"&&(ge=Ae.target=S(Le,ge)),Pe.sourceLinks.push(Ae),ge.targetLinks.push(Ae)})}function Ee(Se){Se.nodes.forEach(function(Le){Le.value=Math.max(t.sum(Le.sourceLinks,d),t.sum(Le.targetLinks,d))})}function Ce(Se){var Le,Ae,Fe;for(Le=Se.nodes,Ae=[],Fe=0;Le.length;++Fe,Le=Ae,Ae=[])Le.forEach(function(ge){ge.depth=Fe,ge.sourceLinks.forEach(function(Re){Ae.indexOf(Re.target)<0&&Ae.push(Re.target)})});for(Le=Se.nodes,Ae=[],Fe=0;Le.length;++Fe,Le=Ae,Ae=[])Le.forEach(function(ge){ge.height=Fe,ge.targetLinks.forEach(function(Re){Ae.indexOf(Re.source)<0&&Ae.push(Re.source)})});var Pe=(T-g-O)/(Fe-1);Se.nodes.forEach(function(ge){ge.x1=(ge.x0=g+Math.max(0,Math.min(Fe-1,Math.floor(Z.call(null,ge,Fe))))*Pe)+O})}function me(Se){var Le=r.nest().key(function(Ze){return Ze.x0}).sortKeys(t.ascending).entries(Se.nodes).map(function(Ze){return Ze.values});Pe(),ce();for(var Ae=1,Fe=H;Fe>0;--Fe)Re(Ae*=.99),ce(),ge(Ae),ce();function Pe(){var Ze=t.max(Le,function(Zt){return Zt.length}),ut=te*(z-P)/(Ze-1);V>ut&&(V=ut);var pt=t.min(Le,function(Zt){return(z-P-(Zt.length-1)*V)/t.sum(Zt,d)});Le.forEach(function(Zt){Zt.forEach(function(st,lt){st.y1=(st.y0=lt)+st.value*pt})}),Se.links.forEach(function(Zt){Zt.width=Zt.value*pt})}function ge(Ze){Le.forEach(function(ut){ut.forEach(function(pt){if(pt.targetLinks.length){var Zt=(t.sum(pt.targetLinks,_)/t.sum(pt.targetLinks,d)-v(pt))*Ze;pt.y0+=Zt,pt.y1+=Zt}})})}function Re(Ze){Le.slice().reverse().forEach(function(ut){ut.forEach(function(pt){if(pt.sourceLinks.length){var Zt=(t.sum(pt.sourceLinks,b)/t.sum(pt.sourceLinks,d)-v(pt))*Ze;pt.y0+=Zt,pt.y1+=Zt}})})}function ce(){Le.forEach(function(Ze){var ut,pt,Zt=P,st=Ze.length,lt;for(Ze.sort(h),lt=0;lt0&&(ut.y0+=pt,ut.y1+=pt),Zt=ut.y1+V;if(pt=Zt-V-z,pt>0)for(Zt=ut.y0-=pt,ut.y1-=pt,lt=st-2;lt>=0;--lt)ut=Ze[lt],pt=ut.y1+V-Zt,pt>0&&(ut.y0-=pt,ut.y1-=pt),Zt=ut.y0})}}function ie(Se){Se.nodes.forEach(function(Le){Le.sourceLinks.sort(f),Le.targetLinks.sort(c)}),Se.nodes.forEach(function(Le){var Ae=Le.y0,Fe=Ae;Le.sourceLinks.forEach(function(Pe){Pe.y0=Ae+Pe.width/2,Ae+=Pe.width}),Le.targetLinks.forEach(function(Pe){Pe.y1=Fe+Pe.width/2,Fe+=Pe.width})})}return oe};function x(g){return[g.source.x1,g.y0]}function C(g){return[g.target.x0,g.y1]}var M=function(){return n.linkHorizontal().source(x).target(C)};e.sankey=L,e.sankeyCenter=l,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=M,Object.defineProperty(e,"__esModule",{value:!0})})});var HWe=ye((Qbr,GWe)=>{var FZt=HJ();GWe.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(E){a[E]=!1,o.hasOwnProperty(E)&&Object.keys(o[E]).forEach(function(S){delete o[E][S],a[S]&&u(S)})}function c(E){var S=!1;i.push(E),a[E]=!0;var L,x;for(L=0;L=E})}function d(E){h(E);for(var S=t,L=FZt(S),x=L.components.filter(function(O){return O.length>1}),C=1/0,M,g=0;g{(function(e,t){typeof M7=="object"&&typeof jWe!="undefined"?t(M7,nk(),_7(),jJ(),HWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(M7,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(st){return st.target.depth}function o(st){return st.depth}function s(st,lt){return lt-1-st.height}function l(st,lt){return st.sourceLinks.length?st.depth:lt-1}function u(st){return st.targetLinks.length?st.depth:st.sourceLinks.length?t.min(st.sourceLinks,a)-1:0}function c(st){return function(){return st}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st};function h(st,lt){return v(st.source,lt.source)||st.index-lt.index}function d(st,lt){return v(st.target,lt.target)||st.index-lt.index}function v(st,lt){return st.partOfCycle===lt.partOfCycle?st.y0-lt.y0:st.circularLinkType==="top"||lt.circularLinkType==="bottom"?-1:1}function _(st){return st.value}function b(st){return(st.y0+st.y1)/2}function p(st){return b(st.source)}function k(st){return b(st.target)}function E(st){return st.index}function S(st){return st.nodes}function L(st){return st.links}function x(st,lt){var Gt=st.get(lt);if(!Gt)throw new Error("missing: "+lt);return Gt}function C(st,lt){return lt(st)}var M=25,g=10,P=.3;function T(){var st=0,lt=0,Gt=1,Nt=1,Jt=24,sr,wr=E,cr=l,$e=S,St=L,Qt=32,Vt=2,_t,It=null;function mt(){var dt={nodes:$e.apply(null,arguments),links:St.apply(null,arguments)};er(dt),z(dt,wr,It),lr(dt),ti(dt),O(dt,wr),Br(dt,Qt,wr),Vr(dt);for(var Ge=4,Je=0;Je0?Ge+M+g:Ge,Je=Je>0?Je+M+g:Je,je=je>0?je+M+g:je,tt=tt>0?tt+M+g:tt,{top:Ge,bottom:Je,left:tt,right:je}}function Lr(dt,Ge){var Je=t.max(dt.nodes,function(vt){return vt.column}),je=Gt-st,tt=Nt-lt,xt=je+Ge.right+Ge.left,Ie=tt+Ge.top+Ge.bottom,xe=je/xt,ke=tt/Ie;return st=st*xe+Ge.left,Gt=Ge.right==0?Gt:Gt*xe,lt=lt*ke+Ge.top,Nt=Nt*ke,dt.nodes.forEach(function(vt){vt.x0=st+vt.column*((Gt-st-Jt)/Je),vt.x1=vt.x0+Jt}),ke}function ti(dt){var Ge,Je,je;for(Ge=dt.nodes,Je=[],je=0;Ge.length;++je,Ge=Je,Je=[])Ge.forEach(function(tt){tt.depth=je,tt.sourceLinks.forEach(function(xt){Je.indexOf(xt.target)<0&&!xt.circular&&Je.push(xt.target)})});for(Ge=dt.nodes,Je=[],je=0;Ge.length;++je,Ge=Je,Je=[])Ge.forEach(function(tt){tt.height=je,tt.targetLinks.forEach(function(xt){Je.indexOf(xt.source)<0&&!xt.circular&&Je.push(xt.source)})});dt.nodes.forEach(function(tt){tt.column=Math.floor(cr.call(null,tt,je))})}function Br(dt,Ge,Je){var je=r.nest().key(function(vt){return vt.column}).sortKeys(t.ascending).entries(dt.nodes).map(function(vt){return vt.values});Ie(Je),ke();for(var tt=1,xt=Ge;xt>0;--xt)xe(tt*=.99,Je),ke();function Ie(vt){if(_t){var ir=1/0;je.forEach(function(pi){var $r=Nt*_t/(pi.length+1);ir=$r0))if(pi==0&&ii==1)di=$r.y1-$r.y0,$r.y0=Nt/2-di/2,$r.y1=Nt/2+di/2;else if(pi==ar-1&&ii==1)di=$r.y1-$r.y0,$r.y0=Nt/2-di/2,$r.y1=Nt/2+di/2;else{var ji=0,In=t.mean($r.sourceLinks,k),wi=t.mean($r.targetLinks,p);In&&wi?ji=(In+wi)/2:ji=In||wi;var On=(ji-b($r))*vt;$r.y0+=On,$r.y1+=On}})})}function ke(){je.forEach(function(vt){var ir,ar,vr=lt,ii=vt.length,pi;for(vt.sort(v),pi=0;pi0&&(ir.y0+=ar,ir.y1+=ar),vr=ir.y1+sr;if(ar=vr-sr-Nt,ar>0)for(vr=ir.y0-=ar,ir.y1-=ar,pi=ii-2;pi>=0;--pi)ir=vt[pi],ar=ir.y1+sr-vr,ar>0&&(ir.y0-=ar,ir.y1-=ar),vr=ir.y0})}}function Vr(dt){dt.nodes.forEach(function(Ge){Ge.sourceLinks.sort(d),Ge.targetLinks.sort(h)}),dt.nodes.forEach(function(Ge){var Je=Ge.y0,je=Je,tt=Ge.y1,xt=tt;Ge.sourceLinks.forEach(function(Ie){Ie.circular?(Ie.y0=tt-Ie.width/2,tt=tt-Ie.width):(Ie.y0=Je+Ie.width/2,Je+=Ie.width)}),Ge.targetLinks.forEach(function(Ie){Ie.circular?(Ie.y1=xt-Ie.width/2,xt=xt-Ie.width):(Ie.y1=je+Ie.width/2,je+=Ie.width)})})}return mt}function z(st,lt,Gt){var Nt=0;if(Gt===null){for(var Jt=[],sr=0;srlt.source.column)}function Z(st,lt){var Gt=0;st.sourceLinks.forEach(function(Jt){Gt=Jt.circular&&!pt(Jt,lt)?Gt+1:Gt});var Nt=0;return st.targetLinks.forEach(function(Jt){Nt=Jt.circular&&!pt(Jt,lt)?Nt+1:Nt}),Gt+Nt}function j(st){var lt=st.source.sourceLinks,Gt=0;lt.forEach(function(sr){Gt=sr.circular?Gt+1:Gt});var Nt=st.target.targetLinks,Jt=0;return Nt.forEach(function(sr){Jt=sr.circular?Jt+1:Jt}),!(Gt>1||Jt>1)}function N(st,lt,Gt){return st.sort(oe),st.forEach(function(Nt,Jt){var sr=0;if(pt(Nt,Gt)&&j(Nt))Nt.circularPathData.verticalBuffer=sr+Nt.width/2;else{var wr=0;for(wr;wrsr?cr:sr}Nt.circularPathData.verticalBuffer=sr+Nt.width/2}}),st}function H(st,lt,Gt,Nt){var Jt=5,sr=t.min(st.links,function($e){return $e.source.y0});st.links.forEach(function($e){$e.circular&&($e.circularPathData={})});var wr=st.links.filter(function($e){return $e.circularLinkType=="top"});N(wr,lt,Nt);var cr=st.links.filter(function($e){return $e.circularLinkType=="bottom"});N(cr,lt,Nt),st.links.forEach(function($e){if($e.circular){if($e.circularPathData.arcRadius=$e.width+g,$e.circularPathData.leftNodeBuffer=Jt,$e.circularPathData.rightNodeBuffer=Jt,$e.circularPathData.sourceWidth=$e.source.x1-$e.source.x0,$e.circularPathData.sourceX=$e.source.x0+$e.circularPathData.sourceWidth,$e.circularPathData.targetX=$e.target.x0,$e.circularPathData.sourceY=$e.y0,$e.circularPathData.targetY=$e.y1,pt($e,Nt)&&j($e))$e.circularPathData.leftSmallArcRadius=g+$e.width/2,$e.circularPathData.leftLargeArcRadius=g+$e.width/2,$e.circularPathData.rightSmallArcRadius=g+$e.width/2,$e.circularPathData.rightLargeArcRadius=g+$e.width/2,$e.circularLinkType=="bottom"?($e.circularPathData.verticalFullExtent=$e.source.y1+M+$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.rightLargeArcRadius):($e.circularPathData.verticalFullExtent=$e.source.y0-M-$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.rightLargeArcRadius);else{var St=$e.source.column,Qt=$e.circularLinkType,Vt=st.links.filter(function(mt){return mt.source.column==St&&mt.circularLinkType==Qt});$e.circularLinkType=="bottom"?Vt.sort(Ee):Vt.sort(_e);var _t=0;Vt.forEach(function(mt,er){mt.circularLinkID==$e.circularLinkID&&($e.circularPathData.leftSmallArcRadius=g+$e.width/2+_t,$e.circularPathData.leftLargeArcRadius=g+$e.width/2+er*lt+_t),_t=_t+mt.width}),St=$e.target.column,Vt=st.links.filter(function(mt){return mt.target.column==St&&mt.circularLinkType==Qt}),$e.circularLinkType=="bottom"?Vt.sort(me):Vt.sort(Ce),_t=0,Vt.forEach(function(mt,er){mt.circularLinkID==$e.circularLinkID&&($e.circularPathData.rightSmallArcRadius=g+$e.width/2+_t,$e.circularPathData.rightLargeArcRadius=g+$e.width/2+er*lt+_t),_t=_t+mt.width}),$e.circularLinkType=="bottom"?($e.circularPathData.verticalFullExtent=Math.max(Gt,$e.source.y1,$e.target.y1)+M+$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.rightLargeArcRadius):($e.circularPathData.verticalFullExtent=sr-M-$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.rightLargeArcRadius)}$e.circularPathData.leftInnerExtent=$e.circularPathData.sourceX+$e.circularPathData.leftNodeBuffer,$e.circularPathData.rightInnerExtent=$e.circularPathData.targetX-$e.circularPathData.rightNodeBuffer,$e.circularPathData.leftFullExtent=$e.circularPathData.sourceX+$e.circularPathData.leftLargeArcRadius+$e.circularPathData.leftNodeBuffer,$e.circularPathData.rightFullExtent=$e.circularPathData.targetX-$e.circularPathData.rightLargeArcRadius-$e.circularPathData.rightNodeBuffer}if($e.circular)$e.path=te($e);else{var It=n.linkHorizontal().source(function(mt){var er=mt.source.x0+(mt.source.x1-mt.source.x0),lr=mt.y0;return[er,lr]}).target(function(mt){var er=mt.target.x0,lr=mt.y1;return[er,lr]});$e.path=It($e)}})}function te(st){var lt="";return st.circularLinkType=="top"?lt="M"+st.circularPathData.sourceX+" "+st.circularPathData.sourceY+" L"+st.circularPathData.leftInnerExtent+" "+st.circularPathData.sourceY+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftSmallArcRadius+" 0 0 0 "+st.circularPathData.leftFullExtent+" "+(st.circularPathData.sourceY-st.circularPathData.leftSmallArcRadius)+" L"+st.circularPathData.leftFullExtent+" "+st.circularPathData.verticalLeftInnerExtent+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftLargeArcRadius+" 0 0 0 "+st.circularPathData.leftInnerExtent+" "+st.circularPathData.verticalFullExtent+" L"+st.circularPathData.rightInnerExtent+" "+st.circularPathData.verticalFullExtent+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightLargeArcRadius+" 0 0 0 "+st.circularPathData.rightFullExtent+" "+st.circularPathData.verticalRightInnerExtent+" L"+st.circularPathData.rightFullExtent+" "+(st.circularPathData.targetY-st.circularPathData.rightSmallArcRadius)+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightSmallArcRadius+" 0 0 0 "+st.circularPathData.rightInnerExtent+" "+st.circularPathData.targetY+" L"+st.circularPathData.targetX+" "+st.circularPathData.targetY:lt="M"+st.circularPathData.sourceX+" "+st.circularPathData.sourceY+" L"+st.circularPathData.leftInnerExtent+" "+st.circularPathData.sourceY+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftSmallArcRadius+" 0 0 1 "+st.circularPathData.leftFullExtent+" "+(st.circularPathData.sourceY+st.circularPathData.leftSmallArcRadius)+" L"+st.circularPathData.leftFullExtent+" "+st.circularPathData.verticalLeftInnerExtent+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftLargeArcRadius+" 0 0 1 "+st.circularPathData.leftInnerExtent+" "+st.circularPathData.verticalFullExtent+" L"+st.circularPathData.rightInnerExtent+" "+st.circularPathData.verticalFullExtent+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightLargeArcRadius+" 0 0 1 "+st.circularPathData.rightFullExtent+" "+st.circularPathData.verticalRightInnerExtent+" L"+st.circularPathData.rightFullExtent+" "+(st.circularPathData.targetY+st.circularPathData.rightSmallArcRadius)+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightSmallArcRadius+" 0 0 1 "+st.circularPathData.rightInnerExtent+" "+st.circularPathData.targetY+" L"+st.circularPathData.targetX+" "+st.circularPathData.targetY,lt}function oe(st,lt){return ie(st)==ie(lt)?st.circularLinkType=="bottom"?Ee(st,lt):_e(st,lt):ie(lt)-ie(st)}function _e(st,lt){return st.y0-lt.y0}function Ee(st,lt){return lt.y0-st.y0}function Ce(st,lt){return st.y1-lt.y1}function me(st,lt){return lt.y1-st.y1}function ie(st){return st.target.column-st.source.column}function Se(st){return st.target.x0-st.source.x1}function Le(st,lt){var Gt=V(st),Nt=Se(lt)/Math.tan(Gt),Jt=ut(st)=="up"?st.y1+Nt:st.y1-Nt;return Jt}function Ae(st,lt){var Gt=V(st),Nt=Se(lt)/Math.tan(Gt),Jt=ut(st)=="up"?st.y1-Nt:st.y1+Nt;return Jt}function Fe(st,lt,Gt,Nt){st.links.forEach(function(Jt){if(!Jt.circular&&Jt.target.column-Jt.source.column>1){var sr=Jt.source.column+1,wr=Jt.target.column-1,cr=1,$e=wr-sr+1;for(cr=1;sr<=wr;sr++,cr++)st.nodes.forEach(function(St){if(St.column==sr){var Qt=cr/($e+1),Vt=Math.pow(1-Qt,3),_t=3*Qt*Math.pow(1-Qt,2),It=3*Math.pow(Qt,2)*(1-Qt),mt=Math.pow(Qt,3),er=Vt*Jt.y0+_t*Jt.y0+It*Jt.y1+mt*Jt.y1,lr=er-Jt.width/2,Tr=er+Jt.width/2,Lr;lr>St.y0&&lrSt.y0&&TrSt.y1&&ge(ti,Lr,lt,Gt)})):lrSt.y1&&(Lr=Tr-St.y0+10,St=ge(St,Lr,lt,Gt),st.nodes.forEach(function(ti){C(ti,Nt)==C(St,Nt)||ti.column!=St.column||ti.y0St.y1&&ge(ti,Lr,lt,Gt)}))}})}})}function Pe(st,lt){return st.y0>lt.y0&&st.y0lt.y0&&st.y1lt.y1}function ge(st,lt,Gt,Nt){return st.y0+lt>=Gt&&st.y1+lt<=Nt&&(st.y0=st.y0+lt,st.y1=st.y1+lt,st.targetLinks.forEach(function(Jt){Jt.y1=Jt.y1+lt}),st.sourceLinks.forEach(function(Jt){Jt.y0=Jt.y0+lt})),st}function Re(st,lt,Gt,Nt){st.nodes.forEach(function(Jt){Nt&&Jt.y+(Jt.y1-Jt.y0)>lt&&(Jt.y=Jt.y-(Jt.y+(Jt.y1-Jt.y0)-lt));var sr=st.links.filter(function($e){return C($e.source,Gt)==C(Jt,Gt)}),wr=sr.length;wr>1&&sr.sort(function($e,St){if(!$e.circular&&!St.circular){if($e.target.column==St.target.column)return $e.y1-St.y1;if(Ze($e,St)){if($e.target.column>St.target.column){var Qt=Ae(St,$e);return $e.y1-Qt}if(St.target.column>$e.target.column){var Vt=Ae($e,St);return Vt-St.y1}}else return $e.y1-St.y1}if($e.circular&&!St.circular)return $e.circularLinkType=="top"?-1:1;if(St.circular&&!$e.circular)return St.circularLinkType=="top"?1:-1;if($e.circular&&St.circular)return $e.circularLinkType===St.circularLinkType&&$e.circularLinkType=="top"?$e.target.column===St.target.column?$e.target.y1-St.target.y1:St.target.column-$e.target.column:$e.circularLinkType===St.circularLinkType&&$e.circularLinkType=="bottom"?$e.target.column===St.target.column?St.target.y1-$e.target.y1:$e.target.column-St.target.column:$e.circularLinkType=="top"?-1:1});var cr=Jt.y0;sr.forEach(function($e){$e.y0=cr+$e.width/2,cr=cr+$e.width}),sr.forEach(function($e,St){if($e.circularLinkType=="bottom"){var Qt=St+1,Vt=0;for(Qt;Qt1&&Jt.sort(function(cr,$e){if(!cr.circular&&!$e.circular){if(cr.source.column==$e.source.column)return cr.y0-$e.y0;if(Ze(cr,$e)){if($e.source.column0?"up":"down"}function pt(st,lt){return C(st.source,lt)==C(st.target,lt)}function Zt(st,lt,Gt){var Nt=st.nodes,Jt=st.links,sr=!1,wr=!1;if(Jt.forEach(function(_t){_t.circularLinkType=="top"?sr=!0:_t.circularLinkType=="bottom"&&(wr=!0)}),sr==!1||wr==!1){var cr=t.min(Nt,function(_t){return _t.y0}),$e=t.max(Nt,function(_t){return _t.y1}),St=$e-cr,Qt=Gt-lt,Vt=Qt/St;Nt.forEach(function(_t){var It=(_t.y1-_t.y0)*Vt;_t.y0=(_t.y0-cr)*Vt,_t.y1=_t.y0+It}),Jt.forEach(function(_t){_t.y0=(_t.y0-cr)*Vt,_t.y1=(_t.y1-cr)*Vt,_t.width=_t.width*Vt})}}e.sankeyCircular=T,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})})});var WJ=ye((e2r,XWe)=>{"use strict";XWe.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}});var oXe=ye((t2r,aXe)=>{"use strict";var ZWe=OWe(),zZt=(F2(),ob(D2)).interpolateNumber,R5=Oa(),Jk=VWe(),OZt=WWe(),Nu=WJ(),D5=cd(),sw=ka(),qZt=So(),p1=Dr(),YJ=p1.strTranslate,BZt=p1.strRotate,KJ=Jm(),$k=KJ.keyFun,E7=KJ.repeat,eXe=KJ.unwrap,YWe=ru(),NZt=qa(),tXe=$h(),UZt=tXe.CAP_SHIFT,VZt=tXe.LINE_SPACING,GZt=3;function HZt(e,t,r){var n=eXe(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,l=i.node.thickness,u={justify:Jk.sankeyJustify,left:Jk.sankeyLeft,right:Jk.sankeyRight,center:Jk.sankeyCenter}[i.node.align],c=e.width*(a.x[1]-a.x[0]),f=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,v=n.circular,_;v?_=OZt.sankeyCircular().circularLinkGap(0):_=Jk.sankey(),_.iterations(Nu.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(V){return V.pointNumber}).nodeAlign(u).nodes(h).links(d);var b=_();_.nodePadding()=N||(j=N-Z.y0,j>1e-6&&(Z.y0+=j,Z.y1+=j)),N=Z.y1+s})}function P(V){var G=V.map(function(_e,Ee){return{x0:_e.x0,index:Ee}}).sort(function(_e,Ee){return _e.x0-Ee.x0}),Z=[],j=-1,N,H=-1/0,te;for(p=0;pH+l&&(j+=1,N=oe.x0),H=oe.x0,Z[j]||(Z[j]=[]),Z[j].push(oe),te=N-oe.x0,oe.x0+=te,oe.x1+=te}return Z}if(i.node.x.length&&i.node.y.length){for(p=0;p0?" L "+i.targetX+" "+i.targetY:"")+"Z"):(r="M "+(i.targetX-t)+" "+(i.targetY-n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-n-t)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:a?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.leftInnerExtent+" "+(i.sourceY+n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent-t-n)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:r+=" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+" L "+(i.targetX-t)+" "+(i.targetY+n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"),r}function JJ(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return WZt(r.link,n);var i=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>i&&(n=i);var a=r.link.source.x1,o=r.link.target.x0-n,s=zZt(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,v="M"+a+","+c,_="C"+l+","+c+" "+u+","+h+" "+o+","+h,b="C"+u+","+d+" "+l+","+f+" "+a+","+f,p=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return p+="L"+o+","+d,v+_+p+b+"Z"}return t}function XZt(e,t){var r=D5(t.color),n=Nu.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=p1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:sw.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function ZJ(e){e.attr("transform",function(t){return YJ(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function ZZt(e){e.call(ZJ)}function rXe(e,t){e.call(ZZt),t.attr("d",JJ())}function KWe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function XJ(e){return e.link.width>1||e.linkLineWidth>0}function JWe(e){var t=YJ(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function $We(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function YZt(e,t,r,n){var i=R5.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"&&(p1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),p1.raiseToTop(this),a.interactionState.dragInProgress=a.node,QWe(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):KZt(e,o,a,n),JZt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=R5.event.x,s=R5.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),QWe(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),rXe(e.filter(nXe(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,iXe(r,i)}})}function $Zt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function iXe(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zv=Oa(),QJ=Dr(),k7=QJ.numberFormat,rYt=oXe(),F5=vf(),iYt=ka(),Sx=WJ().cn,Qk=QJ._;function sXe(e){return e!==""}function z5(e,t){return e.filter(function(r){return r.key===t.traceId})}function lXe(e,t){Zv.select(e).select("path").style("fill-opacity",t),Zv.select(e).select("rect").style("fill-opacity",t)}function uXe(e){Zv.select(e).select("text.name").style("fill","black")}function cXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function fXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function hXe(e,t,r){t&&r&&z5(r,t).selectAll("."+Sx.sankeyLink).filter(cXe(t)).call(dXe.bind(0,t,r,!1))}function $J(e,t,r){t&&r&&z5(r,t).selectAll("."+Sx.sankeyLink).filter(cXe(t)).call(vXe.bind(0,t,r,!1))}function dXe(e,t,r,n){n.style("fill",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverHue}).style("fill-opacity",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverAlpha}),n.each(function(i){var a=i.link.label;a!==""&&z5(t,e).selectAll("."+Sx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverHue}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverAlpha})}),r&&z5(t,e).selectAll("."+Sx.sankeyNode).filter(fXe(e)).call(hXe)}function vXe(e,t,r,n){n.style("fill",function(i){return i.tinyColorHue}).style("fill-opacity",function(i){return i.tinyColorAlpha}),n.each(function(i){var a=i.link.label;a!==""&&z5(t,e).selectAll("."+Sx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){return o.tinyColorHue}).style("fill-opacity",function(o){return o.tinyColorAlpha})}),r&&z5(t,e).selectAll(Sx.sankeyNode).filter(fXe(e)).call($J)}function kf(e,t){var r=e.hoverlabel||{},n=QJ.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}pXe.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:kf(C,"bgcolor")||iYt.addOpacity(z.color,1),borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:Zv.event.x"),color:kf(C,"bgcolor")||x.tinyColorHue,borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:V,eventData:[x.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});lXe(j,.85),uXe(j)}}},S=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call($J,x,C),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:Zv.event,points:[x.node]})),F5.loneUnhover(n._hoverlayer.node()))};rYt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:_,unhover:b,select:l},nodeEvents:{hover:k,follow:E,unhover:S,select:p}})}});var gXe=ye(lw=>{"use strict";var nYt=mc().overrideAll,aYt=Id().getModuleCalcData,oYt=e$(),sYt=B1(),lYt=Sg(),uYt=yv(),cYt=Of().prepSelect,t$=Dr(),fYt=qa(),C7="sankey";lw.name=C7;lw.baseLayoutAttrOverrides=nYt({hoverlabel:sYt.hoverlabel},"plot","nested");lw.plot=function(e){var t=aYt(e.calcdata,C7)[0];oYt(e,t),lw.updateFx(e)};lw.clean=function(e,t,r,n){var i=n._has&&n._has(C7),a=t._has&&t._has(C7);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};lw.updateFx=function(e){for(var t=0;t{"use strict";mXe.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";_Xe.exports={attributes:GJ(),supplyDefaults:TWe(),calc:kWe(),plot:e$(),moduleType:"trace",name:"sankey",basePlotModule:gXe(),selectPoints:yXe(),categories:["noOpacity"],meta:{}}});var wXe=ye((o2r,bXe)=>{"use strict";bXe.exports=xXe()});var AXe=ye(O5=>{"use strict";var TXe=Mc();O5.name="indicator";O5.plot=function(e,t,r,n){TXe.plotBasePlot(O5.name,e,t,r,n)};O5.clean=function(e,t,r,n){TXe.cleanBasePlot(O5.name,e,t,r,n)}});var i$=ye((l2r,LXe)=>{"use strict";var Mx=Ao().extendFlat,MXe=Ao().extendDeep,dYt=mc().overrideAll,EXe=ec(),kXe=Lh(),vYt=Cc().attributes,Bf=Rd(),pYt=vl().templatedArray,L7=XT(),SXe=df().descriptionOnlyNumbers,r$=EXe({editType:"plot",colorEditType:"plot"}),eC={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:kXe.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"},CXe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},gYt=pYt("step",MXe({},eC,{range:CXe}));LXe.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:vYt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Mx({},r$,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:SXe("value")},font:Mx({},r$,{}),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:SXe("value")},increasing:{symbol:{valType:"string",dflt:L7.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:L7.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:L7.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:L7.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Mx({},r$,{}),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:MXe({},eC,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:kXe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:dYt({range:CXe,visible:Mx({},Bf.visible,{dflt:!0}),tickmode:Bf.minor.tickmode,nticks:Bf.nticks,tick0:Bf.tick0,dtick:Bf.dtick,tickvals:Bf.tickvals,ticktext:Bf.ticktext,ticks:Mx({},Bf.ticks,{dflt:"outside"}),ticklen:Bf.ticklen,tickwidth:Bf.tickwidth,tickcolor:Bf.tickcolor,ticklabelstep:Bf.ticklabelstep,showticklabels:Bf.showticklabels,labelalias:Bf.labelalias,tickfont:EXe({}),tickangle:Bf.tickangle,tickformat:Bf.tickformat,tickformatstops:Bf.tickformatstops,tickprefix:Bf.tickprefix,showtickprefix:Bf.showtickprefix,ticksuffix:Bf.ticksuffix,showticksuffix:Bf.showticksuffix,separatethousands:Bf.separatethousands,exponentformat:Bf.exponentformat,minexponent:Bf.minexponent,showexponent:Bf.showexponent,editType:"plot"},"plot"),steps:gYt,threshold:{line:{color:Mx({},eC.line.color,{}),width:Mx({},eC.line.width,{dflt:1}),editType:"plot"},thickness:Mx({},eC.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var n$=ye((u2r,PXe)=>{"use strict";PXe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var DXe=ye((c2r,RXe)=>{"use strict";var ty=Dr(),I7=i$(),mYt=Cc().defaults,IXe=vl(),yYt=Yd(),P7=n$(),_Yt=bb(),xYt=M3(),bYt=e_(),wYt=t_();function TYt(e,t,r,n){function i(x,C){return ty.coerce(e,t,I7,x,C)}mYt(t,n,i),i("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=i("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){i("number.valueformat");var l=ty.extendFlat({},n.font);l.size=void 0,ty.coerceFont(i,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=P7.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=ty.extendFlat({},n.font);c.size=void 0,ty.coerceFont(i,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||P7.defaultNumberFontSize),o[1]=!0),i("delta.reference",t.value),i("delta.relative"),i("delta.valueformat",t.delta.relative?"2%":""),i("delta.increasing.symbol"),i("delta.increasing.color"),i("delta.decreasing.symbol"),i("delta.decreasing.color"),i("delta.position"),i("delta.prefix"),i("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=ty.extendFlat({},n.font);f.size=.25*(s||u||P7.defaultNumberFontSize),ty.coerceFont(i,"title.font",f),i("title.text");var h,d,v,_;function b(x,C){return ty.coerce(h,d,I7.gauge,x,C)}function p(x,C){return ty.coerce(v,_,I7.gauge.axis,x,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=IXe.newContainer(t,"gauge"),b("shape");var k=t._isBullet=t.gauge.shape==="bullet";k||i("title.align","center");var E=t._isAngular=t.gauge.shape==="angular";E||i("align","center"),b("bgcolor",n.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var S=P7.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",S),yYt(h,d,{name:"steps",handleItemDefaults:AYt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),v={},h&&(v=h.axis||{}),_=IXe.newContainer(d,"axis"),p("visible"),t._range=p("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};_Yt(v,_,p,"linear"),wYt(v,_,p,"linear",L),bYt(v,_,p,"linear",L),xYt(v,_,p,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function AYt(e,t){function r(n,i){return ty.coerce(e,t,I7.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}RXe.exports={supplyDefaults:TYt}});var zXe=ye((f2r,FXe)=>{"use strict";function SYt(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var i=t._lastValue,a=i;return t._hasDelta&&typeof t.delta.reference=="number"&&(a=t.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}FXe.exports={calc:SYt}});var VXe=ye((h2r,UXe)=>{"use strict";var dw=Oa(),MYt=(F2(),ob(D2)).interpolate,OXe=(F2(),ob(D2)).interpolateNumber,Ex=Dr(),EYt=Ex.strScale,rC=Ex.strTranslate,kYt=Ex.rad2deg,CYt=$h().MID_SHIFT,hw=So(),uw=n$(),D7=ru(),sv=ho(),LYt=i4(),PYt=uI(),IYt=Rd(),q5=ka(),a$={left:"start",center:"middle",right:"end"},cw={left:0,center:.5,right:1},qXe=/[yzafpnµmkMGTPEZY]/;function iC(e){return e&&e.duration>0}UXe.exports=function(t,r,n,i){var a=t._fullLayout,o;iC(n)&&i&&(o=i()),Ex.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=dw.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,_={w:a._size.w*(v.x[1]-v.x[0]),h:a._size.h*(v.y[1]-v.y[0]),l:a._size.l+a._size.w*v.x[0],r:a._size.r+a._size.w*(1-v.x[1]),t:a._size.t+a._size.h*(1-v.y[1]),b:a._size.b+a._size.h*v.y[0]},b=_.l+_.w/2,p=_.t+_.h/2,k=Math.min(_.w/2,_.h),E=uw.innerRadius*k,S,L,x,C=u.align||"center";if(L=p,!f)S=_.l+cw[C]*_.w,x=function(j){return BXe(j,_.w,_.h)};else if(h&&(S=b,L=p+k/2,x=function(j){return OYt(j,.9*E)}),d){var M=uw.bulletPadding,g=1-uw.bulletNumberDomainSize+M;S=_.l+(g+(1-g)*cw[C])*_.w,x=function(j){return BXe(j,(uw.bulletNumberDomainSize-M)*_.w,_.h)}}FYt(t,c,s,{numbersX:S,numbersY:L,numbersScaler:x,transitionOpts:n,onComplete:o});var P,T;f&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},T={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=c.selectAll("g.angular").data(h?s:[]);z.exit().remove();var O=c.selectAll("g.angularaxis").data(h?s:[]);O.exit().remove(),h&&DYt(t,c,s,{radius:k,innerRadius:E,gauge:z,layer:O,size:_,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var V=c.selectAll("g.bullet").data(d?s:[]);V.exit().remove();var G=c.selectAll("g.bulletaxis").data(d?s:[]);G.exit().remove(),d&&RYt(t,c,s,{gauge:V,layer:G,size:_,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var Z=c.selectAll("text.title").data(s);Z.exit().remove(),Z.enter().append("text").classed("title",!0),Z.attr("text-anchor",function(){return d?a$.right:a$[u.title.align]}).text(u.title.text).call(hw.font,u.title.font).call(D7.convertToTspans,t),Z.attr("transform",function(){var j=_.l+_.w*cw[u.title.align],N,H=uw.titlePadding,te=hw.bBox(Z.node());if(f){if(h)if(u.gauge.axis.visible){var oe=hw.bBox(O.node());N=oe.top-H-te.bottom}else N=_.t+_.h/2-k/2-te.bottom-H;d&&(N=L-(te.top+te.bottom)/2,j=_.l-uw.bulletPadding*_.w)}else N=u._numbersTop-H-te.bottom;return rC(j,N)})})};function RYt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=i.domain,f=n.transitionOpts,h=n.onComplete,d,v,_,b,p;a.enter().append("g").classed("bullet",!0),a.attr("transform",rC(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var k=u.h,E=i.gauge.bar.thickness*k,S=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-uw.bulletNumberDomainSize:1);d=tC(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[S,L],d.setScale(),v=sv.calcTicks(d),_=sv.makeTransTickFn(d),b=sv.getTickSigns(d)[2],p=u.t+u.h,d.visible&&(sv.drawTicks(e,d,{vals:d.ticks==="inside"?sv.clipEnds(d,v):v,layer:o,path:sv.makeTickPath(d,p,b),transFn:_}),sv.drawLabels(e,d,{vals:v,layer:o,transFn:_,labelFns:sv.makeLabelFns(d,p)}));function x(O){O.attr("width",function(V){return Math.max(0,d.c2p(V.range[1])-d.c2p(V.range[0]))}).attr("x",function(V){return d.c2p(V.range[0])}).attr("y",function(V){return .5*(1-V.thickness)*k}).attr("height",function(V){return V.thickness*k})}var C=[s].concat(i.gauge.steps),M=a.selectAll("g.bg-bullet").data(C);M.enter().append("g").classed("bg-bullet",!0).append("rect"),M.select("rect").call(x).call(fw),M.exit().remove();var g=a.selectAll("g.value-bullet").data([i.gauge.bar]);g.enter().append("g").classed("value-bullet",!0).append("rect"),g.select("rect").attr("height",E).attr("y",(k-E)/2).call(fw),iC(f)?g.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y)))):g.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y))):0),g.exit().remove();var P=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),T=a.selectAll("g.threshold-bullet").data(P);T.enter().append("g").classed("threshold-bullet",!0).append("line"),T.select("line").attr("x1",d.c2p(i.gauge.threshold.value)).attr("x2",d.c2p(i.gauge.threshold.value)).attr("y1",(1-i.gauge.threshold.thickness)/2*k).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*k).call(q5.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),T.exit().remove();var z=a.selectAll("g.gauge-outline").data([l]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(x).call(fw),z.exit().remove()}function DYt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=n.gauge,h=n.layer,d=n.transitionOpts,v=n.onComplete,_=Math.PI/2;function b(_e){var Ee=i.gauge.axis.range[0],Ce=i.gauge.axis.range[1],me=(_e-Ee)/(Ce-Ee)*Math.PI-_;return me<-_?-_:me>_?_:me}function p(_e){return dw.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-_)}function k(_e){_e.attr("d",function(Ee){return p(Ee.thickness).startAngle(b(Ee.range[0])).endAngle(b(Ee.range[1]))()})}var E,S,L,x;f.enter().append("g").classed("angular",!0),f.attr("transform",rC(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),E=tC(e,i.gauge.axis),E.type="linear",E.range=i.gauge.axis.range,E._id="xangularaxis",E.ticklabeloverflow="allow",E.setScale();var C=function(_e){return(E.range[0]-_e.x)/(E.range[1]-E.range[0])*Math.PI+Math.PI},M={},g=sv.makeLabelFns(E,0),P=g.labelStandoff;M.xFn=function(_e){var Ee=C(_e);return Math.cos(Ee)*P},M.yFn=function(_e){var Ee=C(_e),Ce=Math.sin(Ee)>0?.2:1;return-Math.sin(Ee)*(P+_e.fontSize*Ce)+Math.abs(Math.cos(Ee))*(_e.fontSize*CYt)},M.anchorFn=function(_e){var Ee=C(_e),Ce=Math.cos(Ee);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},M.heightFn=function(_e,Ee,Ce){var me=C(_e);return-.5*(1+Math.sin(me))*Ce};var T=function(_e){return rC(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return T(C(_e))};var z=function(_e){var Ee=C(_e);return T(Ee)+"rotate("+-kYt(Ee)+")"};if(S=sv.calcTicks(E),x=sv.getTickSigns(E)[2],E.visible){x=E.ticks==="inside"?-1:1;var O=(E.linewidth||1)/2;sv.drawTicks(e,E,{vals:S,layer:h,path:"M"+x*O+",0h"+x*E.ticklen,transFn:z}),sv.drawLabels(e,E,{vals:S,layer:h,transFn:L,labelFns:M})}var V=[l].concat(i.gauge.steps),G=f.selectAll("g.bg-arc").data(V);G.enter().append("g").classed("bg-arc",!0).append("path"),G.select("path").call(k).call(fw),G.exit().remove();var Z=p(i.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([i.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var N=j.select("path");iC(d)?(N.transition().duration(d.duration).ease(d.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attrTween("d",zYt(Z,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr("d",typeof r[0].y=="number"?Z.endAngle(b(r[0].y)):"M0,0Z"),N.call(fw),j.exit().remove(),V=[];var H=i.gauge.threshold.value;(H||H===0)&&V.push({range:[H,H],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var te=f.selectAll("g.threshold-arc").data(V);te.enter().append("g").classed("threshold-arc",!0).append("path"),te.select("path").call(k).call(fw),te.exit().remove();var oe=f.selectAll("g.gauge-outline").data([u]);oe.enter().append("g").classed("gauge-outline",!0).append("path"),oe.select("path").call(k).call(fw),oe.exit().remove()}function FYt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",l=a$[s],u=n.transitionOpts,c=n.onComplete,f=Ex.ensureSingle(t,"g","numbers"),h,d,v,_=[];i._hasNumber&&_.push("number"),i._hasDelta&&(_.push("delta"),i.delta.position==="left"&&_.reverse());var b=f.selectAll("text").data(_);b.enter().append("text"),b.attr("text-anchor",function(){return l}).attr("class",function(T){return T}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function p(T,z,O,V){if(T.match("s")&&O>=0!=V>=0&&!z(O).slice(-1).match(qXe)&&!z(V).slice(-1).match(qXe)){var G=T.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),Z=tC(e,{tickformat:G});return function(j){return Math.abs(j)<1?sv.tickText(Z,j).text:z(j)}}else return z}function k(){var T=tC(e,{tickformat:i.number.valueformat},i._range);T.setScale(),sv.prepTicks(T);var z=function(j){return sv.tickText(T,j).text},O=i.number.suffix,V=i.number.prefix,G=f.select("text.number");function Z(){var j=typeof r[0].y=="number"?V+z(r[0].y)+O:"-";G.text(j).call(hw.font,i.number.font).call(D7.convertToTspans,e)}return iC(u)?G.transition().duration(u.duration).ease(u.easing).each("end",function(){Z(),c&&c()}).each("interrupt",function(){Z(),c&&c()}).attrTween("text",function(){var j=dw.select(this),N=OXe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var H=p(i.number.valueformat,z,r[0].lastY,r[0].y);return function(te){j.text(V+H(N(te))+O)}}):Z(),h=NXe(V+z(r[0].y)+O,i.number.font,l,e),G}function E(){var T=tC(e,{tickformat:i.delta.valueformat},i._range);T.setScale(),sv.prepTicks(T);var z=function(te){return sv.tickText(T,te).text},O=i.delta.suffix,V=i.delta.prefix,G=function(te){var oe=i.delta.relative?te.relativeDelta:te.delta;return oe},Z=function(te,oe){return te===0||typeof te!="number"||isNaN(te)?"-":(te>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+V+oe(te)+O},j=function(te){return te.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=G(r[0]));var N=f.select("text.delta");N.call(hw.font,i.delta.font).call(q5.fill,j({delta:i._deltaLastValue}));function H(){N.text(Z(G(r[0]),z)).call(q5.fill,j(r[0])).call(D7.convertToTspans,e)}return iC(u)?N.transition().duration(u.duration).ease(u.easing).tween("text",function(){var te=dw.select(this),oe=G(r[0]),_e=i._deltaLastValue,Ee=p(i.delta.valueformat,z,_e,oe),Ce=OXe(_e,oe);return i._deltaLastValue=oe,function(me){te.text(Z(Ce(me),Ee)),te.call(q5.fill,j({delta:Ce(me)}))}}).each("end",function(){H(),c&&c()}).each("interrupt",function(){H(),c&&c()}):H(),d=NXe(Z(G(r[0]),z),i.delta.font,l,e),N}var S=i.mode+i.align,L;if(i._hasDelta&&(L=E(),S+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,S+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(k(),S+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,g,P=.75*i.delta.font.size;i.delta.position==="left"&&(M=R7(i,"deltaPos",0,-1*(h.width*cw[i.align]+d.width*(1-cw[i.align])+P),S,Math.min),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+M,right:h.right,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="right"&&(M=R7(i,"deltaPos",0,h.width*(1-cw[i.align])+d.width*cw[i.align]+P,S,Math.max),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+M,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="bottom"&&(M=null,g=d.height,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),i.delta.position==="top"&&(M=null,g=h.top,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),L.attr({dx:M,dy:g})}(i._hasNumber||i._hasDelta)&&f.attr("transform",function(){var T=n.numbersScaler(v);S+=T[2];var z=R7(i,"numbersScale",1,T[0],S,Math.min),O;i._scaleNumbers||(z=1),i._isAngular?O=o-z*v.bottom:O=o-z*(v.top+v.bottom)/2,i._numbersTop=z*v.top+O;var V=v[s];s==="center"&&(V=(v.left+v.right)/2);var G=a-z*V;return G=R7(i,"numbersTranslate",0,G,S,Math.max),rC(G,O)+EYt(z)})}function fw(e){e.each(function(t){q5.stroke(dw.select(this),t.line.color)}).each(function(t){q5.fill(dw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function zYt(e,t,r){return function(){var n=MYt(t,r);return function(i){return e.endAngle(n(i))()}}}function tC(e,t,r){var n=e._fullLayout,i=Ex.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return Ex.coerce(i,a,IYt,l,u)}return LYt(i,a,s,o,n),PYt(i,a,s,o),a}function BXe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function OYt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function NXe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=dw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(D7.convertToTspans,n).call(hw.font,t),hw.bBox(a.node())}function R7(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=Ex.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var HXe=ye((d2r,GXe)=>{"use strict";GXe.exports={moduleType:"trace",name:"indicator",basePlotModule:AXe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:i$(),supplyDefaults:DXe().supplyDefaults,calc:zXe().calc,plot:VXe(),meta:{}}});var WXe=ye((v2r,jXe)=>{"use strict";jXe.exports=HXe()});var o$=ye((g2r,KXe)=>{"use strict";var XXe=Ub(),F7=Ao().extendFlat,qYt=mc().overrideAll,ZXe=ec(),BYt=Cc().attributes,YXe=df().descriptionOnlyNumbers,p2r=KXe.exports=qYt({domain:BYt({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:YXe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:F7({},XXe.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:F7({},ZXe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:YXe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:F7({},XXe.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:F7({},ZXe({arrayOk:!0}))}},"calc","from-root")});var $Xe=ye((m2r,JXe)=>{"use strict";var s$=Dr(),NYt=o$(),UYt=Cc().defaults;function VYt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(l,u){return l-u}),o=i.map(function(l){return a.indexOf(l)}),s=o.length;s{"use strict";var GYt=Jm().wrap;QXe.exports=function(){return GYt({})}});var l$=ye((_2r,tZe)=>{"use strict";tZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}});var cZe=ye((x2r,uZe)=>{"use strict";var rZe=l$(),c$=Ao().extendFlat,HYt=Eo(),jYt=vv().isTypedArray,z7=vv().isArrayOrTypedArray;uZe.exports=function(t,r){var n=u$(r.cells.values),i=function(g){return g.slice(r.header.values.length,g.length)},a=u$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=u$(a));var o=a.concat(i(n).map(function(){return lZe((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}):[rZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(iZe,0),d=u-h,v=d+rZe.uplift,_=oZe(f,v),b=oZe(c,h),p=aZe(b,[]),k=aZe(_,p),E={},S=r._fullInput.columnorder;z7(S)&&(S=Array.from(S)),S=S.concat(i(n.map(function(g,P){return P})));var L=o.map(function(g,P){var T=z7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return HYt(T)?Number(T):1}),x=L.reduce(iZe,0);L=L.map(function(g){return g/x*l});var C=Math.max(f$(r.header.line.width),f$(r.cells.line.width)),M={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:C,height:u,columnOrder:S,groupHeight:u,rowBlocks:k,headerRowBlocks:p,scrollY:0,cells:c$({},r.cells,{values:n}),headerCells:c$({},r.header,{values:o}),gdColumns:o.map(function(g){return g[0]}),gdColumnsOriginalOrder:o.map(function(g){return g[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(g,P){var T=E[g];E[g]=(T||0)+1;var z=g+"__"+E[g];return{key:z,label:g,specIndex:P,xIndex:S[P],xScale:nZe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return M.columns.forEach(function(g){g.calcdata=M,g.x=nZe(g)}),M};function f$(e){if(z7(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=sZe(),i+=a,s=u+1,a=0);return r}function sZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var fZe=ye(h$=>{"use strict";var O7=Ao().extendFlat;h$.splitToPanels=function(e){var t=[0,0],r=O7({},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:O7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=O7({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i=O7({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,i,r]};h$.splitToCells=function(e){var t=WYt(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var i=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+i,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function WYt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var w$=ye((w2r,wZe)=>{"use strict";var Ya=l$(),tf=Oa(),d$=Dr(),XYt=d$.numberFormat,Uu=Jm(),v$=So(),ZYt=ru(),YYt=Dr().raiseToTop,og=Dr().strTranslate,KYt=Dr().cancelTransition,JYt=cZe(),yZe=fZe(),hZe=ka();wZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Ya.cn.table).data(r.map(function(k){var E=Uu.unwrap(k),S=E.trace;return JYt(t,S)}),Uu.keyFun);i.exit().remove(),i.enter().append("g").classed(Ya.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),i.attr("width",function(k){return k.width+k.size.l+k.size.r}).attr("height",function(k){return k.height+k.size.t+k.size.b}).attr("transform",function(k){return og(k.translateX,k.translateY)});var a=i.selectAll("."+Ya.cn.tableControlView).data(Uu.repeat,Uu.keyFun),o=a.enter().append("g").classed(Ya.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(k){a.filter(function(E){return k===E}).call(nC,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var E=k.scrollY+tf.event.deltaY,S=B7(t,a,null,E)(k);S||(tf.event.stopPropagation(),tf.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(nC,t,!0)}a.attr("transform",function(k){return og(k.size.l,k.size.t)});var l=a.selectAll("."+Ya.cn.scrollBackground).data(Uu.repeat,Uu.keyFun);l.enter().append("rect").classed(Ya.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),a.each(function(k){v$.setClipUrl(tf.select(this),dZe(t,k),t)});var u=a.selectAll("."+Ya.cn.yColumn).data(function(k){return k.columns},Uu.keyFun);u.enter().append("g").classed(Ya.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(k){return og(k.x,0)}),n&&u.call(tf.behavior.drag().origin(function(k){var E=tf.select(this);return gZe(E,k,-Ya.uplift),YYt(this),k.calcdata.columnDragInProgress=!0,nC(a.filter(function(S){return k.calcdata.key===S.key}),t),k}).on("drag",function(k){var E=tf.select(this),S=function(C){return(k===C?tf.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Ya.overdrag,Math.min(k.calcdata.width+Ya.overdrag-k.columnWidth,tf.event.x));var L=_Ze(u).filter(function(C){return C.calcdata.key===k.calcdata.key}),x=L.sort(function(C,M){return S(C)-S(M)});x.forEach(function(C,M){C.xIndex=M,C.x=k===C?C.x:C.xScale(C)}),u.filter(function(C){return k!==C}).transition().ease(Ya.transitionEase).duration(Ya.transitionDuration).attr("transform",function(C){return og(C.x,0)}),E.call(KYt).attr("transform",og(k.x,-Ya.uplift))}).on("dragend",function(k){var E=tf.select(this),S=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,gZe(E,k,0),sKt(t,S,S.columns.map(function(L){return L.xIndex}))})),u.each(function(k){v$.setClipUrl(tf.select(this),vZe(t,k),t)});var c=u.selectAll("."+Ya.cn.columnBlock).data(yZe.splitToPanels,Uu.keyFun);c.enter().append("g").classed(Ya.cn.columnBlock,!0).attr("id",function(k){return k.key}),c.style("cursor",function(k){return k.dragHandle?"ew-resize":k.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(lKt),h=c.filter(_$);n&&h.call(tf.behavior.drag().origin(function(k){return tf.event.stopPropagation(),k}).on("drag",B7(t,a,-1)).on("dragend",function(){})),p$(t,a,f,c),p$(t,a,h,c);var d=a.selectAll("."+Ya.cn.scrollAreaClip).data(Uu.repeat,Uu.keyFun);d.enter().append("clipPath").classed(Ya.cn.scrollAreaClip,!0).attr("id",function(k){return dZe(t,k)});var v=d.selectAll("."+Ya.cn.scrollAreaClipRect).data(Uu.repeat,Uu.keyFun);v.enter().append("rect").classed(Ya.cn.scrollAreaClipRect,!0).attr("x",-Ya.overdrag).attr("y",-Ya.uplift).attr("fill","none"),v.attr("width",function(k){return k.width+2*Ya.overdrag}).attr("height",function(k){return k.height+Ya.uplift});var _=u.selectAll("."+Ya.cn.columnBoundary).data(Uu.repeat,Uu.keyFun);_.enter().append("g").classed(Ya.cn.columnBoundary,!0);var b=u.selectAll("."+Ya.cn.columnBoundaryClippath).data(Uu.repeat,Uu.keyFun);b.enter().append("clipPath").classed(Ya.cn.columnBoundaryClippath,!0),b.attr("id",function(k){return vZe(t,k)});var p=b.selectAll("."+Ya.cn.columnBoundaryRect).data(Uu.repeat,Uu.keyFun);p.enter().append("rect").classed(Ya.cn.columnBoundaryRect,!0).attr("fill","none"),p.attr("width",function(k){return k.columnWidth+2*q7(k)}).attr("height",function(k){return k.calcdata.height+2*q7(k)+Ya.uplift}).attr("x",function(k){return-q7(k)}).attr("y",function(k){return-q7(k)}),x$(null,h,a)};function q7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function dZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function vZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function _Ze(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function nC(e,t,r){function n(u){var c=u.rowBlocks;return m$(c,c.length-1)+(c.length?N7(c[c.length-1],1/0):1)}var i=e.selectAll("."+Ya.cn.scrollbarKit).data(Uu.repeat,Uu.keyFun);i.enter().append("g").classed(Ya.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-g$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ya.goldenRatio*Ya.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ya.scrollbarWidth/2+Ya.scrollbarOffset;return og(c,g$(u))});var a=i.selectAll("."+Ya.cn.scrollbar).data(Uu.repeat,Uu.keyFun);a.enter().append("g").classed(Ya.cn.scrollbar,!0);var o=a.selectAll("."+Ya.cn.scrollbarSlider).data(Uu.repeat,Uu.keyFun);o.enter().append("g").classed(Ya.cn.scrollbarSlider,!0),o.attr("transform",function(u){return og(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ya.cn.scrollbarGlyph).data(Uu.repeat,Uu.keyFun);s.enter().append("line").classed(Ya.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ya.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ya.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ya.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ya.scrollbarHideDelay).duration(Ya.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ya.cn.scrollbarCaptureZone).data(Uu.repeat,Uu.keyFun);l.enter().append("line").classed(Ya.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ya.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=tf.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=tf.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||B7(t,e,null,v(d-h.barLength/2))(u)}).call(tf.behavior.drag().origin(function(u){return tf.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",B7(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function p$(e,t,r,n){var i=$Yt(r),a=QYt(i);iKt(a);var o=eKt(a);aKt(o);var s=rKt(a),l=tKt(s);nKt(l),xZe(l,t,n,e),b$(a)}function $Yt(e){var t=e.selectAll("."+Ya.cn.columnCells).data(Uu.repeat,Uu.keyFun);return t.enter().append("g").classed(Ya.cn.columnCells,!0),t.exit().remove(),t}function QYt(e){var t=e.selectAll("."+Ya.cn.columnCell).data(yZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.columnCell,!0),t.exit().remove(),t}function eKt(e){var t=e.selectAll("."+Ya.cn.cellRect).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ya.cn.cellRect,!0),t}function tKt(e){var t=e.selectAll("."+Ya.cn.cellText).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ya.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){tf.event.stopPropagation()}),t}function rKt(e){var t=e.selectAll("."+Ya.cn.cellTextHolder).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function iKt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Yv(n.size,i,r),color:Yv(n.color,i,r),family:Yv(n.family,i,r),weight:Yv(n.weight,i,r),style:Yv(n.style,i,r),variant:Yv(n.variant,i,r),textcase:Yv(n.textcase,i,r),lineposition:Yv(n.lineposition,i,r),shadow:Yv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Yv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Yv(t.calcdata.cells.line.width,i,r),t.font=a})}function nKt(e){e.each(function(t){v$.font(tf.select(this),t.font)})}function aKt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=tf.select(this);hZe.stroke(r,Yv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),hZe.fill(r,Yv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function xZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;i.mayHaveMarkup=l&&s.match(/[<&>]/);var f=oKt(s);i.latex=f;var h=f?"":Yv(i.calcdata.cells.prefix,a,o)||"",d=f?"":Yv(i.calcdata.cells.suffix,a,o)||"",v=f?null:Yv(i.calcdata.cells.format,a,o)||null,_=h+(v?XYt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=pZe(_)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?pZe(_):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var p;if(i.wrappingNeeded){var k=Ya.wrapSplitCharacter===" "?_.replace(/i&&n.push(a),i+=l}return n}function x$(e,t,r){var n=_Ze(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=m$(i,i.length),s=n.calcdata.groupHeight-g$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=uKt(i,l,s);u.length===1&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=m$(c.rowBlocks,c.page)-c.scrollY;return og(0,f)}),e&&(mZe(e,r,t,u,n.prevPages,n,0),mZe(e,r,t,u,n.prevPages,n,1),nC(r,e))}}function B7(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*tf.event.dy:n;var c=s.selectAll("."+Ya.cn.yColumn).selectAll("."+Ya.cn.columnBlock).filter(_$);return x$(e,c,s),o.scrollY===u}}function mZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==i[c]});p$(e,t,l,r),i[o]=n[o]}))}function cKt(e,t,r,n){return function(){var a=tf.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(_,b){s[b].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,v=o.column.columnWidth-2*Ya.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ya.wrapSpacer)+Ya.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ya.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),xZe(a.select("."+Ya.cn.cellText),r,e,n),tf.select(t.parentNode.parentNode).call(b$)}}function fKt(e,t,r,n,i){return function(){if(!i.settledY){var o=tf.select(t.parentNode),s=y$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ya.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ya.cn.columnCell).call(b$),x$(null,e.filter(_$),0),nC(r,n,!0)),o.attr("transform",function(){var d=this,v=d.parentNode,_=v.getBoundingClientRect(),b=tf.select(d.parentNode).select("."+Ya.cn.cellRect).node().getBoundingClientRect(),p=d.transform.baseVal.consolidate(),k=b.top-_.top+(p?p.matrix.f:Ya.cellPad);return og(bZe(i,tf.select(d.parentNode).select("."+Ya.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function bZe(e,t){switch(e.align){case"left":return Ya.cellPad;case"right":return e.column.columnWidth-(t||0)-Ya.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ya.cellPad}}function b$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+N7(s,1/0)},0),n=y$(t),i=N7(n,t.key),a=i+r;return og(0,a)}).selectAll("."+Ya.cn.cellRect).attr("height",function(t){return dKt(y$(t),t.key).rowHeight})}function m$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=hKt(e[n]);return r}function N7(e,t){for(var r=0,n=0;n{"use strict";var vKt=Id().getModuleCalcData,pKt=w$(),U7="table";V7.name=U7;V7.plot=function(e){var t=vKt(e.calcdata,U7)[0];t.length&&pKt(e,t)};V7.clean=function(e,t,r,n){var i=n._has&&n._has(U7),a=t._has&&t._has(U7);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var SZe=ye((A2r,AZe)=>{"use strict";AZe.exports={attributes:o$(),supplyDefaults:$Xe(),calc:eZe(),plot:w$(),moduleType:"trace",name:"table",basePlotModule:TZe(),categories:["noOpacity"],meta:{}}});var EZe=ye((S2r,MZe)=>{"use strict";MZe.exports=SZe()});var IZe=ye((M2r,PZe)=>{"use strict";var kZe=ec(),CZe=Lh(),T$=Rd(),gKt=df().descriptionWithDates,mKt=mc().overrideAll,LZe=Pd().dash,A$=Ao().extendFlat;PZe.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:kZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:T$.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:A$({},T$.labelalias,{editType:"calc"}),tickfont:kZe({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:gKt("tick label")},tickformatstops:mKt(T$.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:CZe.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:A$({},LZe,{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:A$({},LZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:CZe.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 H7=ye((E2r,FZe)=>{"use strict";var yKt=ec(),RZe=IZe(),DZe=Lh(),G7=yKt({editType:"calc"}),_Kt=pf().zorder;G7.family.dflt='"Open Sans", verdana, arial, sans-serif';G7.size.dflt=12;G7.color.dflt=DZe.defaultLine;FZe.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:RZe,baxis:RZe,font:G7,color:{valType:"color",dflt:DZe.defaultLine,editType:"plot"},zorder:_Kt}});var qZe=ye((k2r,OZe)=>{"use strict";var zZe=Dr().isArray1D;OZe.exports=function(t,r,n){var i=n("x"),a=i&&i.length,o=n("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||zZe(i))&&(!s||zZe(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var UZe=ye((C2r,NZe)=>{"use strict";var xKt=H7(),BZe=ka().addOpacity,bKt=qa(),aC=Dr(),wKt=bb(),TKt=e_(),AKt=t_(),SKt=oI(),MKt=ym(),EKt=R3();NZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=xKt[i+"axis"];function s(g,P){return aC.coerce(t,r,o,g,P)}function l(g,P){return aC.coerce2(t,r,o,g,P)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&kKt(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",i+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=i,u==="date"){var c=bKt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}MKt(r,n.fullLayout),r.c2p=aC.identity;var f=s("color",n.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(aC.coerceFont(s,"title.font",a,{overrideDflt:{size:aC.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var v=s("autorange",!r.isValidRange(t.range));v&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),wKt(t,r,s,u),AKt(t,r,s,u,n),TKt(t,r,s,u,n),SKt(t,r,s,{data:n.data,dataAttr:i});var _=l("gridcolor",BZe(f,.3)),b=l("gridwidth"),p=l("griddash"),k=s("showgrid");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var E=l("startlinecolor",f),S=l("startlinewidth",b),L=s("startline",r.showgrid||!!E||!!S);L||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),C=l("endlinewidth",b),M=s("endline",r.showgrid||!!x||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),k?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",p),s("minorgridcolor",BZe(_,.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 kKt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=EKt(t,a,{autotypenumbers:e.autotypenumbers})}}});var GZe=ye((L2r,VZe)=>{"use strict";var CKt=UZe(),LKt=vl();VZe.exports=function(t,r,n,i,a){var o=i("a");o||(i("da"),i("a0"));var s=i("b");s||(i("db"),i("b0")),PKt(t,r,n,a)};function PKt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=LKt.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};CKt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var WZe=ye((P2r,jZe)=>{"use strict";var HZe=Dr(),IKt=qZe(),RKt=GZe(),DKt=H7(),FKt=Lh();jZe.exports=function(t,r,n,i){function a(l,u){return HZe.coerce(t,r,DKt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",FKt.defaultLine);if(HZe.coerceFont(a,"font",i.font),a("carpet"),RKt(t,r,i,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=IKt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var S$=ye((I2r,XZe)=>{"use strict";var zKt=Dr().isArrayOrTypedArray;XZe.exports=function(t,r,n){var i;for(zKt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";ZZe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";YZe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var v=Math.atan2(l,s)*180/Math.PI;return v<-90?(v+=180,u=-u):v>90&&(v-=180,u=-u),{angle:v,flip:u,p:t.c2p(i,r,n),offsetMultplier:c}}});var nYe=ye((F2r,iYe)=>{"use strict";var Z7=Oa(),j7=So(),W7=S$(),QZe=M$(),oC=KZe(),E$=ru(),Up=Dr(),eYe=Up.strRotate,X7=Up.strTranslate,tYe=$h();iYe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;Up.makeTraceGroups(i,n,"trace").each(function(c){var f=Z7.select(this),h=c[0],d=h.trace,v=d.aaxis,_=d.baxis,b=Up.ensureSingle(f,"g","minorlayer"),p=Up.ensureSingle(f,"g","majorlayer"),k=Up.ensureSingle(f,"g","boundarylayer"),E=Up.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),B5(o,s,p,v,"a",v._gridlines,!0,a),B5(o,s,p,_,"b",_._gridlines,!0,a),B5(o,s,b,v,"a",v._minorgridlines,!0,a),B5(o,s,b,_,"b",_._minorgridlines,!0,a),B5(o,s,k,v,"a-boundary",v._boundarylines,a),B5(o,s,k,_,"b-boundary",_._boundarylines,a);var S=JZe(t,o,s,d,h,E,v._labels,"a-label"),L=JZe(t,o,s,d,h,E,_._labels,"b-label");qKt(t,E,d,h,o,s,S,L),OKt(d,h,u,o,s)})};function OKt(e,t,r,n,i){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=Up.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l0?"start":"end","data-notex":1}).call(j7.font,f.font).text(f.text).call(E$.convertToTspans,e),p=j7.bBox(this);b.attr("transform",X7(d.p[0],d.p[1])+eYe(d.angle)+X7(f.axis.labelpadding*_,p.height*.3)),u=Math.max(u,p.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function qKt(e,t,r,n,i,a,o,s){var l,u,c,f,h=Up.aggNums(Math.min,null,r.a),d=Up.aggNums(Math.max,null,r.a),v=Up.aggNums(Math.min,null,r.b),_=Up.aggNums(Math.max,null,r.b);l=.5*(h+d),u=v,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&Up.extendFlat(o,oC(r,i,a,c,r.dxydb_rough(l,u))),$Ze(e,t,r,n,c,f,r.aaxis,i,a,o,"a-title"),l=h,u=.5*(v+_),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,oC(r,i,a,c,r.dxyda_rough(l,u))),$Ze(e,t,r,n,c,f,r.baxis,i,a,s,"b-title")}var rYe=tYe.LINE_SPACING,BKt=(1-tYe.MID_SHIFT)/rYe+1;function $Ze(e,t,r,n,i,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),d=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var v=oC(r,s,l,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var _=o.title.font.size;d+=_+o.title.offset;var b=u.angle+(u.flip<0?180:0),p=(b-v.angle+450)%360,k=p>90&&p<270,E=Z7.select(this);E.text(o.title.text).call(E$.convertToTspans,e),k&&(d=(-E$.lineCount(E)+BKt)*rYe*_-d),E.attr("transform",X7(v.p[0],v.p[1])+eYe(v.angle)+X7(0,d)).attr("text-anchor","middle").call(j7.font,o.title.font)}),h.exit().remove()}});var oYe=ye((z2r,aYe)=>{"use strict";var Y7=Dr().isArrayOrTypedArray;aYe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=Y7(e)?e.length:e,f=Y7(t)?t.length:t,h=Y7(e)?e:null,d=Y7(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var v,_=1/0,b=-1/0;for(i=0;i{"use strict";var sYe=Dr().isArrayOrTypedArray;uYe.exports=function(e){return lYe(e,0)};function lYe(e,t){if(!sYe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var NKt=ho(),kx=Ao().extendFlat;fYe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,_,b,p,k=t["_"+r],E=t[r+"axis"],S=E._gridlines=[],L=E._minorgridlines=[],x=E._boundarylines=[],C=t["_"+n],M=t[n+"axis"];E.tickmode==="array"&&(E.tickvals=k.slice());var g=t._xctrl,P=t._yctrl,T=g[0].length,z=g.length,O=t._a.length,V=t._b.length;NKt.prepTicks(E),E.tickmode==="array"&&delete E.tickvals;var G=E.smoothing?3:1;function Z(N){var H,te,oe,_e,Ee,Ce,me,ie,Se,Le,Ae,Fe,Pe=[],ge=[],Re={};if(r==="b")for(te=t.b2j(N),oe=Math.floor(Math.max(0,Math.min(V-2,te))),_e=te-oe,Re.length=V,Re.crossLength=O,Re.xy=function(ce){return t.evalxy([],ce,te)},Re.dxy=function(ce,Ze){return t.dxydi([],ce,oe,Ze,_e)},H=0;H0&&(Se=t.dxydi([],H-1,oe,0,_e),Pe.push(Ee[0]+Se[0]/3),ge.push(Ee[1]+Se[1]/3),Le=t.dxydi([],H-1,oe,1,_e),Pe.push(ie[0]-Le[0]/3),ge.push(ie[1]-Le[1]/3)),Pe.push(ie[0]),ge.push(ie[1]),Ee=ie;else for(H=t.a2i(N),Ce=Math.floor(Math.max(0,Math.min(O-2,H))),me=H-Ce,Re.length=O,Re.crossLength=V,Re.xy=function(ce){return t.evalxy([],H,ce)},Re.dxy=function(ce,Ze){return t.dxydj([],Ce,ce,me,Ze)},te=0;te0&&(Ae=t.dxydj([],Ce,te-1,me,0),Pe.push(Ee[0]+Ae[0]/3),ge.push(Ee[1]+Ae[1]/3),Fe=t.dxydj([],Ce,te-1,me,1),Pe.push(ie[0]-Fe[0]/3),ge.push(ie[1]-Fe[1]/3)),Pe.push(ie[0]),ge.push(ie[1]),Ee=ie;return Re.axisLetter=r,Re.axis=E,Re.crossAxis=M,Re.value=N,Re.constvar=n,Re.index=f,Re.x=Pe,Re.y=ge,Re.smoothing=M.smoothing,Re}function j(N){var H,te,oe,_e,Ee,Ce=[],me=[],ie={};if(ie.length=k.length,ie.crossLength=C.length,r==="b")for(oe=Math.max(0,Math.min(V-2,N)),Ee=Math.min(1,Math.max(0,N-oe)),ie.xy=function(Se){return t.evalxy([],Se,N)},ie.dxy=function(Se,Le){return t.dxydi([],Se,oe,Le,Ee)},H=0;Hk.length-1)&&S.push(kx(j(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u;fk.length-1)&&!(v<0||v>k.length-1))for(_=k[o],b=k[v],i=0;ik[k.length-1])&&L.push(kx(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&x.push(kx(j(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&x.push(kx(j(k.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((k[k.length-1]-E.tick0)/E.dtick*(1+s)),Math.ceil((k[0]-E.tick0)/E.dtick/(1+s))].sort(function(N,H){return N-H}),u=l[0],c=l[1],f=u;f<=c;f++)h=E.tick0+E.dtick*f,S.push(kx(Z(h),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u-1;fk[k.length-1])&&L.push(kx(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&x.push(kx(Z(k[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&x.push(kx(Z(k[k.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}});var gYe=ye((B2r,pYe)=>{"use strict";var dYe=ho(),vYe=Ao().extendFlat;pYe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";mYe.exports=function(t,r,n,i){var a,o,s,l=[],u=!!n.smoothing,c=!!i.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var xYe=ye((U2r,_Ye)=>{"use strict";var UKt=Dr();_Ye.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(oe,_e){var Ee=0,Ce,me=0;return oe>0&&(Ce=t[_e][oe-1])!==void 0&&(me++,Ee+=Ce),oe0&&(Ce=t[_e-1][oe])!==void 0&&(me++,Ee+=Ce),_e0&&a0&&iM);return UKt.log("Smoother converged to",g,"after",T,"iterations"),t}});var wYe=ye((V2r,bYe)=>{"use strict";bYe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var SYe=ye((G2r,AYe)=>{"use strict";var TYe=.5;AYe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(a*a+o*o,TYe/2),c=Math.pow(s*s+l*l,TYe/2),f=(c*c*a-u*u*s)*i,h=(c*c*o-u*u*l)*i,d=c*(u+c)*3,v=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(v&&f/v),r[1]-(v&&h/v)]]}});var EYe=ye((H2r,MYe)=>{"use strict";var k$=SYe(),K7=Dr().ensureArray;function N5(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}MYe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,_,b,p=n[0].length,k=n.length,E=a?3*p-2:p,S=o?3*k-2:k;for(t=K7(t,S),r=K7(r,S),u=0;u{"use strict";kYe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,l,u){s||(s=[]);var c,f,h,d,v,_,b=Math.max(0,Math.min(Math.floor(l),a)),p=Math.max(0,Math.min(Math.floor(u),o)),k=Math.max(0,Math.min(1,l-b)),E=Math.max(0,Math.min(1,u-p));b*=3,p*=3;var S=k*k,L=S*k,x=1-k,C=x*x,M=C*x,g=E*E,P=g*E,T=1-E,z=T*T,O=z*T;for(_=0;_{"use strict";LYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,_=1-o,b=_*_,p=_*o*2,k=-3*b,E=3*(b-p),S=3*(p-v),L=3*v,x=s*s,C=x*s,M=1-s,g=M*M,P=g*M;for(d=0;d{"use strict";IYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,_=v*o,b=1-o,p=b*b,k=p*b,E=s*s,S=1-s,L=S*S,x=S*s*2,C=-3*L,M=3*(L-x),g=3*(x-E),P=3*E;for(d=0;d{"use strict";var DYe=wYe(),FYe=R6().findBin,VKt=EYe(),GKt=CYe(),HKt=PYe(),jKt=RYe();zYe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[i-1],c=n[0],f=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],v=h*DYe.RELATIVE_CULL_TOLERANCE,_=d*DYe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=_,f+=_,t.isVisible=function(b,p){return b>l&&bc&&pu||pf},t.setScale=function(){var b=t._x,p=t._y,k=VKt(t._xctrl,t._yctrl,b,p,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=GKt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=HKt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=jKt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var p=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-p;return(1-k)*r[p]+k*r[p+1]},t.j2b=function(b){var p=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-p;return(1-k)*n[p]+k*n[p+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var p=Math.max(0,Math.min(FYe(b,r),i-2)),k=r[p],E=r[p+1];return Math.max(0,Math.min(i-1,p+(b-k)/(E-k)))},t.b2j=function(b){var p=Math.max(0,Math.min(FYe(b,n),a-2)),k=n[p],E=n[p+1];return Math.max(0,Math.min(a-1,p+(b-k)/(E-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,p){return t.evalxy([],b,p)},t.ab2xy=function(b,p,k){if(!k&&(br[i-1]|pn[a-1]))return[!1,!1];var E=t.a2i(b),S=t.b2j(p),L=t.evalxy([],E,S);if(k){var x=0,C=0,M=[],g,P,T,z;br[i-1]?(g=i-2,P=1,x=(b-r[i-1])/(r[i-1]-r[i-2])):(g=Math.max(0,Math.min(i-2,Math.floor(E))),P=E-g),pn[a-1]?(T=a-2,z=1,C=(p-n[a-1])/(n[a-1]-n[a-2])):(T=Math.max(0,Math.min(a-2,Math.floor(S))),z=S-T),x&&(t.dxydi(M,g,T,P,z),L[0]+=M[0]*x,L[1]+=M[1]*x),C&&(t.dxydj(M,g,T,P,z),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,p,k){return[p.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,p,k){return[p.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var p=Math.max(0,Math.min(r.length-2,b));return r[p+1]-r[p]},t.dbdj=function(b){var p=Math.max(0,Math.min(n.length-2,b));return n[p+1]-n[p]},t.dxyda=function(b,p,k,E){var S=t.dxydi(null,b,p,k,E),L=t.dadi(b,k);return[S[0]/L,S[1]/L]},t.dxydb=function(b,p,k,E){var S=t.dxydj(null,b,p,k,E),L=t.dbdj(p,E);return[S[0]/L,S[1]/L]},t.dxyda_rough=function(b,p,k){var E=h*(k||.1),S=t.ab2xy(b+E,p,!0),L=t.ab2xy(b-E,p,!0);return[(S[0]-L[0])*.5/E,(S[1]-L[1])*.5/E]},t.dxydb_rough=function(b,p,k){var E=d*(k||.1),S=t.ab2xy(b,p+E,!0),L=t.ab2xy(b,p-E,!0);return[(S[0]-L[0])*.5/E,(S[1]-L[1])*.5/E]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var jYe=ye((Y2r,HYe)=>{"use strict";var J7=ho(),qYe=Dr().isArray1D,WKt=oYe(),BYe=cYe(),NYe=hYe(),UYe=gYe(),XKt=yYe(),VYe=a8(),GYe=xYe(),ZKt=i8(),YKt=OYe();HYe.exports=function(t,r){var n=J7.getFromId(t,r.xaxis),i=J7.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&qYe(s)&&u.push("x"),l&&qYe(l)&&u.push("y"),u.length&&ZKt(r,a,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?c.length:c,v=o.cheatertype==="index"?f.length:f;s=WKt(d,v,r.cheaterslope)}r._x=s=VYe(s),r._y=l=VYe(l),GYe(s,c,f),GYe(l,c,f),YKt(r),r.setScale();var _=BYe(s),b=BYe(l),p=.5*(_[1]-_[0]),k=.5*(_[1]+_[0]),E=.5*(b[1]-b[0]),S=.5*(b[1]+b[0]),L=1.3;return _=[k-p*L,k+p*L],b=[S-E*L,S+E*L],r._extremes[n._id]=J7.findExtremes(n,_,{padded:!0}),r._extremes[i._id]=J7.findExtremes(i,b,{padded:!0}),NYe(r,"a","b"),NYe(r,"b","a"),UYe(r,a),UYe(r,o),h.clipsegments=XKt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var XYe=ye((K2r,WYe)=>{"use strict";WYe.exports={attributes:H7(),supplyDefaults:WZe(),plot:nYe(),calc:jYe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:ph(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var YYe=ye((J2r,ZYe)=>{"use strict";ZYe.exports=XYe()});var C$=ye(($2r,$Ye)=>{"use strict";var KKt=Cg(),u0=pf(),JKt=Gl(),{hovertemplateAttrs:$Kt,texttemplateAttrs:QKt,templatefallbackAttrs:KYe}=Ll(),JYe=Tu(),Cx=Ao().extendFlat,sg=u0.marker,U5=u0.line,eJt=sg.line;$Ye.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Cx({},u0.mode,{dflt:"markers"}),text:Cx({},u0.text,{}),texttemplate:QKt({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:KYe({editType:"plot"}),hovertext:Cx({},u0.hovertext,{}),line:{color:U5.color,width:U5.width,dash:U5.dash,backoff:U5.backoff,shape:Cx({},U5.shape,{values:["linear","spline"]}),smoothing:U5.smoothing,editType:"calc"},connectgaps:u0.connectgaps,fill:Cx({},u0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:KKt(),marker:Cx({symbol:sg.symbol,opacity:sg.opacity,maxdisplayed:sg.maxdisplayed,angle:sg.angle,angleref:sg.angleref,standoff:sg.standoff,size:sg.size,sizeref:sg.sizeref,sizemin:sg.sizemin,sizemode:sg.sizemode,line:Cx({width:eJt.width,editType:"calc"},JYe("marker.line")),gradient:sg.gradient,editType:"calc"},JYe("marker")),textfont:u0.textfont,textposition:u0.textposition,selected:u0.selected,unselected:u0.unselected,hoverinfo:Cx({},JKt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:u0.hoveron,hovertemplate:$Kt(),hovertemplatefallback:KYe(),zorder:u0.zorder}});var rKe=ye((Q2r,tKe)=>{"use strict";var QYe=Dr(),tJt=Sm(),V5=Ru(),rJt=$p(),iJt=R0(),eKe=tT(),nJt=D0(),aJt=Rg(),oJt=C$();tKe.exports=function(t,r,n,i){function a(h,d){return QYe.coerce(t,r,oJt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l{"use strict";iKe.exports=function(t,r){var n={},i=r._carpet,a=i.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=i.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var $7=ye((twr,aKe)=>{"use strict";aKe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var oKe=Eo(),sJt=F0(),lJt=km(),uJt=z0(),cJt=O0().calcMarkerSize,fJt=$7();sKe.exports=function(t,r){var n=r._carpetTrace=fJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var i;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(i=0;i{"use strict";var hJt=sT(),uKe=ho(),dJt=So();cKe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=uKe.getFromId(t,l.xaxis||"x"),c=uKe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var vJt=fT(),pJt=Dr().fillText;hKe.exports=function(t,r,n,i){var a=vJt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,v=h._module.formatLabels(f,h);o.yLabel=v.yLabel,delete o.text;var _=[];function b(E,S){var L;E.labelprefix&&E.labelprefix.length>0?L=E.labelprefix.replace(/ = $/,""):L=E._hovertitle,_.push(L+": "+S.toFixed(3)+E.labelsuffix)}if(!h.hovertemplate){var p=f.hi||h.hoverinfo,k=p.split("+");k.indexOf("all")!==-1&&(k=["a","b","text"]),k.indexOf("a")!==-1&&b(d.aaxis,f.a),k.indexOf("b")!==-1&&b(d.baxis,f.b),_.push("y: "+o.yLabel),k.indexOf("text")!==-1&&pJt(f,h,_),o.extraText=_.join("
")}return a}});var pKe=ye((awr,vKe)=>{"use strict";vKe.exports=function(t,r,n,i,a){var o=i[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var mKe=ye((owr,gKe)=>{"use strict";gKe.exports={attributes:C$(),supplyDefaults:rKe(),colorbar:$d(),formatLabels:nKe(),calc:lKe(),plot:fKe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:dKe(),selectPoints:hT(),eventData:pKe(),moduleType:"trace",name:"scattercarpet",basePlotModule:ph(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var _Ke=ye((swr,yKe)=>{"use strict";yKe.exports=mKe()});var L$=ye((lwr,xKe)=>{"use strict";var lg=PT(),g1=C4(),gJt=Tu(),mJt=Ao().extendFlat,ry=g1.contours;xKe.exports=mJt({carpet:{valType:"string",editType:"calc"},z:lg.z,a:lg.x,a0:lg.x0,da:lg.dx,b:lg.y,b0:lg.y0,db:lg.dy,text:lg.text,hovertext:lg.hovertext,transpose:lg.transpose,atype:lg.xtype,btype:lg.ytype,fillcolor:g1.fillcolor,autocontour:g1.autocontour,ncontours:g1.ncontours,contours:{type:ry.type,start:ry.start,end:ry.end,size:ry.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:ry.showlines,showlabels:ry.showlabels,labelfont:ry.labelfont,labelformat:ry.labelformat,operation:ry.operation,value:ry.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:g1.line.color,width:g1.line.width,dash:g1.line.dash,smoothing:g1.line.smoothing,editType:"plot"},zorder:g1.zorder},gJt("",{cLetter:"z",autoColorDflt:!1}))});var P$=ye((uwr,TKe)=>{"use strict";var bKe=Dr(),yJt=e8(),wKe=L$(),_Jt=MG(),xJt=A8(),bJt=S8();TKe.exports=function(t,r,n,i){function a(u,c){return bKe.coerce(t,r,wKe,u,c)}function o(u){return bKe.coerce2(t,r,wKe,u)}if(a("carpet"),t.a&&t.b){var s=yJt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?_Jt(t,r,a,i,n,{hasHover:!1}):(xJt(t,r,a,o),bJt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var EKe=ye((cwr,MKe)=>{"use strict";var wJt=gv(),AKe=Dr(),TJt=i8(),AJt=a8(),SJt=o8(),MJt=s8(),SKe=YV(),EJt=P$(),kJt=$7(),CJt=vG();MKe.exports=function(t,r){var n=r._carpetTrace=kJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var i=t.data[n.index],a=t.data[r.index];a.a||(a.a=i.a),a.b||(a.b=i.b),EJt(a,r,r._defaultColor,t._fullLayout)}var o=LJt(t,r);return CJt(r,r._z),o}};function LJt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,l,u,c,f;n._minDtick=0,i._minDtick=0,AKe.isArray1D(t.z)&&TJt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],l=l?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=AJt(t._z||t.z,t.transpose),t._emptypoints=MJt(f),SJt(f,t._emptypoints);var h=AKe.maxRowLength(f),d=t.xtype==="scaled"?"":a,v=SKe(t,d,o,s,h,n),_=t.ytype==="scaled"?"":l,b=SKe(t,_,u,c,f.length,i),p={a:v,b,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&wJt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[p]}});var CKe=ye((fwr,kKe)=>{"use strict";var PJt=Dr().isArrayOrTypedArray;kKe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,_,b,p=PJt(r)?"a":"b",k=p==="a"?e.aaxis:e.baxis,E=k.smoothing,S=p==="a"?e.a2i:e.b2j,L=p==="a"?r:n,x=p==="a"?n:r,C=p==="a"?t.a.length:t.b.length,M=p==="a"?t.b.length:t.a.length,g=Math.floor(p==="a"?e.b2j(x):e.a2i(x)),P=p==="a"?function(_e){return e.evalxy([],_e,g)}:function(_e){return e.evalxy([],g,_e)};E&&(o=Math.max(0,Math.min(M-2,g)),s=g-o,a=p==="a"?function(_e,Ee){return e.dxydi([],_e,o,Ee,s)}:function(_e,Ee){return e.dxydj([],o,_e,s,Ee)});var T=S(L[0]),z=S(L[1]),O=T0?Math.floor:Math.ceil,Z=O>0?Math.ceil:Math.floor,j=O>0?Math.min:Math.max,N=O>0?Math.max:Math.min,H=G(T+V),te=Z(z-V);c=P(T);var oe=[[c]];for(i=H;i*O{"use strict";var e9=Oa(),t9=S$(),DKe=M$(),sC=So(),m1=Dr(),IJt=gG(),RJt=mG(),vw=k8(),Q7=P4(),DJt=bG(),FJt=xG(),zJt=wG(),OJt=$7(),LKe=CKe();FKe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;m1.makeTraceGroups(i,n,"contour").each(function(s){var l=e9.select(this),u=s[0],c=u.trace,f=c._carpetTrace=OJt(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,v=u.b,_=c.contours,b=FJt(_,r,u),p=_.type==="constraint",k=_._operation,E=p?k==="="?"lines":"fill":_.coloring;function S(G){var Z=f.ab2xy(G[0],G[1],!0);return[a.c2p(Z[0]),o.c2p(Z[1])]}var L=[[d[0],v[v.length-1]],[d[d.length-1],v[v.length-1]],[d[d.length-1],v[0]],[d[0],v[0]]];IJt(b);var x=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;RJt(b,x,C);var M=b;_.type==="constraint"&&(M=DJt(b,k)),qJt(b,S);var g,P,T,z,O=[];for(z=h.clipsegments.length-1;z>=0;z--)g=h.clipsegments[z],P=t9([],g.x,a.c2p),T=t9([],g.y,o.c2p),P.reverse(),T.reverse(),O.push(DKe(P,T,g.bicubic));var V="M"+O.join("L")+"Z";UJt(l,h.clipsegments,a,o,p,E),VJt(c,l,a,o,M,L,S,f,h,E,V),BJt(l,b,t,u,_,r,f),sC.setClipUrl(l,f._clipPathId,t)})};function qJt(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;rb&&(n.max=b),n.len=n.max-n.min}function PKe(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function IKe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function RKe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function UJt(e,t,r,n,i,a){var o,s,l,u,c=m1.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!i?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u=0&&(d=P,_=b):Math.abs(h[1]-d[1])=0&&(d=P,_=b):m1.log("endpt to newendpt is not vert. or horz.",h,d,P)}if(_>=0)break;u+=M(h,d),h=d}if(_===t.edgepaths.length){m1.log("unclosed perimeter path");break}l=_,f=c.indexOf(l)===-1,f&&(l=c[0],u+=M(h,d)+"Z",h=null)}for(l=0;l{"use strict";OKe.exports={attributes:L$(),supplyDefaults:P$(),colorbar:P8(),calc:EKe(),plot:zKe(),style:L8(),moduleType:"trace",name:"contourcarpet",basePlotModule:ph(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var NKe=ye((vwr,BKe)=>{"use strict";BKe.exports=qKe()});var i9=ye((pwr,jKe)=>{"use strict";var r9=Dr().extendFlat,lC=pf(),UKe=df().axisHoverFormat,{hovertemplateAttrs:HJt,templatefallbackAttrs:jJt}=Ll(),GKe=Pd().dash,WJt=a3(),HKe=XT(),XJt=HKe.INCREASING.COLOR,ZJt=HKe.DECREASING.COLOR,I$=lC.line;function VKe(e){return{line:{color:r9({},I$.color,{dflt:e}),width:I$.width,dash:GKe,editType:"style"},editType:"style"}}jKe.exports={xperiod:lC.xperiod,xperiod0:lC.xperiod0,xperiodalignment:lC.xperiodalignment,xhoverformat:UKe("x"),yhoverformat:UKe("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:r9({},I$.width,{}),dash:r9({},GKe,{}),editType:"style"},increasing:VKe(XJt),decreasing:VKe(ZJt),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:HJt({},{keys:["open","high","low","close"]}),hovertemplatefallback:jJt(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:r9({},WJt.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:lC.zorder}});var R$=ye((gwr,WKe)=>{"use strict";var YJt=qa(),KJt=Dr();WKe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=YJt.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],i),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,KJt.minRowLength(a))),r._length=f,f}}});var YKe=ye((mwr,ZKe)=>{"use strict";var JJt=Dr(),$Jt=R$(),QJt=Ig(),e$t=i9();ZKe.exports=function(t,r,n,i){function a(s,l){return JJt.coerce(t,r,e$t,s,l)}var o=$Jt(t,r,a,i);if(!o){r.visible=!1;return}QJt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),XKe(t,r,a,"increasing"),XKe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function XKe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var D$=ye((ywr,JKe)=>{"use strict";var G5=Dr(),n9=G5._,a9=ho(),t$t=Dg(),uC=fs().BADNUM;function r$t(e,t){var r=a9.getFromId(e,t.xaxis),n=a9.getFromId(e,t.yaxis),i=n$t(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=KKe(e,t,o,s,n,i$t);return t._extremes[r._id]=a9.findExtremes(r,s,{vpad:a/2}),l.length?(G5.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function i$t(e,t,r,n){return{o:e,h:t,l:r,c:n}}function KKe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),l=i.makeCalcdata(t,"low"),u=i.makeCalcdata(t,"close"),c=G5.isArrayOrTypedArray(t.text),f=G5.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,_=[],b=0;bd):h=L>k,d=L;var x=a(k,E,S,L);x.pos=p,x.yc=(k+L)/2,x.i=b,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[S,E],v&&(x.orig_p=r[b]),c&&(x.tx=t.text[b]),f&&(x.htx=t.hovertext[b]),_.push(x)}else _.push({pos:p,empty:!0})}return t._extremes[i._id]=a9.findExtremes(i,G5.concat(l,s),{padded:!0}),_.length&&(_[0].t={labels:{open:n9(e,"open:")+" ",high:n9(e,"high:")+" ",low:n9(e,"low:")+" ",close:n9(e,"close:")+" "}}),_}function n$t(e,t,r){var n=r._minDiff;if(!n){var i=e._fullData,a=[];n=1/0;var o;for(o=0;o{"use strict";var a$t=Oa(),$Ke=Dr();QKe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;$Ke.makeTraceGroups(i,n,"trace ohlc").each(function(l){var u=a$t.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,v=u.selectAll("path").data($Ke.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(_){if(_.empty)return"M0,0Z";var b=o.c2p(_.pos-d,!0),p=o.c2p(_.pos+d,!0),k=s?(b+p)/2:o.c2p(_.pos,!0),E=a.c2p(_.o,!0),S=a.c2p(_.h,!0),L=a.c2p(_.l,!0),x=a.c2p(_.c,!0);return"M"+b+","+E+"H"+k+"M"+k+","+S+"V"+L+"M"+p+","+x+"H"+k})})}});var rJe=ye((xwr,tJe)=>{"use strict";var F$=Oa(),o$t=So(),s$t=ka();tJe.exports=function(t,r,n){var i=n||F$.select(t).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(a){return a[0].trace.opacity}),i.each(function(a){var o=a[0].trace;F$.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;F$.select(this).style("fill","none").call(s$t.stroke,l.color).call(o$t.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var O$=ye((bwr,sJe)=>{"use strict";var z$=ho(),l$t=Dr(),o9=vf(),u$t=ka(),c$t=Dr().fillText,iJe=XT(),f$t={increasing:iJe.INCREASING.SYMBOL,decreasing:iJe.DECREASING.SYMBOL};function h$t(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?aJe(e,t,r,n):oJe(e,t,r,n)}function nJe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,d=s.bPos||0,v=function(P){return P.pos+d-t},_=s.bdPos||s.tickLen,b=s.wHover,p=Math.min(1,_/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-p,h=e.maxSpikeDistance-p;function k(P){var T=v(P);return o9.inbox(T-b,T+b,f)}function E(P){var T=P[u],z=P[c];return T===z||o9.inbox(T-r,z-r,f)}function S(P){return(k(P)+E(P))/2}var L=o9.getDistanceFunction(n,k,E,S);if(o9.getClosest(i,L,e),e.index===!1)return null;var x=i[e.index];if(x.empty)return null;var C=x.dir,M=o[C],g=M.line.color;return u$t.opacity(g)&&M.line.width?e.color=g:e.color=M.fillcolor,e.x0=a.c2p(x.pos+d-_,!0),e.x1=a.c2p(x.pos+d+_,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=S(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function aJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=nJe(e,t,r,n);if(!u)return[];var c=i[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],d={},v=0;v"+s.labels[_]+z$.hoverLabelText(a,b,o.yhoverformat)):(k=l$t.extendFlat({},u),k.y0=k.y1=p,k.yLabelVal=b,k.yLabel=s.labels[_]+z$.hoverLabelText(a,b,o.yhoverformat),k.name="",l.push(k),d[b]=k)}return l}function oJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=nJe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(S){return s.labels[S]+z$.hoverLabelText(a,o[S][f],o.yhoverformat)}var v=c.hi||o.hoverinfo||"",_=v.split("+"),b=v==="all",p=b||_.indexOf("y")!==-1,k=b||_.indexOf("text")!==-1,E=p?[d("open"),d("high"),d("low"),d("close")+" "+f$t[h]]:[];return k&&c$t(c,o,E),l.extraText=E.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}sJe.exports={hoverPoints:h$t,hoverSplit:aJe,hoverOnPoints:oJe}});var q$=ye((wwr,lJe)=>{"use strict";lJe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";uJe.exports={moduleType:"trace",name:"ohlc",basePlotModule:ph(),categories:["cartesian","svg","showLegend"],meta:{},attributes:i9(),supplyDefaults:YKe(),calc:D$().calc,plot:eJe(),style:rJe(),hoverPoints:O$().hoverPoints,selectPoints:q$()}});var hJe=ye((Awr,fJe)=>{"use strict";fJe.exports=cJe()});var N$=ye((Swr,pJe)=>{"use strict";var B$=Dr().extendFlat,dJe=df().axisHoverFormat,dp=i9(),H5=x4();function vJe(e){return{line:{color:B$({},H5.line.color,{dflt:e}),width:H5.line.width,editType:"style"},fillcolor:H5.fillcolor,editType:"style"}}pJe.exports={xperiod:dp.xperiod,xperiod0:dp.xperiod0,xperiodalignment:dp.xperiodalignment,xhoverformat:dJe("x"),yhoverformat:dJe("y"),x:dp.x,open:dp.open,high:dp.high,low:dp.low,close:dp.close,line:{width:B$({},H5.line.width,{}),editType:"style"},increasing:vJe(dp.increasing.line.color.dflt),decreasing:vJe(dp.decreasing.line.color.dflt),text:dp.text,hovertext:dp.hovertext,hovertemplate:dp.hovertemplate,hovertemplatefallback:dp.hovertemplatefallback,whiskerwidth:B$({},H5.whiskerwidth,{dflt:0}),hoverlabel:dp.hoverlabel,zorder:H5.zorder}});var yJe=ye((Mwr,mJe)=>{"use strict";var d$t=Dr(),v$t=ka(),p$t=R$(),g$t=Ig(),m$t=N$();mJe.exports=function(t,r,n,i){function a(s,l){return d$t.coerce(t,r,m$t,s,l)}var o=p$t(t,r,a,i);if(!o){r.visible=!1;return}g$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),gJe(t,r,a,"increasing"),gJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function gJe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",v$t.addOpacity(i,.5))}});var wJe=ye((Ewr,bJe)=>{"use strict";var _Je=Dr(),xJe=ho(),y$t=Dg(),_$t=D$().calcCommon;bJe.exports=function(e,t){var r=e._fullLayout,n=xJe.getFromId(e,t.xaxis),i=xJe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=y$t(t,n,"x",a).vals,s=_$t(e,t,a,o,i,x$t);return s.length?(_Je.extendFlat(s[0].t,{num:r._numBoxes,dPos:_Je.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function x$t(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var AJe=ye((kwr,TJe)=>{"use strict";TJe.exports={moduleType:"trace",name:"candlestick",basePlotModule:ph(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:N$(),layoutAttributes:b4(),supplyLayoutDefaults:ZI().supplyLayoutDefaults,crossTraceCalc:KI().crossTraceCalc,supplyDefaults:yJe(),calc:wJe(),plot:JI().plot,layerName:"boxlayer",style:$I().style,hoverPoints:O$().hoverPoints,selectPoints:q$()}});var MJe=ye((Cwr,SJe)=>{"use strict";SJe.exports=AJe()});var V$=ye((Lwr,EJe)=>{"use strict";var l9=Dr(),b$t=ym(),s9=l9.deg2rad,U$=l9.rad2deg;EJe.exports=function(t,r,n){switch(b$t(t,n),t._id){case"x":case"radialaxis":w$t(t,r);break;case"angularaxis":S$t(t,r);break}};function w$t(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],i=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(i-n),s=a/o,l=n>i?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function T$t(e,t){return t==="degrees"?s9(e):e}function A$t(e,t){return t==="degrees"?U$(e):e}function S$t(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return T$t(n(a),o)},e.c2d=function(a,o){return i(A$t(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(b){return e.d2c(b,a.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";kJe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var f9=ye((Iwr,RJe)=>{"use strict";var pw=Dr(),CJe=kM().tester,G$=pw.findIndexOfMin,PJe=pw.isAngleInsideSector,M$t=pw.angleDelta,LJe=pw.angleDist;function E$t(e,t,r,n,i){if(!PJe(t,n))return!1;var a,o;r[0]0?o:1/0},n=G$(t,r),i=pw.mod(n+1,t.length);return[t[n],t[i]]}function c9(e){return Math.abs(e)>1e-10?e:0}function H$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function DJe(e){return e<0?-1:e>0?1:0}function W5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function X5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function FJe(e,t){return t*e.radius}function F$t(e,t,r,n){var i=X5(e,W5([r,t])),a=i[0],o=i[1],s=X5(e,W5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=FJe(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function z$t(e,t,r,n){var i=FJe(e,1/(t+1)),a=X5(e,W5([t,r])),o=a[0],s=a[1],l=X5(e,W5([t,n])),u=l[0],c=l[1];if(DJe(r)!==DJe(n)){var f=X5(e,W5([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var gw=Oa(),O$t=cd(),yw=qa(),Xc=Dr(),iy=Xc.strRotate,xd=Xc.strTranslate,W$=ka(),cC=So(),q$t=Mc(),vp=ho(),B$t=ym(),N$t=V$(),U$t=Ag().doAutoRange,y1=NN(),v9=yv(),OJe=vf(),V$t=Eb(),G$t=Of().prepSelect,H$t=Of().selectOnClick,X$=Of().clearOutline,qJe=Sg(),BJe=vM(),NJe=wM().redrawReglTraces,j$t=$h().MID_SHIFT,Lx=u9(),_1=f9(),p9=j$(),h9=p9.smith,W$t=p9.reactanceArc,X$t=p9.resistanceArc,d9=p9.smithTransform,Z$t=Xc._,UJe=Xc.mod,Px=Xc.deg2rad,mw=Xc.rad2deg;function VJe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i="clip"+n._uid+t;this.clipIds.forTraces=i+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Nd=VJe.prototype;jJe.exports=function(t,r,n){return new VJe(t,r,n)};Nd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(p=u,k=u*b,L=(c-k)/i.h/2,E=[s[0],s[1]],S=[l[0]+L,l[1]-L]):(p=c/b,k=c,L=(u-p)/i.w/2,E=[s[0]+L,s[1]-L],S=[l[0],l[1]]),r.xLength2=p,r.yLength2=k,r.xDomain2=E,r.yDomain2=S;var x=r.xOffset2=i.l+i.w*E[0],C=r.yOffset2=i.t+i.h*(1-S[1]),M=r.radius=p/d,g=r.innerRadius=r.getHole(t)*M,P=r.cx=x-M*h[0],T=r.cy=C+M*h[3],z=r.cxx=P-x,O=r.cyy=T-C,V=a.side,G;V==="counterclockwise"?(G=V,V="top"):V==="clockwise"&&(G=V,V="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:V,_trueSide:G,domain:[g/i.w,M/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:E}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:S});var Z=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",Z).attr("transform",xd(z,O)),n.frontplot.attr("transform",xd(x,C)).call(cC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",Z).attr("transform",xd(P,T)).call(W$.fill,t.bgcolor)};Nd.mockAxis=function(e,t,r,n){var i=Xc.extendFlat({},r,n);return N$t(i,t,e),i};Nd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Xc.extendFlat({type:"linear"},r);B$t(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[a],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!i?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Nd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);U$t(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],i.minallowed!==void 0){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(i.maxallowed!==void 0){var l=i.r2l(i.maxallowed);i._rl[0]90&&c<=270&&(f.tickangle=180);var v=d?function(M){var g=d9(r,h9([M.x,0]));return xd(g[0]-s,g[1]-l)}:function(M){return xd(f.l2p(M.x)+o,0)},_=d?function(M){return X$t(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(f.r2p(M.x)+o)},b=GJe(u);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){f.setScale();var p=0,k=d?(f.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return vp.tickText(f,M,!0,!1)}):vp.calcTicks(f),E=d?k:vp.clipEnds(f,k),S=vp.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(S=-S),f.ticks==="top"&&f.side==="top"&&(p=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(p=f.ticklen)),vp.drawTicks(n,f,{vals:k,layer:i["radial-axis"],path:vp.makeTickPath(f,0,S),transFn:v,crisp:!1}),vp.drawGrid(n,f,{vals:E,layer:i["radial-grid"],path:_,transFn:Xc.noop,crisp:!1}),vp.drawLabels(n,f,{vals:k,layer:i["radial-axis"],transFn:v,labelFns:vp.makeLabelFns(f,p)})}var L=r.radialAxisAngle=r.vangles?mw(HJe(Px(u.angle),r.vangles)):u.angle,x=xd(s,l),C=x+iy(-L);fC(i["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:C}),fC(i["radial-grid"],h&&u.showgrid,{transform:d?"":x}),fC(i["radial-line"].select("line"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",u.linewidth).call(W$.stroke,u.linecolor)};Nd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=cC.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,d=l.side;c=d==="top"?h:d==="counterclockwise"?-(f+h*.4):f+h*.8}var v=r!==void 0?r:n.radialAxisAngle,_=Px(v),b=Math.cos(_),p=Math.sin(_),k=o+a/2*b+c*p,E=s-a/2*p+c*b;n.layers["radial-axis-title"]=V$t.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:Z$t(i,"Click to enter radial axis title"),attributes:{x:k,y:E,"text-anchor":"middle"},transform:{rotate:-v}})}};Nd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(g){var P=d9(r,h9([0,g.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(g){return c.t2g(g.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=mw(c.tick0),c.dtick=mw(c.dtick));var d=function(g){return xd(s+a*Math.cos(g),l-a*Math.sin(g))},v=f?function(g){var P=d9(r,h9([0,g.x]));return xd(P[0],P[1])}:function(g){return d(h(g))},_=f?function(g){var P=d9(r,h9([0,g.x])),T=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return xd(P[0],P[1])+iy(-mw(T))}:function(g){var P=h(g);return d(P)+iy(-mw(P))},b=f?function(g){return W$t(r,g.x,0,1/0)}:function(g){var P=h(g),T=Math.cos(P),z=Math.sin(P);return"M"+[s+o*T,l-o*z]+"L"+[s+a*T,l-a*z]},p=vp.makeLabelFns(c,0),k=p.labelStandoff,E={};E.xFn=function(g){var P=h(g);return Math.cos(P)*k},E.yFn=function(g){var P=h(g),T=Math.sin(P)>0?.2:1;return-Math.sin(P)*(k+g.fontSize*T)+Math.abs(Math.cos(P))*(g.fontSize*j$t)},E.anchorFn=function(g){var P=h(g),T=Math.cos(P);return Math.abs(T)<.1?"middle":T>0?"start":"end"},E.heightFn=function(g,P,T){var z=h(g);return-.5*(1+Math.sin(z))*T};var S=GJe(u);r.angularTickLayout!==S&&(i["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=S);var L=f?[1/0].concat(c.tickvals||[]).map(function(g){return vp.tickText(c,g,!0,!1)}):vp.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=L.map(h),Xc.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(L=L.filter(function(g){return Xc.isAngleInsideSector(h(g),r.sectorInRad)})),c.visible){var C=c.ticks==="inside"?-1:1,M=(c.linewidth||1)/2;vp.drawTicks(n,c,{vals:L,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*c.ticklen,transFn:_,crisp:!1}),vp.drawGrid(n,c,{vals:L,layer:i["angular-grid"],path:b,transFn:Xc.noop,crisp:!1}),vp.drawLabels(n,c,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:v,labelFns:E})}fC(i["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:xd(s,l)}).attr("stroke-width",u.linewidth).call(W$.stroke,u.linecolor)};Nd.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)}};Nd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Lx.MINZOOM,s=Lx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,_=t.vangles,b=t.radialAxis,p=_1.clampTiny,k=_1.findXYatLength,E=_1.findEnclosingVertexAngles,S=Lx.cornerHalfWidth,L=Lx.cornerLen/2,x,C,M=y1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");gw.select(M).attr("d",t.pathSubplot()).attr("transform",xd(c,f)),M.onmousemove=function(ce){OJe.hover(n,ce,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(ce){n._dragging||v9.unhover(n,ce)};var g={element:M,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},P,T,z,O,V,G,Z,j,N;function H(ce,Ze){return Math.sqrt(ce*ce+Ze*Ze)}function te(ce,Ze){return H(ce-h,Ze-d)}function oe(ce,Ze){return Math.atan2(d-Ze,ce-h)}function _e(ce,Ze){return[ce*Math.cos(Ze),ce*Math.sin(-Ze)]}function Ee(ce,Ze){if(ce===0)return t.pathSector(2*S);var ut=L/ce,pt=Ze-ut,Zt=Ze+ut,st=Math.max(0,Math.min(ce,l)),lt=st-S,Gt=st+S;return"M"+_e(lt,pt)+"A"+[lt,lt]+" 0,0,0 "+_e(lt,Zt)+"L"+_e(Gt,Zt)+"A"+[Gt,Gt]+" 0,0,1 "+_e(Gt,pt)+"Z"}function Ce(ce,Ze,ut){if(ce===0)return t.pathSector(2*S);var pt=_e(ce,Ze),Zt=_e(ce,ut),st=p((pt[0]+Zt[0])/2),lt=p((pt[1]+Zt[1])/2),Gt,Nt;if(st&<){var Jt=lt/st,sr=-1/Jt,wr=k(S,Jt,st,lt);Gt=k(L,sr,wr[0][0],wr[0][1]),Nt=k(L,sr,wr[1][0],wr[1][1])}else{var cr,$e;lt?(cr=L,$e=S):(cr=S,$e=L),Gt=[[st-cr,lt-$e],[st+cr,lt-$e]],Nt=[[st-cr,lt+$e],[st+cr,lt+$e]]}return"M"+Gt.join("L")+"L"+Nt.reverse().join("L")+"Z"}function me(){z=null,O=null,V=t.pathSubplot(),G=!1;var ce=n._fullLayout[t.id];Z=O$t(ce.bgcolor).getLuminance(),j=y1.makeZoombox(a,Z,c,f,V),j.attr("fill-rule","evenodd"),N=y1.makeCorners(a,c,f),X$(n)}function ie(ce,Ze){return Ze=Math.max(Math.min(Ze,l),u),ceo?(ce-1&&ce===1&&H$t(Ze,n,[t.xaxis],[t.yaxis],t.id,g),ut.indexOf("event")>-1&&OJe.click(n,Ze,t.id)}g.prepFn=function(ce,Ze,ut){var pt=n._fullLayout.dragmode,Zt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var st=n._fullLayout._invTransform;x=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var lt=Xc.apply3DTransform(st)(Ze-Zt.left,ut-Zt.top);if(P=lt[0],T=lt[1],_){var Gt=_1.findPolygonOffset(l,v[0],v[1],_);P+=h+Gt[0],T+=d+Gt[1]}switch(pt){case"zoom":g.clickFn=Re,r||(_?g.moveFn=Fe:g.moveFn=Le,g.doneFn=Pe,me(ce,Ze,ut));break;case"select":case"lasso":G$t(ce,Ze,ut,g,pt);break}},v9.init(g)};Nd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=Lx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Px(n.radialAxisAngle),v=c._rl,_=v[0],b=v[1],p=v[r],k=.75*(v[1]-v[0])/(1-n.getHole(t))/o,E,S,L;r?(E=l+(o+h)*Math.cos(d),S=u-(o+h)*Math.sin(d),L="radialdrag"):(E=l+(s-h)*Math.cos(d),S=u-(s-h)*Math.sin(d),L="radialdrag-inner");var x=y1.makeRectDragger(a,L,"crosshair",-h,-h,f,f),C={element:x,gd:i};e.dragmode===!1&&(C.dragmode=!1),fC(gw.select(x),c.visible&&s0!=(r?P>_:P=90||i>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),i<=180&&a>=180||i>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function HJe(e,t){var r=function(i){return Xc.angleDist(e,i)},n=Xc.findIndexOfMin(t,r);return t[n]}function fC(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var Y$=ye((Fwr,JJe)=>{"use strict";var K$t=Lh(),os=Rd(),J$t=Cc().attributes,c0=Dr().extendFlat,WJe=mc().overrideAll,XJe=WJe({color:os.color,showline:c0({},os.showline,{dflt:!0}),linecolor:os.linecolor,linewidth:os.linewidth,showgrid:c0({},os.showgrid,{dflt:!0}),gridcolor:os.gridcolor,gridwidth:os.gridwidth,griddash:os.griddash},"plot","from-root"),ZJe=WJe({tickmode:os.minor.tickmode,nticks:os.nticks,tick0:os.tick0,dtick:os.dtick,tickvals:os.tickvals,ticktext:os.ticktext,ticks:os.ticks,ticklen:os.ticklen,tickwidth:os.tickwidth,tickcolor:os.tickcolor,ticklabelstep:os.ticklabelstep,showticklabels:os.showticklabels,labelalias:os.labelalias,minorloglabels:os.minorloglabels,showtickprefix:os.showtickprefix,tickprefix:os.tickprefix,showticksuffix:os.showticksuffix,ticksuffix:os.ticksuffix,showexponent:os.showexponent,exponentformat:os.exponentformat,minexponent:os.minexponent,separatethousands:os.separatethousands,tickfont:os.tickfont,tickangle:os.tickangle,tickformat:os.tickformat,tickformatstops:os.tickformatstops,layer:os.layer},"plot","from-root"),YJe={visible:c0({},os.visible,{dflt:!0}),type:c0({},os.type,{values:["-","linear","log","date","category"]}),autotypenumbers:os.autotypenumbers,autorangeoptions:{minallowed:os.autorangeoptions.minallowed,maxallowed:os.autorangeoptions.maxallowed,clipmin:os.autorangeoptions.clipmin,clipmax:os.autorangeoptions.clipmax,include:os.autorangeoptions.include,editType:"plot"},autorange:c0({},os.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:c0({},os.minallowed,{editType:"plot"}),maxallowed:c0({},os.maxallowed,{editType:"plot"}),range:c0({},os.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:os.categoryorder,categoryarray:os.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:os.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:c0({},os.title.text,{editType:"plot",dflt:""}),font:c0({},os.title.font,{editType:"plot"}),editType:"plot"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(YJe,XJe,ZJe);var KJe={visible:c0({},os.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:os.autotypenumbers,categoryorder:os.categoryorder,categoryarray:os.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(KJe,XJe,ZJe);JJe.exports={domain:J$t({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:K$t.background},radialaxis:YJe,angularaxis:KJe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var t$e=ye((zwr,e$e)=>{"use strict";var g9=Dr(),$$t=ka(),Q$t=vl(),eQt=k_(),tQt=Id().getSubplotData,rQt=bb(),iQt=M3(),nQt=e_(),aQt=t_(),oQt=oI(),sQt=t4(),lQt=_B(),uQt=R3(),QJe=Y$(),cQt=V$(),m9=u9(),$Je=m9.axisNames;function fQt(e,t,r,n){var i=r("bgcolor");n.bgColor=$$t.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=tQt(n.fullData,m9.name,n.id),s=n.layoutOut,l;function u(j,N){return r(l+"."+j,N)}for(var c=0;c<$Je.length;c++){l=$Je[c],g9.isPlainObject(e[l])||(e[l]={});var f=e[l],h=Q$t.newContainer(t,l);h._id=h._name=l,h._attr=n.id+"."+l,h._traceIndices=o.map(function(j){return j.index});var d=m9.axisName2dataArray[l],v=hQt(f,h,u,o,d,n);oQt(f,h,u,{axData:o,dataAttr:d});var _=u("visible");switch(cQt(h,t,s),u("uirevision",t.uirevision),h._m=1,l){case"radialaxis":u("minallowed"),u("maxallowed");var b=u("range"),p=h.getAutorangeDflt(b),k=u("autorange",p),E;b&&(b[0]===null&&b[1]===null||(b[0]===null||b[1]===null)&&(k==="reversed"||k===!0)||b[0]!==null&&(k==="min"||k==="max reversed")||b[1]!==null&&(k==="max"||k==="min reversed"))&&(b=void 0,delete h.range,h.autorange=!0,E=!0),E||(p=h.getAutorangeDflt(b),k=u("autorange",p)),f.autorange=k,k&&(lQt(u,k,b),(v==="linear"||v==="-")&&u("rangemode"),h.isReversed()&&(h._m=-1)),h.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(v==="date"){g9.log("Polar plots do not support date angular axes yet.");for(var S=0;S{"use strict";var dQt=Id().getSubplotCalcData,vQt=Dr().counterRegex,pQt=Z$(),i$e=u9(),n$e=i$e.attr,_w=i$e.name,r$e=vQt(_w),a$e={};a$e[n$e]={valType:"subplotid",dflt:_w,editType:"calc"};function gQt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[_w],i=0;i{"use strict";var{hovertemplateAttrs:yQt,texttemplateAttrs:_Qt,templatefallbackAttrs:s$e}=Ll(),_9=Ao().extendFlat,xQt=Cg(),f0=pf(),bQt=Gl(),Z5=f0.line;l$e.exports={mode:f0.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:f0.text,texttemplate:_Qt({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:s$e({editType:"plot"}),hovertext:f0.hovertext,line:{color:Z5.color,width:Z5.width,dash:Z5.dash,backoff:Z5.backoff,shape:_9({},Z5.shape,{values:["linear","spline"]}),smoothing:Z5.smoothing,editType:"calc"},connectgaps:f0.connectgaps,marker:f0.marker,cliponaxis:_9({},f0.cliponaxis,{dflt:!1}),textposition:f0.textposition,textfont:f0.textfont,fill:_9({},f0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:xQt(),hoverinfo:_9({},bQt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:f0.hoveron,hovertemplate:yQt(),hovertemplatefallback:s$e(),selected:f0.selected,unselected:f0.unselected}});var b9=ye((Bwr,f$e)=>{"use strict";var x9=Dr(),Y5=Ru(),wQt=$p(),TQt=R0(),u$e=tT(),AQt=D0(),SQt=Rg(),MQt=Sm().PTS_LINESONLY,EQt=hC();function kQt(e,t,r,n){function i(s,l){return x9.coerce(e,t,EQt,s,l)}var a=c$e(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var CQt=Dr(),h$e=ho();d$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=n[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);i.rLabel=h$e.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?CQt.rad2deg(t.theta):t.theta;return i.thetaLabel=h$e.tickText(s,u,!0).text,i}});var g$e=ye((Uwr,p$e)=>{"use strict";var v$e=Eo(),LQt=fs().BADNUM,PQt=ho(),IQt=F0(),RQt=km(),DQt=z0(),FQt=O0().calcMarkerSize;p$e.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var zQt=sT(),m$e=fs().BADNUM;y$e.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var OQt=fT();function qQt(e,t,r,n){var i=OQt(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,x$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function x$e(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(i,n.rLabel),f.indexOf("theta")!==-1&&c(a,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}b$e.exports={hoverPoints:qQt,makeHoverPointText:x$e}});var T$e=ye((Hwr,w$e)=>{"use strict";w$e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:y9(),categories:["polar","symbols","showLegend","scatter-like"],attributes:hC(),supplyDefaults:b9().supplyDefaults,colorbar:$d(),formatLabels:w9(),calc:g$e(),plot:_$e(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:T9().hoverPoints,selectPoints:hT(),meta:{}}});var S$e=ye((jwr,A$e)=>{"use strict";A$e.exports=T$e()});var K$=ye((Zwr,E$e)=>{"use strict";var M$e=hC(),{cliponaxis:Wwr,hoveron:Xwr}=M$e,BQt=uee(M$e,["cliponaxis","hoveron"]),{connectgaps:NQt,line:{color:UQt,dash:VQt,width:GQt},fill:HQt,fillcolor:jQt,marker:WQt,textfont:XQt,textposition:ZQt}=lk();E$e.exports=q1(mg({},BQt),{connectgaps:NQt,fill:HQt,fillcolor:jQt,line:{color:UQt,dash:VQt,editType:"calc",width:GQt},marker:WQt,textfont:XQt,textposition:ZQt})});var L$e=ye((Kwr,C$e)=>{"use strict";var k$e=Dr(),J$=Ru(),YQt=b9().handleRThetaDefaults,KQt=$p(),JQt=R0(),$Qt=D0(),QQt=Rg(),eer=Sm().PTS_LINESONLY,ter=K$();C$e.exports=function(t,r,n,i){function a(s,l){return k$e.coerce(t,r,ter,s,l)}var o=YQt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var rer=w9();P$e.exports=function(t,r,n){var i=t.i;return"r"in t||(t.r=r._r[i]),"theta"in t||(t.theta=r._theta[i]),rer(t,r,n)}});var D$e=ye(($wr,R$e)=>{"use strict";var ier=F0(),ner=O0().calcMarkerSize,aer=J2(),oer=ho(),ser=ox().TOO_MANY_POINTS;R$e.exports=function(t,r){var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var ler=UF(),uer=T9().makeHoverPointText;function cer(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=ler.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,uer(f,h,c,u),l}}F$e.exports={hoverPoints:cer}});var q$e=ye((e3r,O$e)=>{"use strict";O$e.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:y9(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:K$(),supplyDefaults:L$e(),colorbar:$d(),formatLabels:I$e(),calc:D$e(),hoverPoints:z$e().hoverPoints,selectPoints:uY(),meta:{}}});var B$e=ye((t3r,$$)=>{"use strict";var fer=HF(),her=Eo(),der=dK(),ver=oY(),A9=J2(),S9=Dr(),per=ox().TOO_MANY_POINTS,ger={};$$.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=ver(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,v=c.opts,_,b=h.slice(),p=d.slice();for(_=0;_=per&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=k),v.line&&k.length>1&&S9.extendFlat(v.line,A9.linePositions(t,u,k)),v.text&&(S9.extendFlat(v.text,{positions:k},A9.textPosition(t,u,v.text,v.marker)),S9.extendFlat(v.textSel,{positions:k},A9.textPosition(t,u,v.text,v.markerSel)),S9.extendFlat(v.textUnsel,{positions:k},A9.textPosition(t,u,v.text,v.markerUnsel))),v.fill&&!o.fill2d&&(o.fill2d=!0),v.marker&&!o.scatter2d&&(o.scatter2d=!0),v.line&&!o.line2d&&(o.line2d=!0),v.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(v.line),o.fillOptions.push(v.fill),o.markerOptions.push(v.marker),o.markerSelectedOptions.push(v.markerSel),o.markerUnselectedOptions.push(v.markerUnsel),o.textOptions.push(v.text),o.textSelectedOptions.push(v.textSel),o.textUnselectedOptions.push(v.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=E,c.y=S,c.rawx=E,c.rawy=S,c.r=h,c.theta=d,c.positions=k,c._scene=o,c.index=o.count,o.count++}}),der(t,r,n)}};$$.exports.reglPrecompiled=ger});var V$e=ye((r3r,U$e)=>{"use strict";var N$e=q$e();N$e.plot=B$e();U$e.exports=N$e});var H$e=ye((i3r,G$e)=>{"use strict";G$e.exports=V$e()});var Q$=ye((n3r,j$e)=>{"use strict";var{hovertemplateAttrs:mer,templatefallbackAttrs:yer}=Ll(),K5=Ao().extendFlat,Ix=hC(),Rx=Lm();j$e.exports={r:Ix.r,theta:Ix.theta,r0:Ix.r0,dr:Ix.dr,theta0:Ix.theta0,dtheta:Ix.dtheta,thetaunit:Ix.thetaunit,base:K5({},Rx.base,{}),offset:K5({},Rx.offset,{}),width:K5({},Rx.width,{}),text:K5({},Rx.text,{}),hovertext:K5({},Rx.hovertext,{}),marker:_er(),hoverinfo:Ix.hoverinfo,hovertemplate:mer(),hovertemplatefallback:yer(),selected:Rx.selected,unselected:Rx.unselected};function _er(){var e=K5({},Rx.marker);return delete e.cornerradius,e}});var eQ=ye((a3r,W$e)=>{"use strict";W$e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Y$e=ye((o3r,Z$e)=>{"use strict";var X$e=Dr(),xer=b9().handleRThetaDefaults,ber=VI(),wer=Q$();Z$e.exports=function(t,r,n,i){function a(s,l){return X$e.coerce(t,r,wer,s,l)}var o=xer(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),ber(t,r,a,n,i),X$e.coerceSelectionMarkerOpacity(r,a)}});var J$e=ye((s3r,K$e)=>{"use strict";var Ter=Dr(),Aer=eQ();K$e.exports=function(e,t,r){var n={},i;function a(l,u){return Ter.coerce(e[i]||{},t[i],Aer,l,u)}for(var o=0;o{"use strict";var $$e=pv().hasColorscale,Q$e=gv(),Ser=Dr().isArrayOrTypedArray,Mer=g4(),Eer=jb().setGroupPositions,ker=z0(),Cer=qa().traceIs,Ler=Dr().extendFlat;function Per(e,t){for(var r=e._fullLayout,n=t.subplot,i=r[n].radialaxis,a=r[n].angularaxis,o=i.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h{"use strict";var tQe=Oa(),M9=Eo(),J5=Dr(),Rer=So(),rQ=f9();rQe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Der(r),c=r.layers.frontplot.select("g.barlayer");J5.makeTraceGroups(c,n,"trace bars").each(function(){var f=tQe.select(this),h=J5.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(J5.identity);d.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(v){var _=tQe.select(this),b=v.rp0=s.c2p(v.s0),p=v.rp1=s.c2p(v.s1),k=v.thetag0=l.c2g(v.p0),E=v.thetag1=l.c2g(v.p1),S;if(!M9(b)||!M9(p)||!M9(k)||!M9(E)||b===p||k===E)S="M0,0Z";else{var L=s.c2g(v.s1),x=(k+E)/2;v.ct=[a.c2p(L*Math.cos(x)),o.c2p(L*Math.sin(x))],S=u(b,p,k,E)}J5.ensureSingle(_,"path").attr("d",S)}),Rer.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Der(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;J5.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=rQ.findEnclosingVertexAngles(s,e.vangles)[0],c=rQ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return rQ.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return J5.pathAnnulus(n,i,a,o,t,r)}}});var aQe=ye((c3r,nQe)=>{"use strict";var Fer=vf(),iQ=Dr(),zer=ET().getTraceColor,Oer=iQ.fillText,qer=T9().makeHoverPointText,Ber=f9().isPtInsidePolygon;nQe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?Ber:iQ.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),v=Math.atan2(n,r);s.range[0]>s.range[1]&&(v+=Math.PI);var _=function(E){return c(d,v,[E.rp0,E.rp1],[E.thetag0,E.thetag1],u)?f+Math.min(1,Math.abs(E.thetag1-E.thetag0)/h)-1+(E.rp1-d)/(E.rp1-E.rp0)-1:1/0};if(Fer.getClosest(i,_,t),t.index!==!1){var b=t.index,p=i[b];t.x0=t.x1=p.ct[0],t.y0=t.y1=p.ct[1];var k=iQ.extendFlat({},p,{r:p.s,theta:p.p});return Oer(p,a,t),qer(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=zer(a,p),t.xLabelVal=t.yLabelVal=void 0,p.s<0&&(t.idealAlign="left"),[t]}}});var sQe=ye((f3r,oQe)=>{"use strict";oQe.exports={moduleType:"trace",name:"barpolar",basePlotModule:y9(),categories:["polar","bar","showLegend"],attributes:Q$(),layoutAttributes:eQ(),supplyDefaults:Y$e(),supplyLayoutDefaults:J$e(),calc:tQ().calc,crossTraceCalc:tQ().crossTraceCalc,plot:iQe(),colorbar:$d(),formatLabels:w9(),style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:aQe(),selectPoints:kT(),meta:{}}});var uQe=ye((h3r,lQe)=>{"use strict";lQe.exports=sQe()});var nQ=ye((d3r,cQe)=>{"use strict";cQe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var aQ=ye((v3r,vQe)=>{"use strict";var Ner=Lh(),Nf=Rd(),Uer=Cc().attributes,Dx=Dr().extendFlat,fQe=mc().overrideAll,hQe=fQe({color:Nf.color,showline:Dx({},Nf.showline,{dflt:!0}),linecolor:Nf.linecolor,linewidth:Nf.linewidth,showgrid:Dx({},Nf.showgrid,{dflt:!0}),gridcolor:Nf.gridcolor,gridwidth:Nf.gridwidth,griddash:Nf.griddash},"plot","from-root"),dQe=fQe({ticklen:Nf.ticklen,tickwidth:Dx({},Nf.tickwidth,{dflt:2}),tickcolor:Nf.tickcolor,showticklabels:Nf.showticklabels,labelalias:Nf.labelalias,showtickprefix:Nf.showtickprefix,tickprefix:Nf.tickprefix,showticksuffix:Nf.showticksuffix,ticksuffix:Nf.ticksuffix,tickfont:Nf.tickfont,tickformat:Nf.tickformat,hoverformat:Nf.hoverformat,layer:Nf.layer},"plot","from-root"),Ver=Dx({visible:Dx({},Nf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Dx({},Nf.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},hQe,dQe),Ger=Dx({visible:Dx({},Nf.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Nf.ticks,editType:"calc"},hQe,dQe);vQe.exports={domain:Uer({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:Ner.background},realaxis:Ver,imaginaryaxis:Ger,editType:"calc"}});var mQe=ye((p3r,gQe)=>{"use strict";var $5=Dr(),Her=ka(),jer=vl(),Wer=k_(),Xer=Id().getSubplotData,Zer=t_(),Yer=e_(),Ker=t4(),Jer=ym(),Q5=aQ(),oQ=nQ(),pQe=oQ.axisNames,$er=etr(function(e){return $5.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function Qer(e,t,r,n){var i=r("bgcolor");n.bgColor=Her.combine(i,n.paper_bgcolor);var a=Xer(n.fullData,oQ.name,n.id),o=n.layoutOut,s;function l(L,x){return r(s+"."+L,x)}for(var u=0;u{"use strict";var ttr=Id().getSubplotCalcData,rtr=Dr().counterRegex,itr=Z$(),_Qe=nQ(),xQe=_Qe.attr,xw=_Qe.name,yQe=rtr(xw),bQe={};bQe[xQe]={valType:"subplotid",dflt:xw,editType:"calc"};function ntr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[xw],i=0;i{"use strict";var{hovertemplateAttrs:otr,texttemplateAttrs:str,templatefallbackAttrs:AQe}=Ll(),E9=Ao().extendFlat,ltr=Cg(),h0=pf(),utr=Gl(),eS=h0.line;SQe.exports={mode:h0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:str({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:AQe({editType:"plot"}),hovertext:h0.hovertext,line:{color:eS.color,width:eS.width,dash:eS.dash,backoff:eS.backoff,shape:E9({},eS.shape,{values:["linear","spline"]}),smoothing:eS.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:E9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:E9({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:ltr(),hoverinfo:E9({},utr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:h0.hoveron,hovertemplate:otr(),hovertemplatefallback:AQe(),selected:h0.selected,unselected:h0.unselected}});var kQe=ye((y3r,EQe)=>{"use strict";var k9=Dr(),tS=Ru(),ctr=$p(),ftr=R0(),MQe=tT(),htr=D0(),dtr=Rg(),vtr=Sm().PTS_LINESONLY,ptr=sQ();EQe.exports=function(t,r,n,i){function a(l,u){return k9.coerce(t,r,ptr,l,u)}var o=gtr(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var CQe=ho();LQe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=CQe.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=CQe.tickText(a.angularAxis,t.imag,!0).text,i}});var DQe=ye((x3r,RQe)=>{"use strict";var IQe=Eo(),mtr=fs().BADNUM,ytr=F0(),_tr=km(),xtr=z0(),btr=O0().calcMarkerSize;RQe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].realaxis,o=n[i].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var wtr=sT(),FQe=fs().BADNUM,Ttr=j$(),Atr=Ttr.smith;zQe.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var Str=fT();function Mtr(e,t,r,n){var i=Str(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,qQe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function qQe(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(i,n.realLabel),f.indexOf("imag")!==-1&&c(a,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}BQe.exports={hoverPoints:Mtr,makeHoverPointText:qQe}});var VQe=ye((T3r,UQe)=>{"use strict";UQe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:TQe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:sQ(),supplyDefaults:kQe(),colorbar:$d(),formatLabels:PQe(),calc:DQe(),plot:OQe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:NQe().hoverPoints,selectPoints:hT(),meta:{}}});var HQe=ye((A3r,GQe)=>{"use strict";GQe.exports=VQe()});var kv=ye((S3r,WQe)=>{var L9=Oh();function jQe(){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={}}L9(jQe.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,i):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(a===0?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function lQ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function C9(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}L9(lQ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Gs.local.differentCalendars||Gs.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+C9(Math.abs(this.year()),4)+"-"+C9(this.month(),2)+"-"+C9(this.day(),2)}});function uQ(){this.shortYearCutoff="+10"}L9(uQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new lQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+C9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),i=e.day(),s=function(c){for(;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)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r==="m"&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),i=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Gs=WQe.exports=new jQe;Gs.cdate=lQ;Gs.baseCalendar=uQ;Gs.calendars.gregorian=cQ});var XQe=ye(()=>{var fQ=Oh(),Ud=kv();fQ(Ud.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"});Ud.local=Ud.regionalOptions[""];fQ(Ud.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});fQ(Ud.baseCalendar.prototype,{UNIX_EPOCH:Ud.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Ud.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Ud.local.invalidFormat||Ud.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,i=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(S,L){for(var x=1;E+x1},c=function(S,L,x,C){var M=""+L;if(u(S,C))for(;M.length1},k=function(z,O){var V=p(z,O),G=[2,3,V?4:2,V?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],Z=new RegExp("^-?\\d{1,"+G+"}"),j=t.substring(M).match(Z);if(!j)throw(Ud.local.missingNumberAt||Ud.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=j[0].length,parseInt(j[0],10)},E=this,S=function(){if(typeof s=="function"){p("m");var z=s.call(E,t.substring(M));return M+=z.length,z}return k("m")},L=function(z,O,V,G){for(var Z=p(z,G)?V:O,j=0;j-1){h=1,d=v;for(var T=this.daysInMonth(f,h);d>T;T=this.daysInMonth(f,h))h++,d-=T}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,n,i){r&&typeof r!="object"&&(i=n,n=r,r=null),typeof n!="string"&&(i=n,n="");var a=this,o=function(s){try{return a.parseDate(n,s,i)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e),e}})});var ZQe=ye(()=>{var Fx=kv(),Etr=Oh(),hQ=Fx.instance();function P9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}P9.prototype=new Fx.baseCalendar;Etr(P9.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(Ctr);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),a=""+this.toChineseMonth(n,i);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(e){if(typeof e=="string"){var t=e.match(Ltr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(Ptr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var i=t[t.length-1];n=i==="i"||i==="I"}var a=this.toMonthIndex(e,r,n);return a},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),i=r&&t!==n;if(i||t<1||t>12)throw Fx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return n?!r&&t<=n?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw Fx.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;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 n=this._validateYear(e,Fx.local.invalidyear),i=Ox[n-Ox[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=hQ.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=zx[e-zx[0]],n=r>>13,i=n?12:11;if(t>i)throw Fx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,a,r,Fx.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var i=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=Rtr(e,a,r,i);return hQ.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=hQ.fromJD(e),r=Itr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(ktr),r=this._validateYear(+t[1]),n=+t[2],i=!!t[3],a=this.toMonthIndex(r,n,i),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var n=e.year(),i=e.month(),a=this.isIntercalaryMonth(n,i),o=this.toChineseMonth(n,i),s=Object.getPrototypeOf(P9.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 ktr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Ctr=/^\d?\d[iI]?/m,Ltr=/^闰?十?[一二三四五六七八九]?月/m,Ptr=/^闰?十?[一二三四五六七八九]?/m;Fx.calendars.chinese=P9;var zx=[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],Ox=[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 Itr(e,t,r,n){var i,a;if(typeof e=="object")i=e,a=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var u=Ox[i.year-Ox[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Ox[a.year-Ox[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,_=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-_)/(24*3600*1e3));var p=zx[a.year-zx[0]],k;for(k=0;k<13;k++){var E=p&1<<12-k?30:29;if(v>13;return!S||k=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=zx[o.year-zx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var _=0;_>9&4095,E=p>>5&15,S=p&31,L=new Date(k,E-1,S+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var YQe=ye(()=>{var bw=kv(),Dtr=Oh();function dQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}dQ.prototype=new bw.baseCalendar;Dtr(dQ.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,bw.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,bw.local.invalidYear||bw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,bw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});bw.calendars.coptic=dQ});var KQe=ye(()=>{var x1=kv(),Ftr=Oh();function vQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}vQ.prototype=new x1.baseCalendar;Ftr(vQ.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,x1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,x1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,x1.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,x1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,x1.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,x1.local.invalidDate);return{century:ztr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,x1.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var ztr={20:"Fruitbat",21:"Anchovy"};x1.calendars.discworld=vQ});var JQe=ye(()=>{var ww=kv(),Otr=Oh();function pQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}pQ.prototype=new ww.baseCalendar;Otr(pQ.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,ww.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,ww.local.invalidYear||ww.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,ww.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,ww.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});ww.calendars.ethiopian=pQ});var $Qe=ye(()=>{var qx=kv(),qtr=Oh();function gQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}gQ.prototype=new qx.baseCalendar;qtr(gQ.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,qx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,I9(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,qx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,qx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,qx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&I9(this.daysInYear(e),10)===5?30:t===9&&I9(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,qx.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,qx.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e<=0?e+1:e,a=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function I9(e,t){return e-t*Math.floor(e/t)}qx.calendars.hebrew=gQ});var QQe=ye(()=>{var dC=kv(),Btr=Oh();function mQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}mQ.prototype=new dC.baseCalendar;Btr(mQ.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,dC.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,dC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,dC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});dC.calendars.islamic=mQ});var eet=ye(()=>{var vC=kv(),Ntr=Oh();function yQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}yQ.prototype=new vC.baseCalendar;Ntr(yQ.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,vC.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,vC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,vC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});vC.calendars.julian=yQ});var ret=ye(()=>{var ug=kv(),Utr=Oh();function xQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}xQ.prototype=new ug.baseCalendar;Utr(xQ.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,ug.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ug.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ug.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,ug.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ug.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,ug.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,ug.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,ug.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,ug.local.invalidDate),i=n.toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=_Q(e+8+17*20,365);return[Math.floor(t/20)+1,_Q(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[tet(e+20,20),tet(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,ug.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function _Q(e,t){return e-t*Math.floor(e/t)}function tet(e,t){return _Q(e-1,t)+1}ug.calendars.mayan=xQ});var net=ye(()=>{var Tw=kv(),Vtr=Oh();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new Tw.baseCalendar;var iet=Tw.instance("gregorian");Vtr(bQ.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,Tw.local.invalidYear||Tw.regionalOptions[""].invalidYear);return iet.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Tw.local.invalidMonth),i=n.year();i<0&&i++;for(var a=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});Tw.calendars.nanakshahi=bQ});var aet=ye(()=>{var Aw=kv(),Gtr=Oh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new Aw.baseCalendar;Gtr(wQ.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Aw.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Aw.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,Aw.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=Aw.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=i.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=Aw.instance(),r=t.fromJD(e),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var rS=kv(),Htr=Oh();function D9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function R9(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1),a=n-Math.floor(n),o=i-Math.floor(i);return a>o}D9.prototype=new rS.baseCalendar;Htr(D9.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,rS.local.invalidYear);return R9(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,rS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,rS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=0;if(e>0)for(var a=1;a0?e-1:e)*365+i+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,R9(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,i=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),a=e-this.toJD(r,i,1)+1;return this.newDate(r,i,a)}});rS.calendars.persian=D9;rS.calendars.jalali=D9});var set=ye(()=>{var Sw=kv(),jtr=Oh(),F9=Sw.instance();function TQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}TQ.prototype=new Sw.baseCalendar;jtr(TQ.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,Sw.local.invalidYear),r=this._t2gYear(t.year());return F9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Sw.local.invalidYear),i=this._t2gYear(n.year());return F9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Sw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Sw.local.invalidDate),i=this._t2gYear(n.year());return F9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=F9.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)}});Sw.calendars.taiwan=TQ});var uet=ye(()=>{var Mw=kv(),Wtr=Oh(),z9=Mw.instance();function AQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}AQ.prototype=new Mw.baseCalendar;Wtr(AQ.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,Mw.local.invalidYear),r=this._t2gYear(t.year());return z9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Mw.local.invalidYear),i=this._t2gYear(n.year());return z9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Mw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Mw.local.invalidDate),i=this._t2gYear(n.year());return z9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=z9.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)}});Mw.calendars.thai=AQ});var cet=ye(()=>{var Ew=kv(),Xtr=Oh();function SQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}SQ.prototype=new Ew.baseCalendar;Xtr(SQ.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,Ew.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,Ew.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;an)return Bx[i]-Bx[i-1];i++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,Ew.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Bx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,l=t-Bx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=Ew.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var i=Ew.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});Ew.calendars.ummalqura=SQ;var Bx=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]});var het=ye((rTr,fet)=>{"use strict";fet.exports=kv();XQe();ZQe();YQe();KQe();JQe();$Qe();QQe();eet();ret();net();aet();oet();set();uet();cet()});var _et=ye((iTr,yet)=>{"use strict";var vet=het(),pC=Dr(),pet=fs(),Ztr=pet.EPOCHJD,Ytr=pet.ONEDAY,kQ={valType:"enumerated",values:pC.sortObjectKeys(vet.calendars),editType:"calc",dflt:"gregorian"},get=function(e,t,r,n){var i={};return i[r]=kQ,pC.coerce(e,t,i,r,n)},Ktr=function(e,t,r,n){for(var i=0;i{"use strict";xet.exports=_et()});var rrr=ye((aTr,Tet)=>{var wet=iye();wet.register([o1e(),X1e(),sxe(),kxe(),Vxe(),qbe(),Jbe(),q2e(),dwe(),Ywe(),z3e(),ZEe(),Oke(),k6e(),gLe(),XLe(),mPe(),VIe(),s8e(),S8e(),O8e(),J8e(),hRe(),kRe(),rFe(),wFe(),BBe(),BNe(),YUe(),bVe(),PGe(),WGe(),gHe(),kje(),Gje(),dWe(),wXe(),WXe(),EZe(),YYe(),_Ke(),NKe(),hJe(),MJe(),S$e(),H$e(),uQe(),HQe(),bet()]);Tet.exports=wet});return rrr();})(); /*! * 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. */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ /*! 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.js: (** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt *) */ window.Plotly = Plotly; return Plotly; }));